/* ===== CSS VARIABLES ===== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f3;
  --bg-tertiary: #efefec;
  --bg-info: #e6f1fb;
  --bg-success: #eaf3de;
  --bg-warning: #faeeda;
  --bg-danger: #fcebeb;

  --text-primary: #1a1a18;
  --text-secondary: #5f5e5a;
  --text-tertiary: #88877f;
  --text-info: #0c447c;
  --text-success: #27500a;
  --text-warning: #633806;
  --text-danger: #791f1f;

  --border: rgba(0,0,0,0.12);
  --border-med: rgba(0,0,0,0.2);

  --accent: #378ADD;
  --accent-hover: #185FA5;
  --accent-light: #e6f1fb;

  /* Colorblind-safe semantic colors (Okabe-Ito):
     Income = blue, Expense = vermillion/orange. Distinguishable under
     deuteranopia, protanopia, and tritanopia. Never rely on color alone —
     pair with text labels, icons, or shape in every chart. */
  --credit-color: #005A8C; /* deep blue text */
  --debit-color:  #8A3A00; /* deep orange text */
  --credit-bg:    #dbeafe; /* light blue tint */
  --debit-bg:     #fde4cf; /* light orange tint */

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --sidebar-width: 210px;
  --topbar-height: 54px;

  --font: -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Consolas', 'Courier New', monospace;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
}

/* DARK THEME */
body.dark {
  --bg-primary: #1c1c1a;
  --bg-secondary: #252523;
  --bg-tertiary: #2e2e2b;
  --bg-info: #042c53;
  --bg-success: #173404;
  --bg-warning: #412402;
  --bg-danger: #501313;

  --text-primary: #f0efe8;
  --text-secondary: #b4b2a9;
  --text-tertiary: #888780;
  --text-info: #b5d4f4;
  --text-success: #c0dd97;
  --text-warning: #fac775;
  --text-danger: #f7c1c1;

  --border: rgba(255,255,255,0.1);
  --border-med: rgba(255,255,255,0.2);

  --accent-light: #042c53;
  --credit-color: #56B4E9; /* sky blue text on dark */
  --debit-color:  #E69F00; /* warm orange text on dark */
  --credit-bg: #082842;
  --debit-bg:  #3a1e08;
}

/* ACCENT OVERRIDES */
body.accent-teal { --accent: #1D9E75; --accent-hover: #0F6E56; --accent-light: #e1f5ee; }
body.accent-purple { --accent: #7F77DD; --accent-hover: #534AB7; --accent-light: #eeedfe; }
body.accent-green { --accent: #639922; --accent-hover: #3B6D11; --accent-light: #eaf3de; }

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== LAYOUT ===== */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-primary);
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: width 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.sidebar.collapsed { width: 56px; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .logo-sub,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-item span { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 0.5px solid var(--border);
}
.logo-icon { height: 30px; width: auto; flex-shrink: 0; }
.logo-text { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.logo-sub { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }

.nav-section {
  font-size: 10px;
  color: var(--text-tertiary);
  padding: 12px 16px 4px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  border-right: 2px solid transparent;
  transition: all 0.12s;
}
.nav-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
  border-right-color: var(--accent);
}
.nav-item i { font-size: 16px; flex-shrink: 0; }

/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* TOPBAR */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-primary);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  flex-shrink: 0;
}
.topbar-title { font-size: 16px; font-weight: 500; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 18px; padding: 4px;
  border-radius: var(--radius-sm); display: flex; align-items: center;
}
.sidebar-toggle:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* CONTENT */
.content { flex: 1; overflow-y: auto; padding: 20px; }

/* PAGES */
.page { display: none; }
.page.active { display: block; }

/* ===== COMPONENTS ===== */

/* Cards */
.card {
  background: var(--bg-primary);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.card-flush .card-title { padding: 12px 16px 0; margin-bottom: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0.5px solid var(--border-med);
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.12s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-secondary); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--debit-color); color: #fff; border-color: var(--debit-color); }
.btn-danger:hover { opacity: 0.88; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 18px;
  padding: 4px; border-radius: var(--radius-sm);
  display: flex; align-items: center;
}
.btn-icon:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* Form elements */
.input-sm, .select-sm {
  padding: 5px 8px;
  border: 0.5px solid var(--border-med);
  border-radius: var(--radius-md);
  font-size: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.input-sm:focus, .select-sm:focus { outline: none; border-color: var(--accent); }

.input-md {
  width: 100%;
  padding: 7px 10px;
  border: 0.5px solid var(--border-med);
  border-radius: var(--radius-md);
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.input-md:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(55,138,221,0.12); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.form-full { grid-column: 1 / -1; }
.req { color: var(--debit-color); }
textarea.input-md { resize: vertical; min-height: 54px; }

/* Filter row */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.spacer { flex: 1; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  padding: 9px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg-secondary);
  white-space: nowrap;
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 0.5px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-secondary); }
.data-table .num { text-align: right; }
.empty-row td { text-align: center; padding: 28px; color: var(--text-tertiary); font-size: 13px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 12px;
  font-size: 10px; font-weight: 600;
  white-space: nowrap;
}
.badge-credit { background: var(--credit-bg); color: var(--credit-color); }
.badge-debit  { background: var(--debit-bg);  color: var(--debit-color); }
.badge-paid   { background: var(--bg-success); color: var(--text-success); }
.badge-pending{ background: var(--bg-warning); color: var(--text-warning); }
.badge-overdue{ background: var(--bg-danger);  color: var(--text-danger); }

/* Amounts */
.amount-credit { color: var(--credit-color); font-weight: 500; }
.amount-debit  { color: var(--debit-color);  font-weight: 500; }

/* Type toggle */
.type-toggle {
  display: flex;
  border: 0.5px solid var(--border-med);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.type-btn {
  flex: 1; padding: 9px;
  border: none; cursor: pointer;
  font-size: 13px; font-family: inherit;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: all 0.12s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.type-btn.active.credit { background: var(--credit-bg); color: var(--credit-color); font-weight: 500; }
.type-btn.active.debit  { background: var(--debit-bg);  color: var(--debit-color);  font-weight: 500; }

/* Metrics */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 14px;
}
.metric-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; font-weight: 500; }
.metric-value { font-size: 22px; font-weight: 500; line-height: 1.2; }
.metric-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.metric-pos { color: var(--credit-color); }
.metric-neg { color: var(--debit-color); }

/* Highlighted equity tiles — distinct from operational income/expense.
   Purple matches COLORS.net in charts.js so the visual language stays consistent. */
.metric-equity {
  border-left: 3px solid #785EF0;
  background: linear-gradient(to right, rgba(120,94,240,0.07), var(--bg-secondary) 70%);
  position: relative;
}
.metric-equity .metric-label::before {
  content: '◆';
  font-size: 8px;
  color: #785EF0;
  margin-right: 5px;
  vertical-align: middle;
}

/* Charts row */
.charts-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 760px) { .charts-row { grid-template-columns: 1fr; } }

.charts-row-3 { grid-template-columns: 1fr 1.4fr 1fr; }
@media (max-width: 980px) { .charts-row-3 { grid-template-columns: 1fr; } }

/* ===== Forecast insights ===== */
.insight-list { display: flex; flex-direction: column; gap: 10px; }
.insight-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.insight-group-title:first-child { margin-top: 0; }
.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--border);
}
.insight-icon { font-size: 20px; line-height: 1; padding-top: 2px; flex-shrink: 0; }
.insight-body { flex: 1; min-width: 0; }
.insight-title { font-weight: 500; font-size: 13px; margin-bottom: 4px; color: var(--text-primary); }
.insight-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.insight-warning { border-left-color: #E24B4A; }
.insight-warning .insight-icon { color: #E24B4A; }
.insight-success { border-left-color: #1D9E75; }
.insight-success .insight-icon { color: #1D9E75; }
.insight-idea    { border-left-color: #534AB7; }
.insight-idea    .insight-icon { color: #534AB7; }
.insight-info    { border-left-color: #185FA5; }
.insight-info    .insight-icon { color: #185FA5; }
.chart-wrap { position: relative; }

/* Head bars */
.head-bars { display: flex; flex-direction: column; gap: 10px; }
.hbar-row { display: flex; align-items: center; gap: 8px; }
.hbar-label { width: 100px; font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { flex: 1; height: 6px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s ease; }
.hbar-val { width: 80px; text-align: right; font-size: 12px; font-weight: 500; color: var(--text-primary); }

/* Balance summary */
.balance-summary { display: flex; gap: 20px; }
.balance-item { display: flex; flex-direction: column; gap: 1px; }
.balance-item .bl { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.balance-item .bv { font-size: 14px; font-weight: 500; }

/* Invoice grid */
.invoice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.inv-card {
  background: var(--bg-primary);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.inv-card:hover { border-color: var(--accent); }
.inv-no { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.inv-party { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.inv-amount { font-size: 19px; font-weight: 500; color: var(--accent); margin-bottom: 8px; }
.inv-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-bottom: 2px; }
.inv-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Progress bar */
.prog-cell { display: flex; align-items: center; gap: 8px; }
.mini-bar { flex: 1; height: 4px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; min-width: 60px; }
.mini-fill { height: 100%; border-radius: 4px; }
.prog-pct { font-size: 11px; color: var(--text-tertiary); min-width: 32px; }

/* Import */
.import-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
@media (max-width: 700px) { .import-layout { grid-template-columns: 1fr; } }
.import-card { min-height: 260px; }
.drop-zone {
  border: 1.5px dashed var(--border-med);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.drop-zone.over { background: var(--accent-light); border-color: var(--accent); }
.drop-icon { font-size: 40px; color: var(--accent); margin-bottom: 10px; }
.drop-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.drop-sub { font-size: 12px; color: var(--text-tertiary); margin-bottom: 14px; }
.import-info {
  background: var(--bg-info);
  color: var(--text-info);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
}
.import-help code {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  line-height: 1.7;
}

/* Export */
.export-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .export-layout { grid-template-columns: 1fr; } }
.export-btns { display: flex; flex-direction: column; gap: 10px; }
.export-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border: 0.5px solid var(--border-med);
  border-radius: var(--radius-md);
  cursor: pointer; background: var(--bg-primary);
  color: var(--text-primary); font-family: inherit;
  text-align: left; transition: all 0.12s;
}
.export-btn:hover { background: var(--bg-secondary); border-color: var(--border-med); }
.export-btn i { font-size: 22px; color: var(--accent); }
.export-btn span { font-size: 13px; font-weight: 500; display: block; }
.export-btn small { font-size: 11px; color: var(--text-tertiary); }
.export-btn-pdf i { color: var(--debit-color); }
.tally-preview {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre;
}

/* Settings */
.settings-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .settings-layout { grid-template-columns: 1fr; } }
.heads-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.head-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.head-item .head-type { font-size: 10px; color: var(--text-tertiary); margin-left: auto; }
.head-item .del-head { background: none; border: none; cursor: pointer; color: var(--text-tertiary); font-size: 14px; padding: 2px; }
.head-item .del-head:hover { color: var(--debit-color); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== BOTTOM TAB BAR (mobile only) ===== */
.bottom-tabs { display: none; }

/* ===== MOBILE LAYOUT ===== */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar-toggle { display: none; }
  .main { width: 100%; }
  .content { padding: 14px 12px calc(70px + env(safe-area-inset-bottom)); }

  .bottom-tabs {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 58px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-primary);
    border-top: 0.5px solid var(--border);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  }
  .bottom-tabs .nav-item {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 6px 0 0;
    font-size: 10.5px;
    color: var(--text-tertiary);
    border-right: none;
    border-top: 2px solid transparent;
  }
  .bottom-tabs .nav-item i { font-size: 21px; }
  .bottom-tabs .nav-item.active {
    background: none;
    color: var(--accent);
    font-weight: 600;
    border-right: none;
    border-top-color: var(--accent);
  }

  /* Topbar: compact, icon-only secondary actions, wraps if needed */
  .topbar { padding: 0 12px; gap: 6px; }
  .topbar-title { font-size: 15px; }
  .topbar-actions .btn .btn-label { display: none; }
  .topbar-actions .btn { padding: 8px; }
  #period-sel { max-width: 92px; }

  /* Comfortable touch targets */
  .btn { padding: 9px 14px; font-size: 13.5px; }
  .btn-sm { padding: 7px 11px; }
  .btn-icon { padding: 7px; font-size: 19px; }

  /* Prevent iOS Safari auto-zoom on focused form fields */
  .input-sm, .select-sm, .input-md, textarea.input-md { font-size: 16px; }

  /* Filter rows stack into full-width, thumb-friendly controls */
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-row > * { width: 100%; }
  .filter-row .spacer { display: none; }

  .metrics { gap: 8px; }
  .metric { padding: 11px; }
  .metric-value { font-size: 19px; }
}

/* ——— Trial badge (topbar) ——— */
.trial-topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
  flex-shrink: 0;
}
.trial-topbar-badge:hover { opacity: .85; }
.trial-topbar-badge.trial-safe   { background: #dcfce7; color: #15803d; }
.trial-topbar-badge.trial-warn   { background: #fef3c7; color: #92400e; }
.trial-topbar-badge.trial-urgent { background: #fee2e2; color: #b91c1c; animation: trial-pulse 1.6s ease-in-out infinite; }
@keyframes trial-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .65; }
}

/* ——— Trial sidebar banner ——— */
.trial-sidebar-banner {
  margin: 10px 10px 6px;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
}
.trial-sidebar-banner.trial-safe   { background: #f0fdf4; border: 1px solid #86efac; }
.trial-sidebar-banner.trial-warn   { background: #fffbeb; border: 1px solid #fcd34d; }
.trial-sidebar-banner.trial-urgent { background: #fff1f2; border: 1px solid #fca5a5; }
.trial-sidebar-banner .tsb-head {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.trial-sidebar-banner.trial-safe   .tsb-head { color: #15803d; }
.trial-sidebar-banner.trial-warn   .tsb-head { color: #92400e; }
.trial-sidebar-banner.trial-urgent .tsb-head { color: #b91c1c; }
.trial-sidebar-banner .tsb-sub {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 9px;
  line-height: 1.5;
}
.trial-sidebar-banner .tsb-btn {
  display: block;
  width: 100%;
  padding: 7px 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #fff;
}
.trial-sidebar-banner .tsb-btn:hover { opacity: .9; }

@media (max-width: 768px) {
  .trial-topbar-badge span.trial-label { display: none; }
}
