/* ============================================================
   VADE — uygulama kabuğu ve bileşenler
   Bu dosya sayfa modüllerinin kullandığı tüm sınıfları tanımlar.
   Sınıf envanteri için UI-KIT.md'ye bakın.
   ============================================================ */

/* ---------- Kabuk ---------- */
.app { position: relative; z-index: 1; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.app > * { min-width: 0; }
.rail { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-4);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; }
.topbar .brand small { font-family: var(--font-ui); font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); margin-left: var(--sp-2); letter-spacing: .04em; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.topbar .title { font-weight: 600; font-size: var(--fs-lg); }
.page-main { padding: var(--sp-4) var(--sp-4) calc(var(--tabbar-h) + var(--sp-8)); max-width: var(--content-max); width: 100%; margin: 0 auto; min-width: 0; }
.page-main > * { min-width: 0; }

/* Alt sekme çubuğu (mobil) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
  background: color-mix(in srgb, var(--white) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--ink-3); font-size: 10.5px; font-weight: 500; letter-spacing: .02em;
  min-height: 44px;
}
.tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--ink); }
.tabbar a.active svg { stroke-width: 2.2; }
.tabbar .fab-slot { position: relative; }
.fab {
  position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  box-shadow: var(--shadow-fab);
  transition: transform var(--dur) var(--ease-spring), background var(--dur-fast);
}
.fab svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.fab:active { transform: translateX(-50%) scale(.92); }

/* Masaüstü: sol ray */
@media (min-width: 1024px) {
  .app { grid-template-columns: var(--rail-w) 1fr; }
  .rail {
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100dvh;
    padding: var(--sp-6) var(--sp-4) var(--sp-5);
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, var(--paper-2), var(--paper));
  }
  .rail .brand { font-family: var(--font-display); font-style: italic; font-size: 2rem; font-weight: 500; letter-spacing: -.02em; padding: 0 var(--sp-3); line-height: 1; }
  .rail .brand small { display: block; font-family: var(--font-ui); font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
  .rail nav { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: 1px; overflow-y: auto; scrollbar-width: thin; }
  .rail nav .group { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); padding: var(--sp-3) var(--sp-3) 2px; }
  .rail nav a {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: 5px var(--sp-3); border-radius: var(--radius-sm);
    text-decoration: none; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500;
    position: relative; transition: background var(--dur-fast), color var(--dur-fast);
  }
  .rail nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .rail nav a:hover { background: var(--paper-3); color: var(--ink); }
  .rail nav a.active { background: var(--ink); color: var(--paper); }
  .rail nav a.active::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; background: var(--brand); border-radius: 2px; }
  .rail .rail-foot { margin-top: auto; padding: var(--sp-3); font-size: var(--fs-xs); color: var(--ink-3); display: flex; flex-direction: column; gap: 6px; }
  .rail .rail-foot .user { font-weight: 600; color: var(--ink-2); }
  .rail .btn-add { margin-top: var(--sp-4); min-height: 46px; justify-content: flex-start; padding-left: 14px; }
  .rail .search .input { min-height: 38px; font-size: 13px; padding: 6px 12px; border-radius: var(--radius-pill); }
  .topbar { display: none; }
  .tabbar { display: none; }
  .page-main { padding: var(--sp-7) var(--sp-8) var(--sp-9); }
}

/* ---------- Sayfa başlıkları ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-2xl); letter-spacing: -.02em; }
.page-head h1 em { font-style: italic; color: var(--ink-3); font-weight: 400; }
.page-head .sub { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; }
.page-head .actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.section { margin-top: var(--sp-7); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line-2); margin-bottom: var(--sp-3); }
.section-head h2 { font-size: var(--fs-lg); font-weight: 600; }
.section-head h2 .n { color: var(--ink-3); font-weight: 400; font-family: var(--font-mono); font-size: var(--fs-sm); margin-left: 6px; }
.section-head .more { font-size: var(--fs-sm); color: var(--ink-3); text-decoration: none; }
.section-head .more:hover { color: var(--ink); }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: var(--sp-2); }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.divider { height: 1px; background: var(--line); margin: var(--sp-5) 0; }
.mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 var(--sp-4);
  border-radius: var(--radius); border: 1px solid var(--line-2);
  background: var(--white); color: var(--ink);
  font-weight: 600; font-size: var(--fs-sm);
  transition: background var(--dur-fast), transform var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
  text-decoration: none; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: var(--paper-2); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: #2A271F; border-color: #2A271F; }
.btn-brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-brand:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger { color: var(--out-ink); border-color: var(--out-soft); background: var(--out-soft); }
.btn-danger:hover { background: #ECCFC7; }
.btn-sm { min-height: 34px; padding: 0 var(--sp-3); font-size: var(--fs-xs); border-radius: var(--radius-sm); }
.btn-lg { min-height: 52px; padding: 0 var(--sp-6); font-size: var(--fs-md); border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn-add { width: 100%; min-height: 54px; font-size: var(--fs-md); border-radius: var(--radius-lg); gap: 10px; }
.btn-add svg { width: 22px; height: 22px; }

/* Çipler (kısayollar, filtreler, vade hızlı seçim) */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-2); background: var(--white);
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
  text-decoration: none; white-space: nowrap;
}
.chip:hover { background: var(--paper-2); }
.chip.active, .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.in { color: var(--in-ink); border-color: var(--in-soft); background: var(--in-soft); }
.chip.out { color: var(--out-ink); border-color: var(--out-soft); background: var(--out-soft); }
.chip.pending { color: var(--pending-ink); border-color: var(--pending-soft); background: var(--pending-soft); }
.chip.transfer { color: var(--transfer-ink); border-color: var(--transfer-soft); background: var(--transfer-soft); }
.chip.savings { color: var(--savings-ink); border-color: var(--savings-soft); background: var(--savings-soft); }
.chip.in.active { background: var(--in); color: #fff; border-color: var(--in); }
.chip.out.active { background: var(--out); color: #fff; border-color: var(--out); }
.chip.pending.active { background: var(--pending-dot); color: #fff; border-color: var(--pending-dot); }
.chip.transfer.active { background: var(--transfer); color: #fff; border-color: var(--transfer); }
.chip.savings.active { background: var(--savings); color: #fff; border-color: var(--savings); }

/* Rozetler */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; background: var(--paper-3); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.in { background: var(--in-soft); color: var(--in-ink); }
.badge.out { background: var(--out-soft); color: var(--out-ink); }
.badge.pending { background: var(--pending-soft); color: var(--pending-ink); }
.badge.transfer { background: var(--transfer-soft); color: var(--transfer-ink); }
.badge.savings { background: var(--savings-soft); color: var(--savings-ink); }
.badge.neutral { background: var(--paper-3); color: var(--ink-2); }
.badge.overdue { background: var(--out-soft); color: var(--out-ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.in { background: var(--in); } .dot.out { background: var(--out); } .dot.pending { background: var(--pending-dot); }
.dot.hollow { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.dot.hollow.in { color: var(--in); } .dot.hollow.out { color: var(--out); } .dot.hollow.transfer { color: var(--transfer); } .dot.hollow.savings { color: var(--savings); }
.dot.ring { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--pending-dot); } .dot.transfer { background: var(--transfer); } .dot.savings { background: var(--savings); }

/* ---------- Formlar ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field .label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.field .err { font-size: var(--fs-xs); color: var(--out-ink); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius);
  font-size: 16px; /* iOS zoom önlemi */
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  appearance: none; -webkit-appearance: none;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,21,15,.08); }
.input.invalid, .select.invalid { border-color: var(--out); }
.textarea { min-height: 84px; resize: vertical; }
.select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234A463D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input.money { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 500; text-align: right; min-height: 60px; padding-right: 16px; }
.input-wrap { position: relative; }
.input-wrap .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-family: var(--font-display); font-style: italic; pointer-events: none; }
.input-wrap .input.money { padding-right: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.form-actions .btn { min-width: 120px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-sm); font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; transition: background var(--dur-fast); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--dur) var(--ease-out); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--ink); outline-offset: 2px; }
.seg { display: inline-flex; background: var(--paper-3); border-radius: var(--radius); padding: 3px; gap: 2px; }
.seg button { min-height: 40px; padding: 0 12px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); transition: background var(--dur-fast), color var(--dur-fast); }
.seg button.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-1); }
.seg.block { display: flex; } .seg.block button { flex: 1; }

/* Tür seçici (hareket formu) */
.kind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kind-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--white);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2);
  transition: all var(--dur-fast);
}
.kind-grid button .dot { width: 10px; height: 10px; }
.kind-grid button.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.kind-grid button.active .dot { box-shadow: 0 0 0 3px rgba(255,255,255,.25); }

/* ---------- Sheet (alt panel / sağ panel) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(23,21,15,.45); opacity: 0; transition: opacity var(--dur) var(--ease-out); }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sheet);
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  will-change: transform;
}
.sheet.open { transform: translateY(0); }
.sheet .grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--line-3); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5) var(--sp-3); border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-xl); flex: 1; letter-spacing: -.01em; }
.sheet-body { overflow-y: auto; padding: var(--sp-4) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: var(--sp-3) var(--sp-5) calc(var(--sp-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: var(--sp-2); flex: none; background: var(--paper); }
.sheet-foot .btn { flex: 1; }
@media (min-width: 1024px) {
  .sheet { left: auto; top: 0; bottom: 0; width: var(--sheet-w); max-height: none; border-radius: 0; transform: translateX(100%); box-shadow: -12px 0 40px rgba(23,21,15,.18); }
  .sheet.open { transform: translateX(0); }
  .sheet .grabber { display: none; }
  .sheet-head { padding-top: var(--sp-5); }
  .sheet.center { top: 50%; bottom: auto; left: 50%; right: auto; width: min(520px, 92vw); transform: translate(-50%, -46%); opacity: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-2); transition: transform var(--dur) var(--ease-out), opacity var(--dur); }
  .sheet.center.open { transform: translate(-50%, -50%); opacity: 1; }
}

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 1024px) { .toasts { bottom: 24px; } }
.toast { pointer-events: auto; background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: var(--radius); font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 10px; animation: toast-in var(--dur-slow) var(--ease-spring); }
.toast.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6FCF97; flex: none; }
.toast.err::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #F2994A; flex: none; }
.toast .undo { margin-left: auto; color: #fff; text-decoration: underline; font-weight: 600; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Defter listesi (hareket satırları) ---------- */
.ledger { border-top: 1px solid var(--line-2); }
.ledger-row {
  display: grid; grid-template-columns: 4px 1fr auto; gap: 0 12px; align-items: center;
  padding: 11px 0 11px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; position: relative; cursor: pointer;
  transition: background var(--dur-fast);
}
.ledger-row:hover { background: color-mix(in srgb, var(--white) 60%, transparent); }
.ledger-row .bar { width: 4px; height: 70%; border-radius: 2px; background: var(--ink-4); transition: transform var(--dur-fast); justify-self: start; }
.ledger-row:hover .bar { transform: scaleY(1.25); }
.ledger-row .bar.in { background: var(--in); } .ledger-row .bar.out { background: var(--out); } .ledger-row .bar.pending { background: var(--pending-dot); } .ledger-row .bar.transfer { background: var(--transfer); } .ledger-row .bar.savings { background: var(--savings); }
.ledger-row .main { min-width: 0; padding-left: 8px; overflow: hidden; }
.ledger-row .t { display: block; font-weight: 600; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-row .s { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; display: flex; gap: 4px 6px; align-items: center; flex-wrap: wrap; line-height: 1.35; }
.ledger-row .s .sep { opacity: .5; }
.ledger-row .amt { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--fs-md); white-space: nowrap; }
.ledger-row .amt small { display: block; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; font-family: var(--font-ui); }
.ledger-row .amt .sign { color: var(--ink-3); margin-right: 2px; font-weight: 400; }
.ledger-row .quick { grid-column: 4; }
.ledger-row.has-quick { grid-template-columns: 4px 1fr auto auto; }
.ledger-row .quick .btn { min-height: 40px; width: 40px; padding: 0; border-radius: 50%; }
.ledger-row.done .t { color: var(--ink-3); }
.ledger-row.done .amt { color: var(--ink-3); font-weight: 500; }
.ledger-group { padding: var(--sp-4) 0 var(--sp-1); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.ledger-group .sum { font-family: var(--font-mono); text-transform: none; letter-spacing: 0; }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line-2); }
.table { min-width: 560px; }
.table th { text-align: left; font-size: var(--fs-xs); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: var(--fs-sm); }
.table th.num, .table td.num { text-align: right; }
.table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table tr.total td { font-weight: 700; border-top: 2px solid var(--ink); background: var(--paper-2); }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: color-mix(in srgb, var(--white) 60%, transparent); }
.table .neg { color: var(--ink); } /* kırmızı metin yok: negatif işaretiyle */
.table td .bar-in, .table td .bar-out { display: inline-block; height: 6px; border-radius: 3px; vertical-align: middle; }
.table td .bar-in { background: var(--in); } .table td .bar-out { background: var(--out); }

/* ---------- İstatistik satırları / stat ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.stat .k { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.stat .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; }
.stat .v.sm { font-size: var(--fs-lg); }
.stat .d { font-size: var(--fs-xs); color: var(--ink-3); }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: var(--fs-sm); }
.stat-row .k { color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.stat-row .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.stat-row.total { border-bottom: 2px solid var(--ink); font-weight: 700; }
.stat-row.total .v { font-size: var(--fs-md); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: var(--fs-sm); }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 500; }
.kv dd.num { font-family: var(--font-mono); text-align: right; }

/* ---------- Hero (dashboard) ---------- */
.hero { position: relative; padding: var(--sp-5) var(--sp-4) var(--sp-6); margin: 0 calc(-1 * var(--sp-4)); border-bottom: 1px solid var(--line-2); overflow: hidden; background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
@media (min-width: 1024px) { .hero { margin: 0; padding-left: var(--sp-6); padding-right: var(--sp-6); border: 1px solid var(--line-2); border-radius: var(--radius-lg); } }
.hero .acct-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: var(--fs-sm); background: none; width: 100%; text-align: left; border-radius: 0; }
.hero .acct-row:hover { background: color-mix(in srgb, var(--white) 50%, transparent); }
.hero .acct-row .v { font-size: var(--fs-md); margin: 0; font-weight: 600; }
.hero .acct-row .k { font-family: var(--font-ui); font-style: normal; font-size: var(--fs-sm); color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.hero .acct-row .edit { color: var(--ink-4); width: 14px; height: 14px; display: inline-block; vertical-align: middle; margin-left: 6px; }
.hero .side .stat .k { font-family: var(--font-ui); font-style: normal; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.hero .side .stat .d { font-size: var(--fs-xs); color: var(--ink-3); }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, var(--in-soft), transparent 72%); opacity: .5; pointer-events: none; z-index: 0; }
.hero > * { position: relative; z-index: 1; }
.hero .k { font-family: var(--font-display); font-style: italic; font-size: var(--fs-lg); color: var(--ink-2); }
.hero .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(32px, 9vw, 56px); font-weight: 600; letter-spacing: -.035em; line-height: 1; margin-top: 6px; white-space: nowrap; }
.hero .v .cur { font-weight: 400; font-size: .55em; color: var(--ink-3); margin-left: 4px; }
.hero .breakdown { display: flex; gap: var(--sp-5); flex-wrap: wrap; margin-top: var(--sp-4); }
.hero .breakdown div { font-size: var(--fs-sm); color: var(--ink-3); }
.hero .breakdown b { display: block; font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; font-size: var(--fs-md); margin-top: 2px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.4fr 1fr; align-items: end; } }
.hero .side { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-5); }
.hero .side .stat { border-bottom: 0; padding: 0; }
.hero .side .stat .v { font-size: var(--fs-xl); }

/* ---------- Hızlı eylemler (özet) ---------- */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-grid .btn { min-height: 56px; font-size: var(--fs-md); border-radius: var(--radius-lg); justify-content: flex-start; padding-left: 18px; background: var(--white); }
.quick-grid .btn .dot { width: 10px; height: 10px; }
.quick-grid .btn svg { color: var(--in); }
@media (min-width: 760px) { .quick-grid { grid-template-columns: repeat(4, 1fr); } .quick-grid .btn { justify-content: center; padding-left: 0; } }
.hero .side a.stat:hover .v { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 4px; }

/* ---------- Fiş şeridi (Bugün / Bu hafta / Bu ay) ---------- */
.receipts { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 760px) { .receipts { grid-template-columns: repeat(3, 1fr); } }
.receipt {
  background: var(--white); border: 1px solid var(--line-2); border-radius: 6px;
  padding: var(--sp-4) var(--sp-4) var(--sp-5); position: relative;
  box-shadow: var(--shadow-1);
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 8px) no-repeat, radial-gradient(circle at 6px 100%, transparent 5px, #000 5.5px) bottom/12px 8px repeat-x;
  mask: linear-gradient(#000 0 0) top/100% calc(100% - 8px) no-repeat, radial-gradient(circle at 6px 100%, transparent 5px, #000 5.5px) bottom/12px 8px repeat-x;
}
.receipt h3 { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: var(--fs-xl); display: flex; justify-content: space-between; align-items: baseline; }
.receipt h3 small { font-family: var(--font-ui); font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; }
.receipt .lines { margin-top: var(--sp-3); }
.receipt .line { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: var(--fs-sm); border-bottom: 1px dotted var(--line-2); }
.receipt .line .k { color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.receipt .line .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.receipt .line.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; font-weight: 700; }
.receipt .line.total .v { font-size: var(--fs-md); }
.receipt .line.sub .k { color: var(--ink-3); font-size: var(--fs-xs); }

/* ---------- Uyarılar ---------- */
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px 10px 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color var(--dur-fast); }
.alert:hover { border-color: var(--line-3); }
.alert .bar { width: 4px; align-self: stretch; border-radius: 0 2px 2px 0; background: var(--pending); }
.alert.critical .bar { background: var(--out); } .alert.warning .bar { background: var(--pending-dot); } .alert.info .bar { background: var(--transfer); }
.alert .t { display: block; font-weight: 600; font-size: var(--fs-sm); }
.alert .m { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.alert > span:nth-child(2) { min-width: 0; }
.alert .amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; }
.alert .when { font-size: var(--fs-xs); color: var(--ink-3); text-align: right; }

/* ---------- Boş durum ---------- */
.empty { padding: var(--sp-8) var(--sp-4); text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty .display-i { font-size: var(--fs-xl); color: var(--ink-2); }
.empty p { margin-top: 6px; font-size: var(--fs-sm); }
.empty .btn { margin-top: var(--sp-4); }

/* ---------- Kartlar (kredi kartı / hesap kutuları — az kullan) ---------- */
.panel { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: var(--sp-5); box-shadow: var(--shadow-1); }
.panel.tight { padding: var(--sp-4); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.panel-head h3 { font-size: var(--fs-md); font-weight: 600; }

/* ---------- Takvim ---------- */
.cal { border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); display: grid; grid-template-columns: repeat(7, 1fr); }
.cal .dow { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 6px 4px; text-align: center; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--paper-2); }
.cal .day { min-height: 64px; padding: 6px 4px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); position: relative; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: background var(--dur-fast); }
@media (min-width: 760px) { .cal .day { min-height: 96px; padding: 8px; } }
.cal .day:hover { background: var(--white); }
.cal .day.other { color: var(--ink-4); background: color-mix(in srgb, var(--paper-2) 50%, transparent); }
.cal .day.today .n { background: var(--ink); color: var(--paper); }
.cal .day.selected { background: var(--white); box-shadow: inset 0 0 0 2px var(--ink); }
.cal .day .n { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.cal .day .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal .day .dots .dot { width: 6px; height: 6px; }
.cal .day .sum { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); margin-top: auto; display: none; }
@media (min-width: 760px) { .cal .day .sum { display: block; } }
.cal .day .ev { display: none; font-size: 10.5px; line-height: 1.25; padding: 2px 4px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1024px) { .cal .day .ev { display: block; } .cal .day .dots { display: none; } }
.cal .day .ev.in { background: var(--in-soft); color: var(--in-ink); } .cal .day .ev.out { background: var(--out-soft); color: var(--out-ink); } .cal .day .ev.pending { background: var(--pending-soft); color: var(--pending-ink); } .cal .day .ev.transfer { background: var(--transfer-soft); color: var(--transfer-ink); } .cal .day .ev.savings { background: var(--savings-soft); color: var(--savings-ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Nakit akışı çubukları (SVG kapsayıcı) ---------- */
.flowchart { width: 100%; height: 140px; }
.flowchart.v2 svg { overflow: visible; }
.flowchart .grid { stroke: var(--line-2); stroke-width: 1; }
.flowchart .base { stroke: var(--line-3); stroke-width: 1; }
.flowchart .axis { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-3); }
.flowchart .axis.warn { fill: var(--out-ink); }
.flowchart .baldot { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.flowchart .baldot.neg { fill: var(--out); stroke: var(--out); }
.flowchart .zero { stroke: var(--out); stroke-dasharray: 4 3; }
.chart-legend { margin-top: 6px; }
.chart-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.chart-legend .sw.in { background: var(--in); } .chart-legend .sw.out { background: var(--out); } .chart-legend .sw.line { height: 2px; width: 16px; background: var(--ink); border-radius: 1px; }
.flowchart svg { width: 100%; height: 100%; overflow: visible; }
.flowchart .in { fill: var(--in); } .flowchart .out { fill: var(--out); } .flowchart .bal { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.flowchart text { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-3); }

/* ---------- Giriş / kurulum ---------- */
.app > .auth { grid-column: 1 / -1; }
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; position: relative; z-index: 1; }
.auth-side {
  position: relative; overflow: hidden;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 6vw, 72px);
  background: linear-gradient(160deg, var(--paper-2) 0%, var(--paper) 70%);
  border-bottom: 1px solid var(--line-2);
}
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .06; mix-blend-mode: multiply; pointer-events: none; }
.auth-side::after { content: ""; position: absolute; left: clamp(20px, 6vw, 72px); right: clamp(20px, 6vw, 72px); top: 58%; bottom: 0; background: var(--ruled); opacity: .9; pointer-events: none; mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent); }
.auth-side .brand { font-family: var(--font-display); font-style: italic; font-size: clamp(3.4rem, 7vw, 6rem); letter-spacing: -.035em; line-height: .95; }
.auth-side .brand small { display: block; font-family: var(--font-ui); font-style: normal; font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 14px; }
.auth-side .manifesto { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.7rem); line-height: 1.3; max-width: 26ch; margin-top: clamp(24px, 5vh, 56px); color: var(--ink); font-weight: 400; }
.auth-side .manifesto em { font-style: italic; color: var(--in-ink); }
.auth-side .axioms { margin-top: clamp(20px, 4vh, 40px); display: grid; gap: 10px; max-width: 360px; position: relative; }
.auth-side .axioms div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink-2); padding: 8px 0; border-bottom: 1px dotted var(--line-3); }
.auth-side .axioms div span:nth-child(2) { font-family: var(--font-display); font-style: italic; color: var(--ink-3); font-size: 1.1em; }
.auth-side .axioms div span:last-child { text-align: right; }
.auth-side .seal { position: absolute; right: clamp(16px, 4vw, 48px); top: clamp(16px, 4vw, 48px); width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; transform: rotate(-12deg); }
.auth-side .seal::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed var(--line-3); }
.auth-main { display: grid; place-items: center; padding: clamp(24px, 5vw, 64px) var(--sp-5); }
.auth-card { width: min(420px, 100%); }
.auth-card.wide { width: min(620px, 100%); }
.auth-card h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-2xl); letter-spacing: -.02em; }
.auth-card .tag { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 8px; }
.auth-card form { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-card .rule { height: 1px; background: var(--line-2); margin: var(--sp-5) 0; }
.auth-card .mobile-brand { font-family: var(--font-display); font-style: italic; font-size: 2.6rem; letter-spacing: -.03em; line-height: 1; margin-bottom: 4px; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(360px, 46%) 1fr; }
  .auth-side { border-bottom: 0; border-right: 1px solid var(--line-2); min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
  .auth-card .mobile-brand { display: none; }
}
@media (max-width: 899px) {
  .auth-side { display: none; }
}

/* ---------- Yükleme ---------- */
.loading { padding: var(--sp-8); text-align: center; color: var(--ink-3); font-family: var(--font-display); font-style: italic; font-size: var(--fs-lg); }
.skeleton { background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 37%, var(--paper-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Giriş animasyonları ---------- */
.reveal > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.reveal > *:nth-child(1) { animation-delay: 0ms; } .reveal > *:nth-child(2) { animation-delay: 40ms; } .reveal > *:nth-child(3) { animation-delay: 80ms; } .reveal > *:nth-child(4) { animation-delay: 120ms; } .reveal > *:nth-child(5) { animation-delay: 160ms; } .reveal > *:nth-child(6) { animation-delay: 200ms; } .reveal > *:nth-child(7) { animation-delay: 240ms; } .reveal > *:nth-child(8) { animation-delay: 280ms; } .reveal > *:nth-child(n+9) { animation-delay: 320ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Yardımcılar ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
.link:hover { text-decoration-color: var(--ink); }
.pill-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pill-nav::-webkit-scrollbar { display: none; }
.pill-nav a { flex: none; padding: 8px 14px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); text-decoration: none; border: 1px solid transparent; }
.pill-nav a.active { color: var(--ink); background: var(--white); border-color: var(--line-2); }
.progress { height: 6px; background: var(--paper-3); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--in); border-radius: 3px; }
.progress > i.out { background: var(--out); }
.menu-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.menu-list a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 500; }
.menu-list a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-3); }
.menu-list a .chev { margin-left: auto; color: var(--ink-4); }

/* ============================================================
   v2 — kullanıcı dostu katman: karolar, zaman çizelgesi, çip seçici, yapılacaklar
   ============================================================ */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 14px 12px; min-height: 84px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-lg); text-align: left; text-decoration: none; color: var(--ink); transition: transform var(--dur-fast), box-shadow var(--dur-fast), border-color var(--dur-fast); }
.tile:hover { border-color: var(--line-3); box-shadow: var(--shadow-1); }
.tile:active { transform: scale(.98); }
.tile .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); }
.tile .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile.in .ic { background: var(--in-soft); color: var(--in-ink); } .tile.out .ic { background: var(--out-soft); color: var(--out-ink); } .tile.transfer .ic { background: var(--transfer-soft); color: var(--transfer-ink); } .tile.savings .ic { background: var(--savings-soft); color: var(--savings-ink); } .tile.pending .ic { background: var(--pending-soft); color: var(--pending-ink); }
.tile b { font-size: var(--fs-md); font-weight: 600; }
.tile small { font-size: var(--fs-xs); color: var(--ink-3); }
.tile .n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--fs-lg); margin-top: auto; }

/* Yapılacaklar */
.todo { display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 12px 12px 14px; background: var(--white); border: 1px solid var(--line-2); border-left-width: 4px; border-radius: var(--radius); text-decoration: none; color: inherit; }
.todo-item.in { border-left-color: var(--in); } .todo-item.out { border-left-color: var(--out); } .todo-item.late { border-left-color: var(--pending-dot); background: color-mix(in srgb, var(--pending-soft) 40%, var(--white)); }
.todo-item .t { font-weight: 600; font-size: var(--fs-md); display: block; }
.todo-item .s { font-size: var(--fs-xs); color: var(--ink-3); display: block; margin-top: 2px; }
.todo-item .amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: var(--fs-lg); white-space: nowrap; }
.todo-item .act { display: flex; align-items: center; gap: 10px; }
.todo-item .btn-ok { width: 44px; height: 44px; border-radius: 50%; background: var(--in); color: #fff; border: 0; display: grid; place-items: center; box-shadow: var(--shadow-1); }
.todo-item .btn-ok svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.todo-item .btn-ok.out { background: var(--ink); }

/* Zaman çizelgesi (7 gün) */
.timeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.timeline a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line-2); text-decoration: none; color: inherit; min-height: 76px; }
.timeline a.today { border-color: var(--ink); }
.timeline .d { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.timeline .n { font-family: var(--font-mono); font-weight: 600; }
.timeline .v { font-family: var(--font-mono); font-size: 10px; margin-top: auto; }
.timeline .v.in { color: var(--in-ink); } .timeline .v.out { color: var(--out-ink); }
.timeline .dots { display: flex; gap: 3px; }

/* Satır içi günlük satış */
.inline-sales { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 480px) { .inline-sales { grid-template-columns: 1fr 1fr; } .inline-sales .btn { grid-column: 1 / -1; } }
.inline-sales .input { min-height: 48px; font-family: var(--font-mono); font-size: 18px; text-align: right; }

/* Çip seçici (kategori / karşı taraf) */
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select .chip { min-height: 40px; }
.chip-select .chip.more { border-style: dashed; color: var(--ink-3); }

/* Adım başlıkları (form) */
.step { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; }
.step .no { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 12px; display: grid; place-items: center; font-weight: 600; }
.step .lbl { font-weight: 600; font-size: var(--fs-md); }
.step .hint { font-size: var(--fs-xs); color: var(--ink-3); margin-left: auto; }

/* Global arama */
.topbar .search { flex: 1; max-width: 420px; }
.topbar .search .input { min-height: 38px; padding: 6px 12px; font-size: 14px; border-radius: var(--radius-pill); }
.search-results .ledger-row { cursor: pointer; }

/* Yardım */
.help-steps { display: grid; gap: 12px; }
.help-steps .panel { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.help-steps .no { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--font-display); font-style: italic; font-size: 1.4rem; }
.help-steps h3 { font-size: var(--fs-md); margin-bottom: 4px; }
.help-steps p { font-size: var(--fs-sm); color: var(--ink-2); }

/* ---------- Yazdırma / PDF ---------- */
.print-head { display: none; }
@media print {
  @page { margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #000; }
  .rail, .topbar, .tabbar, .fab, .toasts, #sheets, .pill-nav, .chips, .btn, .seg, .no-print, .page-head .actions, .section-head .more { display: none !important; }
  .app { display: block; }
  .page-main { padding: 0 !important; max-width: none !important; }
  .print-head { display: block; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 14px; }
  .print-head .brand { font-family: var(--font-display); font-style: italic; font-size: 22px; }
  .print-head .meta { font-size: 11px; color: #444; }
  .hero, .panel, .receipt, .stat { background: #fff !important; box-shadow: none !important; border-color: #bbb !important; }
  .hero::after, .grain::before { display: none !important; }
  .section { break-inside: avoid; margin-top: 14px; }
  .table-wrap { overflow: visible !important; } .table { min-width: 0 !important; font-size: 11px; }
  .table th, .table td { padding: 5px 6px; }
  .grid-2, .grid-3 { display: grid; }
  .reveal > * { animation: none !important; }
  a { text-decoration: none; color: inherit; }
  .flowchart { height: 200px !important; }
}
