:root {
  /* Revolut/Wise inspired — neutral slate base + warm accents */
  --bg: #f4f5f8;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #ececf2;
  --border-strong: #d8dae3;
  --text: #0f1322;
  --text-2: #5b6076;
  --text-3: #a0a4b8;

  /* Brand accent — terracotta korundu ama daha doygun palet eşliğinde */
  --accent: #e0593d;
  --accent-soft: #ffe8e0;
  --accent-2: #6366f1;       /* indigo (secondary) */
  --accent-3: #f59e0b;       /* amber */

  /* Semantic */
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Soft layered shadows — Revolut tipi derinlik */
  --shadow-sm: 0 1px 2px rgba(15, 19, 34, 0.04), 0 1px 1px rgba(15, 19, 34, 0.02);
  --shadow: 0 2px 4px rgba(15, 19, 34, 0.04), 0 8px 16px -4px rgba(15, 19, 34, 0.06);
  --shadow-lg: 0 4px 8px rgba(15, 19, 34, 0.05), 0 24px 48px -12px rgba(15, 19, 34, 0.12);
  --shadow-fab: 0 4px 12px rgba(224, 89, 61, 0.35), 0 16px 32px -8px rgba(224, 89, 61, 0.45);

  /* Featured stat card gradient overlay */
  --grad-featured: linear-gradient(135deg, #e0593d 0%, #f97316 50%, #fb923c 100%);
  --grad-card-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-card-2: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);

  /* Daha yuvarlak köşeler — modern fintech */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 100px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --bottom-nav-h: 70px;
  --header-h: 60px;

  /* Spring transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] {
  --bg: #0c0d12;
  --bg-2: #14151c;
  --surface: #181a22;
  --surface-2: #1f2229;
  --border: #2a2d38;
  --border-strong: #383c4a;
  --text: #f1f3f9;
  --text-2: #aab0c0;
  --text-3: #6c7286;

  --accent: #f57359;
  --accent-soft: rgba(245, 115, 89, 0.15);
  --accent-2: #818cf8;
  --accent-3: #fbbf24;

  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
  --info: #60a5fa;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-fab: 0 4px 14px rgba(245, 115, 89, 0.45), 0 16px 36px -10px rgba(245, 115, 89, 0.6);

  --grad-featured: linear-gradient(135deg, #f57359 0%, #f97316 50%, #fbbf24 100%);
  --grad-card-1: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  --grad-card-2: linear-gradient(135deg, #34d399 0%, #2dd4bf 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior-y: none; overflow-x: hidden; max-width: 100vw; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  transition: background 0.3s ease, color 0.3s ease;
  font-feature-settings: 'ss01', 'cv11';
  touch-action: manipulation;
}
img, svg, video { max-width: 100%; height: auto; }
input, textarea, select { max-width: 100%; }
table { max-width: 100%; table-layout: auto; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
input, textarea { font-size: 16px !important; } /* prevent iOS zoom */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.04;
  z-index: 1;
  mix-blend-mode: multiply;
}
[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.05; }

.app {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ============ DESKTOP SIDEBAR ============ */
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: url('/icon-192.png') center/contain no-repeat;
  border-radius: 8px;
  flex-shrink: 0;
  font-size: 0;
  color: transparent;
}
.brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.brand-name em { font-style: italic; color: var(--accent); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-2);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  min-height: 44px;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--text); color: var(--bg); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 8px;
}
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  transition: all 0.15s ease;
  min-height: 44px;
}
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 12px;
  transition: background 0.2s ease;
}
.theme-toggle-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--surface);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .theme-toggle-thumb { transform: translateX(16px); }

/* ============ MOBILE HEADER ============ */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  padding: calc(var(--safe-top) + 14px) 18px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: calc(var(--header-h) + var(--safe-top));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}
.mobile-header .brand-name { font-size: 20px; }
.mobile-header .brand-mark { width: 32px; height: 32px; font-size: 18px; }
.mobile-header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.icon-btn-header {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn-header:active { transform: scale(0.92); background: var(--surface-2); }
.icon-btn-header svg { width: 18px; height: 18px; }

/* ============ BOTTOM NAV (MOBILE) ============ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  border-top: 1px solid var(--border);
  padding: 10px 4px calc(var(--safe-bottom) + 10px);
  padding-left: max(4px, var(--safe-left));
  padding-right: max(4px, var(--safe-right));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 -4px 20px -4px rgba(15, 19, 34, 0.06);
  justify-content: space-around;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
  min-height: 48px;
  position: relative;
}
.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-nav-item.active {
  color: var(--accent);
}
.bottom-nav-item.active svg {
  transform: translateY(-2px);
  stroke-width: 2.5;
}
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}
.bottom-nav-item:active { background: var(--surface); }

/* ============ FAB ============ */
.fab {
  display: none;
  position: fixed;
  bottom: calc(var(--safe-bottom) + var(--bottom-nav-h) + 14px);
  right: 16px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--grad-featured);
  color: white;
  border: none;
  box-shadow: var(--shadow-fab);
  z-index: 39;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab:active { transform: scale(0.92); }
.fab svg { width: 24px; height: 24px; }

/* ============ MAIN ============ */
.main {
  padding: 40px 48px 80px;
  max-width: 1400px;
  width: 100%;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap;
}
.page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
}
.page-title em { font-style: normal; color: var(--accent); font-weight: 700; }
.page-subtitle {
  color: var(--text-2);
  font-size: 14px;
  margin-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 4px 12px -2px rgba(0,0,0,0.12);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 12px 24px -6px rgba(0,0,0,0.18); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: var(--danger); color: white; border-color: var(--danger); transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }

/* ============ NEW DASHBOARD: GREETING + HERO + MINI-STATS + QUICK-ACTIONS ============ */
.greet-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.greet-hello {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.greet-sub {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 768px) {
  .greet-hello { font-size: 15px; }
  .greet-sub { font-size: 11px; }
  /* Mobile'da user-badge'de sadece avatar — isim gizlensin */
  .mobile-header .user-badge { padding: 3px; border-color: transparent !important; background: transparent; }
  .mobile-header .user-badge-name { display: none; }
  .mobile-header .user-badge-avatar { width: 32px; height: 32px; border: 2px solid currentColor; }
  .mobile-header-actions { gap: 8px; flex-shrink: 0; }
  .icon-btn-header { width: 36px; height: 36px; }
}
@media (max-width: 380px) {
  .greet-hello { font-size: 14px; }
  .icon-btn-header { width: 34px; height: 34px; }
}

.hero-card {
  position: relative;
  background: var(--grad-featured);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 24px 26px 22px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px -8px rgba(224, 89, 61, 0.55), 0 4px 8px rgba(224, 89, 61, 0.18);
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -60%; right: -25%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.hero-card.hero-warn {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #ef4444 100%);
  box-shadow: 0 12px 32px -8px rgba(249, 115, 22, 0.5), 0 4px 8px rgba(249, 115, 22, 0.18);
}
.hero-card.hero-info {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  box-shadow: 0 12px 32px -8px rgba(99, 102, 241, 0.5), 0 4px 8px rgba(99, 102, 241, 0.18);
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -40%; left: -20%;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 65%);
  pointer-events: none;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.hero-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.2px;
}
.hero-period {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
}
.hero-amount {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.hero-amount .currency {
  font-size: 18px;
  font-weight: 600;
  margin-left: 4px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0;
}
.hero-compare {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.hero-progress {
  height: 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.hero-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.7));
  border-radius: 100px;
  transition: width 0.6s var(--ease-out);
}
.hero-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  position: relative;
  z-index: 1;
}

/* MINI STATS RAIL — yatay scroll friendly grid */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.mini-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.15s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.mini-stat:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.mini-stat-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mini-stat-info { flex: 1; min-width: 0; }
.mini-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.mini-stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--text);
}
.mini-stat-value .currency {
  font-size: 11px;
  font-weight: 600;
  margin-left: 2px;
  color: var(--text-3);
}
.mini-stat-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

/* QUICK ACTIONS — 3 column tile grid */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
.qa-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: transform 0.2s var(--ease-out), border-color 0.15s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.qa-tile:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.qa-tile:active { transform: scale(0.97); }
.qa-tile-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -4px rgba(0,0,0,0.18);
}
.qa-tile-text { display: flex; flex-direction: column; gap: 1px; }
.qa-tile-text strong { font-size: 13px; font-weight: 700; color: var(--text); }
.qa-tile-text small { font-size: 11px; color: var(--text-3); }

/* Mobil & dar ekran */
@media (max-width: 768px) {
  .hero-card { padding: 20px 22px 18px; margin-bottom: 14px; border-radius: var(--radius-lg); }
  .hero-amount { font-size: 34px; }
  .mini-stats { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .mini-stat { padding: 12px; }
  .mini-stat-value { font-size: 16px; }
  .quick-actions { gap: 8px; margin-bottom: 22px; }
  .qa-tile { padding: 14px 8px; }
  .qa-tile-icon { width: 42px; height: 42px; border-radius: 12px; }
}

/* ============ STATS (legacy) ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card.featured {
  background: var(--grad-featured);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px -8px rgba(224, 89, 61, 0.55);
}
.stat-card.featured::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card.featured .stat-label,
.stat-card.featured .stat-meta { color: rgba(255,255,255,0.85); }
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
}
.stat-value .currency {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin-left: 3px;
  color: var(--text-2);
  letter-spacing: 0;
}
.stat-card.featured .stat-value .currency { color: rgba(255,255,255,0.6); }
.stat-meta {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-icon-bg {
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 80px;
  opacity: 0.06;
  pointer-events: none;
}

/* ============ PANELS ============ */
.panels {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.panel-action {
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  min-height: 36px;
}
.panel-action:hover { color: var(--text); background: var(--surface-2); }

/* ============ TRANSACTIONS LIST ============ */
.transactions {
  display: flex;
  flex-direction: column;
}
.transaction {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.transaction:last-child { border-bottom: none; }
.transaction:hover, .transaction:active { background: var(--surface-2); }
.tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tx-info { min-width: 0; }
.tx-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-meta {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tx-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.tx-amount {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}
.tx-amount.negative { color: var(--danger); }
.tx-amount.positive { color: var(--success); }

/* ============ UPCOMING ============ */
.upcoming-list { display: flex; flex-direction: column; gap: 10px; }
.upcoming-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s var(--ease-out);
}
.upcoming-item:hover { border-color: var(--border-strong); }
.upcoming-item.urgent {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}
.upcoming-item.soon {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
}
.upcoming-day {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  text-align: center;
  flex-shrink: 0;
}
.upcoming-day-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
}
.upcoming-day-month {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  margin-top: 2px;
  font-weight: 600;
}
.upcoming-info { flex: 1; min-width: 0; }
.upcoming-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.upcoming-meta { font-size: 11px; color: var(--text-2); }
.upcoming-amount { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 13px; white-space: nowrap; }

/* ============ CATEGORY BREAKDOWN ============ */
.category-breakdown { display: flex; flex-direction: column; gap: 12px; }
.category-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
}
.category-row .cat-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 13px;
  overflow: hidden;
}
.category-row .cat-icon .cat-icon-img { width: 90%; height: 90%; }
.category-row .cat-name { font-size: 13px; font-weight: 500; }
.category-row .cat-bar {
  grid-column: 2;
  margin-top: 4px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.category-row .cat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-row .cat-amount {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.category-row .cat-pct { font-size: 11px; color: var(--text-3); font-family: 'JetBrains Mono', monospace; }

/* ============ MODAL / BOTTOM SHEET ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 15, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.sheet-handle {
  display: none;
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* ============ FORM ============ */
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; gap: 6px; }
.form-row.two-col { grid-template-columns: 1fr 1fr; gap: 12px; }
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.emoji-grid .emoji-grp {
  grid-column: 1 / -1;
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 2px 2px;
  font-weight: 600;
}
.emoji-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px;
  font-size: 20px;
  cursor: pointer;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.emoji-btn:hover { background: var(--bg-2); border-color: var(--border); }
.emoji-btn.active { background: var(--accent); border-color: var(--accent); transform: scale(1.05); }

.recurring-summary {
  display: block;
  margin-bottom: 16px;
}
.recurring-summary > .hero-card { margin-bottom: 12px; }
.recurring-summary > .mini-stats { margin-bottom: 0; }
.rs-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.rs-card .rs-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-2);
  font-weight: 600;
}
.rs-card .rs-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text);
}
.rs-card .rs-value .currency { font-size: 14px; opacity: 0.6; margin-left: 2px; }
.rs-card .rs-meta { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.rs-card.accent { border-left: 3px solid var(--accent); }
.rs-card.warn   { border-left: 3px solid #d97706; }
.rs-card.ok     { border-left: 3px solid #16a34a; }
.rs-card.muted  { border-left: 3px solid var(--text-2); }

.recurring-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 4px;
}
.filter-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  transition: all 0.15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  gap: 6px;
  transition: all 0.15s;
}
.filter-pill:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.filter-pill.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 12px -4px rgba(15,19,34,0.25);
}
.filter-pill .count {
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
}
.filter-pill.active .count { background: rgba(255,255,255,0.25); }

.rec-type-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
  text-align: center;
}
.rec-type-btn:hover { border-color: var(--accent); }
.rec-type-btn.active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}

/* Ödeme detay timeline */
.rec-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 8px 0 14px;
}
.rec-detail-summary .stat-mini {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.rec-detail-summary .stat-mini-label { font-size: 10px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.6px; }
.rec-detail-summary .stat-mini-value { font-size: 16px; font-weight: 700; margin-top: 2px; }
.rec-detail-progress {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0 14px;
}
.rec-detail-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  transition: width 0.4s;
}
.rec-month-list {
  display: grid;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 2px;
}
.rec-month-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid transparent;
}
.rec-month-row.paid { background: color-mix(in srgb, #16a34a 8%, var(--bg)); border-color: color-mix(in srgb, #16a34a 20%, transparent); }
.rec-month-row.pending { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.rec-month-row.overdue { background: color-mix(in srgb, #dc2626 8%, var(--bg)); border-color: color-mix(in srgb, #dc2626 25%, transparent); }
.rec-month-row.future { opacity: 0.6; }
.rec-month-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.rec-month-row.paid .rec-month-icon { background: #16a34a; color: white; }
.rec-month-row.pending .rec-month-icon { background: var(--accent); color: white; }
.rec-month-row.overdue .rec-month-icon { background: #dc2626; color: white; }
.rec-month-row.future .rec-month-icon { background: var(--bg-2); color: var(--text-2); border: 1px dashed var(--border); }
.rec-month-name { flex: 1; font-size: 14px; font-weight: 600; }
.rec-month-status { font-size: 12px; color: var(--text-2); }
.rec-month-amount { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.form-row input,
.form-row select,
.form-row textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.15s ease;
  width: 100%;
  min-height: 48px;
}
.form-row select { padding-right: 36px; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row textarea { resize: vertical; min-height: 70px; }

.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.type-toggle button {
  padding: 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.15s ease;
  min-height: 44px;
}
.type-toggle button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.type-toggle button.active.expense { color: var(--danger); }
.type-toggle button.active.income { color: var(--success); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ============ INSTALLMENT TOGGLE ============ */
.installment-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.installment-toggle:hover { border-color: var(--border-strong); }
.installment-toggle-info { flex: 1; min-width: 0; }
.installment-toggle-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.installment-toggle-title svg { color: var(--accent); flex-shrink: 0; }
.installment-toggle-sub {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.4;
}
.switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 13px;
  transition: background 0.2s ease;
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

.installment-box {
  margin-top: 12px;
  padding: 16px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 12px;
  animation: expandDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes expandDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.installment-hint {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.5;
  margin-top: 4px;
  font-style: italic;
}
.installment-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  animation: expandDown 0.2s ease;
}
.installment-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.installment-preview-row .label {
  color: var(--text-2);
  font-size: 12px;
}
.installment-preview-row .value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text);
}
.installment-preview-row.total {
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.installment-preview-row.total .label { font-weight: 600; color: var(--text); }
.installment-preview-row.total .value { color: var(--accent); font-size: 15px; }

/* ============ PAGES ============ */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.25s ease; }

/* ============ TABLE / DESKTOP ============ */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-toolbar {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 13px 42px 13px 42px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  min-height: 44px;
}
.search-box .search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  color: var(--text-2);
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.search-box .search-clear:hover { background: var(--text-2); color: var(--bg); }
.search-box .search-clear svg { width: 14px; height: 14px; position: static; transform: none; }
.search-box.has-value .search-clear { display: flex; }
.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-3);
}
.filter-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s ease;
}
.filter-select:hover { border-color: var(--border-strong); }

table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface-2); }
th {
  text-align: left;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
td { padding: 14px 20px; font-size: 14px; border-bottom: 1px solid var(--border); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; }

.amount-cell { font-family: 'JetBrains Mono', monospace; font-weight: 600; text-align: right; }
.amount-cell.expense { color: var(--danger); }
.amount-cell.income { color: var(--success); }

/* ============ MOBILE TX CARDS ============ */
.tx-cards { display: none; flex-direction: column; gap: 8px; padding: 8px; }
.tx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  transition: transform 0.15s var(--ease-out), border-color 0.15s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.tx-card:active { transform: scale(0.99); }
.tx-card:hover { border-color: var(--border-strong); }
.tx-card .tx-icon { width: 44px; height: 44px; font-size: 20px; }
.tx-card .tx-info { min-width: 0; }
.tx-card .tx-title { font-size: 15px; margin-bottom: 4px; }
.tx-card .tx-meta { font-size: 12px; }
.tx-card .tx-tags {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.tx-card .tx-tags .tag { font-size: 10px; padding: 2px 7px; }
.tx-card .tx-amount { font-size: 15px; }
.tx-card .tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.tx-row-actions {
  display: inline-flex;
  gap: 4px;
}
.tx-row-actions .icon-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.tx-row-actions .icon-btn:hover {
  border-color: var(--text-3);
  color: var(--text);
  background: var(--surface-2);
}
.tx-row-actions .icon-btn.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(200,85,61,0.08);
}
.tx-row-actions .icon-btn svg { width: 14px; height: 14px; }

.date-divider {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px 14px;
  margin: 8px 0 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: var(--safe-top);
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.date-divider .date-label-main {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.date-divider .date-sub {
  color: var(--text-3);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: none;
}
.date-divider-total {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--danger);
  font-size: 13px;
  letter-spacing: 0;
}
/* Desktop tablo günlük özet satırı */
.day-summary-row td {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border) !important;
}
.day-summary-row:hover td { background: var(--surface-2); }

/* ============ CATEGORIES ============ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.cat-card:active { transform: scale(0.97); }
.cat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.cat-card-info { flex: 1; min-width: 0; }
.cat-card-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.cat-card-meta { font-size: 12px; color: var(--text-2); }

.cat-add-card {
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  color: var(--text-2);
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  min-height: 80px;
}
.cat-add-card:active { transform: scale(0.97); }
.cat-add-card:hover {
  border-color: var(--text-3);
  color: var(--text);
  background: var(--surface);
}

/* ============ BILLS ============ */
.bills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.bill-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease;
}
.bill-card:hover { border-color: var(--border-strong); }
.bill-head {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.bill-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.bill-icon img {
  width: 80%; height: 80%;
  object-fit: contain;
  display: block;
}
.bill-icon span { line-height: 1; }
.bill-info { flex: 1; min-width: 0; }
.bill-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bill-meta {
  font-size: 11px;
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
.bill-actions {
  display: flex;
  gap: 6px;
}
.bill-actions .btn { flex: 1; }
.bill-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Provider seçim grid'i (bill modal içinde) */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.provider-card {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
  text-align: center;
}
.provider-card:hover { border-color: var(--border-strong); }
.provider-card:active { transform: scale(0.97); }
.provider-card.active {
  background: var(--surface);
  box-shadow: 0 0 0 1px currentColor inset;
}
.provider-card-logo {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  overflow: hidden;
}
.provider-card-logo img { width: 80%; height: 80%; object-fit: contain; }
.provider-card-logo span { line-height: 1; }
.provider-card-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

/* Custom confirm modal */
.confirm-modal {
  max-width: 440px;
  padding: 24px 24px 18px;
}
.confirm-header {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.confirm-body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 22px;
  white-space: pre-line;
}
.confirm-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.confirm-footer .btn { min-width: 90px; }
@media (max-width: 480px) {
  .confirm-footer { flex-direction: column-reverse; }
  .confirm-footer .btn { width: 100%; min-width: 0; }
}

/* Quick-add action sheet (+ tuşundan açılan) */
.quick-add-sheet { max-width: 460px; }
.qa-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.15s ease, transform 0.08s ease, background 0.15s ease;
}
.qa-btn:hover { border-color: var(--border-strong); background: var(--surface); }
.qa-btn:active { transform: scale(0.98); }
.qa-btn.qa-primary {
  background: linear-gradient(135deg, var(--accent), #b14a35);
  border-color: var(--accent);
  color: #fff;
}
.qa-btn.qa-primary:hover { background: linear-gradient(135deg, #d36046, #b14a35); }
.qa-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.qa-btn:not(.qa-primary) .qa-icon { background: var(--surface); border: 1px solid var(--border); }
.qa-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.qa-text strong { font-size: 15px; font-weight: 700; }
.qa-text small { font-size: 12px; opacity: 0.85; line-height: 1.35; }
.qa-chev { width: 18px; height: 18px; opacity: 0.6; flex-shrink: 0; }

/* Fiş tarama tuşu (txModal) */
.receipt-scan-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #b14a35);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 6px;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.receipt-scan-btn:active { transform: scale(0.98); }
.receipt-scan-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.receipt-scan-btn.scanning {
  pointer-events: none;
  opacity: 0.85;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent));
  background-size: 200% 100%;
  animation: scanShimmer 1.4s linear infinite;
}
@keyframes scanShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: -200% 50%; }
}

/* "Ödedim" checkbox-style buton — Yaklaşan Ödemeler ve Dashboard'da kullanılır */
.btn-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 10px 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-2);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.btn-check:hover {
  background: rgba(88, 129, 87, 0.10);
  border-color: var(--success);
  color: var(--success);
}
.btn-check:active { transform: scale(0.96); }
.btn-check .check-box {
  width: 16px; height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btn-check .check-box svg {
  width: 11px; height: 11px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.btn-check:hover .check-box svg,
.btn-check:focus-visible .check-box svg { opacity: 1; }

/* Yaklaşan ödemeler / detay modal başlığında provider logosu */
.rec-provider-logo, .cat-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
  vertical-align: middle;
  flex-shrink: 0;
}
.cat-icon-svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
#recDetailTitle .rec-provider-logo, #recDetailTitle .cat-icon-img, #recDetailTitle .cat-icon-svg { width: 22px; height: 22px; }
/* Son işlemler & tx kartlarında: tx-icon kutusunda logo/icon */
.tx-icon .rec-provider-logo, .tx-icon .cat-icon-img { width: 88%; height: 88%; }
.tx-icon .cat-icon-svg { width: 60%; height: 60%; }
.tx-icon img.rec-provider-logo, .tx-icon img.cat-icon-img { border-radius: 6px; }
/* Kategori grid kartlarında SVG */
.cat-card-icon .cat-icon-svg { width: 55%; height: 55%; }
.category-row .cat-icon .cat-icon-svg { width: 60%; height: 60%; }

/* Yaklaşan ödemeler — checkbox & seçim sticky bar */
.upcoming-item .rec-select {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 4px;
  margin: -4px 0 -4px -4px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.upcoming-item .rec-select-box {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  background: var(--surface);
  color: transparent;
}
.upcoming-item .rec-select-box svg { width: 14px; height: 14px; }
.upcoming-item.selected .rec-select-box {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.upcoming-item.selected {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--text) inset;
}

.rec-selection-bar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 16px);
  transform: translate(-50%, 120%);
  z-index: 38;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.45), 0 4px 12px rgba(0,0,0,0.18);
  transition: transform 0.3s var(--ease-spring), opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
  max-width: calc(100% - 32px);
}
.rec-selection-bar.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
.rec-selection-bar .rsb-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.rec-selection-bar .rsb-count {
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.rec-selection-bar .rsb-total {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.rec-selection-bar .btn {
  background: rgba(255,255,255,0.18);
  color: var(--bg);
  border-color: transparent;
  padding: 7px 14px;
  font-size: 12px;
  min-height: auto;
}
.rec-selection-bar .btn:hover { background: rgba(255,255,255,0.28); transform: none; }
@media (max-width: 768px) {
  .rec-selection-bar { bottom: calc(var(--safe-bottom) + var(--bottom-nav-h) + 12px); }
}

/* Settings → Profile card */
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.profile-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 2px solid currentColor;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 28px;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; min-width: 0; }
.profile-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.profile-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ============ SETTINGS ============ */
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.settings-section h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 6px;
}
.settings-section p {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 16px;
}
.settings-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
}
.empty-illustration {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 16px;
  opacity: 0.95;
}
@media (max-width: 768px) {
  .empty-illustration { width: 140px; height: 140px; }
}
.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--text-3);
}
.empty-state h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.empty-state p { font-size: 14px; margin-bottom: 20px; }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 24px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  align-items: center;
  gap: 10px;
  animation: slideInToast 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { display: flex; }
.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--danger); color: white; }
@keyframes slideInToast {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ============ MONTH CHART ============ */
.month-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding: 16px 0 8px;
}
.month-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.month-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}
.month-bar::after {
  content: attr(data-amount);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-2);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.month-bar:hover::after, .month-bar:active::after { opacity: 1; }
.month-bar.income { background: var(--success); }
.month-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============ FILTER CHIPS (MOBILE) ============ */
.filter-chips {
  display: none;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  scroll-snap-align: start;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-chip:active { transform: scale(0.95); }
.filter-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ============ MOBILE SEARCH BAR ============ */
.mobile-search {
  display: none;
  padding: 12px 16px 4px;
}
.mobile-search .search-box { width: 100%; }

/* ============ SWIPEABLE TX (MOBILE) ============ */
.tx-swipe-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.tx-swipe-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
}
.tx-swipe-action {
  display: grid;
  place-items: center;
  width: 80px;
  border: none;
  cursor: pointer;
  color: white;
  font-weight: 600;
  font-size: 12px;
}
.tx-swipe-action.delete { background: var(--danger); }
.tx-swipe-action.edit { background: var(--info); }
.tx-swipe-action svg { width: 22px; height: 22px; }

/* ============ DESKTOP-ONLY ELEMENTS ============ */
.desktop-only { }
.mobile-only { display: none; }

/* ============ RESPONSIVE BREAKPOINTS ============ */

/* TABLET */
@media (max-width: 1024px) {
  .main { padding: 32px 28px 80px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 22px; }
  .panels { grid-template-columns: 1fr; }
}

/* MOBILE */
@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; max-width: 100vw; overflow-x: hidden; }
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  .bottom-nav { display: flex; }
  .fab { display: flex; }
  .desktop-only { display: none !important; }
  .mobile-only { display: revert; }
  /* FAB içerik üstüne binmesin — son satır FAB ile çakışmasın
     hesap: bottom-nav 64 + gap 16 + fab 56 + buffer 24 = 160 */
  .main { padding-bottom: 160px; }

  .main {
    padding: 16px 16px calc(var(--bottom-nav-h) + var(--safe-bottom) + 32px);
    padding-left: max(16px, var(--safe-left));
    padding-right: max(16px, var(--safe-right));
    max-width: 100vw;
    overflow-x: hidden;
  }
  .page { max-width: 100%; overflow-x: hidden; }
  /* Yeni eklenen bileşenler */
  .recurring-summary { grid-template-columns: 1fr 1fr; }
  .rec-type-btn > div { font-size: 10px; }
  /* Tek seferlik için 3 kolonlu rec-type grid mobilde 1 kolona */
  #recurringModal .rec-type-btn { font-size: 13px; padding: 10px 8px; }
  /* Filtre pill'leri yatay scroll */
  .recurring-filters {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }
  /* Yaklaşan ödeme item iç meta wrap */
  .upcoming-item { flex-wrap: wrap; }
  .upcoming-info { width: 100%; min-width: 0; }
  .upcoming-amount { margin-left: auto; }
  /* Form-row two-col mobilde tek kolona düş */
  .form-row.two-col { grid-template-columns: 1fr; }
  /* Modal scroll içeride kalsın */
  .modal { overflow-y: auto; }
  .form-grid { overflow: visible; }

  .page-header {
    margin-bottom: 20px;
    align-items: flex-start;
    gap: 12px;
  }
  .page-title { font-size: 30px; letter-spacing: -1px; }
  .page-subtitle { font-size: 13px; }
  .page-header > div:first-child { flex: 1; }
  .page-header .btn { display: none; } /* FAB kullanıyoruz */

  /* STATS - mobilde 2 kol grid; son kart (Bugün) tam genişlik */
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  .stats-grid .stat-card.span-full { grid-column: 1 / -1; }
  .stat-card {
    padding: 12px 14px;
    min-width: 0;
  }
  .stat-card .stat-label { font-size: 10px; }
  .stat-value { font-size: 20px; word-break: break-word; }
  .stat-card .stat-meta { font-size: 11px; }
  .stat-card .stat-icon-bg { font-size: 60px; right: 4px; bottom: -16px; }

  /* PANELS */
  .panels { gap: 12px; margin-bottom: 24px; }
  .panel { padding: 18px; border-radius: var(--radius); }
  .panel-title { font-size: 18px; }
  .panel-header { margin-bottom: 14px; }

  /* TRANSACTIONS - tablo gizle, kart göster */
  .table-wrap { background: transparent; border: none; }
  .table-toolbar { display: none; }
  table { display: none; }
  .tx-cards { display: flex; }

  /* MOBILE search & chips */
  .mobile-search { display: block; }
  .filter-chips { display: flex; }

  /* MODAL → BOTTOM SHEET */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%;
    max-height: 92vh;
    padding: 20px 20px calc(20px + var(--safe-bottom));
    animation: slideUpSheet 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sheet-handle { display: block; }
  .modal-header { margin-bottom: 18px; }
  .modal-title { font-size: 22px; }
  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
    padding-top: 16px;
    margin-top: 18px;
  }
  .modal-footer .btn { width: 100%; }

  /* CATEGORIES grid mobilde 2 sütun */
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cat-card { padding: 14px; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 110px; }
  .cat-card-icon { width: 40px; height: 40px; font-size: 20px; }
  .cat-card-name { font-size: 13px; }
  .cat-card-meta { font-size: 11px; }
  .cat-add-card { padding: 14px; min-height: 110px; }

  /* MONTH CHART */
  .month-chart { height: 100px; gap: 4px; }
  .month-bar::after { font-size: 9px; top: -18px; }

  /* SETTINGS */
  .settings-section { padding: 18px; }
  .settings-section h3 { font-size: 16px; }
  .settings-row { flex-direction: column; }
  .settings-row .btn { width: 100%; }

  /* UPCOMING */
  .upcoming-item { padding: 10px; }
  .upcoming-day { width: 44px; height: 44px; }
  .upcoming-day-num { font-size: 16px; }

  /* HIDE recurring action buttons on mobile - they're in swipe */
  .recurring-mobile-actions { display: flex !important; }

  /* Brand mobil header sadece compact */
  .brand-name em { color: var(--accent); }
}

/* SMALL MOBILE */
@media (max-width: 380px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .stats-grid { padding: 0; margin: 0 0 16px; gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 19px; }
  .page-title { font-size: 26px; }
  .panel { padding: 16px; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .filter-chips { padding: 10px 12px; }
  .mobile-search { padding: 10px 12px 4px; }
  .tx-cards { padding: 6px; gap: 6px; }
  .mobile-header { padding: calc(var(--safe-top) + 10px) 12px 10px; }
  .icon-btn-header { width: 38px; height: 38px; }
}

/* LANDSCAPE PHONES */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
  .stat-card { flex: revert; min-width: 0; padding: 12px; }
  .stat-value { font-size: 22px; }
}

/* ============ LOGIN OVERLAY ============ */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg) url('/bg-login.jpg') center/cover no-repeat;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.login-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(224,89,61,0.28), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(99,102,241,0.22), transparent 50%),
    linear-gradient(180deg, rgba(15,19,34,0.55), rgba(15,19,34,0.88));
  pointer-events: none;
}
.login-overlay > .login-card { position: relative; z-index: 1; box-shadow: var(--shadow-lg); border-radius: var(--radius-xl); }
.login-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.login-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}
.login-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
}
.login-users {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.login-user {
  background: var(--surface-2);
  border: 2px solid currentColor;
  border-radius: var(--radius);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.login-user-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  line-height: 1;
  overflow: hidden;
}
.login-user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-user.active .login-user-avatar {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px currentColor;
}
.login-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.login-pin {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 16px;
  padding: 14px 0 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  min-height: 60px;
  color: var(--text);
}
.login-pin.error { animation: shake 0.4s; color: var(--danger); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}
.login-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.login-key {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  min-height: 68px;
  padding: 0;
  font-size: 30px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.1s ease, transform 0.08s ease, border-color 0.1s ease;
}
.login-key:hover { background: var(--surface); }
.login-key:active {
  transform: scale(0.92);
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.login-key.zero { grid-column: 2; }
.login-key.del {
  color: var(--danger);
  font-size: 24px;
}
.login-key.del:active {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
@media (max-width: 380px) {
  .login-key { min-height: 60px; font-size: 26px; }
  .login-keypad { gap: 10px; }
}

/* Aktif kullanıcı rozeti (header) */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 10px 4px 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.user-badge:hover { border-color: var(--border-strong); }
.user-badge-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
  line-height: 1;
  overflow: hidden;
}
.user-badge-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-badge-name { color: var(--text); }

/* İşlem satırında kullanıcı rozeti */
.tx-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 100px;
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
}
