/* ============================================================
   PlannerDZ V4.0 — App Shell Styles (Light Mode)
   ============================================================ */

/* Auth Page */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: var(--s-6);
  background: var(--c-bg);
}
.auth-card {
  width: 100%; max-width: 400px;
  padding: var(--s-8); border-radius: var(--r-xl);
  animation: fadeInUp 0.5s ease both;
}
.auth-logo { text-align: center; margin-bottom: var(--s-5); }
.auth-title { text-align: center; font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--s-6); }
.auth-error {
  background: rgba(231,76,60,0.08); color: var(--c-error);
  padding: var(--s-3); border-radius: var(--r-md);
  font-size: var(--fs-sm); margin-bottom: var(--s-4);
  text-align: center;
}
.auth-submit { margin-top: var(--s-4); }
.auth-switch {
  text-align: center; margin-top: var(--s-5);
  font-size: var(--fs-sm); color: var(--c-text-muted);
}
.auth-switch a { color: var(--c-primary); font-weight: 600; text-decoration: none; }
.auth-lang-btn { display: block; margin: var(--s-4) auto 0; }

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

/* App Layout */
.app {
  display: flex; min-height: 100vh; background: var(--c-bg);
  overflow-x: hidden; position: relative; width: 100%;
}

/* Sidebar (desktop) */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--c-bg-raised);
  border-inline-end: 1px solid var(--c-glass-border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 50;
}
.sidebar__logo { padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--c-glass-border); }
.sidebar__logo img { height: 32px; width: auto; }
.sidebar__nav { flex: 1; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); }
.sidebar__link {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-text-secondary); transition: all var(--t);
}
.sidebar__link:hover { background: var(--c-surface-hover); color: var(--c-text); }
.sidebar__link.active { background: var(--c-primary-dim); color: var(--c-primary); }
.sidebar__link svg { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar__footer { padding: var(--s-4); border-top: 1px solid var(--c-glass-border); }
.sidebar__lang {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-4); border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-text-muted); transition: all var(--t);
}
.sidebar__lang:hover { background: var(--c-surface-hover); color: var(--c-text-secondary); }

/* Main Content */
.app-main {
  flex: 1; margin-inline-start: 240px; padding: var(--s-8); min-height: 100vh;
  overflow-x: hidden; max-width: 100vw;
}

/* View Header */
.view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-6); flex-wrap: wrap; gap: var(--s-3); }
.view-header h1 { font-size: var(--fs-2xl); font-weight: 700; }

#view { overflow-x: hidden; width: 100%; }

/* Bottom Tab Bar (mobile) */
.tab-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid rgba(0,0,0,0.08);
  z-index: 100; padding: var(--s-1) 0 env(safe-area-inset-bottom, var(--s-1));
  transform: translateZ(0); will-change: transform;
}
.tab-bar__inner { display: flex; justify-content: space-around; align-items: center; max-width: 500px; margin: 0 auto; }
.tab-bar__item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--s-1) var(--s-3); border-radius: var(--r-md);
  font-size: 0.6rem; font-weight: 500; color: var(--c-text-muted); transition: color 0.2s; min-width: 56px;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.tab-bar__item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab-bar__item.active { color: var(--c-primary); font-weight: 600; }

/* Welcome */
.dash-welcome { margin-bottom: 0; animation: fadeInDown 0.5s ease both; text-align: center; }
.dash-welcome h2 { font-size: var(--fs-sm); font-weight: 500; color: var(--c-text-muted); }
.dash-welcome h2 span { color: var(--c-text); font-weight: 600; }

/* Hero Balance — MonAi style */
.dash-hero-balance {
  text-align: center; padding: var(--s-10) 0 var(--s-6);
  animation: fadeIn 0.6s ease both;
}
.dash-hero-balance__label {
  font-size: var(--fs-xs); color: var(--c-text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: var(--s-3); font-weight: 600;
}
.dash-hero-balance__amount {
  font-size: 5rem; font-weight: 700; line-height: 1;
  letter-spacing: -0.04em; display: inline-flex; align-items: baseline;
  direction: ltr; unicode-bidi: bidi-override;
}
.dash-hero-balance__currency {
  font-size: 1.5rem; font-weight: 400; color: var(--c-text-muted);
  margin-inline-start: 6px;
}
.dash-hero-balance__filters {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s-3); margin-top: var(--s-4);
  font-size: var(--fs-xs); color: var(--c-text-muted); font-weight: 500;
}
.dash-filter-pill {
  display: inline-flex; align-items: center; gap: 2px;
  padding: var(--s-1) var(--s-3);
  background: var(--c-surface-hover); border-radius: var(--r-full);
  font-size: var(--fs-xs); color: var(--c-text-secondary); font-weight: 600;
  cursor: default;
}

/* Quick Stats — inline row under hero */
.dash-stats {
  display: flex; justify-content: center; gap: var(--s-8);
  padding: var(--s-4) 0 var(--s-6);
  animation: fadeInUp 0.5s ease both; animation-delay: 0.1s;
}
.dash-stat { text-align: center; }
.dash-stat__value { font-size: var(--fs-lg); font-weight: 700; display: block; line-height: 1.3; }
.dash-stat__label { font-size: var(--fs-xs); color: var(--c-text-muted); font-weight: 500; }

/* Category Circles — MonAi compact horizontal row */
.cat-circles {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: var(--s-5); padding: var(--s-4) 0 var(--s-6);
  animation: fadeInUp 0.5s ease both; animation-delay: 0.15s;
}
.cat-circle {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  animation: fadeInUp 0.4s ease both;
}
.cat-circle:nth-child(1) { animation-delay: 0.05s; }
.cat-circle:nth-child(2) { animation-delay: 0.10s; }
.cat-circle:nth-child(3) { animation-delay: 0.15s; }
.cat-circle:nth-child(4) { animation-delay: 0.20s; }
.cat-circle:nth-child(5) { animation-delay: 0.25s; }
.cat-circle__icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.cat-circle__icon:hover { transform: scale(1.12); }
.cat-circle__amount { font-size: var(--fs-xs); font-weight: 700; color: var(--c-text); }

/* Separator */
.dash-divider {
  height: 1px; background: rgba(0,0,0,0.05);
  margin: var(--s-2) 0 var(--s-5);
}

/* Section headers */
.dash-section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-4);
}
.dash-section-header h3 {
  font-size: var(--fs-sm); font-weight: 700; color: var(--c-text-secondary);
}
.dash-section-header a {
  font-size: var(--fs-xs); color: var(--c-text-muted); font-weight: 600;
  text-decoration: none; transition: color 0.2s;
}
.dash-section-header a:hover { color: var(--c-primary); }

/* Dashboard charts — keep for monthly trend */
.dash-charts { margin-bottom: var(--s-6); animation: fadeInUp 0.5s ease both; animation-delay: 0.25s; }
.dash-chart-box { padding: var(--s-5); border-radius: var(--r-lg); }
.dash-chart-box h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--c-text-secondary); margin-bottom: var(--s-3); }

/* Recent transactions section */
.dash-recent { animation: fadeInUp 0.5s ease both; animation-delay: 0.3s; }

/* Transaction Item */
.tx-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  transition: background 0.2s ease, transform 0.2s ease; cursor: pointer;
  animation: fadeInUp 0.35s ease both;
}
.tx-item:hover { background: var(--c-surface-hover); transform: translateX(3px); }
[dir="rtl"] .tx-item:hover { transform: translateX(-3px); }
.tx-item + .tx-item { border-top: 1px solid rgba(0,0,0,0.04); }
.tx-item__icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.25rem; flex-shrink: 0; background: var(--c-surface-hover); }
.tx-item__info { flex: 1; min-width: 0; overflow: hidden; }
.tx-item__cat { font-weight: 600; font-size: var(--fs-sm); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-item__note { font-size: var(--fs-xs); color: var(--c-text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-item__right { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 2px; min-width: 80px; }
[dir="rtl"] .tx-item__right { align-items: flex-start; }
.tx-item__amount { font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }
.tx-item__date { font-size: var(--fs-xs); color: var(--c-text-muted); white-space: nowrap; }
.tx-item__del {
  padding: var(--s-2); border-radius: var(--r-sm); color: var(--c-text-muted);
  transition: all var(--t); font-size: var(--fs-lg); line-height: 1;
}
.tx-item__del:hover { color: var(--c-error); background: var(--c-error-dim); }

/* Transaction Filters */
.tx-filters { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-5); }
.tx-filters__pills { display: flex; gap: var(--s-2); }
.tx-filters__row { display: flex; gap: var(--s-2); }
.tx-filters__month {
  width: 140px; padding: var(--s-2) var(--s-3);
  background: var(--c-surface-hover); border: 1px solid var(--c-glass-border);
  border-radius: var(--r-full); color: var(--c-text); font-size: 16px; outline: none; transition: border-color var(--t);
  flex-shrink: 0;
}
.tx-filters__month:focus { border-color: var(--c-primary); }
.tx-filters__search {
  flex: 1; min-width: 0; padding: var(--s-2) var(--s-4);
  background: var(--c-surface-hover); border: 1px solid var(--c-glass-border);
  border-radius: var(--r-full); color: var(--c-text); font-size: 16px; outline: none; transition: border-color var(--t);
}
.tx-filters__search::placeholder { color: var(--c-text-muted); }
.tx-filters__search:focus { border-color: var(--c-primary); }

.tx-counter {
  font-size: var(--fs-xs); color: var(--c-text-muted);
  padding: var(--s-1) var(--s-3); background: var(--c-surface-hover); border-radius: var(--r-full);
}

/* Form Inputs */
.form-group { margin-bottom: var(--s-5); }
.form-label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--c-text-secondary); margin-bottom: var(--s-2); }
.form-input {
  width: 100%; padding: var(--s-3) var(--s-4);
  background: var(--c-bg); border: 1.5px solid var(--c-glass-border);
  border-radius: var(--r-md); color: var(--c-text); font-size: 16px; outline: none; transition: border-color var(--t);
}
.form-input::placeholder { color: var(--c-text-muted); }
.form-input:focus { border-color: var(--c-primary); }
.form-input--lg { font-size: var(--fs-2xl); font-weight: 700; text-align: center; padding: var(--s-5); }

/* Type toggle */
.type-toggle { display: flex; gap: 0; padding: var(--s-1); background: var(--c-surface-hover); border-radius: var(--r-full); margin-bottom: var(--s-5); position: relative; }
.type-toggle__btn {
  flex: 1; padding: var(--s-3) var(--s-4); border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 600; text-align: center; color: var(--c-text-muted); transition: color 0.3s; position: relative; z-index: 1;
}
.type-toggle__btn.active { color: var(--c-primary); }
.type-toggle__indicator {
  position: absolute; top: var(--s-1); bottom: var(--s-1); border-radius: var(--r-full);
  background: var(--c-primary-dim); transition: left 0.35s cubic-bezier(0.4,0,0.2,1), width 0.35s cubic-bezier(0.4,0,0.2,1);
  z-index: 0;
}

/* Add form content slide */
.add-form-content {
  overflow: hidden; position: relative;
}
.add-form-content__inner {
  animation: slideFormIn 0.3s cubic-bezier(0.4,0,0.2,1) both;
}
@keyframes slideFormIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
[dir="rtl"] .add-form-content__inner {
  animation-name: slideFormInRTL;
}
@keyframes slideFormInRTL {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Category Grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: var(--s-2); margin-bottom: var(--s-4); }
.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
  padding: var(--s-3); border-radius: var(--r-md); border: 1.5px solid transparent;
  font-size: var(--fs-xs); font-weight: 600; color: var(--c-text-secondary); transition: all var(--t);
}
.cat-item:hover { background: var(--c-surface-hover); }
.cat-item.active { border-color: var(--c-primary); background: var(--c-primary-dim); color: var(--c-primary); }
.cat-item.hidden { display: none; }
.cat-item__emoji { font-size: 1.4rem; }

/* Health Bar */
.health-bar { height: 8px; background: var(--c-surface-hover); border-radius: var(--r-full); overflow: hidden; }
.health-bar > div { height: 100%; border-radius: var(--r-full); transition: width 0.6s ease; }
.health-bar--ok > div { background: var(--c-success); }
.health-bar--warn > div { background: var(--c-warning); }
.health-bar--bad > div { background: var(--c-error); }

/* Calculator */
.calc-input-wrap { position: relative; }
.calc-input-wrap__currency { position: absolute; top: 50%; right: var(--s-4); transform: translateY(-50%); color: var(--c-text-muted); font-weight: 600; pointer-events: none; }
[dir="rtl"] .calc-input-wrap__currency { right: auto; left: var(--s-4); }
.calc-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 6px; background: var(--c-surface-hover); border-radius: var(--r-full); outline: none; margin-top: var(--s-3);
}
.calc-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--c-primary); cursor: pointer; box-shadow: 0 0 8px var(--c-primary-glow); }
.calc-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--c-primary); cursor: pointer; border: none; }
.calc-presets { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center; margin-top: var(--s-4); }
.calc-output { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-bottom: var(--s-6); max-width: 600px; }
.calc-cat-card { padding: var(--s-5); border-radius: var(--r-lg); text-align: center; }
.calc-cat-card__label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s-2); }
.calc-cat-card__val { display: block; font-size: var(--fs-lg); font-weight: 700; }
.calc-donut-wrap { display: flex; justify-content: center; }
.calc-check-fields { display: grid; gap: var(--s-3); margin-top: var(--s-3); }
.check-result { padding: var(--s-4); border-radius: var(--r-md); display: flex; flex-direction: column; gap: var(--s-1); font-size: var(--fs-sm); }
.check-result span { display: block; }
.check-result strong { margin-top: var(--s-1); }
.check-result--ok { background: rgba(46,204,113,0.06); border: 1px solid rgba(46,204,113,0.15); }
.check-result--bad { background: rgba(231,76,60,0.06); border: 1px solid rgba(231,76,60,0.15); }
.tips-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); max-width: 600px; }
.tip-card { padding: var(--s-4); }
.tip-card p { font-size: var(--fs-sm); color: var(--c-text-secondary); }

/* Reports */
.report-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-bottom: var(--s-5); }
.report-card { padding: var(--s-4); border-radius: var(--r-lg); text-align: center; animation: fadeInUp 0.4s ease both; }
.report-card:nth-child(2) { animation-delay: 0.05s; }
.report-card:nth-child(3) { animation-delay: 0.1s; }
.report-card:nth-child(4) { animation-delay: 0.15s; }
.report-card__label { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--c-text-muted); margin-bottom: var(--s-1); }
.report-card__val { display: block; font-size: var(--fs-lg); font-weight: 700; word-break: break-all; }

.report-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-bottom: var(--s-5); }
.report-stat { padding: var(--s-4); border-radius: var(--r-lg); text-align: center; }
.report-stat__val { display: block; font-size: var(--fs-xl); font-weight: 700; color: var(--c-text); }
.report-stat__label { display: block; font-size: var(--fs-xs); color: var(--c-text-muted); margin-top: var(--s-1); }

.report-cat-row { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) 0; }
.report-cat-row + .report-cat-row { border-top: 1px solid var(--c-glass-border); }
.report-cat-row__emoji { font-size: 1.3rem; width: 32px; text-align: center; flex-shrink: 0; }
.report-cat-row__info { flex: 1; min-width: 0; }
.report-cat-row__name { display: block; font-size: var(--fs-sm); font-weight: 500; margin-bottom: 4px; }
.report-cat-row__bar { height: 6px; background: var(--c-surface-hover); border-radius: var(--r-full); overflow: hidden; }
.report-cat-row__fill { height: 100%; background: var(--c-primary); border-radius: var(--r-full); transition: width 0.5s ease; }
.report-cat-row__val { font-size: var(--fs-sm); font-weight: 600; flex-shrink: 0; }
.report-cat-row__pct { font-size: var(--fs-xs); color: var(--c-text-muted); width: 36px; text-align: end; flex-shrink: 0; }

/* Settings */
.settings-section { padding: var(--s-5); border-radius: var(--r-lg); margin-bottom: var(--s-4); }
.settings-section h3 { font-size: var(--fs-base); font-weight: 700; margin-bottom: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--c-glass-border); }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) 0; gap: var(--s-3); }
.settings-row + .settings-row { border-top: 1px solid var(--c-glass-border); }

/* Settings — Categories */
.settings-cat-list { display: flex; flex-direction: column; gap: 0; }
.settings-cat-row {
  display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) 0;
  border-bottom: 1px solid var(--c-glass-border);
}
.settings-cat-row:last-child { border-bottom: none; }
.settings-cat-row__emoji { font-size: 1.3rem; width: 32px; text-align: center; }
.settings-cat-row__name { flex: 1; font-size: var(--fs-sm); font-weight: 500; }
.settings-cat-row__type { min-width: 50px; text-align: center; }

.settings-cat-form {
  padding: var(--s-4); margin-bottom: var(--s-3); border-radius: var(--r-md);
}
.settings-emoji-btn {
  width: 44px; height: 44px; font-size: 1.4rem; border: 1.5px solid var(--c-glass-border);
  border-radius: var(--r-sm); background: var(--c-surface); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.settings-emoji-picker {
  display: flex; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-3);
  padding: var(--s-2); background: var(--c-surface); border-radius: var(--r-sm);
  border: 1px solid var(--c-glass-border);
}
.settings-emoji-opt {
  width: 36px; height: 36px; font-size: 1.2rem; border: none; background: none;
  cursor: pointer; border-radius: var(--r-sm); transition: background var(--t);
}
.settings-emoji-opt:hover { background: rgba(0,0,0,0.06); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity var(--t); padding: var(--s-6);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--c-bg-raised); border: 1px solid var(--c-glass-border); border-radius: var(--r-xl);
  padding: var(--s-8); max-width: 420px; width: 100%;
  transform: scale(0.95) translateY(10px); transition: transform var(--t-spring);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal__title { font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--s-3); }
.modal__desc { font-size: var(--fs-sm); color: var(--c-text-secondary); margin-bottom: var(--s-6); line-height: var(--lh-normal); }
.modal__actions { display: flex; gap: var(--s-3); }
.modal__actions .btn { flex: 1; }

/* Toast */
.toast-container { position: fixed; top: var(--s-6); right: var(--s-6); z-index: 300; display: flex; flex-direction: column; gap: var(--s-3); pointer-events: none; }
[dir="rtl"] .toast-container { right: auto; left: var(--s-6); }
.toast {
  padding: var(--s-3) var(--s-5); border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 600;
  background: var(--c-bg-raised); border: 1px solid var(--c-glass-border); color: var(--c-text);
  pointer-events: auto; animation: toastIn 0.3s ease forwards; box-shadow: var(--shadow-md);
}
.toast--success { border-color: var(--c-success); color: var(--c-success); }
.toast--error { border-color: var(--c-error); color: var(--c-error); }
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* Premium Badge */
.premium-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-3); background: var(--c-gold-dim); color: var(--c-gold);
  border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700;
}

/* Empty State */
.empty-state { text-align: center; padding: var(--s-12) var(--s-4); color: var(--c-text-muted); }
.empty-state p { margin-bottom: var(--s-4); }



/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes balanceReveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes balanceScale {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
.anim-fade-in { animation: fadeIn 0.4s ease both; }
.anim-fade-up { animation: fadeInUp 0.5s ease both; }
.anim-scale-in { animation: scaleIn 0.4s ease both; }

/* View transition */
#view > * { animation: fadeIn 0.3s ease both; }

/* ============================================================ RESPONSIVE ============================================================ */
@media (max-width: 1024px) {
  .calc-output { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .tab-bar { display: block; }
  .app-main {
    margin-inline-start: 0; padding: var(--s-4);
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    max-width: 100vw; width: 100%;
  }
  .dash-hero-balance { padding: var(--s-8) 0 var(--s-5); }
  .dash-hero-balance__amount { font-size: 3.8rem; }
  .dash-hero-balance__currency { font-size: 1.2rem; }
  .dash-stats { gap: var(--s-6); }
  .cat-circle__icon { width: 42px; height: 42px; font-size: 1.2rem; }
  .tips-grid { grid-template-columns: 1fr; }
  .view-header h1 { font-size: var(--fs-xl); }
  .report-card__val { font-size: var(--fs-base); }
  .report-stat__val { font-size: var(--fs-lg); }
  .settings-row { flex-wrap: wrap; }
  .modal { padding: var(--s-6); margin: var(--s-4); }
}

@media (max-width: 480px) {
  .dash-hero-balance__amount { font-size: 3rem; }
  .dash-stats { gap: var(--s-5); }
  .dash-stat__value { font-size: var(--fs-base); }
  .cat-circles { gap: var(--s-4); }
  .cat-circle__icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .tx-filters__pills { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tx-filters__row { flex-direction: column; }
  .tx-filters__month { width: 100%; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); }
  .calc-output { grid-template-columns: 1fr; }
  .report-cards { gap: var(--s-2); }
  .report-card { padding: var(--s-3); }
  .report-card__val { font-size: var(--fs-sm); }
  .auth-card { padding: var(--s-5); }
  .type-toggle__btn { padding: var(--s-2) var(--s-3); font-size: var(--fs-xs); }
}

@media (max-width: 360px) {
  .dash-hero-balance__amount { font-size: 2.4rem; }
  .dash-hero-balance__currency { font-size: 1rem; }
  .dash-stats { gap: var(--s-3); flex-wrap: wrap; justify-content: center; }
  .tab-bar__item { min-width: 48px; padding: var(--s-1) var(--s-2); font-size: 0.55rem; }
  .tab-bar__item svg { width: 20px; height: 20px; }
  .report-card__val { font-size: var(--fs-xs); }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); }
}
