/*!
 * VietAPI portal — glass dark theme
 *
 * Copyright (C) 2025 QuantumNous
 * Built on new-api (https://github.com/QuantumNous/new-api), AGPL-3.0-or-later.
 * For commercial licensing: support@quantumnous.com
 */

/* ===== Notification center ===== */
.notification-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  padding: 0 6px; margin-left: 6px; border-radius: 999px; background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 800; box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.notification-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.notification-summary-bar {
  display: flex; gap: 10px; margin: 0 0 14px; flex-wrap: wrap;
}
.notification-summary-bar > div, .notification-head-stat {
  display: flex; align-items: baseline; gap: 7px; padding: 9px 13px; border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 13px; background: rgba(15, 23, 42, .38);
}
.notification-summary-bar b, .notification-head-stat b { color: var(--brand-soft); font-size: 19px; }
.notification-summary-bar span, .notification-head-stat span { color: var(--fg-muted); font-size: 12px; }
.transaction-filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px;
}
.transaction-filter-bar label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); }
.transaction-filter-bar input[type="date"] {
  padding: 7px 10px; border: 1px solid rgba(148,163,184,.18); border-radius: 10px;
  background: rgba(15,23,42,.46); color: var(--fg); font: inherit; font-size: 13px;
}
.transaction-row { cursor: default; }
.notification-master-detail {
  display: grid; grid-template-columns: minmax(330px, .8fr) minmax(0, 1.2fr); gap: 16px; align-items: stretch;
}
.notification-inbox-panel, .notification-content-pane {
  overflow: hidden; border: 1px solid rgba(148, 163, 184, .18); border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .66), rgba(15, 23, 42, .38));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.notification-list-head {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.notification-list-head b { font-size: 13px; color: var(--fg); }
.notification-list-head span { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .08em; }
.notification-inbox-list { display: grid; max-height: 600px; overflow-y: auto; }
.notification-inbox-item {
  position: relative; display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 11px; width: 100%; padding: 15px 16px;
  border: 0; border-bottom: 1px solid rgba(148, 163, 184, .1); background: transparent; color: inherit;
  text-align: left; cursor: pointer; transition: background .16s ease, box-shadow .16s ease;
}
.notification-inbox-item:hover { background: rgba(91, 221, 157, .055); }
.notification-inbox-item.selected { background: rgba(74, 222, 128, .09); box-shadow: inset 3px 0 var(--brand-soft); }
.notification-inbox-item:focus-visible, .notification-token:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: -2px; }
.notification-unread-dot { width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: transparent; }
.notification-inbox-item.unread .notification-unread-dot { background: #fb7185; box-shadow: 0 0 0 4px rgba(251,113,133,.1); }
.notification-inbox-copy { display: grid; gap: 7px; min-width: 0; }
.notification-inbox-copy strong { overflow: hidden; color: var(--fg); font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.notification-inbox-item.unread strong { font-weight: 800; }
.notification-inbox-meta, .notification-card-top, .notification-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.notification-excerpt {
  display: -webkit-box; overflow: hidden; color: var(--fg-muted); font-size: 12px; line-height: 1.45;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.notification-datetime { display: grid; justify-items: end; flex: 0 0 auto; line-height: 1.15; }
.notification-datetime b { color: var(--fg-soft); font-size: 11px; font-weight: 650; }
.notification-datetime small { margin-top: 3px; color: var(--fg-muted); font-size: 10px; }
.notification-kind, .notification-read-label, .notification-archived-label {
  display: inline-flex; align-items: center; width: max-content; padding: 4px 8px; border: 1px solid rgba(96,165,250,.22);
  border-radius: 999px; background: rgba(59,130,246,.12); color: #93c5fd; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
}
.notification-kind.kind-maintenance { border-color: rgba(167,139,250,.28); background: rgba(139,92,246,.14); color: #c4b5fd; }
.notification-kind.kind-model { border-color: rgba(52,211,153,.27); background: rgba(16,185,129,.13); color: #6ee7b7; }
.notification-kind.kind-billing, .notification-kind.kind-quota { border-color: rgba(250,204,21,.27); background: rgba(234,179,8,.12); color: #fde047; }
.notification-kind.kind-warning, .notification-kind.kind-expiry { border-color: rgba(251,146,60,.28); background: rgba(249,115,22,.13); color: #fdba74; }
.notification-kind.kind-urgent { border-color: rgba(251,113,133,.3); background: rgba(244,63,94,.14); color: #fda4af; }
.notification-content-pane { min-height: 360px; padding: 26px; }
.notification-content-pane h3 { margin: 20px 0 14px; color: var(--fg); font-size: clamp(22px, 3vw, 30px); line-height: 1.16; letter-spacing: -.025em; }
.notification-detail-head > div { display: flex; flex-wrap: wrap; gap: 7px; }
.notification-read-label { border-color: rgba(34,197,94,.22); background: rgba(34,197,94,.1); color: #86efac; }
.notification-read-label.unread { border-color: rgba(251,113,133,.25); background: rgba(244,63,94,.1); color: #fda4af; }
.notification-detail-time { color: var(--fg-muted); font-size: 12px; white-space: nowrap; }
.notification-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg-soft); font-size: 15px; line-height: 1.85; }
.notification-detail-empty { display: grid; place-items: center; min-height: 300px; text-align: center; }
.notification-detail-empty h3 { margin: 8px 0 4px; font-size: 20px; }
.notification-detail-empty p { margin: 0; color: var(--fg-muted); }
.notification-empty-icon { margin-bottom: 12px; font-size: 34px; filter: grayscale(.2); }
.notification-state { display: grid; place-items: center; gap: 8px; min-height: 150px; padding: 24px; color: var(--fg-muted); text-align: center; }
.notification-state > span { font-size: 28px; }
.notification-state > b { color: var(--fg-soft); }
.notification-state > small { max-width: 360px; line-height: 1.5; }
.notification-error { color: #fda4af; }

.notification-admin-head { align-items: flex-end; }
.notification-admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr); gap: 16px; align-items: start; }
.notification-composer { display: grid; gap: 14px; }
.notification-step-head { display: flex; align-items: center; gap: 11px; margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(148,163,184,.13); }
.notification-step-head:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.notification-step-head > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(74,222,128,.13); color: var(--brand-soft); font-weight: 850; }
.notification-step-head h3, .notification-panel-title h3 { margin: 0; color: var(--fg); font-size: 15px; }
.notification-step-head p { margin: 2px 0 0; color: var(--fg-muted); font-size: 12px; }
.notification-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.notification-field { position: relative; display: grid; gap: 7px; color: var(--fg-soft); font-size: 12px; font-weight: 700; }
.notification-field input, .notification-field select, .notification-field textarea { width: 100%; }
.field-counter { position: absolute; top: 0; right: 2px; color: var(--fg-muted); font-size: 10px; font-weight: 500; }
.notification-target-box { padding: 13px; border: 1px solid rgba(96,165,250,.18); border-radius: 15px; background: rgba(59,130,246,.05); }
.notification-target-summary { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.notification-target-summary > span { padding: 3px 7px; border-radius: 999px; background: rgba(74,222,128,.12); color: #86efac; font-size: 11px; }
.text-btn { margin-left: auto; border: 0; background: transparent; color: var(--fg-muted); font: inherit; font-size: 11px; cursor: pointer; }
.text-btn:hover { color: #fda4af; }
.notification-search-status { padding: 9px 1px 5px; color: var(--fg-muted); font-size: 11px; }
.notification-token-results { display: grid; gap: 7px; max-height: 220px; overflow-y: auto; margin: 5px 0 10px; }
.notification-token { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 10px 11px; border: 1px solid rgba(148,163,184,.18); border-radius: 12px; background: rgba(15,23,42,.48); color: inherit; text-align: left; cursor: pointer; }
.notification-token b { overflow: hidden; color: var(--fg); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.notification-token small { grid-column: 1; color: var(--fg-muted); }
.notification-token > span { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--brand-soft); font-size: 11px; }
.notification-selected { display: grid; gap: 7px; }
.notification-selected > span { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid rgba(34,197,94,.18); border-radius: 11px; background: rgba(34,197,94,.07); }
.notification-selected > span > span { display: grid; gap: 2px; }
.notification-selected b { color: var(--fg); font-size: 11px; }
.notification-selected small { color: var(--fg-muted); font-size: 10px; }
.notification-selected button { border: 0; background: transparent; color: #fb7185; font-size: 18px; cursor: pointer; }
.notification-selected-empty { padding: 9px; color: var(--fg-muted); font-size: 11px; text-align: center; }
.notification-inline-error { padding: 10px 12px; border: 1px solid rgba(244,63,94,.22); border-radius: 12px; background: rgba(244,63,94,.09); color: #fda4af; font-size: 12px; }
.notification-send-button { display: grid; justify-items: center; gap: 2px; min-height: 50px; }
.notification-send-button small { color: rgba(5,25,15,.7); font-size: 10px; font-weight: 650; }
.notification-admin-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.notification-panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.notification-preview-card .notification-card { box-shadow: 0 14px 34px rgba(0,0,0,.2); }
.notification-history-card { min-height: 320px; }
.notification-list { display: grid; gap: 10px; max-height: 650px; overflow-y: auto; padding-right: 3px; }
.notification-card { position: relative; padding: 15px; border: 1px solid rgba(148,163,184,.18); border-radius: 15px; background: rgba(15,23,42,.46); }
.notification-card.unread { box-shadow: inset 3px 0 #fb7185; }
.notification-card.archived { opacity: .52; filter: saturate(.65); }
.notification-card h3 { margin: 12px 0 8px; color: var(--fg); font-size: 15px; line-height: 1.35; }
.notification-card p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--fg-soft); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.notification-card-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(148,163,184,.1); }
.notification-card-footer > div { display: grid; gap: 3px; }
.notification-card-footer span { color: var(--fg-soft); font-size: 11px; }
.notification-card-footer small { color: var(--fg-muted); font-size: 10px; }
.notification-archived-label { border-color: rgba(148,163,184,.2); background: rgba(148,163,184,.09); color: var(--fg-muted); }

@media (max-width: 1080px) {
  .notification-admin-layout { grid-template-columns: 1fr; }
  .notification-admin-side { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .notification-heading, .notification-admin-head { align-items: flex-start; flex-direction: column; }
  .notification-master-detail { grid-template-columns: 1fr; }
  .notification-inbox-list { max-height: 420px; }
  .notification-content-pane { min-height: 260px; padding: 20px; }
  .notification-admin-side { grid-template-columns: 1fr; }
  .notification-form-grid { grid-template-columns: 1fr; }
  .notification-detail-head, .notification-card-footer { align-items: flex-start; flex-direction: column; }
  .notification-detail-time { white-space: normal; }
}
@media (max-width: 520px) {
  .notification-summary-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .notification-inbox-meta { align-items: flex-start; }
  .notification-inbox-item { padding: 13px 12px; }
  .notification-content-pane h3 { font-size: 22px; }
}

.site-footer {
  margin: 32px 0 12px;
  padding: 16px 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--fg-soft);
  font-size: 12px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.footer-col h4 {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg-muted);
}
.footer-col-right { text-align: right; }
.footer-col-right .footer-links-grid { justify-content: flex-end; }
.footer-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.footer-links-grid a {
  color: var(--fg-soft);
  font-size: 12px;
  text-decoration: none;
  transition: color .15s;
}
.footer-links-grid a:hover { color: var(--brand-soft); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
}
/* Logo "Đã thông báo Bộ Công Thương" (online.gov.vn) — góc dưới cùng bên trái footer.
   Ảnh gốc 230x86; hiển thị cao 43px = đúng tỉ lệ 2x -> sắc nét 1:1 trên màn retina.
   Nền trắng bo góc vì logo gốc nền trong suốt, để trần lên footer tối sẽ mất tương phản. */
.footer-bct {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  background: #fff;
  padding: 5px 8px;
  border-radius: 8px;
  line-height: 0;
}
.footer-bct img { height: 43px; width: auto; display: block; }
.footer-info {
  font-size: 10.5px;
  color: var(--fg-muted);
}
@media (max-width: 560px) {
  .footer-top { flex-direction: column; gap: 12px; }
  .footer-bottom { flex-direction: column; align-items: center; gap: 8px; }
}

/* ------------------ Legal pages ------------------ */
.legal-page {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  padding: 34px 0 12px;
}
.legal-hero {
  margin: 22px 0 24px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(520px 220px at 15% 0%, rgba(52, 211, 153, 0.14), transparent 70%), rgba(255, 255, 255, 0.026);
}
.legal-back { display: inline-flex; min-height: 44px; align-items: center; color: var(--brand-soft); text-decoration: none; }
.legal-hero h1 { max-width: 880px; margin: 8px 0 14px; font-size: clamp(30px, 5vw, 50px); line-height: 1.12; overflow-wrap: anywhere; }
.legal-hero p { max-width: 820px; margin: 8px 0 0; color: var(--fg-soft); font-size: clamp(15px, 2vw, 17px); line-height: 1.75; }
.legal-version { font-size: 13px !important; color: var(--fg-muted) !important; }
.legal-document { max-width: 860px; margin-inline: auto; }
.legal-section {
  margin: 0 0 16px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.legal-section h2, .legal-section h3 { margin: 0 0 14px; line-height: 1.35; scroll-margin-top: 24px; }
.legal-section h2 { font-size: clamp(21px, 3vw, 27px); }
.legal-section h3 { font-size: clamp(17px, 2.5vw, 20px); color: var(--brand-soft); }
.legal-section p, .legal-section li { color: var(--fg-soft); font-size: 15.5px; line-height: 1.78; overflow-wrap: anywhere; }
.legal-section p { margin: 0 0 12px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { color: var(--brand-soft); text-underline-offset: 3px; }
.legal-list { margin: 0; padding-left: 1.35rem; }
.legal-list li { margin: 8px 0; padding-left: 4px; }

/* Production footer: three stable columns, then progressive stacking. */
.site-footer { margin-top: 40px; padding: clamp(20px, 3vw, 30px); }
.footer-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.footer-col { min-width: 0; }
.footer-col address { color: var(--fg-soft); font-style: normal; line-height: 1.65; overflow-wrap: anywhere; }
.footer-links-grid { display: grid; gap: 8px; align-content: start; }
.footer-links-grid a { display: inline-flex; min-height: 44px; align-items: center; overflow-wrap: anywhere; }

/* Consent, validation, keyboard and touch states shared by checkout/forms. */
.consent, .consent-row, .policy-consent { display: flex; gap: 10px; align-items: flex-start; color: var(--fg-soft); line-height: 1.55; }
.consent input, .consent-row input, .policy-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); }
.field-error, .form-error, [role="alert"] { color: #fca5a5; font-size: 13px; line-height: 1.5; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 3px; }
:where(button, .button, input[type="submit"], input[type="button"]) { min-height: 44px; touch-action: manipulation; }

@media (max-width: 900px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .legal-page { width: min(100% - 24px, 860px); padding-top: 14px; }
  .legal-hero { margin-top: 10px; }
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .footer-col-right, .footer-col-right .footer-links-grid { text-align: left; justify-content: initial; }
}
@media (max-width: 480px) {
  .legal-page { width: min(100% - 16px, 860px); }
  .legal-hero, .legal-section, .site-footer { border-radius: 14px; }
}

/* ============ Portal theme ============ */
:root {
  /* Surfaces */
  --bg-deep: #04090a;
  --bg-base: #060f10;
  --bg-elev: #0a1819;
  --bg-card: rgba(17, 32, 32, 0.58);
  --bg-card-hover: rgba(24, 44, 42, 0.72);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-input-hover: rgba(255, 255, 255, 0.06);
  --bg-modal: rgba(8, 18, 18, 0.92);

  /* Text */
  --fg: #e6f4ec;
  --fg-soft: #b8cdbe;
  --fg-muted: #7d8f86;
  --fg-dim: #5a6b62;

  /* Brand */
  --brand: #34d399;
  --brand-2: #22c5a3;
  --brand-soft: #6ee7b7;
  --brand-glow: rgba(52, 211, 153, 0.22);
  --brand-ring: rgba(52, 211, 153, 0.42);
  --gold: #d4a55b;
  --gold-soft: #f6cf7a;
  --gold-glow: rgba(212, 165, 91, 0.22);

  /* States */
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;

  /* Lines */
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 34px 90px rgba(0, 0, 0, 0.55);
  --glow-brand: 0 0 0 1px var(--brand-ring), 0 18px 60px var(--brand-glow);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  /* Fonts */
  --font-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }
*::selection { background: var(--brand-glow); color: var(--fg); }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg);
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(52, 211, 153, 0.10), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(212, 165, 91, 0.06), transparent 55%),
    radial-gradient(700px 700px at 50% 120%, rgba(34, 197, 163, 0.05), transparent 70%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 50%, var(--bg-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv02", "cv11";
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000, transparent 80%);
  z-index: 0;
}

a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--brand-soft); }
[hidden] { display: none !important; }

h1, h2, h3 { margin: 0 0 .55em; letter-spacing: -.025em; color: var(--fg); }
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -.045em; font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 36px); line-height: 1.15; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 650; }
p { margin: 0 0 .8em; color: var(--fg-soft); }
small { color: var(--fg-muted); }
code, pre { font-family: var(--font-mono); font-size: 12.5px; }
code { color: var(--brand-soft); }
pre {
  margin: 8px 0 0;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg-soft);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.5;
}

/* ------------------ Layout ------------------ */

.site-shell {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  z-index: 1;
}
.compact-shell { width: min(1140px, calc(100% - 28px)); }

main { display: block; }
.page-main { padding: 28px 0 64px; }
.compact-page { padding-top: 18px; }

/* ------------------ Nav ------------------ */

.nav-wrap {
  position: sticky; top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  height: 64px;
  margin-top: 14px;
  padding: 0 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 18, 18, 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px var(--brand-glow);
}
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-size: 15px; color: var(--fg); letter-spacing: -.01em; }
.brand-copy small {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--fg-muted); margin-top: 2px;
}

.nav-links {
  display: flex; align-items: center; gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.nav-links a {
  padding: 8px 14px;
  font-size: 13px; font-weight: 550;
  color: var(--fg-soft);
  border-radius: 999px;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.04); }
.nav-links a[data-active] {
  color: #062018;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-2));
  box-shadow: 0 6px 18px var(--brand-glow);
}

/* ------------------ Buttons ------------------ */

.button, .solid-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
  text-decoration: none;
}
.button:active, .solid-link:active { transform: translateY(1px); }

.button-primary, .solid-link {
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-2));
  color: #052018;
  box-shadow: 0 10px 28px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.button-primary:hover, .solid-link:hover { color: #052018; box-shadow: 0 14px 36px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

.button-soft, .ghost-action {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border-color: var(--line-strong);
}
.button-soft:hover, .ghost-action:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--brand-ring); color: var(--fg); }

.button-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #20180a;
  box-shadow: 0 10px 28px var(--gold-glow);
}

.mini-btn {
  height: 30px; padding: 0 12px;
  border-radius: 9px;
  font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg-soft);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .18s ease;
}
.mini-btn:hover { background: rgba(52, 211, 153, 0.12); border-color: var(--brand-ring); color: var(--brand-soft); }
.mini-btn:disabled { opacity: .4; cursor: not-allowed; }
.mini-btn.danger { background: rgba(248, 113, 113, 0.10); border-color: rgba(248, 113, 113, 0.32); color: var(--bad); }
.mini-btn.danger:hover { background: rgba(248, 113, 113, 0.18); }
.mini-btn.is-on { background: rgba(52, 211, 153, 0.12); border-color: var(--brand-ring); color: var(--brand-soft); }
.log-updated { align-self: center; color: var(--fg-muted); font-size: 11px; }

/* ------------------ Forms ------------------ */

.login-form, .form-card { display: grid; gap: 12px; }
.login-form label, .form-card label {
  display: grid; gap: 6px;
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--fg-muted);
}
.login-form input, .form-card input, .form-card select,
.admin-top-actions input {
  width: 100%; height: 42px;
  padding: 0 14px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--fg);
  font: inherit; font-size: 14px;
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.login-form input::placeholder, .form-card input::placeholder, .admin-top-actions input::placeholder {
  color: var(--fg-dim);
}
.login-form input:hover, .form-card input:hover, .form-card select:hover, .admin-top-actions input:hover {
  background: var(--bg-input-hover);
}
.login-form input:focus, .form-card input:focus, .form-card select:focus, .admin-top-actions input:focus {
  border-color: var(--brand-ring);
  box-shadow: 0 0 0 4px var(--brand-glow);
  background: rgba(52, 211, 153, 0.04);
}
.form-card select option { background: var(--bg-elev); color: var(--fg); }

.form-hint { font-size: 12px; color: var(--fg-muted); }
.form-hint.error { color: var(--bad); }
.form-hint.ok { color: var(--ok); }

.bump-row { display: grid; gap: 6px; padding: 8px 10px; border: 1px dashed rgba(52, 211, 153, 0.30); border-radius: 10px; background: rgba(52, 211, 153, 0.04); }
.bump-row small { color: var(--fg-muted); font-size: 11.5px; }
.bump-btn-grid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bump-btn-grid .mini-btn { padding: 4px 10px; }
.bump-btn-grid input { flex: 1; min-width: 180px; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.10); background: rgba(15, 23, 42, 0.40); color: var(--fg); font-size: 12px; }

/* ------------------ Eyebrows ------------------ */

.eyebrow, .section-kicker, .admin-topbar span, .admin-section-head > div > span, .user-topbar span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--gold);
  margin-bottom: 10px;
}
.eyebrow::before, .section-kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 12px var(--gold-soft);
}

/* ------------------ Hero ------------------ */

.hero-section, .section-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 36px;
  align-items: center;
  padding: 56px 0 36px;
}
.hero-copy h1 { background: linear-gradient(180deg, #ffffff 0%, #b7d6c5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p, .page-hero p, .login-panel p { color: var(--fg-soft); max-width: 620px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.customer-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; color: var(--fg-muted); font-size: 12.5px; }
.customer-meta span { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.customer-meta b { color: var(--fg-soft); }

/* ------------------ Cards (shared) ------------------ */

.feature-card, .price-card, .doc-card, .summary-card, .table-card, .admin-card,
.hero-card, .key-detail-panel, .notice-bar, .deadline-card, .premium-panel, .test-result {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow);
}

.feature-card, .price-card, .doc-card { padding: 22px; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.feature-card:hover, .doc-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature-card b, .doc-card b { display: block; font-size: 14.5px; font-weight: 650; color: var(--fg); margin-bottom: 6px; }
.feature-card p, .doc-card p { color: var(--fg-soft); margin: 0; font-size: 13.5px; }
.doc-card code { display: inline-block; padding: 3px 8px; border-radius: 6px; background: rgba(52, 211, 153, 0.08); border: 1px solid var(--line); color: var(--brand-soft); }

.hero-card { padding: 22px; display: grid; gap: 14px; }
.quota-ring { display: flex; align-items: center; gap: 18px; }
.quota-ring svg { width: 110px; height: 110px; transform: rotate(-90deg); filter: drop-shadow(0 6px 22px var(--brand-glow)); }
.quota-ring circle { fill: none; stroke: rgba(255, 255, 255, 0.06); stroke-width: 11; stroke-linecap: round; }
.quota-ring .progress { stroke: url(#brand-grad); stroke-dasharray: 226 302; }
.quota-ring strong { font-size: 30px; font-weight: 700; color: var(--fg); }
.quota-ring span { color: var(--fg-muted); font-size: 12px; }
.key-row, .mini-log div {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
}
.key-row span, .mini-log span { color: var(--fg-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.key-row b, .mini-log b { color: var(--fg); font-weight: 600; font-family: var(--font-mono); font-size: 12.5px; }
.mini-log small { color: var(--fg-muted); font-size: 11px; }

/* ------------------ Section heads ------------------ */

.content-section { padding: 40px 0; }
.compact-section { padding-top: 16px; }
.no-top { padding-top: 0; }
.page-hero { padding: 28px 0 22px; }
.section-heading, .compact-heading { margin-bottom: 22px; max-width: 720px; }
.section-heading h2, .compact-heading h2 { margin-bottom: 8px; }
.section-heading p, .compact-heading p { color: var(--fg-soft); }
.compact-heading code { color: var(--brand-soft); }

/* ------------------ Grids ------------------ */

.feature-grid, .pricing-grid, .docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ------------------ Pricing ------------------ */

.price-card { display: grid; gap: 8px; }
.plan-name {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.plan-name::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.price-card h3 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0; color: var(--fg); }
.price-card > p { color: var(--fg-soft); font-size: 14px; margin: 0; }
.price-card small { display: block; color: var(--fg-muted); margin: 8px 0 12px; font-size: 12.5px; }
.price-card ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.price-card ul li { font-size: 13px; color: var(--fg-soft); padding-left: 18px; position: relative; }
.price-card ul li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 10px var(--brand-glow);
}
.price-card.featured {
  border-color: var(--brand-ring);
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.10), var(--bg-card) 55%);
  box-shadow: 0 22px 60px var(--brand-glow);
  position: relative;
}
.price-card.featured::before {
  content: "Phổ biến"; position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-2));
  color: #052018; text-transform: uppercase; letter-spacing: .12em;
}

/* ------------------ Notice / migration / deadline ------------------ */

.notice-bar, .deadline-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 18px;
  margin: 16px 0;
}
.notice-bar strong, .deadline-card b {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--fg); font-weight: 650;
}
.notice-bar strong::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 12px var(--brand-soft);
}
.notice-bar span, .deadline-card span { color: var(--fg-soft); font-size: 13px; flex: 1; min-width: 220px; }
.notice-bar a {
  margin-left: auto;
  padding: 8px 14px; border-radius: 10px;
  background: rgba(52, 211, 153, 0.10);
  color: var(--brand-soft); font-weight: 600;
  border: 1px solid var(--brand-ring);
  font-size: 13px;
}
.notice-bar a:hover { background: rgba(52, 211, 153, 0.18); color: var(--brand-soft); }

.migration-note {
  border-color: rgba(248, 113, 113, 0.28);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08), var(--bg-card));
}
.migration-note strong::before { background: var(--bad); box-shadow: 0 0 12px var(--bad); }

/* ------------------ Model cloud ------------------ */

.model-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.model-cloud span {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  font-weight: 550; font-size: 13px; color: var(--fg-soft);
  font-family: var(--font-mono);
  transition: all .18s ease;
}
.model-cloud span:hover { border-color: var(--brand-ring); color: var(--brand-soft); background: rgba(52, 211, 153, 0.06); }
.model-tag {
  font-style: normal; font-weight: 700; font-size: 10px; letter-spacing: .5px;
  margin-left: 6px; padding: 2px 6px; border-radius: 6px;
  background: rgba(245, 158, 11, 0.16); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35);
  vertical-align: middle;
}
.model-foot-note { margin-top: 12px; font-size: 12.5px; color: var(--fg-soft); line-height: 1.6; }
.model-foot-note code { font-family: var(--font-mono); font-size: 12px; }

/* ------------------ Login ------------------ */

.login-page { display: grid; gap: 16px; }
.auth-only { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.login-panel {
  display: grid; gap: 18px;
  padding: 28px;
}
.login-panel h1 { font-size: clamp(26px, 3.4vw, 38px); }

/* ------------------ Customer summary ------------------ */

.customer-summary, .admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.admin-stats { grid-template-columns: repeat(4, 1fr); }
.summary-card { padding: 18px; display: grid; gap: 4px; }
.summary-card span { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--fg-muted); }
.summary-card b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--fg); }
.summary-card small { color: var(--fg-muted); font-size: 12px; }
.hero-stat { background: linear-gradient(160deg, rgba(52, 211, 153, 0.10), var(--bg-card) 55%); border-color: var(--brand-ring); }
.hero-stat b { background: linear-gradient(180deg, #fff, var(--brand-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* RPM / TPM throughput chart (admin Thống kê) */
.throughput-chart { display: flex; align-items: flex-end; gap: 2px; height: 72px; padding: 8px 4px 4px; margin: 10px 0 4px; border-radius: 8px; background: rgba(125,125,125,0.07); }
.throughput-bar { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, #6ea8fe, #3b82f6); transition: opacity .12s ease; }
.throughput-bar:hover { opacity: .75; }
.throughput-chart--tokens .throughput-bar { background: linear-gradient(180deg, #f0abfc, #d946ef); }
#statsThroughputSummary .summary-card b { font-size: 20px; }

/* ------------------ Key detail panel ------------------ */

.key-detail-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; }
.key-detail-panel code, td code { font-family: var(--font-mono); font-size: 12.5px; word-break: break-all; color: var(--brand-soft); }
.key-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tiny-toggle { height: 26px; padding: 0 9px; margin-top: 8px; font-size: 11px; align-self: flex-start; }

/* ------------------ Tables ------------------ */

.table-card { overflow: auto; padding: 4px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13px; }
th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-muted); font-weight: 600; padding-top: 14px; padding-bottom: 14px; background: rgba(255, 255, 255, 0.02); position: sticky; top: 0; }
td { color: var(--fg-soft); }
td b { color: var(--fg); }
td small { color: var(--fg-muted); }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: rgba(52, 211, 153, 0.04); }
tbody tr:last-child td { border-bottom: none; }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 4px 10px;
  font-size: 11.5px; font-weight: 600;
  background: rgba(248, 113, 113, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: var(--bad);
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.ok { background: rgba(52, 211, 153, 0.10); border-color: rgba(52, 211, 153, 0.30); color: var(--ok); }
.status-pill.warn { background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.30); color: var(--warn); }

.model-rate { display: inline-flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.model-rate b { font-size: 13px; }
.model-rate small { color: var(--fg-muted); font-size: 11.5px; }

/* ------------------ Pager ------------------ */

.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; padding: 6px; }
.pager button {
  height: 32px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}
.pager button:hover:not(:disabled) { border-color: var(--brand-ring); color: var(--brand-soft); background: rgba(52, 211, 153, 0.08); }
.pager button:disabled { opacity: .35; cursor: not-allowed; }
.pager span { color: var(--fg-muted); font-size: 12.5px; }

/* ------------------ Admin layout ------------------ */

.admin-body { background: var(--bg-deep); }
.admin-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }
.admin-sidebar {
  position: sticky; top: 0;
  height: 100vh; padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(8, 18, 18, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.admin-brand { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; margin-bottom: 24px; }
.admin-brand > span {
  grid-row: 1 / 3;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-2));
  color: #052018; font-weight: 800; font-size: 18px;
  box-shadow: 0 8px 24px var(--brand-glow);
}
.admin-brand > .brand-logo { grid-row: 1 / 3; width: 40px; height: 40px; object-fit: contain; }
.admin-brand b { font-size: 16px; color: var(--fg); }
.admin-brand small { font-size: 10px; color: var(--fg-muted); letter-spacing: .14em; text-transform: uppercase; }
.admin-menu { display: grid; gap: 4px; }
.admin-menu button {
  text-align: left; padding: 10px 12px;
  background: transparent; border: 1px solid transparent;
  border-radius: 10px;
  color: var(--fg-muted); font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer;
  transition: all .18s ease;
}
.admin-menu button:hover { color: var(--fg); background: rgba(255, 255, 255, 0.04); }
.admin-menu button.active {
  color: var(--brand-soft);
  background: rgba(52, 211, 153, 0.08);
  border-color: var(--brand-ring);
  box-shadow: 0 0 0 0 transparent;
}
.admin-side-note {
  position: absolute; left: 18px; right: 18px; bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px; color: var(--fg-muted);
}
.admin-side-note b { display: block; color: var(--fg); margin-bottom: 4px; font-size: 13px; }

.admin-main { padding: 24px 28px; min-width: 0; }
.admin-login-card { max-width: 720px; margin: 8vh auto; padding: 28px; }
.admin-login-card h1, .admin-topbar h1 { font-size: clamp(28px, 4vw, 42px); }
.admin-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.admin-top-actions { display: flex; gap: 8px; min-width: min(620px, 100%); }
.admin-top-actions input { flex: 1; min-width: 200px; }

.admin-tab { display: none; }
.admin-tab.active { display: block; animation: fadeIn .25s ease; }
.admin-split, .admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-form-grid.three { grid-template-columns: repeat(3, 1fr); }
.admin-card { padding: 20px; }
.admin-card h3 { margin-bottom: 12px; }

.steps-list, .policy-list { display: grid; gap: 8px; }
.steps-list span, .policy-list span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--fg-soft); font-size: 12.5px;
}
.policy-list b { font-size: 13px; color: var(--fg); padding-top: 8px; }

.admin-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  margin: 18px 0 14px;
}
.admin-section-head p { margin: 4px 0 0; color: var(--fg-muted); font-size: 13px; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }

.admin-table table { min-width: 1020px; }

/* ------------------ Dashboard (user) ------------------ */

.user-dashboard-body { background: var(--bg-deep); }
.user-console { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); position: relative; z-index: 1; }

.user-sidebar {
  position: sticky; top: 0;
  height: 100vh; padding: 20px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(52, 211, 153, 0.08), transparent),
    rgba(8, 18, 18, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.user-menu { display: grid; gap: 4px; margin: 22px 0; }
.user-menu button {
  text-align: left; padding: 11px 14px;
  background: transparent; border: 1px solid transparent;
  border-radius: 11px;
  color: var(--fg-muted); font: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer;
  transition: all .18s ease;
}
.user-menu button:hover { color: var(--fg); background: rgba(255, 255, 255, 0.04); }
.user-menu button.active {
  color: var(--brand-soft);
  background: rgba(52, 211, 153, 0.10);
  border-color: var(--brand-ring);
}

.user-main { padding: 26px 32px; max-width: 1340px; width: 100%; box-sizing: border-box; }
.user-topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 22px; }
.user-topbar h1 { margin: 4px 0 4px; font-size: clamp(26px, 3.5vw, 38px); }
.user-topbar p { margin: 0; color: var(--fg-muted); }

.premium-summary { grid-template-columns: 1.1fr 1.4fr 1fr; margin-bottom: 10px; }
.premium-meta { margin: 10px 0 20px; }

.user-tab { display: none; }
.user-tab.active { display: block; animation: fadeIn .25s ease; }
.overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.key-safe { margin-bottom: 14px; }

/* ------------------ Test result ------------------ */

.test-result {
  padding: 16px 18px;
  font-size: 13px;
  display: grid; gap: 8px;
}
.test-result b { color: var(--fg); font-size: 13.5px; }
.test-result.ok { border-color: rgba(52, 211, 153, 0.30); background: rgba(52, 211, 153, 0.06); }
.test-result.bad { border-color: rgba(248, 113, 113, 0.30); background: rgba(248, 113, 113, 0.06); }
.test-result pre { background: rgba(0, 0, 0, 0.35); }

/* ------------------ Modal ------------------ */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2, 6, 7, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 18px;
  animation: fadeIn .18s ease;
}
.modal-card.modal-card--narrow { width: min(440px, 100%); }
.modal-card {
  width: min(760px, 100%);
  background: var(--bg-modal);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: rise .22s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-head button {
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg-soft);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: all .18s ease;
}
.modal-head button:hover { background: rgba(255, 255, 255, 0.1); color: var(--fg); }

/* ------------------ Toast ------------------ */

#toastWrap {
  position: fixed; bottom: 24px; right: 24px;
  display: grid; gap: 10px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  min-width: 240px; max-width: 380px;
  padding: 12px 16px;
  background: var(--bg-modal);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--fg);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideIn .25s ease;
}
.toast.ok { border-color: rgba(52, 211, 153, 0.32); background: linear-gradient(135deg, rgba(52, 211, 153, 0.10), var(--bg-modal)); }
.toast.bad { border-color: rgba(248, 113, 113, 0.32); background: linear-gradient(135deg, rgba(248, 113, 113, 0.10), var(--bg-modal)); }
.toast.info { border-color: rgba(212, 165, 91, 0.32); background: linear-gradient(135deg, rgba(212, 165, 91, 0.08), var(--bg-modal)); }
.toast.leaving { animation: slideOut .25s ease forwards; }

/* ------------------ Animations ------------------ */

.reveal { animation: rise .45s ease both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes slideOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(20px); } }

/* ------------------ Responsive ------------------ */

@media (max-width: 960px) {
  .hero-section, .section-grid, .login-panel, .feature-grid, .pricing-grid, .docs-grid,
  .customer-summary, .admin-stats, .admin-split, .admin-form-grid, .admin-form-grid.three,
  .overview-grid, .auth-only, .premium-summary {
    grid-template-columns: 1fr;
  }
  .admin-layout, .user-console { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar, .user-sidebar { position: relative; height: auto; padding: 14px; }
  .admin-side-note { position: relative; left: auto; right: auto; bottom: auto; margin-top: 14px; }
  .admin-menu, .user-menu { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .admin-menu button, .user-menu button { text-align: center; padding: 8px 6px; font-size: 12px; }
  .admin-topbar, .admin-section-head, .user-topbar { flex-direction: column; align-items: stretch; }
  .admin-top-actions { flex-wrap: wrap; min-width: 0; }
  .admin-top-actions input { flex-basis: 100%; }
  .nav-wrap { flex-wrap: wrap; height: auto; padding: 8px 10px; gap: 8px; border-radius: 18px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav-links a { white-space: nowrap; }
}

@media (max-width: 600px) {
  body { font-size: 13.5px; }
  .site-shell { width: min(100% - 18px, 1200px); }
  .hero-section, .section-grid { padding: 28px 0 18px; }
  .login-panel, .admin-card, .summary-card { padding: 16px; }
  .admin-main, .user-main { padding: 14px; }
  .admin-menu, .user-menu { grid-template-columns: repeat(2, 1fr); }
  .key-detail-panel { flex-direction: column; align-items: flex-start; }
  .key-actions { width: 100%; justify-content: flex-start; }
  h1 { font-size: 30px; }
  #toastWrap { right: 14px; bottom: 14px; left: 14px; }
  .toast { max-width: 100%; }
}

/* Customer dashboard charts — compact bar-only style, mobile-friendly. */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.chart-card {
  background: var(--card-bg, #fff);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}
.chart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.chart-head b { font-size: 12px; font-weight: 600; color: #0f172a; }
.chart-head small { font-size: 11px; color: #64748b; }

/* 24h bar chart */
.chart-body { min-height: 64px; }
.chart-bar-row { display: flex; align-items: flex-end; gap: 2px; height: 64px; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; position: relative; }
.chart-bar { width: 100%; min-height: 2px; border-radius: 2px 2px 0 0; background: #22c5a3; transition: opacity .15s; }
.chart-bar.zero { background: #e2e8f0; }
.chart-bar-col:hover .chart-bar { opacity: .7; }
.chart-bar-label { font-size: 9px; color: #94a3b8; line-height: 1; white-space: nowrap; }
.chart-bar-col[data-count]:hover::after { content: attr(data-count) " req"; position: absolute; transform: translate(-50%, -100%); left: 50%; top: 0; background: #0f172a; color: #fff; padding: 2px 6px; border-radius: 3px; font-size: 10px; white-space: nowrap; pointer-events: none; }

/* Top model horizontal bar list */
.model-bars { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.model-bars li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; align-items: center; font-size: 11px; }
.model-bars .mb-label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.model-bars .mb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0f172a; font-weight: 500; }
.model-bars .mb-track { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: #e2e8f0; overflow: hidden; }
.model-bars .mb-fill { height: 100%; background: #22c5a3; border-radius: 3px; }
.model-bars .mb-count { color: #64748b; font-variant-numeric: tabular-nums; font-size: 10px; }
.chart-empty { display: flex; align-items: center; justify-content: center; height: 64px; color: #94a3b8; font-size: 12px; }

@media (max-width: 720px) {
  .chart-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
  .chart-card { padding: 10px 12px; }
  .chart-bar-row, .chart-body, .chart-empty { height: 56px; min-height: 56px; }
}

/* ===== Event banner (key free) ===== */
.event-banner {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--brand-ring);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.10), rgba(212, 165, 91, 0.07));
  box-shadow: 0 10px 36px rgba(52, 211, 153, 0.12);
}
.event-banner .event-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.event-banner .event-head b { font-size: 16px; color: var(--fg); }
.event-banner .event-countdown {
  font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--warn);
  letter-spacing: .02em;
}
.event-banner .event-terms { margin: 8px 0 12px; color: var(--fg-soft); font-size: 13.5px; }
.event-banner .event-terms b { color: var(--brand-soft); }
.event-claim-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-2));
  color: #0c1410; border: 0;
}
.event-claim-btn:hover { color: #0c1410; filter: brightness(1.05); }

/* ===== Model groups (collapsible) ===== */
.model-group {
  margin-bottom: 14px; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}
.model-group > summary {
  cursor: pointer; padding: 13px 16px; font-weight: 600; font-size: 15px;
  color: var(--fg); list-style: none; user-select: none;
  display: flex; align-items: center; gap: 8px;
}
.model-group > summary::-webkit-details-marker { display: none; }
.model-group > summary::before {
  content: '▸'; color: var(--brand-soft); transition: transform .15s ease;
}
.model-group[open] > summary::before { transform: rotate(90deg); }
.model-group > summary small { color: var(--fg-muted); font-weight: 500; }
.model-group .table-card { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }

/* ===== Config generator ===== */
.config-hero-panel {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, .95fr) 310px;
  gap: 16px; align-items: stretch; padding: 18px; margin-bottom: 14px;
  border: 1px solid rgba(126, 255, 182, .18); border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(92, 255, 176, .24), transparent 34%),
    radial-gradient(circle at 100% 20%, rgba(66, 184, 255, .18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .026));
  box-shadow: 0 26px 80px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.config-hero-panel::after {
  content: ''; position: absolute; inset: auto -80px -110px auto; width: 260px; height: 260px;
  background: conic-gradient(from 130deg, rgba(112, 255, 186, .36), rgba(73, 145, 255, .18), transparent 70%);
  filter: blur(18px); opacity: .7; pointer-events: none;
}
.config-hero-copy { position: relative; z-index: 1; }
.config-kicker { margin-bottom: 10px; }
.config-hero-copy h2 {
  margin: 0 0 8px; max-width: 640px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1;
  letter-spacing: -.045em; background: linear-gradient(180deg, #fff 0%, #bfffdc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.config-hero-copy p { margin: 0; max-width: 660px; color: var(--fg-soft); font-size: 14px; line-height: 1.55; }
.config-hero-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.config-hero-badges span {
  padding: 6px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .18); color: var(--fg); font-size: 12px; font-weight: 650;
}
.config-endpoints-card {
  position: relative; z-index: 1; display: grid; align-content: center; gap: 8px; min-width: 0;
  padding: 14px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(3, 11, 8, .42); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.config-endpoints-card small { color: var(--brand-soft); text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.config-endpoints-card code {
  display: block; padding: 10px 11px; border-radius: 13px; border: 1px solid rgba(120, 255, 185, .18);
  background: rgba(0, 0, 0, .35); color: #d9ffe8; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; overflow-wrap: anywhere;
}
.config-endpoints-card span { color: var(--fg-muted); font-size: 12px; }
.config-workbench {
  padding: 12px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018));
}
.config-form { display: grid; grid-template-columns: 1.05fr 1.15fr minmax(280px, 1.35fr); gap: 10px; margin-bottom: 10px; }
.config-form label { display: flex; flex-direction: column; gap: 7px; }
.config-form label > span { font-size: 12px; color: var(--brand-soft); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.config-field-card {
  padding: 10px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .105);
  background: rgba(0, 0, 0, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.config-form select, .config-form input {
  width: 100%; min-width: 0; padding: 10px 11px; border-radius: 13px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.065); color: var(--fg); font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.config-form select:focus, .config-form input:focus {
  border-color: rgba(126, 255, 182, .54); background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 4px rgba(84, 255, 170, .09);
}
.config-form input { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.config-form select option, .config-form select optgroup {
  background: #f7fff9; color: #102018;
}
.config-form select option:checked { background: #c8fbdc; color: #07140d; }
.config-multimodel, .config-telegram { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 7px; }
.config-multimodel > span, .config-telegram > span { font-size: 12px; color: var(--brand-soft); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.config-multimodel-grid, .config-telegram-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.config-telegram-grid { grid-template-columns: 1fr 1fr; }
.config-multimodel-grid label, .config-telegram-grid label { display: flex; flex-direction: column; gap: 4px; }
.config-multimodel-grid small, .config-telegram-grid small { font-size: 11px; color: var(--fg-soft); font-weight: 600; }
.config-status-strip {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: 8px 0 12px; padding: 8px 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .095); background: rgba(0, 0, 0, .16); color: var(--fg-soft); font-size: 13px;
}
.config-status-strip b { color: var(--brand-soft); }
.config-output-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.config-card {
  position: relative; overflow: hidden; margin: 0; padding: 14px; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(6, 18, 13, .82), rgba(6, 14, 11, .6));
  box-shadow: 0 18px 46px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .055);
}
.config-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(113, 255, 179, .64), transparent);
}
.config-card h3 { font-size: 15px; margin: 0 0 9px; color: var(--fg); letter-spacing: -.01em; }
.config-target { font-size: 12.5px; color: var(--fg-soft); margin: 0 0 10px; }
.config-target code { color: #d4ffe6; overflow-wrap: anywhere; }
.config-warn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border-radius: 13px;
  border: 1px solid rgba(255, 197, 93, .26); background: rgba(255, 180, 70, .1);
  font-size: 13px; color: #ffd88a; margin: 0 0 12px;
}
.config-snippet { margin-bottom: 12px; }
.config-snippet:last-child { margin-bottom: 0; }
.config-snippet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.config-snippet-head b { font-size: 13px; color: var(--fg); }
.config-snippet-head .mini-btn { padding: 7px 10px; border-radius: 999px; color: #082116; background: linear-gradient(135deg, var(--brand-soft), var(--brand-2)); border: 0; }
.config-snippet pre {
  margin: 0; padding: 11px 12px; border-radius: 14px; border: 1px solid rgba(126, 255, 182, .12);
  background: radial-gradient(circle at 0 0, rgba(90, 255, 173, .08), transparent 28%), rgba(0, 0, 0, 0.34);
  color: #dcefe5; font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}
.config-empty-note { color: var(--fg-soft); font-size: 13px; margin: 0; }

@media (max-width: 980px) {
  .config-hero-panel { grid-template-columns: 1fr; }
  .config-form { grid-template-columns: 1fr; }
}
/* ============ Compact Channel Status ============ */
.channel-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 160px)); gap: 10px; margin-top: 14px; }
.channel-group-card { display: flex; flex-direction: column; align-items: stretch; gap: 9px; width: 100%; max-width: 160px; min-width: 0; padding: 14px 12px; background: var(--bg-card); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; font: inherit; text-align: left; cursor: pointer; }
.channel-group-card:hover { border-color: var(--fg-muted); }
.channel-group-card:focus-visible, .channel-detail-modal :focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.channel-group-name { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.channel-group-metric { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; }
.channel-group-metric span, .channel-group-hint, .channel-model-metric span { color: var(--fg-muted); }
.channel-group-metric b, .channel-model-metric b { font-variant-numeric: tabular-nums; font-weight: 600; }
.channel-group-hint { font-size: 11px; }
.channel-state { display: inline-flex; align-items: center; gap: 5px; color: var(--fg-muted); font-size: 11px; font-weight: 400; }
.channel-state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-muted); flex-shrink: 0; }
.channel-state[data-status="healthy"] .channel-state-dot { background: var(--ok); }
.channel-state[data-status="warn"] .channel-state-dot { background: var(--warn); }
.channel-state[data-status="critical"] .channel-state-dot { background: var(--bad); }
.channel-detail-modal .modal-card { width: min(620px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; backdrop-filter: none; padding: 18px; }
.channel-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel-detail-head h3 { margin: 0 0 4px; font-size: 18px; }
.channel-detail-head button { flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--fg); font-size: 24px; cursor: pointer; }
.channel-detail-note { margin: 8px 0 0; color: var(--fg-muted); font-size: 12px; line-height: 1.5; }
#channelDetailBody { overflow-y: auto; min-height: 0; margin-top: 12px; scrollbar-width: none; -ms-overflow-style: none; }
#channelDetailBody::-webkit-scrollbar { display: none; width: 0; height: 0; }
.channel-model-list { list-style: none; padding: 0; margin: 0; }
.channel-model-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 94px; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.channel-model-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.channel-model-metric { display: flex; flex-direction: column; gap: 5px; text-align: right; font-size: 12px; }
@media (max-width: 900px) { .channel-status-grid { grid-template-columns: repeat(2, minmax(0, 160px)); } }
@media (max-width: 480px) {
  .channel-detail-modal { padding: 12px; }
  .channel-detail-modal .modal-card { padding: 14px; max-height: calc(100dvh - 24px); }
  .channel-model-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .channel-model-name { grid-column: 1 / -1; }
  .channel-model-metric { flex-direction: row; justify-content: space-between; gap: 6px; text-align: left; }
}

@media (max-width: 760px) {
  .config-hero-panel, .config-workbench { padding: 14px; border-radius: 20px; }
  .config-hero-copy h2 { font-size: 30px; }
  .config-status-strip { border-radius: 18px; justify-content: flex-start; }
  .config-snippet-head { align-items: flex-start; flex-direction: column; }
}

/* ---------- Studio tab (text-to-image / text-to-speech) ---------- */
.studio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.studio-card { background: var(--bg-elev, rgba(255,255,255,0.03)); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.studio-card-title { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 4px; }
.studio-card-title svg { width: 18px; height: 18px; }
.studio-card textarea {
  width: 100%; padding: 10px 14px; resize: vertical; min-height: 72px;
  background: var(--bg-input); border: 1px solid var(--line); border-radius: 11px;
  color: var(--fg); font: inherit; font-size: 14px; outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.studio-card textarea::placeholder { color: var(--fg-dim); }
.studio-card textarea:hover { background: var(--bg-input-hover); }
.studio-card textarea:focus { border-color: var(--brand-ring); box-shadow: 0 0 0 4px var(--brand-glow); background: rgba(52, 211, 153, 0.04); }
.studio-btn { display: inline-flex; align-items: center; gap: 6px; }
.studio-btn svg { width: 15px; height: 15px; }
.studio-img { display: block; width: 100%; max-width: 480px; border-radius: 12px; margin: 10px 0; border: 1px solid var(--line); }
.studio-audio { display: block; width: 100%; margin: 10px 0; }
.test-result .button-row { margin: 8px 0 4px; }
@media (max-width: 900px) { .studio-grid { grid-template-columns: 1fr; } }
