/* =========================================================
   XSF FLOW · görsel sistem
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #06060b;
  --panel: #0e0e17;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .12);
  --text: #f2f2f7;
  --text2: #c9c9da;
  --muted: #8d8da6;
  --dim: #63637c;
  --grad: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
  --grad-btn: linear-gradient(135deg, #7c3aed 0%, #0e7490 100%);
  --c-inc: #20a39a;
  --c-exp: #e0647e;
  --pos: #5fe0c8;
  --neg: #ff8fa3;
  --warn: #fcd34d;
  --r-lg: 22px;
  --r: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Sora', 'Inter', system-ui, sans-serif;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  min-height: 100vh; font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; border-radius: 8px; }
::selection { background: rgba(139, 92, 246, .45); }
.ic { width: 18px; height: 18px; flex: none; display: block; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warn-text { color: var(--warn); }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- arka plan ---------- */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; animation: drift 26s ease-in-out infinite alternate; }
.b1 { width: 620px; height: 620px; background: radial-gradient(circle, rgba(109, 74, 255, .55) 0%, transparent 65%); top: -260px; left: 6%; }
.b2 { width: 560px; height: 560px; background: radial-gradient(circle, rgba(8, 145, 178, .45) 0%, transparent 65%); bottom: -260px; right: -120px; animation-delay: -9s; }
.b3 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(190, 24, 93, .22) 0%, transparent 70%); top: 38%; left: 48%; animation-delay: -16s; }
.grid-fx {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 80%);
}
@keyframes drift { to { transform: translate(70px, 50px) scale(1.12); } }

/* ---------- iskelet ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 26px 16px 20px;
  display: flex; flex-direction: column; gap: 30px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 16, 28, .72), rgba(8, 8, 14, .55));
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.main { min-width: 0; width: 100%; max-width: 1480px; padding: 30px clamp(18px, 3vw, 44px) 36px; }
.foot { margin-top: 36px; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .04em; }

/* marka */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); padding: 0 8px; }
.brand-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 8px 22px rgba(124, 92, 255, .55)); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-family: var(--display); font-size: 23px; font-weight: 800; letter-spacing: .05em; }
.brand-text span {
  font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .62em; margin-top: 5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* menü */
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; border-radius: 13px; border: 0; background: none; cursor: pointer;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; text-align: left;
  position: relative; transition: color .2s, background .2s;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav-item.on { color: var(--text); background: linear-gradient(90deg, rgba(139, 92, 246, .2), rgba(34, 211, 238, .05)); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .18); }
.nav-item.on::before { content: ""; position: absolute; left: -16px; top: 50%; width: 3px; height: 22px; transform: translateY(-50%); border-radius: 0 3px 3px 0; background: var(--grad); box-shadow: 0 0 14px rgba(167, 139, 250, .8); }
.nav-ic .ic { width: 19px; height: 19px; }
.nav-item.on .nav-ic { color: #c4b5fd; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-note { font-size: 11.5px; color: var(--muted); padding: 0 14px; line-height: 1.45; }

/* ---------- üst bar ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-bottom: 22px; flex-wrap: wrap; }
.top-title { min-width: 0; }
.top h1 {
  font-family: var(--display); font-size: clamp(27px, 3vw, 38px); font-weight: 700; letter-spacing: -.035em; line-height: 1.15;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
}
.top p { color: var(--muted); margin-top: 4px; }
.range-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px;
  font: 600 12.5px var(--font); letter-spacing: 0; color: var(--text2);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
}
.range-chip .ic { width: 14px; height: 14px; color: #a78bfa; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.period { display: flex; align-items: center; gap: 4px; }
.today-btn { margin-left: 4px; }
.today-btn.is-now { visibility: hidden; }

/* segment */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg button {
  border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 7px 15px; border-radius: 99px; cursor: pointer; white-space: nowrap;
  transition: color .2s, background .25s var(--ease), box-shadow .25s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--text); color: #0b0b14; box-shadow: 0 6px 22px -6px rgba(255, 255, 255, .45); }
.seg.sm button { padding: 5px 12px; font-size: 12.5px; }

/* butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .045); color: var(--text);
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .2s, border-color .2s, transform .15s, filter .2s, box-shadow .2s;
}
.btn:hover { background: rgba(255, 255, 255, .085); border-color: rgba(255, 255, 255, .2); }
.btn:active { transform: scale(.97); }
.btn .ic { width: 17px; height: 17px; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; gap: 6px; }
.btn.sm .ic { width: 15px; height: 15px; }
.btn-primary {
  background: var(--grad-btn); border-color: transparent; color: #fff;
  box-shadow: 0 10px 30px -10px rgba(124, 58, 237, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { background: var(--grad-btn); border-color: transparent; filter: brightness(1.15); box-shadow: 0 14px 36px -10px rgba(124, 58, 237, 1), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.sm { width: 34px; height: 34px; padding: 0; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(255, 255, 255, .07); }
.btn-danger { background: #be123c; border-color: transparent; color: #fff; }
.btn-danger:hover { background: #e11d48; border-color: transparent; }
.btn-danger.ghost { color: #fda4af; background: transparent; }
.btn-danger.ghost:hover { background: rgba(225, 29, 72, .12); }
.link { background: none; border: 0; color: #b4a5fb; font-weight: 600; font-size: 12.5px; cursor: pointer; text-decoration: none; padding: 4px 2px; white-space: nowrap; }
.link:hover { color: #d8cfff; text-decoration: underline; text-underline-offset: 3px; }
.chip { border: 1px solid rgba(167, 139, 250, .35); background: rgba(139, 92, 246, .14); color: #d8cfff; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 99px; cursor: pointer; }
.chip:hover { background: rgba(139, 92, 246, .24); }

/* bant */
.banner {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 12px 12px 12px 16px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(139, 92, 246, .17), rgba(34, 211, 238, .07));
  border: 1px solid rgba(167, 139, 250, .26);
}
.banner > .ic { color: #c4b5fd; }
.banner p { flex: 1; color: var(--text2); font-size: 13.5px; }
.banner b { color: var(--text); }

/* ---------- kartlar ---------- */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row-chart { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative; min-width: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .018));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), var(--shadow);
}
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h h3 { font-family: var(--display); font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.card-h p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.card-foot b { color: var(--text); font-weight: 700; margin-left: 4px; }
.card-foot b.pos { color: var(--pos); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }

/* KPI */
.kpi { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 16px; container-type: inline-size; }
.kpi-h { display: flex; align-items: center; gap: 10px; color: var(--text2); font-weight: 600; font-size: 13px; }
.kpi-l { flex: 1; min-width: 0; }
.kpi-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: var(--text2); }
.kpi-ic .ic { width: 17px; height: 17px; }
.tone-inc .kpi-ic { background: rgba(32, 163, 154, .16); color: var(--pos); }
.tone-exp .kpi-ic { background: rgba(224, 100, 126, .15); color: var(--neg); }
.tone-net .kpi-ic { background: rgba(139, 92, 246, .2); color: #c4b5fd; }
.tone-warn .kpi-ic { background: rgba(201, 133, 0, .18); color: var(--warn); }
.kpi-v {
  font-family: var(--display); font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  font-size: calc(clamp(16px, 13.5cqi, 31px) * var(--fit, 1)); margin-top: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi-f { font-size: 12.5px; color: var(--muted); margin-top: 6px; min-height: 19px; }
.kpi-f b { color: var(--text); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 3px 8px 3px 6px; border-radius: 99px; }
.delta .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.delta.good { background: rgba(32, 163, 154, .15); color: var(--pos); }
.delta.bad { background: rgba(224, 100, 126, .14); color: var(--neg); }
.spark { width: 100%; height: 38px; margin-top: 12px; display: block; overflow: visible; }
.spark-l { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-a { opacity: .1; }
.spark-d { stroke: #12121e; stroke-width: 2; }
.spark.inc .spark-l { stroke: var(--c-inc); } .spark.inc .spark-a, .spark.inc .spark-d { fill: var(--c-inc); }
.spark.exp .spark-l { stroke: var(--c-exp); } .spark.exp .spark-a, .spark.exp .spark-d { fill: var(--c-exp); }
.spark.net .spark-l { stroke: #a78bfa; } .spark.net .spark-a, .spark.net .spark-d { fill: #a78bfa; }

.kpi.hero {
  background:
    radial-gradient(130% 120% at 0% 0%, rgba(139, 92, 246, .24), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(34, 211, 238, .12), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
}
.kpi.hero::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(167, 139, 250, .85), rgba(34, 211, 238, .5) 45%, rgba(255, 255, 255, .04) 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.kpi-list { gap: 2px; }
.kpi-list .kpi-h { margin-bottom: 10px; }
.kl-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none; font-size: 13px; color: var(--text2);
  transition: background .15s;
}
.kl-row:hover { background: rgba(255, 255, 255, .05); }
.kl-row b { font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }

/* ---------- grafikler ---------- */
.chart-card { display: flex; flex-direction: column; }
.chart { height: 270px; position: relative; }
.chart-card .chart { flex: 1 1 auto; height: auto; min-height: 260px; }
.chart svg { display: block; overflow: visible; }
.gridl { stroke: rgba(255, 255, 255, .055); stroke-width: 1; }
.axis { stroke: rgba(255, 255, 255, .16); stroke-width: 1; }
.tick { fill: #7d7d96; font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.tick.xl.on { fill: var(--text2); font-weight: 600; }
.bar.inc { fill: var(--c-inc); }
.bar.exp { fill: var(--c-exp); }
.bar-g { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .8s var(--ease) both; animation-delay: var(--d); transition: opacity .2s; }
.bar-g.dim { opacity: .26; }
.hit { fill: transparent; cursor: crosshair; }
.hit.on { fill: rgba(255, 255, 255, .04); }
@keyframes grow { from { transform: scaleY(0); } }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.donut { position: relative; width: 178px; height: 178px; flex: none; }
.donut svg { width: 100%; height: 100%; display: block; animation: spinIn 1s var(--ease); }
.donut-track { stroke: rgba(255, 255, 255, .04); }
.dseg { transition: opacity .2s; cursor: pointer; }
.dseg.fade, .legend-list li.fade { opacity: .28; }
@keyframes spinIn { from { transform: rotate(-70deg) scale(.88); opacity: 0; } }
.donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-c small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.donut-c b { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.legend-list { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 1px; }
.legend-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 40px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 13px; transition: opacity .2s, background .2s; cursor: default; }
.legend-list li:hover { background: rgba(255, 255, 255, .04); }
.legend-list li span { color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-list li b { font-weight: 700; font-variant-numeric: tabular-nums; }
.legend-list li em { font-style: normal; color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }

#tip {
  position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: rgba(16, 16, 28, .97); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px;
  font-size: 12.5px; min-width: 180px; box-shadow: 0 18px 40px -8px rgba(0, 0, 0, .85);
}
#tip.show { opacity: 1; }
#tip > b { font-family: var(--display); font-size: 13px; }
.tip-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: var(--muted); }
.tip-row span { margin-left: auto; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tip-row.net { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 7px; }
.key.inc { background: var(--c-inc); } .key.exp { background: var(--c-exp); }

/* ---------- mini listeler ---------- */
.mini-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.mini-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; background: none; text-align: left;
  border-radius: 12px; cursor: pointer; transition: background .15s;
}
.mini-row:hover { background: rgba(255, 255, 255, .045); }
.mr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mr-main b, .row-main b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-main small, .row-main small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.mr-r b { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.when { font-size: 11px; font-weight: 600; color: var(--muted); }
.when.soon { color: var(--warn); }
.bubble {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  color: color-mix(in srgb, var(--c) 62%, white);
  background: color-mix(in srgb, var(--c) 17%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}
.bubble.sm { width: 36px; height: 36px; border-radius: 11px; }
.bubble.sm .ic { width: 17px; height: 17px; }

/* hesaplar */
/* alt ızgara: bütün hesapların çubuk izleri aynı uzunlukta olsun */
.acc-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 14px; }
.af-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.af-top { grid-column: 1 / -1; }
.af-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.af-top span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text2); }
.af-top b { font-variant-numeric: tabular-nums; }
.af-bars { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; gap: 5px 10px; align-items: center; }
.af-bars small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.af-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.af-bar i { display: block; height: 100%; border-radius: 99px; animation: widen .9s var(--ease) both; transform-origin: left; }
.af-bar i.in { background: var(--c-inc); }
.af-bar i.out { background: var(--c-exp); }
@keyframes widen { from { transform: scaleX(0); } }

/* krediler (özet) */
.loan-mini { display: flex; flex-direction: column; gap: 4px; margin: 0 -8px; }
.lm-row { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 8px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.lm-row:hover { background: rgba(255, 255, 255, .045); }
.lm-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.lm-top > span { display: flex; flex-direction: column; min-width: 0; }
.lm-top b { font-weight: 600; font-size: 13.5px; }
.lm-top small { font-size: 12px; color: var(--muted); }
.lm-r { align-items: flex-end; text-align: right; }
.lm-r b { font-family: var(--display); font-weight: 700; font-size: 15px; }

.meter { display: block; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--c, #a78bfa) 14%, rgba(255, 255, 255, .04)); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--c, #a78bfa) 85%, black), var(--c, #a78bfa)); animation: widen 1s var(--ease) both; transform-origin: left; }

/* boş durum */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 34px 18px; color: var(--muted); }
.empty > .ic { width: 34px; height: 34px; color: #a78bfa; opacity: .85; margin-bottom: 4px; }
.empty b { color: var(--text); font-size: 14.5px; font-weight: 600; }
.empty p { max-width: 340px; font-size: 13px; }
.empty .btn { margin-top: 8px; }
.empty.mini { padding: 30px 10px; }

/* ---------- gelir & gider ---------- */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.strip-i {
  padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018));
}
.strip-i small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.strip-i small .ic { width: 15px; height: 15px; }
.strip-i { container-type: inline-size; }
.strip-i b { display: block; font-family: var(--display); font-size: calc(clamp(15px, 12.5cqi, 25px) * var(--fit, 1)); font-weight: 700; letter-spacing: -.03em; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-r { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 420px; }
.search > .ic { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input[type=search] { height: 38px; padding-left: 40px; border-radius: 12px; }
.list-card { padding: 8px; }
.day + .day { margin-top: 4px; }
.day-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 12px 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.day-h > span:last-child { font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; flex: none; }
.day-h em { white-space: nowrap; font-style: normal; text-transform: none; letter-spacing: 0; font-size: 11px; padding: 2px 7px; border-radius: 99px; margin-left: 6px; }
.day-h em.plan { background: rgba(139, 92, 246, .16); color: #c4b5fd; }
.day-h em.now { background: rgba(32, 163, 154, .16); color: var(--pos); }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; border-radius: 14px; cursor: pointer;
  transition: background .15s;
}
.row:hover { background: rgba(255, 255, 255, .045); }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-main small { display: flex; align-items: center; min-width: 0; }
.row-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small .ic { display: inline-block; vertical-align: -2px; width: 13px; height: 13px; opacity: .7; margin-right: 3px; }
.sep { opacity: .5; margin: 0 4px; }
.tag { flex: none; margin-left: 8px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .07); color: var(--text2); letter-spacing: .02em; }
.row-amt { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.is-future { opacity: .58; }
.row.is-future:hover { opacity: .9; }
.note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.note .ic { width: 15px; height: 15px; color: #a78bfa; flex: none; margin-top: 2px; }
.note em { font-style: normal; color: #c4b5fd; }

/* ---------- sabitler ---------- */
.fixed-hero { padding: 24px; margin-bottom: 26px; overflow: hidden; }
.fixed-hero::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(139, 92, 246, .22), transparent 70%); pointer-events: none; }
.fh-top { display: flex; align-items: flex-end; gap: 18px 26px; flex-wrap: wrap; margin-bottom: 20px; }
.fh-i small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.fh-i b { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.fh-op { font-family: var(--display); font-size: 24px; color: var(--dim); padding-bottom: 2px; }
.fh-free b { font-size: clamp(28px, 3.2vw, 42px); }
.stack { display: flex; gap: 2px; height: 14px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .05); animation: reveal 1.1s var(--ease) both; }
.stack i { display: block; height: 100%; min-width: 3px; }
@keyframes reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.stack-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.stack-legend span { display: inline-flex; align-items: center; gap: 7px; }
.stack-legend b { color: var(--text); font-weight: 700; }
.stack-legend em { font-style: normal; color: var(--muted); }
.fh-ended { display: inline-block; margin-top: 14px; position: relative; z-index: 1; }

.sec { margin-bottom: 30px; }
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.sec-h h2 { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.sec-h p { color: var(--muted); font-size: 13px; }
.sec-meta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.sec-meta > span { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.sec-meta small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.sec-meta b { font-family: var(--display); font-weight: 700; font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 14px; }
.item {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 5px;
  padding: 18px; border-radius: 20px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .016));
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.item::after { content: ""; position: absolute; width: 150px; height: 150px; right: -60px; top: -70px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c, #a78bfa) 36%, transparent), transparent 70%); opacity: .7; pointer-events: none; transition: opacity .3s; }
.item:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c, #a78bfa) 45%, transparent); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--c, #a78bfa) 60%, transparent); }
.item:hover::after { opacity: 1; }
.item.off { opacity: .5; }
.item.off:hover { opacity: .85; }
.item-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; position: relative; z-index: 1; }
.mono {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, black));
  box-shadow: 0 8px 20px -8px var(--c);
}
.mono .ic { width: 19px; height: 19px; }
.item-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-bank { color: var(--muted); font-size: 12px; margin-top: -4px; }
.item-amt { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -.03em; }
.item-amt small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 3px; letter-spacing: 0; }
.item-sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 4px; }
.item-sub .ic { width: 13px; height: 13px; }
.item .meter { margin: 6px 0 4px; }
.loan-meta { display: flex; justify-content: space-between; gap: 10px; }
.loan-meta span { display: flex; flex-direction: column; }
.loan-meta span:last-child { text-align: right; }
.loan-meta small { font-size: 11.5px; color: var(--muted); }
.loan-meta b { font-size: 13.5px; font-weight: 700; }
.add-item { align-items: center; justify-content: center; text-align: center; min-height: 150px; border-style: dashed; border-color: var(--line2); color: var(--muted); gap: 10px; }
.add-item .ic { width: 26px; height: 26px; color: #a78bfa; }
.add-item:hover { color: var(--text); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: rgba(255, 255, 255, .06); color: var(--text2); border: 1px solid var(--line);
}
.badge .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.badge.warn { background: rgba(201, 133, 0, .13); color: var(--warn); border-color: rgba(252, 211, 77, .25); }
.badge.good { background: rgba(32, 163, 154, .13); color: var(--pos); border-color: rgba(95, 224, 200, .25); }
.badge.info { background: rgba(57, 135, 229, .14); color: #9cc6ff; border-color: rgba(57, 135, 229, .32); }

/* ---------- müşteri / tedarikçi listesi ---------- */
.party-head, .party-row {
  display: grid; align-items: center; gap: 16px;
  grid-template-columns: 42px minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(150px, 1.2fr);
}
.party-head { padding: 8px 14px 10px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.party-head span:nth-child(3), .party-head span:nth-child(4) { text-align: right; }
.party-head span:nth-child(5), .party-row .pr-bal { padding-left: 20px; }
.party-row { width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left; border-radius: 16px; cursor: pointer; transition: background .15s; }
.party-row:hover { background: rgba(255, 255, 255, .045); }
.party-row + .party-row { box-shadow: 0 -1px 0 var(--line); }
.party-row:hover, .party-row:hover + .party-row { box-shadow: none; }
.pr-main { display: flex; flex-direction: column; min-width: 0; }
.pr-main b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-main small { color: var(--muted); font-size: 12px; }
.pr-col { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.pr-col small { display: none; }
.pr-col b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pr-bal { display: flex; flex-direction: column; gap: 7px; }
.pr-bal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pr-bal-top b { font-family: var(--display); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.pr-bal .meter { height: 5px; }
.avatar {
  width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 14px; color: #fff; letter-spacing: .02em;
  background: linear-gradient(135deg, hsl(var(--h) 62% 50%), hsl(calc(var(--h) + 45) 60% 34%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -10px hsl(var(--h) 70% 50%);
}
.avatar.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 12.5px; }
.avatar.lg { width: 58px; height: 58px; border-radius: 18px; font-size: 19px; }

/* ---------- çekmece ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 60; }
.drawer-back { position: absolute; inset: 0; background: rgba(3, 3, 8, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .25s both; }
.drawer {
  position: absolute; top: 0; right: 0; height: 100%; width: min(580px, 100%); overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 50% at 100% 0%, rgba(139, 92, 246, .14), transparent 60%), linear-gradient(180deg, #12121f, #0a0a12);
  border-left: 1px solid var(--line2); box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .85);
  animation: slideIn .38s var(--ease) both;
}
.drawer-wrap.closing .drawer { animation: slideOut .24s ease-in forwards; }
.drawer-wrap.closing .drawer-back { animation: fadeOut .24s forwards; }
.dr-h { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.dr-title { flex: 1; min-width: 0; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a78bfa; }
.dr-title h2 { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.dr-phone { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--text2); text-decoration: none; font-size: 13px; }
.dr-phone .ic { width: 14px; height: 14px; color: var(--muted); }
.dr-phone:hover { color: var(--text); }
.dr-note { color: var(--muted); font-size: 13px; margin-top: 4px; }
.dr-actions { display: flex; gap: 2px; }
.dr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dr-stats > div { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); min-width: 0; }
.dr-stats small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dr-stats b { display: block; font-family: var(--display); font-size: calc(clamp(16px, 2.6vw, 20px) * var(--fit, 1)); font-weight: 700; letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-stats .is-warn { background: rgba(201, 133, 0, .1); border-color: rgba(252, 211, 77, .22); }
.dr-stats .is-warn b { color: var(--warn); }
.dr-meter { display: flex; align-items: center; gap: 12px; margin: 16px 2px 18px; }
.dr-meter .meter { flex: 1; }
.dr-meter small { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.dr-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 26px; }
.dr-btns .btn { height: 46px; }
.dr-sec { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.dr-sec span { font-family: var(--font); font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .07); color: var(--text2); }
.timeline { display: flex; flex-direction: column; margin: 0 -8px; position: relative; }
.tl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px 8px; border: 0; background: none; text-align: left; border-radius: 14px; cursor: pointer; transition: background .15s; position: relative; }
.tl-row:hover { background: rgba(255, 255, 255, .045); }
.tl-row:not(:last-child)::after { content: ""; position: absolute; left: 25px; top: 46px; bottom: -10px; width: 1px; background: var(--line2); }
.tl-dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; position: relative; z-index: 1; }
.tl-dot .ic { width: 17px; height: 17px; }
.tl-dot.debt { background: #1d1b2e; color: #c4b5fd; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .3); }
.tl-dot.pay { background: #10241f; color: var(--pos); box-shadow: inset 0 0 0 1px rgba(95, 224, 200, .3); }
.tl-main { display: flex; flex-direction: column; min-width: 0; }
.tl-main b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-main b i { font-style: normal; color: var(--muted); font-weight: 500; }
.tl-main small { display: flex; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.tl-m { display: inline-flex; align-items: center; white-space: nowrap; max-width: 100%; overflow: hidden; }
.tl-m + .tl-m::before { content: "·"; opacity: .5; margin: 0 5px; }
.tl-main small .ic { width: 13px; height: 13px; margin-right: 4px; opacity: .75; }
.tl-amt { display: flex; flex-direction: column; align-items: flex-end; }
.tl-amt b { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-amt small { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; }
.modal-back { position: absolute; inset: 0; background: rgba(3, 3, 8, .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s both; }
.modal {
  position: relative; width: min(540px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 0% 0%, rgba(139, 92, 246, .12), transparent 60%), linear-gradient(180deg, #161627, #0d0d18);
  border: 1px solid var(--line2); border-radius: 24px;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(167, 139, 250, .07);
  animation: pop .3s var(--ease) both;
}
.modal.wide { width: min(740px, 100%); }
.modal-wrap.closing .modal { animation: popOut .18s ease-in forwards; }
.modal-wrap.closing .modal-back { animation: fadeOut .18s forwards; }
.modal-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 6px; }
.modal-h h2 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.modal-h p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.modal-h .btn { margin: -6px -8px 0 0; }
.modal-b { padding: 14px 22px 8px; overflow-y: auto; overscroll-behavior: contain; }
.modal-b:last-child { padding-bottom: 22px; }
.modal-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px 20px; }
.modal-f-r { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.modal.shake { animation: shake .4s; }
.confirm-text { color: var(--text2); font-size: 14px; }

/* form */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > .lbl { font-size: 12.5px; font-weight: 600; color: var(--text2); }
.field > label i { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 4px; }
.hint { font-size: 11.5px; color: var(--muted); }
input[type=text], input[type=password], input[type=tel], input[type=date], input[type=month], input[type=number], input[type=search], select, textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .035); color: var(--text);
  font: 500 14.5px var(--font); outline: none; color-scheme: dark;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, .2); }
input:focus, select:focus, textarea:focus { border-color: rgba(167, 139, 250, .75); box-shadow: 0 0 0 4px rgba(139, 92, 246, .2); background: rgba(255, 255, 255, .055); }
input[type=search]::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
textarea { height: auto; padding: 12px 14px; resize: vertical; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; }
option { background: #161627; color: var(--text); }
.amount-input { position: relative; }
.amount-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 16px; pointer-events: none; }
.amount-input input { padding-left: 32px; font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.seg-input { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.seg-input button {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 8px;
  border: 0; border-radius: 10px; background: none; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}
.seg-input button .ic { width: 16px; height: 16px; }
.seg-input button:hover { color: var(--text); }
.seg-input button.on { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.seg-input button.on.inc { background: rgba(32, 163, 154, .2); color: #8ff3e1; box-shadow: inset 0 0 0 1px rgba(32, 163, 154, .5); }
.seg-input button.on.exp { background: rgba(224, 100, 126, .18); color: #ffb3c2; box-shadow: inset 0 0 0 1px rgba(224, 100, 126, .45); }
.field-check { justify-content: center; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 14px; user-select: none; position: relative; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(255, 255, 255, .25); display: grid; place-items: center; transition: background .2s, border-color .2s; flex: none; }
.check-box .ic { width: 14px; height: 14px; opacity: 0; color: #fff; stroke-width: 3; transition: opacity .15s; }
.check input:checked + .check-box { background: var(--grad-btn); border-color: transparent; }
.check input:checked + .check-box .ic { opacity: 1; }
.check input:focus-visible + .check-box { outline: 2px solid #a78bfa; outline-offset: 2px; }
.form-err { display: none; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: rgba(225, 29, 72, .13); border: 1px solid rgba(253, 164, 175, .2); color: #fecdd3; font-size: 13px; font-weight: 500; }
.form-err.show { display: block; }
.live-sum, .fill-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(139, 92, 246, .08); border: 1px solid rgba(167, 139, 250, .2); }
.live-sum:empty { display: none; }
.live-sum span { display: flex; flex-direction: column; }
.live-sum small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.live-sum b { font-family: var(--display); font-weight: 700; font-size: 15px; }
.fill-hint { justify-content: space-between; font-size: 13px; color: var(--text2); }
.fill-hint b { color: var(--warn); }

/* hızlı ekle */
.qa-group + .qa-group { margin-top: 18px; }
.qa-group h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qa {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.qa .ic { width: 22px; height: 22px; color: #c4b5fd; margin-bottom: 8px; }
.qa b { font-weight: 600; font-size: 14px; }
.qa small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.qa:hover { border-color: rgba(167, 139, 250, .45); background: rgba(139, 92, 246, .09); transform: translateY(-2px); }
.qa.inc .ic { color: var(--pos); }
.qa.exp .ic { color: var(--neg); }

/* ayarlar */
.set-sec + .set-sec { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.set-sec h4 { font-family: var(--display); font-size: 15px; font-weight: 600; }
.set-sec > p { font-size: 13px; margin: 3px 0 12px; }
.set-sec h4 + .set-btns { margin-top: 12px; }
.acc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.acc-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.acc-row input[type=color] { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .035); padding: 6px; cursor: pointer; }
.acc-row input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.acc-row input[type=color]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.acc-row input[type=color]::-moz-color-swatch { border: 0; border-radius: 7px; }
.set-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* bildirim */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 14px;
  background: rgba(22, 22, 38, .94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--line2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .85); font-weight: 500; font-size: 13.5px;
  animation: toastIn .32s var(--ease) both;
}
.toast.out { animation: toastOut .25s forwards; }
.toast-ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(32, 163, 154, .2); color: var(--pos); flex: none; }
.toast-ic .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.toast.err .toast-ic { background: rgba(225, 29, 72, .2); color: var(--neg); }
.toast-btn { white-space: nowrap; flex: none; border: 0; background: rgba(255, 255, 255, .1); color: var(--text); font-weight: 700; font-size: 12.5px; padding: 6px 11px; border-radius: 9px; cursor: pointer; margin-left: 4px; }
.toast-btn:hover { background: rgba(255, 255, 255, .18); }

/* ---------- animasyonlar ---------- */
.view.enter > * { animation: rise .6s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .05s; }
.view.enter > *:nth-child(3) { animation-delay: .1s; }
.view.enter > *:nth-child(4) { animation-delay: .15s; }
.view.enter > *:nth-child(5) { animation-delay: .2s; }
.view.enter > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes slideOut { to { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.97); opacity: 0; } }
@keyframes popOut { to { transform: translateY(6px) scale(.98); opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
@keyframes toastIn { from { transform: translateY(12px) scale(.96); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(8px); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- uyarılar ve ödeme durumu ---------- */
.alerts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.alert {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid;
  text-decoration: none; font-size: 13px; color: var(--text2); transition: transform .2s var(--ease), filter .2s;
}
.alert:hover { transform: translateY(-1px); filter: brightness(1.12); }
.alert .ic { width: 17px; height: 17px; }
.alert b { color: var(--text); }
.alert.bad { background: rgba(225, 29, 72, .12); border-color: rgba(253, 164, 175, .28); }
.alert.bad .ic { color: #fda4af; }
.alert.warn { background: rgba(201, 133, 0, .12); border-color: rgba(252, 211, 77, .26); }
.alert.warn .ic { color: var(--warn); }
.tag.late { background: rgba(225, 29, 72, .18); color: #fecdd3; }
.tag.ok { background: rgba(32, 163, 154, .18); color: var(--pos); }
.row.is-late .row-amt { color: #fda4af; }
.late-t { font-style: normal; color: #fda4af; font-weight: 600; }
.when.late { color: #fda4af; }
.badge.bad { background: rgba(225, 29, 72, .14); color: #fecdd3; border-color: rgba(253, 164, 175, .32); }

/* bu ayın ödemeleri */
.chk-meter { height: 5px; margin: -4px 0 12px; }
.checklist { padding: 6px; }
.chk-row { display: flex; align-items: center; gap: 4px; border-radius: 14px; }
.chk-row + .chk-row { box-shadow: 0 -1px 0 var(--line); }
.chk {
  flex: none; width: 30px; height: 30px; margin-left: 8px; border-radius: 9px; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .26); background: transparent; display: grid; place-items: center;
  transition: background .2s, border-color .2s, transform .15s;
}
.chk .ic { width: 16px; height: 16px; stroke-width: 3; color: #fff; opacity: 0; transition: opacity .15s; }
.chk:hover { border-color: rgba(255, 255, 255, .5); }
.chk:active { transform: scale(.9); }
.chk-row.done .chk { background: var(--grad-btn); border-color: transparent; }
.chk-row.done .chk .ic { opacity: 1; }
.chk-row.late .chk { border-color: rgba(253, 164, 175, .65); }
.chk-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; background: none; text-align: left; border-radius: 12px; cursor: pointer; transition: background .15s; }
.chk-main:hover { background: rgba(255, 255, 255, .045); }
.chk-row.done .mr-main b { color: var(--text2); }

/* ticari kâr */
.profit { display: flex; flex-direction: column; gap: 8px; }
.pf-big { font-family: var(--display); font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.pf-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.pf-sub b { color: var(--text); }
.pf-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; margin-top: 4px; }
.pf-row span { display: inline-flex; align-items: center; gap: 8px; color: var(--text2); }
.pf-row b { font-variant-numeric: tabular-nums; }
.pf-note { color: var(--muted); font-size: 11.5px; margin-top: 6px; }

/* çekmece ve form ekleri */
.dr-alert { display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--text2); background: rgba(225, 29, 72, .1); border: 1px solid rgba(253, 164, 175, .25); }
.dr-alert .ic { width: 16px; height: 16px; color: #fda4af; flex: none; }
.dr-alert b { color: var(--text); }
.dr-alert.soft { background: rgba(255, 255, 255, .04); border-color: var(--line); }
.dr-alert.soft .ic { color: var(--muted); }
.due-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.occ-edit { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; }
.occ-edit .ic { width: 14px; height: 14px; }

/* ---------- giriş ekranı ve senkron ---------- */
.gate { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; overflow-y: auto; background: radial-gradient(80% 60% at 20% 0%, rgba(109, 74, 255, .28), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(8, 145, 178, .22), transparent 60%), var(--bg); }
.gate-card { width: min(420px, 100%); padding: 30px 28px 26px; border-radius: 26px; border: 1px solid var(--line2); background: linear-gradient(180deg, rgba(22, 22, 39, .92), rgba(12, 12, 22, .92)); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9); animation: pop .4s var(--ease) both; }
.gate-card .brand { padding: 0; margin-bottom: 22px; }
.gate-card h1 { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.gate-card > p { color: var(--muted); font-size: 13.5px; margin: 4px 0 20px; }
.gate-form { display: flex; flex-direction: column; gap: 14px; }
.gate-form .btn-primary { height: 48px; margin-top: 4px; font-size: 14.5px; }
.gate-foot { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.5; }
.gate-foot .link { font-size: 12px; }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.sync-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.sync-pill[data-s="ok"] i { background: #20a39a; box-shadow: 0 0 8px rgba(32, 163, 154, .8); }
.sync-pill[data-s="saving"] i { background: #c98500; animation: blink 1s infinite; }
.sync-pill[data-s="offline"] i, .sync-pill[data-s="error"] i { background: #e0647e; }
.side-foot .sync-pill { padding: 0 14px; }
@keyframes blink { 50% { opacity: .3; } }
.acct-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--text2); }
.acct-line b { color: var(--text); }

/* ---------- alt menü (mobil) ---------- */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tabbar, .fab, .mobile-head { display: none; }

@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-bal-top { flex-direction: column-reverse; align-items: flex-end; gap: 4px; }   /* "Vadesi geçti" + tutar dar sütuna yan yana sığmıyor */
  .row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .row-chart { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: row; align-items: center; gap: 24px; }
  .donut-wrap .legend-list { flex: 1; }
}
@media (max-width: 999px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -8px 14px 0; }
  .brand-mini { padding: 0; }
  .brand-mini .brand-mark { width: 34px; height: 34px; }
  .brand-mini .brand-text b { font-size: 19px; }
  .add-btn { display: none; }
  .main { padding: 16px 16px calc(170px + env(safe-area-inset-bottom)); }
  .top { flex-direction: column; align-items: stretch; margin-bottom: 18px; }
  .top-actions { flex-wrap: nowrap; }
  .period { flex: 1; min-width: 0; }
  .period .seg { flex: 1; min-width: 0; }
  .period .seg button { flex: 1; padding: 7px 0; min-width: 0; }
  .btn.sm.today-btn { width: 34px; padding: 0; margin-left: 0; font-size: 0; gap: 0; }
  .today-btn .ic { width: 16px; height: 16px; }
  .tabbar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    padding: 6px; gap: 2px; border-radius: 22px; justify-content: space-around;
    background: rgba(16, 16, 28, .84); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--line2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .85);
  }
  .tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 600; border-radius: 16px; transition: color .2s, background .2s; }
  .tab .ic { width: 21px; height: 21px; }
  .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab.on { color: var(--text); background: rgba(255, 255, 255, .08); }
  .tab.on .ic { color: #c4b5fd; }
  .fab {
    display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(94px + env(safe-area-inset-bottom)); z-index: 41;
    width: 58px; height: 58px; border-radius: 19px; border: 0; cursor: pointer; color: #fff;
    background: var(--grad-btn); box-shadow: 0 16px 40px -10px rgba(124, 58, 237, .95), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .2s var(--ease);
  }
  .fab:active { transform: scale(.92); }
  .fab .ic { width: 26px; height: 26px; stroke-width: 2.2; }
  #toasts { bottom: calc(164px + env(safe-area-inset-bottom)); }
  .row-2 { grid-template-columns: 1fr; }
  .foot { display: none; }
}
@media (max-width: 720px) {
  .party-head { display: none; }
  .party-row { grid-template-columns: 40px minmax(0, 1fr) 104px; gap: 12px; padding: 12px 10px; }
  .pr-col { display: none; }
  .party-row .pr-bal { padding-left: 0; }
  .pr-bal-top { flex-direction: column-reverse; align-items: flex-end; gap: 4px; }
  .pr-bal-top .badge { height: 20px; padding: 0 7px; font-size: 10.5px; }
  .pr-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .row-3 { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .search { order: -1; flex-basis: 100%; max-width: none; }
  .toolbar-r { margin-left: 0; }
  .donut-wrap { flex-direction: column; }
  .fh-op { display: none; }
  .fh-top { gap: 14px 22px; }
  .sec-meta { gap: 16px; flex: 1 1 auto; }
  .sec-meta > span { align-items: flex-start; }
  .sec-h .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  .qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .qa { flex-direction: row; align-items: center; gap: 10px; padding: 12px; }
  .qa .ic { margin-bottom: 0; }
  .qa small { display: none; }
  .qa-grid > .qa:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .qa-group + .qa-group { margin-top: 14px; }
  .modal-wrap { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; border-radius: 24px 24px 0 0; max-height: 92vh; max-height: 92dvh; animation: sheetUp .34s var(--ease) both; padding-bottom: env(safe-area-inset-bottom); }
  input[type=text], input[type=password], input[type=tel], input[type=date], input[type=month], input[type=number], input[type=search], select, textarea { font-size: 16px; }
  .kpi { padding: 16px; }
  .kpi-v { margin-top: 12px; }
  .kpis > .kpi.hero, .kpis > .kpi-list { grid-column: 1 / -1; }
  .kpi-h { font-size: 12.5px; gap: 8px; }
  .kpi-ic { width: 28px; height: 28px; }
  .delta { position: absolute; top: 14px; right: 14px; }
  .card { padding: 16px; }
  .grid { gap: 12px; margin-bottom: 12px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item { padding: 14px; border-radius: 18px; }
  .item-amt { font-size: 19px; }
  .dr-stats { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* telefonda üç kutuya sıradan tutarlar sığmıyor */
  .dr-stats > div:last-child { grid-column: 1 / -1; }
  .dr-stats b { font-size: calc(16px * min(1, var(--fit, 1) * 1.19)); }   /* iki sütunda yer var: 13 karaktere kadar küçültme */
  .dr-stats > div { padding: 12px 10px; }
  .drawer { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
  .banner { flex-wrap: wrap; }
  .banner p { flex-basis: calc(100% - 40px); }
  .banner .btn { margin-left: 34px; }
}
@media (max-width: 420px) {
  .party-row { grid-template-columns: 36px minmax(0, 1fr) 104px; gap: 10px; }
  .party-row .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 12.5px; }
  .form-grid { grid-template-columns: 1fr; }
  .seg button { font-size: 12.5px; }
  .kpis { gap: 10px; }
  .kpi-f { font-size: 11.5px; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .seg-input button { gap: 5px; padding: 0 4px; }
  .seg-input button .ic { display: none; }
}

@media (max-width: 400px) {
  .kpi-h { font-size: 12px; gap: 6px; }
  .kpi-ic { width: 24px; height: 24px; border-radius: 8px; }
  .kpi-ic .ic { width: 15px; height: 15px; }
  .kpi-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .blob { animation: none; }
}
@media (forced-colors: active) {
  .bar.inc, .bar.exp, .dseg { forced-color-adjust: none; }
}
.mh-r { display: inline-flex; align-items: center; gap: 4px; }
.mh-r .sync-pill { font-size: 0; gap: 0; padding: 8px; }
.spend-cats { padding: 16px; margin-bottom: 14px; }
.spend-cats h3 { margin: 0 0 12px; font-size: 15px; }
.sc-row { margin-bottom: 10px; }
.sc-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.sc-top small { opacity: .6; font-weight: 400; }
.sc-bar { height: 8px; border-radius: 6px; background: rgba(127,127,127,.15); overflow: hidden; }
.sc-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #f97316, #ef4444); }
