@import url("https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,100..900;1,100..900&family=Lora:ital,wght@0,400..700;1,400..700&display=swap");

:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #fafaf8;
  --surface-mint: #f2f2ef;
  --ink: #171717;
  --ink-soft: #242424;
  --muted: #6f6b63;
  --line: #e7e5df;
  --brand: #109a58;
  --brand-dark: #087946;
  --brand-ink: #087946;
  --success: #109a58;
  --blue: #0f8f73;
  --green: #109a58;
  --red: #dc2626;
  --shadow: none;
  --shadow-soft: none;
  font-family: "Public Sans", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-feature-settings: "tnum";
}

body.chat-page-active {
  overflow: hidden;
}

@media (max-width: 1080px) {
  body.chat-page-active {
    overflow: auto;
  }
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

* {
  scrollbar-width: none;
}

.el-button--primary {
  --el-button-bg-color: var(--brand);
  --el-button-border-color: var(--brand);
  --el-button-hover-bg-color: var(--brand);
  --el-button-hover-border-color: var(--brand-dark);
  --el-button-active-bg-color: var(--brand-dark);
  --el-button-active-border-color: var(--brand-dark);
  --el-button-text-color: #fff;
  --el-button-hover-text-color: #fff;
  --el-button-active-text-color: #fff;
}

.el-button--primary,
.el-button--primary:hover,
.el-button--primary:focus,
.el-button--primary:active {
  color: #fff;
}

.el-button:not(.el-button--primary) {
  --el-button-bg-color: rgba(251, 255, 248, 0.82);
  --el-button-border-color: var(--line);
  --el-button-hover-bg-color: #effdf4;
  --el-button-hover-border-color: var(--brand);
  --el-button-hover-text-color: var(--brand-ink);
}

.ant-btn.el-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
}

.ant-btn.el-button > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

.ant-btn.el-button--primary,
.ant-btn.el-button--primary:hover,
.ant-btn.el-button--primary:focus {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  text-shadow: none;
}

.ant-btn.el-button--primary i,
.ant-btn.el-button--primary span {
  color: #fff;
}

.el-dialog {
  --el-dialog-bg-color: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgb(15 23 42 / 14%);
}

.el-input__wrapper,
.el-textarea__inner,
.el-select__wrapper {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line) inset;
}

.el-input__wrapper.is-focus,
.el-textarea__inner:focus,
.el-select__wrapper.is-focused {
  box-shadow: 0 0 0 1px var(--brand) inset, 0 0 0 4px rgba(71, 201, 120, 0.14);
}

.el-radio-button__inner {
  border-color: var(--line);
  background: rgba(251, 255, 248, 0.88);
  color: var(--ink-soft);
}

.el-radio-button__original-radio:checked + .el-radio-button__inner {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: -1px 0 0 0 var(--brand);
  color: #fff;
}

.el-tag {
  --el-tag-bg-color: rgba(232, 248, 223, 0.9);
  --el-tag-border-color: var(--line);
  --el-tag-text-color: var(--brand-ink);
}

.compat-prompt-modal .ant-modal-content {
  overflow: hidden;
  border: 1px solid rgba(184, 205, 194, 0.72);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(16, 35, 26, 0.22);
}

.compat-prompt-modal .ant-modal-confirm-body {
  align-items: flex-start;
}

.compat-prompt-modal .ant-modal-confirm-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.compat-prompt-modal .ant-modal-confirm-content {
  max-width: none;
  margin-top: 10px;
}

.compat-prompt-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 14px;
}

.compat-prompt {
  display: grid;
  gap: 12px;
  min-width: min(320px, 70vw);
}

.compat-prompt-message {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.compat-prompt-input.ant-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(202, 211, 207, 0.95);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.compat-prompt-input.ant-input:hover,
.compat-prompt-input.ant-input:focus {
  border-color: rgba(71, 201, 120, 0.82);
  box-shadow: 0 0 0 4px rgba(71, 201, 120, 0.14), 0 12px 28px rgba(24, 125, 75, 0.08);
}

.compat-prompt-modal .ant-modal-confirm-btns {
  margin-top: 18px;
}

.compat-prompt-modal .ant-btn {
  min-width: 68px;
  min-height: 36px;
  border-radius: 8px;
  font-weight: 850;
}

.compat-prompt-modal .ant-btn-primary {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 10px 22px rgba(22, 163, 91, 0.18);
}

.compat-prompt-modal .ant-btn-primary:hover,
.compat-prompt-modal .ant-btn-primary:focus {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

/* NewAPI v1 neutral skin */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #fafaf8;
  --surface-mint: #f2f2ef;
  --ink: #171717;
  --ink-soft: #242424;
  --muted: #6f6b63;
  --line: #e7e5df;
  --brand: #109a58;
  --brand-dark: #087946;
  --brand-ink: #087946;
  --success: #109a58;
  --blue: #0f8f73;
  --green: #109a58;
  --red: #dc2626;
  --shadow: none;
  --shadow-soft: none;
}

.el-button--primary,
.el-button--primary:hover,
.el-button--primary:focus,
.el-button--primary:active,
.ant-btn.el-button--primary,
.ant-btn.el-button--primary:hover,
.ant-btn.el-button--primary:focus,
.compat-prompt-modal .ant-btn-primary,
.compat-prompt-modal .ant-btn-primary:hover,
.compat-prompt-modal .ant-btn-primary:focus {
  border-color: var(--brand) !important;
  background: var(--brand) !important;
  box-shadow: none !important;
}

.el-input__wrapper,
.el-textarea__inner,
.el-select__wrapper,
.compat-prompt-input.ant-input {
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--line) inset;
}

.el-input__wrapper.is-focus,
.el-textarea__inner:focus,
.el-select__wrapper.is-focused,
.compat-prompt-input.ant-input:hover,
.compat-prompt-input.ant-input:focus {
  box-shadow: 0 0 0 1px var(--brand) inset, 0 0 0 3px rgba(16, 154, 88, .14);
}
