/* TomanPay admin panel — built on the TomanPay brand identity v1.0
   Ink carries the brand, mint gives the signal. Mint never used for text on light:
   mint-colored text uses Mint 700. Manrope for Latin, Vazirmatn for Persian (auto fallback). */

@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(fonts/vazirmatn-400.woff2) format("woff2"); }
@font-face { font-family: Vazirmatn; font-weight: 500; font-display: swap; src: url(fonts/vazirmatn-500.woff2) format("woff2"); }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url(fonts/vazirmatn-700.woff2) format("woff2"); }
@font-face { font-family: Vazirmatn; font-weight: 800; font-display: swap; src: url(fonts/vazirmatn-800.woff2) format("woff2"); }
@font-face { font-family: Vazirmatn; font-weight: 900; font-display: swap; src: url(fonts/vazirmatn-900.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(fonts/manrope-400.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 500; font-display: swap; src: url(fonts/manrope-500.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(fonts/manrope-600.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(fonts/manrope-700.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 800; font-display: swap; src: url(fonts/manrope-800.woff2) format("woff2"); }

:root {
  --mint: #3DDC97;        /* primary: buttons, highlights, success on dark */
  --mint-700: #0B7D51;    /* text-safe mint: links, success text on light */
  --mint-50: #E3F8EE;     /* success surface */
  --lilac: #A99BFF;       /* accent: tags, charts */
  --lilac-50: #EFECFF;
  --ink-900: #111315;
  --ink-700: #2A2E33;
  --ink-500: #5F656D;
  --ink-300: #B4B9BF;
  --ink-100: #E7E9EC;
  --ink-150: #D5D8DC;
  --paper: #F6F5F2;
  --white: #FFFFFF;
  --error: #C23030;
  --error-50: #FDECEC;
  --error-dark: #FF6B6B;
  --radius-card: 20px;
  --radius-control: 12px;
  --radius-button: 14px;
  /* semantic theme tokens (light) — components use these, never the raw palette,
     except on fixed-color surfaces (mint, lilac, the always-dark sidebar). */
  color-scheme: light;
  --bg: var(--paper);
  --surface: var(--white);
  --surface-2: var(--paper);
  --text: var(--ink-900);
  --text-2: var(--ink-700);
  --muted: var(--ink-500);
  --line: var(--ink-100);
  --line-strong: var(--ink-150);
  --dark: var(--ink-900);          /* brand-dark surfaces: sidebar, hero cards, toasts */
  --on-dark: var(--white);
  --invert-bg: var(--ink-900);     /* strongest contrast control: active tab, dark button */
  --invert-fg: var(--white);
  --success-text: var(--mint-700);
  --success-bg: var(--mint-50);
  --danger-text: var(--error);
  --danger-bg: var(--error-50);
  --info-bg: var(--lilac-50);
  --wait-text: #4A3FA8;
  --shadow-pop: 0 1px 0 var(--ink-150), 0 24px 48px -24px rgba(17, 19, 21, .35);
  --font: Manrope, Vazirmatn, system-ui, sans-serif;
  --sidebar: 256px;
}

/* Dark theme: follows the OS unless the user picked one (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C0D0F;
    --surface: #17191C;
    --surface-2: #1F2226;
    --text: #EEF0F2;
    --text-2: #C5CAD0;
    --muted: #8E959D;
    --line: #2A2E33;
    --line-strong: #383D43;
    --dark: #060708;
    --on-dark: var(--white);
    --invert-bg: #EEF0F2;
    --invert-fg: var(--ink-900);
    --success-text: var(--mint);
    --success-bg: rgba(61, 220, 151, .14);
    --danger-text: var(--error-dark);
    --danger-bg: rgba(255, 107, 107, .14);
    --info-bg: rgba(169, 155, 255, .16);
    --wait-text: #C9C0FF;
    --shadow-pop: 0 1px 0 #2A2E33, 0 24px 48px -24px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C0D0F;
  --surface: #17191C;
  --surface-2: #1F2226;
  --text: #EEF0F2;
  --text-2: #C5CAD0;
  --muted: #8E959D;
  --line: #2A2E33;
  --line-strong: #383D43;
  --dark: #060708;
  --on-dark: var(--white);
  --invert-bg: #EEF0F2;
  --invert-fg: var(--ink-900);
  --success-text: var(--mint);
  --success-bg: rgba(61, 220, 151, .14);
  --danger-text: var(--error-dark);
  --danger-bg: rgba(255, 107, 107, .14);
  --info-bg: rgba(169, 155, 255, .16);
  --wait-text: #C9C0FF;
  --shadow-pop: 0 1px 0 #2A2E33, 0 24px 48px -24px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { color: var(--success-text); text-decoration: none; }
a:hover { color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- brand mark / lockup */
.mark { display: block; flex: none; }
.lockup { display: flex; align-items: center; gap: 10px; }
.lockup .fa { font-family: Vazirmatn, Manrope, sans-serif; font-weight: 900; font-size: 22px; line-height: 1; }
.lockup .sep { width: 2px; height: 18px; background: var(--ink-700); }
.lockup .en { font-family: Manrope; font-weight: 800; font-size: 15px; letter-spacing: -.02em; direction: ltr; }

/* ---------------------------------------------------------------- app layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--dark); color: var(--on-dark); padding: 22px 14px; display: flex;
  flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .lockup { padding: 6px 10px 2px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-close {
  display: none; align-items: center; justify-content: center; width: 38px; height: 38px;
  background: none; border: 1px solid var(--ink-700); border-radius: 10px; color: var(--ink-300); cursor: pointer;
}
.menu-close:hover { color: var(--white); border-color: var(--ink-500); }
.menu-close .icon { width: 18px; height: 18px; }
.scrim { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .group { margin: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--ink-300); }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-300); font-weight: 600; font-size: 14.5px;
}
.nav a:hover { background: var(--ink-700); color: var(--white); }
.nav a.active { background: var(--mint); color: var(--ink-900); font-weight: 800; }
.nav a .icon { width: 18px; height: 18px; flex: none; }
.nav a .count {
  margin-inline-start: auto; background: var(--lilac); color: var(--ink-900);
  font-size: 12px; font-weight: 800; border-radius: 999px; padding: 0 8px; line-height: 20px;
}
.nav a.active .count { background: var(--ink-900); color: var(--mint); }
.sidebar .me { margin-top: auto; border-top: 1px solid var(--ink-700); padding: 14px 10px 0; display: flex; flex-direction: column; gap: 8px; }
.sidebar .me .who { font-size: 13px; color: var(--ink-300); }
.sidebar .me button { background: none; border: 1px solid var(--ink-700); color: var(--ink-300); border-radius: 10px; padding: 7px 10px; cursor: pointer; }
.sidebar .me button:hover { color: var(--white); border-color: var(--ink-500); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 22px clamp(16px, 3vw, 40px) 8px;
}
.topbar h1 { margin: 0; font-family: Vazirmatn, Manrope, sans-serif; font-weight: 900; font-size: clamp(24px, 3vw, 32px); line-height: 1.3; }
.topbar .actions { margin-inline-start: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.btn.menu-toggle { display: none; }
.btn.theme-toggle .icon { width: 18px; height: 18px; }
.content { padding: 12px clamp(16px, 3vw, 40px) 64px; display: flex; flex-direction: column; gap: 20px; max-width: 1320px; width: 100%; }

.banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-radius: 16px;
  padding: 14px 18px; font-weight: 700;
}
.banner.danger { background: var(--danger-bg); color: var(--danger-text); }
.banner.info { background: var(--info-bg); color: var(--text); }
.banner.ok { background: var(--success-bg); color: var(--success-text); }
.banner .grow { flex: 1; }

/* ---------------------------------------------------------------- cards & grids */
.card { background: var(--surface); border-radius: var(--radius-card); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.dark { background: var(--dark); color: var(--on-dark); }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-family: Vazirmatn, Manrope, sans-serif; font-weight: 800; font-size: 19px; line-height: 1.4; }
.card-head .spacer { flex: 1; }
.card.flush .card-head { padding: 18px 22px 4px; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

.stat { background: var(--surface); border-radius: var(--radius-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat .value { font-family: Vazirmatn, Manrope, sans-serif; font-weight: 800; font-size: 28px; line-height: 1.25; }
.stat .unit { font-family: Vazirmatn, Manrope, sans-serif; font-weight: 500; font-size: 14px; color: var(--muted); margin-inline-start: 6px; }
.stat .sub { font-size: 12.5px; color: var(--muted); }
.stat.hero { background: var(--dark); color: var(--on-dark); }
.stat.hero .label, .stat.hero .unit, .stat.hero .sub { color: var(--ink-300); }
.stat.hero .value { color: var(--mint); }
:root[data-theme="dark"] .stat.hero, :root[data-theme="dark"] .card.dark { box-shadow: inset 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stat.hero, :root:not([data-theme="light"]) .card.dark { box-shadow: inset 0 0 0 1px var(--line); } }
.stat.mint { background: var(--mint); }
.stat.mint .label, .stat.mint .unit, .stat.mint .sub { color: var(--ink-700); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 0; font-size: 14px; }
.kv > div { padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv > div:nth-child(odd) { color: var(--muted); padding-inline-end: 20px; }
.kv > div:nth-child(even) { font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px;
  padding: 0 18px; border-radius: var(--radius-button); border: 0; cursor: pointer;
  font-family: Vazirmatn, Manrope, sans-serif; font-weight: 800; font-size: 14.5px; white-space: nowrap;
  background: var(--mint); color: var(--ink-900); transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(.95); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.dark { background: var(--invert-bg); color: var(--invert-fg); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--text); font-weight: 700; }
.btn.ghost:hover { background: var(--surface); filter: none; }
.btn.danger { background: var(--danger-bg); color: var(--danger-text); }
.btn.danger.solid { background: var(--error); color: var(--white); }
.btn.lg { height: 56px; border-radius: 16px; font-size: 17px; padding: 0 24px; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn .icon { width: 17px; height: 17px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 44px; color: var(--text); border: 1.5px solid var(--line); border-radius: var(--radius-control);
  background: var(--surface); padding: 0 14px; font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px var(--info-bg); }
.input.ltr-input { direction: ltr; text-align: left; }
.input.code { font-family: Manrope; font-weight: 800; font-size: 26px; letter-spacing: .5em; text-align: center; height: 60px; direction: ltr; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .input, .toolbar .select { width: auto; min-width: 180px; flex: 1 1 200px; height: 40px; }
.toolbar .select { flex: 0 1 180px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line);
  border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--text-2);
}
.tab:hover { background: var(--surface); }
.tab.active { background: var(--invert-bg); color: var(--invert-fg); box-shadow: none; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th {
  text-align: start; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em;
  padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface);
}
table.t td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.link { cursor: pointer; }
table.t tbody tr.link:hover td { background: var(--surface-2); }
table.t td.amount { font-family: Vazirmatn, Manrope, sans-serif; font-weight: 800; white-space: nowrap; }
table.t td.end, table.t th.end { text-align: end; }
.cell-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px;
  font-size: 12.5px; font-weight: 800; white-space: nowrap; font-family: Vazirmatn, Manrope, sans-serif;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--success-bg); color: var(--success-text); }
.badge.bad { background: var(--danger-bg); color: var(--danger-text); }
.badge.wait { background: var(--info-bg); color: var(--wait-text); }
.badge.off { background: var(--line); color: var(--muted); }
.badge.dark { background: var(--dark); color: var(--mint); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.empty { padding: 42px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .mark { opacity: .18; }

/* ---------------------------------------------------------------- chart */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 10px; }
.chart .bar { flex: 1; min-width: 4px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.chart .bar span { display: block; background: var(--lilac); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.chart .bar:hover span { background: var(--text); }
.chart .bar.today span { background: var(--mint); }
.chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.chart-tip { font-size: 13px; color: var(--text-2); min-height: 22px; }

/* ---------------------------------------------------------------- modal & toast */
dialog.modal {
  border: 0; padding: 0; border-radius: 24px; width: min(520px, calc(100vw - 24px));
  box-shadow: var(--shadow-pop); background: var(--surface); color: var(--text);
}
dialog.modal::backdrop { background: rgba(17, 19, 21, .45); }
html:has(dialog.modal[open]) { overflow: hidden; }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-body h3 { margin: 0; font-family: Vazirmatn, Manrope, sans-serif; font-weight: 800; font-size: 20px; }
.modal-body .btn-row { justify-content: flex-end; }

.toasts { position: fixed; inset-block-end: 20px; inset-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 50; }
.toast {
  background: var(--dark); color: var(--on-dark); border-radius: 14px; padding: 12px 16px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow-pop); max-width: 380px;
  animation: toast-in .2s ease-out;
}
.toast.ok { border-inline-start: 4px solid var(--mint); }
.toast.bad { border-inline-start: 4px solid var(--error-dark); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.loading { padding: 40px; text-align: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.login-top { background: var(--dark); color: var(--on-dark); padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 64px) clamp(80px, 12vw, 140px); }
.login-top .lockup .fa { font-size: clamp(36px, 6vw, 56px); }
.login-top .lockup .en { font-size: clamp(22px, 3.4vw, 34px); }
.login-top .lockup .sep { height: clamp(28px, 4vw, 40px); width: 3px; }
.login-top p { margin: 18px 0 0; color: var(--ink-300); max-width: 520px; }
.login-card {
  width: min(440px, calc(100vw - 32px)); margin: calc(-1 * clamp(56px, 9vw, 100px)) auto 48px;
  background: var(--surface); border-radius: 28px; padding: 28px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 18px; align-self: start;
}
.login-card h2 { margin: 0; font-family: Vazirmatn, Manrope, sans-serif; font-weight: 900; font-size: 24px; }
.login-card .note { font-size: 13px; color: var(--muted); line-height: 1.8; }
.error-text { color: var(--danger-text); font-weight: 700; font-size: 14px; }

/* ---------------------------------------------------------------- statement list */
.list { display: flex; flex-direction: column; }
.list .row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list .row:last-child { border-bottom: 0; }
.list .row .grow { flex: 1; min-width: 0; }
.plus { color: var(--success-text); font-weight: 800; font-family: Vazirmatn, Manrope, sans-serif; }
.minus { color: var(--danger-text); font-weight: 800; font-family: Vazirmatn, Manrope, sans-serif; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: min(290px, 86vw); height: 100dvh;
    z-index: 40; transform: translateX(100%); visibility: hidden; overscroll-behavior: contain;
    transition: transform .2s, visibility 0s .2s;
  }
  .sidebar.open { transform: none; visibility: visible; box-shadow: var(--shadow-pop); transition: transform .2s; }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 39; background: rgba(17, 19, 21, .45);
    opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .sidebar.open + .scrim { opacity: 1; pointer-events: auto; }
  html.nav-open, html.nav-open body { overflow: hidden; }
  .menu-close { display: inline-flex; }
  .btn.menu-toggle { display: inline-flex; }
  .topbar { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- bot content editor */
.ui-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.ui-card { background: var(--surface); border-radius: var(--radius-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.ui-card.customized { box-shadow: inset 0 0 0 2px var(--mint); }
.ui-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ui-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; color: var(--success-text); direction: ltr; }
.ui-head .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 3px 10px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 700; }
.chip.mono { font-family: ui-monospace, Menlo, Consolas, monospace; direction: ltr; }
/* Preview of the Telegram button (Telegram's own colors, not brand colors) */
.tg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 120px; padding: 7px 16px; border-radius: 10px; font-family: Vazirmatn, Manrope, sans-serif; font-weight: 700; font-size: 14px; background: #EEF0F3; color: #111315; }
.tg-btn.primary { background: #2F80ED; color: #fff; }
.tg-btn.success { background: #2FA84F; color: #fff; }
.tg-btn.danger { background: #E5484D; color: #fff; }
.tg-btn .star { font-size: 13px; opacity: .85; }
.ui-default { font-size: 12.5px; color: var(--muted); }
.ui-default summary { cursor: pointer; font-weight: 700; }
.ui-default pre { white-space: pre-wrap; font-family: Vazirmatn, Manrope, sans-serif; font-size: 13px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 8px 0 0; }
.ui-card .textarea { min-height: 90px; font-size: 14px; }

/* ---------------------------------------------------------------- theme switch */
.login-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.theme-toggle.on-dark {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  background: none; border: 1px solid var(--ink-700); border-radius: 12px; color: var(--ink-300); cursor: pointer;
}
.theme-toggle.on-dark:hover { color: var(--white); border-color: var(--ink-500); }
.theme-toggle.on-dark .icon { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- agent branding */
.brand-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--surface-2); display: block; }
.brand-pending { align-items: center; }
