/* ==========================================================================
   SPAMBIL — Uygulama kabuğu (müşteri paneli + yönetim)
   style.css üzerine gelir; token'ları oradan alır.
   ========================================================================== */
/* Halka dolumu için kayıtlı özellik. Genel amaçlı --p'yi kaydetmiyoruz: --p her yerde
   0–100 arası bir SAYIDIR (yüzde işareti yok); barlar calc(var(--p) * 1%) ile genişler. */
@property --ring-p { syntax: "<number>"; inherits: false; initial-value: 0; }

body.app-body { background: var(--bg); overflow-x: hidden; }
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100dvh; }

/* ------------------------------------------------------------- Sol ray */
.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 16px; background: var(--surface); border-right: 1px solid var(--line); z-index: 60; }
.rail .brand { padding: 6px 10px 16px; font-size: 1.15rem; }
.rail .brand small { font-family: var(--font-body); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-left: 6px; }
.rail-nav { display: grid; gap: 4px; }
.rail-nav a, .rail-nav button { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: 0.92rem; color: var(--text-2); text-align: left; width: 100%; transition: background var(--dur-1), color var(--dur-1), transform var(--dur-2) var(--ease-out); }
.rail-nav a:hover, .rail-nav button:hover { background: var(--surface-2); color: var(--text); }
.rail-nav .is-active { background: var(--flame-50); color: var(--text); }
.rail-nav .is-active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--flame); animation: railIn 0.35s var(--ease-spring); }
@keyframes railIn { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.rail-nav .ic { width: 20px; height: 20px; flex: none; color: var(--text-3); transition: color var(--dur-1), transform var(--dur-2) var(--ease-spring); }
.rail-nav .is-active .ic, .rail-nav a:hover .ic, .rail-nav button:hover .ic { color: var(--flame); }
.rail-nav .is-active .ic { transform: scale(1.08); }
.rail-nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 800; background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
.rail-nav .count.hot { background: var(--bad-soft); color: var(--bad); }
.rail-section { padding: 14px 12px 6px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.rail-foot { margin-top: auto; display: grid; gap: 8px; }
.rail-tip { padding: 12px 14px; border-radius: 14px; background: var(--ink-800); color: #c7cfe0; font-size: 0.78rem; line-height: 1.5; }
.rail-tip b { color: #fff; display: block; margin-bottom: 2px; }
.rail-tip .kbd { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: #fff; }
.rail-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); }
.rail-user .who { min-width: 0; flex: 1; }
.rail-user .who b { display: block; font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-user .who span { display: block; font-size: 0.72rem; color: var(--text-3); }
.rail-user button { color: var(--text-3); padding: 6px; border-radius: 8px; }
.rail-user button:hover { color: var(--bad); background: var(--bad-soft); }
.rail-user button svg { width: 18px; height: 18px; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; color: #fff; background: linear-gradient(135deg, var(--ink-600), var(--ink-800)); border: 2px solid var(--flame); }

/* ------------------------------------------------------------- Üst çubuk */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 12px clamp(16px, 3vw, 36px); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .grow { flex: 1; }
.topbar .sep { width: 1px; height: 22px; background: var(--line); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--text-2); background: transparent; border: 1px solid transparent; transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1); position: relative; }
.icon-btn:hover { background: var(--surface); color: var(--text); border-color: var(--line); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .badge-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--flame); border: 2px solid var(--bg); }
.theme-btn .sun, .theme-btn .moon { position: absolute; transition: transform var(--dur-3) var(--ease-spring), opacity var(--dur-2); }
html[data-resolved="dark"] .theme-btn .moon, html:not([data-resolved="dark"]) .theme-btn .sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.cmd-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); font-size: 0.84rem; min-width: 200px; transition: border-color var(--dur-1), color var(--dur-1); }
.cmd-btn:hover { border-color: var(--line-strong); color: var(--text-2); }
.cmd-btn svg { width: 16px; height: 16px; }
.cmd-btn .kbd { margin-left: auto; }
@media (max-width: 1100px) { .cmd-btn { min-width: 0; } .cmd-btn span:not(.kbd) { display: none; } }

/* Domain seçici */
.dom-switch { position: relative; }
.dom-switch-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 0.9rem; color: var(--text); max-width: 100%; transition: border-color var(--dur-1), box-shadow var(--dur-2); }
.dom-switch-btn:hover { border-color: var(--line-strong); }
.dom-switch-btn[aria-expanded="true"] { box-shadow: 0 0 0 4px var(--focus); border-color: var(--flame); }
.dom-switch-btn .dom { font-family: var(--font-mono); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.dom-switch-btn .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dom-switch-btn .chev { width: 16px; height: 16px; color: var(--text-3); transition: transform var(--dur-2) var(--ease-out); }
.dom-switch-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dom-switch-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; min-width: min(340px, 90vw); padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); display: none; }
.dom-switch-menu.is-open { display: block; animation: dialogIn 0.3s var(--ease-spring); }
.dom-switch-menu .item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; font-size: 0.9rem; color: var(--text); transition: background var(--dur-1); }
.dom-switch-menu .item:hover { background: var(--surface-2); }
.dom-switch-menu .item.is-on { background: var(--flame-50); }
.dom-switch-menu .item .dom { font-family: var(--font-mono); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dom-switch-menu .item .badge { font-size: 0.68rem; padding: 3px 8px; }
.dom-switch-menu .add { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 10px 12px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; color: var(--flame-600); font-weight: 700; font-size: 0.88rem; }
.dom-switch-menu .add:hover { background: var(--flame-50); }
.dom-switch-menu .add svg { width: 18px; height: 18px; }
.dot-trial { background: var(--warn); } .dot-active { background: var(--good); } .dot-past_due { background: var(--bad); } .dot-cancelled { background: var(--text-3); } .dot-pending { background: var(--info); }

/* ------------------------------------------------------------ Ana alan */
.main { width: 100%; max-width: 1180px; padding: clamp(18px, 3vw, 34px) clamp(16px, 3vw, 36px) 80px; }
.view { display: none; }
.view.is-active { display: block; animation: viewIn 0.42s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head h1 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
.view-head p { color: var(--text-2); font-size: 0.92rem; margin-top: 4px; }
.view-head .greet { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--flame-600); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .grid-2, .grid-3, .grid-main { grid-template-columns: 1fr; } }
/* Grid çocukları içeriğe göre genişleyip yatay taşma yapmasın (özellikle mobil) */
.app > *, .grid-2 > *, .grid-3 > *, .grid-main > *, .kpis > *, .panel, .main { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.panel-pad { padding: clamp(16px, 2.5vw, 24px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { font-size: 1rem; display: inline-flex; align-items: center; gap: 10px; }
.panel-head h3 svg { width: 18px; height: 18px; color: var(--flame); }
.panel-head .sub { font-size: 0.8rem; color: var(--text-3); }
.panel-body { padding: 18px 20px; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--text-3); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------- KPI'lar */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; overflow: hidden; padding: 20px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out); }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi b { display: block; font-family: var(--font-display); font-size: clamp(1.7rem, 1.4rem + 1vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: 8px; font-size: 0.8rem; color: var(--text-2); }
.kpi .ic { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.kpi .ic svg { width: 18px; height: 18px; }
.kpi.flame { background: var(--flame); border-color: var(--flame); color: var(--on-flame); }
.kpi.flame b, .kpi.flame span { color: var(--on-flame); }
.kpi.flame .ic { background: rgba(10, 15, 28, 0.12); color: var(--on-flame); }
.kpi.dark { background: var(--ink-800); border-color: var(--ink-600); }
.kpi.dark b { color: #fff; } .kpi.dark span { color: #a9b3c9; } .kpi.dark .ic { background: rgba(255, 255, 255, 0.08); color: #fff; }
.kpi .foot { margin-top: 10px; font-size: 0.74rem; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi .foot.up { color: var(--good); } .kpi .foot.down { color: var(--bad); }

/* ------------------------------------------------------------- Halka */
.ring { --size: 64px; --ring-p: var(--p, 0); position: relative; width: var(--size); height: var(--size); border-radius: 50%; background: conic-gradient(var(--ring-c, var(--flame)) calc(var(--ring-p) * 1%), var(--surface-3) 0); display: grid; place-items: center; transition: --ring-p 1.1s var(--ease-out); flex: none; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-family: var(--font-display); font-size: calc(var(--size) * 0.22); font-weight: 800; letter-spacing: -0.02em; }
.ring.good { --ring-c: var(--good); }

/* ------------------------------------------------------------ Kontrol listesi */
.checklist { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.check { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); transition: background var(--dur-2); }
.check:first-child { border-top: 0; }
.check .mark { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: transparent; transition: background var(--dur-2), border-color var(--dur-2), color var(--dur-2); }
.check .mark svg { width: 15px; height: 15px; }
.check .mark svg path { stroke-dasharray: 30; stroke-dashoffset: 30; transition: stroke-dashoffset 0.5s var(--ease-out) 0.1s; }
.check.is-done { background: color-mix(in srgb, var(--good-soft) 40%, transparent); }
.check.is-done .mark { background: var(--good); border-color: var(--good); color: #fff; }
.check.is-done .mark svg path { stroke-dashoffset: 0; }
.check.is-doing .mark { border-color: var(--flame); border-style: dashed; animation: spin 2.4s linear infinite; }
.check.is-fail .mark { border-color: var(--bad); color: var(--bad); }
.check.is-fail .mark svg path { stroke-dashoffset: 0; }
.check b { display: block; font-size: 0.93rem; }
.check small { display: block; color: var(--text-2); font-size: 0.8rem; margin-top: 1px; }
.check .act { display: flex; gap: 6px; align-items: center; }
.check .act .btn { white-space: nowrap; }

/* ------------------------------------------------------------ Domain kartları */
.dom-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.dom-card { position: relative; display: grid; gap: 14px; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-align: left; cursor: pointer; transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), border-color var(--dur-2); overflow: hidden; }
.dom-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.dom-card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dom-card .dom { font-family: var(--font-mono); font-weight: 600; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dom-card .mid { display: flex; align-items: center; gap: 14px; }
.dom-card .mid .txt { font-size: 0.82rem; color: var(--text-2); line-height: 1.45; }
.dom-card .mid .txt b { color: var(--text); display: block; font-size: 0.9rem; }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.mini b { display: block; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini span { display: block; font-size: 0.7rem; color: var(--text-3); margin-top: 2px; }
.dom-card .arrow { position: absolute; right: 16px; bottom: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); transition: background var(--dur-2), color var(--dur-2), transform var(--dur-3) var(--ease-spring); }
.dom-card:hover .arrow { background: var(--flame); color: var(--on-flame); transform: translateX(3px); }
.dom-card .arrow svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------ Uyarılar */
.alerts { display: grid; gap: 10px; margin-bottom: 18px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 16px; border: 1px solid; font-size: 0.9rem; animation: viewIn 0.4s var(--ease-out); }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert .grow { flex: 1; }
.alert b { display: block; }
.alert span { color: var(--text-2); font-size: 0.84rem; }
.alert-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--text); } .alert-warn svg { color: var(--warn); }
.alert-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); } .alert-bad svg { color: var(--bad); }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 35%, transparent); } .alert-info svg { color: var(--info); }
.alert-good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, transparent); } .alert-good svg { color: var(--good); }

/* ------------------------------------------------------------ Araç çubuğu */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { padding: 7px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; color: var(--text-2); transition: background var(--dur-1), color var(--dur-1), box-shadow var(--dur-1); white-space: nowrap; }
.seg button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.search { position: relative; flex: 1 1 220px; }
.search .input { padding-left: 40px; padding-block: 10px; }
.search > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.toolbar .grow { flex: 1; }

/* ------------------------------------------------------------ Karantina listesi */
.qlist { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.qrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); cursor: pointer; transition: background var(--dur-1); animation: viewIn 0.35s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 30ms); }
.qrow:first-child { border-top: 0; }
.qrow:hover, .qrow.is-focus { background: var(--surface-2); }
.qrow.is-selected { background: var(--flame-50); }
.qrow.is-gone { animation: rowOut 0.35s var(--ease-in-out) forwards; }
@keyframes rowOut { to { opacity: 0; transform: translateX(30px); height: 0; padding-top: 0; padding-bottom: 0; } }
.qrow .who { min-width: 0; }
.qrow .from { font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .subj { font-size: 0.86rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .meta { font-size: 0.74rem; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.qrow .side { display: flex; align-items: center; gap: 14px; }
.qrow .acts { display: flex; gap: 6px; opacity: 0; transition: opacity var(--dur-1); }
.qrow:hover .acts, .qrow.is-focus .acts { opacity: 1; }
@media (hover: none) { .qrow .acts { opacity: 1; } }
.risk { display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.risk .bar { width: 52px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.risk .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--c, var(--text-3)); border-radius: 3px; transition: width 0.8s var(--ease-out); }
.risk.hi { color: var(--bad); --c: var(--bad); } .risk.mid { color: #b07a00; --c: var(--warn); } .risk.lo { color: var(--text-2); --c: var(--text-3); }
:root[data-theme="dark"] .risk.mid { color: #f5c452; }
.cb { position: relative; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: transparent; transition: background var(--dur-1), border-color var(--dur-1), color var(--dur-1); cursor: pointer; }
.cb svg { width: 12px; height: 12px; }
.cb.is-on, .cb:has(input:checked) { background: var(--flame); border-color: var(--flame); color: var(--on-flame); }
.cb input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.bulkbar { position: sticky; bottom: 18px; z-index: 30; display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--ink-800); color: #fff; box-shadow: var(--shadow-lg); margin-top: 14px; animation: toastIn 0.4s var(--ease-spring); flex-wrap: wrap; }
.bulkbar b { font-size: 0.88rem; margin-right: 6px; }
.bulkbar .btn { padding: 9px 14px; font-size: 0.82rem; }
.bulkbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.bulkbar .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ------------------------------------------------------------ Çekmece */
.drawer-backdrop { position: fixed; inset: 0; z-index: 200; background: var(--scrim); animation: fadeIn 0.2s; }
.drawer-backdrop.is-leaving { animation: fadeOut 0.2s forwards; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 201; width: min(100%, 580px); background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: drawerIn 0.45s var(--ease-out); border-left: 1px solid var(--line); }
.drawer.is-leaving { animation: drawerOut 0.25s var(--ease-in-out) forwards; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drawerOut { to { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 1.02rem; }
.drawer-head .nav { display: flex; gap: 4px; }
.drawer-body { flex: 1; overflow: auto; padding: 20px; display: grid; gap: 18px; align-content: start; }
.drawer-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; background: var(--surface); }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 14px; font-size: 0.9rem; }
.kv dt { color: var(--text-3); }
.kv dd { word-break: break-word; font-weight: 500; }
.kv dd.mono { font-size: 0.84rem; }
.score-meter { padding: 16px 18px; border-radius: 16px; background: var(--surface-2); }
.score-meter .between { margin-bottom: 12px; font-size: 0.84rem; }
.score-meter .between b { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.02em; }
.score-meter .bar { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--good) 0%, var(--warn) 45%, var(--bad) 100%); }
.score-meter .pin { position: absolute; top: -6px; left: calc(var(--p, 0) * 1%); width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); transform: translateX(-50%); transition: left 1s var(--ease-out); box-shadow: var(--shadow-sm); }
.score-meter .ticks { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.7rem; color: var(--text-3); font-family: var(--font-mono); }
.rules { display: grid; gap: 8px; }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 0.8rem; }
.rule .n { font-family: var(--font-mono); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule .s { font-family: var(--font-mono); color: var(--text-2); }
.rule .d { grid-column: 1 / -1; color: var(--text-3); font-size: 0.76rem; }
.rule .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.rule .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--c, var(--bad)); border-radius: 2px; transition: width 0.9s var(--ease-out); }
.raw { font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.6; padding: 14px 16px; border-radius: 12px; background: var(--ink-900); color: #c7cfe0; white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto; }
.section-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------ Listeler */
.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .lists { grid-template-columns: 1fr; } }
.listcol { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.listcol h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.listcol h3 .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.listcol h3 .ic svg { width: 16px; height: 16px; }
.listcol.good h3 .ic { background: var(--good-soft); color: var(--good); }
.listcol.bad h3 .ic { background: var(--bad-soft); color: var(--bad); }
.listcol .sub { font-size: 0.8rem; color: var(--text-3); margin: 4px 0 0 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; min-height: 34px; }
.recent { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.recent button { padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.76rem; font-family: var(--font-mono); color: var(--text-2); transition: border-color var(--dur-1), color var(--dur-1); }
.recent button:hover { border-color: var(--flame); color: var(--text); }

/* ------------------------------------------------------------ Zaman çizelgesi */
.timeline { position: relative; padding-left: 24px; display: grid; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.tl { position: relative; padding: 8px 0 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; animation: viewIn 0.4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
.tl::before { content: ""; position: absolute; left: -24px; top: 12px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--good); }
.tl.fail::before { border-color: var(--bad); }
.tl.future::before { border-color: var(--line-strong); border-style: dashed; }
.tl b { display: block; font-size: 0.92rem; }
.tl span { display: block; font-size: 0.78rem; color: var(--text-3); }
.tl .amt { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; }

/* ------------------------------------------------------------ Komut paleti */
.palette-backdrop { position: fixed; inset: 0; z-index: 300; background: var(--scrim); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; animation: fadeIn 0.15s; }
.palette-backdrop.is-leaving { animation: fadeOut 0.15s forwards; }
.palette { width: min(100%, 580px); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; animation: dialogIn 0.3s var(--ease-spring); }
.palette-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-in svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.palette-in input { flex: 1; padding: 16px 0; border: 0; background: transparent; font-size: 1.05rem; outline: none; color: var(--text); }
.palette-list { max-height: 52vh; overflow: auto; padding: 8px; }
.palette-list .group { padding: 10px 12px 4px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.palette-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; font-size: 0.92rem; color: var(--text); }
.palette-list button svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.palette-list button .kbd { margin-left: auto; }
.palette-list button.is-focus { background: var(--flame-50); }
.palette-list button.is-focus svg { color: var(--flame); }
.palette-list .none { padding: 24px; text-align: center; color: var(--text-3); font-size: 0.9rem; }
.palette-foot { display: flex; gap: 14px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 0.72rem; color: var(--text-3); }

/* ------------------------------------------------------------ Boş durum */
.empty { display: grid; place-items: center; text-align: center; padding: 44px 20px; gap: 10px; color: var(--text-2); }
.empty svg { width: 132px; height: 96px; }
.empty h3 { font-size: 1.05rem; color: var(--text); }
.empty p { font-size: 0.88rem; max-width: 34ch; }

/* ------------------------------------------------------------ Tablo (yönetim) */
.table-wrap { border: 1px solid var(--line); border-radius: 18px; overflow: auto; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 760px; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; padding: 12px 14px; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th .s { display: inline-block; margin-left: 4px; opacity: 0; transition: opacity var(--dur-1), transform var(--dur-2); }
.tbl th.is-sorted { color: var(--text); } .tbl th.is-sorted .s { opacity: 1; } .tbl th.is-sorted.desc .s { transform: rotate(180deg); }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr.row { cursor: pointer; transition: background var(--dur-1); }
.tbl tr.row:hover td { background: var(--surface-2); }
.tbl tr.row.is-open td { background: var(--flame-50); border-bottom: 0; }
.tbl tr.expand td { padding: 0; background: var(--flame-50); border-top: 0; }
.tbl .details { padding: 6px 16px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 16px; font-size: 0.82rem; animation: viewIn 0.3s var(--ease-out); }
.tbl .details div small { display: block; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
.tbl .details div b { font-weight: 600; font-family: var(--font-mono); font-size: 0.8rem; }
.tbl .mono { font-size: 0.82rem; }
.tbl .sub { display: block; font-size: 0.74rem; color: var(--text-3); }

/* ------------------------------------------------------------ Huni */
.funnel { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-3); }
.funnel i { display: block; height: 100%; width: var(--w, 0%); transition: width 1s var(--ease-out); }
.funnel-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 0.8rem; color: var(--text-2); }
.funnel-legend span { display: inline-flex; align-items: center; gap: 6px; }
.funnel-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ------------------------------------------------------------ Mobil */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; align-items: center; gap: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); }
  .rail .brand, .rail-foot, .rail-section { display: none; }
  .rail-nav { display: flex; flex: 1; justify-content: space-around; gap: 0; }
  .rail-nav a, .rail-nav button { flex-direction: column; gap: 4px; font-size: 0.64rem; padding: 6px 4px; border-radius: 10px; }
  .rail-nav .is-active::before { display: none; }
  .rail-nav .count { position: absolute; top: 2px; right: 8px; margin: 0; min-width: 16px; height: 16px; font-size: 0.6rem; padding: 0 4px; }
  .main { padding-bottom: 96px; }
  .topbar { padding-inline: 14px; }
  .cmd-btn { min-width: 0; padding: 8px 10px; }
  .cmd-btn .kbd, .cmd-btn span:not(.kbd) { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .drawer { width: 100%; }
  .qrow { grid-template-columns: 24px minmax(0, 1fr); }
  .qrow .side { grid-column: 2; justify-content: space-between; }
  .minis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr; } }
