@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");
/* ══════════════════════════════════════════════════════════════════════
   Lixi AI — TailAdmin look for the sign-in pages and the dashboard.
   Colours, radii and shadows are TailAdmin Pro 2.4's tokens; the markup
   stays ours. Loaded LAST in <head>, after styles.css and the page's own
   <style>, so it wins. The render tool does not load this file.

   To change the brand colour, edit the --ta-brand-* block (and
   --orange-rgb) — everything else follows.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  /* brand */
  --ta-brand-25: #f2f7ff;  --ta-brand-50: #ecf3ff;  --ta-brand-100: #dde9ff; --ta-brand-200: #c2d6ff;
  --ta-brand-300: #9cb9ff; --ta-brand-400: #7592ff; --ta-brand-500: #465fff; --ta-brand-600: #3641f5;
  --ta-brand-700: #2a31d8; --ta-brand-800: #252dae; --ta-brand-900: #262e89; --ta-brand-950: #161950;
  /* gray */
  --ta-gray-25: #fcfcfd;  --ta-gray-50: #f9fafb;  --ta-gray-100: #f2f4f7; --ta-gray-200: #e4e7ec;
  --ta-gray-300: #d0d5dd; --ta-gray-400: #98a2b3; --ta-gray-500: #667085; --ta-gray-600: #475467;
  --ta-gray-700: #344054; --ta-gray-800: #1d2939; --ta-gray-900: #101828; --ta-gray-950: #0c111d;
  /* states */
  --ta-success-50: #ecfdf3; --ta-success-500: #12b76a; --ta-success-600: #039855;
  --ta-error-50: #fef3f2;   --ta-error-500: #f04438;   --ta-error-600: #d92d20;
  --ta-warning-50: #fffaeb; --ta-warning-500: #f79009; --ta-warning-600: #dc6803;
  /* shadows */
  --ta-shadow-xs: 0 1px 2px 0 rgba(16,24,40,.05);
  --ta-shadow-sm: 0 1px 3px 0 rgba(16,24,40,.1), 0 1px 2px 0 rgba(16,24,40,.06);
  --ta-shadow-md: 0 4px 8px -2px rgba(16,24,40,.1), 0 2px 4px -2px rgba(16,24,40,.06);
  --ta-shadow-lg: 0 12px 16px -4px rgba(16,24,40,.08), 0 4px 6px -2px rgba(16,24,40,.03);
  --ta-shadow-xl: 0 20px 24px -4px rgba(16,24,40,.08), 0 8px 8px -4px rgba(16,24,40,.03);
  --ta-ring: 0 0 0 3px rgba(70,95,255,.2);

  /* the app's own variables, pointed at the theme (every page below is written with these) */
  --orange: var(--ta-brand-500);
  --orange-dark: var(--ta-brand-600);
  --orange-light: var(--ta-brand-50);
  --orange-mid: var(--ta-brand-300);
  --orange-rgb: 70,95,255;
  --dark: var(--ta-gray-800);
  --dark2: var(--ta-gray-900);
  --ink: var(--ta-gray-900);          /* surfaces that stay dark in both modes */
  --mid: var(--ta-gray-700);
  --muted: var(--ta-gray-500);
  --border: var(--ta-gray-200);
  --border2: var(--ta-gray-300);
  --bg: var(--ta-gray-50);
  --white: #ffffff;
  --text: var(--ta-gray-800);
  --heading-font: "Outfit", "DM Sans", system-ui, sans-serif;
  --body-font: "Outfit", "DM Sans", system-ui, sans-serif;
  --r: 16px;
  --r2: 8px;
  --shadow: var(--ta-shadow-sm);
  --shadow-lg: var(--ta-shadow-lg);
}

body { background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
::selection { background: var(--ta-brand-500); color: #fff; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--ta-brand-500); color: #fff; border: 0;
  border-radius: 8px; font-weight: 500; box-shadow: var(--ta-shadow-xs);
  transition: background .15s, box-shadow .15s;
}
.btn-primary:hover { background: var(--ta-brand-600); transform: none; }
.btn-primary:disabled, .btn-primary[disabled] { background: var(--ta-brand-300); cursor: not-allowed; }
.btn-outline {
  background: var(--white); color: var(--mid); border: 0;
  box-shadow: inset 0 0 0 1px var(--border2), var(--ta-shadow-xs);
  border-radius: 8px; font-weight: 500;
}
.btn-outline:hover { background: var(--bg); color: var(--dark); border-color: transparent; }
.btn-ghost { border-radius: 8px; color: var(--muted); }
.btn-ghost:hover { background: var(--ta-gray-100); color: var(--mid); }
.btn-primary:focus-visible, .btn-outline:focus-visible, .btn-ghost:focus-visible { outline: 0; box-shadow: var(--ta-ring); }

/* ── Form fields ─────────────────────────────────────────────────────── */
.form-label { font-size: 14px; font-weight: 500; color: var(--mid); margin-bottom: 6px; }
.form-input, .form-select, .filter-select {
  min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--border2); border-radius: 8px;
  background: var(--white); color: var(--text);
  font-size: 14px; box-shadow: var(--ta-shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
textarea.form-input { min-height: 96px; }
.form-input::placeholder { color: var(--ta-gray-400); }
.form-input:focus, .form-select:focus, .filter-select:focus {
  border-color: var(--ta-brand-300); background: var(--white); outline: 0;
  box-shadow: var(--ta-ring);
}
.form-input:disabled, .form-input[readonly] { background: var(--ta-gray-100); color: var(--muted); }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--ta-brand-500); }

/* ══════════════════════════════════════════════════════════════════════
   SIGN IN · SIGN UP · FORGOT / RESET PASSWORD
   Form on the left, brand panel on the right (hidden below 1024 px).
   ══════════════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; padding: 0; background: var(--white);
  display: flex; align-items: stretch; justify-content: flex-start;
}
.auth-main {
  flex: 1 1 50%; min-width: 0;
  display: flex; flex-direction: column; padding: 24px;
}
.auth-back {
  width: 100%; max-width: 448px; margin: 16px auto 20px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--muted); text-decoration: none; transition: color .15s;
}
.auth-back:hover { color: var(--mid); }
.auth-back svg { width: 18px; height: 18px; }
.auth-card {
  width: 100%; max-width: 448px; margin: auto;
  padding: 0 0 40px; background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.auth-logo { justify-content: flex-start !important; margin-bottom: 28px; text-align: left; font-weight: 600; }
.auth-title { text-align: left; font-size: 30px; line-height: 38px; font-weight: 600; letter-spacing: -.01em; color: var(--dark); margin-bottom: 8px; }
.auth-sub { text-align: left; font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.social-btn {
  padding: 12px 28px; margin-bottom: 0; border: 0; border-radius: 8px;
  background: var(--ta-gray-100); color: var(--mid); font-size: 14px; font-weight: 400;
  transition: background .15s, color .15s;
}
.social-btn:hover { background: var(--ta-gray-200); color: var(--dark); }
.social-icon { width: 20px; height: 20px; }
.auth-divider { margin: 20px 0; font-size: 14px; color: var(--ta-gray-400); gap: 20px; }
.form-field { margin-bottom: 20px; }
.auth-submit { width: 100%; justify-content: center; padding: 12px 16px; margin-top: 4px; font-size: 14px; }
.auth-switch { text-align: left; margin-top: 20px; font-size: 14px; color: var(--mid); }
.auth-switch a { color: var(--ta-brand-500); font-weight: 400; }
.auth-switch a:hover { color: var(--ta-brand-600); text-decoration: none; }
.auth-card a { color: var(--ta-brand-500); }

/* brand panel */
.auth-side {
  flex: 1 1 50%; position: relative; overflow: hidden; isolation: isolate;
  display: none; align-items: center; justify-content: center;
  background: var(--ta-brand-950);
}
.auth-side-grid {
  position: absolute; z-index: -1; width: 450px; height: 254px; max-width: 62%;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 51.2px 52.1px;
}
.auth-side-grid.tr { top: 0; right: 0; -webkit-mask-image: radial-gradient(120% 120% at 100% 0%, #000 0%, transparent 72%); mask-image: radial-gradient(120% 120% at 100% 0%, #000 0%, transparent 72%); }
.auth-side-grid.bl { bottom: 0; left: 0; -webkit-mask-image: radial-gradient(120% 120% at 0% 100%, #000 0%, transparent 72%); mask-image: radial-gradient(120% 120% at 0% 100%, #000 0%, transparent 72%); }
.auth-side-inner { max-width: 320px; padding: 24px; text-align: center; }
.auth-side-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; font-family: var(--heading-font); font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: #fff; text-decoration: none; }
.auth-side-brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; }
.auth-side-brand span { color: var(--ta-brand-400); }
.auth-side-inner p { font-size: 16px; line-height: 24px; color: var(--ta-gray-400); }
@media (min-width: 1024px) {
  .auth-side { display: flex; }
  .auth-main { padding: 0 24px; }
  .auth-card .auth-logo { display: none !important; }
}
@media (max-width: 1023px) { .auth-back { margin-top: 0; } }

/* signup: the "how will you use Lixi" sheet */
.ob-card { border-radius: 24px; box-shadow: var(--ta-shadow-xl); }
.ob-card::before { background: var(--ta-brand-500) !important; }

/* ══════════════════════════════════════════════════════════════════════
   DASHBOARD SHELL
   ══════════════════════════════════════════════════════════════════════ */
.dash-page { background: var(--bg); }

/* sidebar */
.sidebar, [data-theme="light"] .sidebar {
  width: 290px; padding: 0 20px;
  background: var(--white); border-right: 1px solid var(--border);
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-logo, [data-theme="light"] .sidebar-logo {
  padding: 28px 0 !important; margin: 0; border-bottom: 0;
  font-size: 22px; font-weight: 700; color: var(--dark);
}
.sidebar-logo span { color: var(--ta-brand-500); margin-left: -6px; }
.sidebar-section-label, [data-theme="light"] .sidebar-section-label {
  padding: 0 0 0 0; margin: 20px 0 14px; font-size: 12px; line-height: 20px; font-weight: 400;
  letter-spacing: 0; text-transform: uppercase; color: var(--ta-gray-400);
}
.sidebar-logo + .sidebar-section-label { margin-top: 0; }
.sidebar-item, [data-theme="light"] .sidebar-item {
  gap: 12px; margin: 0 0 4px; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--mid);
  transition: background .15s, color .15s;
}
.sidebar-item svg { width: 20px; height: 20px; color: var(--muted); stroke-width: 1.7; }
.sidebar-item:hover, [data-theme="light"] .sidebar-item:hover { background: var(--ta-gray-100); color: var(--mid); }
.sidebar-item:hover svg { color: var(--mid); }
.sidebar-item.active, [data-theme="light"] .sidebar-item.active { background: var(--ta-brand-50); color: var(--ta-brand-500); }
.sidebar-item.active svg { color: var(--ta-brand-500); }
#settings-section .sidebar-item, #developer-section .sidebar-item, #dev-section .sidebar-item { padding-left: 12px; }
.sidebar-badge, .sidebar-item [class*="badge"] {
  margin-left: auto; padding: 2px 10px; border-radius: 999px;
  background: var(--ta-success-50) !important; color: var(--ta-success-600) !important;
  font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: uppercase;
}
.sidebar-item.active .sidebar-badge { background: #d1fadf !important; }

/* credits widget + account block at the bottom */
.sidebar-credits, [data-theme="light"] .sidebar-credits { margin: auto 0 0; padding: 20px 0 0; border-top: 0; }
.credits-box, [data-theme="light"] .credits-box {
  padding: 20px 16px; border: 0; border-radius: 16px; background: var(--bg); text-align: center;
}
.credits-box-label, [data-theme="light"] .credits-box-label { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--muted); }
.credits-box-amount, [data-theme="light"] .credits-box-amount { font-size: 30px; line-height: 38px; font-weight: 600; color: var(--dark); }
.credits-box-sub, [data-theme="light"] .credits-box-sub { color: var(--muted); font-size: 12px; }
.credits-box .btn-primary { margin-top: 14px; padding: 10px 16px; font-size: 14px; }
.sidebar-credits { padding-bottom: 24px !important; }
#sidebar-avatar, #topbar-avatar, .user-avatar { background: var(--ta-brand-500) !important; }
#sidebar-user-name { font-size: 14px !important; font-weight: 500 !important; }
#sidebar-user-email { font-size: 12px !important; }

/* header */
.dash-main { background: var(--bg); }
.dash-header {
  position: sticky; top: 0; z-index: 90; height: 76px; padding: 0 24px;
  background: var(--white); border-bottom: 1px solid var(--border);
}
.dash-header-title { font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--dark); }
.dash-header-right { gap: 12px; }
.theme-toggle, .notif-btn, .hamburger-btn {
  width: 44px !important; height: 44px !important; padding: 0 !important;
  align-items: center; justify-content: center;
  border: 1px solid var(--border) !important; border-radius: 50% !important;
  background: var(--white) !important; color: var(--muted) !important;
  transition: background .15s, color .15s;
}
.hamburger-btn { border-radius: 8px !important; }
.theme-toggle:hover, .notif-btn:hover, .hamburger-btn:hover { background: var(--ta-gray-100) !important; color: var(--mid) !important; border-color: var(--border) !important; }
.theme-toggle, .notif-btn { display: inline-flex; }
.theme-toggle svg, .notif-btn svg, .hamburger-btn svg { width: 20px; height: 20px; }
.notif-dot { background: var(--ta-warning-500) !important; }
.notif-badge { background: var(--ta-brand-500) !important; }
.user-avatar { width: 44px !important; height: 44px !important; font-weight: 600; }
.dash-content { padding: 24px; max-width: 1536px; width: 100%; margin: 0 auto; }
@media (max-width: 768px) { .dash-header { height: 64px; padding: 0 12px; } .dash-content { padding: 16px; } .sidebar { width: 290px; } }

/* ── Cards ───────────────────────────────────────────────────────────── */
.dash-card, .stat-card, .settings-card, .embed-card, .pack-card, .render-card, .cbrand-card, .ckw-card,
.catalog-panel, .cat-col, .usage-table, .customer-row, .billing-plan-box, .asset-preview-box {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px; box-shadow: none;
}
.dash-card { padding: 24px; }
.dash-card-title { font-size: 18px; font-weight: 600; color: var(--dark); margin-bottom: 20px; }
.stat-card { padding: 20px 24px; }
.stat-label { font-size: 14px; color: var(--muted); font-weight: 400; }
.stat-value { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.01em; color: var(--dark); }
.view-title { font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--dark); }
.view-sub { font-size: 14px; color: var(--muted); }
.settings-section-title { font-size: 18px; font-weight: 600; color: var(--dark); }
.settings-section-sub { font-size: 14px; color: var(--muted); }
.settings-divider { background: var(--border); border-color: var(--border); }
.pack-card.popular { border-color: var(--ta-brand-500); box-shadow: 0 0 0 1px var(--ta-brand-500); }
.pack-popular-badge { background: var(--ta-brand-500); color: #fff; border-radius: 999px; }
.pack-price { color: var(--ta-brand-500); }

/* welcome banner and the other dark panels: brand-950, like the sign-in side panel */
.credits-current-box { background: var(--ta-brand-950) !important; border: 0 !important; border-radius: 16px !important; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.usage-table { overflow: hidden; }
.usage-table table { width: 100%; border-collapse: collapse; }
.usage-table th {
  padding: 12px 20px; background: var(--white); border-bottom: 1px solid var(--border);
  font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: 0; text-transform: none; text-align: left; color: var(--muted);
}
.usage-table td { padding: 14px 20px; border-bottom: 1px solid var(--ta-gray-100); font-size: 14px; color: var(--muted); }
.usage-table tr:last-child td { border-bottom: 0; }

/* ── Badges / status ─────────────────────────────────────────────────── */
.render-status, .api-key-badge, .cat-col-badge, .cat-section-badge { border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.status-done { background: var(--ta-success-50); color: var(--ta-success-600); }
.status-processing { background: var(--ta-warning-50); color: var(--ta-warning-600); }
.status-failed { background: var(--ta-error-50); color: var(--ta-error-600); }
.badge-live { background: var(--ta-error-50); color: var(--ta-error-600); }
.badge-test { background: var(--ta-brand-50); color: var(--ta-brand-500); }

/* ── Tabs, toggles, menus ────────────────────────────────────────────── */
.ctab-bar { padding: 2px; gap: 2px; border: 0; border-radius: 8px; background: var(--ta-gray-100); }
.ctab-btn { border: 0; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--muted); background: transparent; }
.ctab-btn.active { background: var(--white); color: var(--dark); box-shadow: var(--ta-shadow-xs); }
.toggle { width: 44px; height: 24px; }
.toggle-slider { background: var(--ta-gray-200); }
.toggle-slider:before { width: 20px; height: 20px; left: 2px; bottom: 2px; box-shadow: var(--ta-shadow-sm); }
.toggle input:checked + .toggle-slider { background: var(--ta-brand-500); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }
.toggle-label { font-size: 14px; font-weight: 500; color: var(--mid); }
.toggle-sub { font-size: 13px; color: var(--muted); }
.notif-panel, .rd-dl-menu { border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--ta-shadow-lg); }
.notif-item.unread { background: var(--ta-brand-25); }
.notif-mark-all { color: var(--ta-brand-500); }

/* ── Modals, toast ───────────────────────────────────────────────────── */
.modal-bg { background: rgba(16,24,40,.5); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.modal-card { border-radius: 24px; box-shadow: var(--ta-shadow-xl); }
.modal-title { font-size: 20px; font-weight: 600; color: var(--dark); }
.modal-sub { font-size: 14px; color: var(--muted); }
.toast { border-radius: 12px; background: var(--ta-gray-900); color: #fff; box-shadow: var(--ta-shadow-lg); }
.toast-icon { color: var(--ta-success-500); }

/* ── Code blocks ─────────────────────────────────────────────────────── */
.code-block { background: var(--ta-gray-900) !important; border-radius: 12px; }
.copy-btn { background: var(--ta-brand-500); color: #fff; border: 0; border-radius: 6px; }

/* ══════════════════════════════════════════════════════════════════════
   DARK MODE (dashboard only — the header's sun / moon button)
   ══════════════════════════════════════════════════════════════════════ */
#dashboard-root:not([data-theme="light"]),
body:has(> #dashboard-root:not([data-theme="light"])) {      /* body too, so pop-ups outside the shell follow */
  --white: #171f2f;                      /* card surface: white 3% on gray-900 */
  --bg: var(--ta-gray-900);
  --dark: rgba(255,255,255,.92);
  --dark2: #0c111d;
  --mid: var(--ta-gray-300);
  --muted: var(--ta-gray-400);
  --text: rgba(255,255,255,.88);
  --border: var(--ta-gray-800);
  --border2: var(--ta-gray-700);
  --orange-light: rgba(70,95,255,.12);
  --orange-dark: var(--ta-brand-400);
  --ta-gray-100: rgba(255,255,255,.05);
  --ta-gray-200: rgba(255,255,255,.09);
  --ta-brand-50: rgba(70,95,255,.12);
  --ta-brand-25: rgba(70,95,255,.07);
  --ta-success-50: rgba(18,183,106,.15);
  --ta-error-50: rgba(240,68,56,.15);
  --ta-warning-50: rgba(247,144,9,.15);
  color-scheme: dark;
}
#dashboard-root:not([data-theme="light"]) .sidebar,
#dashboard-root:not([data-theme="light"]) .dash-header { background: var(--ta-gray-900); }
#dashboard-root:not([data-theme="light"]) .sidebar-item.active,
#dashboard-root:not([data-theme="light"]) .sidebar-item.active svg { color: var(--ta-brand-400); }
#dashboard-root:not([data-theme="light"]) .theme-toggle,
#dashboard-root:not([data-theme="light"]) .notif-btn,
#dashboard-root:not([data-theme="light"]) .hamburger-btn { background: var(--ta-gray-900) !important; }
#dashboard-root:not([data-theme="light"]) .credits-current-box { background: rgba(70,95,255,.14) !important; }
#dashboard-root:not([data-theme="light"]) .form-input,
#dashboard-root:not([data-theme="light"]) .form-select,
#dashboard-root:not([data-theme="light"]) .filter-select { background: var(--ta-gray-900); }
#dashboard-root:not([data-theme="light"]) .toast { background: #fff; color: var(--ta-gray-900); }

/* ── fixes after the first pass ──────────────────────────────────────── */
.auth-card a.auth-logo { color: var(--dark); }
.auth-card a.auth-logo span { color: var(--ta-brand-500); }
.dash-header > div:first-child { min-width: 0; flex: 1 1 auto; }
.dash-header-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 768px) { .dash-header-title { font-size: 18px; } .dash-header-right { gap: 8px; flex: 0 0 auto; } }
.home-stat-grid > div { border-radius: 16px !important; }

/* dark mode: tiles and outlines that carry their own light colours */
#dashboard-root:not([data-theme="light"]) .home-stat-grid > div { border-color: var(--border) !important; background: var(--white) !important; }
#dashboard-root:not([data-theme="light"]) .home-stat-grid > div > div:first-child { background: rgba(255,255,255,.06) !important; }


/* ══════════════════════════════════════════════════════════════════════
   v2 — shell and components rebuilt after the TailAdmin demo
   ══════════════════════════════════════════════════════════════════════ */
body, button, input, select, textarea { font-family: var(--body-font); }

/* line icons */
.ti { width: 1.25em; height: 1.25em; flex: 0 0 auto; vertical-align: -.24em;
      fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary .ti, .btn-outline .ti, .btn-ghost .ti { width: 18px; height: 18px; }

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar, [data-theme="light"] .sidebar { display: flex; flex-direction: column; transition: width .25s ease; }
.sidebar-logo, [data-theme="light"] .sidebar-logo { display: flex !important; align-items: center; gap: 12px; padding: 30px 0 !important; text-decoration: none; }
.sidebar-logo img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; flex: 0 0 auto; }
.sb-brand { font-size: 26px; line-height: 1; font-weight: 600; letter-spacing: -.02em; color: var(--dark); white-space: nowrap; }
.sidebar-logo .sb-brand span { margin-left: 0; color: var(--ta-brand-500); }
.sb-nav { display: flex; flex-direction: column; gap: 4px; padding-bottom: 20px; }
.sidebar-section-label, [data-theme="light"] .sidebar-section-label { margin: 0 0 12px; font-size: 12px; line-height: 20px; color: var(--ta-gray-400); }
.sidebar-item, [data-theme="light"] .sidebar-item {
  position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 9px 12px;
  border-radius: 8px; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--mid);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.sidebar-item > .ti { width: 24px; height: 24px; color: var(--muted); stroke-width: 1.5; }
.sidebar-item:hover > .ti { color: var(--mid); }
.sidebar-item.active > .ti, .sidebar-item.sb-group.open > .ti { color: var(--ta-brand-500); }
.sidebar-item .sb-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar-item.sb-group.open, [data-theme="light"] .sidebar-item.sb-group.open { background: var(--ta-brand-50); color: var(--ta-brand-500); }
.sidebar-item .sb-plus { width: 20px !important; height: 20px !important; margin-left: auto; transition: transform .2s; transform: none !important; }
.sidebar-item.sb-group.open .sb-plus { transform: rotate(45deg) !important; }
.sb-sub { margin: 4px 0 6px 36px; display: flex; flex-direction: column; gap: 2px; }
.sb-sub[style*="display: block"], .sb-sub[style*="display:block"] { display: flex !important; }
.sb-sub .sidebar-item, [data-theme="light"] .sb-sub .sidebar-item { padding: 9px 12px; font-size: 14px; line-height: 20px; }
.sidebar-badge, .sidebar-item .sidebar-badge { margin-left: auto; flex: 0 0 auto; }

/* folded to icons (desktop, header button) */
@media (min-width: 769px) {
  .sb-collapsed .sidebar { width: 90px; }
  .sb-collapsed .sidebar .sb-text, .sb-collapsed .sidebar .sidebar-badge, .sb-collapsed .sidebar .sb-plus,
  .sb-collapsed .sidebar .sb-sub, .sb-collapsed .sidebar .sidebar-credits { display: none !important; }
  .sb-collapsed .sidebar .sidebar-item, .sb-collapsed .sidebar .sidebar-logo { justify-content: center; }
  .sb-collapsed .sidebar .sidebar-section-label { height: 20px; }
  .sb-collapsed .sidebar .sidebar-section-label::after { content: "···"; display: block; text-align: center; letter-spacing: 2px; }
  .hamburger-btn { display: inline-flex !important; }
}

/* ── Header ──────────────────────────────────────────────────────────── */
.dash-header { height: 78px; gap: 16px; }
.dh-left { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 auto; }
.theme-toggle, .notif-btn, .hamburger-btn {
  width: 44px !important; height: 44px !important; border-radius: 12px !important; position: relative;
}
.theme-toggle .ti, .notif-btn .ti, .hamburger-btn .ti { width: 22px; height: 22px; }
.notif-dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--white); box-sizing: content-box; }
.dh-search { position: relative; flex: 0 1 430px; min-width: 0; }
.dh-search > .ti { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.dh-search input {
  width: 100%; height: 44px; padding: 0 64px 0 46px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--white); color: var(--text);
  font-size: 14px; outline: 0; box-shadow: var(--ta-shadow-xs); transition: border-color .15s, box-shadow .15s;
}
.dh-search input::placeholder { color: var(--ta-gray-400); }
.dh-search input:focus { border-color: var(--ta-brand-300); box-shadow: var(--ta-ring); }
.dh-search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 3px 7px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  font: 500 12px/16px var(--body-font); color: var(--muted); pointer-events: none;
}
.dh-search-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 200; padding: 8px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--white); box-shadow: var(--ta-shadow-lg);
}
.dh-cmd { display: flex; width: 100%; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--mid); font: 500 14px/20px var(--body-font); text-align: left; cursor: pointer; }
.dh-cmd .ti { width: 20px; height: 20px; color: var(--muted); }
.dh-cmd:hover, .dh-cmd.sel { background: var(--ta-gray-100); }
.dh-cmd-none { padding: 14px 12px; font-size: 14px; color: var(--muted); }
.dash-header-title { display: none; }

/* user menu */
.ud { position: relative; }
.ud-toggle { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; color: var(--mid); font: 500 14px/20px var(--body-font); cursor: pointer; }
.user-avatar, #topbar-avatar { width: 44px !important; height: 44px !important; border-radius: 12px !important; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 600; }
.ud-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-chev { width: 20px; height: 20px; color: var(--muted); transition: transform .2s; }
.ud.open .ud-chev { transform: rotate(180deg); }
.ud-menu {
  position: absolute; right: 0; top: calc(100% + 16px); z-index: 200; width: 264px; padding: 12px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--white); box-shadow: var(--ta-shadow-lg);
}
.ud-head { padding: 4px 12px 2px; }
.ud-head-name { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-head-mail { margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-list { list-style: none; margin: 12px 0 0; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.ud-list button, .ud-list a, .ud-signout {
  display: flex; width: 100%; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--mid); font: 500 14px/20px var(--body-font); text-align: left; text-decoration: none; cursor: pointer;
}
.ud-list .ti, .ud-signout .ti { width: 22px; height: 22px; color: var(--muted); }
.ud-list button:hover, .ud-list a:hover { background: var(--ta-gray-100); }
.ud-signout { margin-top: 12px; color: var(--ta-error-600); }
.ud-signout .ti { color: var(--ta-error-500); }
.ud-signout:hover { background: var(--ta-error-50); }

/* notifications panel */
.notif-panel { top: calc(100% + 16px); width: 361px; max-width: calc(100vw - 24px); padding: 12px; border-radius: 16px; }
.notif-head { padding: 4px 6px 12px; border-bottom: 1px solid var(--ta-gray-100); }
.notif-head-title { font-size: 18px; font-weight: 600; color: var(--dark); }
.notif-item { padding: 12px; border-radius: 8px; border-bottom: 1px solid var(--ta-gray-100); }
.notif-item:hover { background: var(--ta-gray-100); }
.notif-ico { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.notif-ico.orange { background: var(--ta-brand-50) !important; color: var(--ta-brand-500); }
.notif-ico.red { background: var(--ta-error-50) !important; color: var(--ta-error-500); }
.notif-ico.green { background: var(--ta-success-50) !important; color: var(--ta-success-600); }
.notif-ico.blue { background: var(--ta-brand-50) !important; color: var(--ta-brand-500); }
.notif-title { font-size: 14px; font-weight: 500; color: var(--mid); }
.notif-sub, .notif-when { font-size: 12px; color: var(--muted); }
.notif-footer { padding: 12px 6px 4px; font-size: 12px; color: var(--muted); text-align: center; }

@media (max-width: 768px) {
  .dh-search { display: none; }
  .dash-header-title { display: block; font-size: 18px; }
  .ud-name, .ud-chev { display: none; }
  .hamburger-btn { display: inline-flex !important; }
  .theme-toggle, .notif-btn, .hamburger-btn, .user-avatar, #topbar-avatar { width: 40px !important; height: 40px !important; }
  .notif-panel { position: fixed; top: 72px; right: 12px; left: 12px; width: auto; }
}

/* ── Page head, cards, metrics ───────────────────────────────────────── */
.ta-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px;
  background: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; }
.ta-eyebrow { font-size: 14px; color: var(--muted) !important; margin-bottom: 4px; }
.ta-pagehead-title { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; color: var(--dark); }
.ta-pagehead-title span, #home-user-fname { color: var(--dark) !important; }
.ta-pagehead-sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.ta-pagehead-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.view-header { margin-bottom: 24px !important; align-items: flex-end; }
.view-title { font-size: 24px; line-height: 32px; font-weight: 600; }
.view-sub { margin-top: 4px; }

.ta-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.cstat-grid.ta-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.ta-metric { padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--white); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ta-metric:hover { border-color: var(--border2); box-shadow: var(--ta-shadow-sm); }
.ta-metric-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--ta-gray-100); color: var(--dark); display: flex; align-items: center; justify-content: center; }
.ta-metric-ico .ti { width: 24px; height: 24px; }
.ta-metric-row { margin-top: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.ta-metric-label { font-size: 14px; line-height: 20px; color: var(--muted); }
.ta-metric-value { margin-top: 8px; font-size: 30px; line-height: 38px; font-weight: 700; color: var(--dark); }
.ta-metric.sm { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.ta-metric.sm .ta-metric-ico { width: 44px; height: 44px; flex: 0 0 auto; }
.ta-metric.sm .ta-metric-value { margin-top: 2px; font-size: 24px; line-height: 30px; }
.ta-metric.success .ta-metric-ico { background: var(--ta-success-50); color: var(--ta-success-600); }
.ta-badge { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 10px; border-radius: 999px; background: var(--ta-gray-100); color: var(--mid); font-size: 12px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-badge.success { background: var(--ta-success-50); color: var(--ta-success-600); }
.ta-badge.error { background: var(--ta-error-50); color: var(--ta-error-600); }
.ta-badge.warning { background: var(--ta-warning-50); color: var(--ta-warning-600); }
.ta-badge.brand { background: var(--ta-brand-50); color: var(--ta-brand-500); }

.dash-row { gap: 24px; margin-bottom: 24px; align-items: start; }
.dash-card { padding: 24px !important; }
.ta-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.ta-card-title { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--dark); }
.ta-card-sub { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--muted); }
.ta-btn-sm { padding: 8px 14px !important; font-size: 14px !important; line-height: 20px; }
.ta-stack { display: flex; flex-direction: column; gap: 24px; }
.ta-mb { margin-bottom: 24px !important; }
.ta-loading { padding: 32px 0; text-align: center; font-size: 14px; color: var(--muted); }

.ta-actions { display: flex; flex-direction: column; gap: 4px; margin: -4px -8px; }
.ta-action { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; font-family: var(--body-font); transition: background .15s; }
.ta-action:hover { background: var(--ta-gray-100); }
.ta-action-ico { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; background: var(--ta-gray-100); color: var(--mid); display: flex; align-items: center; justify-content: center; }
.ta-action:hover .ta-action-ico { background: var(--white); }
.ta-action-ico.brand { background: var(--ta-brand-50); color: var(--ta-brand-500); }
.ta-action-ico .ti { width: 20px; height: 20px; }
.ta-action > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.ta-action b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--dark); }
.ta-action small { display: block; font-size: 12px; line-height: 18px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-action-go { width: 18px; height: 18px; color: var(--ta-gray-400); }

.ta-credit-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.ta-credit-num { font-size: 36px; line-height: 44px; font-weight: 700; color: var(--dark); }
.ta-credit-unit { font-size: 14px; color: var(--muted); }
.ta-progress { height: 8px; border-radius: 999px; background: var(--ta-gray-200); overflow: hidden; }
.ta-progress > div { height: 100%; border-radius: 999px; background: var(--ta-brand-500) !important; transition: width .6s ease; }
.ta-credit-foot { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }

/* ── Empty state ─────────────────────────────────────────────────────── */
.ta-empty { display: flex; flex-direction: column; align-items: center; padding: 40px 20px; text-align: center; }
.ta-empty-ico { width: 56px; height: 56px; margin-bottom: 16px; border-radius: 14px; background: var(--ta-gray-100); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.ta-empty-ico .ti { width: 28px; height: 28px; stroke-width: 1.5; }
.ta-empty-title { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--dark); }
.ta-empty-sub { max-width: 380px; margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--muted); }
.ta-empty .btn-primary, .ta-empty .btn-outline { margin-top: 20px; padding: 10px 18px; font-size: 14px; text-decoration: none; }
.ta-empty-card { border: 1px solid var(--border); border-radius: 16px; background: var(--white); }
.ta-td-empty { padding: 0 !important; }
.cat-no-items { color: var(--muted); }

/* ── Alerts (inline notices) ─────────────────────────────────────────── */
.ta-alert { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--ta-gray-300); border-radius: 12px; background: var(--bg); }
.ta-alert > .ti { width: 24px; height: 24px; margin-top: -2px; color: var(--muted); }
.ta-alert h4 { margin: 0 0 4px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--dark); }
.ta-alert p, .ta-alert div > span, .ta-alert .ta-alert-text { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.ta-alert.info { border-color: #0ba5ec; background: #f0f9ff; }      .ta-alert.info > .ti { color: #0ba5ec; }
.ta-alert.success { border-color: var(--ta-success-500); background: var(--ta-success-50); } .ta-alert.success > .ti { color: var(--ta-success-500); }
.ta-alert.warning { border-color: var(--ta-warning-500); background: var(--ta-warning-50); } .ta-alert.warning > .ti { color: var(--ta-warning-500); }
.ta-alert.error { border-color: var(--ta-error-500); background: var(--ta-error-50); }       .ta-alert.error > .ti { color: var(--ta-error-500); }
#dashboard-root:not([data-theme="light"]) .ta-alert.info, body:has(> #dashboard-root:not([data-theme="light"])) .ta-alert.info { background: rgba(11,165,236,.15); border-color: rgba(11,165,236,.3); }
#dashboard-root:not([data-theme="light"]) .ta-alert.success { border-color: rgba(18,183,106,.3); }
#dashboard-root:not([data-theme="light"]) .ta-alert.warning { border-color: rgba(247,144,9,.3); }
#dashboard-root:not([data-theme="light"]) .ta-alert.error { border-color: rgba(240,68,56,.3); }

/* ── Toast (the theme's notification card) ───────────────────────────── */
.toast.ta-toast {
  left: auto; right: 24px; bottom: 24px; min-width: 280px; max-width: min(420px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px;
  border: 0; border-bottom: 4px solid var(--ta-success-500); border-radius: 8px;
  background: var(--white) !important; color: var(--dark); box-shadow: var(--ta-shadow-lg);
  font-size: 14px; line-height: 20px; font-weight: 400;
}
.toast.ta-toast .toast-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 8px; background: var(--ta-success-50); color: var(--ta-success-500); display: flex; align-items: center; justify-content: center; }
.toast.ta-toast .toast-icon .ti { width: 22px; height: 22px; }
.toast.ta-toast.err { border-bottom-color: var(--ta-error-500); }   .toast.ta-toast.err .toast-icon { background: var(--ta-error-50); color: var(--ta-error-500); }
.toast.ta-toast.warn { border-bottom-color: var(--ta-warning-500); } .toast.ta-toast.warn .toast-icon { background: var(--ta-warning-50); color: var(--ta-warning-500); }
.toast.ta-toast.info { border-bottom-color: #0ba5ec; }               .toast.ta-toast.info .toast-icon { background: #f0f9ff; color: #0ba5ec; }
@media (max-width: 768px) { .toast.ta-toast { left: 12px; right: 12px; bottom: 12px; min-width: 0; } }

/* small things */
.ta-tile-ico .ti { width: 26px; height: 26px; }
@media (max-width: 1100px) { .ta-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cstat-grid.ta-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .ta-metrics, .cstat-grid.ta-metrics { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ta-metric { padding: 16px; } .ta-metric-value { font-size: 24px; line-height: 30px; }
  .ta-pagehead-actions { width: 100%; } .ta-pagehead-actions > * { flex: 1 1 0; justify-content: center; }
  .dash-card { padding: 16px !important; }
}

.sidebar-logo .sb-brand, [data-theme="light"] .sidebar-logo .sb-brand { color: var(--dark); margin-left: 0; }
.sidebar-logo .sb-brand span { color: var(--ta-brand-500); margin-left: 0; }


/* ── Notices on the sign-in pages (same look as the dashboard alerts) ── */
#error-box, #success-box {
  position: relative; padding: 14px 16px 14px 50px !important; margin-bottom: 20px !important;
  border: 1px solid var(--ta-error-500) !important; border-radius: 12px !important;
  background: var(--ta-error-50) !important; color: var(--ta-gray-700) !important;
  font-size: 14px !important; line-height: 20px !important;
}
#error-box::before, #success-box::before {
  content: ""; position: absolute; left: 16px; top: 13px; width: 22px; height: 22px; background: var(--ta-error-500);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / contain no-repeat;
}
#error-box a, #success-box a { color: inherit; font-weight: 500; text-decoration: underline; }
#error-box[data-kind="warn"] { border-color: var(--ta-warning-500) !important; background: var(--ta-warning-50) !important; }
#error-box[data-kind="warn"]::before { background: var(--ta-warning-500); }
#error-box[data-kind="info"] { border-color: #0ba5ec !important; background: #f0f9ff !important; }
#error-box[data-kind="info"]::before { background: #0ba5ec; }
#success-box { border-color: var(--ta-success-500) !important; background: var(--ta-success-50) !important; }
#success-box::before { background: var(--ta-success-500);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.3 2.7 2.7L16 9.5'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.3 2.7 2.7L16 9.5'/%3E%3C/svg%3E"); }

/* toast on the sign-in pages: same card */
.toast:not(.ta-toast) {
  left: auto; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px;
  border: 0; border-bottom: 4px solid var(--ta-success-500); border-radius: 8px;
  background: #fff; color: var(--ta-gray-800); box-shadow: var(--ta-shadow-lg); font-size: 14px; line-height: 20px;
}
.toast:not(.ta-toast) .toast-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 8px; background: var(--ta-success-50); color: var(--ta-success-500); display: flex; align-items: center; justify-content: center; font-size: 18px; }
@media (max-width: 768px) { .toast:not(.ta-toast) { left: 12px; right: 12px; bottom: 12px; } }
#dashboard-root:not([data-theme="light"]) .credits-box { background: rgba(255,255,255,.04); }


/* ══════════════════════════════════════════════════════════════════════
   DOCS (docs.html)
   ══════════════════════════════════════════════════════════════════════ */
.pub-nav { height: 76px; padding: 0 24px; gap: 16px; background: var(--white); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: none; backdrop-filter: none; }
.docs-nav-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pub-nav-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--dark); }
.pub-nav-logo img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; }
.pub-nav-logo span { color: var(--ta-brand-500); margin-left: -10px; }
.pub-nav-logo em { margin-left: 2px; padding: 2px 10px; border-radius: 999px; background: var(--ta-gray-100); color: var(--mid); font-size: 12px; line-height: 20px; font-style: normal; font-weight: 500; letter-spacing: 0; }
.pub-nav-link { padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--mid); }
.pub-nav-link:hover { background: var(--ta-gray-100); color: var(--mid); }
.pub-nav-link.active { background: var(--ta-brand-50); color: var(--ta-brand-500); }
.pub-nav-actions .btn-primary, .pub-nav-actions .btn-outline { padding: 10px 16px; font-size: 14px; }
.docs-menu-btn { display: none; width: 44px; height: 44px; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 12px; background: var(--white); color: var(--muted); cursor: pointer; }
.docs-menu-btn svg { width: 22px; height: 22px; }
.docs-overlay { display: none; }

.docs-layout { grid-template-columns: 290px minmax(0, 1fr); min-height: calc(100vh - 76px); margin-top: 76px; background: var(--bg); }
.docs-sidebar { top: 76px; height: calc(100vh - 76px); padding: 24px 20px 32px; background: var(--white); border-right: 1px solid var(--border); scrollbar-width: thin; }
.docs-sidebar-section { margin: 24px 0 10px; padding: 0 12px; font-size: 12px; line-height: 20px; font-weight: 400; letter-spacing: 0; text-transform: uppercase; color: var(--ta-gray-400); }
.docs-nav-item { margin: 0 0 2px; padding: 9px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--mid); }
.docs-nav-item:hover { background: var(--ta-gray-100); color: var(--mid); }
.docs-nav-item.active { background: var(--ta-brand-50); color: var(--ta-brand-500); font-weight: 500; }

.docs-content { width: 100%; max-width: 920px; margin: 24px auto 48px 24px; padding: 40px 48px 48px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; }
.section-badge { display: inline-flex; padding: 2px 10px; margin-bottom: 14px; border-radius: 999px; background: var(--ta-brand-50); color: var(--ta-brand-500); font-size: 12px; line-height: 20px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.docs-content h1 { font-size: 36px; line-height: 44px; font-weight: 600; letter-spacing: -.02em; color: var(--dark); }
.docs-content h2 { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; color: var(--dark); scroll-margin-top: 92px; }
.docs-content h3 { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--dark); scroll-margin-top: 92px; }
.docs-content [id] { scroll-margin-top: 92px; }
.docs-content p, .docs-content li { font-size: 15px; line-height: 26px; color: var(--ta-gray-600); }
.docs-content a { color: var(--ta-brand-500); text-decoration: none; }
.docs-content a:hover { color: var(--ta-brand-600); text-decoration: underline; }
.docs-content code { padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--ta-brand-600); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.docs-content pre { padding: 20px; border-radius: 12px; background: var(--ta-gray-900); box-shadow: var(--ta-shadow-xs); }
.docs-content pre code { padding: 0; border: 0; background: none; color: #e4e7ec; font-size: 13px; line-height: 22px; }
.docs-callout.ta-alert { margin-bottom: 20px; padding: 16px; }
.docs-callout.ta-alert > .ti { margin-top: 1px; }
.docs-callout.ta-alert p { margin: 0; font-size: 14px; line-height: 22px; color: var(--ta-gray-600); }
.docs-callout strong { color: var(--dark); }
.docs-table { border: 1px solid var(--border); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.docs-table th { padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.docs-table td { padding: 12px 16px; border-bottom: 1px solid var(--ta-gray-100); font-size: 14px; line-height: 20px; color: var(--ta-gray-600); }
.docs-help { margin-top: 48px; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px 24px; flex-wrap: wrap; border-radius: 16px; background: var(--ta-brand-950); }
.docs-help-title { margin-bottom: 4px; font-size: 18px; line-height: 28px; font-weight: 600; color: #fff; }
.docs-help-sub { max-width: 460px; font-size: 14px; line-height: 20px; color: var(--ta-gray-400); }
.docs-help .btn-outline { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.docs-help .btn-outline:hover { background: rgba(255,255,255,.14); color: #fff; }
.docs-help .btn-primary, .docs-help .btn-outline { padding: 10px 16px; font-size: 14px; text-decoration: none; }

@media (max-width: 1024px) {
  .pub-nav { height: 64px; padding: 0 12px; }
  .pub-nav-links { display: none; }
  .docs-menu-btn { display: inline-flex; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); margin-top: 64px; }
  .docs-sidebar { position: fixed; z-index: 120; top: 0; left: 0; bottom: 0; width: 290px; height: auto; transform: translateX(-100%); transition: transform .25s ease; }
  .docs-menu-open .docs-sidebar { transform: none; box-shadow: var(--ta-shadow-xl); }
  .docs-menu-open .docs-overlay { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(16,24,40,.5); }
  .docs-content { margin: 12px; width: auto; padding: 24px 18px 32px; }
  .docs-content h1 { font-size: 28px; line-height: 36px; }
  .docs-content [id], .docs-content h2, .docs-content h3 { scroll-margin-top: 80px; }
  .docs-table { display: block; overflow-x: auto; }
}
@media (max-width: 520px) { .pub-nav-actions .btn-outline { display: none; } .pub-nav-logo em { display: none; } }
