/* =============================================================
   ATHVIA — production stylesheet
   Direction: "The Score" + "Tabbed View"
   Type:  Space Grotesk (display) · Inter (body) · JetBrains Mono (numerals)
   Drop-in replacement for css/style.css.
   Add this to <head> of every page:
     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600;700&display=swap" rel="stylesheet">
   ============================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  --paper:    #F6F4EE;
  --paper-2:  #EFEBDF;
  --card:     #FFFFFF;
  --ink:      #0E0E10;
  --ink-2:    #2A2A2E;
  --ink-mute: #6B6B70;
  --rule:     #E2DDCE;
  --accent:   #ECFD3F;
  --accent-ink: #0E0E10;
  --grn:      #1F8A56;
  --red:      #D43A2F;
  --refund:   #F59E0B;
  --blue:     #132549;
  --orange:   #eb6832;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --pad:    16px;
  --pad-lg: 20px;
  --gap:    14px;

  --display: 'Space Grotesk', system-ui, sans-serif;
  --body:    'Inter', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  --shadow-sm: 0 1px 2px rgba(14,14,16,0.04);
  --shadow:    0 6px 22px -8px rgba(14,14,16,0.18), 0 1px 2px rgba(14,14,16,0.04);
  --shadow-lg: 0 30px 60px -20px rgba(14,14,16,0.22);

  /* profile.css aliases */
  --bg-app:     var(--paper);
  --bg-surface: var(--card);
  --text-main:  var(--ink);
  --text-muted: var(--ink-mute);
  --border:     var(--rule);
  --success:    var(--grn);
  --danger:     var(--red);
  --accent-light: color-mix(in srgb, var(--grn) 12%, transparent);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}
a { color: inherit; }
button { font-family: inherit; }

/* ---------- 3. APP CONTAINER (mobile shell) ---------- */
.app-container {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  min-height: 100vh;
  padding: 24px 18px;
}

/* dashboard layout (full-screen) */
.dashboard-layout {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--paper);
}

.dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  background: var(--paper);
  flex-shrink: 0;
  z-index: 10;
}
.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 16px 100px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.dashboard-content::-webkit-scrollbar { width: 0; }


/* ---------- 4. HEADER ---------- */
.header { text-align: center; margin-bottom: 24px; align-items: center;}
.header h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.8px;
  color: var(--ink);
}

.header h2 {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--blue);
    font-size: 16px;
    text-transform: uppercase;
    margin: 0;
}

.header p { 
  color: var(--ink-mute); 
  font-size: 14px; 
  margin-top: 10px; 
}

.header-logo-title { 
  width: 200px;
  display: flex; 
  align-items: center; 
  /* gap: 10px; */
}
.logo {
  width: 146px;
}

.header-logo-title h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 0;
}
.header-logo {
  width: 45px; height: 45px;
  /* background: var(--ink);
  background: #132549;*/
  border-radius: 9px;
  margin: 0 0 18px 10px;
  /*  padding: 6px;
 stroke: var(--accent);*/
  stroke: var(--blue);
  color: var(--blue);
}
.app-slogan {
  font-size: 11px!important;
  color: var(--ink-mute);
  font-family: var(--mono);
  letter-spacing: 0.4px;
  margin: 0;
  width: max-content;
}

.btn-logout-icon {
  width: 45px; height: 45px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .15s ease;
}
.btn-logout-icon:hover { transform: scale(1.05); }
.icon-logout { width: 30px; height: 30px; stroke: var(--red); }

/* ---------- 5. FORMS ---------- */
.input-group { margin-bottom: 14px; }
.input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--mono);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-family: var(--body);
  background: var(--card);
  color: var(--ink);
  transition: border-color .15s ease;
}
.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--ink);
}

.refund-checks {
  display: flex;
  gap: 8px;
}
.refund-check {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 14px;
  border: 1.5px solid var(--rule);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: var(--body);
  color: var(--ink-mute);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
}
.refund-check input[type="checkbox"] { display: none; }
.refund-check:has(input:checked) {
  border-color: var(--ink);
  background: var(--refund);
  color: var(--paper);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: var(--paper);
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  margin-top: 10px;
  transition: transform .15s ease;
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-delete-tx {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--red);
  border: 1.5px solid rgba(212,58,47,0.3);
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, border-color .15s;
}
.btn-delete-tx:hover { background: rgba(212,58,47,0.06); border-color: var(--red); }

.tx-tappable { cursor: pointer; transition: background .12s; border-radius: var(--r-sm); }
.tx-tappable:hover { background: var(--paper-2); }

.switch-page {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-mute);
}
.switch-page a {
  color: var(--ink);
  text-decoration: underline;
  font-weight: 600;
}

#messageBox {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-family: var(--mono);
}

/* ---------- 6. SCORE HERO (Dashboard balance card) ---------- */
.balance-header-card,
.score-card {
  background: var(--blue);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: 20px 18px 22px;
  position: relative;
  overflow: hidden;
  min-height: 110px;
}
.balance-label {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}
.balance-big {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: -2px;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--paper);
  position: relative;
  z-index: 1;
}
.balance-currency {
  font-family: var(--mono);
  font-size: 15px;
  opacity: 0.5;
  font-weight: 600;
}
.balance-bg-sparkline {
  position: absolute;
  right: 0;
  top: 0;
  width: 65%;
  height: 100%;
  pointer-events: none;
}

/* ---------- 7. CARDS & SECTIONS ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: var(--pad);
  margin-bottom: var(--gap);
  box-shadow: var(--shadow-sm);
}
.card__header { margin-bottom: 12px; }
.card__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.card__title i { color: var(--ink-mute); font-size: 14px; }

.muted { color: var(--ink-mute); font-size: 12px; }

/* ---------- 8. STAT/SUMMARY CARDS (IN/OUT) ---------- */
.summary-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.summary-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.summary-card__label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.summary-card__amount {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -1px;
  margin: 4px 0 0;
}
.summary-card__amount.amount-income { color: var(--grn); }
.summary-card__amount.amount-expense { color: var(--red); }
.summary-card__currency { font-size: 12px; color: var(--ink-mute); font-weight: 500; }
.summary-card__sub { font-size: 11px; color: var(--ink-mute); margin: 6px 0 0; }
.sparkline { display: block; width: 100%; height: 28px; margin: 6px 0 0; }

/* ---------- 9. TRANSACTION LIST ---------- */
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  gap: 12px;
}
.transaction-item:last-child { border-bottom: none; }
.transaction-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.transaction-title { font-weight: 600; font-size: 13px; color: var(--ink); }
.transaction-date {
  font-size: 11px;
  color: var(--ink-mute);
  font-family: var(--mono);
  letter-spacing: 0.3px;
}
.transaction-amount {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.amount-income  { color: var(--grn); }
.amount-expense { color: var(--red); }

/* ---------- 9b. REFUNDS PENDING BANNER ---------- */
.refunds-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1.5px dashed var(--refund);
  border-radius: var(--r);
  padding: 13px 14px;
  cursor: pointer;
}
.refunds-banner__badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(245,158,11,0.12);
  color: var(--refund);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
}
.refunds-banner__info { flex: 1; min-width: 0; }
.refunds-banner__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.refunds-banner__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--mono);
}
.refunds-banner__link {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--refund);
}

.btn-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--rule);
    display: grid;
    place-items: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}

/* ---------- 9c. ACTIVITY LIST (dashboard recent) ---------- */
.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.activity-heading {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.activity-view-all {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  text-decoration: none;
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.activity-icon--income   { background: rgba(31,138,86,0.10);  color: var(--grn); }
.activity-icon--expense  { background: rgba(212,58,47,0.10);  color: var(--red); }
.activity-icon--refund   { background: rgba(245,158,11,0.12); color: var(--refund); }
.activity-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.activity-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 3px;
}
.activity-sub {
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-amount {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.badge-pending {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--refund);
  background: rgba(245,158,11,0.12);
  border-radius: 4px;
  padding: 2px 5px;
  flex-shrink: 0;
}

/* ---------- 10. BUDGET CARDS ---------- */
.budgets-container { display: flex; flex-direction: column; gap: 10px; }
.budget-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.budget-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
.budget-amounts {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.progress-bar-bg {
  background: var(--paper-2);
  height: 6px;
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--grn);
  border-radius: var(--r-pill);
  transition: width .4s ease;
}
.progress-bar-fill.warning { background: var(--refund); }
.progress-bar-fill.danger  { background: var(--red); }

/* ---------- 11. EVENT CARDS ---------- */
.events-list-container { display: flex; flex-direction: column; gap: 10px; }

.event-card-row {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  display: flex;
  overflow: hidden;
  cursor: pointer;
  /* min-height: 80px; */
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease;

  /*  
  background: var(--blue);
  border-radius: var(--r);
  transition: transform .15s ease;
  box-shadow: var(--shadow);
  cursor: pointer;
  */
  padding: 14px 16px;
  flex-direction: column;
  gap: 10px;
  
}
.event-card-row:hover { transform: translateY(-1px); }

.event-card-icon {
  flex: 0 0 70px;
  display: grid;
  place-items: center;
  background: var(--paper-2);
}
.event-card-icon i {
  font-size: 22px;
  color: var(--ink);
}

.event-card-content {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.event-card-content h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.2px;
  word-break: break-word;
}
.event-card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink-mute);
  font-size: 11px;
  font-family: var(--mono);
}
.event-card-meta span { display: flex; align-items: center; gap: 6px; }
.event-card-meta i { width: 12px; text-align: center; }
.location-icon { color: var(--red); }
.date-icon { color: var(--ink); }

/* ---------- 11b. EVENT SECTIONS ---------- */
.ev-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ev-section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.ev-section-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-mute);
  flex-shrink: 0;
}
.event-card-past {
  background: var(--ink-2);
  border-radius: var(--r);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0.8;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-sm);
  will-change: opacity, transform;  
}

.event-card-past:hover,
.event-card-past:active {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ---------- 11c. NEXT EVENT CARD (dashboard) ---------- */
.next-event-card {
  background: var(--blue);
  border-radius: var(--r);
  padding: 14px 16px;
  cursor: pointer;
  flex-direction: column;
  gap: 10px;
  transition: transform .15s ease;
  box-shadow: var(--shadow);
}
.next-event-card:hover { transform: translateY(-1px); }
.next-event-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 6px;
}
.next-event-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.next-event-info { flex: 1; min-width: 0; }
.next-event-name {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-event-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-family: var(--mono);
}
.next-event-meta span { display: flex; align-items: center; gap: 5px; }
.next-event-countdown {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  min-width: 58px;
}
.countdown-days {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color:var(--accent);
  line-height: 1;
}
.countdown-label {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* ---------- 12. EVENT DETAILS (Tabbed view) ---------- */

/* Stats card */
.ev-stats-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 14px 16px;
  margin: 0 18px 12px;
  box-shadow: var(--shadow-sm);
}
.ev-stats-left { display: flex; flex-direction: column; gap: 4px; }
.ev-stats-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--ink-mute); margin: 0;
}
.ev-stats-amount {
  display: flex; align-items: baseline; gap: 6px; margin: 0;
}
.ev-stats-amount span:first-child {
  font-family: var(--mono); font-weight: 700;
  font-size: 30px; letter-spacing: -1.5px; color: var(--ink);
}
.ev-stats-ccy {
  font-family: var(--mono); font-size: 13px;
  color: var(--ink-mute); font-weight: 500;
}
.ev-stats-right { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.ev-stats-net {
  font-family: var(--mono); font-weight: 700;
  font-size: 15px; letter-spacing: -0.5px; margin: 0;
}
.ev-stats-net.negative { color: var(--red); }
.ev-stats-net.positive { color: var(--grn); }
.ev-stats-net.refund   { color: var(--refund); }
.ev-stats-sub {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); margin: 0;
}

/* Mini stat grid (days / avg per day) */
.ev-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.ev-mini-stat {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.ev-mini-stat__label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 6px;
}
.ev-mini-stat__val {
  font-family: var(--mono); font-weight: 700;
  font-size: 28px; letter-spacing: -1px;
  color: var(--ink); margin: 0;
}
.ev-mini-stat__sub {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); margin: 4px 0 0;
}

/* Refunds tab groups */
.refund-group { margin-bottom: 14px; }
.refund-group__header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.refund-group__title {
  font-family: var(--display); font-weight: 700;
  font-size: 15px; color: var(--ink); margin: 0;
}
.refund-group__total {
  font-family: var(--mono); font-weight: 700;
  font-size: 14px;
}
.refund-group__total.pending  { color: var(--refund); }
.refund-group__total.refunded { color: var(--grn); }

.refund-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--rule);
}
.refund-item:last-child { border-bottom: none; }
.refund-item__icon {
  flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 11px; display: grid; place-items: center;
  font-size: 16px;
}
.refund-item__icon.pending  { background: rgba(245,158,11,0.12); color: var(--refund); }
.refund-item__icon.refunded { background: rgba(31,138,86,0.10);  color: var(--grn); }
.refund-item__info { flex: 1; min-width: 0; }
.refund-item__title {
  font-weight: 700; font-size: 14px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.refund-item__sub {
  font-size: 11px; color: var(--ink-mute);
  font-family: var(--mono); margin-top: 3px;
}
.refund-item__amount {
  font-family: var(--mono); font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.refund-item__amount.pending  { color: var(--refund); }
.refund-item__amount.refunded { color: var(--grn); }

.done-badge {
  display: inline-block; 
  font-family: var(--mono);
  font-size: 10px; 
  font-weight: 700; 
  letter-spacing: 0.5px;
  color: var(--grn); 
  background: rgba(31,138,86,0.12);
  border-radius: 4px; 
  padding: 3px 7px;
  margin-left: 3px;
}

/* Footer */
.ev-footer {
  flex-shrink: 0;
  padding: 12px 18px 16px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ev-footer__add {
  width: 100%; padding: 13px;
  background: var(--blue); 
  color: var(--paper);
  border: none; 
  border-radius: var(--r-sm);
  font-family: var(--display); 
  font-weight: 600;
  font-size: 14px; cursor: pointer;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px;
}
.ev-footer-actions {
  display: flex;
  gap: 8px;
}
.ev-footer__edit {
  flex: 1; padding: 13px;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-sm);
  font-family: var(--display); font-weight: 600;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .15s;
}
.ev-footer__edit:hover { background: var(--paper-2); }
.ev-footer__delete {
  width: 44px; height: 44px; padding: 0;
  background: transparent; color: var(--red);
  border: 1.5px solid rgba(212,58,47,0.3);
  border-radius: var(--r-sm);
  font-size: 15px; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.ev-footer__delete:hover { background: rgba(212,58,47,0.06); border-color: var(--red); }

.tab-panel { padding-top: 4px; }

.event-modal-container {
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.ev-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 12px;
  background: var(--paper);
  flex-shrink: 0;
}
.ev-head .back {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.ev-head .title-block { flex: 1; min-width: 0; }
.ev-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.4px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-head .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.4px;
  margin-top: 2px;
}
.ev-status {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  letter-spacing: 0.6px;
  flex-shrink: 0;
}
.ev-status--upcoming  { background: var(--accent);  color: var(--accent-ink); }
.ev-status--ongoing   { background: var(--grn);     color: #fff; }
.ev-status--completed { background: var(--paper-2); color: var(--ink-mute); }
.ev-edit-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  flex-shrink: 0;
  transition: background .15s;
}
.ev-edit-btn:hover { background: var(--paper-2); }

.ev-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 12px 14px;
  margin: 0 18px 12px;
}
.ev-mini .label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--ink-mute);
}
.ev-mini .val {
  font-family: var(--mono); 
  font-weight: 700;
  font-size: 22px; 
  letter-spacing: -1px;
  display: flex; 
  align-items: baseline; 
  gap: 6px;
}
.ev-mini .ccy { font-size: 12px; color: var(--ink-mute); }

/* tabs row */
.tabs-row {
  display: flex; gap: 4px;
  background: var(--paper-2);
  border-radius: var(--r);
  padding: 4px;
  margin: 0 18px 12px;
}
.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 6px;
  border-radius: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all .18s ease;
}
.tab-btn .count {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(14,14,16,0.08);
  color: var(--ink-mute);
  padding: 1px 5px;
  border-radius: var(--r-pill);
}
.tab-btn.active {
  background: var(--blue);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.tab-btn.active .count {
  background: var(--accent);
  color: var(--accent-ink);
}

.scrollable-transactions {
  flex: 1;
  overflow-y: auto;
  padding: 0 18px 18px;
  -webkit-overflow-scrolling: touch;
}
.scrollable-transactions::-webkit-scrollbar { width: 4px; }
.scrollable-transactions::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: var(--r-pill);
}

/* ---------- 13. STATUS PILLS (refund) ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.status-pill.pending {
  background: rgba(245,158,11,0.14);
  color: var(--refund);
}
.status-pill.refunded {
  background: rgba(31,138,86,0.14);
  color: var(--grn);
}

/* ---------- 14. UTILITIES ---------- */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-margin-top { margin-top: 16px; }
.tools-margin-top { margin-top: 12px; }
.padding-bottom-large { margin-bottom: 16px; padding: 0 4px; }

.loading-text {
  text-align: center;
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 12px;
  padding: 16px;
}

.link-view-all {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

.btn-add-circle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 700;
  border: none;
  margin: 0;
  box-shadow: 0 6px 16px -4px rgba(236,253,63,0.5);
  cursor: pointer;
}

.events-page-title,
.events-header-container h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 0;
}
.trophy-icon-gold { color: var(--ink); }

/* ---------- 15. DANGER BUTTON ---------- */
.btn-danger {
  width: 100%;
  background: var(--card);
  border: 1px solid rgba(212,58,47,0.4);
  color: var(--red);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  padding: 14px;
  border-radius: var(--r);
  cursor: pointer;
  transition: background .15s ease;
}
.btn-danger:hover { background: rgba(212,58,47,0.06); }

/* Hide bottom nav when virtual keyboard is open (input focused on mobile) */
body.keyboard-open .menu,
body.keyboard-open .fab-center,
body.keyboard-open .quick-add-overlay,
body.keyboard-open .quick-add-sheet { display: none !important; }

/* ---------- 16. BOTTOM NAV ---------- */
.menu {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 376px;
  background: var(--blue);
  border-radius: 22px;
  padding: 8px 6px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: var(--shadow);
  z-index: 100;
}
.menu__item {
  all: unset;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  position: relative;
}
.menu__item .icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.menu__text {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.menu__item.active { color: var(--accent); }
.menu__fab-placeholder { flex: 1.4; }
.menu__border, .svg-container { display: none; }

/* Center FAB */
.fab-center {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--blue);
  border: solid, var(--paper-2);
  font-size: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 20px #6b6b70;
  z-index: 110;
  transition: rotate .2s ease;
  
}
.fab-center.open { 
/*  rotate: 45deg;*/
  transition: all 0.2s ease-in-out;
}

/* Quick-add sheet */
.quick-add-overlay {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: none;
}
.quick-add-overlay.open { display: block; }
.quick-add-sheet {
  position: fixed;
  bottom: 105px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  transform-origin: bottom center;
  display: flex;
  gap: 10px;
  z-index: 106;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.quick-add-sheet.open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}
.quick-add-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg-app);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 14px 22px;
  color: var(--blue);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  box-shadow: var(--shadow);
  width: 100px;
}
.quick-add-option i { font-size: 20px; color: var(--blue); }

/* ---------- 17. DONUT CHART ---------- */
.donut-chart-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
}
.donut-chart-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
}
.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.donut-legend-name {
  font-size: 13px;
  color: var(--ink);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.donut-legend-amount {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* ---------- 17. CATEGORY SHEET ---------- */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(14,14,16,0.5);
  z-index: 200;
  display: none;
}
.sheet-overlay.open { display: block; }

.category-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--paper);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 12px 18px 24px;
  z-index: 201;
  max-height: 70vh;
  transform: translateY(100%);
  transition: transform .25s ease;
}
.category-sheet.open { transform: translateY(0); }
.category-sheet__handle {
  width: 36px; height: 4px;
  background: var(--rule);
  border-radius: var(--r-pill);
  margin: 0 auto 12px;
}
.category-sheet__header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.category-sheet__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}
.category-sheet__close {
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-size: 18px;
  cursor: pointer;
}

/* ---------- 19. TRANSACTION HISTORY ---------- */
.tx-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px;
}
.tx-page-title {
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--blue);
    margin: 0 0 2px;
    text-transform: uppercase;
}
.tx-page-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.6px;
  margin: 0;
}
.tx-add-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--accent);
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tx-summary-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.tx-sum-card {
  background: var(--paper);
  border-radius: var(--r);
  padding: 10px 12px;
  min-width: 0;
}
.tx-sum-card--dark { background: var(--blue); color: var(--paper); }
.tx-sum-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--ink-mute);
  margin: 0 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-sum-card--dark .tx-sum-label { color: rgba(255,255,255,.5); }
.tx-sum-val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-sum-card--dark .tx-sum-val { color: var(--accent); }
.tx-sum-ccy { font-size: 10px; opacity: .7; }
.tx-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tx-tabs::-webkit-scrollbar { 
  display: none; 
}
.tx-tab {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--rule);
  background: transparent;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all .15s;
}
.tx-tab.active { 
  background: var(--blue); 
  border-color: var(--blue); 
  color: var(--accent); 
}
.tx-tab-count {
  background: rgba(0,0,0,.1);
  border-radius: 10px;
  font-size: 11px;
  font-family: var(--mono);
  padding: 0 5px;
  min-width: 18px;
  text-align: center;
}
.tx-tab.active .tx-tab-count { background: rgba(255,255,255,.18); }
.tx-search-wrap { position: relative; margin-bottom: 14px; }
.tx-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-mute); font-size: 13px; pointer-events: none;
}
.tx-search-input {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px 9px 34px;
  border-radius: var(--r);
  border: 1.5px solid var(--rule);
  background: var(--paper);
  font-family: var(--display);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.tx-search-input:focus { border-color: var(--ink); }
.tx-day-group { margin-bottom: 18px; }
.tx-day-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 2px 6px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}
.tx-day-label {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.tx-day-net { 
  font-family: var(--mono); 
  font-size: 11px; 
  font-weight: 600; 
  color: var(--ink-mute); 
}
.tx-day-net.positive { color: var(--grn); }
.tx-day-net.negative { color: var(--red); }
.tx-day-items { 
  display: flex; 
  flex-direction: column; 
  gap: 2px; 
}
.event-chip {
  display: inline-block;
  background: rgba(0,0,0,.08);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  padding: 2px 10px;
  margin-left: 15px;
  letter-spacing: 0.2px;
  vertical-align: middle;
  color: var(--ink);
}

/* ---------- 20. PROFILE / ACCOUNT ---------- */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 20px;
  text-align: center;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.profile-hero-name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.profile-hero-email {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 4px;
}
.profile-hero-since {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin: 0;
}
/* =========================================
   PROFILE — v1 styles (profile.css)
   ========================================= */
.v1-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 16px;
  color: var(--text-main);
}
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.icon-btn svg { width: 24px; height: 24px; }
.body-scroll { padding-bottom: 40px; }
.v1-hero {
  background-color: var(--blue);
  padding: 24px 20px;
  border-radius: var(--r-lg);
  border: none;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}
.v1-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.v1-hero-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.v1-avatar {
  width: 64px;
  height: 64px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.v1-name {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}
.v1-handle {
  font-family: var(--mono);
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 10px;
}
.v1-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.v1-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.v1-tag.accent {
  background-color: var(--accent);
  color: var(--ink);
}
.v1-hero-stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  position: relative;
  z-index: 1;
}
.v1-stat { text-align: left; flex: 1; padding: 0 12px; }
.v1-stat:first-child { padding-left: 0; }
.v1-stat + .v1-stat { border-left: 1px solid rgba(255,255,255,0.1); }
.v1-stat .lab {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 6px;
}
.v1-stat .val {
  font-family: var(--display);
  font-size: 22px;
  text-align: center;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}
.v1-stat .val.accent { color: var(--accent); }
.v1-group { margin-top: 24px; }
.v1-group-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0 20px 8px 0;
  letter-spacing: 0.6px;
}
.v1-list {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.v1-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.15s ease;
  width: 100%;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
}
.v1-row:last-child { border-bottom: none; }
.v1-row:active, .v1-row:hover { background-color: var(--bg-app); }
.v1-row-ico {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.v1-row-ico svg { width: 22px; height: 22px; }
.v1-row-ico.danger { color: var(--danger); }
.v1-row-meta { flex: 1; }
.v1-row-meta .t {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  margin: 0 0 2px;
}
.v1-row-meta .t.danger { color: var(--danger); }
.v1-row-meta .s {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}
.v1-row-aside {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 15px;
}
.v1-row-aside.danger .chev { color: var(--danger); }
.chev {
  font-family: var(--mono);
  font-size: 22px;
  color: #c7c7cc;
  line-height: 1;
}
.pill {
  font-family: var(--mono);
  background-color: var(--success);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.v1-card {
  border-radius: var(--r-lg);
  margin: 0;
  padding: 22px 20px 20px;
  position: relative;
  overflow: hidden;
}
.v1-sub-card {
  background-color: var(--blue);
  border: none;
}
.v1-sub-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.v1-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.v1-card-head .h {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.plan {
  background-color: var(--accent);
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.v1-sub-card .price {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  letter-spacing: -1px;
}
.v1-sub-card .per {
  font-family: var(--body);
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}
.v1-sub-card .renew {
  font-family: var(--body);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin: 4px 0 22px;
  position: relative;
  z-index: 1;
}
.v1-sub-btn {
  width: 100%;
  background-color: var(--accent);
  color: var(--ink);
  border: none;
  border-radius: var(--r-pill);
  padding: 13px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
  position: relative;
  z-index: 1;
}
.v1-sub-btn:active { opacity: 0.85; }
.footer {
  font-family: var(--body);
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 12px;
}
.brand {
  font-family: var(--display);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text-main);
  margin-bottom: 12px;
}
.mini-mark { width: 24px; height: 24px; }
.mini-mark .b { fill: var(--text-main); }
.mini-mark .y { fill: var(--accent); }
.ver { margin-top: 6px; }

/* Collapsible rows inside v1-list */
.profile-section--collapsible { display: contents; }
.profile-section__chevron {
  font-size: 12px;
  color: #c7c7cc;
  transition: transform .25s ease;
  flex-shrink: 0;
}
.profile-section--collapsible.open .profile-section__chevron {
  transform: rotate(90deg);
}
.profile-section__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.profile-section--collapsible.open .profile-section__body {
  max-height: 1000px;
}
.profile-section--collapsible.open .profile-section__body.v1-row-body {
  padding: 16px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.profile-msg {
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  margin-top: 8px;
}
.profile-app-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 8px;
  gap: 4px;
}
.profile-app-logo {
  width: 28px; height: 28px;
  background: var(--ink);
  border-radius: 8px;
  padding: 5px;
  stroke: var(--accent);
  margin-bottom: 6px;
}
.profile-app-name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.3px;
}
.profile-app-version {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  margin: 0;
  letter-spacing: 0.4px;
}
.profile-app-copy {
  font-size: 11px;
  color: var(--ink-mute);
  margin: 6px 0 0;
}
.btn-logout-full {
  width: 100%;
  padding: 12px;
  border-radius: var(--r);
  border: 1.5px solid var(--red);
  background: transparent;
  color: var(--red);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, color .15s;
}
.btn-logout-full:hover { background: var(--red); color: #fff; }

/* ---------- 18. ANIMATION ---------- */
.app-view {
  display: none;
  animation: fadeInView .3s ease;
}
.app-view.active-view { display: block; }
@keyframes fadeInView {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 19. REGISTRATION FORM ---------- */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px; 
    margin-top: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto; 
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.checkbox-group label {
    display: inline;
    margin: 0;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

/* ---------- 20. ADJUSTMENT OVERVIEW ---------- */
.adj-group-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--ink-mute);
  margin: 12px 0 6px;
}
.adj-group-label:first-child { margin-top: 0; }

.adj-cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.adj-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  user-select: none;
}
.adj-cat-chip:active { opacity: .7; }
.adj-cat-chip--on {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--grn) 10%, transparent);
}
.adj-cat-chip i { font-size: 11px; }

.adj-add-btn {
  margin-top: 16px;
  width: 100%;
  padding: 10px;
  border-radius: var(--r);
  border: 1.5px dashed var(--border);
  background: var(--paper);
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.adj-add-btn:hover, .adj-add-btn:active { 
  border-color: var(--ink);
  color: var(--ink);
}

.adj-add-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--border);
}
.adj-add-form select,
.adj-add-form input {
  padding: 9px 12px;
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.adj-add-form select:focus,
.adj-add-form input:focus { border-color: var(--accent); }
.adj-add-form__actions {
  display: flex;
  gap: 8px;
}
.adj-add-form__actions button {
  flex: 1;
  padding: 9px;
  border-radius: var(--r);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.adj-add-form__actions button:first-child {
  background: var(--accent);
  color: #fff;
}
.adj-add-form__actions button:last-child {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--ink-mute);
}
.adj-cat-msg {
  font-size: 12px;
  font-weight: 600;
  min-height: 16px;
  color: var(--green);
}
.adj-cat-msg.error { color: var(--red); }

/* ---------- 21. TRANSACTION CATEGORY BAR ---------- */
.tx-cat-overview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--rule);
  margin-top: 4px;
}
.tx-cat-overview__title {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--ink);
  padding: 0 16px;
  font-weight: 800;
}
.tx-cat-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tx-cat-group__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--ink-mute);
  padding: 0 16px;
  opacity: 0.7;
}
.tx-cat-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 16px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tx-cat-bar::-webkit-scrollbar { display: none; }

.tx-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  min-width: 120px;
}
.tx-cat-pill__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.tx-cat-pill__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tx-cat-pill__name {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
  white-space: nowrap;
  font-family: var(--body);
}
.tx-cat-pill__amt {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--mono);
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.tx-cat-pill__amt.amount-income  { color: var(--grn); }
.tx-cat-pill__amt.amount-expense { color: var(--red); }

/* ==========================================
   22. AD SLOTS
   ========================================== */
.ad-slot {
  border: 1.5px dashed rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
}
.ad-slot__label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.ad-slot__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ad-slot__cta {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex: 1;
}
.ad-slot__upgrade {
  background: transparent;
  border: 1.5px solid var(--rule);
  color: var(--ink-mute);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--body);
}
.ad-slot__upgrade:hover { background: var(--blue); color: var(--orange); }

/* ==========================================
   23. UPGRADE SHEET
   ========================================== */
.sheet-overlay.active  { display: block; }
.category-sheet.active { transform: translateY(0); }

.upgrade-sheet {
  padding: 20px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.upgrade-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.upgrade-sheet__title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.upgrade-sheet__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -4px 0 0;
}
.upgrade-plan-card {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  position: relative;
}
.upgrade-plan-card--featured {
  background-color: var(--ink);
  border-color: var(--ink);
}
.upgrade-plan-card__savings {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 20px;
  padding: 3px 10px;
}
.upgrade-plan-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 4px;
  font-family: var(--mono);
}
.upgrade-plan-card--featured .upgrade-plan-card__label { color: rgba(255,255,255,0.5); }
.upgrade-plan-card__price {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 2px;
  line-height: 1;
}
.upgrade-plan-card--featured .upgrade-plan-card__price { color: #fff; }
.upgrade-plan-card__per {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}
.upgrade-plan-card__sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 4px 0 12px;
}
.upgrade-plan-card--featured .upgrade-plan-card__sub { color: rgba(255,255,255,0.45); }
.upgrade-plan-card__btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: var(--surface);
  color: var(--text-main);
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.upgrade-plan-card__btn--dark {
  background: var(--accent);
  color: var(--ink);
}
.upgrade-sheet__msg {
  font-size: 0.85rem;
  text-align: center;
  min-height: 18px;
  margin: 0;
}
.upgrade-sheet__downgrade {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
  text-decoration: underline;
  font-family: var(--body);
  padding: 0;
}

/* ==========================================
   24. VIDEO AD OVERLAY
   ========================================== */
.video-ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
}
.video-ad-overlay.active { display: flex; }
.video-ad-card {
  background: var(--surface, #1a1a1a);
  border-radius: 16px;
  overflow: hidden;
  width: min(360px, 90vw);
}
.video-ad-placeholder {
  background: #0d0d0d;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-ad-placeholder__text {
  font-size: 2.5rem;
  opacity: 0.35;
}
.video-ad-footer {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.video-ad-brand {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
  font-family: var(--body);
}
.video-ad-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.video-ad-counter {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 14px;
  text-align: center;
}
.video-ad-skip {
  background: var(--blue);
  color: var(--accent);
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 700;
  font-family: var(--body);
  font-size: 0.82rem;
  cursor: pointer;
}
.video-ad-skip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}


/* ==========================================
   25. PUSH NOTIFICATION TOGGLE
   ========================================== */
.push-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.push-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.push-toggle__track {
  width: 44px;
  height: 24px;
  background: var(--border, #333);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
}
.push-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.push-toggle input:checked + .push-toggle__track { background: var(--blue); }
.push-toggle input:checked + .push-toggle__track::after { transform: translateX(20px); }
.push-toggle input:disabled + .push-toggle__track { opacity: 0.4; cursor: not-allowed; }
