/* FinCtrl UI fixes (Nov 2026 review). Loaded after CSS.css and landing.css. */

/* Author "display: grid/flex" rules would otherwise override the hidden attribute */
form[hidden], .filters [hidden], .filters-count[hidden] { display: none !important; }

/* ===== Desktop: keep page headings clear of the fixed top bar ===== */
@media (min-width: 1025px) {
  body:not(.auth-mode) .content {
    padding-top: calc(var(--topbar-height) + 1.5rem);
  }
}

/* ===== Public footer (Privacy · Terms…) only on the login/home screen ===== */
body:not(.auth-mode) .auth-footer { display: none !important; }

/* ===== Dashboard ===== */
/* "Total spent": neutral / amber / red by % of budget (set in setSpentTone) */
#dashboard .kpi-value:has(#totalSpent) { color: var(--text-primary); }
#dashboard .kpi-value.warning:has(#totalSpent) { color: var(--warning-color); }
#dashboard .kpi-value.negative:has(#totalSpent) { color: var(--danger-color); }

/* Budget bar: full width under the cards, with a label */
#dashboard .budget-progress-container {
  grid-column: 1 / -1;
  height: auto;
  border: 0;
  background: transparent;
  overflow: visible;
  margin-top: 0.25rem;
}

#dashboard .budget-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

#dashboard .budget-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease, background 0.4s ease;
}

.budget-progress-label {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Phones and small tablets: two cards per row instead of one long column */
@media (max-width: 768px) {
  #dashboard .cards.grid-4,
  #dashboard .income-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  #dashboard .income-kpis > :first-child { grid-column: 1 / -1; }

  #dashboard .kpi { padding: 0.9rem; min-width: 0; }
  #dashboard .kpi-label { font-size: 0.7rem; letter-spacing: 0.03em; }
  #dashboard .kpi-value { font-size: 1.3rem; overflow-wrap: anywhere; }
  #dashboard .kpi-sub { font-size: 0.75rem; }
}

/* ===== Transactions: search + "Filters" button ===== */
.search-with-toggle {
  display: flex;
  gap: 8px;
}

.search-with-toggle input { flex: 1; min-width: 0; }

.filters-toggle {
  display: none;               /* desktop shows all filters, no toggle needed */
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filters-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .filters-toggle { display: inline-flex; }
  .filters .search-row { grid-column: 1 / -1; }
  /* Only the search bar until "Filters" is tapped */
  .filters:not(.filters-open) > .form-row:not(.search-row) { display: none; }
  .filters { padding: 1rem; }
}

/* ===== Transactions: compact list on phones (no sideways scrolling) ===== */
@media (max-width: 640px) {
  #history .table-wrap { overflow: visible; padding: 0.5rem 0; }
  #history table, #history tbody { display: block; width: 100% !important; min-width: 0 !important; }
  #history tr.txn-row { width: 100%; box-sizing: border-box; }
  #history thead { display: none; }

  #history tr.txn-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "desc desc amt"
      "date cat  act";
    align-items: center;
    column-gap: 12px;
    row-gap: 6px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
  }

  #history tr.txn-row td {
    display: block;
    padding: 0;
    border: 0;
    white-space: normal;
    text-align: left;
  }

  #history .col-desc {
    grid-area: desc;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
  }

  #history .col-amt {
    grid-area: amt;
    text-align: right !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  /* date + category on the second line */
  #history .col-date,
  #history .col-cat {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap !important;
  }
  #history .col-date { grid-area: date; }
  #history .col-cat { grid-area: cat; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  #history .col-cat .category-badge { font-size: 0.72rem; padding: 2px 8px; }

  #history .col-act {
    grid-area: act;
    display: flex !important;
    gap: 6px;
    justify-content: flex-end;
  }
  #history .col-act .btn.small { padding: 6px 9px; }

  /* the empty-state row */
  #history tr:not(.txn-row) { display: block; }
  #history tr:not(.txn-row) td { display: block; text-align: center; }

  .transaction-summary .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .transaction-summary .summary-value { font-size: 1rem; overflow-wrap: anywhere; }
  .transaction-summary .summary-label { font-size: 0.75rem; }
}

/* ===== Recent transactions on phones: 2 lines instead of 4 cramped columns ===== */
@media (max-width: 640px) {
  #recentList li {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name amt"
      "date cat";
    column-gap: 12px;
    row-gap: 2px;
  }
  #recentList .recent-name { grid-area: name; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #recentList .recent-amt { grid-area: amt; text-align: right; }
  #recentList .recent-muted:nth-of-type(2) { grid-area: date; font-size: 0.8rem; white-space: nowrap; }
  #recentList .recent-muted:nth-of-type(3) { grid-area: cat; font-size: 0.8rem; text-align: right; white-space: nowrap; }
}

/* ===== "+ New goal / + New subscription" buttons ===== */
.form-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

/* ===== Settings: About & Legal links ===== */
.settings-links {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.settings-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
}

.settings-links a:hover { background: var(--primary-light); color: var(--text-primary); }
.settings-links i { width: 18px; color: var(--primary-color); }

/* ===== Getting-started checklist (dashboard) ===== */
.getting-started {
  margin-bottom: 1.5rem;
  border: 1px solid rgba(124, 58, 237, 0.45);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124, 58, 237, 0.18), transparent 60%),
    var(--bg-card);
}

.getting-started[hidden] { display: none; }

.gs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gs-head h3 { margin: 0 0 4px; }
.gs-head p { margin: 0; }
.gs-dismiss { font-size: 1.3rem; line-height: 1; }

.gs-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-surface);
  overflow: hidden;
  margin: 14px 0 6px;
}

.gs-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.4s ease;
}

.gs-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.gs-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.gs-steps li:last-child { border-bottom: 0; }

.gs-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}

.gs-steps li.done .gs-check {
  background: var(--success-color);
  border-color: var(--success-color);
  color: #fff;
}

.gs-steps li.done .gs-title { color: var(--text-muted); text-decoration: line-through; }
.gs-done-label { font-size: 0.8rem; color: var(--success-color); font-weight: 600; }
.gs-steps .btn.small { white-space: nowrap; }

/* ===== Invite dialog ===== */
.invite-dialog {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.invite-dialog h3 { margin: 0; }

.invite-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 420px) {
  .invite-actions { grid-template-columns: 1fr; }
}

.invite-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.invite-whatsapp { background: #25d366 !important; color: #fff !important; border: 0; }
.invite-whatsapp:hover { filter: brightness(1.05); }

.invite-link {
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== This month vs last month (dashboard) ===== */
.month-compare { margin-bottom: 1.5rem; }
.month-compare[hidden] { display: none; }
.month-compare h3 { margin: 0 0 8px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.month-compare h3 i { color: var(--primary-color); }
.mc-headline { margin: 0 0 10px; color: var(--text-secondary); line-height: 1.55; }
.mc-headline strong { color: var(--text-primary); }
.mc-change { font-weight: 700; white-space: nowrap; }
.mc-change.good { color: var(--success-color); }
.mc-change.bad { color: var(--danger-color); }
.mc-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mc-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.mc-lines li span { color: var(--text-muted); }
.mc-lines li b { text-align: right; }

/* ===== Recurring income ===== */
.repeat-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.repeat-check input { width: 18px; height: 18px; accent-color: var(--primary-color); flex: none; }
.recurring-list { display: grid; gap: 8px; margin-top: 10px; }
.recurring-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

/* ===== What's new (returning users) ===== */
.whats-new {
  margin-bottom: 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(59, 130, 246, 0.16), transparent 60%),
    var(--bg-card);
}
.whats-new[hidden] { display: none; }

/* ===== Monthly recap (first week of the month) ===== */
.monthly-recap {
  margin-bottom: 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(16, 185, 129, 0.14), transparent 60%),
    var(--bg-card);
}
.monthly-recap[hidden] { display: none; }
.monthly-recap h3 { display: flex; align-items: center; gap: 8px; }
.monthly-recap h3 i { color: var(--success-color); }
.recap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.recap-stat { padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.recap-stat span { display: block; color: var(--text-muted); font-size: 0.8rem; }
.recap-stat b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.recap-stat b.good, .monthly-recap .mc-lines b.good { color: var(--success-color); }
.recap-stat b.bad, .monthly-recap .mc-lines b.bad { color: var(--danger-color); }
#dashboard .monthly-recap { grid-column: 1 / -1; }
.whats-new h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.whats-new h3 i { color: var(--secondary-color); }
.wn-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.wn-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; }
.wn-list li i { color: var(--primary-color); margin-top: 3px; }
.wn-list strong { display: block; color: var(--text-primary); }
.wn-list span { color: var(--text-secondary); font-size: 0.9rem; }
.wn-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* =====================================================================
   UI polish (Nov 2026): readability, calmer colours, consistent buttons.
   Brand colours unchanged. Dark theme is the default; light theme keeps
   its own values from CSS.css.
   ===================================================================== */

/* 1 + 8. Brighter secondary text, clearer card separation (dark theme) */
:root:not([data-theme="light"]) {
  --text-muted: #a4a8c8;          /* was #8a8ab5: easier to read, still clearly secondary */
  --bg-card: #171a2d;             /* solid instead of translucent: cards stand off the page */
  --border-color: #2b2f4d;
}

/* 2. Small text a little larger on phones */
@media (max-width: 768px) {
  #dashboard .kpi-label { font-size: 0.75rem; }
  #dashboard .kpi-sub { font-size: 0.8rem; }
  .recent-muted, .summary-label { font-size: 0.85rem; }
}

/* 3. Same-width digits so amounts line up */
.kpi-value, .amount-cell, .recent-amt, .category-amount, .summary-value,
.stat-value, td, .mc-lines b, .center-value {
  font-variant-numeric: tabular-nums;
}

/* 4. Green only for good money news: counts and neutral values are plain */
.kpi-value { color: var(--text-primary); }
#incomeMonth, #netMonth.positive, #savingsRate.positive { color: var(--success-color); }
#netMonth.negative, #savingsRate.negative { color: var(--danger-color); }

/* 5. "Month so far" card uses the full width of the dashboard grid */
#dashboard .month-compare { grid-column: 1 / -1; }

/* 6. One secondary-button style: outlined, purple on hover */
.btn:not(.primary):not(.danger):not(.btn-primary):not(.invite-whatsapp) {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn:not(.primary):not(.danger):not(.btn-primary):not(.invite-whatsapp):hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
}

/* 7. Quiet delete buttons in lists: grey icon, red only on hover / tap.
      Big "Clear all data" / "Delete account" buttons stay red on purpose. */
.btn.small.danger {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-muted);
}
.btn.small.danger:hover, .btn.small.danger:focus-visible, .btn.small.danger:active {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

/* 8. Softer shadows (cards already separate by colour + border) */
.card { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }

/* 9. Sidebar group labels */
.nav-group-label {
  margin: 0.6rem 0.25rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.85;
}
.nav-group-label:first-child { margin-top: 0; }
.nav { gap: 0.15rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.nav-item { padding-top: 0.55rem; padding-bottom: 0.55rem; }

/* 10. Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}
.btn:focus-visible, .nav-item:focus-visible, a:focus-visible { border-radius: var(--radius-md); }

/* Desktop with a mouse: compact sidebar so all items fit on a 768-800px tall laptop
   (phones keep 48px touch targets) */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
  .sidebar .nav-item { min-height: 40px; }
  .sidebar-footer {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
  }
  .sidebar-footer #logoutBtn { flex: 1; }
}

/* =====================================================================
   Settings polish: category budgets, export, danger zone
   ===================================================================== */

/* ----- Category budgets ----- */
.cb-total {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
}
.cb-total.over { background: rgba(245, 158, 11, 0.12); color: var(--warning-color); }

.category-budget-list {
  max-height: none;
  overflow: visible;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
}

.cb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  grid-template-areas:
    "info  input"
    "meter meter";
  align-items: center;
  column-gap: 12px;
  row-gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  transition: border-color 0.2s ease;
}
.cb-row:focus-within { border-color: var(--primary-color); }
.cb-row[data-state="warn"] { border-color: rgba(245, 158, 11, 0.55); }
.cb-row[data-state="over"] { border-color: rgba(239, 68, 68, 0.6); }

.cb-info { grid-area: info; display: flex; align-items: center; gap: 10px; min-width: 0; }
.cb-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cb-name { font-weight: 600; color: var(--text-primary); }
.cb-spent { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

.cb-input {
  grid-area: input;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: text;
}
.cb-input:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
.cb-input span { color: var(--text-muted); font-weight: 600; }
.cb-input input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: var(--text-primary);
  font: inherit;
  font-variant-numeric: tabular-nums;
  padding: 0 !important;
  box-shadow: none !important;
  -moz-appearance: textfield;
}
.cb-input input::-webkit-outer-spin-button,
.cb-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cb-input input::placeholder { color: var(--text-muted); opacity: 0.8; }

.cb-meter { grid-area: meter; }
.cb-meter[hidden] { display: none; }
.cb-bar { height: 6px; border-radius: 999px; background: var(--bg-card); overflow: hidden; }
.cb-bar span { display: block; height: 100%; border-radius: 999px; background: var(--success-color); transition: width 0.3s ease; }
.cb-row[data-state="warn"] .cb-bar span { background: var(--warning-color); }
.cb-row[data-state="over"] .cb-bar span { background: var(--danger-color); }
.cb-status { margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cb-row[data-state="warn"] .cb-status { color: var(--warning-color); }
.cb-row[data-state="over"] .cb-status { color: var(--danger-color); }

.cb-actions { display: flex; justify-content: flex-end; }

@media (max-width: 480px) {
  .cb-row { grid-template-columns: minmax(0, 1fr) 120px; padding: 10px 12px; }
  .cb-actions .btn { width: 100%; }
}

/* ----- Export ----- */
.export-block { margin-bottom: 1.25rem; }
.export-title { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.export-block .muted { margin: 0 0 10px; }
.export-row { display: flex; gap: 8px; }
.export-row select { flex: 1; min-width: 0; }
.export-row .btn { white-space: nowrap; }

/* ----- Danger zone: calm but unmistakable ----- */
.danger-zone {
  margin-top: 0.5rem;
  padding: 1rem 1.1rem 0.25rem;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.05);
}
.danger-zone::before { display: none; }
.danger-zone h4 { font-size: 0.95rem; margin-bottom: 0.5rem; }

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(239, 68, 68, 0.18);
}
.danger-text { min-width: 0; }
.danger-text strong { display: block; color: var(--text-primary); font-size: 0.95rem; }
.danger-text span { display: block; color: var(--text-muted); font-size: 0.82rem; line-height: 1.45; margin-top: 2px; }

/* !important: beats the general outlined-secondary-button rule above */
.btn.danger-outline {
  flex: none;
  background: transparent !important;
  border: 1px solid rgba(239, 68, 68, 0.6) !important;
  color: #f87171 !important;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  white-space: nowrap;
}
.btn.danger-outline:hover, .btn.danger-outline:focus-visible {
  background: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
  color: #fff !important;
}
[data-theme="light"] .btn.danger-outline:not(:hover) { color: var(--danger-color) !important; }

@media (max-width: 480px) {
  .danger-row { flex-direction: column; align-items: stretch; }
  .btn.danger-outline { width: 100%; }
}

/* Category budgets get the full width of Settings; rows in two columns on wide screens */
.settings-grid .cb-card { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .cb-card .category-budget-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.cb-card .cb-total { max-width: 760px; }

/* Danger rows: text on top, button below (cards are narrow in the Settings grid) */
.danger-row { flex-direction: column; align-items: flex-start; gap: 10px; }

/* ===== Tablets (769–1024 px): slide-out menu like phones =====
   Before, the menu stayed open here while the page used the full width, so it covered the content. */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 24px rgba(0, 0, 0, 0.35); z-index: 9999; }
  .sidebar.active, body.sidebar-open .sidebar { transform: translateX(0); }
  .menu-btn { display: block; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-primary); z-index: 10000; position: relative; }
  #sidebarOverlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: none; z-index: 900; }
  #sidebarOverlay.active { display: block; pointer-events: auto !important; }
}

/* Android app with native Google sign-in available: show the Google button again (hidden in older app versions) */
html.in-app.native-google .google-signin.web-only { display: block !important; }

/* Login card logo: the same "FC" mark as the app icon and website header */
.piggy.piggy-fc { color: #fff; font-weight: 800; font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1; }

/* Settings → Notifications: permission status + actions */
.notif-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; margin: 4px 0 14px;
  border: 1px solid var(--border-color); border-radius: var(--radius-md); background: rgba(16, 185, 129, 0.08); }
.notif-status > i { color: var(--success-color); }
.notif-status[data-state="off"], .notif-status[data-state="ask"], .notif-status[data-state="blocked"] { background: rgba(245, 158, 11, 0.10); }
.notif-status[data-state="off"] > i, .notif-status[data-state="ask"] > i, .notif-status[data-state="blocked"] > i { color: var(--warning-color); }
.notif-status > span { flex: 1 1 220px; }
.notif-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notif-actions [hidden] { display: none !important; }   /* .btn's display would otherwise show it */
.preferences .checkbox small { display: block; margin-top: 2px; font-size: 0.8rem; }

/* ===== FinCtrl dialogs (confirm / amount) ===== */
.fc-dialog-overlay {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 8, 20, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .16s ease;
}
.fc-dialog-overlay.open { opacity: 1; }
.fc-dialog {
  width: 100%; max-width: 400px; text-align: center;
  background: var(--bg-secondary, #1a1a2e); color: var(--text-primary);
  border: 1px solid var(--border-color); border-radius: 20px;
  padding: 26px 22px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  transform: translateY(10px) scale(.98); transition: transform .18s ease;
}
.fc-dialog-overlay.open .fc-dialog { transform: none; }
.fc-dialog-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.4rem; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #3b82f6); box-shadow: 0 10px 26px rgba(124, 58, 237, .35);
}
.fc-dialog[data-tone="danger"] .fc-dialog-icon { background: linear-gradient(135deg, #ef4444, #f97316); box-shadow: 0 10px 26px rgba(239, 68, 68, .3); }
.fc-dialog h3 { margin: 0 0 6px; font-size: 1.15rem; }
.fc-dialog-msg { margin: 0 0 16px; color: var(--text-secondary); line-height: 1.5; }
.fc-dialog-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.fc-dialog-info div { padding: 8px 6px; border: 1px solid var(--border-color); border-radius: 12px; }
.fc-dialog-info span { display: block; font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.fc-dialog-info b { font-size: .95rem; font-variant-numeric: tabular-nums; }
.fc-dialog-amount {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; margin: 0 0 6px;
  border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-surface, rgba(255,255,255,.04));
}
.fc-dialog-amount:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(124, 58, 237, .2); }
.fc-dialog-amount span { color: var(--text-muted); font-weight: 600; }
.fc-dialog-amount input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important;
  padding: 12px 0 !important; font-size: 1.25rem; font-weight: 700; color: var(--text-primary); outline: none; }
.fc-dialog-error { margin: 4px 0 0; color: var(--danger-color); font-size: .85rem; }
.fc-dialog-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 2px; }
.fc-dialog-quick .chip { border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary);
  border-radius: 999px; padding: 6px 12px; font-size: .85rem; cursor: pointer; }
.fc-dialog-quick .chip:hover { border-color: var(--primary-color); color: var(--text-primary); }
.fc-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.fc-dialog-actions .btn { width: 100%; justify-content: center; padding: 11px 14px; }
@media (prefers-reduced-motion: reduce) { .fc-dialog-overlay, .fc-dialog { transition: none; } }

/* ===== Analytics page ===== */
.an-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.an-toolbar .an-periods { margin: 0; }
.an-range { white-space: nowrap; }
.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.an-kpi {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: 14px 16px; border-radius: var(--radius-lg, 16px);
  background: var(--bg-card); border: 1px solid var(--border-color, rgba(148,163,184,.15));
  box-shadow: var(--shadow-sm, none); overflow: hidden;
}
.an-kpi-icon {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: .9rem;
  background: rgba(124, 58, 237, .14); color: #a78bfa;
}
.an-kpi-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
.an-kpi-value { font-size: 1.45rem; font-weight: 700; color: var(--text-primary); line-height: 1.25; padding-right: 40px; overflow-wrap: anywhere; }
.an-kpi-sub { font-size: .8rem; color: var(--text-secondary); }
.an-kpi.hero { background: linear-gradient(135deg, #7c3aed, #4f46e5 60%, #3b82f6); border-color: transparent; }
.an-kpi.hero .an-kpi-label, .an-kpi.hero .an-kpi-sub { color: rgba(255,255,255,.82); }
.an-kpi.hero .an-kpi-value { color: #fff; }
.an-kpi.hero .an-kpi-icon { background: rgba(255,255,255,.18); color: #fff; }
.an-kpi.good .an-kpi-value { color: var(--success-color, #10b981); }
.an-kpi.good .an-kpi-icon { background: rgba(16,185,129,.14); color: #10b981; }
.an-kpi.bad .an-kpi-value { color: var(--danger-color, #ef4444); }
.an-kpi.bad .an-kpi-icon { background: rgba(239,68,68,.14); color: #ef4444; }
.an-kpi.neutral .an-kpi-icon { background: rgba(148,163,184,.14); color: var(--text-muted); }

.an-card .section-header h3 { display: flex; align-items: center; gap: 8px; }
.an-card .section-header h3 i { color: #a78bfa; font-size: .95em; }
.an-sub { margin: -4px 0 8px; }

.an-cat-list { margin: 0; padding: 0; list-style: none; }
.an-cat-list li.an-cat { display: block; padding: 10px 0; border-bottom: 1px solid var(--border-color, rgba(148,163,184,.12)); }
.an-cat-list li.an-cat:last-child { border-bottom: 0; }
.an-cat-top { display: flex; align-items: center; gap: 10px; }
.an-cat-top .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.an-cat-top .category-name { flex: 1; min-width: 0; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-cat-top .category-amount { font-weight: 700; color: var(--text-primary); }
.an-bar { height: 8px; margin: 8px 0 6px; border-radius: 99px; background: var(--progress-bg, rgba(148,163,184,.14)); overflow: hidden; }
.an-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 60%, #fff)); transition: width .6s ease; }
.an-cat-meta { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--text-muted); }
.an-chg { font-weight: 600; padding: 1px 8px; border-radius: 99px; font-size: .74rem; }
.an-chg.up { color: #ef4444; background: rgba(239,68,68,.12); }
.an-chg.down { color: #10b981; background: rgba(16,185,129,.12); }
.an-chg.new { color: #60a5fa; background: rgba(59,130,246,.12); }
.an-empty { margin-top: 8px; }

.an-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.an-insight {
  --t: #7c3aed;
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md, 12px);
  background: color-mix(in srgb, var(--t) 9%, transparent); border: 1px solid color-mix(in srgb, var(--t) 22%, transparent);
}
.an-insight[data-tone="green"] { --t: #10b981; }
.an-insight[data-tone="red"] { --t: #ef4444; }
.an-insight[data-tone="amber"] { --t: #f59e0b; }
.an-insight[data-tone="blue"] { --t: #3b82f6; }
.an-insight-icon { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--t); color: #fff; font-size: .85rem; }
.an-insight p { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--text-secondary); }
.an-insight strong { color: var(--text-primary); }
.an-none { margin: 0; }
.an-none i { color: #10b981; margin-right: 6px; }

.chart-container.an-trend { height: 300px; }
.chart-container.an-week { height: 240px; }

.an-top { list-style: none; margin: 0; padding: 0; }
.an-top li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color, rgba(148,163,184,.12)); }
.an-top li:last-child { border-bottom: 0; }
.an-rank { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem;
  color: #fff; background: var(--c, #7c3aed); }
.an-top-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.an-top-main strong { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-top-main small { color: var(--text-muted); font-size: .78rem; }
.an-top-amt { font-weight: 700; color: var(--text-primary); white-space: nowrap; }

@media (max-width: 900px) { .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .an-kpis { gap: 8px; }
  .an-kpi { padding: 12px; }
  .an-kpi-value { font-size: 1.15rem; padding-right: 30px; }
  .an-kpi-icon { width: 28px; height: 28px; top: 10px; right: 10px; font-size: .78rem; }
  .an-toolbar .an-periods { width: 100%; }
  .chart-container.an-trend { height: 250px; }
}

/* ===== Settings: Data management ===== */
.dm-section { padding: 16px; border-radius: var(--radius-lg, 16px); border: 1px solid var(--border-color, rgba(148,163,184,.15));
  background: color-mix(in srgb, var(--bg-surface, #1e1e36) 60%, transparent); margin-bottom: 14px; }
.dm-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.dm-head h4 { margin: 0 0 2px; font-size: 1rem; color: var(--text-primary); }
.dm-head p { margin: 0; }
.dm-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #3b82f6); box-shadow: 0 6px 16px rgba(124,58,237,.3); }
.dm-icon-alt { background: linear-gradient(135deg, #10b981, #06b6d4); box-shadow: 0 6px 16px rgba(16,185,129,.28); }
.dm-formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.dm-format {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer;
  padding: 12px; border-radius: var(--radius-md, 12px); font: inherit; color: var(--text-secondary);
  background: var(--bg-card); border: 1.5px solid var(--border-color, rgba(148,163,184,.18));
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.dm-format i { font-size: 1.35rem; margin-bottom: 6px; color: var(--text-muted); }
.dm-format strong { color: var(--text-primary); font-size: .92rem; }
.dm-format span { font-size: .76rem; color: var(--text-muted); }
.dm-format:hover { transform: translateY(-1px); border-color: rgba(124,58,237,.5); }
.dm-format.active { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.18); background: color-mix(in srgb, #7c3aed 8%, var(--bg-card)); }
.dm-format[data-format="csv"].active i { color: #10b981; }
.dm-format[data-format="json"].active i { color: #3b82f6; }
.dm-format[data-format="pdf"].active i { color: #ef4444; }
.dm-format:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; }
.dm-go { width: 100%; justify-content: center; }
.dm-drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer;
  padding: 22px 16px; border-radius: var(--radius-md, 12px); border: 2px dashed rgba(16,185,129,.45);
  background: rgba(16,185,129,.05); transition: background .15s, border-color .15s;
}
.dm-drop > i { font-size: 1.9rem; color: #10b981; margin-bottom: 4px; }
.dm-drop strong { color: var(--text-primary); }
.dm-drop-hint { font-size: .82rem; color: var(--text-muted); }
.dm-safe { margin-top: 6px; font-size: .75rem; color: #10b981; font-weight: 600; }
.dm-safe i { margin-right: 4px; }
.dm-drop:hover, .dm-drop.dragging { background: rgba(16,185,129,.12); border-color: #10b981; }
.dm-section { container-type: inline-size; }
@container (max-width: 460px) {
  .dm-formats { grid-template-columns: 1fr; }
  .dm-format { flex-direction: row; align-items: center; gap: 10px; }
  .dm-format i { margin: 0; width: 26px; text-align: center; }
  .dm-format span { margin-left: auto; text-align: right; }
}

/* ===== Reports preview (the PDF uses REPORT_PRINT_CSS in app-reports.js) ===== */
.rpt-screen { color: var(--text-secondary); font-size: .92rem; }
.rpt-screen .rpt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 14px; margin-bottom: 16px;
  border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, #7c3aed, #3b82f6) 1; }
.rpt-screen .rpt-brand { display: flex; align-items: center; gap: 10px; }
.rpt-screen .rpt-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #7c3aed, #3b82f6); box-shadow: 0 6px 16px rgba(124,58,237,.3); }
.rpt-screen .rpt-brand strong { display: block; color: var(--text-primary); font-size: 1.1rem; line-height: 1.1; }
.rpt-screen .rpt-brand small { color: var(--text-muted); font-size: .78rem; }
.rpt-screen .rpt-meta { text-align: right; display: flex; flex-direction: column; font-size: .8rem; color: var(--text-muted); }
.rpt-screen .rpt-meta strong { color: var(--text-primary); font-size: 1.05rem; }
.rpt-screen .rpt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.rpt-screen .rpt-kpi { display: flex; flex-direction: column; min-width: 0; padding: 12px; border-radius: var(--radius-md, 12px);
  background: var(--bg-surface, rgba(148,163,184,.06)); border: 1px solid var(--border-color, rgba(148,163,184,.15)); }
.rpt-screen .rpt-kpi span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
.rpt-screen .rpt-kpi strong { font-size: 1.2rem; color: var(--text-primary); overflow-wrap: anywhere; }
.rpt-screen .rpt-kpi small { font-size: .74rem; color: var(--text-muted); }
.rpt-screen .rpt-kpi.primary { background: linear-gradient(135deg, #7c3aed, #4f46e5); border-color: transparent; }
.rpt-screen .rpt-kpi.primary span, .rpt-screen .rpt-kpi.primary small { color: rgba(255,255,255,.8); }
.rpt-screen .rpt-kpi.primary strong { color: #fff; }
.rpt-screen .rpt-kpi.good strong { color: var(--success-color, #10b981); }
.rpt-screen .rpt-kpi.bad strong { color: var(--danger-color, #ef4444); }
.rpt-screen .rpt-lead { margin: 0 0 16px; padding: 12px 14px; border-left: 3px solid #7c3aed; border-radius: 0 10px 10px 0;
  background: rgba(124,58,237,.08); line-height: 1.55; }
.rpt-screen strong { color: var(--text-primary); }
.rpt-screen .rpt-section { margin-bottom: 18px; }
.rpt-screen .rpt-section h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #a78bfa; margin: 0 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border-color, rgba(148,163,184,.15)); }
.rpt-screen .rpt-hint { margin: -2px 0 8px; font-size: .78rem; color: var(--text-muted); }
.rpt-screen .rpt-section:has(.rpt-table) { overflow-x: auto; }
.rpt-screen .rpt-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.rpt-screen .rpt-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
  font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border-color, rgba(148,163,184,.2)); white-space: nowrap; }
.rpt-screen .rpt-table td { padding: 8px; border-bottom: 1px solid var(--border-color, rgba(148,163,184,.1)); vertical-align: middle; }
.rpt-screen .rpt-table tfoot td { font-weight: 700; color: var(--text-primary); border-bottom: 0; border-top: 1px solid var(--border-color, rgba(148,163,184,.25)); }
.rpt-screen .rpt-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rpt-screen .rpt-table .strong { font-weight: 700; color: var(--text-primary); }
.rpt-screen .rpt-table .nowrap { white-space: nowrap; }
.rpt-screen .rpt-table .neg { color: var(--danger-color, #ef4444); }
.rpt-screen .rpt-ledger tr.is-in td:nth-child(2) { color: var(--success-color, #10b981); font-weight: 600; }
.rpt-screen .rpt-trend tr.zero td { opacity: .55; }
.rpt-screen .rpt-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.rpt-screen .rpt-barcell { width: 36%; min-width: 90px; }
.rpt-screen .rpt-bar { height: 8px; border-radius: 99px; background: var(--progress-bg, rgba(148,163,184,.15)); overflow: hidden; }
.rpt-screen .rpt-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #3b82f6); }
.rpt-screen .rpt-chg { font-weight: 600; font-size: .78rem; }
.rpt-screen .rpt-chg.up { color: #ef4444; } .rpt-screen .rpt-chg.down { color: #10b981; }
.rpt-screen .rpt-chg.new, .rpt-screen .rpt-chg.same { color: var(--text-muted); }
.rpt-screen .rpt-notes { margin: 0; padding-left: 18px; line-height: 1.6; }
.rpt-screen .rpt-empty { padding: 28px; text-align: center; border: 1px dashed var(--border-color, rgba(148,163,184,.3)); border-radius: 12px; color: var(--text-muted); }
@media (max-width: 640px) {
  .rpt-screen .rpt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rpt-screen .rpt-head { flex-direction: column; align-items: flex-start; }
  .rpt-screen .rpt-meta { text-align: left; }
  .rpt-screen .rpt-table { font-size: .8rem; }
  .rpt-screen .rpt-table td, .rpt-screen .rpt-table th { padding: 6px 5px; }
}

/* Analytics period + trend tabs: one compact segmented row on phones too */
.an-periods.breakdown-period-selector, .an-card .trend-period-selector { flex-wrap: nowrap; gap: 4px; padding: 4px; }
.an-periods .breakdown-period-tab, .an-card .trend-period-tab { flex: 1 1 auto; min-width: max-content; padding: 7px 12px; min-height: 36px; font-size: .86rem; }
@media (max-width: 480px) {
  .an-periods .breakdown-period-tab, .an-card .trend-period-tab { padding: 6px 8px; font-size: .8rem; }
  .an-card .section-header { flex-wrap: wrap; gap: 8px; }
}

.dm-format strong { white-space: nowrap; }

@media (max-width: 600px) {
  .an-card .section-header:has(.trend-period-selector) { flex-direction: column; align-items: stretch; }
  .an-card .trend-period-selector { width: 100%; }
}

/* Checkboxes inside form rows: undo the text-field look (.form-row input sets appearance:none, padding, 100% width),
   which hid the tick so "Repeats every month" looked like it did nothing. */
.form-row input[type="checkbox"] {
  -webkit-appearance: checkbox; appearance: auto;
  width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none;
  border: 0; border-radius: 4px; background: none; box-shadow: none;
  accent-color: var(--primary-color, #7c3aed); cursor: pointer;
}
.repeat-check { min-height: 44px; }

/* Settings → Rate FinCtrl (Android app only) */
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 14px; border-radius: var(--radius-md, 12px);
  background: rgba(245, 158, 11, .10); border: 1px solid rgba(245, 158, 11, .35); }
.rate-row[hidden] { display: none; }
.rate-row strong { display: block; color: var(--text-primary); }
.rate-row span { font-size: .85rem; color: var(--text-secondary); }
.rate-row .btn i { color: #fbbf24; }

/* ===================================================================
   FinCtrl Pro
   =================================================================== */
.pro-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700;
  letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #f59e0b, #ec4899); white-space: nowrap; vertical-align: middle; }
.pro-pill[hidden] { display: none; }
.pro-pill i { font-size: .62rem; color: #fff !important; width: auto !important; }
.nav-pill { margin-left: auto; }
.nav-item.nav-pro { margin-top: .35rem; color: #b45309; font-weight: 600; }
[data-theme="dark"] .nav-item.nav-pro { color: #fbbf24; }
.nav-item.nav-pro i { color: #f59e0b; }
body.is-pro .nav-item.nav-pro { color: var(--text-secondary); font-weight: 500; }

.pro-content { display: grid; gap: 1rem; max-width: 760px; }
.pro-hero { text-align: center; padding: 1.75rem 1.25rem; background:
  radial-gradient(120% 80% at 50% 0%, rgba(245, 158, 11, .14), transparent 60%), var(--bg-card); }
.pro-hero h3 { margin: .5rem 0 .25rem; font-size: 1.5rem; }
.pro-hero > p { max-width: 520px; margin: 0 auto 1.25rem; }
.pro-crown { width: 56px; height: 56px; border-radius: 16px; display: inline-grid; place-items: center; font-size: 1.5rem; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ec4899); box-shadow: 0 10px 26px rgba(236, 72, 153, .28); }
.pro-plans { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; max-width: 460px; margin: 0 auto 1rem; }
.pro-plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 1rem .75rem;
  border: 2px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-secondary); color: var(--text-primary);
  cursor: pointer; font: inherit; transition: var(--transition); }
.pro-plans.static .pro-plan { cursor: default; }
.pro-plan strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.pro-plan-name { font-weight: 600; color: var(--text-secondary); }
.pro-plan.active { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .15); }
.pro-save { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px; font-size: .7rem;
  font-weight: 700; color: #fff; background: #10b981; white-space: nowrap; }
.pro-buy { min-width: 220px; justify-content: center; font-size: 1rem; padding: .8rem 1.5rem; text-decoration: none;
  background: linear-gradient(135deg, #f59e0b, #ec4899) !important; border: 0 !important; color: #fff !important; }
.pro-fine { margin: .75rem auto 0; max-width: 460px; font-size: .78rem; color: var(--text-muted); }
.pro-note { max-width: 520px; margin: 0 auto 1rem; padding: .75rem 1rem; border-radius: var(--radius-md); background: var(--bg-surface);
  color: var(--text-secondary); font-size: .9rem; text-align: left; }
.pro-note i { color: var(--primary-color); margin-right: 4px; }
.pro-active { display: flex; gap: .75rem; align-items: flex-start; text-align: left; max-width: 520px; margin: 0 auto 1rem; padding: .9rem 1rem;
  border-radius: var(--radius-md); background: rgba(16, 185, 129, .1); border: 1px solid rgba(16, 185, 129, .35); }
.pro-active > i { color: var(--success-color); font-size: 1.4rem; margin-top: 2px; }
.pro-active strong { display: block; }
.pro-active span { font-size: .88rem; color: var(--text-secondary); }
.pro-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.pro-features li { display: flex; gap: .75rem; align-items: flex-start; }
.pro-features strong { display: block; }
.pro-features span { font-size: .88rem; color: var(--text-secondary); }
.pro-fi { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--primary-color); background: var(--primary-light); }
.pro-locked { text-align: center; padding: 2rem 1.25rem; max-width: 620px; }
.pro-locked h3 { margin: .75rem 0 .35rem; }
.pro-locked p { max-width: 480px; margin: 0 auto 1rem; }

/* Settings card */
.pro-settings { border: 1px solid rgba(245, 158, 11, .45); background: radial-gradient(100% 60% at 100% 0%, rgba(245, 158, 11, .1), transparent 60%), var(--bg-card); }
.pro-settings h3 i { color: #f59e0b; }
.pro-set-list { display: grid; gap: .6rem; margin: .5rem 0 1rem; }
.pro-set input:disabled + span { opacity: .6; }
.pro-set-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.pro-set-row strong, .pro-set-row small { display: block; }

/* Accounts */
.acct-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.acct-networth { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.acct-networth.negative, .acct-balance.negative { color: var(--danger-color); }
.acct-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.acct-card { padding: 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border-color); background: var(--bg-card); box-shadow: var(--shadow-sm); min-width: 0; }
.acct-top { display: flex; align-items: center; gap: .6rem; }
.acct-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7c3aed, #3b82f6); }
.acct-card[data-type="cash"] .acct-icon { background: linear-gradient(135deg, #10b981, #059669); }
.acct-card[data-type="card"] .acct-icon { background: linear-gradient(135deg, #ef4444, #f97316); }
.acct-card[data-type="upi"] .acct-icon { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.acct-card[data-type="savings"] .acct-icon { background: linear-gradient(135deg, #f59e0b, #ec4899); }
.acct-name { flex: 1; min-width: 0; }
.acct-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-name span { font-size: .78rem; color: var(--text-muted); }
.acct-balance { font-size: 1.5rem; font-weight: 700; margin: .75rem 0 .35rem; font-variant-numeric: tabular-nums; }
.acct-month { display: flex; gap: .75rem; flex-wrap: wrap; font-size: .8rem; }
.acct-month .fa-arrow-down { color: var(--success-color); }
.acct-month .fa-arrow-up { color: var(--danger-color); }
.acct-transfers { list-style: none; margin: .5rem 0 0; padding: 0; }
.acct-transfers li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--border-color); }
.acct-transfers li:last-child { border-bottom: 0; }
.acct-transfers li.muted { display: block; }
.acct-t-date { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.acct-t-route { min-width: 0; }
.acct-t-route small { display: block; color: var(--text-muted); }
.acct-t-route i { color: var(--text-muted); margin: 0 4px; }
.acct-help { margin-top: .25rem; }
@media (max-width: 520px) {
  .acct-transfers li { grid-template-columns: 1fr auto auto; }
  .acct-t-date { grid-column: 1 / -1; }
  .acct-networth { font-size: 1.6rem; }
}

/* Dialog forms (account, transfer) */
.fc-form { display: grid; gap: .65rem; text-align: left; margin-bottom: .75rem; }
.fc-form label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--text-secondary); }
.fc-form label.checkbox { display: flex; font-weight: 500; }
.fc-form input:not([type=checkbox]), .fc-form select { width: 100%; }
.fc-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.danger-link { color: var(--danger-color) !important; justify-self: start; }

/* Dashboard forecast */
.forecast-wrap { margin: 0 0 1rem; }
.forecast-wrap[hidden] { display: none; }
.fc-forecast { padding: 1rem 1.1rem; border-radius: var(--radius-lg); border: 1px solid var(--border-color); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.fc-forecast-head { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .35rem; }
.fc-forecast-head > i { color: var(--primary-color); }
.fc-forecast-head .pro-pill { margin-left: auto; }
.fc-forecast p { margin: 0 0 .5rem; color: var(--text-secondary); line-height: 1.5; }
.fc-forecast-bar { height: 8px; border-radius: 999px; background: var(--bg-surface); overflow: hidden; }
.fc-forecast-bar span { display: block; height: 100%; border-radius: 999px; background: var(--success-color); }
.fc-forecast.warn .fc-forecast-bar span { background: var(--warning-color); }
.fc-forecast.bad .fc-forecast-bar span { background: var(--danger-color); }
.fc-forecast.bad { border-color: rgba(239, 68, 68, .4); }
.fc-teaser { width: 100%; display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; text-align: left; font: inherit; cursor: pointer;
  color: var(--text-secondary); border: 1px dashed rgba(245, 158, 11, .6); border-radius: var(--radius-lg); background: rgba(245, 158, 11, .06); }
.fc-teaser > i { color: #f59e0b; font-size: 1.1rem; }
.fc-teaser span:nth-child(2) { flex: 1; }
.fc-teaser strong { color: var(--text-primary); }


/* ===== Add / edit account dialog (FinCtrl Pro) ===== */
.fc-dialog.acct-dialog { max-width: 440px; text-align: left; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.acct-dialog h3 { text-align: center; margin-bottom: 14px; }
.ad-preview { margin: 0 0 16px; padding: 14px 16px; border-radius: 18px; box-shadow: var(--shadow-md);
  background: radial-gradient(120% 100% at 100% 0%, rgba(124, 58, 237, .22), transparent 60%), var(--bg-surface); transition: background .25s ease; }
.ad-preview[data-type="cash"] { background: radial-gradient(120% 100% at 100% 0%, rgba(16, 185, 129, .22), transparent 60%), var(--bg-surface); }
.ad-preview[data-type="card"] { background: radial-gradient(120% 100% at 100% 0%, rgba(239, 68, 68, .22), transparent 60%), var(--bg-surface); }
.ad-preview[data-type="upi"] { background: radial-gradient(120% 100% at 100% 0%, rgba(6, 182, 212, .22), transparent 60%), var(--bg-surface); }
.ad-preview[data-type="savings"] { background: radial-gradient(120% 100% at 100% 0%, rgba(245, 158, 11, .22), transparent 60%), var(--bg-surface); }
.ad-preview .acct-balance { margin: .6rem 0 0; font-size: 1.7rem; }
.ad-pv-default { margin-left: auto; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; color: #b45309; background: rgba(245, 158, 11, .16); white-space: nowrap; }
[data-theme="dark"] .ad-pv-default { color: #fbbf24; }
.ad-pv-default[hidden] { display: none; }
.ad-section { margin: 0 0 14px; }
.ad-label { display: block; margin: 0 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.ad-types { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ad-type { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; cursor: pointer;
  border: 1.5px solid var(--border-color); border-radius: 14px; background: var(--bg-surface); transition: var(--transition); text-align: center; }
.ad-type input { position: absolute; opacity: 0; pointer-events: none; }
.ad-type:hover { border-color: var(--primary-color); }
.ad-type:focus-within { box-shadow: 0 0 0 3px var(--primary-light); }
.ad-type-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: .9rem;
  background: linear-gradient(135deg, #7c3aed, #3b82f6); opacity: .75; transition: var(--transition); }
.ad-type[data-type="cash"] .ad-type-icon { background: linear-gradient(135deg, #10b981, #059669); }
.ad-type[data-type="card"] .ad-type-icon { background: linear-gradient(135deg, #ef4444, #f97316); }
.ad-type[data-type="upi"] .ad-type-icon { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.ad-type[data-type="savings"] .ad-type-icon { background: linear-gradient(135deg, #f59e0b, #ec4899); }
.ad-type-label { font-size: .68rem; font-weight: 600; line-height: 1.15; color: var(--text-secondary); }
.ad-type.active { border-color: var(--primary-color); background: var(--primary-light); }
.ad-type.active .ad-type-icon { opacity: 1; transform: scale(1.08); box-shadow: 0 6px 14px rgba(124, 58, 237, .3); }
.ad-type.active .ad-type-label { color: var(--text-primary); }
.ad-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-surface); }
.ad-input:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
.ad-input i { color: var(--text-muted); }
.ad-input input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 12px 0 !important;
  font-size: 1rem; color: var(--text-primary); outline: none; }
.ad-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ad-suggest:empty { display: none; }
.ad-suggest .chip { border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); border-radius: 999px; padding: 5px 12px; font-size: .8rem; cursor: pointer; font-family: inherit; }
.ad-suggest .chip:hover { border-color: var(--primary-color); color: var(--text-primary); background: var(--primary-light); }
.ad-amount { margin-bottom: 6px; }
.ad-hint { margin: 0; font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.ad-hint i { color: var(--primary-color); margin-right: 3px; }
.ad-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 10px; cursor: pointer;
  border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-surface); }
.ad-toggle > span:first-child { flex: 1; min-width: 0; }
.ad-toggle strong { display: block; font-size: .92rem; }
.ad-toggle small { display: block; font-size: .76rem; color: var(--text-muted); line-height: 1.35; }
.ad-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ad-switch { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--border-color); transition: var(--transition); }
.ad-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s ease; }
.ad-toggle input:checked + .ad-switch { background: linear-gradient(135deg, #7c3aed, #3b82f6); }
.ad-toggle input:checked + .ad-switch::after { transform: translateX(18px); }
.ad-toggle input:focus-visible + .ad-switch { box-shadow: 0 0 0 3px var(--primary-light); }
.ad-remove { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 0 0 6px; padding: 10px; font: inherit; font-size: .88rem;
  font-weight: 600; cursor: pointer; color: var(--danger-color); background: transparent; border: 1px dashed rgba(239, 68, 68, .45); border-radius: 12px; }
.ad-remove:hover { background: rgba(239, 68, 68, .08); }
.acct-dialog .fc-dialog-actions { position: sticky; bottom: -20px; padding-bottom: 4px; padding-top: 10px; background: inherit; }
@media (max-width: 400px) {
  .ad-types { gap: 4px; }
  .ad-type { padding: 8px 2px 6px; }
  .ad-type-label { font-size: .62rem; }
}


/* ===== Transfer dialog (FinCtrl Pro) ===== */
.tr-sub { margin: -6px 0 14px; text-align: center; font-size: .85rem; color: var(--text-muted); line-height: 1.4; }
.tr-route { position: relative; display: grid; gap: 8px; margin: 0 0 10px; }
.tr-side { display: block; width: 100%; padding: 10px 14px 12px; text-align: left; font: inherit; color: var(--text-primary); cursor: pointer;
  border: 1.5px solid var(--border-color); border-radius: 16px; background: var(--bg-surface); transition: var(--transition); }
.tr-side:hover, .tr-side.open { border-color: var(--primary-color); }
.tr-side.open { box-shadow: 0 0 0 3px var(--primary-light); }
.tr-side-label { display: block; margin: 0 0 6px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.tr-side-main { display: flex; align-items: center; gap: 12px; }
.tr-icon { width: 38px; height: 38px; border-radius: 12px; font-size: .9rem; }
.tr-side[data-type="cash"] .tr-icon, .tr-option[data-type="cash"] .tr-icon { background: linear-gradient(135deg, #10b981, #059669); }
.tr-side[data-type="card"] .tr-icon, .tr-option[data-type="card"] .tr-icon { background: linear-gradient(135deg, #ef4444, #f97316); }
.tr-side[data-type="upi"] .tr-icon, .tr-option[data-type="upi"] .tr-icon { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.tr-side[data-type="savings"] .tr-icon, .tr-option[data-type="savings"] .tr-icon { background: linear-gradient(135deg, #f59e0b, #ec4899); }
.tr-side-text { flex: 1; min-width: 0; }
.tr-side-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.tr-side-text small { display: block; font-size: .82rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tr-side-text small i { margin: 0 3px; font-size: .75rem; }
.tr-side-text small b { color: var(--text-primary); }
.tr-side-text small b.pos { color: var(--success-color); }
.tr-side-text small b.neg { color: var(--danger-color); }
.tr-caret { color: var(--text-muted); font-size: .8rem; transition: transform .2s ease; }
.tr-side.open .tr-caret { transform: rotate(180deg); }
.tr-swap { position: absolute; right: 52px; top: 50%; transform: translateY(-50%); z-index: 1; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; border: 3px solid var(--bg-secondary, #1a1a2e);
  background: linear-gradient(135deg, #7c3aed, #3b82f6); box-shadow: 0 6px 16px rgba(124, 58, 237, .35); }
.tr-swap i { transform: rotate(90deg); }
.tr-swap i.spin { animation: tr-spin .35s ease; }
@keyframes tr-spin { from { transform: rotate(90deg); } to { transform: rotate(270deg); } }
.tr-picker { margin: 0 0 14px; padding: 6px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-surface); }
.tr-picker[hidden] { display: none; }
.tr-picker-head { margin: 4px 8px 6px; font-size: .75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.tr-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; text-align: left; font: inherit; color: var(--text-primary);
  cursor: pointer; border: 0; border-radius: 12px; background: transparent; }
.tr-option:hover, .tr-option[aria-selected="true"] { background: var(--primary-light); }
.tr-tick { color: var(--primary-color); }
.tr-amount input { font-size: 1.6rem !important; }
.tr-quick { margin-top: 8px; }
.tr-quick .chip-all { border-color: var(--primary-color); color: var(--text-primary); }
.tr-warn { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; font-size: .8rem; line-height: 1.35;
  color: var(--text-secondary); background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .35); }
.tr-warn[hidden] { display: none; }
.tr-warn i { color: var(--warning-color); margin-top: 2px; }
.tr-when { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tr-when .chip { border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); border-radius: 999px; padding: 8px 14px;
  font: inherit; font-size: .85rem; cursor: pointer; }
.tr-when .chip.active { border-color: var(--primary-color); background: var(--primary-light); color: var(--text-primary); font-weight: 600; }
.tr-date { flex: 1; min-width: 150px; }
.tr-date input { padding: 9px 0 !important; font-size: .9rem; color-scheme: dark; }
[data-theme="light"] .tr-date input { color-scheme: light; }
.tr-optional { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); opacity: .8; }

/* Sign-up / sign-in consent line */
.consent-line { margin: 10px 0 0; line-height: 1.45; }
.consent-line a { color: var(--primary-color); }


/* ===== Add / edit transaction: tile pickers (categories, income sources, accounts) ===== */
.picker-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; }
.form-row:has(> .picker-native) { position: relative; }
.tile-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.tile-picker.compact { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.tp-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; min-width: 0; cursor: pointer; font: inherit;
  color: var(--text-secondary); border: 1.5px solid var(--border-color); border-radius: 14px; background: var(--bg-surface); transition: var(--transition); }
.tp-tile:hover { border-color: var(--primary-color); }
.tp-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-light); }
.tp-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: .9rem; opacity: .78; transition: var(--transition); }
.tp-label { font-size: .7rem; font-weight: 600; line-height: 1.2; text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-tile.active { border-color: var(--primary-color); background: var(--primary-light); color: var(--text-primary); }
.tp-tile.active .tp-icon { opacity: 1; transform: scale(1.08); box-shadow: 0 6px 14px rgba(124, 58, 237, .3); }
.tp-add { border-style: dashed; }
.tp-add .tp-icon { background: transparent; color: var(--primary-color); border: 1.5px dashed var(--primary-color); opacity: 1; }
.tile-picker.compact .tp-tile { flex-direction: row; justify-content: flex-start; padding: 8px 10px; gap: 8px; }
.tile-picker.compact .tp-icon { width: 30px; height: 30px; border-radius: 10px; flex: none; }
.tile-picker.compact .tp-label { text-align: left; font-size: .78rem; overflow-wrap: normal; word-break: normal; -webkit-line-clamp: 2; }
.tile-picker.compact { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
@media (max-width: 380px) { .tile-picker:not(.compact) { gap: 6px; } .tp-label { font-size: .64rem; } }

/* Transactions: account under the description (Pro) */
.txn-acct { display: block; margin-top: 2px; font-size: .74rem; color: var(--text-muted); }
.txn-acct i { margin-right: 3px; font-size: .7rem; }
#filterAccountRow[hidden] { display: none !important; }
#filterAccountRow label .pro-pill { margin-left: 4px; }


/* ===== FinCtrl option sheet (replaces the phone's plain drop-down list) ===== */
.fc-sheet-select { cursor: pointer; }
.fc-sheet-overlay { align-items: flex-end; }
.fc-sheet { width: 100%; max-width: 480px; max-height: min(78vh, 640px); display: flex; flex-direction: column;
  background: var(--bg-secondary, #1a1a2e); color: var(--text-primary); border: 1px solid var(--border-color); border-bottom: 0;
  border-radius: 22px 22px 0 0; box-shadow: 0 -18px 50px rgba(0, 0, 0, .45); padding: 8px 12px calc(14px + env(safe-area-inset-bottom));
  transform: translateY(24px); transition: transform .2s ease; }
.fc-sheet-overlay.open .fc-sheet { transform: none; }
.fc-sheet-grip { display: block; width: 40px; height: 4px; border-radius: 999px; background: var(--border-color); margin: 4px auto 8px; }
.fc-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 10px; }
.fc-sheet-head h3 { margin: 0; font-size: 1.05rem; }
.fc-sheet-close { width: 34px; height: 34px; }
.fc-sheet-list { overflow-y: auto; display: grid; gap: 4px; padding: 2px; }
.fc-sheet-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 10px; text-align: left; font: inherit;
  font-size: .98rem; color: var(--text-primary); cursor: pointer; border: 1px solid transparent; border-radius: 14px; background: transparent; transition: var(--transition); }
.fc-sheet-opt:hover, .fc-sheet-opt:focus-visible { background: var(--bg-surface); outline: none; }
.fc-sheet-opt.active { background: var(--primary-light); border-color: rgba(124, 58, 237, .45); font-weight: 600; }
.fc-sheet-icon { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: .9rem; font-weight: 700; }
.fc-sheet-text { flex: 1; min-width: 0; }
.fc-sheet-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; color: transparent;
  border: 1.5px solid var(--border-color); transition: var(--transition); }
.fc-sheet-opt.active .fc-sheet-tick { color: #fff; border-color: transparent; background: linear-gradient(135deg, #7c3aed, #3b82f6); }
@media (min-width: 720px) {
  .fc-sheet-overlay { align-items: center; }
  .fc-sheet { border-radius: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 14px; }
  .fc-sheet-grip { display: none; }
}
