:root {
  --bg: #f5fbf8;
  --surface: #ffffff;
  --text: #173834;
  --muted: #607a73;
  --line: #d8ece4;
  --primary: #0b8f73;
  --primary-deep: #056b5f;
  --accent: #07939f;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* Sync value-service login pages with the ERP login style. */
.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 492px);
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 56px 6vw;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(3, 117, 95, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(21, 196, 143, 0.12), transparent 38%),
    linear-gradient(125deg, #f7fff9 0%, #ffffff 42%, #e8fbf3 100%);
}

.login-page::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 22%, rgba(255, 255, 255, 0.72) 22% 23%, transparent 23% 58%, rgba(11, 127, 105, 0.08) 58% 59%, transparent 59%),
    repeating-linear-gradient(135deg, rgba(6, 128, 105, 0.045) 0 1px, transparent 1px 22px);
  content: "";
}

.login-panel {
  width: min(100%, 492px);
  justify-self: center;
  padding: 48px 50px;
  border: 1px solid rgba(137, 221, 190, 0.48);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 255, 251, 0.9));
  box-shadow: 0 24px 60px rgba(0, 103, 83, 0.18);
  backdrop-filter: blur(14px);
  z-index: 2;
}

.login-page .brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-page .brand-lockup > div:last-child {
  min-width: 0;
  flex: 1;
}

.login-page .brand-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid rgba(119, 224, 184, 0.42);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(5, 118, 100, 0.22);
  overflow: hidden;
}

.login-page .brand-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-page .brand-lockup h1 {
  margin: 0;
  color: #063a3d;
  font-size: clamp(21px, 1.85vw, 25px);
  line-height: 1.2;
  white-space: nowrap;
}

.login-page .brand-lockup p {
  margin: 4px 0 0;
  color: #55756d;
  font-size: 13px;
}

.login-page .tab.active {
  color: #05836d;
  font-weight: 700;
}

.login-page .field {
  color: #607a73;
  font-size: 13px;
  font-weight: 400;
}

.login-page .field input,
.login-page .field select,
.login-page .field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(171, 221, 202, 0.76);
  border-radius: 8px;
  padding: 0 13px;
  color: #173834;
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.login-page .field input:focus,
.login-page .field textarea:focus {
  border-color: #10a77d;
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.14);
}

.login-page .code-field button {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #0b8f73;
}

.login-page .primary,
.login-page .primary-action {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #057866, #13bc83 52%, #07939f);
  box-shadow: 0 12px 26px rgba(5, 120, 102, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-page .primary:hover,
.login-page .primary-action:hover {
  transform: translateY(-1px);
}

.login-page .login-submit {
  min-height: 48px;
  border-radius: 24px;
  font-size: 16px;
}

.login-page .login-links a {
  color: #067b67;
}

.login-page .login-links a:hover {
  color: #034d43;
}

.login-page .security-note {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #6d5a12;
  background: #fbf5db;
  font-size: 13px;
}

@media (max-width: 620px) {
  .login-page {
    align-items: start;
    padding: 28px 16px 72px;
  }

  .login-panel {
    padding: 28px 22px;
  }

  .login-page .login-links {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .login-page .code-field {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(3, 117, 95, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(21, 196, 143, 0.12), transparent 38%),
    linear-gradient(125deg, #f7fff9 0%, #ffffff 42%, #e8fbf3 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 492px);
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 56px 6vw;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(3, 117, 95, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(21, 196, 143, 0.12), transparent 38%),
    linear-gradient(125deg, #f7fff9 0%, #ffffff 42%, #e8fbf3 100%);
}

.login-page::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 22%, rgba(255, 255, 255, 0.72) 22% 23%, transparent 23% 58%, rgba(11, 127, 105, 0.08) 58% 59%, transparent 59%),
    repeating-linear-gradient(135deg, rgba(6, 128, 105, 0.045) 0 1px, transparent 1px 22px);
  content: "";
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 492px);
  justify-self: center;
  padding: 48px 50px;
  border: 1px solid rgba(137, 221, 190, 0.48);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 255, 251, 0.9));
  box-shadow: 0 24px 60px rgba(0, 103, 83, 0.18);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand-mark {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(5, 118, 100, 0.22);
}

.brand-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-lockup h1 {
  margin: 0;
  color: #063a3d;
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: 1.2;
  white-space: nowrap;
}

.brand-lockup p {
  margin: 6px 0 0;
  color: #55756d;
  font-size: 13px;
}

.login-tabs {
  display: flex;
  gap: 28px;
  margin-top: 52px;
  border-bottom: 1px solid rgba(148, 219, 194, 0.46);
}

.tab {
  position: relative;
  padding: 0 0 13px;
  border: 0;
  color: var(--text);
  background: transparent;
}

.tab.active {
  color: #05836d;
  font-weight: 800;
}

.tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #047866, #18c58b);
  content: "";
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(171, 221, 202, 0.76);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.field input:focus {
  border-color: #10a77d;
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.14);
}

.code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
}

.code-field button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
}

.remember-line {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.remember-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.login-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  font-size: 14px;
  text-align: center;
}

.login-links a {
  color: #067b67;
  text-decoration: none;
}

.login-submit {
  min-height: 48px;
  border-radius: 24px;
  font-size: 16px;
}

.security-note {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #6d5a12;
  background: #fbf5db;
  font-size: 13px;
}

.login-helper {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(171, 221, 202, 0.76);
  border-radius: 10px;
  background: #f4fff9;
  color: var(--muted);
  line-height: 1.6;
}

.login-helper strong {
  color: var(--text);
  font-size: 18px;
}

.login-helper .outline-action {
  width: max-content;
}

.login-footer {
  position: absolute;
  right: 0;
  bottom: 26px;
  left: 0;
  color: #66877e;
  font-size: 13px;
  text-align: center;
}

.login-footer a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.login-footer a:hover {
  color: #067b67;
}

.outline-action {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  color: #057866;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.ai-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(119, 224, 184, 0.42);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(5, 118, 100, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #063a3d;
  font-size: 20px;
}

.brand span,
.eyebrow,
.panel-head span,
.mini-card span {
  color: #55756d;
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.merchant-center-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  justify-items: end;
  align-items: start;
  padding: 88px 24px 24px;
  background: rgba(6, 58, 61, 0.18);
}

.merchant-center-modal.hidden {
  display: none;
}

.merchant-center-card {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(171, 221, 202, 0.9);
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(6, 58, 61, 0.18);
}

.merchant-center-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.merchant-center-head span,
.merchant-center-grid span,
.merchant-center-card p {
  color: #607a75;
  font-size: 13px;
}

.merchant-center-head strong {
  display: block;
  margin-top: 4px;
  color: #063a3d;
  font-size: 20px;
}

.merchant-center-head button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #edf7f3;
  color: #063a3d;
  font-size: 20px;
  cursor: pointer;
}

.merchant-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.merchant-center-grid article {
  min-height: 86px;
  border: 1px solid rgba(171, 221, 202, 0.7);
  border-radius: 8px;
  padding: 14px;
  background: #f8fffb;
}

.merchant-center-grid strong {
  display: block;
  margin-top: 8px;
  color: #063a3d;
  font-size: 22px;
  line-height: 1.1;
}

.merchant-center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.merchant-center-card p {
  margin: 14px 0 0;
  line-height: 1.6;
}

.reply-history-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 28, 24, 0.42);
  backdrop-filter: blur(10px);
}

.reply-history-modal.hidden {
  display: none !important;
}

.reply-history-card {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(137, 221, 190, 0.54);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 255, 251, 0.96));
  box-shadow: 0 24px 70px rgba(0, 83, 68, 0.24);
}

.reply-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(171, 221, 202, 0.66);
}

.reply-history-head span {
  display: block;
  color: #0b8f73;
  font-size: 13px;
  font-weight: 900;
}

.reply-history-head strong {
  display: block;
  margin-top: 4px;
  color: #063a3d;
  font-size: 22px;
}

.reply-history-head button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #057866;
  background: #e9fff5;
  font-size: 24px;
}

.reply-history-list {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 170px);
  overflow: auto;
  padding: 20px 24px 24px;
}

.reply-history-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(171, 221, 202, 0.7);
  border-radius: 12px;
  background: #fff;
}

.reply-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #607a73;
  font-size: 12px;
  font-weight: 800;
}

.reply-history-question {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(208, 226, 219, 0.9);
  background: #f8fbfa;
}

.reply-history-question span,
.reply-history-answer-label {
  color: #607a73;
  font-size: 12px;
  font-weight: 900;
}

.reply-history-question p {
  margin: 0;
  color: #294840;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
  white-space: pre-line;
}

.reply-history-text {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  color: #123d35;
  background: #f4fff9;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
  white-space: pre-line;
}

.reply-history-empty {
  padding: 30px;
  border: 1px dashed rgba(11, 143, 115, 0.35);
  border-radius: 14px;
  color: #607a73;
  background: #fff;
  text-align: center;
  line-height: 1.8;
}

.service-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 58, 61, 0.46);
  backdrop-filter: blur(8px);
}

.service-notice-modal.hidden {
  display: none;
}

.service-notice-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(171, 221, 202, 0.92);
  border-radius: 8px;
  padding: 28px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 26px 80px rgba(6, 58, 61, 0.26);
}

.service-notice-card span {
  color: #067b67;
  font-size: 13px;
  font-weight: 800;
}

.service-notice-card h2 {
  margin: 10px 0;
  color: #063a3d;
  font-size: 24px;
}

.service-notice-card p {
  margin: 0 auto 18px;
  max-width: 320px;
  color: #55756d;
  line-height: 1.7;
}

.service-notice-card img {
  display: block;
  width: 178px;
  height: 178px;
  margin: 0 auto 12px;
  border: 1px solid rgba(171, 221, 202, 0.72);
  border-radius: 8px;
  object-fit: cover;
}

.service-notice-card strong {
  color: #063a3d;
}

.service-notice-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #edf7f3;
  color: #063a3d;
  font-size: 22px;
  cursor: pointer;
}

.ghost-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  color: #057866;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.hero {
  padding: 42px 0 26px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #067b67;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  color: #063a3d;
  font-size: 48px;
  line-height: 1.16;
}

.hero p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.assistant-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.panel,
.mini-card {
  border: 1px solid rgba(171, 221, 202, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(5, 120, 102, 0.08);
}

.panel {
  display: grid;
  align-content: start;
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin-bottom: 5px;
  color: #063a3d;
  font-size: 21px;
}

textarea {
  width: 100%;
  min-height: 194px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}

.customer-name-field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.customer-name-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  outline: none;
}

textarea:focus,
.customer-name-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.12);
}

.primary-action {
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #057866, #13bc83 52%, #07939f);
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(5, 120, 102, 0.18);
}

.score-pill {
  display: grid;
  min-width: 86px;
  place-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: #057866;
  background: #e9fff5;
}

.score-pill strong {
  font-size: 28px;
  line-height: 1;
}

.score-pill span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}

.profile-result {
  display: grid;
  gap: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-grid article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
}

.profile-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile-grid strong {
  display: block;
  margin-top: 7px;
  color: #063a3d;
  font-size: 16px;
}

.tag-row,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #057866;
  background: #e9fff5;
  font-size: 12px;
  font-weight: 800;
}

.reply-box {
  min-height: 196px;
  padding: 18px 20px;
  border-radius: 8px;
  border: 1px solid rgba(11, 143, 115, 0.16);
  color: #123d35;
  background: linear-gradient(180deg, #ffffff, #f4fff9);
  box-shadow: inset 4px 0 0 rgba(11, 143, 115, 0.42);
  font-size: 16px;
  font-weight: 700;
  line-height: 2;
  white-space: pre-line;
}

.copy-reply-action {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.quick-actions {
  margin-top: 14px;
}

.copy-mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.copy-mode-row button {
  min-height: 34px;
  border: 1px solid rgba(11, 143, 115, 0.2);
  border-radius: 8px;
  color: #057866;
  background: #f4fff9;
  font-size: 13px;
  font-weight: 800;
}

.quick-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: #456960;
  background: #fff;
  font-weight: 700;
}

.quick-actions button.active,
.quick-actions button:hover {
  color: #057866;
  background: #f4fff9;
}

.simple-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.mini-card {
  padding: 18px;
}

.mini-card strong {
  display: block;
  margin: 10px 0 8px;
  color: #063a3d;
  font-size: 18px;
  line-height: 1.35;
}

.mini-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.sales-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  align-items: stretch;
  gap: 16px;
  margin-top: 16px;
}

.stage-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 10px;
  min-height: 362px;
}

.stage-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
}

.stage-column h3 {
  margin-bottom: 8px;
  color: #063a3d;
  font-size: 14px;
  text-align: center;
}

.stage-column h3 span {
  color: #057866;
  font-size: 12px;
}

.stage-count {
  display: grid;
  width: 100%;
  min-height: 0;
  place-items: center;
  gap: 5px;
  border: 1px solid rgba(11, 143, 115, 0.18);
  border-radius: 8px;
  padding: 12px 8px;
  color: #057866;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(4, 85, 72, 0.06);
}

.stage-count strong {
  color: #063a3d;
  font-size: 38px;
  line-height: 1;
}

.stage-count span {
  color: #607a73;
  font-size: 12px;
  font-weight: 800;
}

.stage-count:hover {
  border-color: rgba(11, 143, 115, 0.38);
  background: #effbf7;
}

.stage-customer {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  color: #456960;
  background: #fff;
  font-weight: 800;
  text-align: left;
}

.stage-empty {
  color: #8aa9a0;
  font-size: 13px;
  line-height: 1.6;
}

.session-list {
  display: grid;
  gap: 10px;
  max-height: 252px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.session-search {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.session-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.session-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.12);
}

.session-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #f7fbf9;
}

.session-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.session-item h3 {
  margin: 0;
  color: #063a3d;
  font-size: 16px;
}

.session-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.session-item .tag-row {
  margin-top: 10px;
}

.session-open {
  min-height: 30px;
  border: 1px solid rgba(11, 143, 115, 0.2);
  border-radius: 999px;
  padding: 0 11px;
  color: #057866;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.follow-drawer {
  position: fixed;
  top: 96px;
  right: 28px;
  z-index: 10;
  width: min(380px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(171, 221, 202, 0.76);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(0, 91, 75, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.follow-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.history-drawer {
  right: 170px;
}

.follow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.follow-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.follow-head strong {
  color: #063a3d;
  font-size: 20px;
}

.follow-head button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #607a73;
  background: #fff;
  font-size: 22px;
  line-height: 1;
}

.follow-list {
  display: grid;
  gap: 10px;
}

.follow-item {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  appearance: none;
  background: #f7fbf9;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.follow-item:hover {
  border-color: rgba(0, 129, 105, 0.38);
  box-shadow: 0 10px 24px rgba(0, 91, 75, 0.1);
  transform: translateY(-1px);
}

.follow-item strong,
.follow-item span {
  display: block;
}

.follow-item strong {
  color: #063a3d;
  font-size: 16px;
}

.follow-item span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .assistant-grid,
  .simple-sections,
  .sales-workbench {
    grid-template-columns: 1fr;
  }

  .stage-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 312px;
  }
}

@media (max-width: 680px) {
  .ai-page {
    width: min(100% - 28px, 1180px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 28px;
  }

  h1 {
    font-size: 32px;
  }

  .panel-head,
  .profile-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .copy-mode-row {
    grid-template-columns: 1fr;
  }

  .stage-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 360px;
  }

  .stage-count strong {
    font-size: 32px;
  }

  .follow-drawer {
    top: 18px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .history-drawer {
    right: 14px;
  }

  .login-panel {
    padding: 36px 24px;
  }

  .login-links,
  .code-field {
    grid-template-columns: 1fr;
  }
}

/* Final ERP login override. */
.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 492px);
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 56px 6vw;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(3, 117, 95, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(21, 196, 143, 0.12), transparent 38%),
    linear-gradient(125deg, #f7fff9 0%, #ffffff 42%, #e8fbf3 100%);
}

.login-page::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 22%, rgba(255, 255, 255, 0.72) 22% 23%, transparent 23% 58%, rgba(11, 127, 105, 0.08) 58% 59%, transparent 59%),
    repeating-linear-gradient(135deg, rgba(6, 128, 105, 0.045) 0 1px, transparent 1px 22px);
  content: "";
}

.login-panel {
  width: min(100%, 492px);
  justify-self: center;
  padding: 48px 50px;
  border: 1px solid rgba(137, 221, 190, 0.48);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 255, 251, 0.9));
  box-shadow: 0 24px 60px rgba(0, 103, 83, 0.18);
  backdrop-filter: blur(14px);
  z-index: 2;
}

.login-page .brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-page .brand-lockup > div:last-child {
  min-width: 0;
  flex: 1;
}

.login-page .brand-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid rgba(119, 224, 184, 0.42);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(5, 118, 100, 0.22);
  overflow: hidden;
}

.login-page .brand-lockup h1 {
  margin: 0;
  color: #063a3d;
  font-size: clamp(21px, 1.85vw, 25px);
  line-height: 1.2;
  white-space: nowrap;
}

.login-page .brand-lockup p {
  margin: 4px 0 0;
  color: #55756d;
  font-size: 13px;
}

.login-page .tab.active {
  font-weight: 700;
}

.login-page .field {
  font-weight: 400;
}

.login-page .field input,
.login-page .field select,
.login-page .field textarea {
  border-color: rgba(171, 221, 202, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.login-page .code-field button {
  border-radius: 5px;
  background: #0b8f73;
}

.login-page .primary,
.login-page .primary-action {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #057866, #13bc83 52%, #07939f);
  box-shadow: 0 12px 26px rgba(5, 120, 102, 0.24);
}

.login-page .login-submit {
  min-height: 48px;
  border-radius: 24px;
  font-size: 16px;
}

@media (max-width: 620px) {
  .login-page {
    align-items: start;
    padding: 28px 16px 72px;
  }

  .login-panel {
    padding: 28px 22px;
  }

  .login-page .login-links,
  .login-page .code-field {
    grid-template-columns: 1fr;
  }
}
