/* ===== Cüzdan Cebimde — tema ===== */
:root {
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 12px; --r: 18px; --r-lg: 26px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 72px;
}
[data-theme="dark"] {
  --bg: #090E0C; --bg-2: #0C1311;
  --surface: #121A17; --surface-2: #18221E; --surface-3: #1F2B26;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12);
  --text: #ECF5F0; --text-2: #B7C7C0; --muted: #7F948B;
  --primary: #19C48A; --primary-2: #0E9F6E; --primary-soft: rgba(25,196,138,.14); --on-primary: #03140D;
  --gold: #F6BE4F; --gold-soft: rgba(246,190,79,.15);
  --pos: #2BD38B; --pos-soft: rgba(43,211,139,.13);
  --neg: #FF5C7A; --neg-soft: rgba(255,92,122,.13);
  --warn: #FFB547; --warn-soft: rgba(255,181,71,.14);
  --info: #6AA8FF; --info-soft: rgba(106,168,255,.14);
  --violet: #A78BFA; --violet-soft: rgba(167,139,250,.15);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --sheet: #121A17;
  --desk: #050807;
}
[data-theme="light"] {
  --bg: #F2F5F3; --bg-2: #EAF0EC;
  --surface: #FFFFFF; --surface-2: #F3F7F5; --surface-3: #E8EFEB;
  --line: rgba(9,40,28,.08); --line-2: rgba(9,40,28,.14);
  --text: #0C1A14; --text-2: #34473F; --muted: #6A7E76;
  --primary: #0B9A68; --primary-2: #087A53; --primary-soft: rgba(11,154,104,.11); --on-primary: #FFFFFF;
  --gold: #D18A0B; --gold-soft: rgba(209,138,11,.12);
  --pos: #0F9D5C; --pos-soft: rgba(15,157,92,.11);
  --neg: #E0244A; --neg-soft: rgba(224,36,74,.10);
  --warn: #D97706; --warn-soft: rgba(217,119,6,.11);
  --info: #2563EB; --info-soft: rgba(37,99,235,.10);
  --violet: #7C3AED; --violet-soft: rgba(124,58,237,.10);
  --shadow: 0 10px 30px rgba(12,40,28,.10);
  --sheet: #FFFFFF;
  --desk: #DDE6E1;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); background: var(--desk); color: var(--text);
  font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.ic { flex-shrink: 0; display: block; }
.num, .amt { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
body.hide-amt .amt { filter: blur(8px); user-select: none; }

/* Telefon çerçevesi (masaüstünde ortalanır) */
.phone {
  position: relative; max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto;
  background: var(--bg); overflow-x: hidden;
}
@media (min-width: 520px) {
  .phone { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.25); }
}
.view { padding: calc(var(--safe-t) + 14px) 18px calc(var(--tab-h) + var(--safe-b) + 28px); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== Üst bar ===== */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.brand small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); position: relative;
  transition: transform .15s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--neg); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg);
}
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 0; flex: 1; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 20px 20px 18px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #2BD39B 0%, rgba(43,211,155,0) 45%),
              linear-gradient(140deg, #053D2E 0%, #0A7553 55%, #11A274 100%);
  box-shadow: 0 18px 40px rgba(6,78,59,.35);
}
.hero.neg-state {
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,140,120,.35) 0%, rgba(255,120,120,0) 45%),
              linear-gradient(140deg, #053D2E 0%, #0A6B4E 55%, #0E8F67 100%);
}
.hero::after {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 190px; height: 190px; border-radius: 50%;
  border: 28px solid rgba(255,255,255,.06);
}
.hero-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; opacity: .9; }
.hero-amt { font-size: 34px; font-weight: 800; letter-spacing: -.035em; margin: 6px 0 14px; line-height: 1.1; }
.hero-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; z-index: 1; }
.hero-row div { background: rgba(255,255,255,.10); border-radius: 14px; padding: 9px 10px; backdrop-filter: blur(6px); }
.hero-row small { display: block; font-size: 11px; opacity: .8; font-weight: 600; }
.hero-row b { display: block; font-size: 14px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pill.neg { background: rgba(255,92,122,.95); color: #fff; }
.pill.pos { background: rgba(255,255,255,.95); color: #065F46; }
.pill.soft { background: var(--surface-3); color: var(--text-2); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.red { background: var(--neg-soft); color: var(--neg); }
.pill.green { background: var(--pos-soft); color: var(--pos); }
.pill.blue { background: var(--info-soft); color: var(--info); }

/* ===== Hızlı işlemler ===== */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 6px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.quick .q-ic {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); transition: transform .15s;
}
.quick button:active .q-ic { transform: scale(.9); }
.q-ic.in { color: var(--pos); } .q-ic.out { color: var(--neg); } .q-ic.gold { color: var(--gold); } .q-ic.blue { color: var(--info); }

/* ===== Kartlar ===== */
.section { margin-top: 22px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.sec-head h3 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; }
.sec-head button, .link { color: var(--primary); font-size: 13px; font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 10px; }
.card.flush { padding: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.pos-t { color: var(--pos); } .neg-t { color: var(--neg); } .gold-t { color: var(--gold); } .warn-t { color: var(--warn); }

.fc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-box { border-radius: 14px; padding: 12px; }
.fc-box.in { background: var(--pos-soft); } .fc-box.out { background: var(--neg-soft); }
.fc-box small { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.fc-box b { display: block; font-size: 19px; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; }
.fc-box.in b { color: var(--pos); } .fc-box.out b { color: var(--neg); }
.fc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 13px; }
.fc-foot b { font-size: 16px; }

/* Satır listesi */
.row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; width: 100%; text-align: left;
  position: relative;
}
.row + .row::before { content: ''; position: absolute; top: 0; left: 66px; right: 14px; border-top: 1px solid var(--line); }
.row .r-ic {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; font-size: 19px;
  background: var(--surface-3);
}
.r-ic.in { background: var(--pos-soft); color: var(--pos); }
.r-ic.out { background: var(--neg-soft); color: var(--neg); }
.r-ic.exp-in { background: var(--gold-soft); color: var(--gold); }
.r-ic.exp-out { background: var(--warn-soft); color: var(--warn); }
.r-ic.event { background: var(--info-soft); color: var(--info); }
.r-ic.tr { background: var(--violet-soft); color: var(--violet); }
.row .r-main { flex: 1; min-width: 0; }
.row .r-title { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-end { text-align: right; flex-shrink: 0; }
.row .r-amt { font-weight: 800; font-size: 14.5px; }
.row .r-tag { font-size: 11.5px; margin-top: 2px; }
.row-btn { padding: 7px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 700; background: var(--primary-soft); color: var(--primary); margin-top: 4px; }
.row-btn.warn { background: var(--warn-soft); color: var(--warn); }

.day-label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 16px 4px 8px; text-transform: none; }

/* Hesap kartları (yatay) */
.h-scroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.acc-card {
  flex: 0 0 158px; scroll-snap-align: start; border-radius: 18px; padding: 13px; color: #fff; position: relative; overflow: hidden;
  min-height: 108px; display: flex; flex-direction: column; justify-content: space-between; text-align: left;
}
.acc-card::after { content: ''; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.1); }
.acc-card small { font-size: 11.5px; opacity: .85; font-weight: 600; }
.acc-card b { font-size: 13.5px; font-weight: 700; display: block; }
.acc-card .acc-bal { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }

/* Grafik */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-pair { flex: 1; display: flex; align-items: flex-end; gap: 3px; width: 100%; justify-content: center; }
.bar-pair span { width: 40%; max-width: 14px; border-radius: 6px 6px 3px 3px; min-height: 3px; transition: height .5s; }
.bar-pair .bi { background: var(--pos); } .bar-pair .bo { background: var(--neg); opacity: .85; }
.bar-col small { font-size: 11px; color: var(--muted); font-weight: 600; }
.bar-col.cur small { color: var(--text); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.stat2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat2 > div { background: var(--surface-2); border-radius: 14px; padding: 11px 12px; }
.stat2 small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.stat2 b { display: block; font-size: 17px; font-weight: 800; margin-top: 2px; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat3 > div { background: var(--surface-2); border-radius: 14px; padding: 10px; }
.stat3 small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat3 b { display: block; font-size: 15px; font-weight: 800; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.progress { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary-2), var(--primary)); }
.progress.warn span { background: linear-gradient(90deg, #E08A00, var(--warn)); }
.progress.bad span { background: linear-gradient(90deg, #C81E45, var(--neg)); }

/* ===== Alt menü ===== */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 30;
  height: calc(var(--tab-h) + var(--safe-b)); padding: 8px 10px calc(var(--safe-b) + 8px);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; padding: 4px 0; }
.tab.active { color: var(--primary); }
.tab.active::before { content: ''; position: absolute; top: -9px; width: 22px; height: 3px; border-radius: 3px; background: var(--primary); }
.tab .badge { position: absolute; top: 0; left: 55%; min-width: 16px; height: 16px; border-radius: 8px; background: var(--neg); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
.fab {
  justify-self: center; width: 58px; height: 58px; border-radius: 20px; margin-top: -26px; display: grid; place-items: center;
  background: linear-gradient(140deg, #22D39A, #0B8A62); color: #fff;
  box-shadow: 0 10px 24px rgba(11,138,98,.45), 0 0 0 5px var(--bg); transition: transform .15s;
}
.fab:active { transform: scale(.9) rotate(90deg); }

/* ===== Alt sayfa (sheet) ===== */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 50%; bottom: 0; width: 100%; max-width: 480px; z-index: 51;
  background: var(--sheet); border-radius: 28px 28px 0 0; max-height: 92dvh; max-height: 92vh; overflow-y: auto;
  padding: 8px 18px calc(var(--safe-b) + 22px); transform: translate(-50%, 100%); transition: transform .32s cubic-bezier(.2,.9,.25,1);
  border-top: 1px solid var(--line-2); overscroll-behavior: contain;
}
.sheet.show { transform: translate(-50%, 0); }
.sheet.full { height: 92dvh; height: 92vh; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

/* Form */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 2px 6px; }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2);
  padding: 0 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23889' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.amount-wrap {
  display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 20px; padding: 14px; margin-bottom: 14px;
  background: var(--surface-2); border: 1px solid var(--line-2);
}
.amount-wrap input {
  border: 0; background: none; outline: none; font-size: 38px; font-weight: 800; text-align: center; width: 100%;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 0;
}
.amount-wrap span { font-size: 28px; font-weight: 800; color: var(--muted); }
.amount-wrap.income input, .amount-wrap.income span { color: var(--pos); }
.amount-wrap.expense input, .amount-wrap.expense span { color: var(--neg); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 15px; margin-bottom: 14px; border: 1px solid var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px 6px; border-radius: 11px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: all .15s; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.seg.type input[value="income"]:checked + span { background: var(--pos); color: #fff; }
.seg.type input[value="expense"]:checked + span { background: var(--neg); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); transition: all .15s;
}
.chip input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.filter-chips { display: flex; gap: 7px; overflow-x: auto; margin: 0 -18px 12px; padding: 0 18px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.f-chip { flex-shrink: 0; padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.f-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.btn {
  height: 52px; border-radius: 16px; padding: 0 20px; font-weight: 800; font-size: 15.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.primary { background: linear-gradient(140deg, #22D39A, #0B8A62); color: #fff; box-shadow: 0 8px 20px rgba(11,138,98,.3); }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--neg-soft); color: var(--neg); }
.btn.sm { height: 40px; font-size: 13.5px; border-radius: 12px; padding: 0 14px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.stack > * + * { margin-top: 10px; }
.plan-row { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 8px; margin-bottom: 8px; }
.plan-row input { height: 46px; }
.hint { font-size: 12.5px; color: var(--muted); margin: -4px 2px 12px; }
.toggle-line { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--surface-2); border-radius: 14px; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
.switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 14px; transition: .2s; border: 1px solid var(--line-2); }
.switch span::after { content: ''; position: absolute; width: 22px; height: 22px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }

/* Hızlı ekle grid */
.add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.add-grid button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 6px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; text-align: center; min-height: 100px;
}
.add-grid .a-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 22px; }

/* ===== Takvim ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; }
.cal-day {
  aspect-ratio: 1 / 1.08; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px;
  font-weight: 700; font-size: 14px; position: relative; color: var(--text);
}
.cal-day.out { color: var(--muted); opacity: .45; }
.cal-day.today { background: var(--primary-soft); color: var(--primary); }
.cal-day.sel { background: var(--text); color: var(--bg); }
.cal-day .dots { display: flex; gap: 3px; margin-top: 5px; }
.cal-day .dots i { width: 5px; height: 5px; border-radius: 50%; }
.cal-day .net { font-size: 8.5px; font-weight: 700; margin-top: 2px; letter-spacing: -.02em; white-space: nowrap; }
.d-in { background: var(--pos); } .d-out { background: var(--neg); } .d-exp { background: var(--gold); } .d-ev { background: var(--info); } .d-due { background: var(--warn); }

/* ===== Notlar ===== */
.notes-grid { columns: 2; column-gap: 10px; }
.note-card {
  break-inside: avoid; display: block; width: 100%; text-align: left; margin-bottom: 10px; border-radius: 18px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); position: relative;
}
.note-card h4 { margin: 0 0 6px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; padding-right: 16px; }
.note-card p { margin: 0; font-size: 13px; color: var(--text-2); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.note-card small { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 600; }
.note-card .pin-i { position: absolute; top: 12px; right: 12px; color: var(--gold); }
.note-c-green { background: var(--pos-soft); border-color: transparent; }
.note-c-gold { background: var(--gold-soft); border-color: transparent; }
.note-c-blue { background: var(--info-soft); border-color: transparent; }
.note-c-red { background: var(--neg-soft); border-color: transparent; }
.note-c-violet { background: var(--violet-soft); border-color: transparent; }
.color-dots { display: flex; gap: 10px; margin-bottom: 14px; }
.color-dots label { position: relative; }
.color-dots input { position: absolute; opacity: 0; }
.color-dots span { display: block; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line-2); }
.color-dots input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--primary); }
.note-editor-title { width: 100%; border: 0; background: none; outline: none; font-size: 22px; font-weight: 800; padding: 6px 2px; letter-spacing: -.02em; }
.note-editor-body { width: 100%; border: 0; background: none; outline: none; font-size: 16px; line-height: 1.6; min-height: 45vh; resize: none; padding: 6px 2px; color: var(--text-2); }

/* Menü kutuları */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 12px; min-height: 118px; }
.tile .t-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.tile b { font-size: 15px; font-weight: 800; display: block; }
.tile small { color: var(--muted); font-size: 12px; font-weight: 600; }

/* Müşteri */
.avatar { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; flex-shrink: 0; }
.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; }
.client-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.client-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-top h4 { margin: 0; font-size: 16px; font-weight: 800; }
.job .svc { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 12px; }
.job .svc span { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.job-nums { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 8px; color: var(--muted); font-weight: 600; }
.job-nums b { color: var(--text); }
.mini-list { margin-top: 12px; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; font-size: 13.5px; }
.mini-row .l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-row .l span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row > b, .mini-row > div > b { white-space: nowrap; }

.search { position: relative; margin-bottom: 12px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 42px; height: 46px; }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .e-ic { width: 64px; height: 64px; border-radius: 22px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 12px; font-size: 28px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

.alert-card { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 16px; background: var(--neg-soft); color: var(--neg); font-weight: 600; font-size: 13.5px; margin-top: 14px; width: 100%; text-align: left; }
.alert-card.gold { background: var(--gold-soft); color: var(--gold); }

.month-nav { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px; margin-bottom: 12px; }
.month-nav b { font-size: 15px; font-weight: 800; }
.month-nav button { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--text-2); }

.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cat-row + .cat-row { border-top: 1px solid var(--line); }
.cat-row .ce { font-size: 20px; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; }
.cat-row .cm { flex: 1; min-width: 0; }
.cat-row .ct { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }

/* Ayarlar */
.set-group { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; margin-bottom: 14px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; font-weight: 600; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .s-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.set-row .s-t { flex: 1; }
.set-row .s-t small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.set-title { font-size: 12.5px; font-weight: 800; color: var(--muted); margin: 18px 6px 8px; letter-spacing: .02em; }

/* ===== Kilit ekranı ===== */
.lock {
  min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 56px) 28px calc(var(--safe-b) + 34px);
  background: radial-gradient(90% 60% at 50% 0%, rgba(25,196,138,.22), rgba(25,196,138,0) 70%), var(--bg);
}
.lock-top { text-align: center; }
.lock-logo { width: 88px; height: 88px; border-radius: 26px; box-shadow: 0 18px 40px rgba(6,78,59,.45); }
.lock h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 18px 0 4px; }
.lock p { color: var(--muted); margin: 0; font-size: 14px; }
.pin-dots { display: flex; gap: 16px; margin: 34px 0; }
.pin-dots i { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-2); transition: all .15s; }
.pin-dots i.on { background: var(--primary); border-color: var(--primary); transform: scale(1.1); }
.pin-dots.err { animation: shake .4s; }
.pin-dots.err i { border-color: var(--neg); background: var(--neg); }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-10px); } 40%,80% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 26px; }
.key { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); transition: transform .1s, background .1s; }
.key:active { transform: scale(.92); background: var(--surface-3); }
.key.ghost { background: none; border: 0; }
.shake { animation: shake .4s; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 14px); transform: translate(-50%, -150%); z-index: 80;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14px;
  transition: transform .3s cubic-bezier(.2,.9,.25,1); max-width: 90vw; box-shadow: var(--shadow); display: flex; gap: 8px; align-items: center;
}
.toast.show { transform: translate(-50%, 0); }

.confirm-box { text-align: center; padding: 6px 4px 4px; }
.confirm-box h3 { margin: 6px 0 6px; font-size: 18px; font-weight: 800; }
.confirm-box p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }

hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ===== v2: Giriş / kayıt ekranları ===== */
.auth {
  position: relative; min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto;
  padding: calc(var(--safe-t) + 40px) 24px calc(var(--safe-b) + 28px); display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(90% 55% at 50% 0%, rgba(25,196,138,.20), rgba(25,196,138,0) 70%), var(--bg);
}
.auth-back { position: absolute; top: calc(var(--safe-t) + 14px); left: 18px; }
.auth-logo { width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 16px 36px rgba(6,78,59,.4); }
.auth-hero { text-align: center; margin-bottom: 34px; }
.auth-hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -.035em; margin: 18px 0 8px; }
.auth-hero p, .auth-head p { color: var(--text-2); margin: 0; font-size: 15px; line-height: 1.55; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -.03em; margin: 14px 0 6px; }
.auth-actions { display: grid; gap: 10px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }
.auth a, .hint a, .check a { color: var(--primary); font-weight: 700; text-decoration: none; }
.big-emoji { font-size: 46px; line-height: 1; }
.link-btn { display: block; width: 100%; text-align: center; color: var(--primary); font-weight: 700; font-size: 14px; padding: 12px; text-decoration: none; }
.link-btn.muted { color: var(--muted); font-weight: 600; }
.form-err { background: var(--neg-soft); color: var(--neg); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); margin: 4px 2px 14px; line-height: 1.45; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 10px; opacity: .6; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 5px; align-items: center; margin: -4px 2px 12px; }
.meter i { height: 5px; border-radius: 3px; background: var(--surface-3); transition: background .2s; }
.meter small { font-size: 11.5px; font-weight: 700; color: var(--muted); min-width: 54px; text-align: right; }
.meter[data-s="0"] i:nth-child(-n+1), .meter[data-s="1"] i:nth-child(-n+1) { background: var(--neg); }
.meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.meter[data-s="3"] i:nth-child(-n+3) { background: var(--primary); }
.meter[data-s="4"] i { background: var(--pos); }
.rec-key {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: .06em; line-height: 1.7;
  text-align: center; padding: 18px; border-radius: 18px; background: var(--surface-2); border: 2px dashed var(--primary); margin-bottom: 12px; word-break: break-all; user-select: all;
}
.spin { display: inline-block; width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn:disabled { opacity: .6; pointer-events: none; }
.auth.lock { justify-content: space-between; text-align: center; }
.pin-msg { min-height: 22px; color: var(--neg); font-size: 13.5px; font-weight: 600; margin: -18px 0 0; }
.lock-foot { margin-top: 10px; }

/* Demo şeridi, senkron noktası */
.demo-bar { position: sticky; top: 0; z-index: 40; background: linear-gradient(90deg, #F6BE4F, #F59E0B); color: #2A1A00; font-size: 12.5px; font-weight: 700; padding: calc(var(--safe-t) + 8px) 14px 8px; text-align: center; }
.demo-bar a { color: #2A1A00; text-decoration: underline; margin-left: 4px; }
.sync-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pos); vertical-align: 1px; }
.sync-dot.sync { background: var(--info); animation: pulse 1s infinite; }
.sync-dot.offline, .sync-dot.error { background: var(--warn); }
@keyframes pulse { 50% { opacity: .3; } }

/* Hesap makinesi */
.amount-wrap { position: relative; }
.calc-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.calc-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.calc-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .25s; }
.calc-box { position: relative; width: 100%; max-width: 480px; background: var(--sheet); border-radius: 28px 28px 0 0; padding: 14px 18px calc(var(--safe-b) + 18px); transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.9,.25,1); border-top: 1px solid var(--line-2); }
.calc-modal.show .calc-scrim { opacity: 1; }
.calc-modal.show .calc-box { transform: none; }
.calc-disp { background: var(--surface-2); border-radius: 18px; padding: 14px 16px; text-align: right; margin-bottom: 10px; min-height: 92px; }
.calc-expr { color: var(--muted); font-size: 16px; font-weight: 600; min-height: 22px; word-break: break-all; font-variant-numeric: tabular-nums; }
.calc-res { font-size: 36px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; word-break: break-all; }
.calc-kdv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.calc-kdv button { padding: 10px 4px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 12.5px; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-keys button { height: 58px; border-radius: 16px; background: var(--surface-2); font-size: 22px; font-weight: 700; border: 1px solid var(--line); transition: transform .08s; }
.calc-keys button:active { transform: scale(.94); }
.calc-keys .op { background: var(--primary-soft); color: var(--primary); }
.calc-keys .fn { color: var(--text-2); font-size: 18px; }
.calc-keys .eq { background: linear-gradient(140deg, #22D39A, #0B8A62); color: #fff; border: 0; }

/* Uygulamayı yükle kartı */
.install-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 14px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--primary); position: relative; }
.install-card img { border-radius: 12px; }
.install-card b { display: block; font-size: 14.5px; }
.install-card small { display: block; color: var(--muted); font-size: 12px; }
.install-card .x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.steps { padding-left: 22px; margin: 0 0 14px; line-height: 1.6; }
.steps li { margin-bottom: 10px; }
.kbd { display: inline-block; padding: 0 7px; border-radius: 6px; background: var(--surface-3); font-size: 13px; }
.goal-emoji { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; }
.set-row a { color: var(--primary); }
.hint a { font-weight: 600; }
