/* e-Arşiv Fatura — uygulama görünümü.
 *
 * Kaynak tasarım: krem zemin, koyu lacivert, sarı-yeşil degrade vurgu,
 * 24px köşeli açık kartlar, hap düğmeler, yüzen hap alt menü. Siteden
 * bağımsızdır; yazı tipi (Inter, SIL OFL) eklentinin içindedir.
 */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('font/inter-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('font/inter-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--bg: #eeeadf;
	--bg-2: #e6ddc8;
	--card: #f6f3eb;
	--card-2: #ffffff;
	--navy: #1b1e4b;
	--ink: #1b1e4b;
	--muted: #7c7d8e;
	--line: #e6e0d2;
	--chip: #ebe5d6;
	--green: #1f9d5c;
	--green-bar: #45c37e;
	--lime: #e4ee6c;
	--mint: #a7e8c9;
	--ok: #1f9d5c; --ok-soft: #dcf3e5;
	--warn: #a86a09; --warn-soft: #f6ead0;
	--bad: #c0392b; --bad-soft: #f8e1dd;
	--info-soft: #e8e8f6;
	--r-card: 24px;
	--r-in: 16px;
	--pill: 9999px;
	--shadow-nav: 0 10px 30px rgba(27, 30, 75, .12), 0 2px 6px rgba(27, 30, 75, .06);
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
	--tabbar-h: 64px;
	--side-w: 256px;
	--f: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
	background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 55%, var(--bg-2) 100%) fixed;
	color: var(--ink);
	font: 500 15px/1.45 var(--f);
	letter-spacing: -.005em;
	-webkit-font-smoothing: antialiased;
	overscroll-behavior-y: none;
	overflow-anchor: none;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 12px; margin-top: 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------- Yerleşim */
.app { min-height: 100vh; }
.view { padding: calc(14px + var(--safe-top)) 20px calc(var(--tabbar-h) + var(--safe-bottom) + 40px); max-width: 560px; margin: 0 auto; outline: none; }
/* Ana sayfanın üstündeki sarı-yeşil ışıma */
.glow { position: fixed; left: -20%; right: -20%; top: -120px; height: 520px; z-index: -1; pointer-events: none;
	background: radial-gradient(60% 55% at 45% 40%, rgba(228, 238, 108, .95), rgba(214, 236, 120, .55) 45%, rgba(167, 232, 201, .45) 70%, transparent 88%); filter: blur(10px); }

/* Sayfa başlığı: geri · başlık · daha fazla */
.phead { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 8px; margin: 2px 0 20px; }
.phead h1 { margin: 0; text-align: center; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.circ { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 0; color: var(--navy); cursor: pointer; }
.circ svg { width: 20px; height: 20px; }
.circ.ghost { visibility: hidden; }

/* Karşılama satırı */
.greet { display: flex; align-items: center; gap: 12px; margin: 6px 0 22px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none;
	background: var(--navy); color: #fff; font-weight: 700; font-size: 17px; box-shadow: 0 0 0 3px rgba(255,255,255,.55); }
.greet small { display: block; color: #4d4f6b; font-size: 14px; font-weight: 500; }
.greet > span:nth-child(2) { min-width: 0; }
.greet b { display: block; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.greet .acct-chip { margin-left: auto; }

/* ----------------------------------------------------------------- Kartlar */
.card { background: var(--card); border-radius: var(--r-card); padding: 20px; margin-bottom: 16px; color: var(--ink); }
.card h2, .ctitle { font-size: 16px; font-weight: 600; margin: 0 0 12px; letter-spacing: -.01em; }
.chead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.chead h2 { margin: 0; }
.see { color: var(--muted); font-size: 14px; font-weight: 500; }
.sec-h { display: flex; justify-content: space-between; align-items: center; margin: 22px 2px 12px; }
.sec-h h2 { margin: 0; font-size: 18px; font-weight: 600; }
.group-h { font-size: 13px; font-weight: 600; color: var(--muted); margin: 20px 4px 10px; }
.hello { font-size: 20px; font-weight: 700; margin: 0; }

/* Degrade üst kart (bakiye kartı karşılığı) */
.hero { position: relative; border-radius: var(--r-card); padding: 22px 22px 20px; margin-bottom: 6px;
	background: rgba(255, 255, 255, .34); border: 1px solid rgba(255, 255, 255, .6); }
.hero .lbl { font-size: 14px; color: #3b3d5c; }
.hero .sub { font-size: 13px; color: #4d4f6b; margin-top: 2px; }
.amt { font-size: 36px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 6px 0 2px; white-space: nowrap; }
.amt .dec { color: rgba(27, 30, 75, .32); }
.amt.md { font-size: 26px; }
.hero .actions { margin-top: 20px; }

/* Hap düğmeler */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 50px; padding: 12px 20px; border-radius: var(--pill); border: 0;
	background: var(--card-2); color: var(--navy); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.hero .btn { padding: 12px 14px; }
.btn svg { width: 19px; height: 19px; stroke-width: 2.1; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #2a2e6a; }
.btn-danger { color: var(--bad); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 13.5px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .wide { grid-column: 1 / -1; }

/* Hızlı işlemler */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.quick a { display: grid; justify-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.quick .qi { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .6); }
.quick .qi svg { width: 22px; height: 22px; }

/* Liste (son işlemler karşılığı) */
.list { background: var(--card); border-radius: var(--r-card); padding: 6px 18px; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--ink); }
.row:last-child { border-bottom: 0; }
.ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; }
.ico.c1 { background: #1b1e4b; } .ico.c2 { background: #1f9d5c; } .ico.c3 { background: #6c72f1; } .ico.c4 { background: #d9822b; } .ico.c5 { background: #c2415d; } .ico.c6 { background: #2f8fb0; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { text-align: right; flex: none; display: grid; justify-items: end; gap: 3px; }
.row .val { font-weight: 600; font-size: 15px; white-space: nowrap; }
.row .val.pos { color: var(--green); }
.row .val.q { color: var(--muted); font-weight: 500; }

/* Rozetler */
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: var(--pill); white-space: nowrap; }
.pill-test { background: #f4d35e; color: #3b2a00; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-plain { background: var(--chip); color: var(--ink); }

/* Hesap seçici */
.acct-switch { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; border: 0; background: var(--card);
	color: var(--ink); border-radius: var(--pill); padding: 8px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.acct-switch.single { cursor: default; }
.acct-switch.single .chev { display: none; }
.acct-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-chip { max-width: 42vw; flex: none; }
.chev { width: 14px; height: 14px; flex: none; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: #c9c3b3; flex: none; }
.conn.on { background: var(--green-bar); }

/* Seçici satırlar (ödeme yöntemi satırları karşılığı) */
.opt, .opt-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 2px; border: 0; border-bottom: 1px solid var(--line);
	background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.opt:last-child, .opt-row:last-child { border-bottom: 0; }
.opt .main { flex: 1; min-width: 0; }
.opt .main small { display: block; color: var(--muted); font-size: 13px; }
.opt .go { color: var(--muted); }
.opt .go svg { width: 16px; height: 16px; }

/* Anahtar-değer, kalem ve toplam satırları */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; text-align: right; font-weight: 500; word-break: break-word; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .n { font-weight: 600; }
.line .d { color: var(--muted); font-size: 13px; }
.line > div:last-child, .line > span:last-child { white-space: nowrap; }
.totals .line { padding: 7px 0; border: 0; }
.totals .grand { font-size: 19px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.doc-head h1 { font-size: 20px; margin: 0; line-height: 1.25; font-weight: 700; }

/* Filtre çipleri, arama */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 14px; padding: 0 20px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: var(--card); color: var(--ink); border-radius: var(--pill); padding: 9px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; }
.search { display: block; position: relative; margin-bottom: 14px; }
.search input { width: 100%; height: 50px; border-radius: var(--pill); border: 0; background: var(--card); padding: 0 16px 0 46px; }
.search svg { position: absolute; left: 16px; top: 14px; width: 21px; height: 21px; color: var(--muted); pointer-events: none; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.range input { width: 100%; height: 48px; border-radius: var(--r-in); border: 0; background: var(--card); padding: 0 12px; }

/* İstatistik kutuları */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: var(--r-card); padding: 18px; }
.stat b { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.warn b { color: var(--warn); }

/* Özet: ilerleme, halka, öngörü */
.bar { height: 8px; border-radius: var(--pill); background: #e6e1d4; overflow: hidden; margin: 14px 0 12px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--green-bar); transition: width .6s ease; }
.bar-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bar-foot b { display: block; font-size: 15px; }
.bar-foot small { color: var(--muted); font-size: 13px; }
.chip-s { background: var(--chip); border-radius: 10px; padding: 7px 11px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.month-sel { height: 36px; border-radius: 10px; border: 0; background: var(--chip); padding: 0 10px; font-weight: 600; font-size: 13px; }
.donut-wrap { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: center; }
.donut { position: relative; width: 128px; height: 128px; }
.donut svg { width: 128px; height: 128px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 16; }
.donut .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .c b { font-size: 14px; font-weight: 700; }
.donut .c small { color: var(--muted); font-size: 12.5px; }
.legend { display: grid; gap: 10px; font-size: 13.5px; min-width: 0; }
.legend div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.legend i { width: 9px; height: 9px; border-radius: 2px; }
.legend span { font-weight: 600; font-size: 13px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.legend small { color: var(--muted); text-align: right; white-space: nowrap; }
.insight { border-radius: var(--r-card); padding: 20px; margin-bottom: 16px; color: var(--ink);
	background: linear-gradient(115deg, var(--lime) 0%, #c9ec86 45%, var(--mint) 100%); display: flex; gap: 14px; align-items: center; }
.insight h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.insight h3 svg { width: 18px; height: 18px; color: var(--green); }
.insight p { margin: 0; font-size: 14px; color: #34365a; }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13.5px; }
.goal { display: flex; align-items: center; gap: 14px; }
.goal .gi { width: 46px; height: 46px; border-radius: 14px; background: var(--chip); display: grid; place-items: center; flex: none; }
.goal .main { flex: 1; min-width: 0; }
.goal .main b { display: block; }
.goal .main small { color: var(--muted); }
.progress-note { color: var(--muted); font-size: 13px; text-align: center; margin: 4px 0 14px; }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 38px; margin-bottom: 6px; }
.skeleton { height: 70px; border-radius: 18px; margin-bottom: 10px; background: linear-gradient(90deg, var(--card), #fbf9f4, var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.notice { border-radius: 18px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.info { background: var(--info-soft); color: var(--navy); }
.alert { background: var(--bad-soft); color: var(--bad); padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 14px; }

/* --------------------------------------------------------------- Formlar */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field select, .field textarea, .ret-row input {
	width: 100%; height: 52px; border-radius: var(--r-in); border: 1px solid transparent; background: var(--card-2); padding: 0 16px; font-size: 16px; color: var(--ink); }
.field textarea { height: auto; min-height: 76px; padding: 12px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus, .range input:focus, .ret-row input:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--navy); }
.hint { font-size: 13px; color: var(--muted); margin: -6px 0 12px; }
.hint:empty { display: none; }
.hint.warn { color: var(--warn); }
.linkbtn { background: none; border: 0; color: var(--navy); font-weight: 600; padding: 6px 0; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.danger { color: var(--bad); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.inline .btn { flex: none; min-height: 52px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.three { display: grid; grid-template-columns: 1fr 1.2fr 1.4fr; gap: 0 8px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--card-2); border-radius: var(--pill); padding: 4px; }
.seg button { min-height: 42px; border-radius: var(--pill); border: 0; background: transparent; font-weight: 600; cursor: pointer; color: var(--ink); }
.seg button.on { background: var(--navy); color: #fff; }
.seg button:disabled { opacity: .35; }
[data-chips="withholding_rate"] { grid-template-columns: repeat(5, 1fr); }
[data-chips="vat_withholding_rate"] { grid-template-columns: repeat(3, 1fr); border-radius: 18px; }
details { margin: 4px 0 8px; }
details:not(.nav-grp) summary { cursor: pointer; color: var(--navy); font-weight: 600; font-size: 14px; padding: 6px 0 10px; list-style: none; }
details:not(.nav-grp) summary::-webkit-details-marker { display: none; }
details:not(.nav-grp) summary::before { content: "+ "; }
details[open]:not(.nav-grp) summary::before { content: "− "; }
.cur-row { grid-template-columns: .75fr 1.5fr; }
.ret-row { grid-template-columns: 1.45fr 1fr; }
.ret-row input { height: 48px; margin-bottom: 8px; }

/* Sihirbaz */
.wiz-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.wiz-steps span { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); padding: 9px 10px; border-radius: var(--pill); background: var(--card); }
.wiz-steps b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--ink); font-size: 12px; flex: none; }
.wiz-steps .on { color: var(--ink); font-weight: 600; }
.wiz-steps .on b { background: var(--navy); color: #fff; }
.wiz-steps .done b { background: var(--ok-soft); color: var(--ok); }
.line-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.line-total { text-align: right; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px; font-size: 14px; }
.line-total b { font-size: 16px; }
.wiz-foot { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 26px); z-index: 5; margin-top: 8px; }
.sum-bar { display: flex; align-items: center; gap: 8px; background: var(--card-2); box-shadow: var(--shadow-nav); border-radius: var(--pill); padding: 8px 8px 8px 20px; }
.sum-bar > div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sum-bar b { font-size: 18px; }
.sum-bar .btn { min-height: 44px; }
.choose { display: flex; align-items: center; gap: 14px; }
.choose .ico { width: 52px; height: 52px; }
.choose b { font-size: 16px; }
.edit-band { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.done-box { text-align: center; padding: 24px 8px 8px; }
.done-ico { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-size: 38px; font-weight: 700; background: var(--ok-soft); color: var(--ok); }
.done-box h1 { font-size: 22px; margin: 0 0 4px; }
.done-sum { font-size: 32px; font-weight: 700; margin: 10px 0 18px; letter-spacing: -.02em; }
.net-helper summary { font-size: 13px; padding-top: 0; }

/* Yönetim */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -20px 16px; padding: 0 20px 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 10px 16px; border-radius: var(--pill); background: var(--card); font-size: 14px; font-weight: 600; }
.tabs a.on { background: var(--navy); color: #fff; }
.acard .top { display: flex; align-items: center; gap: 12px; }
.acard .top .main { flex: 1; min-width: 0; }
.acard .top b { display: block; }
.acard .meta { color: var(--muted); font-size: 13px; }
.acard .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .main { flex: 1; min-width: 0; }
.mrow .main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .main small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow select { max-width: 132px; flex: none; height: 38px; border-radius: var(--pill); border: 0; background: var(--card-2); padding: 0 12px; font-weight: 600; }
.mrow .x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--card-2); color: var(--bad); cursor: pointer; font-size: 18px; line-height: 1; }
.logrow { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.logrow:last-child { border-bottom: 0; }
.logrow .top { display: flex; justify-content: space-between; gap: 8px; }
.logrow small { color: var(--muted); display: block; }
.steps .ok { color: var(--ok); } .steps .bad { color: var(--bad); }
.ex-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.ex-row textarea { flex: 1; min-height: 60px; border-radius: var(--r-in); border: 0; background: var(--card-2); padding: 10px 14px; resize: vertical; }

/* ------------------------------------------------ Alt menü (yüzen hap) */
.tabbar {
	position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--safe-bottom)); z-index: 20;
	display: flex; align-items: center; gap: 4px; padding: 7px;
	background: #f8f5ee; border-radius: var(--pill); box-shadow: var(--shadow-nav);
}
.tabbar a { height: 50px; min-width: 50px; padding: 0 14px; border-radius: var(--pill); display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--navy); }
.tabbar a span { display: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.tabbar a.active { background: var(--navy); color: #fff; padding: 0 20px; }
.tabbar a.active span { display: inline; }
.tabbar a svg { width: 23px; height: 23px; }

/* --------------------------------------------------------------- Alt pencere */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(27, 30, 75, .35); z-index: 40; }
.sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 560px; margin: 0 auto; max-height: 92vh; overflow: auto;
	background: var(--bg); border-radius: 28px 28px 0 0; padding: 12px 20px calc(20px + var(--safe-bottom)); animation: up .22s ease-out; color: var(--ink);
}
.sheet::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 3px; background: #d6cfbe; margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 19px; }
.sheet.full { top: 0; max-height: none; max-width: none; border-radius: 0; padding: 0; display: flex; flex-direction: column; }
.sheet.full::before { display: none; }
.sheet .frame-bar { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-top)) 14px 10px; }
.sheet iframe { flex: 1; width: 100%; border: 0; background: #fff; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); z-index: 60; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 34px);
	max-width: calc(100% - 40px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: var(--pill); font-size: 14px; box-shadow: var(--shadow-nav); }
.toast.bad { background: #8e2a1f; }

/* ----------------------------------------------------------------- Giriş */
.login { min-height: 100vh; display: grid; place-content: center; padding: 24px 20px; }
.login-card { width: min(400px, calc(100vw - 40px)); background: var(--card); border-radius: 28px; padding: 30px 24px; text-align: center; }
.login-card form { text-align: left; margin-top: 20px; }
.login-logo { border-radius: 18px; }
.login-card h1 { margin: 14px 0 4px; font-size: 24px; font-weight: 700; }
.hint-box { background: var(--warn-soft); color: var(--warn); border-radius: 14px; padding: 10px 14px; font-size: 13px; text-align: left; margin: 16px 0 0; }

/* ------------------------------------------------ Masaüstü: sol menü */
.side { display: none; }
.grid2 > * { min-width: 0; }
@media (min-width: 1024px) {
	.side {
		display: flex; flex-direction: column; position: fixed; z-index: 25; top: 20px; bottom: 20px; left: 20px; width: var(--side-w);
		padding: 22px 14px 16px; overflow: auto; background: var(--card); border-radius: 28px;
	}
	.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; font-weight: 700; font-size: 17px; }
	.brand img { width: 36px; height: 36px; border-radius: 10px; }
	.side .acct-switch { background: var(--card-2); margin: 0 4px 14px; justify-content: flex-start; }
	.side-nav { display: grid; gap: 4px; align-content: start; flex: 1; }
	.nav-a, .nav-grp > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border-radius: var(--pill); font-size: 15px; font-weight: 600; cursor: pointer; color: var(--navy); }
	.nav-a svg, .nav-grp > summary > svg:first-child { width: 20px; height: 20px; flex: none; }
	.nav-a:hover, .nav-grp > summary:hover { background: var(--chip); }
	.nav-a.active { background: var(--navy); color: #fff; }
	.nav-grp > summary { list-style: none; }
	.nav-grp > summary::-webkit-details-marker { display: none; }
	.nav-chev { width: 11px !important; height: 8px !important; margin-left: auto; transition: transform .2s; }
	.nav-grp[open] > summary .nav-chev { transform: rotate(180deg); }
	.nav-grp { margin: 0; }
	.nav-sub { display: grid; gap: 1px; margin: 2px 0 2px 30px; padding: 9px 14px; border-radius: 16px; font-size: 14px; font-weight: 600; }
	.nav-sub:hover { background: var(--chip); }
	.nav-sub.active { background: var(--navy); color: #fff; }
	.nav-sub-n { font-size: 12.5px; font-weight: 500; opacity: .65; }
	.side-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 14px 12px 2px; border-top: 1px solid var(--line); color: var(--muted); }
	.side-foot a { color: var(--navy); font-weight: 600; }

	.tabbar { display: none; }
	.app { margin-left: calc(var(--side-w) + 20px); }
	.view { max-width: 1060px; padding: 34px 40px 60px; }
	.glow { left: calc(var(--side-w) + 40px); right: 0; }
	.glow.glow-full { left: -10%; right: -10%; }
	.phead .nav-only { visibility: hidden; }
	.greet .acct-chip { display: none; }
	.grid2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; }
	.grid2 > div > .sec-h:first-child { margin-top: 0; }
	.narrow { max-width: 640px; }
	.chips, .tabs { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
	.wiz-foot { bottom: 20px; }
	.toast { bottom: 28px; }
	.sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 28px; left: calc(var(--side-w) + 20px); animation: none; }
	.sheet.full { transform: none; top: 0; bottom: 0; left: 0; border-radius: 0; }
	.sheet::before { display: none; }
}
@media (max-width: 1023px) {
	.brand { display: none; }
}

/* Yönetim sayfası (/fatura/yonetim/) */
.adm .adm-view { max-width: 1000px; padding-bottom: 40px; }
.adm-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 18px; }
.adm-head img { border-radius: 12px; }
.adm-head b { display: block; font-size: 18px; }
.adm-head small { color: var(--muted); }
.adm-head .btn { margin-left: auto; }
@media (min-width: 1024px) { .adm .app, .adm .adm-view { margin-left: auto; margin-right: auto; } }

/* =====================================================================
 * MAVİ TEMA — <html data-tema="mavi">. Ekranlar ve sınıflar aynıdır; yalnız
 * görünüm ezilir. Kaynak: siyah→lacivert→mavi degrade üst alan, beyaz
 * kutucuk işlemler, beyaz sayfa üzerinde beyaz kartlar, siyah vurgular.
 * YENİ BİR BİLEŞEN EKLENİRKEN bu temada da kontrol edilmelidir.
 * ===================================================================== */
[data-tema="mavi"] {
	--bg: #f2f4f8;
	--bg-2: #eef1f7;
	--card: #ffffff;
	--card-2: #f2f4f8;
	--navy: #0b0c10;
	--ink: #0b0c10;
	--muted: #6b7280;
	--line: #eceff4;
	--chip: #eef1f6;
	--green: #16a34a;
	--green-bar: #2f6bff;
	--info-soft: #e8efff;
	--r-card: 22px;
	--shadow-nav: 0 10px 30px rgba(11, 12, 16, .14), 0 2px 6px rgba(11, 12, 16, .06);
	--mavi-ust: linear-gradient(180deg, #000 0%, #05081c 22%, #111a55 48%, #2f55d4 72%, #9fb6f0 88%, #f2f4f8 100%);
}
[data-tema="mavi"] body { background: var(--bg); }
[data-tema="mavi"] .card, [data-tema="mavi"] .list, [data-tema="mavi"] .stat { box-shadow: 0 1px 2px rgba(11, 12, 16, .04), 0 6px 20px rgba(11, 12, 16, .04); }
[data-tema="mavi"] .field input, [data-tema="mavi"] .field select, [data-tema="mavi"] .field textarea,
[data-tema="mavi"] .ret-row input, [data-tema="mavi"] .ex-row textarea, [data-tema="mavi"] .mrow select { background: #f2f4f8; }
[data-tema="mavi"] .search input, [data-tema="mavi"] .range input, [data-tema="mavi"] .chip, [data-tema="mavi"] .circ,
[data-tema="mavi"] .wiz-steps span, [data-tema="mavi"] .tabs a { background: #fff; }
[data-tema="mavi"] .btn { background: #fff; box-shadow: inset 0 0 0 1px #e3e7ee; }
[data-tema="mavi"] .btn-primary { background: var(--navy); color: #fff; box-shadow: none; }
[data-tema="mavi"] .btn-primary:hover { background: #22242c; }
[data-tema="mavi"] .card .btn:not(.btn-primary), [data-tema="mavi"] .acard .btn:not(.btn-primary) { background: #f2f4f8; box-shadow: none; }
[data-tema="mavi"] .sum-bar { background: #fff; }
[data-tema="mavi"] .avatar { background: #fff; color: var(--navy); box-shadow: none; }
[data-tema="mavi"] .insight { background: linear-gradient(120deg, #b6f0f2 0%, #7fb3f5 55%, #6d7ef0 100%); }
[data-tema="mavi"] .insight h3 svg { color: #0b0c10; }
[data-tema="mavi"] .bar { background: #e6eaf2; }
[data-tema="mavi"] .chip-s, [data-tema="mavi"] .month-sel { background: #f2f4f8; }
[data-tema="mavi"] .sheet { background: #f2f4f8; }
[data-tema="mavi"] .tabbar { background: #fff; }

/* Ana sayfa: koyu degrade üst alan */
[data-tema="mavi"] .glow { position: absolute; left: 0; right: 0; top: 0; height: 620px; filter: none; background: var(--mavi-ust); }
[data-tema="mavi"] .greet small, [data-tema="mavi"] .greet b { color: #fff; }
[data-tema="mavi"] .greet small { opacity: .7; }
[data-tema="mavi"] .greet .circ { background: rgba(255, 255, 255, .12); color: #fff; }
[data-tema="mavi"] .hero { background: none; border: 0; padding: 8px 2px 4px; }
[data-tema="mavi"] .hero .lbl, [data-tema="mavi"] .hero .sub { color: rgba(255, 255, 255, .72); }
[data-tema="mavi"] .hero .amt { color: #fff; font-size: 42px; font-weight: 600; letter-spacing: -.03em; }
[data-tema="mavi"] .hero .amt .dec { color: rgba(255, 255, 255, .45); }
[data-tema="mavi"] .hero .btn { background: #fff; color: #0b0c10; box-shadow: none; }
[data-tema="mavi"] .hero .btn:not(.btn-primary) { background: rgba(255, 255, 255, .14); color: #fff; }
[data-tema="mavi"] .qa-h h2 { color: #fff; }
/* Hızlı işlemler: beyaz kutucuk, sol üstte siyah simge, altta büyük harf etiket */
[data-tema="mavi"] .quick { gap: 6px; }
[data-tema="mavi"] .quick a { justify-items: start; align-content: space-between; min-height: 96px; padding: 12px; border-radius: 14px; background: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
[data-tema="mavi"] .quick .qi { width: 26px; height: 26px; border-radius: 6px; background: #0b0c10; color: #fff; }
[data-tema="mavi"] .quick .qi svg { width: 15px; height: 15px; stroke-width: 2.2; }
/* Son belgeler: beyaz yaprak */
[data-tema="mavi"] .home-recent { background: #fff; border-radius: 26px 26px 22px 22px; padding: 4px 18px 8px; margin-top: 18px; box-shadow: 0 -8px 30px rgba(11, 12, 16, .08); }
[data-tema="mavi"] .home-recent .sec-h { margin: 18px 0 4px; }
[data-tema="mavi"] .home-recent .list { box-shadow: none; padding: 0; background: none; }
[data-tema="mavi"] .row .ico { width: 42px; height: 42px; border-radius: 12px; }
[data-tema="mavi"] .row .val.pos { color: var(--green); }

/* Giriş: tam ekran açık camgöbeği → mor → siyah degrade, içerik altta */
[data-tema="mavi"] .glow.glow-full { display: none; }
[data-tema="mavi"] .login { align-content: end; padding-bottom: calc(28px + var(--safe-bottom));
	background: linear-gradient(180deg, #b9f3f0 0%, #8fd3ee 14%, #6f8fe6 34%, #4b3fb8 52%, #1a1747 70%, #07070f 88%, #000 100%); }
[data-tema="mavi"] .login-card { background: none; color: #fff; padding: 0 4px; text-align: left; }
[data-tema="mavi"] .login-logo { width: 52px; height: 52px; }
[data-tema="mavi"] .login-card h1 { font-size: 30px; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.05; }
[data-tema="mavi"] .login-card .muted { color: rgba(255, 255, 255, .78); }
[data-tema="mavi"] .login .field > span { color: rgba(255, 255, 255, .7); }
[data-tema="mavi"] .login .field input { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
[data-tema="mavi"] .login .field input:focus { outline-color: #fff; }
[data-tema="mavi"] .login .check { color: #fff; }
[data-tema="mavi"] .login .check input { accent-color: #fff; }
[data-tema="mavi"] .login .btn-primary { background: #fff; color: #0b0c10; }
[data-tema="mavi"] .login .hint-box { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); }
[data-tema="mavi"] .login .fine { color: rgba(255, 255, 255, .55); }
[data-tema="mavi"] .login .alert { background: rgba(238, 90, 79, .18); color: #ffd9d4; }

/* Masaüstü */
@media (min-width: 1024px) {
	[data-tema="mavi"] .side { background: #fff; box-shadow: 0 6px 24px rgba(11, 12, 16, .06); }
	[data-tema="mavi"] .side .acct-switch { background: #f2f4f8; }
	[data-tema="mavi"] .glow { left: calc(var(--side-w) + 40px); right: 20px; top: 20px; height: 560px; border-radius: 28px; }
	[data-tema="mavi"] .view { padding-top: 54px; }
	[data-tema="mavi"] .home-recent { margin-top: 0; }
	[data-tema="mavi"] .login { align-content: center; }
	[data-tema="mavi"] .login-card { max-width: 420px; }
}

/* Yönetim: tema seçici */
.theme-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-pick button { border: 2px solid transparent; background: var(--card-2); border-radius: 18px; padding: 10px; cursor: pointer; text-align: left; font-weight: 600; color: var(--ink); }
.theme-pick button.on { border-color: var(--navy); }
.theme-pick .sw { display: block; height: 86px; border-radius: 12px; margin-bottom: 8px; }
.theme-pick .sw-krem { background: radial-gradient(70% 70% at 40% 30%, #e4ee6c, #c9ec86 45%, #a7e8c9 70%, #eeeadf 95%); }
.theme-pick .sw-mavi { background: linear-gradient(180deg, #000 0%, #111a55 45%, #2f55d4 75%, #f2f4f8 100%); }
[data-tema="mavi"] .chip.on, [data-tema="mavi"] .tabs a.on { background: var(--navy); color: #fff; }
