/* Cucik paneli: mobil öncelikli, uygulama hissi veren arayüz. Satır içi stil yok (CSP: style-src 'self'). */
:root {
	--ink: #0b1230; --muted: #56607e; --bg: #f3f5fb; --card: #ffffff; --line: #dde3f0;
	--line-strong: #8a94ad; --danger-solid: #b3261e;
	--accent: #1f5eff; --accent-ink: #ffffff; --danger: #b3261e; --ok: #0b6b3a; --warn: #7a4f00; --info: #1a3fa8;
	--ok-bg: #def3e8; --warn-bg: #fff0d9; --info-bg: #e2eaff; --bad-bg: #fde5e3;
	--r: 16px; --tap: 48px; --shadow: 0 1px 2px rgba(11, 18, 48, 0.06), 0 8px 24px rgba(11, 18, 48, 0.06);
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.panel--admin { --accent: #5b3fd6; }
@media (prefers-color-scheme: dark) {
	:root { --ink: #e9edf9; --muted: #a9b3d0; --bg: #0a0f1f; --card: #131a30; --line: #27304d; --line-strong: #6d7ba3; --accent-ink: #0a0f1f;
		--ok: #7fe0ac; --warn: #ffd48a; --info: #b9cdff; --danger: #ffb4ad; --ok-bg: #123524; --warn-bg: #3a2a0a; --info-bg: #18284f; --bad-bg: #431816; --shadow: none; }
	.panel--store { --accent: #86a8ff; }
	.panel--admin { --accent: #a99bff; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--font); -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1[tabindex="-1"]:focus, main[tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.75rem 1rem; background: var(--ink); color: var(--bg); border-radius: 8px; }
.skip:focus { top: 0.75rem; }
.muted { color: var(--muted); font-size: 0.9375rem; }

/* Üst çubuk */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 3.5rem; padding: 0.4rem 1rem; padding-top: calc(0.4rem + env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); }
.brand, .auth__brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; background: linear-gradient(135deg, #1f5eff, #6b4eff); color: #fff; font-weight: 800; }
.brand__role { padding: 0.12rem 0.6rem; border-radius: 999px; background: var(--bg); color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0; }
.topbar__right { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--muted); }
.topbar__link { display: none; color: var(--muted); }
.topbar__user { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* İskelet */
.shell { display: block; }
.content { min-width: 0; padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); max-width: 72rem; }
.content__title { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); margin-bottom: 1rem; }
.sidebar { display: none; }

/* Alt gezinme (mobil) */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 0.25rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.bnav__item { position: relative; display: grid; justify-items: center; align-content: center; gap: 0.1rem; min-height: 3.5rem; padding: 0.25rem; border-radius: 12px; color: var(--muted); font-size: 0.6875rem; font-weight: 600; text-decoration: none; }
.bnav__item[aria-current="page"] { color: var(--accent); }
.bnav__item svg, .nav__item svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.count { position: absolute; top: 0.15rem; right: calc(50% - 1.5rem); min-width: 1.1rem; height: 1.1rem; padding: 0 0.3rem; display: grid; place-items: center; border-radius: 999px; background: var(--danger-solid); color: #fff; font-size: 0.6875rem; font-weight: 800; }
.nav__item .count { position: static; margin-left: auto; }
.nav__item { display: flex; align-items: center; gap: 0.75rem; min-height: var(--tap); padding: 0 0.9rem; border-radius: 12px; color: var(--ink); font-weight: 600; text-decoration: none; }
.nav__item:hover { background: var(--bg); }
.nav__item[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.sheet { display: none; position: fixed; inset: 0; z-index: 60; }
.sheet:target { display: block; }
.sheet__bg { position: absolute; inset: 0; background: rgba(8, 12, 30, 0.55); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 85vh; overflow-y: auto; display: grid; gap: 0.5rem; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: var(--card); border-radius: 24px 24px 0 0; }
.sheet__nav { display: grid; gap: 0.15rem; }

/* Bileşenler */
.flash { margin: 0 0 1rem; padding: 0.8rem 1rem; border-radius: 12px; font-weight: 600; }
.flash--ok { background: var(--ok-bg); color: var(--ok); }
.flash--error { background: var(--bad-bg); color: var(--danger); }
.notice { padding: 0.8rem 1rem; border-radius: 12px; background: var(--info-bg); color: var(--info); }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.kpi { display: grid; gap: 0.15rem; padding: 0.9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.kpi__label { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.kpi__value { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.kpi__note { color: var(--muted); font-size: 0.75rem; }
.card { margin: 0 0 1rem; padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card__title { font-size: 1.0625rem; }
.rows { display: grid; gap: 0.75rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.row { display: grid; gap: 0.5rem; padding: 0.9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.row__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 0.75rem; }
.row__title { font-weight: 700; overflow-wrap: anywhere; }
.row__meta { color: var(--muted); font-size: 0.875rem; }
.row__body { font-size: 0.9375rem; }
.row__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; width: 100%; }
.inline-form .field__input { flex: 1 1 10rem; min-width: 0; }
.row__actions details { width: 100%; }
.row__actions summary { cursor: pointer; color: var(--accent); font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.badge { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; background: var(--info-bg); color: var(--info); }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--bad { background: var(--bad-bg); color: var(--danger); }
.empty { padding: 1.5rem 1rem; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: var(--tap); padding: 0 1.1rem; border: 1px solid transparent; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn--danger { background: var(--card); color: var(--danger); border-color: var(--danger); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.form { display: grid; gap: 0.9rem; }
.field { display: grid; gap: 0.3rem; }
.field__label { font-weight: 600; font-size: 0.9375rem; }
.field__hint { color: var(--muted); font-size: 0.8125rem; }
.field__input { width: 100%; min-height: var(--tap); padding: 0.6rem 0.9rem; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; }
textarea.field__input { min-height: 6rem; }
.field__input:focus { border-color: var(--accent); }
.field__row { display: flex; gap: 0.25rem; align-items: center; }
.field__toggle { min-width: 5rem; }
.field__input--otp { text-align: center; font-size: 1.6rem; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; align-items: end; }
.bars__col { display: grid; justify-items: center; gap: 0.25rem; font-size: 0.6875rem; color: var(--muted); }
.bars__track { display: flex; align-items: flex-end; width: 100%; height: 6rem; background: var(--bg); border-radius: 8px; overflow: hidden; }
.bars__fill { width: 100%; background: linear-gradient(180deg, #6b4eff, #1f5eff); min-height: 2px; }
.dl { display: grid; gap: 0.35rem; margin: 0; }
.dl div { display: flex; justify-content: space-between; gap: 1rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Giriş ekranları */
.guest { display: grid; place-items: start center; }
.auth { width: 100%; max-width: 26rem; padding: calc(1.5rem + env(safe-area-inset-top)) 1rem calc(1.5rem + env(safe-area-inset-bottom)); }
.auth__brand { margin-bottom: 1.25rem; }
.auth__card { padding: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.auth__title { font-size: 1.5rem; }
.auth__lead { color: var(--muted); margin: 0 0 1.25rem; }
.auth__links, .auth__foot { margin: 1rem 0 0; text-align: center; font-size: 0.9375rem; }
.steps { display: grid; gap: 1rem; margin: 0 0 1.25rem; padding-left: 1.25rem; }
.steps li { padding-left: 0.25rem; }
.qr { display: grid; place-items: center; margin: 0.75rem auto; width: 13rem; height: 13rem; padding: 0.75rem; background: #fff; border-radius: 12px; }
.qr svg { width: 100%; height: 100%; }
.qr:empty { display: none; }
.secret { display: flex; align-items: center; gap: 0.25rem; padding: 0.5rem 0.75rem; background: var(--bg); border-radius: 12px; }
.secret__value { flex: 1; font-size: 0.95rem; letter-spacing: 0.08em; overflow-wrap: anywhere; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 1rem 0; padding: 0; list-style: none; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.codes li { padding: 0.6rem; text-align: center; font-weight: 700; letter-spacing: 0.06em; background: var(--bg); border-radius: 10px; }

/* Geniş ekran: kenar çubuğu, alt gezinme kalkar */
@media (min-width: 48em) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .topbar__link { display: inline; } }
@media (min-width: 60em) {
	.shell { display: grid; grid-template-columns: 16rem minmax(0, 1fr); align-items: start; }
	.sidebar { position: sticky; top: 3.5rem; display: flex; flex-direction: column; justify-content: space-between; height: calc(100vh - 3.5rem); padding: 1rem; background: var(--card); border-right: 1px solid var(--line); }
	.sidebar__nav { display: grid; gap: 0.15rem; }
	.content { padding: 1.5rem 2rem 3rem; }
	.bnav, .sheet { display: none !important; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .nav__item { transition: background-color 0.15s; } }

/* Grafik sütun yükseklikleri: satır içi stil yerine sınıf (CSP) */
.pct-0 { height: 0%; }
.pct-1 { height: 5%; }
.pct-2 { height: 10%; }
.pct-3 { height: 15%; }
.pct-4 { height: 20%; }
.pct-5 { height: 25%; }
.pct-6 { height: 30%; }
.pct-7 { height: 35%; }
.pct-8 { height: 40%; }
.pct-9 { height: 45%; }
.pct-10 { height: 50%; }
.pct-11 { height: 55%; }
.pct-12 { height: 60%; }
.pct-13 { height: 65%; }
.pct-14 { height: 70%; }
.pct-15 { height: 75%; }
.pct-16 { height: 80%; }
.pct-17 { height: 85%; }
.pct-18 { height: 90%; }
.pct-19 { height: 95%; }
.pct-20 { height: 100%; }

/* Paneller arası bağlantılar */
.topbar__right { flex-wrap: wrap; justify-content: flex-end; }
.topbar__link { min-height: 2.5rem; align-items: center; padding: 0 0.5rem; text-decoration: none; font-weight: 600; }
.topbar__link:hover { text-decoration: underline; }
.sheet__nav--more { padding-top: 0.5rem; border-top: 1px solid var(--line); }
.auth__other { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; margin: 0.25rem 0 0; font-size: 0.9375rem; }
.auth__other a { display: inline-flex; align-items: center; min-height: var(--tap); }
@media (min-width: 48em) { .topbar__link { display: inline-flex; } }
