/* Extracted from index.css L1956-L2790: Dashboard: budget overview, tablet grid */

/* ============================================================
   DASHBOARD — BUDGET OVERVIEW (collapsible)
   ============================================================ */

/* Header button */
.dbo-header-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(10, 14, 28, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: background var(--transition), border-color var(--transition), border-radius var(--transition);
  user-select: none;
  font-family: inherit;
  color: inherit;
  text-align: left;
}

.dbo-header-btn:hover { background: rgba(14, 20, 38, 0.62); }

/* Merge bottom radius into body when open */
.dbo-header-btn.dbo-open {
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom-color: transparent;
}

.dbo-header-btn.dbo-open:hover { background: rgba(10, 14, 28, 0.52); }

.dbo-header-left  { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.dbo-header-right { display: flex; align-items: center; gap: 1.25rem; }

.dbo-icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-blue), #a78bfa);
  flex-shrink: 0;
}

.dbo-title { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); }

.dbo-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.dbo-pill {
  font-size: 0.65rem; font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 99px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.dbo-pill-over { background: var(--accent-red-dim);           color: var(--accent-red); }
.dbo-pill-warn { background: rgba(251,191,36,0.1);            color: var(--accent-yellow); }
.dbo-pill-ok   { background: var(--accent-green-dim);         color: var(--accent-green); }

.dbo-summary { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.dbo-summary strong { color: var(--text-secondary); }

.dbo-chevron {
  width: 18px; height: 18px; flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dbo-header-btn.dbo-open .dbo-chevron { transform: rotate(180deg); }

/* Collapsible body — CSS grid trick for smooth height animation */
.dbo-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.dbo-body-wrap.dbo-open { grid-template-rows: 1fr; }

.dbo-body-inner { overflow: hidden; }

.dbo-body {
  background: rgba(8, 11, 22, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

/* Month progress reference row */
.dbo-month-progress {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.01);
}

.dbo-mp-label { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.dbo-mp-track { flex: 1; height: 3px; background: rgba(255,255,255,0.05); border-radius: 99px; position: relative; }
.dbo-mp-fill  { height: 100%; background: rgba(255,255,255,0.15); border-radius: 99px; }
.dbo-mp-pct   { font-size: 0.65rem; color: var(--text-secondary); font-weight: 700; white-space: nowrap; }

/* Budget rows */
.dbo-item {
  display: grid;
  grid-template-columns: 165px 1fr 115px;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}

.dbo-item:last-of-type { border-bottom: none; }
.dbo-item:hover { background: rgba(255,255,255,0.015); }

.dbo-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbo-freq { font-size: 0.64rem; color: var(--text-muted); margin-top: 1px; }

/* Bar */
.dbo-bar-wrap {
  position: relative;
  height: 22px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  overflow: visible; /* allow outside label to show */
}

/* Month-progress marker line */
.dbo-bar-wrap::after {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: 1.5px;
  left: var(--month-pct, 78%);
  background: rgba(255,255,255,0.12);
  z-index: 3;
  pointer-events: none;
  border-radius: 99px;
}

.dbo-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 6px;
  overflow: hidden;
  /* Bars start at 0 and animate to width when parent becomes open */
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent animation flash on initial render — bars only animate after first open */
.dbo-body-wrap:not(.dbo-open) .dbo-bar-fill {
  transition: none;
  width: 0 !important;
}

/* Bar colour states */
.dbo-safe { background: linear-gradient(90deg, rgba(52,211,153,0.65), rgba(52,211,153,0.45)); }
.dbo-warn { background: linear-gradient(90deg, rgba(251,191,36,0.75), rgba(232,145,60,0.6)); }
.dbo-over { background: linear-gradient(90deg, rgba(255,68,68,0.8), rgba(232,97,60,0.7)); }
.dbo-done { background: linear-gradient(90deg, rgba(96,165,250,0.6), rgba(96,165,250,0.4)); }
.dbo-unbudgeted { background: linear-gradient(90deg, rgba(251,191,36,0.45), rgba(251,191,36,0.25)); }

/* Percentage label — inside bar */
.dbo-bar-pct-inner {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  font-size: 0.64rem; font-weight: 700;
  color: rgba(255,255,255,0.9);
  z-index: 4; white-space: nowrap;
  pointer-events: none;
}

/* Percentage label — outside bar (for narrow fills) */
.dbo-bar-pct-outer {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 0.64rem; font-weight: 700;
  color: var(--text-muted);
  z-index: 4; white-space: nowrap;
  pointer-events: none;
}

/* Numbers column */
.dbo-numbers { text-align: right; }
.dbo-spent   { font-size: 0.88rem; font-weight: 700; letter-spacing: -0.01em; }
.dbo-limit   { font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; }
.dbo-remaining { font-size: 0.68rem; font-weight: 600; margin-top: 2px; }
.dbo-remaining.pos  { color: var(--accent-green); }
.dbo-remaining.neg  { color: var(--accent-red); }
.dbo-remaining.warn { color: var(--accent-yellow); }
.dbo-remaining.blue { color: var(--accent-blue); }

/* Section divider — separates Household from Personal & Savings */
.dbo-section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: rgba(167,139,250,0.05);
  border-top: 1px solid rgba(167,139,250,0.15);
  border-bottom: 1px solid rgba(167,139,250,0.15);
}

.dbo-section-divider span {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a78bfa;
  white-space: nowrap;
}

/* Footer totals */
.dbo-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--border);
}

.dbo-footer-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.dbo-footer-value { font-size: 0.9rem; font-weight: 800; color: var(--text-primary); }
.dbo-footer-cols  { display: flex; gap: 2rem; }
.dbo-footer-col   { text-align: right; }

/* Light mode overrides */
[data-theme="light"] .dbo-header-btn {
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .dbo-header-btn:hover {
  background: var(--bg-card-hover);
}

[data-theme="light"] .dbo-body {
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .dbo-bar-wrap::after {
  background: rgba(0,0,0,0.12);
}

[data-theme="light"] .dbo-mp-track {
  background: rgba(0,0,0,0.07);
}

[data-theme="light"] .dbo-mp-fill {
  background: rgba(0,0,0,0.12);
}

[data-theme="light"] .dbo-bar-wrap {
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .dbo-bar-pct-outer {
  color: var(--text-muted);
}

[data-theme="light"] .dbo-section-divider {
  background: rgba(167,139,250,0.07);
  border-color: rgba(167,139,250,0.2);
}

[data-theme="light"] .dbo-safe { background: linear-gradient(90deg, rgba(52,211,153,0.8), rgba(52,211,153,0.6)); }
[data-theme="light"] .dbo-warn { background: linear-gradient(90deg, rgba(245,158,11,0.8), rgba(232,97,60,0.7)); }
[data-theme="light"] .dbo-over { background: linear-gradient(90deg, rgba(239,68,68,0.85), rgba(220,38,38,0.75)); }
[data-theme="light"] .dbo-done { background: linear-gradient(90deg, rgba(59,130,246,0.7), rgba(96,165,250,0.55)); }
[data-theme="light"] .dbo-unbudgeted { background: linear-gradient(90deg, rgba(245,158,11,0.55), rgba(245,158,11,0.35)); }

/* ============================================================
   BUDGET TABLET GRID — Dashboard budget overview
   Flip-card tablets replacing the old progress-bar rows.
   Colour system mirrors the calendar heatmap exactly.
   ============================================================ */

/* ── Section wrapper ── */
.tbt-section {
  margin-bottom: 2rem;
}

/* ── Overview header panel ── */
.tbt-header-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: linear-gradient(180deg, rgba(14, 20, 40, 0.82), rgba(10, 14, 28, 0.82));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}
.tbt-header-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.tbt-header-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.tbt-header-summary strong { font-weight: 700; }

/* ── Tablet grid ── */
.tbt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

/* ── 3D flip scene ── */
.tbt-scene {
  perspective: 1200px;
  height: 115px;
}

.tbt-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-radius: 12px;
}

.tbt-scene.tbt-flipped .tbt-card {
  transform: rotateY(180deg);
}

/* Front and back share absolute positioning */
.tbt-front,
.tbt-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top-light sheen — gives the 3D lifted look */
.tbt-front::before,
.tbt-back::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.03) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Bottom-edge inner shadow for depth */
.tbt-front::after,
.tbt-back::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.25) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.tbt-back {
  transform: rotateY(180deg);
}

/* ── Front face layout ── */
.tbt-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 2px;
}
.tbt-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #E8EDFF;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tbt-pct-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tbt-pill-ok   { background: rgba(52,211,153,0.18);  color: #3DDC97; }
.tbt-pill-paid { background: rgba(96,165,250,0.18);  color: #60A5FA; }
.tbt-pill-warn { background: rgba(245,158,11,0.18);  color: #F5B942; }
.tbt-pill-over { background: rgba(255,68,68,0.18);   color: #FF6B6B; }

.tbt-freq {
  font-size: 0.68rem;
  color: rgba(232,237,255,0.5);
  margin-bottom: 5px;
}
.tbt-spend-line {
  margin-bottom: 6px;
}
.tbt-spent {
  font-size: 0.9rem;
  font-weight: 700;
  color: #E8EDFF;
  letter-spacing: -0.02em;
}
.tbt-of {
  font-size: 0.72rem;
  color: rgba(232,237,255,0.5);
}

/* ── Progress bar ── */
.tbt-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 5px;
}
.tbt-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: rgba(255,255,255,0.5);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tbt-remaining {
  font-size: 0.68rem;
  color: rgba(232,237,255,0.45);
  margin-top: auto;
}

/* ── Back face layout ── */
.tbt-back-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: #E8EDFF;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tbt-back-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(232,237,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.tbt-back-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tbt-back-date,
.tbt-back-memo {
  font-size: 0.72rem;
  color: rgba(232,237,255,0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.tbt-back-amt {
  font-size: 0.72rem;
  font-weight: 600;
  color: #E8EDFF;
  flex-shrink: 0;
  margin-left: 8px;
}
.tbt-back-paid-date {
  font-size: 1rem;
  font-weight: 700;
  color: #3DDC97;
  letter-spacing: -0.02em;
  margin: 4px 0 2px;
}
.tbt-back-paid-amt {
  font-size: 0.78rem;
  color: rgba(232,237,255,0.55);
}
.tbt-back-empty {
  font-size: 0.72rem;
  color: rgba(232,237,255,0.3);
  font-style: italic;
}
.tbt-back-btn {
  margin-top: auto;
  padding-top: 5px;
  font-size: 0.65rem;
  color: rgba(232,237,255,0.3);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── Heatmap colour states — mirrors calendar, with 3D depth ── */

/* Healthy / low spend — deep blue */
.tbt-safe .tbt-front,
.tbt-safe .tbt-back {
  background: linear-gradient(155deg,
    rgba(15,53,96,0.82) 0%,
    rgba(8,30,63,0.88) 55%,
    rgba(4,16,38,0.92) 100%
  );
  border: 1px solid rgba(30,120,220,0.5);
  box-shadow:
    0 0 0 1px rgba(30,120,220,0.12) inset,
    0 12px 28px rgba(0,0,0,0.55),
    0 0 22px rgba(15,80,200,0.35),
    0 0 55px rgba(10,50,160,0.18);
}
.tbt-safe .tbt-bar-fill { background: linear-gradient(90deg, #1E90FF, #60A5FA); }

/* Moderate spend — teal */
.tbt-mid .tbt-front,
.tbt-mid .tbt-back {
  background: linear-gradient(155deg,
    rgba(11,110,136,0.82) 0%,
    rgba(7,68,80,0.88) 55%,
    rgba(3,38,48,0.92) 100%
  );
  border: 1px solid rgba(20,200,220,0.55);
  box-shadow:
    0 0 0 1px rgba(20,200,220,0.1) inset,
    0 12px 28px rgba(0,0,0,0.55),
    0 0 26px rgba(15,175,195,0.4),
    0 0 60px rgba(5,110,130,0.2);
}
.tbt-mid .tbt-bar-fill { background: linear-gradient(90deg, #20C5D8, #3DDC97); }

/* Approaching limit — amber */
.tbt-warn .tbt-front,
.tbt-warn .tbt-back {
  background: linear-gradient(155deg,
    rgba(138,80,20,0.82) 0%,
    rgba(70,42,8,0.88) 55%,
    rgba(36,20,2,0.92) 100%
  );
  border: 1px solid rgba(250,180,45,0.65);
  box-shadow:
    0 0 0 1px rgba(250,180,45,0.1) inset,
    0 12px 28px rgba(0,0,0,0.55),
    0 0 32px rgba(240,155,0,0.5),
    0 0 70px rgba(200,100,0,0.22);
}
.tbt-warn .tbt-bar-fill { background: linear-gradient(90deg, #F5B942, #F59E0B); }

/* Over budget — red */
.tbt-over .tbt-front,
.tbt-over .tbt-back {
  background: linear-gradient(155deg,
    rgba(138,30,14,0.82) 0%,
    rgba(69,10,5,0.88) 55%,
    rgba(36,4,2,0.92) 100%
  );
  border: 1px solid rgba(255,85,60,0.7);
  box-shadow:
    0 0 0 1px rgba(255,85,60,0.1) inset,
    0 12px 28px rgba(0,0,0,0.55),
    0 0 38px rgba(245,60,30,0.6),
    0 0 80px rgba(180,25,10,0.28);
}
.tbt-over .tbt-bar-fill { background: linear-gradient(90deg, #FF6B6B, #FF4444); }

/* Paid in full — green */
.tbt-paid .tbt-front,
.tbt-paid .tbt-back {
  background: linear-gradient(155deg,
    rgba(10,92,58,0.82) 0%,
    rgba(6,51,36,0.88) 55%,
    rgba(2,28,18,0.92) 100%
  );
  border: 1px solid rgba(52,220,153,0.5);
  box-shadow:
    0 0 0 1px rgba(52,220,153,0.08) inset,
    0 12px 28px rgba(0,0,0,0.55),
    0 0 24px rgba(52,211,153,0.35),
    0 0 58px rgba(16,185,129,0.18);
}
.tbt-paid .tbt-bar-fill { background: linear-gradient(90deg, #3DDC97, #10B981); }

/* Unbudgeted — amber warning */
.tbt-unbudgeted .tbt-front,
.tbt-unbudgeted .tbt-back {
  background: linear-gradient(155deg,
    rgba(107,76,16,0.82) 0%,
    rgba(58,42,8,0.88) 55%,
    rgba(28,18,2,0.92) 100%
  );
  border: 1px solid rgba(245,158,11,0.45);
  box-shadow:
    0 0 0 1px rgba(245,158,11,0.08) inset,
    0 12px 28px rgba(0,0,0,0.55),
    0 0 20px rgba(245,158,11,0.28),
    0 0 50px rgba(180,110,0,0.14);
}
.tbt-unbudgeted .tbt-bar-fill { background: rgba(245,158,11,0.6); }

/* ── Annual tile — cool cyan system layer ── */
/* Applied on top of existing heat class — overrides border/shadow/bg */
.tbt-annual.tbt-front,
.tbt-annual .tbt-front,
.tbt-annual .tbt-back {
  background: linear-gradient(155deg,
    rgba(7, 30, 58, 0.92) 0%,
    rgba(5, 22, 48, 0.94) 50%,
    rgba(3, 14, 35, 0.96) 100%
  ) !important;
}
.tbt-annual {
  border: 1px solid rgba(56, 189, 248, 0.50) !important;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.14) inset,
    0 12px 28px rgba(0, 0, 0, 0.60),
    0 0 20px rgba(56, 189, 248, 0.30),
    0 0 50px rgba(14, 120, 200, 0.18) !important;
}

/* ANNUAL badge — top right, absolute, no layout impact */
.tbt-annual-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.575rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 5px;
  padding: 2px 6px;
  z-index: 2;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.55);
  line-height: 1.4;
}

/* Give the pct-pill space — badge is top-right absolute */
.tbt-annual .tbt-top {
  padding-right: 52px;
}

/* Progress bar — cyan tint */
.tbt-annual .tbt-bar-fill-annual {
  background: linear-gradient(90deg, rgba(56,189,248,0.55), rgba(125,211,252,0.80));
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.40);
}

/* Freq label — slightly brighter cyan tint */
.tbt-annual .tbt-freq {
  color: rgba(125, 211, 252, 0.65);
}

/* Hover lift for annual tiles */
.tbt-scene:not(.tbt-flipped) .tbt-annual:hover {
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.20) inset,
    0 18px 40px rgba(0, 0, 0, 0.70),
    0 0 32px rgba(56, 189, 248, 0.45),
    0 0 75px rgba(14, 120, 200, 0.28) !important;
}

/* ── Hover lift — intensifies glow, lifts off background ── */
.tbt-scene:not(.tbt-flipped) .tbt-card:hover {
  transform: translateY(-4px);
}
.tbt-scene:not(.tbt-flipped).tbt-safe .tbt-card:hover .tbt-front {
  box-shadow: 0 0 0 1px rgba(30,120,220,0.15) inset, 0 18px 40px rgba(0,0,0,0.65), 0 0 35px rgba(15,80,200,0.55), 0 0 80px rgba(10,50,160,0.28) !important;
}
.tbt-scene:not(.tbt-flipped).tbt-mid .tbt-card:hover .tbt-front {
  box-shadow: 0 0 0 1px rgba(20,200,220,0.15) inset, 0 18px 40px rgba(0,0,0,0.65), 0 0 40px rgba(15,175,195,0.6), 0 0 85px rgba(5,110,130,0.3) !important;
}
.tbt-scene:not(.tbt-flipped).tbt-warn .tbt-card:hover .tbt-front {
  box-shadow: 0 0 0 1px rgba(250,180,45,0.15) inset, 0 18px 40px rgba(0,0,0,0.65), 0 0 45px rgba(240,155,0,0.65), 0 0 90px rgba(200,100,0,0.32) !important;
}
.tbt-scene:not(.tbt-flipped).tbt-over .tbt-card:hover .tbt-front {
  box-shadow: 0 0 0 1px rgba(255,85,60,0.15) inset, 0 18px 40px rgba(0,0,0,0.65), 0 0 50px rgba(245,60,30,0.75), 0 0 95px rgba(180,25,10,0.38) !important;
}
.tbt-scene:not(.tbt-flipped).tbt-paid .tbt-card:hover .tbt-front {
  box-shadow: 0 0 0 1px rgba(52,220,153,0.12) inset, 0 18px 40px rgba(0,0,0,0.65), 0 0 38px rgba(52,211,153,0.5), 0 0 80px rgba(16,185,129,0.26) !important;
}
.tbt-scene.tbt-flipped .tbt-card:hover {
  transform: rotateY(180deg) translateY(-4px);
}

/* ── Divider between household and personal sections ── */
.tbt-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 14px;
  color: rgba(167,139,250,0.6);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.tbt-divider::before,
.tbt-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(167,139,250,0.15);
}

/* ── Footer totals row ── */
.tbt-footer {
  display: flex;
  gap: 2rem;
  padding: 0.85rem 1.25rem;
  background: rgba(10,14,28,0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  margin-top: 6px;
}
.tbt-footer-item {}
.tbt-footer-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.tbt-footer-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* ── Light mode overrides ── */
[data-theme="light"] .tbt-header-panel {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .tbt-header-title { color: #111827; }
[data-theme="light"] .tbt-header-summary { color: #6B7280; }
[data-theme="light"] .tbt-footer {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.07);
}

/* ── Budget card-row refinements ── */

/* Frequency dropdown — compact, fixed width */
.brow .cd-trigger,
.brow select.form-select {
  min-height: unset;
  height: 30px;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 148px !important;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0.6rem;
  padding-right: 1.8rem;
  line-height: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Budget input — centred within its grid cell */
.brow .budget-input-field {
  width: 100% !important;
  max-width: 110px !important;
  min-width: 0 !important;
  height: 30px;
  padding: 0 8px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, var(--bg-input) 40%, rgba(0,0,0,0.1) 100%);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 4px rgba(0,0,0,0.25);
  line-height: 30px;
  display: block;
}
.brow .budget-input-field:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px var(--accent-green-dim), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Item name — sharper typographic anchor */
.brow .brow-item-name {
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: rgba(255,255,255,0.97);
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255,255,255,0.04);
}
.brow .brow-item-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.32);
  letter-spacing: 0.01em;
  margin-top: 2px;
}

/* USE% bar — two-layer recessed track + slim fill */
.brow .use-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.03);
  padding: 3px;
  overflow: hidden;
  margin-top: 5px;
}
.brow .use-fill {
  height: 6px;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ============================================================
   PERSONAL VIEW — Bank headers & ASB account cards
   ============================================================ */

.personal-bank-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(10,14,28,0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.personal-bank-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  margin: 0 1.25rem;
  flex-shrink: 0;
}

.personal-bank-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ASB account transaction table */
.asb-account-card {
  padding: 1.25rem;
  position: relative;
}

.asb-tx-table td { padding: 0.45rem 0.5rem; font-size: 0.8rem; }
.asb-tx-table th { padding: 0.4rem 0.5rem; font-size: 0.7rem; }

