/* ── VARIABLES ──────────────────────────────────────────────────────────── */
:root {
  --bg:            #F8F9FA;
  --surface:       #FFFFFF;
  --surface-2:     #F1F3F4;
  --surface-3:     #E8EAED;
  --border:        #DADCE0;
  --border-strong: #BDC1C6;
  --text:          #202124;
  --text-2:        #444746;
  --text-muted:    #5F6368;
  --accent:        #0259C8;   /* the logo blue */
  --accent-light:  #E6EEFA;
  --accent-chip:   #CCDDF5;
  --accent-dark:   #0248A1;
  --accent-hover:  #0248A1;   /* hover and pressed */
  --accent-grad:   linear-gradient(135deg, #0259C8, #0248A1);
  --red:           #D93025;
  --red-light:     #FCE8E6;
  --teal:          #137333;
  --teal-light:    #E6F4EA;
  --amber:         #E37400;
  --amber-light:   #FEF7E0;
  /* Data tables: soft blue-grey header, navy headings, quiet row lines */
  --tbl-head-bg:   #EEF3F9;
  --tbl-head-text: #1B365D;
  --tbl-line:      #E3E9F1;
  --tbl-hover:     #F6F9FC;
  --tbl-link:      #0259C8;
  --tbl-muted:     #5B6675;
  --tbl-warm-bg:   #FBF6F1;  /* optional tinted column group */
  --tbl-warm-line: #E3A04A;
  --tbl-cool-line: #9DB4D3;
  --sidebar-w:     260px;
  --topbar-h:      64px;
  --font:          'Inter', 'Noto Sans Bengali', 'Roboto', sans-serif;
  --mono:          'Inter', sans-serif;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow-sm:     0 1px 3px rgba(60,64,67,.2), 0 1px 2px rgba(60,64,67,.12);
  --shadow-md:     0 4px 8px 3px rgba(60,64,67,.15), 0 1px 3px rgba(60,64,67,.2);
  --shadow-lg:     0 8px 28px rgba(60,64,67,.18);
}

/* Buttons lay out icon + text in a row (the button standard — the rest is at the end of this file). Kept here, before
   every component rule, so a component's own display (display:none until a phone, for instance) still wins. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* ── RESET & BASE ───────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; }
html,body { height:100%; overflow:hidden; }
body { font-family:var(--font); font-size:14px; background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased; }
/* Mobile: allow native rubber-band scroll */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  html, body { -webkit-overflow-scrolling: touch; }
}
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:10px; }
::-webkit-scrollbar-thumb:hover { background:var(--border-strong); }
.fw-500 { font-weight:500; }
.fw-600 { font-weight:600; }
.x-small { font-size:12px; }
.mono { font-family:var(--mono); }
a { text-decoration:none; color:inherit; }
/* Bootstrap paints a menu item solid blue with white text while it's pressed; items that set their own colour
   (e.g. "Manage Properties") then read blue on blue. Use the app's light pressed state instead. */
.dropdown-menu { --bs-dropdown-link-active-bg: var(--accent-light); --bs-dropdown-link-active-color: var(--accent); }

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.nb-app     { display:flex; height:100vh; }
.nb-main    { flex:1; display:flex; flex-direction:column; min-width:0; }
.nb-content { flex:1; overflow-y:auto; padding:24px 28px; background:var(--bg); animation:fadeIn .2s ease; -webkit-overflow-scrolling:touch; }

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.nb-sidebar {
  width:var(--sidebar-w);
  background:var(--surface);
  height:100vh;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  transition: width .28s cubic-bezier(.4,0,.2,1);
}

.nb-brand { padding:18px 16px 8px; }
.brand-icon {
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.brand-logo-img { width:36px; height:36px; object-fit:contain; border-radius:8px; }
.brand-name { font-size:18px; font-weight:700; color:var(--text); letter-spacing:-.4px; }
.brand-sub  { font-size:12px; color:var(--text-muted); }
/* The full logo (icon + wordmark) when the sidebar is open; the icon alone when it is collapsed */
.nb-brand .brand-icon { display:none; }
.brand-full-img { display:block; height:32px; width:auto; margin:0 0 4px 6px; }   /* left edge in line with the menu icons */
.nb-sidebar.collapsed .nb-brand .brand-icon { display:flex; }
.nb-sidebar.collapsed .brand-full-img { display:none; }

/* Sidebar "New" action button */
.btn-sidebar-new {
  display:flex; align-items:center; gap:12px;
  width:calc(100% - 32px);
  background:var(--surface);
  border:none;
  border-radius:100px;
  padding:14px 20px;
  font-size:14px; font-weight:500; color:var(--text);
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  transition:box-shadow .2s ease, background .15s;
  font-family:var(--font);
  text-align:left;
  margin:0 16px 12px;
}
.btn-sidebar-new:hover { box-shadow:var(--shadow-md); }
.btn-sidebar-new i { font-size:20px; color:var(--accent); }

.property-chip {
  background:var(--surface-2);
  border-radius:8px;
  padding:8px 12px;
  cursor:pointer;
  font-size:12px;
  color:var(--text-2);
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  border:none;
  margin:0 16px 4px;
}
.property-chip .fw-500 { color:var(--text); font-size:12px; }

.nav-section-label {
  font-size:12px; font-weight:600;
  color:var(--accent);
  padding:10px 20px 3px;
  text-transform:uppercase; letter-spacing:.7px;
}

.nav-item {
  display:flex; align-items:center; gap:14px;
  padding:8px 14px;
  border-radius:100px;
  font-size:14px; color:var(--text-2);
  cursor:pointer; transition:background .15s;
  font-weight:400; white-space:nowrap;
  margin:1px 8px;
}
.nav-item:hover { background:var(--surface-2); color:var(--text); }
.nav-item.active { background:var(--accent-light); color:var(--accent-dark); font-weight:500; }
.nav-item i { font-size:18px; flex-shrink:0; }
.nav-item .badge-count {
  margin-left:auto;
  background:var(--red); color:#fff;
  font-size:11px; font-weight:600;
  padding:2px 7px; border-radius:10px;
  font-family:var(--mono);
}

.nb-user-footer { background:var(--surface); border-top:1px solid var(--border); }
.user-avatar {
  width:32px; height:32px; border-radius:50%;
  background:linear-gradient(135deg, var(--accent), var(--accent-dark));
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:600; flex-shrink:0;
}

/* ── SIDEBAR COLLAPSED (desktop icon-only) ───────────────────────────────── */
.nb-sidebar.collapsed { width: 60px; }
.nb-sidebar.collapsed .nav-label,
.nb-sidebar.collapsed .nav-section-label,
.nb-sidebar.collapsed .brand-name,
.nb-sidebar.collapsed .brand-sub,
.nb-sidebar.collapsed .btn-sidebar-new,
.nb-sidebar.collapsed .property-chip { display: none; }
.nb-sidebar.collapsed .nb-brand {
  padding: 12px 8px;
  justify-content: center;
}
.nb-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 8px;
  margin: 1px 4px;
  border-radius: 12px;
  gap: 0;
}
.nb-sidebar.collapsed .badge-count { display: none; }
.nb-sidebar.collapsed .nb-user-footer { padding: 8px 4px; }
.nb-sidebar.collapsed .nb-user-footer > div { justify-content: center; }
.nb-sidebar.collapsed .nb-user-footer .flex-grow-1,
.nb-sidebar.collapsed .nb-user-footer form { display: none; }
.nb-sidebar.collapsed .sidebar-close-btn { display: none; }

/* ── TOPBAR ──────────────────────────────────────────────────────────────── */
.nb-topbar {
  height:var(--topbar-h);
  background:var(--surface);
  border-bottom:1px solid var(--border);
  flex-shrink:0;
  display:flex; align-items:center;
  padding:0 20px; gap:12px;
}
.topbar-left { flex:1; min-width:0; }
/* Long titles end in "…" instead of running under the property switcher on narrow screens */
.topbar-title { font-size:16px; font-weight:500; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topbar-sub   { font-size:12px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topbar-actions { flex-shrink:0; display:flex; align-items:center; gap:8px; }
.topbar-icon-btn {
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:none; border:0; color:var(--text-2);
  transition:background .15s;
}
.topbar-icon-btn::after { display:none !important; }
.topbar-icon-btn:hover { background:var(--border); }
.topbar-user-btn:hover { background:#f1f3f4 !important; }

/* Topbar property switcher button */
.nb-prop-switcher {
  display:flex; align-items:center; gap:6px;
  background:none; border:1.5px solid var(--border);
  border-radius:8px; padding:5px 10px;
  cursor:pointer; transition:background .15s;
  max-width:180px;
}
.nb-prop-switcher:hover { background:var(--surface-2); }
.nb-prop-switcher.dropdown-toggle::after { display:none; }
.nb-prop-name {
  font-size:.82rem; font-weight:600; color:var(--text);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  flex:1; min-width:0;
}

/* ── CARDS ───────────────────────────────────────────────────────────────── */
.nb-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.nb-card-header { padding:16px 20px 14px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.card-title                  { font-size:14px; font-weight:600; margin:0; color:var(--text); }
.nb-card-header .card-title  { font-size:14px; font-weight:600; margin:0; color:var(--text); }
.nb-card-header .card-sub   { font-size:12px; color:var(--text-muted); }
.nb-card-body  { padding:16px 20px; }

/* ── STAT CARDS ──────────────────────────────────────────────────────────── */
.stat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; display:flex; flex-direction:column; gap:16px; }
.stat-card-top { display:flex; align-items:center; gap:14px; }
.stat-info { flex:1; min-width:0; }
.stat-icon { width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.stat-label { font-size:12px; font-weight:500; color:var(--text-2); margin-bottom:5px; }
.stat-value { font-size:22px; font-weight:700; color:var(--text); letter-spacing:-.5px; }
.stat-sublabel { font-size:12px; font-weight:500; color:var(--text-2); margin-top:3px; }
.stat-footer { display:flex; justify-content:flex-end; padding-top:12px; border-top:1px solid var(--border); }
.stat-link { font-size:12px; font-weight:600; color:var(--accent); text-decoration:none; }
.stat-link:hover { text-decoration:underline; }

/* ── KPI SUMMARY CARDS (3-card row) ──────────────────────────────────────── */
.nb-card-link { font-size:12px; font-weight:600; color:var(--accent); text-decoration:none; }
.nb-card-link:hover { text-decoration:underline; }
.nb-info-banner { display:flex; align-items:flex-start; gap:10px; background:var(--accent-light); border:1px solid color-mix(in srgb,var(--accent) 25%,transparent); border-radius:10px; padding:12px 16px; font-size:.85rem; color:var(--text); line-height:1.5; }
.nb-info-banner i { flex-shrink:0; margin-top:2px; font-size:15px; }
.nb-banner-link { color:var(--accent); font-weight:600; text-decoration:none; }
.nb-banner-link:hover { text-decoration:underline; }
.kpi-card-body { display:flex; align-items:flex-start; gap:14px; padding:16px 20px 20px; }
.kpi-icon-circle { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:2px; }
.kpi-content { flex:1; min-width:0; }
.kpi-main-value { font-size:22px; font-weight:700; letter-spacing:-.5px; line-height:1.2; margin-bottom:4px; }
.kpi-of-total { font-size:13px; font-weight:400; color:var(--text-2); }
.kpi-period { font-size:12px; font-weight:500; color:var(--text-2); margin-bottom:6px; }
.kpi-sub-row { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:4px; }
.kpi-sub-item { font-size:12px; font-weight:500; display:inline-flex; align-items:center; gap:3px; }
.kpi-sub-sep { color:var(--text-muted); font-size:12px; }
.kpi-income { color:#188038; }
.kpi-expense { color:#d93025; }
.kpi-progress-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.kpi-pct-label { font-size:12px; font-weight:600; color:var(--text-2); white-space:nowrap; }
.kpi-account-list { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.kpi-account-chip { font-size:12px; font-weight:500; color:var(--text-2); background:var(--surface-2); border-radius:10px; padding:2px 8px; display:inline-flex; align-items:center; gap:4px; }
.kpi-ms-label  { font-size:12px; font-weight:700; letter-spacing:.3px; }
.kpi-ms-amount { font-size:12px; font-weight:600; }

/* ── EXPENSE BREAKDOWN BARS ─────────────────────────────────────────────── */
.exp-bar-track { height:6px; border-radius:4px; background:var(--surface-2); overflow:hidden; }
.exp-bar-fill  { height:100%; border-radius:4px; background:var(--red); opacity:.75; transition:width .3s ease; }

/* ── ATTACHMENTS ─────────────────────────────────────────────────────────── */
.attach-btn { color:var(--text-2); }
.attach-btn:hover { color:var(--accent); }
.attach-count-badge {
  position:absolute; top:-5px; right:-5px;
  background:var(--accent); color:#fff;
  font-size:9px; font-weight:700; line-height:1;
  min-width:14px; height:14px; border-radius:10px;
  display:flex; align-items:center; justify-content:center; padding:0 3px;
}
.attach-drop-zone {
  border:2px dashed var(--border); border-radius:10px;
  padding:22px 16px; text-align:center; cursor:pointer;
  transition:border-color .2s, background .2s;
}
.attach-drop-zone:hover, .attach-drop-zone.drag-over {
  border-color:var(--accent); background:var(--accent-light);
}
.attach-file-item {
  display:flex; align-items:center; gap:10px;
  padding:8px 10px; border-radius:8px; margin-bottom:6px;
  background:var(--surface-2);
}
.attach-file-item:last-child { margin-bottom:0; }
.tx-file-label {
  display:flex; align-items:center; gap:0; cursor:pointer;
  border:1px solid var(--border); border-radius:6px; overflow:hidden;
  width:100%; user-select:none; height:31px;
}
.tx-file-btn {
  flex-shrink:0; padding:0 12px; height:100%; display:flex; align-items:center;
  background:var(--surface-2); border-right:1px solid var(--border);
  font-size:12.5px; color:var(--text-1); white-space:nowrap;
}
.tx-file-label:hover .tx-file-btn { background:var(--border); }
.tx-file-name {
  flex:1; padding:0 10px; font-size:12.5px; line-height:31px;
  color:var(--text-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.attach-drop-sm {
  padding:9px 14px; text-align:left; display:flex; align-items:center; gap:8px; min-height:unset;
}

/* ── TABLES ──────────────────────────────────────────────────────────────── */
.nb-table { width:100%; border-collapse:collapse; }
.nb-table th {
  font-size:13.5px; font-weight:600; color:var(--tbl-head-text);
  padding:12px 16px; border-bottom:1px solid #D5DEEA;
  white-space:nowrap; background:var(--tbl-head-bg);
  text-transform:none; letter-spacing:0; text-align:left;
}
.nb-table td { padding:14px 16px; font-size:14px; border-bottom:1px solid var(--tbl-line); vertical-align:middle; color:var(--text); text-align:left; }
.nb-table tr:last-child td { border-bottom:none; }
.nb-table tbody tr:hover { background:var(--tbl-hover); }
.nb-table td a:not(.btn):not(.btn-tbl-action) { color:var(--tbl-link); font-weight:500; text-decoration:none; }
.nb-table td a:not(.btn):not(.btn-tbl-action):hover { text-decoration:underline; }
.nb-table td .text-muted, .nb-table td small { color:var(--tbl-muted) !important; }
/* Numbers line up on the right (beats the DataTables left-align override below) */
/* (table.nb-table thead th.num outranks "table.dataTable thead .dt-orderable-asc" in the override below) */
table.nb-table thead th.num, table.nb-table tbody td.num { text-align:right !important; font-variant-numeric:tabular-nums; }
/* Optional column groups: a labelled header band and a tinted block of columns */
.nb-table th.grp { font-size:12px; letter-spacing:.06em; text-transform:uppercase; padding:10px 16px 6px; border-bottom:2px solid var(--tbl-cool-line); }
.nb-table th.grp-warm { border-bottom-color:var(--tbl-warm-line); }
.nb-table th.grp::before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--tbl-cool-line); margin-right:7px; vertical-align:1px; }
.nb-table th.grp-warm::before { background:var(--tbl-warm-line); }
.nb-table .cell-warm { background:var(--tbl-warm-bg); }
/* "Managed elsewhere" marker in a row's Action cell (labelled, not an icon-only button) */
.tx-managed-link { font-size:12px; font-weight:500; color:var(--tbl-muted); text-decoration:none; white-space:nowrap; }
.tx-managed-link:hover { color:var(--tbl-link); text-decoration:underline; }
.tx-managed-link i { font-size:10px; }
.table-wrap { overflow-x:auto; }

/* ── BADGES ──────────────────────────────────────────────────────────────── */
.nb-badge { display:inline-flex; align-items:center; padding:4px 11px; border-radius:100px; font-size:12px; font-weight:500; }
.nb-badge-green  { background:var(--teal-light);   color:var(--teal);   }
.nb-badge-red    { background:var(--red-light);    color:var(--red);    }
.nb-badge-blue   { background:var(--accent-light); color:var(--accent); }
.nb-badge-amber  { background:var(--amber-light);  color:var(--amber);  }
.nb-badge-orange { background:#fff3e0;             color:#e65100;       }
.nb-badge-gray   { background:var(--surface-2);    color:var(--text-2); }
.nb-badge-purple { background:#ede7f6;             color:#5e35b1;       }
.nb-badge-rose   { background:#fce4ec;             color:#c62828;       }
.nb-badge-teal   { background:#e0f2f1;             color:#00695c;       }
/* category sub-badge — always muted, slightly smaller */
.nb-badge-sub    { background:var(--surface-2); color:var(--text-2); font-size:12px; }

/* ── FORMS ───────────────────────────────────────────────────────────────── */

/* Label — canonical form label used everywhere */
.nb-label {
  font-size:.78rem; font-weight:500; color:var(--text-2);
  margin-bottom:4px; display:block;
}

/* Input / Select — canonical styled inputs (use instead of form-control in modals) */
.nb-input, .nb-select {
  width:100%; border:1.5px solid var(--border); border-radius:var(--radius-sm);
  padding:8px 12px; font-size:.88rem; font-family:var(--font);
  background:var(--surface); color:var(--text);
  transition:border-color .15s, box-shadow .15s; box-sizing:border-box;
}
.nb-input:focus, .nb-select:focus {
  outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(2,89,200,.1);
}
.nb-input-sm, .nb-select-sm {
  padding:5px 10px; font-size:.82rem; border-radius:7px;
}

/* Section card — white card with shadow; stack inside nb-sections-wrap */
.nb-section {
  background:var(--surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:20px 24px;
}

/* Wrapper — gray trough that holds section cards with gap between them */
.nb-sections-wrap {
  background:var(--bg);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* Section header — titled separator */
.nb-section-header {
  font-size:.8rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.5px; color:var(--text-muted); margin-bottom:12px;
  display:flex; justify-content:space-between; align-items:center;
  padding-bottom:10px; border-bottom:1px solid var(--surface-2);
}

/* Inline add form — dashed container for sub-forms */
.nb-add-form {
  background:#f2f6fe; border:1px dashed var(--border);
  border-radius:var(--radius-sm); padding:14px; margin-top:10px;
}

/* Record row — used for listing owners/occupants/meters inside modals */
.nb-record {
  display:flex; align-items:center; gap:10px;
  padding:7px 0; border-bottom:1px solid var(--surface-2); font-size:.83rem;
}
.nb-record:last-child { border-bottom:none; }
.nb-rec-name   { font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nb-rec-period { color:var(--text-muted); font-size:.78rem; flex-shrink:0; white-space:nowrap; }
.nb-rec-actions{ display:flex; gap:4px; flex-shrink:0; margin-left:auto; }

/* Empty state hint inside record lists */
.nb-empty { font-size:.8rem; color:var(--text-muted); font-style:italic; padding:4px 0; }

/* Outline button — accent border, used for add actions inside modals */
.nb-btn-outline {
  border:1px solid var(--border); color:var(--text); background:var(--surface);
  padding:0 10px; min-height:26px; font-size:12px; font-weight:600;
  border-radius:999px; cursor:pointer; display:inline-flex; align-items:center; gap:6px;
  font-family:inherit; transition:background .15s, color .15s;
}
.nb-btn-outline:hover { background:var(--surface-2); }

/* Ghost button — neutral border, used for secondary actions inside modals */
.nb-btn-ghost {
  border:1px solid var(--border); color:var(--text); background:var(--surface);
  padding:0 10px; min-height:26px; font-size:12px; font-weight:600;
  border-radius:999px; cursor:pointer; display:inline-flex; align-items:center; gap:6px;
  font-family:inherit; transition:background .15s, color .15s;
}
.nb-btn-ghost:hover { background:var(--surface-2); border-color:var(--border-strong); }

/* .nb-field bridge — inputs/selects without explicit nb-input class inherit the same style */
.nb-field input, .nb-field select {
  width:100%; border:1.5px solid var(--border); border-radius:var(--radius-sm);
  padding:8px 12px; font-size:.88rem; font-family:var(--font);
  background-color:var(--surface); color:var(--text);
  transition:border-color .15s, box-shadow .15s; box-sizing:border-box;
}
.nb-field input:focus, .nb-field select:focus {
  outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(2,89,200,.1);
}
.nb-field input:disabled, .nb-field select:disabled {
  background-color:#e9ecef; color:#6c757d; cursor:not-allowed; opacity:1;
}
/* Currency prefix inputs — match standalone nb-field input padding exactly */
.nb-field .input-group .form-control,
.nb-field .input-group .input-group-text {
  padding: 8px 12px;
  font-size: .88rem;
  font-family: var(--font);
}

/* nb-section-header spacing */
.nb-section-header { margin-top:16px; margin-bottom:12px; }
.nb-section > .nb-section-header:first-child { margin-top:0; }

/* Bootstrap modal overrides — clean header/footer for card-section layout */
.modal-header {
  border-bottom:1px solid var(--surface-2);
  padding:16px 24px;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
}
.modal-footer {
  border-top:1px solid var(--surface-2);
  padding:12px 24px;
}

/* Buttons: see "Buttons: one standard" at the end of this file */

/* Bootstrap form-control / form-select base overrides */
.form-control,.form-select {
  font-family:var(--font); font-size:14px;
  border-color:var(--border); color:var(--text);
  border-radius:8px;
}
.form-control:focus,.form-select:focus {
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(2,89,200,.15);
}
/* Inside modals, normalize -sm inputs to the same size as nb-field inputs */
.modal .form-control-sm, .modal .form-select-sm {
  padding:8px 12px;
  font-size:.88rem;
  border-radius:var(--radius-sm);
}
/* Restore Bootstrap's arrow right-padding on all form-select elements — our
   padding:8px 12px overrides strip it, hiding the dropdown chevron. */
.form-select,
.nb-field select.form-select,
.modal .form-select-sm {
  padding-right: 2.25rem;
}


/* ── UNIT GRID ───────────────────────────────────────────────────────────── */
.unit-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(195px,1fr)); gap:10px; }
.unit-tile { background:var(--surface); border:1px solid var(--border); border-left:3px solid transparent; border-radius:8px; padding:12px; cursor:pointer; transition:all .15s; }
.unit-tile:hover { box-shadow:var(--shadow-sm); }
.unit-tile.paid   { border-left-color:var(--teal); }
.unit-tile.unpaid { border-left-color:var(--red);  }
.unit-tile.vacant { border-left-color:var(--border-strong); }
.unit-id     { font-size:13px; font-weight:600; font-family:var(--mono); }
.unit-owner  { font-size:12px; color:var(--text-secondary,#3c4043); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:4px 0 2px; }
.unit-tenant { font-size:12px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:0 0 8px; }
.unit-tile-badges { display:flex; gap:4px; flex-wrap:wrap; margin-top:8px; }

/* ── APPROVAL ITEMS ──────────────────────────────────────────────────────── */
.approval-item { padding:14px 20px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; gap:14px; }
.approval-item:last-child { border-bottom:none; }
.appr-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:18px; }

/* ── MEETING CARD ────────────────────────────────────────────────────────── */
.meeting-date-box { width:48px; height:48px; border-radius:10px; display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0; }
.meeting-day   { font-size:18px; font-weight:700; font-family:var(--mono); line-height:1; }
.meeting-month { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; }

/* ── QUICK ADD ───────────────────────────────────────────────────────────── */
.quick-item { display:flex; align-items:center; gap:12px; padding:12px 16px; border-radius:8px; font-size:14px; font-weight:500; color:var(--text); cursor:pointer; transition:background .15s; border:1px solid var(--border); margin-bottom:6px; }
.quick-item:hover { background:var(--surface-2); }
.quick-item i { font-size:18px; }

/* ── ACCOUNT CARDS ───────────────────────────────────────────────────────── */
.account-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; }
.account-balance { font-size:26px; font-weight:500; font-family:var(--mono); margin-top:12px; }

/* ── REPORT TABLE ────────────────────────────────────────────────────────── */
.report-row { display:flex; align-items:center; padding:12px 20px; border-bottom:1px solid var(--border); }
.report-row .label { flex:1; font-size:14px; }
.report-row .value { font-family:var(--mono); min-width:130px; text-align:right; font-size:14px; }
.report-section-head { background:var(--surface-2); padding:8px 20px; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; color:var(--text-2); }
.report-total { font-weight:600; background:var(--surface-2); font-size:14px; }

/* ── TOAST ───────────────────────────────────────────────────────────────── */
.nb-toast {
  position:fixed; top:20px; right:20px;
  min-width:280px; max-width:400px;
  display:flex; align-items:center; gap:10px;
  padding:13px 16px; border-radius:8px;
  font-size:13px; font-weight:600;
  z-index:9999; border:1px solid transparent;
  box-shadow:0 2px 12px rgba(0,0,0,.08);
  animation:toastIn .2s ease;
  pointer-events:auto;
}
.nb-toast.nb-toast-success { background:#f0fdf4; border-color:#bbf7d0; color:#166534; }
.nb-toast.nb-toast-error   { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.nb-toast.nb-toast-info    { background:#eff6ff; border-color:#bfdbfe; color:#1e40af; }
.nb-toast-icon { font-size:15px; flex-shrink:0; }
.nb-toast-msg  { flex:1; line-height:1.4; }
.nb-toast-close {
  background:none; border:none; color:currentColor; opacity:.5;
  font-size:17px; line-height:1; cursor:pointer; padding:0; flex-shrink:0;
}
.nb-toast-close:hover { opacity:1; }

/* ── CHART BARS ──────────────────────────────────────────────────────────── */
.chart-bar { display:flex; align-items:flex-end; gap:8px; height:100px; }
.chart-col  { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; }
.chart-bars { width:100%; display:flex; gap:3px; align-items:flex-end; height:80px; }
.bar        { flex:1; border-radius:4px 4px 0 0; }
.chart-label { font-size:12px; color:var(--text-muted); }

/* ── PROGRESS ────────────────────────────────────────────────────────────── */
.nb-progress { height:6px; background:var(--surface-3); border-radius:3px; overflow:hidden; }
.nb-progress-bar { height:100%; background:var(--accent); border-radius:3px; transition:width .5s; }

/* ── AUTH PAGES ──────────────────────────────────────────────────────────── */
.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--bg); }
.auth-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:40px 48px; width:100%; max-width:440px; box-shadow:var(--shadow-md); }
.auth-wrap { padding:16px; }
.auth-brand { display:flex; align-items:center; gap:12px; margin-bottom:32px; }
.auth-brand-icon { width:44px; height:44px; background:linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); border-radius:10px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:22px; }
.auth-title { font-size:22px; font-weight:700; letter-spacing:-.4px; }

/* ── TABLE ACTION BUTTONS ────────────────────────────────────────────────── */
.btn-tbl-action {
  width: 32px; height: 32px; border: none; background: none; border-radius: 50%;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; padding: 0; color: var(--text-muted);
  transition: color .15s, background .15s;
}
.btn-tbl-action.edit:hover   { color: var(--accent); background: rgba(2,89,200,.08); }
.btn-tbl-action.unlink:hover { color: #c5221f; background: #fce8e6; }
.btn-tbl-action.delete:hover { color: #c5221f; background: #fce8e6; }
.btn-tbl-action.danger:hover { color: #c5221f; background: #fce8e6; }
.btn-tbl-action:hover        { color: var(--accent); background: rgba(2,89,200,.08); }

/* ── TAB STYLE (legacy) ──────────────────────────────────────────────────── */
.drawer-tabs { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }
.drawer-tab-link {
  display: block; padding: 10px 14px; font-size: .82rem; font-weight: 600;
  color: #5f6368; text-decoration: none; border-bottom: 2.5px solid transparent;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.drawer-tab-link:hover { color: var(--accent); }
.drawer-tab-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── GMAIL-STYLE TAB BAR ─────────────────────────────────────────────────── */
.gm-tabs-wrap { display: flex; flex-direction: column; }
.gm-tabs-bar {
  display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0;
  background: var(--surface); border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: visible;
}
.gm-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 15px 20px; font-size: .83rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px; background: transparent;
  transition: color .12s, border-color .12s;
  white-space: nowrap; cursor: pointer;
}
.gm-tab:hover { background: transparent; color: var(--text); }
.gm-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.gm-tab i { font-size: .85rem; opacity: .7; }
.gm-tab:hover i { opacity: .9; }
.gm-tab.active i { opacity: 1; color: var(--accent); }
.gm-tab-count {
  font-size: .7rem; font-weight: 500; color: var(--text-muted);
  background: transparent; border-radius: 10px; padding: 1px 7px;
  line-height: 1.6;
}
.gm-tab.active .gm-tab-count {
  background: rgba(2,89,200,.12); color: var(--accent);
}
/* a count that means something (Occupied, Vacant, Current …) keeps its colour while its tab isn't open */
.gm-tab:not(.active) .gm-tab-count.gm-c-green { background: #E6F4EA; color: #137333; font-weight: 600; }
.gm-tab:not(.active) .gm-tab-count.gm-c-amber { background: #FEF7E0; color: #B06000; font-weight: 600; }
.gm-tab:not(.active) .gm-tab-count.gm-c-gray  { background: #F1F3F4; color: #5F6368; font-weight: 600; }
.gm-tab:not(.active) .gm-tab-count.gm-c-blue  { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.gm-tab:not(.active) .gm-tab-count.gm-c-red   { background: #FCE8E6; color: #C5221F; font-weight: 600; }
/* a table's own toolbar row inside its card (Transactions, Collections, Utility): tabs · … · period, Add, Download */
.tb-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); min-height: 56px; flex-wrap: wrap; }
.tb-row .gm-tabs-list { padding-left: 4px; flex: 0 1 auto; }     /* when the row is too narrow, the buttons go to a second line */
.tb-row .gm-tabs-list::-webkit-scrollbar { display: none; }
.tb-row .gm-tab { padding: 14px 12px; }
.tb-row .gm-tab:focus { outline: none; background: transparent; }
.tb-row .gm-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 6px; }
.tb-row .gm-tabs-spacer { min-width: 8px; }
.tb-row-right .nb-tb-long { display: none; }          /* "Generate Collections" reads "Generate" in the toolbar */
.tb-row-right { display: flex; align-items: center; gap: 8px; padding: 8px 12px; flex-shrink: 0; margin-left: auto; }
.tb-row-right > .btn-link { align-self: center !important; }
.tb-row-right .btn { white-space: nowrap; }
.tb-row-right .tx-date-nav { margin: 0; }
.nb-tx-moved { display: none !important; }
/* the server was asked for one type, status or account (a link): say so */
.nb-srvf { padding: 10px 16px; border-bottom: 1px solid var(--border); background: #FEF7E0; color: #7A4B00; font-size: .84rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nb-srvf a { color: var(--accent); font-weight: 600; margin-left: 6px; }
.gm-tabs-list { display: flex; list-style: none; margin: 0; padding: 0; }
.gm-tabs-spacer { flex: 1; }
.gm-tabs-actions {
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
  border-left: 1px solid var(--border);
}
.gm-tabs-content {
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
}
.gm-tabs-content .nb-card {
  border-radius: 0; box-shadow: none; border: none; margin: 0;
}

/* ── TRANSACTION MODAL ───────────────────────────────────────────────────── */
/* ── Transaction type tabs (Task 5: underline style) ──────────────────────── */
.tx-type-tabs {
  display: flex; align-items: stretch;
  background: #fff; padding: 0 16px;
  gap: 0; border-bottom: 1.5px solid #e8eaed;
}
.tx-type-btn {
  flex: 0 0 auto; padding: 12px 20px;
  border: none; border-bottom: 3px solid transparent; margin-bottom: -1.5px;
  background: transparent; font-size: .85rem; font-weight: 600;
  color: #5f6368; cursor: pointer;
  transition: color .15s, border-color .15s;
  border-radius: 0;
}
.tx-type-btn:hover:not(.active) { color: #202124; border-bottom-color: #dadce0; }

/* ── Transaction form layout (Task 1: 60/40 split) ───────────────────────── */
.tx-form-body {
  display: flex; min-height: 340px;
}
.tx-main-fields {
  flex: 3; padding: 20px 24px; min-width: 0;
}
.tx-other-fields {
  flex: 2; flex-shrink: 0;
  border-left: 1.5px solid #e8eaed;
  padding: 20px 18px;
  background: #f8f9fa;
}
.tx-other-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-2); margin-bottom: 14px;
}

/* ── Amount + inline currency (Task 3) ───────────────────────────────────── */
.tx-amount-wrap {
  display: flex; align-items: center;
  border: 1px solid #ced4da; border-radius: 6px;
  overflow: hidden; background: #fff;
}
.tx-currency-lbl {
  border-right: 1px solid #e0e0e0;
  background: #f8f9fa; color: #5f6368;
  font-size: .8rem; font-weight: 600;
  padding: 4px 10px; flex-shrink: 0;
  white-space: nowrap; user-select: none;
}
.tx-amount-input {
  border: none !important; border-radius: 0 !important;
  box-shadow: none !important; flex: 1;
}
.tx-amount-wrap:focus-within {
  border-color: #7FA9E6; box-shadow: 0 0 0 .2rem rgba(2,89,200,.15);
}

/* ── CATEGORIES PAGE ─────────────────────────────────────────────────────── */
.cat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--surface);
  transition: background .12s;
}
.cat-row:hover { background: #f8f9fa; }
.cat-inactive  { opacity: .55; }

.cat-toggle-btn {
  width: 24px; height: 24px; border: none; background: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; flex-shrink: 0;
}
.cat-chevron { font-size: .75rem; transition: transform .2s ease; }

.cat-info {
  flex: 1; display: flex; align-items: baseline; gap: 8px; min-width: 0;
}
.cat-name  { font-size: .875rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.cat-desc  { font-size: .78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cat-meta  { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Subcategory rows */
.sub-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; background: #f8faff;
  border-top: 1px solid var(--border);
  transition: background .12s;
}
.sub-row:hover { background: #eef2ff; }
.sub-inactive  { opacity: .5; }

.sub-indent {
  width: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sub-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted); flex-shrink: 0;
}
.sub-name { font-size: .84rem; font-weight: 500; color: var(--text); }

/* Add subcategory row */
.sub-add-row {
  padding: 8px 16px 10px 50px;
  background: #f8faff;
  border-top: 1px solid var(--border);
}
.sub-add-btn {
  font-size: .78rem; padding: 3px 10px; border-radius: 6px;
}

/* Toggle button hover */
.btn-tbl-action.toggle:hover { color: var(--accent); background: rgba(2,89,200,.08); }

/* ── TRANSACTION DATE NAVIGATOR ─────────────────────────────────────────── */
.tx-date-nav {
  display: flex; align-items: center; gap: 4px;
}
.tx-nav-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 50%;
  font-size: 14px; color: var(--text-muted); cursor: pointer; transition: background .12s;
}
.tx-nav-arrow:hover { background: var(--surface-2); }
.tx-nav-label {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
  transition: background .12s; min-width: 120px; justify-content: center;
}
.tx-nav-label:hover { background: var(--surface-2); }
.tx-clear-date {
  font-size: 12px; padding: 0 6px; color: var(--text-muted);
}

/* ── DATE PICKER (shared base) ───────────────────────────────────────────── */
.tx-date-picker {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 1060;
  background: #fff; border: 1px solid #e0e0e0;
  border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.13);
  overflow: hidden; min-width: 460px;
}

/* ── MONTH-GRID PICKER (service charge / simple) ─────────────────────────── */
.tx-date-picker.tx-dp-compact { min-width: 260px; }
.tx-dp-tabs { display: flex; border-bottom: 1px solid #f0f0f0; }
.tx-dp-tab {
  flex: 1; padding: 9px; font-size: .82rem; font-weight: 500;
  background: none; border: none; color: #5f6368; cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .12s, border-color .12s;
}
.tx-dp-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tx-dp-tab:hover:not(.active) { background: #f8f9fa; }
.tx-dp-year-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: .88rem; font-weight: 700; color: #202124;
}
.tx-dp-yr-btn {
  width: 26px; height: 26px; border: 1px solid #e0e0e0; background: none;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: .75rem; color: #5f6368; transition: background .1s;
}
.tx-dp-yr-btn:hover { background: #f1f3f4; }
.tx-dp-months-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; padding: 4px 14px 14px;
}
.tx-dp-month-btn {
  padding: 7px 0; font-size: .8rem; font-weight: 500;
  border: 1px solid #e8eaed; background: #fff; border-radius: 7px;
  cursor: pointer; color: #3c4043; transition: background .1s, border-color .1s;
}
.tx-dp-month-btn:hover { background: #f1f3f4; border-color: #d2d7df; }
.tx-dp-month-btn.today { font-weight: 700; border-color: var(--accent); color: var(--accent); }
.tx-dp-month-btn.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.txdp-body { display: flex; }
/* Left presets */
.txdp-presets { width: 138px; flex-shrink: 0; border-right: 1px solid #f1f3f4; padding: 8px 0; }
.txdp-preset {
  padding: 9px 18px; font-size: .82rem; cursor: pointer;
  color: #3c4043; transition: background .1s;
  border-left: 3px solid transparent;
}
.txdp-preset:hover { background: #f8f9fa; }
.txdp-preset.active { background: var(--accent-light); color: var(--accent); font-weight: 600; border-left-color: var(--accent); }
/* Right calendar */
.txdp-cal-panel { flex: 1; padding: 14px 16px 10px; }
.txdp-range-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.txdp-range-field { flex: 1; }
.txdp-range-label { font-size: .75rem; color: #5f6368; text-transform: uppercase; letter-spacing: .4px; display: block; margin-bottom: 3px; }
.txdp-range-val {
  font-size: .84rem; font-weight: 500; color: #202124;
  border: 1.5px solid #e0e0e0; border-radius: 6px;
  padding: 5px 10px; min-height: 32px; cursor: default;
}
.txdp-range-val.picking { border-color: var(--accent); }
/* Editable date input (replaces range-val when inputs are used) */
.txdp-range-input {
  width: 100%; font-size: .84rem; font-weight: 500; color: #202124;
  border: 1.5px solid #e0e0e0; border-radius: 6px;
  padding: 5px 10px; height: 32px; outline: none;
  transition: border-color .15s;
  font-family: 'Inter', sans-serif;
}
.txdp-range-input:focus { border-color: var(--accent); }
.txdp-range-sep { color: #9e9e9e; flex-shrink: 0; }
.txdp-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.txdp-cal-month-label { font-size: .84rem; font-weight: 700; color: #202124; }
/* Month/year trigger button */
.txdp-myp-trigger {
  background: none; border: none; padding: 2px 6px; border-radius: 6px;
  font-size: .84rem; font-weight: 700; color: #202124; cursor: pointer;
  transition: background .1s; display: inline-flex; align-items: center; gap: 4px;
}
.txdp-myp-trigger:hover { background: #f1f3f4; }
/* Month/year picker overlay */
.txdp-myp {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 0 12px 0 0;
  display: flex; overflow: hidden; z-index: 10;
}
.txdp-myp-years {
  width: 72px; flex-shrink: 0; border-right: 1px solid #f1f3f4;
  overflow-y: auto; padding: 6px 0;
  scrollbar-width: thin; scrollbar-color: #e0e0e0 transparent;
}
.txdp-myp-years::-webkit-scrollbar { width: 4px; }
.txdp-myp-years::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }
.txdp-myp-yr-item {
  padding: 8px 0; text-align: center; font-size: .82rem; color: #3c4043;
  cursor: pointer; transition: background .1s; border-radius: 4px; margin: 1px 4px;
}
.txdp-myp-yr-item:hover { background: #f1f3f4; }
.txdp-myp-yr-item.selected { font-weight: 700; color: var(--accent); background: var(--accent-light); border-radius: 6px; }
.txdp-myp-months {
  flex: 1; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; padding: 10px;
  align-content: start;
}
.txdp-myp-mo-item {
  padding: 10px 0; text-align: center; font-size: .82rem; color: #3c4043;
  cursor: pointer; border-radius: 8px; border: 1px solid #e8eaed;
  transition: background .1s, border-color .1s; font-weight: 500;
}
.txdp-myp-mo-item:hover { background: #f1f3f4; border-color: #d2d7df; }
.txdp-myp-mo-item.selected { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.txdp-cal-nav { display: flex; gap: 4px; }
.txdp-cal-nav-btn {
  width: 26px; height: 26px; border: 1px solid #e0e0e0; background: none;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: .72rem; color: #5f6368; transition: background .1s;
}
.txdp-cal-nav-btn:hover { background: #f1f3f4; }
.txdp-dow-row { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; margin-bottom: 2px; }
.txdp-dow-row span { font-size: .7rem; color: #5f6368; font-weight: 600; padding: 2px 0; }
.txdp-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); }
/* Day cell: outer div holds band bg, inner span holds the circle */
.txdp-day { text-align: center; cursor: pointer; padding: 1px 0; }
.txdp-day.other-month { cursor: default; }
.txdp-day span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: .8rem; color: #3c4043; transition: background .1s;
}
.txdp-day:hover:not(.other-month) span { background: #f1f3f4; }
.txdp-day.other-month span { color: #bdc1c6; }
.txdp-day.today span { font-weight: 700; border: 1.5px solid var(--accent); color: var(--accent); }
/* Range band */
.txdp-day.in-range { background: var(--accent-light); }
.txdp-day.range-start:not(.range-end) { background: linear-gradient(to left, var(--accent-light) 50%, transparent 50%); }
.txdp-day.range-end:not(.range-start) { background: linear-gradient(to right, var(--accent-light) 50%, transparent 50%); }
.txdp-day.range-start span,
.txdp-day.range-end span { background: var(--accent) !important; color: #fff !important; border: none !important; }
/* Footer */
.txdp-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid #f1f3f4; }
.txdp-btn-cancel { min-height: 32px; padding: 0 14px; border: none; background: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 999px; }
.txdp-btn-cancel:hover { background: #f1f3f4; }
.txdp-btn-apply { min-height: 32px; padding: 0 14px; border: none; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; border-radius: 999px; cursor: pointer; }
.txdp-btn-apply:hover { background: var(--accent-hover); }
/* ── Single Date Picker (modal date fields) ──────────────────────────────── */
/* ── Custom file upload drop zone ─────────────────────────────────────────── */
.nb-file-drop {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px dashed #dadce0; border-radius: 8px;
  padding: 10px 14px; cursor: pointer; transition: border-color .15s, background .15s;
  background: #fafafa;
}
.nb-file-drop:hover { border-color: var(--accent); background: #f0f4ff; }
.nb-file-drop.has-file { border-color: #34a853; background: #f0faf2; }
.nb-file-drop.has-file span { color: var(--text); }

.sc-dp-field-wrap { display: flex; align-items: center; gap: 4px; }
.sc-dp-field-wrap .form-control { flex: 1; min-width: 0; font-family: 'Inter', sans-serif; font-size: .8rem; }
.sc-dp-cal-btn {
  flex-shrink: 0; background: none; border: 1px solid #dee2e6; border-radius: 6px;
  padding: 3px 7px; cursor: pointer; color: #6c757d; line-height: 1; height: 31px;
}
.sc-dp-cal-btn:hover { background: #f8f9fa; color: var(--accent); border-color: var(--accent); }
/* ── Inline calendar button (appended inside input-group) ────────────────── */
.input-group:has(.eu-cal-btn) .form-control { padding-top: 8px; padding-bottom: 8px; }
.input-group:has(.eu-cal-btn) .form-control:focus { box-shadow: none; border-color: var(--accent); }
.input-group:has(.eu-cal-btn):focus-within {
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 3px rgba(2,89,200,.15);
}
.input-group:has(.eu-cal-btn):focus-within .eu-cal-btn { border-color: var(--accent); }
.eu-cal-btn {
  border: 1px solid #dee2e6; border-left: none; background: var(--surface);
  padding: 0 10px; cursor: pointer; color: var(--text-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex; align-items: center; font-size: .85rem;
  transition: color .15s, border-color .15s;
}
.eu-cal-btn:hover { color: var(--accent); border-color: var(--accent); }
/* ── Charge modal: type pills ─────────────────────────────────────────────── */
/* ── Person / entity avatar (used in all people-type tables) ──────────────── */
.person-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #3D7FD9, var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; flex-shrink: 0;
}
/* one colour for everyone — owners, tenants, companies, staff, vendors (decided 15 Nov 2026: other hues clash with
   the blue; the table and the line under the name say who someone is) */
.person-name { font-size: .88rem; font-weight: 600; color: #202124; }
.person-sub  { font-size: .75rem; color: #5f6368; }
/* a column the computer doesn't show (its content sits elsewhere there); the phone's cards still use the cell */
table.nb-table th.m-desk-hide, table.nb-table td.m-desk-hide { display: none; }
.person-contact { margin-top: 1px; }

/* ── Radio card group (standardized pick-one selector) ────────────────────── */
.radio-card-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-card {
  flex: 1; min-width: 80px;
  border: 2px solid #dadce0; border-radius: 10px;
  padding: 10px 12px; cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 8px; font-size: .85rem;
  font-weight: 500; color: #3c4043; user-select: none;
}
.radio-card input[type=radio] { display: none; }
.radio-card .rc-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #dadce0; flex-shrink: 0; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.radio-card.selected { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.radio-card.selected .rc-dot { border-color: var(--accent); background: var(--accent); }
.radio-card.selected .rc-dot::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; display: block;
}

.sc-type-pills { display: flex; gap: 0; background: #f1f3f4; border-radius: 10px; padding: 3px; }
.sc-type-pill {
  flex: 1; border: none; background: transparent; border-radius: 8px;
  padding: 7px 12px; font-size: .8rem; font-weight: 500; color: #5f6368;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.sc-type-pill.active { background: #fff; color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.sc-type-pill:hover:not(.active) { color: #202124; background: rgba(255,255,255,.5); }
/* ── Charge modal: section labels ─────────────────────────────────────────── */
.sc-section-label {
  font-size: .75rem; font-weight: 700; color: #5f6368;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 8px; padding-bottom: 5px; border-bottom: 1px solid #f1f3f4;
}
/* ── Charge modal: status chips ───────────────────────────────────────────── */
.sc-status-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-status-chip.active { font-weight: 700; }
.sc-status-chip {
  border: 1.5px solid transparent; border-radius: 20px;
  padding: 3px 11px; font-size: .75rem; font-weight: 500;
  cursor: pointer; transition: all .15s; background: transparent;
  display: inline-flex; align-items: center;
}
/* Same colours as the status badges (StatusBadge.java): amber waiting, green done, grey not counted */
.sc-chip-pending, .sc-chip-partial { border-color: var(--amber); color: #a14f00; }
.sc-chip-pending.active, .sc-chip-partial.active { background: #a14f00; border-color: #a14f00; color: #fff; }
.sc-chip-pending:hover:not(.active), .sc-chip-partial:hover:not(.active) { background: var(--amber-light); }
.sc-chip-paid { border-color: var(--teal); color: var(--teal); }
.sc-chip-paid.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.sc-chip-paid:hover:not(.active) { background: var(--teal-light); }
.sc-chip-waived { border-color: #9aa0a6; color: var(--text-2); }
.sc-chip-waived.active { background: var(--text-2); border-color: var(--text-2); color: #fff; }
.sc-chip-waived:hover:not(.active) { background: var(--surface-2); }
/* ── Charge modal: paid details block ─────────────────────────────────────── */
.sc-paid-wrap {
  background: #f2f6fe; border: 1px solid var(--accent-light); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 12px;
}
#scDpSinglePanel {
  position: fixed; z-index: 1070; background: #fff;
  border: 1px solid #e0e0e0; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15); width: 252px; padding: 12px;
}
.sc-dp-single-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
}
/* In the compact single picker: fixed height so months all show and years scroll */
#scDpSinglePanel .txdp-myp { bottom: auto; height: 210px; overflow: hidden; }
/* ── Billing Month Picker Panel ───────────────────────────────────────────── */
#scBmPanel {
  position: fixed; z-index: 1070; background: #fff;
  border: 1px solid #e0e0e0; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15); width: 208px; padding: 10px;
}
.sc-bm-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; font-weight: 600; font-size: .85rem; color: #202124;
}
.sc-bm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.sc-bm-item {
  border: 1px solid #e8eaed; border-radius: 8px; background: transparent;
  padding: 8px 0; font-size: .78rem; font-weight: 500; color: #3c4043;
  cursor: pointer; text-align: center; transition: background .1s, border-color .1s;
}
.sc-bm-item:hover { background: #f1f3f4; border-color: #d2d7df; }
.sc-bm-item.selected { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* ── DATATABLES OVERRIDES ────────────────────────────────────────────────── */
/* Download collection button */
.btn-dt-download {          /* the table's Download: a round icon button, as tall as the search box (36px) */
  border: 0 !important; border-radius: 50% !important; width: 36px; min-height: 36px; height: 36px;
  background: transparent !important; color: var(--text-muted) !important;
  padding: 0 !important; box-shadow: none !important;
  display: inline-flex !important; align-items: center; justify-content: center;
}
.btn-dt-download:hover, .btn-dt-download[aria-expanded="true"] { background: #F1F3F4 !important; color: var(--text) !important; }
.btn-dt-download i { font-size: 16px; margin: 0 !important; }
.btn-dt-download.dropdown-toggle::after { display: none; }
div.dt-button-collection .dt-button.btn-dt-exp-h { font-size: .7rem !important; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-muted) !important; padding: 6px 16px 2px !important; cursor: default; opacity: 1; pointer-events: none; }

/* Collection dropdown */
div.dt-button-collection {
  border: 1.5px solid #e8eaed !important; border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.1) !important; padding: 4px 0 !important;
  min-width: 150px !important; background: #fff !important;
}
div.dt-button-collection .dt-button {
  padding: 8px 16px !important; font-size: .82rem !important;
  color: #3c4043 !important; background: none !important;
  border: none !important; width: 100% !important; text-align: left !important;
  display: flex !important; align-items: center; gap: 6px;
}
div.dt-button-collection .dt-button:hover { background: #f5f5f5 !important; }

/* Search input */
div.dt-search { position: relative; }
div.dt-search input {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  height: 36px; box-sizing: border-box; padding: 0 12px 0 34px; font-size: .82rem; min-width: 200px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='%239e9e9e' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E") no-repeat 11px center;
  color: var(--text); transition: border .15s;
}
div.dt-search input:focus { border-color: var(--accent); outline: none; box-shadow: none; }
div.dt-search label { display: contents; }

/* Length select */
div.dt-length select {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .82rem; padding: 0 8px; height: 36px; box-sizing: border-box; background: var(--surface); color: var(--text);
}
div.dt-length label { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-2); white-space: nowrap; }

/* Info text */
div.dt-info { font-size: .82rem; color: var(--text-2); }
div.dt-info strong { font-weight: 600; color: var(--text-1); }

/* Pagination — clean borderless style */
.dt-paging .pagination { gap: 2px; margin: 0; flex-wrap: nowrap; }
.dt-paging .page-item .page-link {
  font-size: .82rem; font-weight: 500;
  min-width: 32px; height: 32px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px !important;
  color: var(--text-2); background: transparent;
  margin: 0; line-height: 1; transition: background .15s, color .15s;
}
.dt-paging .page-item .page-link:hover:not(:disabled) { background: var(--surface-2); color: var(--text-1); }
.dt-paging .page-item.active .page-link { background: var(--accent); color: #fff; font-weight: 600; }
.dt-paging .page-item.disabled .page-link { color: #c5c9d0; background: transparent; pointer-events: none; opacity: .6; }

/* Top / bottom bar */
.dt-top  { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.dt-foot { padding: 8px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.dt-foot div.dt-info { flex: none; font-size: .84rem; color: var(--text-2); }
.dt-foot div.dt-paging { flex-shrink: 0; }
.dt-foot div.dt-length { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.dt-foot div.dt-length label { display: inline-flex; font-size: .84rem; color: var(--text-2); }
.dt-foot div.dt-length select { height: 32px; border-color: transparent; font-weight: 600; padding: 0 6px; }
.dt-foot div.dt-length select:hover { background-color: #F1F3F4; }
.dt-paging .page-item .page-link i { font-size: .9rem; }
/* a table under a tab row: its search and Download sit in that row (nbDTIntoTabRow) */
.dt-tabrow-tools { display: flex; align-items: center; }
.dt-tabrow-tools div.dt-search input { min-width: 220px; }

/* sort (the tables standard, Nov 2026): "Date ↓" — one arrow right after the label, on the sorted column only;
   another sortable column shows a faint ↓ on hover. A right-aligned (number) column puts it before the label,
   so the label stays in line with the numbers. Replaces DataTables' pair of triangles. */
table.dataTable thead>tr>th div.dt-column-header { justify-content: flex-start !important; flex-direction: row !important; gap: 6px; }
table.dataTable thead>tr>th div.dt-column-header .dt-column-title { flex-grow: 0; }
table.dataTable thead>tr>th.num div.dt-column-header { flex-direction: row-reverse !important; }
table.dataTable thead>tr>th .dt-column-order { position: static !important; width: auto !important; align-self: center !important; display: inline-flex; }
table.dataTable thead>tr>th .dt-column-order::before { display: none !important; }
table.dataTable thead>tr>th .dt-column-order::after {
  position: static !important; display: block !important; width: auto !important; height: auto !important; border: 0 !important;
  font-family: bootstrap-icons !important; content: "\f128" !important; font-size: .85rem; line-height: 1; color: var(--text) !important; opacity: 1 !important; }
table.dataTable thead>tr>th.dt-ordering-asc .dt-column-order::after { content: "\f148" !important; }
table.dataTable thead>tr>th:not(.dt-ordering-asc):not(.dt-ordering-desc) .dt-column-order { visibility: hidden; }
table.dataTable thead>tr>th.dt-orderable-asc:not(.dt-ordering-asc):not(.dt-ordering-desc):hover .dt-column-order,
table.dataTable thead>tr>th.dt-orderable-desc:not(.dt-ordering-asc):not(.dt-ordering-desc):hover .dt-column-order { visibility: visible; }
table.dataTable thead>tr>th:not(.dt-ordering-asc):not(.dt-ordering-desc):hover .dt-column-order::after { opacity: .35 !important; }

/* Force left-align — override DataTables Bootstrap 5 CDN styles */
table.dataTable thead th,
table.dataTable thead td,
table.dataTable tbody th,
table.dataTable tbody td,
table.dataTable tfoot th,
table.dataTable tfoot td,
table.dataTable thead .dt-ordering-asc,
table.dataTable thead .dt-ordering-desc,
table.dataTable thead .dt-orderable-asc,
table.dataTable thead .dt-orderable-desc,
table.dataTable thead .dt-column-title {
  text-align: left !important;
}

/* ── ANIMATIONS ──────────────────────────────────────────────────────────── */
@keyframes fadeIn    { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
@keyframes toastIn   { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }
@keyframes spin      { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
/* A row opened from a link (#sc-12, #bill-7): highlighted for a few seconds */
tr.nb-row-flash > td { animation: nbRowFlash 4s ease-out; }
@keyframes nbRowFlash { 0%, 50% { background: var(--accent-light); } 100% { background: transparent; } }

/* ── HAMBURGER BUTTON ────────────────────────────────────────────────────── */
.btn-hamburger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 0;
  background: none; border: none;
  border-radius: 50%;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.btn-hamburger:hover { background: var(--surface-2); }
.btn-hamburger .bi { font-size: 1.15rem; color: var(--text-2); }

/* Three animated bars */
.hbg-bar {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform .3s cubic-bezier(.4, 0, .2, 1),
    opacity   .25s ease,
    width     .3s ease;
}
/* is-open: bars morph into × */
.btn-hamburger.is-open .hbg-bar:nth-child(1) { transform: translateY(7px)  rotate(45deg);  }
.btn-hamburger.is-open .hbg-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.btn-hamburger.is-open .hbg-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Close (×) button inside sidebar — shown only on mobile */
.sidebar-close-btn {
  display: none;
  width: 30px; height: 30px;
  border: none; border-radius: 8px;
  background: transparent;
  align-items: center; justify-content: center;
  font-size: .9rem; color: var(--text-muted);
  cursor: pointer; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.sidebar-close-btn:hover { background: var(--surface-2); color: var(--text); }

/* ── SIDEBAR OVERLAY (mobile backdrop) ───────────────────────────────────── */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1049;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Body scroll lock while drawer is open */
body.sidebar-open { overflow: hidden; }


/* ── RESPONSIVE: TABLET (≤992px) ─────────────────────────────────────────── */
@media (max-width: 992px) {
  .nb-prop-name { max-width:100px; }
}

/* ── RESPONSIVE: MOBILE (≤768px) ─────────────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  /* ── Sidebar drawer (off-canvas) ── */
  .nb-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 1050;
    transform: translateX(-110%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
    box-shadow: none;
  }
  .nb-sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0,0,0,.22);
  }

  /* Show hamburger + close button */
  .btn-hamburger     { display: flex; }
  .sidebar-close-btn { display: flex; }

  /* Topbar tighten */
  .nb-topbar { padding: 0 10px; gap: 6px; height: 56px; --topbar-h: 56px; }
  .topbar-title { font-size: 15px; }

  /* Hide subtitle on very small screens */
  .topbar-sub { display: none; }

  /* Hide user name text in topbar */
  .topbar-user-text { display: none; }

  /* Shrink property switcher on mobile */
  .nb-prop-switcher { max-width: 130px; padding: 4px 8px; }
  .nb-prop-name { max-width: 70px; font-size: .78rem; }

  /* Property switcher dropdown: full-width-ish on mobile */
  .nb-prop-switcher ~ .dropdown-menu { min-width: min(260px, calc(100vw - 24px)) !important; }

  /* Main content: full width, pad bottom for bottom nav */
  .nb-main { width: 100%; }
  .nb-content { padding: 12px 14px 90px; } /* 90px = bottom nav height */

  /* Auth card full-width on phone */
  .auth-card { width: 100%; max-width: 440px; padding: 28px 20px; }

  /* Transaction modal: stack side panel below main */
  .tx-form-body { flex-direction: column; min-height: unset; }
  .tx-other-fields {
    width: 100%; flex-shrink: unset;
    border-left: none; border-top: 1.5px solid #e8eaed;
    padding: 14px 16px;
  }
  .tx-main-fields { padding: 14px 16px; }

  /* Touch-friendly table action buttons (44×44 tap area) */
  .btn-tbl-action {
    width: 36px; height: 36px; font-size: .9rem;
    /* expand tap area without changing visual size */
    padding: 4px;
  }

  /* Stat cards */
  .stat-card { padding: 14px; gap: 12px; }
  .stat-icon { width: 40px; height: 40px; font-size: 17px; }
  .stat-value { font-size: 18px; }

  /* Unit grid: 2 columns on tablet/mobile */
  .unit-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  /* Card header padding reduction */
  .nb-card-header { padding: 12px 16px; }
  .nb-card-body   { padding: 12px 16px; }

  /* DT search full width */
  div.dt-search input { min-width: 0; width: 100%; }

  /* KPI cards stacked on mobile */
  .kpi-main-value { font-size: 18px; }
}

/* ── RESPONSIVE: SMALL PHONE (≤480px) ────────────────────────────────────── */
@media (max-width: 480px) {
  .nb-content { padding: 10px 12px 90px; }
  .nb-topbar  { padding: 0 8px; gap: 4px; }

  /* Hide bell icon on tiny phones to save space */
  .nb-topbar .topbar-icon-btn[title="Pending Approvals"] { display: none; }

  /* Unit grid: 2 columns minimum */
  .unit-grid { grid-template-columns: repeat(2, 1fr); }

  /* TX KPI: full width each */
  .tx-kpi-item { flex: 1 1 100%; }
  .tx-kpi-strip { border-radius: 10px; }
}

/* ── Cashflow Widget ───────────────────────────────────────────────────────── */
.cf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.cf-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
}
.cf-date-range {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.cf-date-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cf-date-btn {
  background: var(--surface-2);
  border: none;
  padding: 6px 16px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
  white-space: nowrap;
}
.cf-date-btn:hover { background: var(--border); }
.cf-date-btn-right { border-left: 1.5px solid var(--border); }

.cf-metrics {
  display: flex;
  gap: 28px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.cf-metric { display: flex; flex-direction: column; gap: 3px; }
.cf-metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
  font-family: var(--mono);
}
.cf-metric-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
}
.cf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Chart container */
.cf-chart-outer {
  position: relative;
  padding-bottom: 22px; /* space for month labels */
}
.cf-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 0;
}
.cf-gridline {
  width: 100%;
  height: 1px;
  background: var(--border);
  opacity: .5;
}
.cf-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  position: relative;
  z-index: 1;
}
.cf-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cf-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100px;
  width: 100%;
  justify-content: center;
}
.cf-bar {
  flex: 1;
  max-width: 14px;
  border-radius: 3px 3px 0 0;
  transition: opacity .15s;
  cursor: default;
}
.cf-bar:hover { opacity: .7; }
.cf-bar-inc { background: var(--accent); opacity: .8; }
.cf-bar-exp { background: #C9DBF5; border: 1.5px solid #A9C6EF; }
.cf-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .3px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .cf-metrics { gap: 16px; }
  .cf-bar { max-width: 8px; }
  .cf-label { font-size: .55rem; }
}

/* ── Dashboard KPI Period Selector ──────────────────────────────────────── */
.btn-kpi-nav {
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; border-radius:50%;
  border:1px solid var(--border); background:var(--surface);
  color:var(--text-2); font-size:.85rem; cursor:pointer; transition:background .15s;
}
.btn-kpi-nav:hover:not(:disabled) { background:var(--surface-2); color:var(--text); }
.btn-kpi-nav:disabled { opacity:.35; cursor:default; }
.kpi-period-label {
  font-size:.85rem; font-weight:600; color:var(--text); min-width:110px; text-align:center;
}
.btn-kpi-today {
  font-size:.75rem; color:var(--accent); text-decoration:none; padding:2px 8px;
  border:1px solid var(--accent); border-radius:12px; line-height:1.6;
}
.btn-kpi-today:hover { background:var(--accent-light); }

/* ── Dashboard greeting header ───────────────────────────────────────────── */
.dash-greeting {
  font-size: 1.75rem; font-weight: 700; color: var(--text); line-height: 1.2;
}

/* ── Cash Flow preset chips ──────────────────────────────────────────────── */
.cf-preset {
  padding:2px 10px; font-size:.75rem; font-weight:500; border-radius:12px;
  border:1px solid var(--border); background:var(--surface);
  color:var(--text-2); cursor:pointer; transition:background .12s, border-color .12s, color .12s;
}
.cf-preset:hover { background:var(--surface-2); border-color:#bbb; color:var(--text); }
.cf-preset-active { background:var(--accent); border-color:var(--accent); color:#fff; }
.cf-preset-active:hover { background:var(--accent-hover); border-color:var(--accent-hover); color:#fff; }

/* ── Dashboard (Nov 2026 redesign): one big number, one sentence, plain rows ── */
:root { --dsh-out:#A3B1C2; }   /* money out: solid light slate */
.dsh-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.dsh-lead { color:var(--text-2); font-size:.9rem; margin-top:4px; }
.dsh-head .btn-kpi-today { font-size:.8rem; padding:4px 12px; }
.dsh-card { padding:20px 22px; }
.dsh-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; min-height:24px; }
.dsh-card-head h2 { font-size:15px; font-weight:600; margin:0; color:var(--text); }
.dsh-period { font-size:13px; font-weight:400; color:var(--text-muted); margin-left:8px; }
.dsh-big { font-size:30px; font-weight:600; letter-spacing:-.015em; line-height:1.15; color:var(--text); font-variant-numeric:tabular-nums; }
.dsh-big small { font-size:15px; font-weight:500; color:var(--text-muted); letter-spacing:0; }
.dsh-say { color:var(--text-2); font-size:13.5px; margin:4px 0 14px; }
.dsh-say a { color:var(--accent); text-decoration:none; font-weight:500; }
.dsh-io { display:grid; grid-template-columns:34px 1fr auto; align-items:center; gap:18px 12px; font-size:13.5px; margin-top:28px; font-variant-numeric:tabular-nums; }
.dsh-io .lbl { color:var(--text-muted); }
.dsh-io .bar { height:12px; border-radius:6px; background:var(--surface-2); overflow:hidden; }
.dsh-io .bar > div { height:100%; border-radius:6px; }
.dsh-io .val { font-weight:600; text-align:right; }
.dsh-progress { height:8px; border-radius:4px; background:var(--surface-2); overflow:hidden; margin:14px 0 8px; }
.dsh-progress > div { height:100%; background:var(--teal); border-radius:4px; }
.dsh-progress-foot { display:flex; justify-content:space-between; align-items:center; font-size:13px; }
.dsh-ok { display:inline-flex; align-items:center; gap:6px; background:var(--teal-light); color:var(--teal); font-weight:600; font-size:12.5px; border-radius:12px; padding:3px 10px; }
.dsh-kv { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:9px 0; border-top:1px solid var(--surface-3); font-size:13.5px; font-variant-numeric:tabular-nums; }
.dsh-kv > span { color:var(--text-2); display:inline-flex; align-items:center; min-width:0; }
.dsh-kv b { font-weight:600; color:var(--text); text-align:right; }
.dsh-kv .dsh-neg { color:var(--red); text-decoration:none; }
.dsh-kv b.dsh-warn { color:#B45309; }
.dsh-kv.dsh-owed { border-top-style:dashed; border-top-color:var(--border); }
.dsh-kv.dsh-owed b { color:var(--text-2); font-weight:500; }
.dsh-acct-ico { font-size:15px; color:var(--text-muted); width:18px; margin-right:10px; flex:none; }
.dsh-tip { position:relative; border:0; background:none; padding:0 0 0 4px; color:inherit; cursor:help; font-size:13px; line-height:1; }
.dsh-tip-info { color:var(--text-muted); }
.dsh-tip::after { content:attr(data-tip); position:absolute; right:-6px; bottom:calc(100% + 8px); width:270px; padding:10px 12px; border-radius:8px;
  background:#202124; color:#fff; font:400 12.5px/1.45 var(--font); text-align:left; white-space:normal; box-shadow:0 6px 18px rgba(0,0,0,.18);
  opacity:0; pointer-events:none; transform:translateY(4px); transition:opacity .12s, transform .12s; z-index:20; }
.dsh-tip:hover::after, .dsh-tip:focus-visible::after { opacity:1; transform:none; }
.dsh-chart-tools { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:-4px 0 12px; }
.dsh-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:12.5px; color:var(--text-2); }
.dsh-legend span { display:inline-flex; align-items:center; gap:6px; }
.dsh-sw { width:10px; height:10px; border-radius:3px; display:inline-block; flex:none; }
.dsh-sw-line { width:16px; height:2px; background:#0248A1; position:relative; display:inline-block; }
.dsh-sw-line::after { content:""; position:absolute; left:5px; top:-3px; width:6px; height:6px; border-radius:50%; background:#fff; border:2px solid #0248A1; box-sizing:border-box; }
.dsh-seg { display:inline-flex; border:1px solid var(--border); border-radius:18px; overflow:hidden; }
.dsh-seg .cf-preset { border:0; border-radius:0; padding:5px 11px; font-size:12.5px; }
.dsh-seg .cf-preset + .cf-preset { border-left:1px solid var(--border); }
.dsh-custom { display:flex; align-items:center; gap:6px; justify-content:flex-end; margin:-4px 0 10px; color:var(--text-muted); }
.dsh-custom .form-control { width:104px; cursor:pointer; font-size:.8rem; }
.dsh-note { margin-top:10px; font-size:12.5px; color:#B45309; }
.dsh-note > div { display:inline-flex; gap:8px; align-items:center; background:var(--amber-light); border-radius:8px; padding:6px 10px; margin:0 6px 6px 0; }
.dsh-brk { display:grid; grid-template-columns:1fr auto 48px; gap:12px; align-items:center; padding:8px 0; border-top:1px solid var(--surface-3); font-size:13px; font-variant-numeric:tabular-nums; }
.dsh-brk:first-child { border-top:0; }
.dsh-brk .name { display:inline-flex; align-items:center; gap:8px; min-width:0; color:var(--text); }
.dsh-brk .pct { color:var(--text-muted); text-align:right; }
.dsh-tx { width:100%; border-collapse:collapse; font-size:13.5px; font-variant-numeric:tabular-nums; }
.dsh-tx td { padding:10px 6px; border-top:1px solid var(--surface-3); vertical-align:middle; }
.dsh-tx tr:first-child td { border-top:0; }
.dsh-tx .d { color:var(--text-muted); white-space:nowrap; width:56px; }
.dsh-tx .desc { max-width:0; width:100%; }
.dsh-tx .desc div { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text); }
.dsh-tx .cat { white-space:nowrap; width:1%; }
.dsh-tx .dsh-tx-chip { max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
.dsh-tx .a { text-align:right; white-space:nowrap; font-weight:600; color:var(--text); }
.dsh-tx .a.in { color:var(--teal); }
.dsh-tx .a.muted { color:var(--text-muted); font-weight:500; }

/* ── Transaction KPI strip ───────────────────────────────────────────────── */
.tx-kpi-strip {
  display: flex; align-items: stretch;
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.tx-kpi-item {
  flex: 1; display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
}
.tx-kpi-divider {
  width: 1px; background: var(--border); flex-shrink: 0;
}
.tx-kpi-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.tx-kpi-label  { font-size: .75rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.tx-kpi-count  { font-size: .78rem; color: var(--text-2); margin-bottom: 4px; }
.tx-kpi-amount { font-size: 1rem; font-weight: 700; color: var(--text); }
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .tx-kpi-strip  { flex-wrap: wrap; }
  .tx-kpi-item   { flex: 1 1 45%; }
  .tx-kpi-divider { display: none; }
}

/* ── Empty state (shared across all pages) ───────────────────────────────── */
.empty-state {
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; padding:80px 20px; text-align:center;
}
.empty-icon {
  width:72px; height:72px; border-radius:20px;
  background:var(--accent-light); display:flex; align-items:center;
  justify-content:center; font-size:2rem; color:var(--accent);
  margin-bottom:20px;
}
.empty-title { font-size:1.1rem; font-weight:700; color:#202124; margin-bottom:8px; }
.empty-sub   { font-size:.88rem; color:#5f6368; max-width:360px; line-height:1.6; }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE-FIRST ADDITIONS — Google Material–inspired
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── BOTTOM NAVIGATION BAR ──────────────────────────────────────────────── */
.nb-bottom-nav {
  display: none; /* hidden on desktop */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 900;
  align-items: stretch;
  box-shadow: 0 -2px 10px rgba(60,64,67,.12);
  /* safe-area for iPhone notch */
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nb-bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
  transition: color .18s;
  /* minimum tap target */
  min-height: 48px;
  position: relative;
}
.nb-bnav-item:hover,
.nb-bnav-item.active { color: var(--accent); }
.nb-bnav-item.active::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 28px;
  background: var(--accent-light);
  border-radius: 14px;
  z-index: -1;
}
.nb-bnav-icon  { font-size: 1.3rem; line-height: 1; position: relative; }
.nb-bnav-label { font-size: .75rem; font-weight: 500; line-height: 1; white-space: nowrap; }
.nb-bnav-badge {
  position: absolute;
  top: -4px; right: -8px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 14px; height: 14px;
  border-radius: 10px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .nb-bottom-nav { display: flex; }
}

/* ── MOBILE MODAL BOTTOM SHEETS ─────────────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  /* Slide up from bottom */
  .modal-dialog {
    margin: 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .modal-content {
    border-radius: 20px 20px 0 0 !important;
    border: none !important;
    box-shadow: 0 -4px 24px rgba(0,0,0,.18) !important;
    /* safe-area bottom padding */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  /* Swipe-handle drag indicator */
  .modal-header::before {
    content: '';
    display: block;
    width: 36px; height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    margin: 0 auto 12px;
  }
  .modal-header {
    flex-direction: column;
    padding: 16px 20px 12px;
  }
  .modal-header .btn-close {
    position: absolute;
    top: 16px; right: 16px;
  }
  /* Scrollable body with max-height so content doesn't overflow viewport */
  .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Small modal (sm) same treatment */
  .modal-dialog.modal-sm { max-width: 100% !important; }
  /* Animate in from bottom */
  .modal.show .modal-dialog {
    animation: slideUpModal .28s cubic-bezier(.4, 0, .2, 1);
  }
  /* Transaction modal body */
  .tx-type-tabs { padding: 10px 12px; gap: 3px; overflow-x: auto; flex-shrink: 0; }
  .tx-type-btn  { padding: 7px 16px; font-size: .82rem; }
}

@keyframes slideUpModal {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── DATE PICKER — MOBILE FIX ────────────────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  /* Full-width picker, never overflows viewport */
  .tx-date-picker {
    position: fixed !important;
    top: auto !important;
    bottom: 70px !important; /* above bottom nav */
    left: 8px !important;
    right: 8px !important;
    min-width: unset !important;
    width: auto !important;
    border-radius: 16px;
    z-index: 1090;
  }
  /* Stack preset + calendar vertically */
  .txdp-body { flex-direction: column; }
  .txdp-presets {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
  }
  .txdp-preset {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: .8rem;
    border-left: 3px solid transparent;
  }
  .txdp-preset.active { border-color: var(--accent); }
  .txdp-cal-panel { padding: 10px 12px 8px; }

  /* Month-grid compact picker */
  .tx-date-picker.tx-dp-compact {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    min-width: 240px !important;
    width: 240px !important;
  }

  /* Single-date panel: fixed center */
  #scDpSinglePanel {
    left: 50% !important;
    transform: translateX(-50%);
  }

  /* Billing month panel */
  #scBmPanel {
    left: 50% !important;
    transform: translateX(-50%);
  }
}

/* ── INPUTS — prevent iOS auto-zoom (must be ≥16px) ─────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  input, select, textarea,
  .form-control, .form-select,
  .nb-input, .nb-select {
    font-size: 16px !important;
  }
  /* But keep labels/small text smaller */
  .nb-label, label { font-size: .82rem !important; }
}

/* ── FORMS — full-width on mobile ────────────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .modal .row { --bs-gutter-x: .75rem; }
  /* Ensure all form groups stack */
  .modal .col-sm-6, .modal .col-md-6 { flex: 0 0 100%; max-width: 100%; }
}

/* ── TOPBAR — tighten actions row on very small phones ───────────────────── */
@media (max-width: 360px) {
  .nb-topbar { gap: 2px; padding: 0 6px; }
  .nb-prop-switcher { padding: 3px 6px; max-width: 100px; }
  .nb-prop-name { max-width: 55px; }
  .topbar-icon-btn { width: 32px; height: 32px; }
}

/* ── TYPOGRAPHY — fluid on mobile ────────────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .dash-greeting { font-size: 1.3rem; }
  .stat-value    { font-size: 18px; }
  .account-balance { font-size: 20px; }
  /* Ensure minimum readable size */
  .x-small { font-size: 12px; }
  /* Table text */
  .nb-table td { font-size: 13px; padding: 10px 10px; }
  .nb-table th { font-size: 13px; padding: 8px 10px; }
  /* Card title */
  .nb-card-header .card-title { font-size: 13px; }
}

/* ── TOUCH TARGETS — minimum 44×44 everywhere ────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  /* Nav items in sidebar */
  .nav-item { padding: 11px 14px; }

  /* Topbar icon buttons */
  .topbar-icon-btn { width: 40px; height: 40px; }

  /* Table action buttons (visual 36px, logical tap area 44px via padding) */
  .btn-tbl-action { width: 36px; height: 36px; }

  /* Badge / chip buttons */
  .nb-btn-outline, .nb-btn-ghost { padding: 6px 12px; font-size: .82rem; }

  /* KPI nav buttons */
  .btn-kpi-nav { width: 36px; height: 36px; }
  .tx-nav-arrow { width: 36px; height: 36px; }

  /* Bottom nav already 48px min-height */
}

/* ── DASHBOARD ───────────────────────────────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .empty-state { padding: 50px 16px; }
}

/* ── SWIPE INDICATOR ON MODALS ───────────────────────────────────────────── */
.modal-drag-handle {
  width: 36px; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 12px;
}

/* ── DROPDOWN MENUS — clamp on mobile ────────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .dropdown-menu {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Prevent menu overflow past screen edge */
  .dropdown-menu-end { right: 0 !important; left: auto !important; }
}

/* ── TABLES — horizontal scroll on mobile ────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .table-wrap { -webkit-overflow-scrolling: touch; }
  /* Don't clip action column */
  .nb-table td:last-child { white-space: nowrap; }
}

/* ── FILTER BAR — stack on mobile ────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Transaction / SC / Utility filter bar */
  form.d-flex.gap-2.mb-3.align-items-end.flex-wrap {
    flex-direction: column;
    align-items: stretch !important;
  }
  form.d-flex.gap-2.mb-3.align-items-end.flex-wrap > div,
  form.d-flex.gap-2.mb-3.align-items-end.flex-wrap > a {
    width: 100%;
  }
  form.d-flex.gap-2.mb-3.align-items-end.flex-wrap .ms-auto {
    margin-left: 0 !important;
    margin-top: 4px;
  }
  form.d-flex.gap-2.mb-3.align-items-end.flex-wrap .d-flex.gap-2 {
    width: 100%;
    justify-content: stretch;
  }
  form.d-flex.gap-2.mb-3.align-items-end.flex-wrap .d-flex.gap-2 > * {
    flex: 1;
  }
  form.d-flex.gap-2.mb-3.align-items-end.flex-wrap select,
  form.d-flex.gap-2.mb-3.align-items-end.flex-wrap .form-select { width: 100%; }
}

/* ── GM TABS — horizontal scroll on mobile ────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .gm-tabs-bar { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .gm-tab { padding: 12px 14px; font-size: .78rem; }
  .gm-tabs-actions { padding: 0 8px; }
}

/* ── TX KPI STRIP — better mobile layout ─────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .tx-kpi-strip  { flex-wrap: wrap; }
  .tx-kpi-item   { flex: 1 1 45%; padding: 14px 14px; }
  .tx-kpi-divider { display: none; }
  .tx-kpi-icon { width: 36px; height: 36px; font-size: 1rem; }
  .tx-kpi-amount { font-size: .9rem; }
}

/* ── AUTH PAGES on small phones ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 24px 16px; border-radius: 0; border: none; box-shadow: none; }
  .auth-wrap { padding: 0; align-items: flex-start; }
}

/* ── IMAGES responsive ───────────────────────────────────────────────────── */
img { max-width: 100%; height: auto; }
.brand-logo-img { width: 36px; height: 36px; }

/* ── SAFE AREA for iPhones with notch/home indicator ─────────────────────── */
.nb-bottom-nav {
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 4px);
  height: calc(64px + max(env(safe-area-inset-bottom, 0px), 0px));
}
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .nb-content {
    padding-bottom: calc(90px + max(env(safe-area-inset-bottom, 0px), 0px));
  }
}


/* ── Phone: fold secondary filters behind a "Filters" button (forms with data-mobile-filters) ── */
.nb-mf-toggle { display:none; }
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .nb-mf-toggle { display:inline-flex; align-items:center; gap:6px; align-self:flex-end; }
  form.nb-mf:not(.nb-mf-open) .nb-mf-extra { display:none !important; }
  .nb-mf-count { background:var(--accent); color:#fff; border-radius:10px; font-size:12px; padding:0 6px; line-height:18px; }
}

/* ── Bulk action bars (Collections, Utility Bills) on phones ────────────────
   The desktop pill is one line; on a phone it wraps into a card that fits the screen,
   above the bottom navigation, so date, account, method and Apply stay reachable. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  #scBulkBar, #utBulkBar {
    left: 8px !important;
    right: 8px !important;
    transform: none !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    max-width: calc(100vw - 16px);
    flex-wrap: wrap;
    white-space: normal !important;
    border-radius: 16px !important;
    padding: 10px 12px !important;
    row-gap: 8px;
  }
  #scBulkBar > div[style*="width:1px"], #utBulkBar > div[style*="width:1px"] { display: none; }
  #scBulkPaidDateWrap, #utBulkPaidWrap { flex-wrap: wrap; row-gap: 6px; }
  #scBulkBar select, #utBulkBar select { max-width: 100%; }
}

/* ── Text colours that meet WCAG AA (4.5:1) on their backgrounds ─────────── */
.nb-badge-blue  { color: var(--accent-hover); }
.nb-badge-amber { color: #a14f00; }
.nb-badge-red   { color: #b3261e; }
.drawer-tab-link:hover, .drawer-tab-link.active { color: var(--accent-hover); }

/* ── Keyboard focus and reduced motion (UX review, 5 Nov 2026) ──────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-control:focus-visible, .form-select:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(2,89,200,.25); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.dash-empty-note { font-size:.8rem; color:var(--text-2); margin:-4px 0 8px; }
.dash-empty-note a { color:var(--accent); text-decoration:none; font-weight:500; }
.dash-not-generated { padding:6px 0 2px; }
/* An action a row doesn't have keeps its place, so each icon stays in the same column on every row */
/* the empty place of a row icon a row doesn't have: as wide as .btn-tbl-action, so the other icons stay in their columns */
.btn-tbl-slot { display:inline-block; width:32px; height:32px; flex-shrink:0; vertical-align:middle; }

/* ── Phone: Transactions and Collections as cards (plan B, UX review 5 Nov 2026) ──
   The same table rows, laid out as cards below 768px: what it was for and the amount on top,
   the details in one grey line under it, actions at the bottom. No sideways scrolling, nothing cut off. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  #tblTx, #tblSc { display: block; width: 100% !important; }
  #tblTx thead, #tblSc thead { display: none; }
  #tblTx tbody, #tblSc tbody { display: block; }
  #tblTx tbody tr.tx-row, #tblSc tbody tr.sc-row {
    display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0; row-gap: 4px;
    position: relative; padding: 12px 16px; border-bottom: 1px solid var(--border);
  }
  #tblTx tbody tr > td, #tblSc tbody tr > td { display: block !important; border: none !important; padding: 0 !important; background: none !important; }

  /* Transactions — line 1: description · amount; line 2: category › sub · account · date (· payee); status if not completed */
  #tblTx .tx-c-check { display: none !important; }
  #tblTx .tx-c-desc   { order: 1; flex: 1 0 calc(100% - 8.5rem); min-width: 0; font-size: 15px; font-weight: 500; color: var(--text); padding-right: 12px !important; overflow-wrap: anywhere; }
  #tblTx .tx-c-desc:empty::before { content: attr(data-fallback); }
  #tblTx .tx-c-amount { order: 2; flex: 0 0 8.5rem; text-align: right; }
  #tblTx .tx-c-amount > div { justify-content: flex-end !important; }
  #tblTx .tx-c-amount > div > span:first-child:not(:only-child) { display: none !important; }      /* the type arrow chip */
  #tblTx .tx-c-amount .mono { font-size: 15px !important; }
  #tblTx .tx-c-cat, #tblTx .tx-c-acct, #tblTx .tx-c-date, #tblTx .tx-c-payee { flex: 0 0 auto; font-size: 13px !important; color: var(--text-2) !important; }
  #tblTx .tx-c-cat    { order: 3; }
  #tblTx .tx-c-acct   { order: 4; }
  #tblTx .tx-c-date   { order: 5; font-family: var(--font) !important; }
  #tblTx .tx-c-payee  { order: 6; flex: 0 0 100%; }                                  /* its own line: "To …" / "From …" */
  #tblTx .tx-c-payee.is-empty { display: none !important; }
  #tblTx .tx-t-expense .tx-c-payee::before { content: 'To '; }
  #tblTx .tx-t-income  .tx-c-payee::before { content: 'From '; }
  #tblTx .tx-c-acct::before, #tblTx .tx-c-date::before { content: '·'; margin: 0 6px; color: var(--text-muted); }
  #tblTx .tx-c-cat .nb-badge { background: none !important; padding: 0; font-size: 13px; font-weight: 400; color: var(--text-2) !important; }
  #tblTx .tx-c-cat .nb-badge-sub::before { content: '›'; margin: 0 4px; }
  #tblTx .tx-c-status { order: 7; margin-left: auto; padding-left: 8px !important; }
  #tblTx tr.tx-st-completed .tx-c-status { display: none !important; }
  #tblTx .tx-c-action { order: 8; flex: 0 0 100%; display: flex !important; justify-content: flex-end; gap: 4px; margin: -6px -8px -8px 0; }

  /* Collections — the checkbox stays (mark several paid at once) */
  #tblSc tbody tr.sc-row { padding-left: 48px; }
  #tblSc .sc-c-check  { position: absolute; left: 12px; top: 12px; }
  #tblSc .sc-c-check input { width: 20px; height: 20px; }
  #tblSc .sc-c-charge { order: 1; flex: 1 0 calc(100% - 7.5rem); min-width: 0; padding-right: 12px !important; }
  #tblSc .sc-c-charge > div { font-size: 15px !important; }
  #tblSc .sc-c-amount { order: 2; flex: 0 0 7.5rem; text-align: right; font-size: 15px !important; font-weight: 600; }
  #tblSc .sc-c-month, #tblSc .sc-c-paid, #tblSc .sc-c-method { flex: 0 0 auto; font-size: 13px !important; color: var(--text-2) !important; font-family: var(--font) !important; }
  #tblSc .sc-c-month  { order: 3; }
  #tblSc .sc-c-paid   { order: 4; }
  #tblSc .sc-c-method { order: 5; }
  #tblSc .sc-c-paid::before { content: '· paid '; margin-left: 6px; color: var(--text-muted); }
  #tblSc .sc-c-method::before { content: '·'; margin: 0 6px; color: var(--text-muted); }
  #tblSc tr.sc-unpaid .sc-c-paid, #tblSc .sc-c-method.is-empty { display: none !important; }
  #tblSc .sc-c-status { order: 6; margin-left: auto; padding-left: 8px !important; }
  #tblSc .sc-c-action { order: 7; flex: 0 0 100%; display: flex !important; justify-content: flex-end; gap: 4px; margin: -6px -8px -8px 0; }

  /* bigger touch targets for the card actions */
  #tblTx .tx-c-action .btn-tbl-action, #tblSc .sc-c-action .btn-tbl-action, #tblSc .sc-c-action .btn-tbl-slot { width: 40px; height: 40px; font-size: 1rem; }
  #tblTx .tx-c-action .tx-managed-link { padding: 8px 4px; }

  /* list chrome: no "Show 25 entries"; search takes the width */
  .dt-container:has(#tblTx) div.dt-length, .dt-container:has(#tblSc) div.dt-length { display: none; }
  .dt-container:has(#tblTx) .dt-top-right, .dt-container:has(#tblSc) .dt-top-right { flex: 1 1 auto; }
  .dt-container:has(#tblTx) div.dt-search, .dt-container:has(#tblSc) div.dt-search { flex: 1 1 auto; min-width: 0; }
  .dt-container:has(#tblTx) .dt-top, .dt-container:has(#tblSc) .dt-top { padding: 10px 12px; }
  .dt-container:has(#tblTx) .dt-top-right, .dt-container:has(#tblSc) .dt-top-right { min-width: 0; width: 100%; }
  .dt-container:has(#tblTx) div.dt-search input, .dt-container:has(#tblSc) div.dt-search input { min-width: 0 !important; width: 100% !important; }
  .dt-container:has(#tblTx) .dt-buttons, .dt-container:has(#tblSc) .dt-buttons { flex: 0 0 auto !important; width: auto !important; }
  /* Download as an icon button so it fits beside the search box */
  .dt-container:has(#tblTx) .btn-dt-download, .dt-container:has(#tblSc) .btn-dt-download { font-size: 0 !important; padding: 6px 10px !important; flex-shrink: 0; }
  .dt-container:has(#tblTx) .btn-dt-download i, .dt-container:has(#tblSc) .btn-dt-download i { font-size: 1rem; margin: 0 !important; }
}

/* ── Brand blue for Bootstrap's own components (links, checkboxes, focus, pagination) ── */
:root { --bs-primary: #0259C8; --bs-primary-rgb: 2,89,200; --bs-link-color: #0259C8; --bs-link-color-rgb: 2,89,200;
        --bs-link-hover-color: #0248A1; --bs-link-hover-color-rgb: 2,72,161; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus, .form-control:focus, .form-select:focus { border-color: #7FA9E6; box-shadow: 0 0 0 .2rem rgba(2,89,200,.15); }
.page-link { color: var(--accent); }
.active > .page-link, .page-link.active { background-color: var(--accent); border-color: var(--accent); }
.text-primary { color: var(--accent) !important; }
.bg-primary { background-color: var(--accent) !important; }

/* ── "+ New" (top bar, desktop): a labelled button, so it isn't mistaken for the page's own "+ Add …" ── */
.nb-new-btn { display:flex; align-items:center; gap:6px; height:36px; padding:0 14px 0 16px; border-radius:999px;
              border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:14px; font-weight:600; }
.nb-new-btn:hover { background:var(--surface-2); }
.nb-new-btn .bi-plus-lg { font-size:16px; color:inherit; }
.nb-new-btn.dropdown-toggle::after { margin-left:2px; vertical-align:.12em; }
.nb-new-menu { min-width:240px; border-radius:12px; border:1px solid var(--border); box-shadow:0 6px 24px rgba(0,0,0,.12); padding:6px; }
.nb-new-item { display:flex; align-items:center; gap:10px; font-size:.86rem; padding:7px 10px; border-radius:8px; }
.nb-new-ic { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:.9rem; flex-shrink:0; }
.nb-new-ic.in    { background:var(--teal-light);  color:var(--teal); }
.nb-new-ic.out   { background:var(--red-light);   color:var(--red); }
.nb-new-ic.amber { background:var(--amber-light); color:#A14F00; }
.nb-new-ic.gray  { background:var(--surface-2);   color:var(--text-2); }
.nb-new-ic.blue  { background:var(--accent-light); color:var(--accent); }

/* ── Account menu (top bar) ─────────────────────────────────────────────── */
.nb-user-menu { min-width:264px; border-radius:12px; border:1px solid var(--border); box-shadow:0 6px 24px rgba(0,0,0,.12); padding:6px; }
.nb-um-head { display:flex; gap:12px; align-items:center; padding:10px 10px 12px; margin-bottom:4px; border-bottom:1px solid var(--surface-3); }
.nb-um-avatar { width:40px; height:40px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; flex-shrink:0; }
.nb-um-who { min-width:0; }
.nb-um-name { font-size:.88rem; font-weight:600; color:var(--text); }
.nb-um-email, .nb-um-role { font-size:.78rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:190px; }
.nb-um-role { margin-top:2px; }
.nb-um-label { font-size:.7rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); padding:6px 12px 2px; }
.nb-um-item { display:flex; align-items:center; gap:10px; font-size:.86rem; padding:8px 12px; border-radius:8px; color:var(--text); }
.nb-um-item i { font-size:1rem; color:var(--text-2); width:18px; text-align:center; }
.nb-user-menu .dropdown-divider { margin:4px 0; }
.nb-um-signout, .nb-um-signout i { color:var(--red); }

/* ── Settings: its own menu in the sidebar (sidebar.jsp, settingsMode) ── */
.nb-back-app { color: var(--text-muted); }
.nav-bld { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.nav-bld span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* the header's "Settings › Profile" */
.topbar-crumb-sep { font-size: .72em; color: var(--text-muted); margin: 0 8px; vertical-align: 1px; }

/* ═══ Buttons: one standard (docs/audits/buttons.html, Nov 2026) ═══════════════════════════════════════════════
   Five types — primary, secondary, tertiary (text), icon-only, destructive — one shape (pill), one weight (600),
   icons 16px (14px small) 6px from the text. Computer: 36px, 32px small. Phone: 44px minimum, 48px for a form's
   main action (mobile.css). Bootstrap's own classes are set through its variables, so every page follows. */
.btn {
  --bs-btn-padding-x: 16px; --bs-btn-padding-y: 0; --bs-btn-font-size: 14px; --bs-btn-font-weight: 600; --bs-btn-line-height: 1.2;
  --bs-btn-border-radius: 999px; --bs-btn-focus-box-shadow: 0 0 0 3px rgba(2,89,200,.22);
  min-height: 36px;
}
.btn-sm, .btn-group-sm > .btn { --bs-btn-padding-x: 14px; --bs-btn-padding-y: 0; --bs-btn-font-size: 13px; --bs-btn-border-radius: 999px; min-height: 32px; }
.btn.btn-xs { --bs-btn-padding-x: 10px; --bs-btn-padding-y: 0; --bs-btn-font-size: 12px; min-height: 26px; }
.btn > .bi { font-size: 16px; line-height: 1; margin: 0 !important; }
.btn-sm > .bi, .btn-xs > .bi { font-size: 14px; }
/* joined to a field or another button, a button keeps the group's corners */
/* joined buttons; DataTables wraps a table's Download in a .btn-group of its own, but it stands alone */
.input-group > .btn, .btn-group > .btn:not(.btn-dt-download) { --bs-btn-border-radius: var(--bs-border-radius); min-height: 0; }
/* primary */
.btn-primary, .btn-success {
  --bs-btn-color: #fff; --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--accent-hover); --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #023D8A; --bs-btn-active-border-color: #023D8A;
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); --bs-btn-disabled-opacity: .4;
}
/* secondary (the blue outline is folded into it) */
.btn-outline-secondary, .btn-secondary, .btn-light, .btn-outline-primary {
  --bs-btn-color: var(--text); --bs-btn-bg: #fff; --bs-btn-border-color: var(--border);
  --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--border);
  --bs-btn-active-color: var(--text); --bs-btn-active-bg: #E8EAED; --bs-btn-active-border-color: var(--border);
  --bs-btn-disabled-color: #9AA0A6; --bs-btn-disabled-bg: #fff; --bs-btn-disabled-border-color: var(--border); --bs-btn-disabled-opacity: 1;
}
/* tertiary: text only */
.btn-link {
  --bs-btn-color: var(--accent); --bs-btn-hover-color: var(--accent-hover); --bs-btn-active-color: var(--accent-hover);
  --bs-btn-padding-x: 6px; --bs-btn-font-weight: 600; text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }
/* destructive: filled to confirm, outlined where it starts */
.btn-danger {
  --bs-btn-color: #fff; --bs-btn-bg: #C5221F; --bs-btn-border-color: #C5221F;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #A50E0E; --bs-btn-hover-border-color: #A50E0E;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #8C0B0B; --bs-btn-active-border-color: #8C0B0B;
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #C5221F; --bs-btn-disabled-border-color: #C5221F; --bs-btn-disabled-opacity: .4;
}
.btn-outline-danger {
  --bs-btn-color: #C5221F; --bs-btn-bg: #fff; --bs-btn-border-color: #F2B8B5;
  --bs-btn-hover-color: #C5221F; --bs-btn-hover-bg: #FCE8E6; --bs-btn-hover-border-color: #F2B8B5;
  --bs-btn-active-color: #C5221F; --bs-btn-active-bg: #F9D5D2; --bs-btn-active-border-color: #F2B8B5;
}
/* every dialog's footer: the standard size, whatever the markup says (a delete confirmation matches Save) */
.modal-footer .btn { --bs-btn-padding-x: 16px; --bs-btn-font-size: 14px; min-height: 36px; }
/* close ✕: 32px, round, grey */
.btn-close { box-sizing: border-box; width: 32px; height: 32px; padding: 0; border-radius: 50%; background-size: 12px; opacity: .6; flex-shrink: 0; }
.btn-close:hover { opacity: .9; background-color: var(--surface-2); }

/* ═══ Tables, the redesign (Nov 2026; docs/mockups/tables-all.html) — computer only; the phone keeps its layout ═══ */
/* what moves between the two: .nb-mv = a row button that sits in the row's ⋮ on a computer (the phone still shows it);
   .nb-row-more / .nb-d-only = only on a computer; .nb-m-only = only on a phone */
@media not ((max-width: 768px) or ((hover: none) and (pointer: coarse) and (max-height: 500px))) {
  .nb-mv, .nb-m-only { display: none !important; }
}
@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  .nb-row-more, .nb-d-only, .nb-flt, .nb-fchips { display: none !important; }
}
/* the funnel in a header */
.nb-flt { width: 20px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: #9AA0A6; display: inline-grid; place-items: center;
  font-size: .74rem; padding: 0; margin-left: -2px; cursor: pointer; flex-shrink: 0; }
.nb-flt:hover { background: rgba(0,0,0,.06); color: var(--text); }
.nb-flt.on { color: var(--accent); background: var(--accent-light); }
.nb-flt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* "Filtered by Category: Electricity ✕ · Clear all" */
.nb-fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: #FBFCFD; font-size: .84rem; }
.nb-fchips[hidden] { display: none; }
.nb-fchips-l { color: var(--text-muted); }
.nb-fchip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-light); color: var(--accent); font-weight: 600; border-radius: 999px; padding: 3px 4px 3px 12px; max-width: 420px; }
.nb-fchip button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--accent); display: grid; place-items: center; font-size: .72rem; padding: 0; }
.nb-fchip button:hover { background: rgba(2,89,200,.14); }
.nb-fclear { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.nb-fclear:hover { background: var(--accent-light); }
/* the filter menu */
.nb-fmenu { position: absolute; z-index: 1060; width: 260px; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14); padding: 8px; font-size: .86rem; }
.nb-fmenu .nb-fq { height: 36px; font-size: .86rem; }
.nb-ffind { display: flex; align-items: center; gap: 8px; height: 34px; border: 1.5px solid var(--border); border-radius: 8px; padding: 0 10px; margin: 0 0 6px; color: #9AA0A6; }
.nb-ffind input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: .86rem; color: var(--text); }
.nb-flist { max-height: 260px; overflow-y: auto; }
.nb-fopt { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; margin: 0; }
.nb-fopt:hover { background: #F1F3F4; }
.nb-fopt input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; margin: 0; }
.nb-fopt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.nb-fopt em { font-style: normal; color: var(--text-muted); font-size: .78rem; }
.nb-fnone { color: var(--text-muted); padding: 8px; }
.nb-fbtns { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
/* the row's ⋮ and its menu */
.nb-row-more { display: inline-block; }
.nb-row-more .dropdown-menu { border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 8px 28px rgba(0,0,0,.14); padding: 6px; font-size: .86rem; min-width: 200px; }
.nb-row-more .dropdown-item, .nb-table td .nb-row-more a.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 400; text-decoration: none; }
.nb-row-more .dropdown-item i { color: var(--text-muted); width: 18px; text-align: center; }
.nb-row-more .dropdown-item.text-danger, .nb-row-more .dropdown-item.text-danger i { color: var(--red, #C5221F) !important; }
.nb-row-more .dropdown-item:active { background: var(--accent-light); color: var(--text); }
/* a header with a filter may wrap its label when the window is narrow ("Payer /" over "Payee"), so the table fits */
table.nb-table thead th[data-nb-filter] { white-space: normal; }
table.nb-table thead th[data-nb-filter] .dt-column-title { white-space: normal; }
/* Transactions has nine columns: on a computer window under 1400px its cells pad 12px instead of 16px, so it fits */
@media not ((max-width: 768px) or ((hover: none) and (pointer: coarse) and (max-height: 500px))) {
  @media (max-width: 1400px) {
    #tblTx th, #tblTx td { padding-left: 12px; padding-right: 12px; }
  }
}
/* table tab rows: their <li class="nav-item"> must not take the sidebar's menu style (its padding, margins and grey hover
   pill spread the tabs out and left a grey oval behind a clicked tab) */
.gm-tabs-bar > .nav-item, .gm-tabs-list > .nav-item { padding: 0; margin: 0; border-radius: 0; gap: 0; }
.gm-tabs-bar > .nav-item:hover, .gm-tabs-list > .nav-item:hover { background: none; }

/* ═══ Empty pages (docs/mockups/empty-states.html, Nov 2026) ═══
   .empty-state = a whole page or month with nothing (standard); .nb-note = a tab or filters that leave nothing (compact) */
.empty-state .empty-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.empty-state .empty-back { margin-top: 14px; font-size: .86rem; font-weight: 600; }
.empty-state .empty-back a { color: var(--accent); text-decoration: none; }
.empty-state .empty-back a:hover { text-decoration: underline; }
.nb-note { display: flex; align-items: center; gap: 14px; padding: 18px 20px; text-align: left; }
.nb-note-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.1rem; flex: none; background: #F1F3F4; color: var(--text-muted); }
.nb-note-ic.ok { background: #E6F4EA; color: #137333; }
.nb-note-tx { min-width: 0; }
.nb-note-tx b { display: block; font-size: .92rem; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.nb-note-tx span { color: var(--text-muted); font-size: .84rem; }
.nb-note .btn { margin-left: auto; flex-shrink: 0; }
table.dataTable td.dt-empty:has(.nb-note) { padding: 0 !important; text-align: left; }
/* a toolbar's download with nothing to download */
.btn-dt-download.is-off { opacity: .4; pointer-events: none; }
/* a card counting only part of the list (a tab or filters): "Expected · Pending only" */
.kpi-scope { display: inline-block; margin-left: 6px; font-size: .68rem; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 1px 7px; border-radius: 999px; background: var(--accent-light); color: var(--accent); vertical-align: 1px; }
.kpi-scope.o { background: #F1F3F4; color: var(--text-muted); }
.kpi-scope[hidden] { display: none; }

/* A computer 769–1000px wide (iPad portrait): the account button shows its avatar only, so the top bar fits
   (the account menu stuck out 12px at 820px — release audit UI-02) */
@media (min-width: 769px) and (max-width: 1000px) {
  .topbar-user-text { display: none; }
}

/* Transactions: a category and its subcategory that wrap onto two lines get a gap between the lines (they touched) */
@media not ((max-width: 768px) or ((hover: none) and (pointer: coarse) and (max-height: 500px))) {
  #tblTx .tx-c-cat .nb-badge { margin: 3px 0; }
}

/* Collections / Utility: "Record" (record a payment — nothing is paid in the app) as a small labelled button on the row,
   the same word the phone card shows; a paid row keeps its width empty so ✎ and ⋮ stay in line */
.btn-tbl-action.btn-tbl-record, #tblSc .sc-c-action .btn-tbl-action.btn-tbl-record {
  width: auto; height: 32px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent-light);
  color: var(--accent-dark); font-size: .76rem; font-weight: 600; margin-right: 2px; }
.btn-tbl-action.btn-tbl-record:hover { background: var(--accent); color: #fff; }
.btn-tbl-slot.btn-tbl-slot-record, #tblSc .sc-c-action .btn-tbl-slot.btn-tbl-slot-record { width: 64px; margin-right: 2px; }
