/* KST İş Araçları — ana sitenin renk ve yazı dili (koyu zemin, turuncu vurgu, Inter) */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #14171c;
  --muted: #5d6673;
  --line: rgba(15, 20, 30, 0.1);
  --line-strong: rgba(15, 20, 30, 0.2);
  --accent: #e8490f;
  --accent-hover: #ff5a1f;
  --accent-soft: rgba(232, 73, 15, 0.1);
  --ok: #1a8a4a;
  --ok-soft: rgba(26, 138, 74, 0.1);
  --warn: #b86e00;
  --warn-soft: rgba(212, 132, 0, 0.12);
  --danger: #c62828;
  --danger-soft: rgba(198, 40, 40, 0.09);
  --info: #2563c9;
  --info-soft: rgba(37, 99, 201, 0.09);
  --t-crit: #c62828;
  --t-high: #e8490f;
  --t-mid: #d48400;
  --t-low: #8a94a3;
  --shadow: 0 1px 2px rgba(15, 20, 30, 0.05), 0 8px 24px rgba(15, 20, 30, 0.06);
  --radius: 8px;
  --wrap: 1240px;
  --font: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --logo-filter: none;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10;
    --surface: #111419;
    --surface-2: #171b21;
    --text: #eef0f3;
    --muted: #8f97a3;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #ff5a1f;
    --accent-hover: #ff7a48;
    --accent-soft: rgba(255, 90, 31, 0.14);
    --ok: #3ecf7a;
    --ok-soft: rgba(62, 207, 122, 0.1);
    --warn: #f0a92e;
    --warn-soft: rgba(240, 169, 46, 0.12);
    --danger: #ff5c5c;
    --danger-soft: rgba(255, 92, 92, 0.1);
    --info: #6aa5ff;
    --info-soft: rgba(106, 165, 255, 0.1);
    --t-crit: #ff4d4d;
    --t-high: #ff5a1f;
    --t-mid: #f0a92e;
    --t-low: #5f6875;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.25);
    --logo-filter: invert(1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d10;
  --surface: #111419;
  --surface-2: #171b21;
  --text: #eef0f3;
  --muted: #8f97a3;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #ff5a1f;
  --accent-hover: #ff7a48;
  --accent-soft: rgba(255, 90, 31, 0.14);
  --ok: #3ecf7a;
  --ok-soft: rgba(62, 207, 122, 0.1);
  --warn: #f0a92e;
  --warn-soft: rgba(240, 169, 46, 0.12);
  --danger: #ff5c5c;
  --danger-soft: rgba(255, 92, 92, 0.1);
  --info: #6aa5ff;
  --info-soft: rgba(106, 165, 255, 0.1);
  --t-crit: #ff4d4d;
  --t-high: #ff5a1f;
  --t-mid: #f0a92e;
  --t-low: #5f6875;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.25);
  --logo-filter: invert(1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
p { margin: 0 0 0.8em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { flex: none; display: block; }
.muted { color: var(--muted); }
.pad { padding: 20px; }
.spacer { flex: 1; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.logo { filter: var(--logo-filter); }
.eyebrow { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.wrap { width: min(var(--wrap), calc(100% - 32px)); margin-inline: auto; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 64px; opacity: 0.5; animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 0.15; } }

/* ---------- butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; min-height: 40px; background: var(--accent); color: #fff; font-weight: 500; font-size: 0.92rem; border-radius: var(--radius); border: 1px solid var(--accent); cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn--sm { padding: 6px 11px; min-height: 32px; font-size: 0.85rem; }
.btn--block { width: 100%; }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger); filter: brightness(1.1); }
.btn--danger-text { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius); border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.toolbar .icon-btn { border-color: var(--line-strong); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 0.84rem; font-weight: 500; }
.field small, .hint { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
  width: 100%; padding: 9px 12px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { opacity: 0.6; }
.money-input { display: flex; align-items: stretch; }
.money-input input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; text-align: right; font-variant-numeric: tabular-nums; }
.money-input > span, .money-input select { flex: none; width: auto; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface-2); color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check--crit { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.form-error { color: var(--danger); font-size: 0.88rem; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.span-2 { grid-column: 1 / -1; }

/* ---------- giriş ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at 50% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.auth__card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.auth__logo { width: 56px; height: auto; margin-bottom: 6px; }
.auth__card .eyebrow { margin: 0; }
.auth__title { font-size: 1.5rem; margin-bottom: 4px; }

/* ---------- üst menü ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar__inner { width: min(var(--wrap), calc(100% - 32px)); margin-inline: auto; display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand .logo { width: 30px; height: auto; }
.brand__text { font-size: 0.95rem; white-space: nowrap; }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: var(--radius); color: var(--muted); font-size: 0.9rem; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.usermenu { position: relative; flex: none; }
.usermenu__btn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; }
.usermenu__btn:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 0.8rem; }
.usermenu__name { font-size: 0.88rem; font-weight: 500; }
.usermenu__pop { position: absolute; right: 0; top: calc(100% + 6px); width: 240px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; }
.usermenu__head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; font-size: 0.9rem; }
.usermenu__head span { font-size: 0.8rem; }
.usermenu__pop button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; text-align: left; }
.usermenu__pop button:hover { background: var(--surface-2); }

/* ---------- sayfa ---------- */
.view { padding: 28px 0 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .muted { max-width: 62ch; margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.empty { padding: 56px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .btn { margin-top: 10px; }

/* ana sayfa araç kartları */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s; }
a.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card__icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.tool-card h3 { font-size: 1.1rem; }
.tool-card p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.tool-card__go { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; font-size: 0.9rem; }
.tool-card--soon { background: transparent; border-style: dashed; box-shadow: none; }
.tool-card--soon .tool-card__icon { background: var(--surface-2); color: var(--muted); }

/* ---------- göstergeler ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi__label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.kpi__value { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__sub { font-size: 0.78rem; color: var(--muted); }
.kpi--ok .kpi__value { color: var(--ok); }
.kpi--warn .kpi__value { color: var(--warn); }

/* ---------- araç çubuğu ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tab { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: 0; background: none; border-radius: var(--radius); color: var(--muted); font-weight: 500; font-size: 0.88rem; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.is-active { color: var(--text); background: var(--surface-2); }
.tab__n { font-size: 0.74rem; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--muted); }
.tab.is-active .tab__n { background: var(--accent); color: #fff; }
.toolbar__right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; }
.search .ico { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 34px !important; width: 280px !important; }
#cat { width: auto; max-width: 200px; }

.scenario { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.scenario[hidden] { display: none; }
.scenario__cash { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scenario__cash label { font-size: 0.85rem; font-weight: 500; }
.scenario__cash .money-input input { width: 180px; }
.scenario.is-scenario .money-input input { border-color: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.scenario__hint { font-size: 0.8rem; color: var(--muted); margin: 0; flex: 1 1 260px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 2px; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; font-size: 0.88rem; border-bottom: 1px solid var(--line); }
.alert .ico { margin-top: 2px; }
.alert--warn { background: var(--warn-soft); color: var(--warn); }
.alert--danger { background: var(--danger-soft); color: var(--danger); }
.alert--info { background: var(--info-soft); color: var(--info); }
.alert span { color: var(--text); }
.detail .alert { border: 0; border-radius: var(--radius); }

/* ---------- tablo ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-weight: 500; font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td small { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.table--compact td, .table--compact th { padding: 8px 10px; vertical-align: top; }
.table .is-dim { opacity: 0.55; }
.cell-actions { text-align: right; }

.item-row { cursor: pointer; transition: background 0.1s; }
.item-row:hover, .item-row:focus-visible { background: var(--surface-2); outline: none; }
.c-rank { width: 56px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; text-align: center !important; }
.c-score { width: 92px; }
.c-title { min-width: 240px; }
.item-title { font-weight: 500; }
.item-meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.c-date { white-space: nowrap; }
.c-amt, .c-cum { white-space: nowrap; }
.c-cum { color: var(--muted); }
.due--late { color: var(--danger) !important; font-weight: 500; }
.due--soon { color: var(--warn) !important; font-weight: 500; }

.plan-fits { box-shadow: inset 3px 0 0 var(--ok); }
.plan-out td:not(.c-status) { opacity: 0.55; }
.plan-norate { box-shadow: inset 3px 0 0 var(--warn); }
.plan-tag { font-weight: 500; }
.plan-tag--fits { color: var(--ok) !important; }
.plan-tag--norate { color: var(--warn) !important; }

.cutline td { padding: 0; border-bottom: 0; }
.cutline span { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 8px 14px; font-size: 0.82rem; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-top: 2px dashed var(--accent); border-bottom: 1px solid var(--line); }

/* puan göstergesi */
.score { display: flex; align-items: center; gap: 8px; --c: var(--t-low); }
.score b { min-width: 26px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--c); }
.score i { position: relative; flex: 1; height: 6px; min-width: 36px; border-radius: 3px; background: var(--line); overflow: hidden; }
.score i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c); border-radius: 3px; }
.score--crit { --c: var(--t-crit); }
.score--high { --c: var(--t-high); }
.score--mid { --c: var(--t-mid); }
.score--low { --c: var(--t-low); }
.score--lg b { font-size: 2rem; min-width: 48px; }
.score--lg i { display: none; }

/* rozetler */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; vertical-align: 1px; }
.badge--accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge--info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge--ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge--muted { opacity: 0.8; }
.badge--crit { background: var(--t-crit); color: #fff; border-color: transparent; font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; margin-left: 4px; }

/* hareketler */
.activity { margin-top: 16px; }
.activity summary { padding: 14px 16px; cursor: pointer; font-weight: 500; display: flex; align-items: center; gap: 8px; list-style: none; }
.activity summary::-webkit-details-marker { display: none; }
.activity[open] summary { border-bottom: 1px solid var(--line); }
.loglist { display: flex; flex-direction: column; }
.activity .loglist { max-height: 360px; overflow-y: auto; }
.logrow { display: flex; gap: 14px; padding: 9px 16px; font-size: 0.86rem; border-bottom: 1px solid var(--line); }
.logrow:last-child { border-bottom: 0; }
.logrow__time { flex: none; width: 118px; color: var(--muted); font-variant-numeric: tabular-nums; }
.detail .logrow { padding: 8px 0; }

/* ---------- pencere ---------- */
.modal { width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); overflow: hidden; display: flex; flex-direction: column; }
.modal:not([open]) { display: none; }
.modal--sm { width: min(420px, calc(100% - 24px)); }
.modal--lg { width: min(760px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(5, 7, 10, 0.55); backdrop-filter: blur(2px); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal__title { font-size: 1.1rem; }
.modal__body { padding: 20px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }

/* talep formu */
.criteria { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.criteria__title { font-weight: 600; font-size: 0.92rem; margin: 0; }
.criteria__title .muted { font-weight: 400; font-size: 0.84rem; }
.crit { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; }
.crit__head { display: flex; flex-direction: column; font-size: 0.9rem; }
.crit__head .muted { font-size: 0.8rem; }
.crit__desc { grid-column: 1 / -1; font-size: 0.8rem; color: var(--accent); min-height: 1.2em; text-align: right; }
.levels { display: flex; gap: 4px; }
.lvl { position: relative; cursor: pointer; }
.lvl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lvl span { display: grid; place-items: center; width: 38px; height: 36px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 0.9rem; color: var(--muted); transition: all 0.12s; }
.lvl:hover span { border-color: var(--accent); color: var(--text); }
.lvl input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.lvl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.preview { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--line-strong); font-size: 0.88rem; }
.preview .score { flex: none; width: 110px; }

/* detay */
.detail { display: flex; flex-direction: column; gap: 18px; }
.detail__badges { display: flex; gap: 6px; margin-bottom: -6px; }
.detail__badges .badge--crit { margin-left: 0; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; margin: 0; }
.facts dt { font-size: 0.76rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 500; }
.facts dd small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.detail__desc { white-space: pre-wrap; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); font-size: 0.9rem; }
.detail__h { font-size: 0.95rem; margin-bottom: 4px; }
.detail__actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 16px; }
.breakdown { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.breakdown__head { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.breakdown__head .score { flex: none; }
.breakdown__head p { font-size: 0.84rem; margin: 0; }
.bd-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) 64px; gap: 14px; align-items: center; font-size: 0.86rem; }
.bd-row__label { display: flex; flex-direction: column; min-width: 0; }
.bd-row__label span { color: var(--muted); font-size: 0.8rem; }
.bd-row__bar { height: 6px; background: var(--line); border-radius: 3px; position: relative; overflow: hidden; }
.bd-row__bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--accent); border-radius: 3px; }
.bd-row__pts { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-row__pts small { color: var(--muted); font-weight: 400; }

/* ayarlar */
.weights { display: flex; flex-direction: column; gap: 12px; }
.weight { display: grid; grid-template-columns: minmax(0, 1fr) 200px 48px; gap: 16px; align-items: center; }
.weight__label { display: flex; flex-direction: column; font-size: 0.9rem; }
.weight__label .muted { font-size: 0.8rem; }
.weight input[type=range] { accent-color: var(--accent); width: 100%; }
.weight__pct { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.prose h3 { font-size: 1rem; margin: 18px 0 6px; }
.prose p { color: var(--text); }
.prose .table { margin: 10px 0; }

/* bildirim */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow); animation: toastIn 0.2s ease-out; transition: opacity 0.3s, transform 0.3s; }
.toast--error { background: var(--danger); color: #fff; }
.toast.is-out { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- duyarlı ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .usermenu__name, .brand__text { display: none; }
  .nav a span { display: none; }
  .nav a { padding: 8px 10px; }
  .search input { width: 100% !important; }
  .toolbar__right { width: 100%; }
  .search { flex: 1 1 100%; }
  #cat { flex: 1; max-width: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .view { padding-top: 20px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi__value { font-size: 1.15rem; }
  .form-grid { grid-template-columns: 1fr; }
  .crit { grid-template-columns: 1fr; }
  .crit__desc { text-align: left; }
  .levels .lvl { flex: 1; }
  .lvl span { width: 100%; }
  .weight { grid-template-columns: 1fr 48px; }
  .weight input[type=range] { grid-column: 1 / -1; grid-row: 2; }
  .bd-row { grid-template-columns: minmax(0, 1fr) 60px; }
  .bd-row__bar { grid-column: 1 / -1; grid-row: 2; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .logrow { flex-direction: column; gap: 0; }

  /* tablo → kart */
  .table--items thead { display: none; }
  .table--items, .table--items tbody { display: block; }
  .table--items tr.item-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table--items td { padding: 0; border: 0; }
  .table--items .c-rank { grid-row: 1; width: auto; text-align: left !important; }
  .table--items .c-rank::before { content: "#"; }
  .table--items .c-score { grid-row: 1; width: auto; }
  .table--plain .c-score { grid-column: 1 / -1; }
  .table--items .c-title { grid-column: 1 / -1; min-width: 0; }
  .table--items td[data-label]:not(.c-rank):not(.c-score) { display: block; text-align: right; grid-column: 1 / -1; font-size: 0.86rem; }
  .table--items td[data-label]:not(.c-rank):not(.c-score)::before { content: attr(data-label); float: left; color: var(--muted); }
  .table--items td small { display: inline; margin-left: 6px; }
  .table--items .cutline { display: block; }
  .table--items .cutline td { display: block; }
  .table:not(.table--items):not(.table--compact) thead { display: none; }
  .table:not(.table--items):not(.table--compact) tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table:not(.table--items):not(.table--compact) td { display: flex; justify-content: space-between; padding: 3px 0; border: 0; }
  .table:not(.table--items):not(.table--compact) td[data-label]::before { content: attr(data-label); color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
