/* === 树恋 Trega — Clean product style ===
   Inspired by duxiangai.com
   Palette: white + green accents + gray cards + dark footer
*/

:root {
  --green-light: #DFF8E6;
  --green: #63D47A;
  --green-dark: #2F9D57;
  --lavender: #EEE9FF;
  --amber: #FFE9B8;
  --blue: #DDEBFF;
  --gray-card: #F7F8FA;
  --gray-soft: #F3F4F6;
  --dark: #1B1B1B;
  --text-main: #111827;
  --text-soft: #4B5563;
  --text-hint: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --white: #FFFFFF;
  --red: #EF4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --max-w: 1200px;
  --font: "Aptos", "Microsoft YaHei UI", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }
html, body { overflow-x: hidden; }

body {
  font-family: var(--font);
  background:
    radial-gradient(circle at 20% 0%, rgba(99, 212, 122, 0.10), transparent 26rem),
    linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--dark); color: var(--white);
}
.btn-primary:hover { background: #333; }
.btn-accent {
  background: var(--green); color: #111;
}
.btn-accent:hover { background: var(--green-dark); color: #fff; }
.btn-outline {
  background: transparent; color: var(--text-main);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-soft); background: var(--gray-soft); }
.btn-ghost {
  background: transparent; color: var(--text-soft);
}
.btn-ghost:hover { background: var(--gray-soft); }
.btn-danger {
  background: transparent; color: var(--red);
  border: 1.5px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.06); border-color: var(--red); }

/* ---- Layout ---- */
.page { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---- Nav (Dashboard) ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 32px;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.2rem; font-weight: 800; color: var(--text-main);
}
.brand-mark {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 10px; box-shadow: 0 8px 18px rgba(47,157,87,0.16);
}
.nav-brand .brand-mark {
  width: 34px; height: 34px;
}
.nav-tabs { display: flex; gap: 4px; align-items: center; }
.nav-tab {
  padding: 8px 16px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-soft);
  font-family: var(--font); font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.nav-tab:hover { background: var(--gray-soft); color: var(--text-main); }
.nav-tab.active { background: var(--dark); color: #fff; }

/* ---- Cards ---- */
.card {
  background: var(--gray-card); border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 20px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 1rem; font-weight: 700; }
.section-head { margin-bottom: 18px; }
.stack-row { display: flex; gap: 10px; }
.top-gap { margin-top: 20px; }
.hidden { display: none !important; }
.right-actions { margin-top: 20px; text-align: right; }
.muted-small { font-size: 0.82rem; color: var(--text-hint); }
.danger-title { font-size: 0.95rem; margin-bottom: 12px; color: var(--red); }
.settings-title { margin-bottom: 20px; }
.settings-subtitle { font-size: 0.95rem; margin-bottom: 12px; }
.settings-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.settings-info-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.settings-info-grid div,
.settings-security-list div {
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--soft);
}
.settings-info-grid span,
.settings-security-list span {
  display: block; color: var(--text-hint); font-size: 0.76rem; line-height: 1.5;
}
.settings-info-grid strong,
.settings-security-list strong {
  display: block; margin-top: 4px; color: var(--text); font-size: 0.88rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.settings-security-list {
  display: grid; gap: 10px; margin-bottom: 12px;
}
.quota-chip {
  min-width: 140px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.quota-chip.warn { color: #9a6700; border-color: #f3c969; background: #fff9e8; }
.quota-chip.danger { color: #b42318; border-color: #f3a6a0; background: #fff1f0; }
.quota-alert {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px; padding: 14px 16px; border: 1px solid; border-radius: 8px;
}
.quota-alert.warning { color: #7a5200; border-color: #f3c969; background: #fff9e8; }
.quota-alert.danger { color: #9f2017; border-color: #f3a6a0; background: #fff1f0; }
.quota-alert strong { display: block; font-size: 0.9rem; }
.quota-alert p { margin-top: 3px; color: inherit; font-size: 0.8rem; line-height: 1.5; }
.quota-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--soft);
  margin-bottom: 6px;
}
.quota-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.quota-panel-head strong { color: var(--text); }
.quota-bar {
  height: 9px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.quota-bar div {
  width: 0;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 0.25s ease;
}
.quota-bar div.warn { background: #f59e0b; }
.quota-bar div.danger { background: var(--red); }
.quota-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 14px 0 8px;
}
.quota-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.82rem;
}
.quota-breakdown strong { color: var(--text); }
.referral-dashboard-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 18px; align-items: center; margin: 18px 0;
  padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid rgba(39,196,107,0.26);
  background: linear-gradient(135deg, #f0fbf4, #ffffff 62%, #eef6ff);
  box-shadow: var(--shadow-sm);
}
.referral-dashboard-card h2 {
  font-size: 1.15rem; margin: 4px 0 7px; color: var(--text-main);
}
.referral-dashboard-card p {
  color: var(--text-soft); font-size: 0.86rem; line-height: 1.7;
}
.referral-dashboard-link {
  display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  min-width: 0;
}
.referral-dashboard-link input {
  min-width: 0; flex: 1; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text-soft);
  font-size: 0.82rem; font-weight: 700; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.settings-page-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  margin-bottom: 18px;
}
.settings-page-head h1 { font-size: 1.8rem; margin: 4px 0 6px; }
.settings-page-head p { color: var(--text-hint); font-size: 0.9rem; }
.settings-page-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.settings-page-panel {
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--border);
  background: #fff; box-shadow: var(--shadow-sm);
}
.settings-danger-panel {
  border-color: rgba(239,68,68,0.22); background: #fffafa;
}

/* ---- Fields ---- */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text-soft); margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.9rem;
  background: var(--white); color: var(--text-main);
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--green);
}
.field textarea { min-height: 100px; resize: vertical; }

/* ---- Persona card ---- */
.persona-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--white);
  border-radius: var(--radius); border: 1px solid var(--border);
  margin-bottom: 10px;
}
.persona-avatar {
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: var(--green-light); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.persona-info { flex: 1; min-width: 0; }
.persona-name { font-weight: 700; font-size: 0.95rem; }
.persona-prompt { font-size: 0.8rem; color: var(--text-hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }

/* ---- Account card ---- */
.acct-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--white);
  border-radius: var(--radius); border: 1px solid var(--border);
  margin-bottom: 8px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.on { background: var(--green); }
.dot.off { background: var(--text-muted); }
.acct-info { flex: 1; min-width: 0; }
.acct-id { font-size: 0.85rem; font-weight: 600; }
.acct-status { font-size: 0.75rem; color: var(--text-hint); }

/* ---- Chat ---- */
.chat-list { margin-top: 10px; }
.chat-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
}
.chat-item:hover { background: var(--gray-soft); }
.chat-item.active { background: var(--green-light); }
.chat-avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--gray-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.chat-info { flex: 1; min-width: 0; }
.chat-name { font-weight: 600; font-size: 0.88rem; }
.chat-preview { font-size: 0.78rem; color: var(--text-hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-meta { text-align: right; flex-shrink: 0; }
.chat-time { font-size: 0.72rem; color: var(--text-muted); }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--green); color: #111; font-size: 0.72rem; font-weight: 700;
  margin-top: 4px;
}

/* ---- Message bubbles ---- */
.msg-list {
  max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 16px; background: var(--gray-card); border-radius: var(--radius-lg);
}
.msg-bubble {
  max-width: 75%; padding: 12px 16px; border-radius: var(--radius);
  font-size: 0.88rem; line-height: 1.5; word-break: break-word;
}
.msg-bubble.in { align-self: flex-start; background: var(--white); border: 1px solid var(--border); }
.msg-bubble.out {
  align-self: flex-end; background: var(--dark); color: #fff;
}
.msg-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 6px; }
.msg-bubble.out .msg-time { color: rgba(255,255,255,0.5); }
.msg-image {
  display: block; max-width: min(280px, 100%); border-radius: var(--radius-sm);
  margin-top: 8px; border: 1px solid rgba(0,0,0,0.08); background: var(--gray-soft);
}
.msg-bubble.out .msg-image { border-color: rgba(255,255,255,0.18); }

/* ---- QR ---- */
.qr-box {
  text-align: center; padding: 24px;
  background: var(--white); border-radius: var(--radius);
  border: 2px dashed var(--border);
}
.qr-box img { max-width: 260px; margin: 0 auto; }
.qr-hint { font-size: 0.85rem; color: var(--text-hint); margin-top: 12px; }
.qr-link-wrap { margin-top: 10px; font-size: 0.8rem; }
.qr-link { color: var(--green-dark); }
.qr-status { color: var(--text-hint); font-size: 0.85rem; }
.verify-panel {
  margin-top: 14px; padding: 14px; border-radius: var(--radius-sm);
  background: var(--gray-card); border: 1px solid var(--border);
}

/* ---- Empty state ---- */
.empty { text-align: center; padding: 32px 16px; }
.empty-tight { padding: 8px; }
.empty-compact { padding: 16px; }
.empty-small { font-size: 0.8rem; }
.text-muted-small { color: var(--text-hint); font-size: 0.8rem; }
.text-error { color: var(--red); }
.subhead-tight { margin-bottom: 12px; }
.empty-emoji { font-size: 3rem; margin-bottom: 12px; }
.empty p { color: var(--text-muted); font-size: 0.9rem; }
.loading-wrap { display: flex; align-items: center; gap: 10px; padding: 16px 0; color: var(--text-muted); font-size: 0.9rem; }
.memory-summary {
  background: linear-gradient(180deg, #fff, #fbfdfb);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.7;
}
.memory-book-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.memory-book-head h3 {
  margin: 2px 0 4px;
  color: var(--text-main);
  font-size: 1.08rem;
}
.memory-book-head p {
  margin: 0;
  color: var(--text-hint);
  font-size: 0.82rem;
}
.memory-actions { flex-shrink: 0; }
.memory-book-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.memory-block + .memory-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.memory-book-entry {
  padding: 12px 14px;
  border: 1px solid #edf0ee;
  border-radius: var(--radius-sm);
  background: #fff;
}
.memory-book-entry + .memory-book-entry {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid #edf0ee;
}
.memory-book-thread {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--gray-card);
}
.memory-block strong { display: block; color: var(--text); font-size: 0.82rem; margin-bottom: 4px; }
.memory-block p { margin: 0; color: var(--text-soft); }
.memory-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 8px; }
.memory-empty-note {
  margin: 0 0 12px; padding: 10px 12px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--gray-card); color: var(--text-hint);
  font-size: 0.82rem;
}

/* Spinner */
.spinner {
  width: 20px; height: 20px; border: 2.5px solid var(--border);
  border-top-color: var(--green); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast ---- */
.toast {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  padding: 12px 24px; border-radius: var(--radius-sm);
  background: var(--dark); color: #fff;
  font-size: 0.85rem; box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}
.toast.err { background: var(--red); }
.toast.ok { background: var(--green-dark); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ---- WeChat success confirmation ---- */
.wechat-success-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(7,16,34,0.48);
  backdrop-filter: blur(8px);
}
.wechat-success-box {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid rgba(74, 155, 111, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(7,16,34,0.24);
  padding: 30px 28px 26px;
  text-align: center;
  animation: modalPop 0.18s ease-out;
}
.wechat-success-icon {
  width: 58px; height: 58px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #dff8e7, #b6ecc9);
  color: var(--green-dark);
  font-size: 1.7rem; font-weight: 900;
  box-shadow: 0 12px 28px rgba(74,155,111,0.22);
}
.wechat-success-box h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}
.wechat-success-box p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}
.wechat-success-note {
  margin-top: 8px !important;
  font-size: 0.86rem;
  color: var(--text-hint) !important;
}
.wechat-success-box .btn {
  margin-top: 22px;
  min-width: 132px;
}
@keyframes modalPop { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ---- Danger confirmation ---- */
.danger-confirm-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(7,16,34,0.52);
  backdrop-filter: blur(8px);
}
.danger-confirm-box {
  width: min(440px, 100%);
  background: var(--white);
  border: 1px solid rgba(239,68,68,0.24);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(7,16,34,0.24);
  padding: 30px 28px 26px;
  text-align: center;
  animation: modalPop 0.18s ease-out;
}
.danger-confirm-icon {
  width: 58px; height: 58px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff1f2;
  color: var(--red);
  font-size: 1.7rem; font-weight: 900;
  box-shadow: 0 12px 28px rgba(239,68,68,0.14);
}
.danger-confirm-box h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}
.danger-confirm-box p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}
.danger-confirm-note {
  margin-top: 8px !important;
  font-size: 0.86rem;
  color: var(--text-hint) !important;
}
.danger-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.danger-confirm-actions .btn {
  min-width: 118px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
}
.modal-box {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 32px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
}

/* ---- Landing Page ---- */
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; max-width: var(--max-w); margin: 0 auto;
  gap: 16px; flex-wrap: wrap;
}
.landing-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.25rem; font-weight: 800; color: var(--text-main);
}
.landing-logo .brand-mark { width: 38px; height: 38px; }
.landing-nav-links { display: flex; gap: 32px; align-items: center; }
.landing-nav-links a {
  font-size: 0.9rem; font-weight: 600; color: var(--text-main);
  transition: color 0.2s;
}
.landing-nav-links a:hover { color: var(--green-dark); }
.landing-nav-actions { display: flex; gap: 10px; align-items: center; }

/* Hero */
.hero {
  text-align: center; padding: 48px 24px 0;
  max-width: 980px; margin: 0 auto;
  overflow: hidden;
}
.hero-kicker {
  display: inline-flex; padding: 6px 12px; border-radius: var(--radius-full);
  background: var(--gray-card); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 0.8rem; font-weight: 700;
}
.hero-banner {
  font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 900;
  line-height: 1.2; letter-spacing: 0;
  color: var(--text-main);
  padding: 12px 0;
  overflow-wrap: break-word;
}
.hero-banner .highlight {
  background: linear-gradient(135deg, var(--green-light), var(--green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.4rem); color: var(--text-hint);
  margin: 20px 0 32px; line-height: 1.7;
  overflow-wrap: anywhere;
}
.hero-cta {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-cta .btn {
  padding: 14px 36px; font-size: 1rem; border-radius: var(--radius);
}
.hero-screenshot {
  max-width: 980px; margin: 0 auto 0; padding: 0 16px;
}
.hero-screenshot img {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.product-console {
  width: 100%; max-width: 100%;
  overflow: hidden; text-align: left; border-radius: 18px;
  background: rgba(255,255,255,0.82); border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 24px 60px rgba(17,24,39,0.12);
  backdrop-filter: blur(12px);
}
.console-topbar {
  display: flex; align-items: center; gap: 8px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 0.82rem;
}
.window-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.window-dot:first-child { background: #ff6b6b; }
.window-dot:nth-child(2) { background: #ffd166; }
.window-dot:nth-child(3) { background: var(--green); }
.console-grid { display: grid; grid-template-columns: 1fr 0.85fr 1fr; gap: 14px; padding: 18px; }
.console-panel {
  min-width: 0;
  min-height: 210px; border-radius: var(--radius); padding: 18px;
  background: var(--gray-card); border: 1px solid var(--border);
}
.panel-label { display: block; color: var(--text-muted); font-size: 0.75rem; font-weight: 700; margin-bottom: 18px; }
.persona-panel { background: linear-gradient(150deg, #fff, var(--lavender)); }
.persona-panel h3 { font-size: 1.8rem; margin-bottom: 8px; }
.persona-panel p { color: var(--text-soft); font-size: 0.9rem; }
.tone-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tone-tags span { padding: 6px 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; }
.qr-panel { text-align: center; background: linear-gradient(150deg, #fff, var(--green-light)); }
.fake-qr { width: 104px; height: 104px; margin: 4px auto 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.fake-qr i { display: block; border-radius: 6px; background: var(--dark); }
.fake-qr i:nth-child(2), .fake-qr i:nth-child(4), .fake-qr i:nth-child(8) { background: var(--green-dark); }
.qr-panel p { color: var(--text-soft); font-size: 0.86rem; }
.chat-panel { background: linear-gradient(150deg, #fff, var(--blue)); }
.mini-chat { width: fit-content; max-width: 90%; padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; font-size: 0.84rem; overflow-wrap: anywhere; }
.mini-chat.in { background: #fff; border: 1px solid var(--border); }
.mini-chat.out { margin-left: auto; background: var(--dark); color: #fff; }
.console-status-row {
  display: flex; gap: 10px; flex-wrap: wrap; padding: 0 18px 18px;
}
.console-status-row span {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: var(--radius-full); background: var(--gray-card); color: var(--text-soft);
  font-size: 0.78rem; font-weight: 700;
}
.console-status-row b { width: 8px; height: 8px; border-radius: 50%; background: var(--green-dark); }

.flow-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  max-width: var(--max-w); margin: 42px auto 0; padding: 0 24px;
}
.flow-step {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.flow-step span {
  display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--dark); color: #fff; font-size: 0.78rem; font-weight: 800; margin-bottom: 12px;
}
.flow-step strong { display: block; margin-bottom: 6px; }
.flow-step p { color: var(--text-hint); font-size: 0.82rem; line-height: 1.6; }

/* Feature section (green bg) */
.feat-highlight {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f8faf9, #e8f9ed);
  margin-top: 60px;
}
.feat-highlight-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  max-width: var(--max-w); margin: 0 auto; padding: 60px 32px;
}
.feat-highlight-text h3 {
  font-size: 0.95rem; font-weight: 600; color: var(--text-soft); margin-bottom: 12px;
}
.feat-highlight-text h2 {
  font-size: 2.2rem; font-weight: 800; line-height: 1.3; margin-bottom: 28px;
}
.feat-highlight-text ul { list-style: none; }
.feat-highlight-text ul li {
  font-size: 1rem; color: var(--text-soft); padding: 6px 0;
}
.feat-highlight-text ul li::before { content: "- "; }
.feat-highlight-img { text-align: center; }
.feat-highlight-img img {
  max-width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.ops-preview-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-md); display: grid; gap: 12px;
}
.ops-row { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.ops-row div { flex: 1; }
.ops-row p { color: var(--text-hint); font-size: 0.78rem; }
.ops-row button { border: none; border-radius: var(--radius-sm); padding: 7px 12px; background: var(--dark); color: #fff; font-weight: 700; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); display: inline-block; flex-shrink: 0; }
.status-dot.on { background: var(--green-dark); }
.status-dot.off { background: var(--text-muted); }
.status-dot.warn { background: #d97706; }

/* Feature cards (3-col) */
.feat-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: var(--max-w); margin: 80px auto; padding: 0 24px;
}
.feat-card {
  background: var(--gray-card); border-radius: var(--radius-lg);
  padding: 32px 28px 40px;
}
.feat-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 0.86rem; font-weight: 900; margin-bottom: 28px;
  color: var(--green-dark); border: 1px solid var(--border);
}
.feat-card h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--text-main);
  margin-bottom: 10px;
}
.feat-card p {
  font-size: 0.82rem; color: var(--text-hint); line-height: 1.7;
}

/* CTA section */
.cta-section {
  text-align: center; padding: 64px 24px 80px; max-width: 700px; margin: 0 auto;
}
.cta-section h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800;
  color: var(--text-main); line-height: 1.4;
}
.cta-action { margin-top: 32px; }
.btn-large { padding: 16px 40px; font-size: 1.05rem; }

/* Legal pages */
.legal-page { max-width: 860px; margin: 0 auto; padding: 32px 24px 72px; }
.legal-card {
  background: var(--gray-card); border-radius: var(--radius-lg);
  padding: 32px; border: 1px solid var(--border);
}
.legal-card h1 { font-size: 2rem; margin-bottom: 8px; }
.legal-card h2 { font-size: 1.1rem; margin: 28px 0 10px; }
.legal-card p, .legal-card li { color: var(--text-soft); font-size: 0.92rem; line-height: 1.8; }
.legal-card ul { margin-left: 20px; }
.legal-updated { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 24px; }

/* Dashboard helpers */
.persona-actions { display: flex; gap: 6px; }
.persona-bot-card { align-items: flex-start; }
.wechat-title { margin-bottom: 18px; }
.qr-area { margin-top: 18px; }
.ops-hero {
  position: relative;
  display: flex; justify-content: space-between; gap: 24px; align-items: stretch;
  padding: 28px; border-radius: 18px; background: linear-gradient(135deg, #111827, #243127);
  color: #fff; margin-bottom: 18px; box-shadow: 0 18px 44px rgba(17,24,39,0.16);
  overflow: hidden;
}
.ops-hero::after {
  content: ""; position: absolute; right: 50px; bottom: -30px;
  width: 190px; height: 120px; border-radius: 50%;
  background: rgba(99,212,122,0.14); filter: blur(20px);
}
.ops-hero-copy { max-width: 640px; position: relative; z-index: 2; }
.ops-hero h1 { font-size: 1.8rem; margin: 8px 0 8px; }
.ops-hero p { color: rgba(255,255,255,0.72); margin-bottom: 18px; }
.eyebrow { color: var(--green); font-size: 0.78rem; font-weight: 800; }
.ops-hero-status {
  min-width: 220px; display: grid; gap: 10px; position: relative; z-index: 2;
}
.status-line {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.08);
}
.status-line span { color: rgba(255,255,255,0.64); font-size: 0.78rem; }
.metrics-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px;
}
.metric-card {
  padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.metric-card span { color: var(--text-hint); font-size: 0.78rem; font-weight: 700; }
.metric-card strong { display: block; font-size: 1.8rem; margin-top: 4px; }
.metric-card p { color: var(--text-muted); font-size: 0.78rem; }
.bot-stack { display: grid; gap: 10px; }
.bot-mini {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.bot-mini-info { flex: 1; }
.bot-mini-info p { color: var(--text-hint); font-size: 0.78rem; }
.overview-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin: 18px 0 14px;
}
.overview-section-head h2 { font-size: 1.35rem; }
.overview-section-head p { color: var(--text-hint); font-size: 0.88rem; margin-top: 4px; }
.role-section-mascot {
  width: 92px; height: 72px; object-fit: contain;
  margin-left: auto; margin-right: 4px;
  opacity: 0.72; mix-blend-mode: multiply;
  pointer-events: none;
}
.role-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 18px;
}
.role-card {
  width: 100%; min-height: 218px; text-align: left;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px; border-radius: 14px;
  background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); cursor: pointer;
  font-family: var(--font); color: var(--text-main);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.role-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47,157,87,0.42);
  box-shadow: 0 14px 34px rgba(17,24,39,0.08);
}
.role-card.active {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(99,212,122,0.18), var(--shadow-md);
}
.role-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.role-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--green-light), #fff);
  border: 1px solid rgba(47,157,87,0.18);
  color: var(--green-dark); font-weight: 900; font-size: 1.2rem;
}
.role-pill {
  padding: 5px 9px; border-radius: var(--radius-full);
  background: var(--gray-soft); color: var(--text-hint);
  font-size: 0.72rem; font-weight: 800;
}
.role-pill.on { background: var(--green-light); color: var(--green-dark); }
.role-pill.off { background: var(--gray-soft); color: var(--text-soft); }
.role-pill.warn { background: #fff7ed; color: #c2410c; }
.role-card h3 { font-size: 1.1rem; }
.role-card p {
  color: var(--text-soft); font-size: 0.82rem; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.role-meta {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.role-meta span { color: var(--text-hint); font-size: 0.76rem; }
.role-meta strong { color: var(--green-dark); font-size: 0.78rem; }
.role-empty {
  grid-column: 1 / -1; padding: 34px; border-radius: 14px;
  background: #fff; border: 1px dashed var(--border); text-align: center;
}
.role-empty p { color: var(--text-hint); margin: 8px 0 18px; }
.role-detail {
  background: var(--gray-card); border-radius: 18px; padding: 24px; margin-bottom: 24px;
  border: 1px solid rgba(229,231,235,0.88);
}
.role-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.role-detail-header h2 { font-size: 1.45rem; margin: 4px 0 6px; }
.role-detail-header p { color: var(--text-soft); font-size: 0.88rem; line-height: 1.7; max-width: 680px; }
.role-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.role-detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 18px 0;
}
.role-detail-panel {
  padding: 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border);
}
.role-detail-panel span { color: var(--text-hint); font-size: 0.76rem; font-weight: 800; }
.role-detail-panel strong { display: block; margin: 5px 0; font-size: 1.05rem; }
.role-detail-panel p { color: var(--text-hint); font-size: 0.78rem; line-height: 1.6; }
.role-detail-lower {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px;
}
.role-peer-list { margin-top: 12px; }
.memory-actions {
  display: flex; justify-content: flex-end; margin-bottom: 12px;
}
.role-editor {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.role-editor h2 { margin: 4px 0 18px; font-size: 1.35rem; }
.role-basics-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 1fr));
  gap: 12px;
}
.role-quick-choices {
  display: flex; flex-wrap: wrap; gap: 7px; margin: -7px 0 14px;
}
.role-choice {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--text-soft); font-size: 0.76rem; cursor: pointer;
}
.role-choice:hover { border-color: rgba(38,196,107,0.5); color: var(--green-dark); background: var(--green-light); }
.role-settings {
  display: grid; gap: 12px;
  padding: 14px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--gray-card);
}
.toggle-field {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; font-weight: 700; color: var(--text-main);
  cursor: pointer;
}
.toggle-field input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-control {
  width: 42px; height: 24px; border-radius: 999px;
  background: #cbd5e1; position: relative; flex-shrink: 0;
  transition: background 0.18s ease;
}
.toggle-control::after {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; position: absolute; left: 3px; top: 3px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.22);
  transition: transform 0.18s ease;
}
.toggle-field input:checked + .toggle-control { background: var(--green); }
.toggle-field input:checked + .toggle-control::after { transform: translateX(18px); }
.role-time-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.inline-chat-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start;
}
.inline-peer-list {
  max-height: 420px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px;
}
.inline-msg-list { max-height: 520px; min-height: 260px; }
.chat-layout { display: flex; gap: 20px; min-height: 60vh; flex-wrap: wrap; }
.chat-sidebar { width: 230px; flex-shrink: 0; }
.chat-sidebar-title { margin-bottom: 12px; }
.chat-main { flex: 1; min-width: 280px; }
.chat-head { margin-bottom: 14px; }
.chat-head h3 { margin: 0; }
.chat-peer-id { font-size: 0.75rem; color: var(--text-hint); margin-top: 2px; }
.full-width { width: 100%; }

/* Auth modals (landing page) */
.auth-modal-overlay {
  position: fixed; inset: 0; background: rgba(7,16,34,0.56);
  display: none; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
  backdrop-filter: blur(10px);
}
.auth-modal-overlay.show { display: flex; }
.auth-modal {
  position: relative; display: grid; grid-template-columns: 0.9fr 1fr;
  background: var(--white); border-radius: 18px;
  width: min(900px, 100%); max-height: min(92vh, 820px);
  overflow: hidden; box-shadow: 0 30px 90px rgba(7,16,34,0.26);
  border: 1px solid rgba(255,255,255,0.55);
  text-align: left;
}
.auth-close {
  position: absolute; right: 14px; top: 14px; z-index: 3;
  width: 34px; height: 34px; border: none; border-radius: 999px;
  background: rgba(255,255,255,0.9); color: #071022; font-size: 1.3rem;
  cursor: pointer; box-shadow: 0 8px 18px rgba(7,16,34,0.14);
}
.auth-side {
  position: relative; min-height: 100%; overflow: hidden;
  padding: 34px 30px; color: #071022;
  background:
    radial-gradient(circle at 20% 16%, rgba(255,255,255,0.9), transparent 88px),
    linear-gradient(145deg, #dff8e7, #f2efcf 58%, #dceef7);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.auth-side::after {
  content: ""; position: absolute; left: 24px; right: 24px; bottom: 24px;
  height: 28%; border-radius: 50%;
  background: rgba(47,157,87,0.14); filter: blur(20px);
}
.auth-side.register {
  background:
    radial-gradient(circle at 72% 20%, rgba(255,255,255,0.9), transparent 90px),
    linear-gradient(145deg, #e8f7d5, #d7eef0 54%, #f7dfdf);
}
.auth-brand-mark {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px;
  box-shadow: 0 12px 24px rgba(7,16,34,0.16);
  position: relative; z-index: 2;
}
.auth-mascot {
  width: min(260px, 92%);
  margin: 0 auto auto;
  mix-blend-mode: multiply;
  position: relative; z-index: 2;
}
.auth-kicker {
  color: rgba(7,16,34,0.62); font-weight: 900; font-size: 0.8rem;
  position: relative; z-index: 2;
}
.auth-side h2 {
  font-size: 1.65rem; line-height: 1.18; margin: 8px 0 18px;
  color: #071022;
  position: relative; z-index: 2;
}
.auth-side ul { list-style: none; display: grid; gap: 10px; }
.auth-side li {
  position: relative; padding-left: 18px; color: rgba(7,16,34,0.72);
  font-size: 0.9rem; line-height: 1.55; font-weight: 700;
  z-index: 2;
}
.auth-side li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 7px; height: 7px; border-radius: 999px; background: var(--green);
}
.auth-form-pane {
  padding: 36px 34px 30px; min-width: 0;
  overflow-y: auto;
  max-height: min(92vh, 820px);
  scrollbar-width: thin;
  scrollbar-color: rgba(17,24,39,0.18) transparent;
}
.auth-form-pane::-webkit-scrollbar {
  width: 6px;
}
.auth-form-pane::-webkit-scrollbar-thumb {
  background: rgba(17,24,39,0.16);
  border-radius: 999px;
}
.auth-form-pane h2 {
  font-size: 1.45rem; font-weight: 900; color: var(--text-main); margin: 6px 0 6px;
}
.auth-subtitle {
  color: var(--text-hint); font-size: 0.88rem; line-height: 1.6; margin-bottom: 20px;
}
.auth-step {
  display: inline-flex; padding: 5px 9px; border-radius: 999px;
  background: #effbf4; color: #15803d; font-size: 0.74rem; font-weight: 900;
}
.auth-progress {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  color: var(--text-hint); font-size: 0.78rem; font-weight: 900;
}
.auth-progress span {
  padding: 5px 9px; border-radius: 999px; background: #f1f5f9;
}
.auth-progress span.active {
  background: #071022; color: #fff;
}
.auth-progress i {
  width: 28px; height: 1px; background: var(--border);
}
.auth-modal .field { text-align: left; }
.auth-modal .field input {
  height: 46px; border-radius: 10px; background: #fbfcfb;
}
.auth-agreement {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  margin: 2px 0 14px;
  padding: 12px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfb;
  color: var(--text-hint);
  font-size: 0.78rem;
  line-height: 1.6;
  cursor: pointer;
}
.auth-agreement input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #2f9d57;
}
.auth-agreement a {
  color: #15803d;
  font-weight: 900;
}
.auth-agreement a:hover { text-decoration: underline; }
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 48px;
}
.password-field input::-ms-reveal,
.password-field input::-ms-clear {
  display: none;
}
.password-field input::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 7px; background: transparent; color: var(--text-soft);
  cursor: pointer;
}
.password-toggle:hover {
  background: #f1f5f9;
}
.password-toggle:focus-visible { outline: 2px solid rgba(38,196,107,0.5); outline-offset: 1px; }
.password-toggle img { width: 18px; height: 18px; opacity: 0.62; pointer-events: none; }
.password-toggle:hover img { opacity: 0.9; }
.field-note {
  margin: 6px 0 0; color: var(--text-hint); font-size: 0.76rem; line-height: 1.45;
}
.invite-field input:not(:placeholder-shown) {
  border-color: rgba(38,196,107,0.42);
  box-shadow: 0 0 0 3px rgba(38,196,107,0.08);
}
.auth-modal .switch-link {
  font-size: 0.85rem; color: var(--text-hint); margin-top: 16px; display: block;
  text-align: center;
}
.auth-modal .switch-link a { color: var(--green-dark); cursor: pointer; font-weight: 600; }
.auth-modal .switch-link a:hover { text-decoration: underline; }
.captcha-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7,16,34,0.42);
  backdrop-filter: blur(3px);
}
.captcha-modal-overlay.show { display: flex; }
.captcha-modal {
  width: min(380px, 100%);
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7,16,34,0.28);
  animation: captchaModalIn 0.18s ease both;
}
.captcha-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}
.captcha-modal-head strong {
  display: block;
  color: var(--text-main);
  font-size: 0.98rem;
}
.captcha-modal-head span {
  display: block;
  margin-top: 3px;
  color: var(--text-hint);
  font-size: 0.76rem;
}
.captcha-modal-close {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.15rem;
  cursor: pointer;
}
.captcha-modal .slider-captcha { margin: 0; }
.captcha-modal .slider-captcha-label { display: none; }

.home-announcement-overlay {
  position: fixed; inset: 0; z-index: 130;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(7,16,34,0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.home-announcement-overlay.show { display: flex; }
.home-announcement-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: min(82vh, 680px);
  overflow-y: auto;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(99,212,122,0.22), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fbf4 100%);
  border: 1px solid rgba(99,212,122,0.28);
  box-shadow: 0 30px 90px rgba(7,16,34,0.28);
  padding: 30px;
  animation: modalPop 0.18s ease-out;
}
.home-announcement-close {
  position: absolute; right: 18px; top: 18px;
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.78);
  color: #334155;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
}
.home-announcement-close:hover { background: #fff; color: #071022; }
.home-announcement-head { padding-right: 36px; margin-bottom: 18px; }
.home-announcement-head span {
  display: inline-flex; align-items: center;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(47,157,87,0.1);
  color: #166534;
  font-size: 0.72rem;
  font-weight: 900;
}
.home-announcement-head h2 {
  margin-top: 12px;
  color: #071022;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.04em;
}
.home-announcement-head p {
  margin-top: 8px;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.6;
}
.home-announcement-list {
  display: grid;
  gap: 12px;
}
.home-announcement-item {
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.24);
  background: rgba(255,255,255,0.78);
}
.home-announcement-item.success {
  border-color: rgba(47,157,87,0.22);
  background: rgba(238,251,241,0.9);
}
.home-announcement-item.warning {
  border-color: rgba(217,119,6,0.22);
  background: rgba(255,247,237,0.92);
}
.home-announcement-item strong {
  display: block;
  color: #071022;
  font-size: 1rem;
  margin-bottom: 6px;
}
.home-announcement-item p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
}
.home-announcement-actions { margin-top: 18px; }
@keyframes captchaModalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-hint {
  color: var(--text-soft); font-size: 0.86rem; line-height: 1.6;
  margin-bottom: 14px; padding: 12px; border-radius: 10px;
  background: #f8fafc; border: 1px solid var(--border);
}
.slider-captcha {
  display: grid; gap: 8px; margin: 12px 0 18px; text-align: left;
}
.slider-captcha-label {
  color: var(--text-main); font-weight: 800; font-size: 0.84rem;
}
.puzzle-captcha-board {
  position: relative; width: 100%; aspect-ratio: 2 / 1; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: #dce9e4;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}
.puzzle-captcha-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill;
  user-select: none; pointer-events: none;
}
.puzzle-captcha-piece {
  position: absolute; left: 0; height: auto; z-index: 2;
  filter: drop-shadow(0 5px 4px rgba(8,22,32,0.38));
  user-select: none; pointer-events: none;
}
.puzzle-captcha-loading {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(15,23,42,0.48); font-size: 0.8rem; font-weight: 700;
  backdrop-filter: blur(2px);
}
.puzzle-captcha-refresh {
  position: absolute; z-index: 4; top: 8px; right: 8px; width: 30px; height: 30px;
  border: 0; border-radius: 50%; color: #fff; background: rgba(15,23,42,0.58);
  font-size: 1.2rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(15,23,42,0.18);
}
.puzzle-captcha-refresh:hover { background: rgba(15,23,42,0.78); }
.puzzle-captcha-loading.hidden { display: none; }
.slider-captcha.verified .puzzle-captcha-board::after {
  content: "验证成功"; position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(22,163,74,0.72); font-size: 1rem; font-weight: 900;
}
.slider-captcha-track {
  position: relative; height: 44px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border); background: #f3f6f8;
  user-select: none; touch-action: none;
}
.slider-captcha-track::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(17,24,39,0.035) 0 8px, transparent 8px 16px);
}
.slider-captcha-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, rgba(38,196,107,0.22), rgba(38,196,107,0.08));
}
.slider-captcha-knob {
  position: absolute; top: 2px; left: 2px; transform: translateX(0);
  width: 40px; height: 40px; border-radius: 5px; border: 1px solid #111827;
  background: #111827; color: #fff; font-weight: 900; cursor: grab;
  box-shadow: 0 8px 18px rgba(17,24,39,0.16);
  z-index: 2; transition: background 0.18s ease, border-color 0.18s ease;
}
.slider-captcha-knob:active { cursor: grabbing; }
.slider-captcha-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-hint); font-size: 0.82rem; font-weight: 800; pointer-events: none;
}
.slider-captcha-hint {
  min-height: 18px; color: var(--text-hint); font-size: 0.76rem;
}
.slider-captcha.verified .slider-captcha-track {
  border-color: rgba(38,196,107,0.45); background: #effbf4;
}
.slider-captcha.verified .slider-captcha-knob {
  background: #26a65b; border-color: #26a65b;
}
.slider-captcha.failed .slider-captcha-track { border-color: rgba(220,38,38,0.5); background: #fff1f2; }
.slider-captcha.failed .slider-captcha-knob { background: #dc2626; border-color: #dc2626; }
.slider-captcha.checking .slider-captcha-knob { background: #64748b; border-color: #64748b; cursor: wait; }
.slider-captcha.active .slider-captcha-knob { background: var(--green-dark); border-color: var(--green-dark); }
.slider-captcha.shake .slider-captcha-track {
  animation: captchaShake 0.24s ease both;
}
@keyframes captchaShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Admin console */
.admin-page {
  min-height: 100vh; display: flex; background: #f6f8f7; color: var(--text-main);
}
.admin-sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px; height: 100vh;
  display: flex; flex-direction: column; padding: 20px;
  background: #071022; color: #fff;
  z-index: 90;
}
.admin-brand {
  display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 28px;
}
.admin-brand .brand-mark { width: 38px; height: 38px; box-shadow: none; }
.admin-menu { display: grid; gap: 6px; }
.admin-menu-item {
  border: none; border-radius: 8px; padding: 11px 12px;
  background: transparent; color: rgba(255,255,255,0.68);
  text-align: left; font: 700 0.9rem var(--font); cursor: pointer;
}
.admin-menu-item.active, .admin-menu-item:hover {
  background: rgba(255,255,255,0.1); color: #fff;
}
.admin-sidebar-foot {
  margin-top: auto; display: grid; gap: 12px; color: rgba(255,255,255,0.68);
  font-size: 0.85rem;
}
.admin-sidebar-foot .btn {
  color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.55);
  background: transparent;
}
.admin-sidebar-foot .btn:hover {
  color: #071022; background: #fff; border-color: #fff;
}
.admin-main {
  flex: 1; min-width: 0; padding: 28px; margin-left: 248px;
}
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 22px;
}
.admin-topbar h1 { font-size: 1.8rem; }
.admin-operator {
  padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border);
  color: var(--text-soft); font-weight: 700; font-size: 0.86rem;
}
.admin-stat-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px;
}
.admin-stat-card, .admin-panel {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.admin-stat-card { position: relative; min-height: 124px; padding: 18px; overflow: hidden; }
.admin-stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #cbd5e1; }
.admin-stat-card.stat-primary::before { background: #22a85a; }
.admin-stat-card.stat-token::before { background: #2563eb; }
.admin-stat-card.stat-users::before { background: #0f766e; }
.admin-stat-card.stat-roles::before { background: #7c3aed; }
.admin-stat-card.stat-messages::before { background: #111827; }
.admin-stat-card.stat-warning::before { background: #d97706; }
.admin-stat-card span { color: var(--text-hint); font-size: 0.78rem; font-weight: 800; }
.admin-stat-card strong { display: block; font-size: 2rem; margin: 4px 0; }
.admin-stat-card p { color: var(--text-muted); font-size: 0.82rem; }
.admin-dashboard-head {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-bottom: 18px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.admin-dashboard-head h2, .model-settings-head h2 { margin-top: 2px; font-size: 1.35rem; }
.admin-dashboard-head > div > p:last-child, .model-settings-head > div > p:last-child { margin-top: 5px; color: var(--text-hint); font-size: 0.84rem; }
.admin-dashboard-health {
  min-width: 290px; display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border: 1px solid #dbe3ea; border-radius: 8px; background: #f8fafc;
}
.dashboard-health-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #94a3b8; }
.admin-dashboard-health div { display: grid; gap: 2px; }
.admin-dashboard-health strong { font-size: 0.84rem; }
.admin-dashboard-health small { color: var(--text-hint); font-size: 0.74rem; }
.admin-dashboard-health.health-ok { border-color: #b9e7cc; background: #f1fbf5; }
.admin-dashboard-health.health-ok .dashboard-health-dot { background: #22a85a; }
.admin-dashboard-health.health-warning { border-color: #f3d6a4; background: #fffbeb; }
.admin-dashboard-health.health-warning .dashboard-health-dot { background: #d97706; }
.admin-dashboard-health.health-critical { border-color: #fecaca; background: #fff7f7; }
.admin-dashboard-health.health-critical .dashboard-health-dot { background: #dc2626; }
.admin-dashboard-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, 0.62fr);
  grid-template-areas: "trend health" "trend actions"; gap: 18px; align-items: stretch;
}
.dashboard-trend-panel { grid-area: trend; }
.dashboard-health-panel { grid-area: health; }
.dashboard-actions-panel { grid-area: actions; }
.dashboard-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dashboard-action {
  min-height: 74px; display: grid; align-content: center; gap: 4px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; color: var(--text-main); text-align: left; cursor: pointer;
}
.dashboard-action:hover { border-color: #7fd8a4; background: #f1fbf5; }
.dashboard-action strong { font: 800 0.82rem var(--font); }
.dashboard-action span { color: var(--text-hint); font: 500 0.72rem/1.4 var(--font); }
.analytics-page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px;
}
.analytics-page-head h2 { margin-top: 2px; font-size: 1.35rem; }
.analytics-page-head > div > p:last-child { margin-top: 5px; color: var(--text-hint); font-size: 0.84rem; }
.analytics-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.analytics-kpi {
  min-height: 118px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.analytics-kpi span { color: var(--text-hint); font-size: 0.76rem; font-weight: 800; }
.analytics-kpi strong { display: block; margin-top: 5px; font-size: 1.8rem; }
.analytics-kpi p { margin-top: 5px; color: var(--text-muted); font-size: 0.76rem; line-height: 1.45; }
.analytics-grid { display: grid; gap: 18px; align-items: stretch; }
.analytics-grid-main { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); }
.analytics-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-grid .admin-panel { min-width: 0; }
.activation-funnel, .retention-board, .analytics-metric-list, .feature-adoption-list { display: grid; gap: 12px; }
.funnel-row, .feature-adoption-row { display: grid; gap: 7px; }
.funnel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.funnel-head strong { font-size: 0.82rem; }
.funnel-head span { color: var(--text-hint); font-size: 0.76rem; font-weight: 800; }
.funnel-track, .feature-adoption-track, .retention-track { height: 9px; overflow: hidden; border-radius: 999px; background: #e8eef1; }
.funnel-track span, .feature-adoption-track span, .retention-track span { display: block; height: 100%; border-radius: inherit; background: #24ad60; }
.funnel-row:nth-child(2) .funnel-track span { background: #209b5a; }
.funnel-row:nth-child(3) .funnel-track span { background: #187f66; }
.funnel-row:nth-child(4) .funnel-track span { background: #2563a6; }
.funnel-row:nth-child(5) .funnel-track span { background: #111827; }
.retention-card { padding: 15px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; }
.retention-card > span { color: var(--text-hint); font-size: 0.76rem; font-weight: 800; }
.retention-card > strong { display: block; margin-top: 4px; font-size: 1.65rem; }
.retention-card p { margin: 3px 0 11px; color: var(--text-muted); font-size: 0.74rem; line-height: 1.4; }
.analytics-metric-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.analytics-metric-row:last-child { padding-bottom: 0; border-bottom: 0; }
.analytics-metric-row span { color: var(--text-soft); font-size: 0.8rem; }
.analytics-metric-row strong { font-size: 0.88rem; }
.feature-adoption-track span { background: #2563a6; }
.analytics-footnote { padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-hint); font-size: 0.76rem; }
.analytics-table th, .analytics-table td { text-align: right; }
.analytics-table th:first-child, .analytics-table td:first-child { text-align: left; }
.operation-settings-panel { margin-bottom: 18px; }
.operation-toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.operation-toggle-item {
  min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc;
}
.operation-toggle-item > span:first-child { display: grid; gap: 5px; }
.operation-toggle-item strong { font-size: 0.84rem; }
.operation-toggle-item small { color: var(--text-hint); font-size: 0.74rem; line-height: 1.45; }
.operation-number-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-panel { padding: 20px; margin-bottom: 18px; }
.admin-section-head { margin-bottom: 18px; }
.admin-section-head h2 { font-size: 1.35rem; }
.admin-health-grid .admin-stat-card:nth-child(3) strong { color: #168a49; }
.admin-health-grid .admin-stat-card:nth-child(4) strong,
.admin-health-grid .admin-stat-card:nth-child(5) strong { color: #c2410c; }
.admin-operations-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); }
.vision-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vision-permission-panel { grid-column: 1 / -1; }
.model-settings-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.model-security-note { padding: 7px 10px; border-radius: 6px; background: #edf8f1; color: #187844; font-size: 0.76rem; font-weight: 800; }
.vision-access-panel { margin-bottom: 18px; }
.model-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.model-config-panel { display: flex; flex-direction: column; min-height: 460px; }
.model-config-panel form { display: flex; flex: 1; flex-direction: column; }
.model-form-fields { display: grid; gap: 2px; }
.model-form-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.model-form-footer .form-hint { min-height: 38px; margin-bottom: 10px; }
.model-form-footer .stack-row { justify-content: flex-start; }
.admin-task-list { display: grid; gap: 10px; }
.admin-task-item {
  min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px;
  background: #f8fafc;
}
.admin-task-item strong { color: var(--text-main); font-size: 0.88rem; }
.admin-task-item p { margin-top: 4px; color: var(--text-hint); font-size: 0.78rem; line-height: 1.5; }
.admin-task-item.task-critical { border-left-color: #dc2626; background: #fff8f8; }
.admin-task-item.task-warning { border-left-color: #d97706; background: #fffbeb; }
.admin-runbook { display: grid; gap: 12px; }
.admin-runbook div { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.admin-runbook div:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-runbook strong { font-size: 0.86rem; color: var(--text-main); }
.admin-runbook p { margin-top: 4px; color: var(--text-hint); font-size: 0.78rem; line-height: 1.55; }
.quota-preview-admin { margin-top: 22px; }
.quota-preview-admin > span { color: var(--text-hint); font-size: 0.76rem; font-weight: 800; }
.quota-preview-admin > div {
  margin-top: 9px; max-width: 420px; padding: 13px 15px; border-radius: 6px;
  background: #252525; color: #fff;
}
.quota-preview-admin strong { display: block; font-size: 0.86rem; }
.quota-preview-admin p { margin-top: 5px; color: rgba(255,255,255,0.8); font-size: 0.8rem; line-height: 1.55; }
.vision-global-control {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc;
}
.vision-global-control strong { color: var(--text-main); font-size: 0.9rem; }
.vision-global-control p { margin-top: 4px; color: var(--text-hint); font-size: 0.8rem; line-height: 1.5; }
.ops-status {
  display: inline-flex; align-items: center; min-width: 76px; justify-content: center;
  padding: 5px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 800;
}
.ops-healthy { color: #157347; background: #e8f8ef; }
.ops-warning { color: #9a6700; background: #fff4ce; }
.ops-critical { color: #b42318; background: #feeceb; }
.ops-paused { color: #596579; background: #edf1f5; }
.admin-insight-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.admin-insight-grid div {
  padding: 16px; border-radius: 8px; background: var(--gray-card); border: 1px solid var(--border);
}
.admin-insight-grid p { color: var(--text-hint); font-size: 0.82rem; margin-top: 6px; }
.admin-viz-grid {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 18px; align-items: start;
}
.admin-viz-grid-secondary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.admin-chart { min-height: 0; }
.chart-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin: 4px 0 14px;
}
.chart-summary-chip {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #f8fafc;
}
.chart-summary-chip span {
  display: block; color: var(--text-hint); font-size: 0.72rem; font-weight: 800;
}
.chart-summary-chip strong {
  display: block; margin-top: 3px; color: var(--text-main); font-size: 1rem;
}
.trend-bars {
  height: 132px; display: grid; grid-template-columns: repeat(14, minmax(22px, 1fr));
  gap: 10px; align-items: end; padding-top: 8px;
}
.trend-day { min-width: 0; display: grid; gap: 7px; justify-items: center; }
.trend-stack { height: 98px; display: flex; align-items: end; gap: 3px; }
.trend-bar {
  width: 6px; border-radius: 999px 999px 2px 2px;
  box-shadow: inset 0 -8px 14px rgba(255,255,255,0.28);
}
.trend-user { background: #27c46b; }
.trend-message { background: #111827; }
.trend-token { background: #2563eb; }
.trend-day small { color: var(--text-hint); font-size: 0.68rem; white-space: nowrap; }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px;
  color: var(--text-hint); font-size: 0.78rem; font-weight: 800;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i {
  width: 9px; height: 9px; border-radius: 999px; display: inline-block;
}
.admin-donut-board { display: grid; gap: 12px; }
.status-meter {
  padding: 14px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--border);
}
.status-meter > strong { display: block; margin-bottom: 10px; color: var(--text-main); }
.status-meter-bar {
  height: 12px; border-radius: 999px; overflow: hidden; display: flex;
  background: #e5e7eb; margin-bottom: 10px;
}
.status-meter-bar span { min-width: 0; }
.status-meter-row {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-soft); font-size: 0.82rem; margin-top: 6px;
}
.status-meter-row span { display: inline-flex; align-items: center; gap: 7px; }
.status-meter-row i { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.status-meter-row b { color: var(--text-main); }
.admin-rank-list { display: grid; gap: 13px; }
.rank-row { display: grid; gap: 7px; }
.rank-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.rank-head strong { color: var(--text-main); font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-head span { color: var(--text-hint); font-size: 0.76rem; font-weight: 800; white-space: nowrap; }
.rank-bar { height: 8px; border-radius: 999px; overflow: hidden; background: #e8eef5; }
.rank-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #27c46b, #2563eb); }
.admin-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-search, .admin-filter {
  height: 34px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  padding: 0 10px; color: var(--text-main); font: 700 0.82rem var(--font);
}
.admin-search { width: min(320px, 46vw); }
.admin-user-cell, .admin-reason-cell { display: grid; gap: 3px; min-width: 150px; }
.admin-user-cell strong, .admin-reason-cell strong { color: var(--text-main); font-size: 0.86rem; }
.admin-user-cell span, .admin-reason-cell span { color: var(--text-hint); font-size: 0.74rem; }
.admin-reason-cell strong {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-event-item strong { color: var(--text-main); }
.admin-empty-state {
  min-height: 92px; display: grid; align-content: center; gap: 5px;
  padding: 18px; border-radius: 8px; border: 1px dashed #cbd5e1; background: #f8fafc;
}
.admin-empty-state strong { color: var(--text-main); font-size: 0.92rem; }
.admin-empty-state p { color: var(--text-hint); font-size: 0.82rem; line-height: 1.5; }
.form-hint {
  color: var(--text-hint); font-size: 0.8rem; line-height: 1.6; margin: -2px 0 14px;
}
.sticker-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px;
}
.sticker-admin-card {
  display: grid; gap: 12px; padding: 12px; border-radius: 8px;
  border: 1px solid var(--border); background: #f8fafc;
}
.sticker-admin-preview {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  overflow: hidden;
}
.sticker-admin-preview img {
  max-width: 92%; max-height: 92%; object-fit: contain; display: block;
  filter: drop-shadow(0 10px 16px rgba(15,23,42,0.12));
}
.sticker-admin-info { display: grid; gap: 4px; min-width: 0; }
.sticker-admin-info strong {
  color: var(--text-main); font-size: 0.88rem; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.sticker-admin-info span { color: var(--text-hint); font-size: 0.76rem; }
.sticker-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sticker-admin-actions .btn[disabled] {
  opacity: 0.42; cursor: not-allowed; background: #f1f5f9;
}
.admin-layout {
  display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start;
}
.admin-table-wrap { overflow-x: auto; }
.admin-table { 
  width: 100%; border-collapse: collapse; min-width: 1280px;
}
.admin-table th, .admin-table td {
  padding: 12px 10px; border-bottom: 1px solid var(--border);
  text-align: left; font-size: 0.84rem; vertical-align: middle;
}
.admin-table th { color: var(--text-hint); font-size: 0.76rem; }
.admin-table td { color: var(--text-soft); }
.status-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 4px 8px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 800;
}
.status-active { background: rgba(55, 203, 120, 0.14); color: #118246; }
.status-banned { background: rgba(225, 72, 72, 0.14); color: #b32626; }
.admin-token-cell { display: grid; gap: 3px; min-width: 128px; }
.admin-token-cell strong { color: var(--text-main); font-size: 0.86rem; }
.admin-token-cell span { color: var(--text-hint); font-size: 0.74rem; white-space: nowrap; }
.admin-actions {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  min-width: 272px;
}
.admin-list { display: grid; gap: 10px; }
.admin-list-item {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  padding: 14px; border-radius: 8px; background: var(--gray-card); border: 1px solid var(--border);
}
.admin-list-item p { color: var(--text-soft); font-size: 0.84rem; margin: 4px 0; line-height: 1.6; }
.admin-list-item span { color: var(--text-hint); font-size: 0.76rem; font-weight: 700; }
.log-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.log-summary-chip {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}
.log-summary-chip span {
  display: block;
  color: var(--text-hint);
  font-size: 0.74rem;
  font-weight: 800;
}
.log-summary-chip strong {
  display: block;
  color: var(--text-main);
  font-size: 1.4rem;
  margin-top: 4px;
}
.log-summary-chip.log-error { border-color: #fecaca; background: #fff7f7; }
.log-summary-chip.log-warn { border-color: #fde68a; background: #fffbeb; }
.log-summary-chip.log-info { border-color: #bfdbfe; background: #eff6ff; }
.admin-log-list { display: grid; gap: 10px; }
.admin-log-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.admin-log-row.log-error { border-color: #fecaca; }
.admin-log-row.log-warn { border-color: #fde68a; }
.admin-log-row summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}
.admin-log-row summary::-webkit-details-marker { display: none; }
.admin-log-row code {
  color: var(--text-hint);
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.72rem;
}
.admin-log-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.admin-log-meta strong {
  color: var(--text-main);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-log-meta small {
  color: var(--text-hint);
  font-weight: 700;
  white-space: nowrap;
}
.log-level-pill {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 900;
}
.log-level-pill.log-error { color: #991b1b; background: #fee2e2; }
.log-level-pill.log-warn { color: #92400e; background: #fef3c7; }
.log-level-pill.log-info { color: #1d4ed8; background: #dbeafe; }
.admin-log-payload {
  margin: 0;
  padding: 14px;
  background: #0b1220;
  color: #dbeafe;
  overflow: auto;
  max-height: 360px;
  font-size: 0.78rem;
  line-height: 1.55;
}
.admin-mail-panel { max-width: 760px; }
.btn-danger-solid {
  background: #dc2626; color: #fff;
}
.btn-danger-solid:hover { background: #b91c1c; }
.admin-modal-overlay,
.admin-drawer {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(7,16,34,0.42);
  display: flex;
}
.admin-modal-overlay {
  align-items: center; justify-content: center; padding: 22px;
}
.admin-action-modal {
  position: relative; width: min(520px, 100%);
  background: #fff; border: 1px solid rgba(148,163,184,0.32);
  border-radius: 12px; box-shadow: 0 28px 80px rgba(7,16,34,0.22);
  padding: 26px;
}
.admin-modal-close {
  position: absolute; right: 14px; top: 12px;
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: #f1f5f9; color: #334155; cursor: pointer;
  font-size: 1.2rem; line-height: 1;
}
.admin-modal-close:hover { background: #e2e8f0; }
.admin-action-modal h2 {
  font-size: 1.45rem; margin: 4px 36px 8px 0; color: #071022;
}
.admin-modal-desc {
  color: var(--text-hint); font-size: 0.88rem; line-height: 1.7;
  margin-bottom: 18px;
}
.admin-action-modal textarea {
  min-height: 116px; resize: vertical;
}
.admin-reason-presets {
  display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px;
}
.admin-preset-chip {
  border: 1px solid var(--border); background: #f8fafc; color: #334155;
  border-radius: 999px; padding: 7px 11px; cursor: pointer;
  font: 800 0.78rem var(--font);
}
.admin-preset-chip:hover { border-color: #2f9d57; color: #166534; background: #eefbf2; }
.admin-modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}
.admin-drawer {
  justify-content: flex-end;
}
.admin-drawer-panel {
  position: relative; width: min(720px, 100%);
  height: 100vh; overflow-y: auto;
  background: #f8fafc; border-left: 1px solid rgba(148,163,184,0.42);
  box-shadow: -24px 0 70px rgba(7,16,34,0.18);
  padding: 26px;
}
.admin-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 4px 42px 18px 0; border-bottom: 1px solid var(--border);
}
.admin-detail-header h2 {
  color: #071022; font-size: 1.35rem; margin: 3px 0 6px;
  word-break: break-all;
}
.admin-detail-header span:not(.status-pill) {
  color: var(--text-hint); font-size: 0.82rem; font-weight: 700;
}
.admin-detail-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 18px 0;
}
.admin-mini-metric {
  padding: 13px; border-radius: 9px; background: #fff; border: 1px solid var(--border);
}
.admin-mini-metric span {
  color: var(--text-hint); font-size: 0.74rem; font-weight: 900;
}
.admin-mini-metric strong {
  display: block; margin-top: 4px; color: #071022; font-size: 1.2rem;
}
.admin-detail-section {
  padding: 16px; border-radius: 10px; background: #fff; border: 1px solid var(--border);
  margin-bottom: 14px;
}
.admin-detail-section h3 {
  color: #071022; font-size: 1rem; margin-bottom: 12px;
}
.admin-detail-line {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-top: 1px solid #eef2f7;
}
.admin-detail-line:first-of-type { border-top: none; }
.admin-detail-line span,
.admin-detail-item span {
  color: var(--text-hint); font-size: 0.78rem; font-weight: 800;
}
.admin-detail-line strong {
  color: #071022; font-size: 0.86rem; text-align: right; word-break: break-all;
}
.admin-detail-list {
  display: grid; gap: 8px;
}
.admin-detail-item {
  padding: 11px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #eef2f7;
}
.admin-detail-item strong {
  display: block; color: #071022; font-size: 0.9rem; margin-bottom: 4px;
  word-break: break-word;
}
.admin-detail-item p {
  color: var(--text-soft); font-size: 0.82rem; line-height: 1.55;
  margin-bottom: 4px; word-break: break-word;
}
.announcement-list { display: grid; gap: 10px; margin-bottom: 14px; }
.announcement-item {
  padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: #fff;
}
.announcement-item.success { background: #eefbf1; border-color: rgba(47,157,87,0.24); }
.announcement-item.warning { background: #fff7ed; border-color: rgba(217,119,6,0.26); }
.announcement-item p { color: var(--text-soft); font-size: 0.86rem; margin-top: 4px; }

/* Footer */
.footer {
  background: var(--dark); color: #fff; padding: 48px 24px 32px;
  border-top: 3px solid #000;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 32px;
}
.footer-brand img,
.footer-mark { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.2); display: flex; 
  align-items: center; justify-content: center; color: #fff;
  font-size: 0.9rem; transition: all 0.2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links h4 {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  margin-bottom: 16px; color: rgba(255,255,255,0.5);
}
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a { font-size: 0.85rem; color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-links ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 40px; padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: rgba(255,255,255,0.4); flex-wrap: wrap; gap: 10px;
}

/* ---- Marketing homepage ---- */
.marketing-page {
  background: #fff;
  padding-top: 78px;
}
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(17,24,39,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.marketing-page .landing-nav {
  max-width: 1360px;
  padding: 18px 32px;
}
.marketing-page .landing-logo {
  color: #070b12;
  letter-spacing: 0;
}
.marketing-page .landing-logo .brand-mark { box-shadow: 0 8px 18px rgba(47,157,87,0.18); }
.marketing-page .landing-nav-links {
  gap: 42px;
}
.marketing-page .landing-nav-links a {
  color: #0b1220;
  font-weight: 800;
}
.marketing-page .landing-nav-actions .btn-primary {
  background: #071022;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 48px;
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
  padding: 72px 32px 0;
  text-align: left;
}
.hero-copy {
  max-width: 620px;
  margin: 0;
}
.home-hero .hero-kicker {
  background: #f4f7f5;
  color: #314035;
  border-color: #e3ebe5;
}
.hero-title {
  margin: 18px 0 0;
  color: #06080d;
  font-size: clamp(2.8rem, 5.7vw, 5.7rem);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 950;
  max-width: 680px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.hero-title::after {
  content: "";
  display: inline-block;
  width: clamp(38px, 6vw, 72px);
  height: clamp(18px, 3vw, 34px);
  margin-left: 14px;
  border-radius: 999px;
  background: #62df80;
  transform: translateY(-0.12em) rotate(-5deg);
}
.hero-subtitle {
  max-width: 560px;
  margin: 24px 0 0;
  color: #65717c;
  font-size: clamp(1rem, 1.6vw, 1.28rem);
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.btn-xl {
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
}
.hero-visual {
  position: relative;
  min-height: 620px;
  margin: 0;
  border-radius: 30px;
}
.hero-visual::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 2%;
  height: 22%;
  border-radius: 50%;
  background: rgba(98,223,128,0.22);
  filter: blur(34px);
}
.hero-product-card img {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  border-radius: 22px;
  box-shadow: 0 34px 90px rgba(17,24,39,0.13);
}
.mascot-hero {
  display: grid;
  align-items: center;
}
.mascot-stage {
  position: relative;
  min-height: 610px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,0.96), transparent 90px),
    radial-gradient(circle at 68% 24%, rgba(255,233,184,0.44), transparent 140px),
    radial-gradient(circle at 80% 70%, rgba(69,216,139,0.22), transparent 190px),
    linear-gradient(145deg, #ecfff1, #f7fbff 52%, #fff6e8);
  border: 1px solid rgba(17,24,39,0.06);
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(47,157,87,0.14);
}
.mascot-stage::after {
  content: "";
  position: absolute; inset: auto 9% 8% 12%; height: 28px;
  border-radius: 50%;
  background: rgba(47,157,87,0.18);
  filter: blur(10px);
}
.mascot-main {
  position: absolute;
  z-index: 2;
  right: 12%;
  bottom: 86px;
  width: min(420px, 62%);
  border-radius: 24px;
  mix-blend-mode: multiply;
}
.mascot-main-new {
  right: 16%;
  bottom: 108px;
  width: min(390px, 58%);
}
.mascot-chat-bubble {
  position: absolute;
  z-index: 3;
  max-width: 210px;
  padding: 12px 15px;
  border-radius: 18px 18px 18px 6px;
  background: #071022;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 16px 38px rgba(7,16,34,0.16);
}
.bubble-one { left: 8%; top: 13%; }
.bubble-two {
  right: 8%; top: 10%;
  background: #fff; color: #173324;
  border: 1px solid rgba(47,157,87,0.16);
}
.hero-product-card {
  position: absolute;
  left: 4%;
  right: 8%;
  bottom: 0;
  transform: translateY(24%);
}
.mascot-orbit,
.mascot-mini-card {
  position: absolute;
  z-index: 4;
  display: grid;
  align-items: center;
  border: 1px solid rgba(17,24,39,0.06);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 22px 56px rgba(17,24,39,0.10);
  backdrop-filter: blur(12px);
}
.mascot-orbit {
  grid-template-columns: 82px 1fr;
  gap: 10px;
  min-width: 230px;
  padding: 12px 16px 12px 10px;
  border-radius: 22px;
}
.mascot-orbit img,
.mascot-mini-card img {
  width: 100%;
  mix-blend-mode: multiply;
}
.mascot-orbit span,
.mascot-mini-card p {
  color: #173324;
  font-size: 0.86rem;
  line-height: 1.5;
  font-weight: 900;
}
.orbit-memory {
  left: 6%;
  bottom: 132px;
}
.orbit-sticker {
  right: 5%;
  bottom: 28px;
}
.orbit-hug {
  left: 10%;
  top: 42%;
  width: 176px;
  padding: 12px;
  border-radius: 24px;
}
.orbit-hug img {
  width: 132px;
  margin: -26px auto -6px;
}
.orbit-hug p {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
}
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1180px;
  margin: 54px auto 0;
  padding: 0 32px;
}
.mascot-story {
  position: relative;
  display: grid;
  grid-template-columns: 0.45fr 1fr 0.32fr;
  gap: 28px;
  align-items: center;
  max-width: 1180px;
  margin: 86px auto 0;
  padding: 26px 32px 26px 18px;
  border: 1px solid #edf0ee;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(223,248,230,0.76), rgba(255,255,255,0.94)),
    #fff;
  overflow: hidden;
}
.mascot-story-art {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 210px;
}
.mascot-story-art img {
  width: min(260px, 100%);
  mix-blend-mode: multiply;
}
.mascot-story-copy p {
  color: #2f9d57;
  font-size: 0.86rem;
  font-weight: 950;
  margin-bottom: 8px;
}
.mascot-story-copy h2 {
  max-width: 680px;
  color: #071022;
  font-size: clamp(1.5rem, 3.1vw, 2.6rem);
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: 0;
}
.mascot-story-copy span {
  display: block;
  max-width: 720px;
  margin-top: 14px;
  color: #65717c;
  font-size: 0.98rem;
  line-height: 1.8;
}
.mascot-mini-pose {
  align-self: stretch;
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #edf0ee;
}
.mascot-mini-pose img {
  width: min(170px, 100%);
  mix-blend-mode: multiply;
}
.proof-item {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid #edf0ee;
  border-radius: 8px;
  background: #fbfcfb;
}
.proof-item strong {
  color: #071022;
  font-size: 1.2rem;
}
.proof-item span {
  color: #71808c;
  font-size: 0.9rem;
}
.workflow-section,
.feature-section,
.security-section {
  max-width: 1180px;
  margin: 96px auto 0;
  padding: 0 32px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}
.section-heading.compact {
  display: block;
  max-width: 720px;
}
.section-heading p,
.green-copy p,
.panel-eyebrow {
  color: #2f9d57;
  font-size: 0.88rem;
  font-weight: 900;
}
.section-heading h2,
.green-copy h2,
.security-panel h2,
.final-cta h2 {
  color: #070b12;
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 950;
}
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.workflow-card,
.feature-card {
  border-radius: 8px;
  background: #f7f9f8;
  border: 1px solid #edf0ee;
  padding: 28px;
}
.workflow-card span,
.feature-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #071022;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  margin-bottom: 36px;
}
.workflow-card h3,
.feature-card h3 {
  color: #071022;
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.workflow-card p,
.feature-card p {
  color: #687782;
  font-size: 0.9rem;
  line-height: 1.75;
}
.green-showcase {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 44px;
  align-items: center;
  max-width: 1180px;
  margin: 96px auto 0;
  padding: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e5fbe9, #62df80);
  overflow: hidden;
}
.green-copy h2 {
  margin-top: 10px;
  max-width: 650px;
}
.green-copy ul {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 12px;
}
.green-copy li {
  color: #1d3927;
  font-weight: 700;
}
.persona-board {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 8px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: 0 28px 70px rgba(22,84,43,0.18);
}
.board-top,
.persona-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.board-top {
  padding-bottom: 10px;
  color: #071022;
}
.board-top span {
  color: #577065;
  font-size: 0.86rem;
}
.persona-row {
  justify-content: flex-start;
  padding: 15px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #edf0ee;
}
.persona-row.active {
  border-color: rgba(47,157,87,0.38);
}
.persona-row i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a4adb6;
  flex-shrink: 0;
}
.persona-row.active i {
  background: #2f9d57;
}
.persona-row.warning i {
  background: #d97706;
}
.persona-row div {
  flex: 1;
  min-width: 0;
}
.persona-row p {
  color: #71808c;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.persona-row button {
  border: none;
  border-radius: 8px;
  background: #071022;
  color: #fff;
  padding: 8px 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.feature-card {
  min-height: 250px;
  position: relative;
  overflow: hidden;
}
.feature-mascot {
  position: absolute;
  right: -14px;
  top: -18px;
  width: 118px;
  opacity: 0.72;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.feature-card:has(.feature-mascot) {
  padding-right: 122px;
}
.feature-index {
  background: #fff;
  border: 1px solid #e1e7e3;
  color: #2f9d57;
}
.security-panel {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 36px;
  align-items: center;
  padding: 42px;
  border-radius: 8px;
  background: #071022;
}
.security-panel h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3.8vw, 3.4rem);
  margin-top: 10px;
}
.security-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.security-list span {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
  font-weight: 700;
}
.final-cta {
  max-width: 860px;
  margin: 96px auto 104px;
  padding: 0 32px;
  text-align: center;
}
.final-mascot {
  width: 150px;
  margin: 0 auto 10px;
  mix-blend-mode: multiply;
}
.final-cta p {
  color: #687782;
  margin: 18px 0 30px;
  font-size: 1.05rem;
}
.footer-brand p {
  color: rgba(255,255,255,0.78);
  font-weight: 800;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .quota-alert { align-items: flex-start; flex-direction: column; }
  .quota-alert .btn { width: 100%; }
  .role-basics-grid { grid-template-columns: 1fr 1fr; }
  html { scroll-padding-top: 92px; }
  .marketing-page { padding-top: 76px; }
  .nav { flex-direction: column; align-items: flex-start; }
  .nav-tabs { overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .landing-nav { padding: 14px 16px; }
  .landing-nav-links { display: none; }
  .feat-highlight-inner { grid-template-columns: 1fr; padding: 40px 20px; }
  .console-grid { grid-template-columns: 1fr; }
  .flow-strip { grid-template-columns: 1fr 1fr; }
  .ops-hero { flex-direction: column; }
  .role-section-mascot { display: none; }
  .metrics-grid { grid-template-columns: 1fr; }
  .overview-section-head { align-items: flex-start; flex-direction: column; }
  .referral-dashboard-card { grid-template-columns: 1fr; }
  .referral-dashboard-link { justify-content: stretch; flex-direction: column; align-items: stretch; }
  .settings-page-head { flex-direction: column; }
  .settings-page-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .role-detail-header { flex-direction: column; }
  .role-detail-actions { justify-content: flex-start; }
  .role-detail-grid { grid-template-columns: 1fr; }
  .inline-chat-layout { grid-template-columns: 1fr; }
  .inline-peer-list { max-height: none; }
  .feat-cards { grid-template-columns: 1fr; margin: 48px auto; }
  .hero { padding: 24px 16px 0; }
  .footer-top { flex-direction: column; }
  .footer-links { gap: 24px; }
  .home-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 50px 18px 0;
    text-align: center;
  }
  .hero-copy { max-width: 680px; margin: 0 auto; }
  .hero-title { font-size: clamp(2.2rem, 14vw, 4rem); }
  .hero-title::after { display: none; }
  .hero-subtitle { font-size: 0.98rem; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { min-height: auto; margin-top: 8px; }
  .mascot-stage { min-height: 560px; }
  .mascot-main,
  .mascot-main-new { width: min(360px, 62%); right: 10%; bottom: 112px; }
  .orbit-memory { left: 5%; bottom: 108px; }
  .orbit-sticker { right: 4%; bottom: 20px; }
  .orbit-hug { left: 5%; top: 36%; }
  .hero-product-card { position: relative; left: auto; right: auto; bottom: auto; transform: none; margin-top: -34px; }
  .hero-product-card img { width: 100%; max-width: 100%; margin-left: auto; margin-right: auto; transform: none; border-radius: 18px; }
  .proof-strip { grid-template-columns: 1fr 1fr; padding: 0 18px; }
  .mascot-story {
    grid-template-columns: 0.42fr 1fr;
    margin: 64px 18px 0;
    padding: 18px;
  }
  .mascot-mini-pose { display: none; }
  .workflow-section, .feature-section, .security-section { margin-top: 72px; padding: 0 18px; }
  .section-heading { display: block; }
  .workflow-grid, .feature-grid { grid-template-columns: 1fr; }
  .green-showcase { grid-template-columns: 1fr; margin-top: 72px; padding: 28px 18px; border-radius: 0; }
  .security-panel { grid-template-columns: 1fr; padding: 28px 18px; }
  .security-list { grid-template-columns: 1fr; }
  .final-cta { margin: 72px auto; padding: 0 18px; }
  .admin-page { display: block; }
  .admin-sidebar { position: static; width: 100%; height: auto; }
  .admin-main { padding: 18px; margin-left: 0; }
  .admin-stat-grid, .admin-insight-grid, .admin-layout, .admin-viz-grid, .admin-viz-grid-secondary { grid-template-columns: 1fr; }
  .admin-dashboard-head, .model-settings-head { align-items: flex-start; flex-direction: column; }
  .analytics-page-head { align-items: flex-start; flex-direction: column; }
  .analytics-kpi-grid, .analytics-grid-main, .analytics-grid-three, .analytics-grid-two { grid-template-columns: 1fr; }
  .operation-toggle-grid, .operation-number-grid { grid-template-columns: 1fr; }
  .admin-dashboard-health { width: 100%; min-width: 0; }
  .admin-dashboard-grid { display: grid; grid-template-columns: 1fr; grid-template-areas: "trend" "health" "actions"; }
  .dashboard-quick-actions, .model-settings-grid { grid-template-columns: 1fr; }
  .model-security-note { align-self: flex-start; }
  .model-config-panel { min-height: 0; }
  .admin-task-item { align-items: flex-start; flex-direction: column; }
  .admin-task-item .btn { width: 100%; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .auth-modal { grid-template-columns: 1fr; max-height: 94vh; overflow: hidden; }
  .auth-side { position: relative; min-height: 210px; padding: 24px; }
  .auth-brand-mark { margin-bottom: 10px; }
  .auth-mascot {
    position: absolute; right: 20px; top: 20px;
    width: 150px; opacity: 0.78;
  }
  .auth-side h2 { font-size: 1.35rem; }
  .auth-form-pane { padding: 28px 22px 24px; max-height: calc(94vh - 210px); }
  .puzzle-captcha-board { aspect-ratio: 2 / 1; }
}

@media (max-width: 480px) {
  .role-basics-grid { grid-template-columns: 1fr; }
  html { scroll-padding-top: 124px; }
  .marketing-page { padding-top: 112px; }
  .hero-banner { font-size: 1.8rem; }
  .feat-highlight-text h2 { font-size: 1.6rem; }
  .chat-item { padding: 10px 8px; }
  .landing-nav { padding: 14px 16px; }
  .landing-nav-actions { width: 100%; justify-content: flex-start; gap: 6px; }
  .landing-logo { font-size: 1.05rem; }
  .landing-nav-actions .btn-sm { padding: 6px 10px; font-size: 0.76rem; }
  .hero-banner { font-size: 1.72rem; max-width: 100%; }
  .hero-banner .highlight { display: inline; word-break: break-word; }
  .hero-tagline { max-width: 320px; margin-left: auto; margin-right: auto; font-size: 0.9rem; }
  .hero { padding: 32px 16px 0; }
  .hero-screenshot { padding: 0; overflow: hidden; }
  .product-console { border-radius: 14px; }
  .console-panel { min-height: auto; }
  .chat-panel { overflow: hidden; }
  .mini-chat.out { margin-left: 0; max-width: 100%; }
  .flow-strip { grid-template-columns: 1fr; }
  .role-detail { padding: 16px; border-radius: 14px; }
  .role-card { min-height: 188px; }
  .role-detail-actions .btn-sm { flex: 1; }
  .marketing-page .landing-nav { padding: 12px 14px; }
  .marketing-page .landing-nav-actions { justify-content: flex-start; }
  .auth-modal-overlay { padding: 10px; align-items: flex-start; overflow-y: auto; }
  .auth-side { display: none; }
  .auth-modal { max-height: none; overflow: visible; }
  .auth-form-pane { padding: 30px 18px 20px; max-height: none; overflow: visible; }
  .auth-close { right: 10px; top: 10px; }
  .auth-progress { flex-wrap: wrap; }
  .home-hero { padding-top: 38px; text-align: left; }
  .hero-title {
    font-size: 2.24rem;
    line-height: 1.12;
    max-width: 330px;
    margin-left: 0;
    margin-right: 0;
    overflow-wrap: anywhere;
    word-break: break-all;
    text-wrap: auto;
  }
  .hero-actions { gap: 10px; }
  .hero-actions .btn-xl {
    max-width: 320px;
  }
  .hero-subtitle {
    max-width: 300px;
    font-size: 0.92rem;
    margin-left: 0;
    margin-right: 0;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  .hero-actions { justify-content: flex-start; }
  .mascot-stage { min-height: 520px; border-radius: 24px; }
  .mascot-main,
  .mascot-main-new { width: min(300px, 84%); right: -4%; bottom: 126px; }
  .mascot-chat-bubble { font-size: 0.78rem; max-width: 160px; padding: 9px 11px; }
  .bubble-one { left: 6%; top: 12%; }
  .bubble-two { right: 5%; top: 14%; }
  .mascot-orbit {
    grid-template-columns: 66px 1fr;
    min-width: 196px;
    padding: 9px 11px 9px 8px;
  }
  .mascot-orbit span { font-size: 0.76rem; }
  .orbit-memory { left: 5%; bottom: 96px; }
  .orbit-sticker { right: 4%; bottom: 18px; }
  .orbit-hug { width: 132px; left: 5%; top: 35%; padding: 8px; }
  .orbit-hug img { width: 96px; margin-top: -18px; }
  .orbit-hug p { font-size: 0.68rem; }
  .hero-product-card { margin-top: -18px; }
  .mascot-story {
    grid-template-columns: 1fr;
    margin: 44px 18px 0;
    padding: 18px;
    text-align: left;
  }
  .mascot-story-art { min-height: 150px; justify-content: flex-start; }
  .mascot-story-art img { width: 170px; }
  .mascot-story-copy h2 { font-size: 1.55rem; }
  .btn-xl { width: 100%; }
  .proof-strip { grid-template-columns: 1fr; margin-top: 34px; }
  .proof-item { min-height: 96px; }
  .workflow-card, .feature-card { padding: 24px 20px; min-height: auto; }
  .feature-card:has(.feature-mascot) { padding-right: 100px; }
  .feature-mascot { width: 92px; right: -10px; top: -8px; opacity: 0.58; }
  .persona-board { padding: 14px; }
  .persona-row { align-items: flex-start; }
  .persona-row button { padding: 7px 10px; }
  .section-heading h2, .green-copy h2, .final-cta h2 { font-size: 2rem; }
}
