/* ═══════════════════════════════════════════
   SEO Agent — Enterprise Design System
   Clean · Professional · White-based
   ═══════════════════════════════════════════ */

:root {
  --white: #ffffff;
  --bg: #f6f9ff;
  --bg-soft: #eef4ff;
  --surface: #ffffff;
  --ink: #101936;
  --ink-soft: #33415f;
  --muted: #687792;
  --subtle: #9aa8bd;
  --line: #dfe7f3;
  --line-light: #edf3fb;
  --accent: #1557ff;
  --accent-light: #3d7cff;
  --accent-soft: #eef4ff;
  --accent-bg: #d7e5ff;
  --cyan: #2f82ff;
  --cyan-soft: #eef7ff;
  --cyan-bg: #dbeafe;
  --green: #26b36a;
  --green-soft: #edfdf5;
  --green-bg: #c9f3df;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --amber: #f6aa1c;
  --amber-soft: #fff8e7;
  --amber-bg: #ffe6ad;
  --rose: #f43f5e;
  --rose-soft: #fff1f4;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-sm: 0 5px 18px rgba(22, 80, 200, .08);
  --shadow: 0 16px 44px rgba(22, 80, 200, .10), 0 2px 8px rgba(16, 25, 54, .04);
  --shadow-md: 0 22px 54px rgba(22, 80, 200, .14), 0 8px 20px rgba(16, 25, 54, .05);
  --shadow-lg: 0 28px 72px rgba(22, 80, 200, .16), 0 12px 28px rgba(16, 25, 54, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --max-w: 1200px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }
a { color: var(--accent); text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.hidden { display: none !important; }

/* ═══════ Header ═══════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  padding: 0 24px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(21, 87, 255, .07);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f4cff 0%, #2f82ff 100%);
  box-shadow: 0 10px 24px rgba(21, 87, 255, .30);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}

.site-nav button {
  position: relative;
  padding: 6px 14px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: all .15s;
  white-space: nowrap;
}

.site-nav button:hover {
  background: transparent;
  color: var(--accent);
}

.site-nav button.active {
  color: var(--accent);
  font-weight: 650;
}

.site-nav button::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -18px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(.6);
  transition: opacity .15s, transform .15s;
}

.site-nav button:hover::after,
.site-nav button:focus-visible::after,
.site-nav button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-actions {
  position: relative;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ghost-button {
  min-width: 78px;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--white);
  transition: all .15s;
}

.ghost-button:hover {
  border-color: var(--accent-light);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.user-menu {
  position: relative;
}

.user-menu-button {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 4px;
  border-radius: 12px;
  color: var(--ink);
  transition: background .15s, box-shadow .15s;
}

.user-menu-button:hover,
.user-menu-button[aria-expanded="true"] {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-bg);
}

.user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 10px 22px rgba(21, 87, 255, .28);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}

.user-summary {
  display: grid;
  gap: 0;
  text-align: left;
  line-height: 1.15;
}

.user-summary strong {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}

.user-summary em {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
  font-weight: 550;
}

.user-menu-arrow {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s;
  margin-left: 2px;
}

.user-menu-button[aria-expanded="true"] .user-menu-arrow {
  transform: rotate(225deg) translateY(-1px);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 20px 46px rgba(23, 99, 255, .12), 0 6px 18px rgba(15, 23, 42, .07);
  overflow: hidden;
}

.user-dropdown-head {
  padding: 22px 24px 18px;
  display: grid;
  gap: 4px;
}

.user-dropdown-head strong {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 650;
  color: var(--ink);
}

.user-dropdown-head span {
  font-size: 14px;
  color: var(--muted);
  word-break: break-all;
}

.user-dropdown-item {
  width: 100%;
  min-height: 58px;
  padding: 0 24px;
  border-top: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 550;
  text-align: left;
  transition: background .15s, color .15s;
}

.user-dropdown-item:hover {
  background: #f4f8ff;
  color: var(--accent);
}

.user-dropdown-item.danger {
  color: var(--red);
}

.user-dropdown-item.danger:hover {
  background: var(--red-soft);
  color: #b91c1c;
}

.menu-icon {
  width: 22px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
  font-size: 20px;
  line-height: 1;
}

/* ═══════ View Container ═══════ */

.view {
  min-height: calc(100vh - var(--header-h));
}

/* ════════════════════════
   LANDING / HOME
   ════════════════════════ */

.landing-view {
  width: 100%;
  padding: 0;
}

/* ─── Hero ─── */

.hero {
  position: relative;
  padding: 80px 24px 72px;
  background:
    linear-gradient(112deg, rgba(21, 87, 255, .045), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 62%, #f4f8ff 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 40px;
  right: -120px;
  width: 680px;
  height: 520px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(21, 87, 255, .09), rgba(47, 130, 255, .035) 62%, transparent),
    repeating-linear-gradient(135deg, rgba(21, 87, 255, .08) 0 1px, transparent 1px 24px);
  transform: rotate(-6deg);
  opacity: .72;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: -120px;
  bottom: -160px;
  width: 620px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(21, 87, 255, .08);
  box-shadow:
    0 0 0 28px rgba(21, 87, 255, .018),
    0 0 0 58px rgba(21, 87, 255, .014),
    0 0 0 92px rgba(21, 87, 255, .010);
  opacity: .8;
  pointer-events: none;
}

.hero > .hero-grid {
  position: relative;
  z-index: 1;
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 20px;
  background: #f1f6ff;
  border: 1px solid var(--accent-bg);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}

.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: 0;
}

.hero h1 em {
  display: block;
  color: var(--accent);
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 58%, var(--ink) 59%, var(--ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 520px;
}

.hero-api-copy {
  margin-top: -6px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 650;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

/* Buttons */

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0f4cff 0%, #1f66ff 100%);
  box-shadow: 0 14px 26px rgba(21, 87, 255, .26);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: all .15s;
  white-space: nowrap;
}

.primary-button:hover {
  background: linear-gradient(135deg, #0a43e8 0%, #1557ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(21, 87, 255, .32);
}

.primary-button:active {
  transform: translateY(0);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .96);
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--accent-bg);
  transition: all .15s;
  white-space: nowrap;
}

.secondary-button:hover {
  border-color: var(--accent-light);
  color: var(--accent);
  background: #f4f8ff;
}

/* ─── Hero Conversation Preview ─── */

.convo-preview {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 80px rgba(21, 87, 255, .16), 0 12px 30px rgba(16, 25, 54, .06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.convo-header {
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
}

.convo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(38, 179, 106, .14);
}

.convo-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow: hidden;
}

.convo-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
  max-width: 90%;
}

.convo-msg.user {
  align-self: flex-end;
  background: #eef5ff;
  border: 1px solid var(--accent-bg);
  color: var(--ink-soft);
}

.convo-msg.agent {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--line-light);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.convo-msg.agent em {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  font-style: normal;
  font-weight: 550;
}

.convo-tool {
  align-self: flex-start;
  margin-left: 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  border: 1px solid var(--green-bg);
  font-size: 12px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

.convo-tool::before {
  content: "✓";
  font-weight: 700;
  font-size: 11px;
}

.convo-footer {
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.convo-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  background: #fbfdff;
}
.convo-input::placeholder {
  color: var(--subtle);
}

/* ─── Capabilities ─── */

.cap-section {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0;
}

.cap-section .section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: 0;
}

.section-head p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cap-grid article {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .2s;
}

.cap-grid article:hover {
  border-color: var(--accent-bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cap-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.cap-icon.blue  { background: var(--accent-soft); color: var(--accent); }
.cap-icon.green { background: var(--green-soft); color: var(--green); }
.cap-icon.amber { background: var(--amber-soft); color: var(--amber); }

.cap-grid h3 {
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
}

.cap-grid p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.cap-tags span {
  padding: 3px 10px;
  border-radius: 20px;
  background: #f7faff;
  border: 1px solid var(--line-light);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ─── Customer Outcomes ─── */

.outcome-section,
.customer-section {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 0;
}

.outcome-section .section-head,
.customer-section .section-head {
  max-width: 760px;
  margin-bottom: 40px;
}

.outcome-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) 1.4fr;
  gap: 18px;
  align-items: stretch;
}

.outcome-primary {
  padding: 32px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(238, 244, 255, .98), rgba(255, 255, 255, .92) 62%, rgba(237, 253, 245, .72)),
    var(--white);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.outcome-label {
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--accent-bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.outcome-primary h3 {
  font-size: 25px;
  line-height: 1.28;
  color: var(--ink);
}

.outcome-primary p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}

.outcome-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.outcome-points span {
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--accent-bg);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.outcome-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.outcome-list article,
.customer-grid article {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  transition: all .18s;
}

.outcome-list article:hover,
.customer-grid article:hover {
  border-color: var(--accent-bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.outcome-list strong,
.customer-grid h3 {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.outcome-list p,
.customer-grid p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ─── How It Works (3-step flow) ─── */

.how-section {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 80px;
}

.flow-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.flow-step {
  padding: 32px 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  transition: all .2s;
}

.flow-step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.flow-step:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.flow-step:not(:last-child) { border-right: none; }

.flow-step:hover {
  border-color: var(--accent-bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.flow-num {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f4cff, #2f82ff);
  box-shadow: 0 12px 24px rgba(21, 87, 255, .22);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 750;
}

.flow-step h3 {
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
}

.flow-step p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.flow-step:nth-child(2) {
  border-color: var(--green-bg);
}

.flow-step:nth-child(2) .flow-num {
  background: linear-gradient(135deg, #1fa463, var(--green));
  box-shadow: 0 12px 24px rgba(38, 179, 106, .20);
}

.flow-step:nth-child(3) {
  border-color: var(--amber-bg);
}

.flow-step:nth-child(3) .flow-num {
  background: linear-gradient(135deg, #e69a00, var(--amber));
  box-shadow: 0 12px 24px rgba(246, 170, 28, .22);
}

.flow-arrow {
  display: none;
}

/* ─── Why This Approach ─── */

.why-section {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 80px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.why-card {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .2s;
}

.why-card:hover {
  border-color: var(--accent-bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.why-card h3 {
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
}

.why-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Example Queries ─── */

.examples-section {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 100px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.example-chip {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  text-align: left;
  transition: all .15s;
  cursor: pointer;
}

.example-chip:hover {
  border-color: var(--accent-light);
  background: #f4f8ff;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.example-chip::before {
  display: block;
  content: "💬";
  font-size: 14px;
  margin-bottom: 6px;
}

/* ─── Help ─── */

.help-view {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.help-hero {
  min-height: 220px;
  padding: 36px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(21, 87, 255, .10), rgba(255, 255, 255, .82) 54%, rgba(237, 253, 245, .78)),
    #ffffff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 28px;
}

.help-hero h2 {
  margin-top: 16px;
  max-width: 760px;
  font-size: 34px;
  line-height: 1.24;
  color: var(--ink);
}

.help-hero p:not(.kicker) {
  margin-top: 14px;
  max-width: 780px;
  color: var(--muted);
  line-height: 1.75;
}

.help-qq-card {
  justify-self: end;
  width: 190px;
  padding: 14px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 16px 36px rgba(21, 87, 255, .10);
  display: grid;
  gap: 10px;
  text-align: center;
}

.help-qq-card img {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  background: var(--white);
}

.help-qq-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.help-qq-card strong {
  display: block;
  color: var(--accent);
  font-size: 20px;
  line-height: 1.1;
}

.help-section {
  padding-top: 56px;
}

.help-section .section-head {
  margin-bottom: 22px;
}

.help-steps,
.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.help-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.help-steps article,
.help-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow-sm);
}

.help-steps article span {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f4cff, #2f82ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 750;
}

.help-steps h3,
.help-grid h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.help-steps p,
.help-grid p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.help-examples {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.help-examples button {
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  transition: all .15s;
}

.help-examples button:hover {
  border-color: var(--accent-light);
  background: #eef4ff;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.help-feature-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.help-feature-list div {
  display: grid;
  grid-template-columns: 58px 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-light);
}

.help-feature-list div:last-child {
  border-bottom: none;
}

.help-feature-list div:nth-child(odd) {
  background: #fbfdff;
}

.help-feature-list em {
  width: 36px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.help-feature-list strong {
  color: var(--ink);
  font-size: 15px;
}

.help-feature-list span {
  color: var(--muted);
  line-height: 1.65;
}

.help-feature-list small {
  grid-column: 3;
  margin-top: -8px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: #f4f8ff;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.help-feature-list small b {
  color: var(--accent);
  font-weight: 700;
}

/* ─── Bottom CTA ─── */

.cta-section {
  width: 100%;
  padding: 64px 24px;
  background:
    linear-gradient(135deg, rgba(21, 87, 255, .08), transparent 42%),
    linear-gradient(180deg, #ffffff, #f4f8ff);
  border-top: 1px solid var(--line);
  text-align: center;
}

.cta-content {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cta-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}

.cta-content p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

/* ═══════ Auth ═══════ */

.auth-view {
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0;
}

.auth-card {
  padding: 32px 28px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.auth-tabs button {
  height: 40px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 550;
  color: var(--muted);
  transition: all .15s;
}

.auth-tabs button.active {
  background: var(--white);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-soft);
}

.auth-card input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}

.auth-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 99, 255, .12);
}

.auth-card input::placeholder { color: var(--subtle); }

.auth-card > button[type="submit"] {
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0f4cff, #2f82ff);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: all .15s;
}

.auth-card > button[type="submit"]:hover {
  background: linear-gradient(135deg, #0a43e8, #1557ff);
}

.form-error {
  font-size: 13px;
  color: var(--red);
  min-height: 18px;
}

.form-error.success {
  color: var(--green, #10b981);
}

.verification-code-input-wrap {
  display: flex;
  gap: 8px;
}

.verification-code-input-wrap input {
  flex: 1;
}

.send-code-button {
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}

.send-code-button:hover:not(:disabled) {
  background: var(--accent-soft);
}

.send-code-button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ═══════ Pricing / Recharge ═══════ */

.pricing-view {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0;
}

.recharge-view .section-head {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.support-qq-card {
  width: min(760px, 100%);
  margin: 28px auto 0;
  padding: 18px 20px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f4f9ff);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.support-qq-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.support-qq-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 750;
}

.support-qq-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.support-qq-card img {
  width: 116px;
  height: 116px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: cover;
  flex: 0 0 auto;
}

.recharge-note {
  width: fit-content;
  margin: 24px auto 0;
  padding: 10px 20px;
  border-radius: 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-bg);
  color: var(--accent);
  font-size: 14px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 12px;
}

.recharge-note strong {
  font-weight: 600;
  color: var(--accent);
}

.recharge-note span {
  color: var(--muted);
  font-weight: 400;
}

.recharge-grid {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.recharge-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .2s;
  text-align: center;
  align-items: center;
}

.recharge-card:hover {
  border-color: var(--accent-bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.recharge-card span {
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.recharge-card strong {
  font-size: 40px;
  font-weight: 750;
  color: var(--accent);
  line-height: 1;
}

.recharge-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.recharge-card .primary-button {
  width: 100%;
  margin-top: auto;
}

/* ═══════ Checkout ═══════ */

.checkout-view {
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0;
}

.checkout-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.checkout-card > p:not(.kicker):not(.subtle) {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.pay-box {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pay-box span {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}

.pay-box strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.subtle {
  font-size: 13px;
  color: var(--subtle);
  line-height: 1.6;
}

/* ═══════ App Layout / Chat ═══════ */

.app-layout {
  height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 280px 1fr;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  overflow: hidden;
}

/* Sidebar */

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
  overflow-y: auto;
  gap: 8px;
}

.sidebar .new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--accent-bg);
  background: rgba(255, 255, 255, .88);
  color: var(--accent);
  font-size: 14px;
  font-weight: 550;
  transition: all .15s;
  width: 100%;
}

.sidebar .new-chat:hover {
  border-style: solid;
  border-color: var(--accent);
  background: #eef4ff;
  box-shadow: var(--shadow-sm);
}

.sidebar .nav-label {
  padding: 16px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0;
}

.sidebar button:not(.new-chat) {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-soft);
  text-align: left;
  line-height: 1.4;
  transition: all .12s;
  white-space: normal;
}

.sidebar button:not(.new-chat):hover {
  background: #eef4ff;
  color: var(--accent);
}

.sidebar .session-button {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 12px;
}

.sidebar .session-button:hover {
  background: rgba(255, 255, 255, .72);
  color: var(--ink-soft);
}

.session-list {
  display: grid;
  gap: 4px;
}

.session-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-sm);
}

.session-item.session-active {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-bg) 100%);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

.session-item.session-active .session-button {
  color: var(--accent);
  font-weight: 600;
}

.session-item.session-pinned {
  background: linear-gradient(135deg, #fff7ed 0%, #fffaf5 100%);
  border: 1px solid var(--amber-bg);
  margin-bottom: 2px;
}

.session-item.session-pinned.session-active {
  background: linear-gradient(135deg, #fff7ed 0%, var(--accent-soft) 100%);
  border: 1px solid var(--accent);
}

.session-item.session-pinned .session-button {
  color: var(--amber);
  font-weight: 600;
}

.sidebar .session-item .session-button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .session-menu-button {
  width: 30px !important;
  height: 30px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  text-align: center !important;
  opacity: 0.3;
  visibility: visible;
  pointer-events: auto;
  box-shadow: none;
  transition: opacity .12s, background .12s, border-color .12s, box-shadow .12s;
}

.session-item:hover .session-menu-button,
.session-item.session-hover .session-menu-button,
.session-item:focus-within .session-menu-button,
.session-item.menu-open .session-menu-button,
.session-item:has(.session-actions.open) .session-menu-button {
  opacity: 1 !important;
  pointer-events: auto;
}

.sidebar .session-menu-button span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--muted);
  display: block;
}

.sidebar .session-menu-button:hover {
  border-color: var(--accent-bg);
  background: var(--accent-soft);
  box-shadow: var(--shadow-sm);
}

.sidebar .session-menu-button:hover span {
  background: var(--accent);
}

.session-actions {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  display: none;
  min-width: 112px;
  padding: 6px;
  border: 1px solid var(--accent-bg);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.session-actions.open {
  display: grid;
  gap: 2px;
}

.sidebar .session-actions button {
  width: 100%;
  padding: 8px 10px !important;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: left;
  background: transparent;
}

.sidebar .session-actions button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar .session-actions button.danger {
  color: #dc2626;
}

.sidebar .session-actions button.danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.sidebar-feedback {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sidebar .feedback-suggestion-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px !important;
  border: 1px solid var(--accent-bg);
  background: rgba(255, 255, 255, .9);
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

.sidebar .feedback-suggestion-button:hover {
  border-color: var(--accent-light);
  background: #eef4ff;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Chat Shell */

.chat-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar h2 {
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
}

.topbar p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.mode-badge {
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--accent-bg);
}

/* Messages */

.messages {
  overflow-y: auto;
  padding: 32px 0 100px;
  scroll-behavior: smooth;
}

.message {
  width: min(800px, calc(100% - 48px));
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
}

.message.user {
  grid-template-columns: 1fr;
  justify-items: end;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0f4cff, #2f82ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.message.user .avatar { display: none; }

.message-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble.markdown-content {
  white-space: normal;
  max-width: 100%;
}

.bubble.markdown-content > * + * {
  margin-top: 14px;
}

.message.user .bubble {
  max-width: 85%;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: #eef5ff;
  border: 1px solid var(--accent-bg);
  color: var(--ink-soft);
}

.thinking-bubble {
  width: fit-content;
  min-width: 106px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f8fa;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.thinking-bubble span {
  font-size: 14px;
  font-weight: 550;
}

.thinking-bubble i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--subtle);
  animation: thinking-dot 1.05s infinite ease-in-out;
}

.thinking-bubble i:nth-child(3) {
  animation-delay: .14s;
}

.thinking-bubble i:nth-child(4) {
  animation-delay: .28s;
}

@keyframes thinking-dot {
  0%, 80%, 100% {
    opacity: .35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.answer-feedback {
  align-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.answer-feedback span {
  font-size: 12px;
  color: var(--subtle);
}

.answer-feedback button {
  min-width: 44px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: all .15s;
}

.answer-feedback button:hover:not(:disabled) {
  border-color: var(--accent-light);
  background: #f4f8ff;
  color: var(--accent);
}

.answer-feedback button.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, #0f4cff, #2f82ff);
  color: #fff;
}

.answer-feedback button:disabled {
  cursor: default;
  opacity: .88;
}

/* Meta labels */

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.meta span {
  padding: 3px 10px;
  border-radius: 20px;
  background: #fbfdff;
  border: 1px solid var(--line-light);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Tool Cards */

.tool-card {
  margin-top: 4px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.tool-title {
  padding: 10px 16px;
  background: #f4f8ff;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-action-button {
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 550;
  transition: all .15s;
}

.tool-action-button:hover {
  border-color: var(--accent-bg);
  color: var(--accent);
  background: #f8fbff;
}

.export-csv-button {
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--accent-bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.export-csv-button:hover {
  background: linear-gradient(135deg, #0f4cff, #2f82ff);
  border-color: var(--accent);
  color: #fff;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-light);
  white-space: nowrap;
}

th {
  background: #f6fbff;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

td {
  color: var(--ink-soft);
}

tr:last-child td { border-bottom: none; }

/* Composer */

.composer-wrap {
  padding: 12px 24px 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.92) 20%, #ffffff 100%);
}

.composer {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 8px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr 40px;
  align-items: end;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}

.composer:focus-within {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(21, 87, 255, .12), var(--shadow);
}

textarea {
  padding: 8px 6px 8px 10px;
  border: none;
  border-radius: 6px;
  outline: none;
  resize: none;
  min-height: 32px;
  max-height: 160px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: transparent;
}

textarea::placeholder {
  color: var(--subtle);
}

.send-button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f4cff, #2f82ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  transition: all .15s;
  flex-shrink: 0;
}

.send-button:hover {
  background: linear-gradient(135deg, #0a43e8, #1557ff);
  box-shadow: 0 10px 18px rgba(21, 87, 255, .26);
}

.send-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ═══════ Settings ═══════ */

.settings-view {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stat-card {
  padding: 24px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow-sm);
}

.stat-card span {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.records-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.settings-security-card {
  margin-top: 24px;
}

.project-profile-card {
  margin-top: 24px;
}

.settings-card-head {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.settings-card-head h3 {
  margin: 0;
  padding: 0;
  border: none;
}

.settings-card-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.settings-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.settings-status-inline {
  min-width: 160px;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.project-profile-card.collapsed .settings-card-head {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.project-profile-card.collapsed .project-profile-form {
  display: none;
}

.project-profile-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-profile-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.project-profile-form label.wide {
  grid-column: 1 / -1;
}

.project-profile-form input,
.project-profile-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.project-profile-form input {
  height: 42px;
}

.project-profile-form textarea {
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

.project-profile-form input:focus,
.project-profile-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,99,255,.12);
}

.project-profile-form .primary-button {
  width: fit-content;
  grid-column: 1 / -1;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 14px;
}

.settings-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.settings-form input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.settings-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,99,255,.12);
}

.settings-form .primary-button {
  height: 42px;
  padding: 0 18px;
  white-space: nowrap;
}

.settings-status {
  grid-column: 1 / -1;
  margin: 0;
}

.settings-status.success {
  color: #15803d;
}

.records-card {
  padding: 24px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow-sm);
}

.records-card h3 {
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-light);
}

.settings-support-card {
  width: 100%;
  margin-top: 24px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-light);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
}

.record-row:last-child { border-bottom: none; }

.record-row span {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

.record-row strong {
  font-size: 14px;
  color: var(--accent);
  font-weight: 650;
}

.record-row em {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--subtle);
  font-style: normal;
}

.order-code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: #f4f8ff;
  border: 1px solid var(--line-light);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.table-modal {
  width: min(1200px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
  overflow: hidden;
}

.table-modal-scroll {
  max-height: calc(100vh - 160px);
  margin-top: 12px;
}

/* ═══════ Admin ═══════ */

.admin-view {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
  min-height: calc(100vh - var(--header-h) - 80px);
}

.admin-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-side-head .kicker {
  margin-bottom: 12px;
}

.admin-side-head h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.admin-side-head > span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}

.admin-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: auto;
}

.admin-tabs button {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: left;
  transition: all .12s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-tabs button:hover {
  background: #eef4ff;
  color: var(--accent);
}

.admin-tabs button.active {
  background: #eef4ff;
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm);
}

.admin-tabs button.warning {
  background: #fff1f2;
  color: #b91c1c;
  box-shadow: inset 3px 0 0 #ef4444;
}

.admin-tabs button.warning.active {
  background: #fee2e2;
  color: #991b1b;
  box-shadow: inset 3px 0 0 #dc2626, var(--shadow-sm);
}

.admin-tab-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.admin-side-card {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  border: 1px solid var(--accent-bg);
}

.admin-side-card span {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.admin-side-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.billing-verification-card {
  margin-top: 20px;
}

.billing-verification-card .customer-toolbar > div {
  display: grid;
  gap: 4px;
}

.billing-verification-card .customer-toolbar strong {
  color: var(--ink);
}

.billing-verification-card .customer-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

/* Admin Main */

.admin-main {
  min-width: 0;
}

.admin-panel {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow);
}

.admin-panel.active {
  display: block;
}

.admin-panel-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.admin-panel-head h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.admin-panel-head p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
}

.customer-panel-head {
  align-items: center;
}

.customer-title-row {
  display: flex;
  align-items: baseline;
  gap: 28px;
  flex-wrap: wrap;
}

.customer-total-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.customer-total-inline span {
  font-size: 16px;
  font-weight: 680;
  color: var(--accent);
}

.customer-total-inline strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 760;
  color: var(--accent);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 0;
}

.admin-select-control {
  min-width: 150px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.admin-select-control select {
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.admin-select-control select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,99,255,.12);
}

.ops-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.instant-metric {
  margin: -4px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  background: #f4f8ff;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.instant-metric span {
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
}

.instant-metric strong {
  font-size: 20px;
  line-height: 1;
  font-weight: 760;
  color: var(--ink);
  white-space: nowrap;
}

.ops-bar-chart {
  min-height: 260px;
  display: grid;
  grid-template-columns: repeat(12, minmax(32px, 1fr));
  gap: 10px;
  align-items: end;
  overflow-x: auto;
  padding: 8px 2px 0;
}

.ops-bar-chart.compact {
  grid-template-columns: repeat(30, minmax(34px, 1fr));
  gap: 16px;
}

.ops-bar-item {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  align-items: end;
}

.ops-bar-track {
  width: 100%;
  height: 190px;
  display: flex;
  align-items: end;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border: 1px solid var(--accent-bg);
  overflow: hidden;
}

.ops-bar-chart.compact .ops-bar-track {
  height: 170px;
}

.ops-bar-track span {
  width: 100%;
  min-height: 0;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #2f82ff, #1557ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

.ops-bar-item em {
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  color: var(--subtle);
  text-align: center;
  white-space: nowrap;
}

.ops-bar-item strong {
  min-height: 14px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transform: scale(.92);
}

.customer-growth-card,
.recharge-detail-card {
  margin-bottom: 20px;
}

.customer-table-card {
  margin-bottom: 20px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.customer-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f4f8ff;
}

.customer-search {
  width: min(420px, 100%);
  display: grid;
  gap: 8px;
}

.customer-search span {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-soft);
}

.customer-search input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.customer-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,99,255,.12);
}

#customerSearchStatus {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.table-empty {
  height: 88px;
  color: var(--muted);
  text-align: center;
}

.customer-growth-card {
  margin-bottom: 0;
}

.link-button {
  color: var(--accent);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: var(--cyan);
}

.small-ghost-button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.small-ghost-button:hover {
  border-color: var(--accent-light);
  color: var(--accent);
  background: #eef4ff;
}

/* Data Management */

.data-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 20px;
}

.analytics-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow);
}

.analytics-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.analytics-card-head h4 {
  font-size: 17px;
  font-weight: 680;
  color: var(--ink);
}

.analytics-card-head span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
}

.usage-share-card {
  grid-row: span 2;
}

.usage-share-chart {
  display: grid;
  gap: 16px;
}

.usage-row {
  display: grid;
  gap: 8px;
}

.usage-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.usage-row-head strong {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 650;
}

.usage-row-head span {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.usage-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-bg);
  overflow: hidden;
}

.usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1557ff, #2f82ff);
}

.donut-wrap {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 20px;
}

.usage-donut {
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--white) 0 56%, transparent 57%),
    conic-gradient(var(--accent) calc(var(--p) * 1%), #eef4ff 0);
  border: 1px solid var(--accent-bg);
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: inset 0 0 0 10px var(--white);
}

.usage-donut strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
}

.usage-donut span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.usage-legend {
  display: grid;
  gap: 10px;
}

.legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.legend-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(calc(216 + var(--i) * 18), 82%, 56%);
}

.legend-row span {
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-row strong {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.daily-trend-chart {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(14, minmax(16px, 1fr));
  gap: 8px;
  align-items: end;
  padding-top: 10px;
}

.trend-day {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: end;
}

.trend-day span {
  width: 100%;
  min-height: 8px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #2f82ff, #1557ff);
}

.trend-day em {
  font-style: normal;
  font-size: 10px;
  color: var(--subtle);
  text-align: center;
  white-space: nowrap;
}

.recommendation-list {
  display: grid;
  gap: 12px;
}

.recommendation-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.recommendation-item b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f4cff, #2f82ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.recommendation-item span {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.question-export-card {
  grid-column: 1 / -1;
}

.question-export-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.question-export-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.question-export-body .primary-button {
  width: fit-content;
  white-space: nowrap;
}

.question-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.question-export-actions .primary-button,
.question-export-actions .secondary-button {
  height: 40px;
}

#questionExportStatus,
#feedbackExportStatus {
  grid-column: 1 / -1;
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--accent-bg);
  border-radius: var(--radius-sm);
  background: #f4f8ff;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* API Config */

.api-config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.api-config-card {
  padding: 24px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow-sm);
}

.api-config-card h4 {
  font-size: 18px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 6px;
}

.api-config-card > p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}

.admin-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,99,255,.12);
}

.config-status {
  font-size: 13px;
  padding-top: 4px;
}

.config-status:not(:empty) {
  color: var(--muted);
}

/* Pricing Admin */

.pricing-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.pricing-admin-card {
  padding: 24px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: var(--shadow-sm);
}

.pricing-admin-card h4 {
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 6px;
}

.pricing-admin-card > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.bulk-pricing-form {
  padding: 18px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bulk-pricing-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-soft);
}

.bulk-pricing-form input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}

.bulk-pricing-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,99,255,.12);
}

.pricing-save-status {
  font-size: 13px;
  color: var(--muted);
}

/* Feedback Modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .22);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.feedback-modal {
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.feedback-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.feedback-modal-head h3 {
  font-size: 18px;
  font-weight: 680;
  color: var(--ink);
}

.feedback-modal-head p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-close-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.modal-close-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.feedback-modal textarea {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--accent-bg);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  color: var(--ink);
  line-height: 1.7;
  outline: none;
}

.feedback-modal textarea:focus {
  border-color: var(--accent-light);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(23,99,255,.12);
}

.feedback-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

#feedbackSuggestionStatus {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

/* ═══════ Responsive ═══════ */

@media (max-width: 1024px) {
  .hero > .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero h1 { font-size: 36px; }
  .outcome-grid { grid-template-columns: 1fr; }
  .customer-grid { grid-template-columns: 1fr 1fr; }
  .cap-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .examples-grid { grid-template-columns: 1fr 1fr; }
  .help-grid { grid-template-columns: 1fr 1fr; }
  .help-feature-list div { grid-template-columns: 50px 200px minmax(0, 1fr); }
  .help-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .site-header {
    height: auto;
    min-height: 56px;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-button { font-size: 17px; flex: 0 0 auto; }

  .site-nav {
    width: 100%;
    order: 3;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 2px;
  }

  .site-nav button { font-size: 13px; padding: 6px 10px; }
  .site-actions { margin-left: auto; }
  .user-summary strong { max-width: 110px; }
  .user-dropdown { right: 0; }

  .hero {
    padding: 48px 16px 56px;
  }

  .hero > .hero-grid {
    width: 100%;
    padding: 0 16px;
    gap: 32px;
  }

  .hero h1 { font-size: 30px; }

  .outcome-section,
  .customer-section {
    width: calc(100% - 32px);
    padding-top: 64px;
  }

  .outcome-list { grid-template-columns: 1fr; }
  .customer-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
  .flow-row { grid-template-columns: 1fr; gap: 12px; }
  .flow-step { border-radius: var(--radius) !important; border-right: 1px solid var(--line) !important; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .examples-grid { grid-template-columns: 1fr; }
  .help-view { width: calc(100% - 32px); padding-top: 40px; }
  .help-hero { grid-template-columns: 1fr; padding: 28px; }
  .help-hero h2 { font-size: 28px; }
  .help-qq-card { justify-self: start; width: 176px; }
  .help-qq-card img { width: 146px; height: 146px; }
  .help-steps,
  .help-grid,
  .help-examples { grid-template-columns: 1fr; }
  .help-examples { grid-template-columns: 1fr; }
  .help-feature-list div { grid-template-columns: 42px minmax(0, 1fr); gap: 10px 14px; }
  .help-feature-list span,
  .help-feature-list small { grid-column: 2; }
  .help-feature-list small { margin-top: 0; }

  .recharge-grid { grid-template-columns: repeat(2, 1fr); }

  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .account-grid { grid-template-columns: 1fr; }
  .records-grid { grid-template-columns: 1fr; }
  .settings-card-head { flex-direction: column; }
  .settings-head-actions { width: 100%; justify-content: space-between; }
  .settings-status-inline { min-width: 0; text-align: left; }
  .project-profile-form { grid-template-columns: 1fr; }
  .settings-form { grid-template-columns: 1fr; }

  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-tabs { flex-direction: row; overflow-x: auto; }
  .admin-tabs button { white-space: nowrap; }
  .admin-panel-head { flex-direction: column; }
  .customer-title-row { gap: 12px; }
  .customer-toolbar { align-items: stretch; flex-direction: column; }
  #customerSearchStatus { white-space: normal; }
  .admin-select-control { width: 100%; }
  .data-insight-grid { grid-template-columns: 1fr; }
  .analytics-layout { grid-template-columns: 1fr; }
  .usage-share-card { grid-row: auto; }
  .api-config-grid { grid-template-columns: 1fr; }
  .pricing-admin-grid { grid-template-columns: 1fr; }
  .admin-stat-grid { grid-template-columns: 1fr; }
  .ops-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .outcome-primary { padding: 24px 20px; }
  .outcome-primary h3 { font-size: 21px; }
  .outcome-points span { width: 100%; }
  .why-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 24px; }
  .cta-content h2 { font-size: 22px; }
  .help-hero { padding: 24px 20px; }
  .help-hero h2 { font-size: 24px; }
  .help-qq-card { width: 100%; max-width: 180px; }
  .help-section { padding-top: 40px; }
  .recharge-grid { grid-template-columns: 1fr; }
  .support-qq-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .support-qq-card img {
    width: 132px;
    height: 132px;
  }
  .message { width: calc(100% - 32px); }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .daily-trend-chart { gap: 4px; }
  .trend-day em { font-size: 9px; }
  .user-summary { display: none; }
  .user-dropdown {
    width: min(280px, calc(100vw - 24px));
    right: -4px;
  }
}

/* ═══════════════════════════════════════════
   Markdown 渲染样式
   ═══════════════════════════════════════════ */

.bubble h1, .bubble h2, .bubble h3, .bubble h4, .bubble h5, .bubble h6 {
  margin-top: 22px;
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.bubble h1 { font-size: 24px; color: var(--ink); }
.bubble h2 { font-size: 20px; color: var(--ink); }
.bubble h3 { font-size: 18px; color: var(--ink-soft); }
.bubble h4 { font-size: 16px; color: var(--ink-soft); }
.bubble h5 { font-size: 14px; color: var(--ink-soft); }
.bubble h6 { font-size: 13px; color: var(--muted); }

.bubble p {
  margin-bottom: 14px;
  line-height: 1.72;
}

.bubble ul, .bubble ol {
  margin: 12px 0 16px;
  padding-left: 24px;
}

.bubble li {
  margin-bottom: 8px;
  line-height: 1.68;
}

.bubble ul li::marker {
  color: var(--accent);
}

.bubble ol li::marker {
  color: var(--accent);
  font-weight: 600;
}

.bubble strong {
  font-weight: 600;
  color: var(--ink);
}

.bubble em {
  color: var(--ink-soft);
}

.bubble a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-light);
}

.bubble a:hover {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

.bubble blockquote {
  margin: 12px 0;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
}

.bubble code {
  font-family: var(--font-mono);
  font-size: 88%;
  padding: 2px 7px;
  background: var(--bg);
  border-radius: var(--radius-xs);
  color: var(--accent);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bubble pre {
  margin: 12px 0;
  padding: 16px;
  background: var(--ink);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.bubble pre code {
  background: transparent;
  padding: 0;
  color: var(--white);
  font-size: 14px;
}

.bubble table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.markdown-table-scroll {
  width: 100%;
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.markdown-table-wrap {
  width: 100%;
  margin: 12px 0;
}

.markdown-table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.markdown-table-fullscreen-button {
  cursor: pointer;
}

.markdown-table-scroll table {
  margin: 0;
  min-width: 560px;
}

.bubble th, .bubble td {
  padding: 12px 16px;
  border: 1px solid var(--line);
}

.bubble th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}

.bubble td {
  background: var(--white);
  color: var(--ink-soft);
}

.bubble hr {
  margin: 20px 0;
  border: none;
  border-top: 2px solid var(--line);
}

/* Markdown 段落间距优化 */
.bubble > *:last-child {
  margin-bottom: 0;
}

.bubble > h1:first-child, .bubble > h2:first-child, .bubble > h3:first-child {
  margin-top: 0;
}
