/* Mutabakat – ortak stiller. Renkler token olarak tanımlı; koyu tema sistem ayarına göre. */
:root {
  --bg: #F2F5F7; --surface: #FFFFFF; --surface-2: #EDF1F4; --fg: #16222B; --muted: #5A6A75; --line: #D6DEE4;
  --accent: #1D5C77; --accent-fg: #FFFFFF; --accent-soft: #DFEDF3;
  --ok: #1E7A4C; --ok-soft: #DDF1E6; --warn: #9A5B00; --warn-soft: #FBEFD9; --bad: #B0281F; --bad-soft: #FBE3E1;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: Consolas, "Cascadia Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1418; --surface: #151D22; --surface-2: #1C262C; --fg: #E2E9ED; --muted: #93A3AD; --line: #29353C;
    --accent: #6DB2D1; --accent-fg: #06141A; --accent-soft: #16303C;
    --ok: #5CC08A; --ok-soft: #13301F; --warn: #E3A84B; --warn-soft: #33260E; --bad: #F08A80; --bad-soft: #3A1714;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 14px; line-height: 1.5; }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 240px; }
.self-end { align-self: flex-end; }

/* ---- butonlar, rozetler ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--fg); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.block { width: 100%; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.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.info { background: var(--accent-soft); color: var(--accent); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }

/* ---- kutular ---- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.alert { border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.alert.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--accent-soft); color: var(--fg); }
.alert ul { margin: 0; padding-left: 18px; }

/* ---- form ---- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .field .flabel { font-size: 12px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; }
.field input[type=color] { height: 38px; padding: 3px; }
.field textarea { min-height: 84px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--bad); }
.input-validation-error { border-color: var(--bad) !important; }
.validation-summary-valid { display: none; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.span2 { grid-column: span 2; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 3px; background: var(--bg); flex-wrap: wrap; }
.seg label { padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-fg); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- tablo ---- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* ---- admin kabuğu ---- */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface-2); border-right: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.brandmark { display: flex; align-items: center; gap: 8px; padding: 2px 8px 16px; font-weight: 700; color: var(--fg); text-decoration: none; }
.brandmark span { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-size: 13px; }
.side a.nav { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.side a.nav:hover { color: var(--fg); }
.side a.nav.on { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.side a.nav.soon { opacity: .55; pointer-events: none; }
.side a.nav em { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.side .spacer { flex: 1; }
.side .who { font-size: 12px; color: var(--muted); padding: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.side .who button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-size: 12px; }
.side .who a { color: var(--muted); text-decoration: none; }
.side .who a:hover, .side .who a.on { color: var(--fg); text-decoration: underline; }
.main { padding: 22px 28px 48px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.main-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; justify-content: space-between; }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.crumb a { color: var(--muted); }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .brandmark, .side .spacer { display: none; }
  .side a.nav { white-space: nowrap; }
  .side .who { border-top: 0; white-space: nowrap; }
  .main { padding: 16px; }
}

/* ---- gösterge ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.stat .v { font-size: 24px; font-weight: 600; font-family: var(--font-mono); }
.stat .s { font-size: 12px; color: var(--muted); }

.stat.bad .v { color: var(--bad); }
a.stat-link { text-decoration: none; color: var(--fg); }
a.stat-link:hover { border-color: var(--accent); }
.bad-text { color: var(--bad); }
.ok-text { color: var(--ok); }
.panel-not { padding: 8px 16px 12px; }
.quote { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.file { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 5px 10px; font-size: 12px; color: var(--fg); text-decoration: none; }
a.file:hover { border-color: var(--accent); }
.file .ext { font-family: var(--font-mono); font-size: 10px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 4px; }

/* ---- aktarım inceleme ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 500; text-decoration: none; color: var(--fg); }
.chip b { font-family: var(--font-mono); }
.chip.bad b { color: var(--bad); }
.chip.warn b { color: var(--warn); }
.chip.on { border-color: var(--accent); color: var(--accent); }
.cur { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.cur div { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; }
.cur small { font-size: 11px; font-weight: 600; padding: 0 5px; border-radius: 4px; }
.cur small.b { background: var(--accent-soft); color: var(--accent); }
.cur small.a { background: var(--warn-soft); color: var(--warn); }
.mails { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.badmail { color: var(--bad); text-decoration: underline wavy; text-underline-offset: 3px; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
tr.excluded td { opacity: .5; }
tr.excluded td:last-child { opacity: 1; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.sticky-foot { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-radius: 0 0 10px 10px; }
.confirm { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.confirm .row { margin: 0; }

progress.ilerleme { width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--surface-2); overflow: hidden; accent-color: var(--accent); appearance: none; }
progress.ilerleme::-webkit-progress-bar { background: var(--surface-2); border-radius: 99px; }
progress.ilerleme::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress.ilerleme::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
progress.ilerleme.warn::-webkit-progress-value { background: var(--warn); }
progress.ilerleme.warn::-moz-progress-bar { background: var(--warn); }

/* ---- talep detayı ---- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); margin-top: 1px; box-shadow: 0 0 0 1px var(--line); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.info { background: var(--accent); }
.dot.warn { background: var(--warn); } .dot.neutral { background: var(--line); }
.ev-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ev-head time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.ev-body { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { min-width: 160px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---- gösterge paneli ---- */
.stat.ok .v { color: var(--ok); }
.stat.warn .v { color: var(--warn); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.firm-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 44px 80px; gap: 12px; align-items: center; padding: 6px 0; }
.firm-row + .firm-row { border-top: 1px dashed var(--line); }
.firm-row a { color: var(--fg); text-decoration: none; }
.firm-oran { text-align: right; }
svg.yigin { width: 100%; height: 10px; border-radius: 99px; overflow: hidden; display: block; }
.s-zemin { fill: var(--surface-2); }
.s-mutabik { fill: var(--ok); }
.s-degil { fill: var(--bad); }
.s-bekleyen { fill: var(--accent); }
.s-teslim { fill: var(--warn); }
.s-doldu { fill: var(--muted); }
.aktarim-satir { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--line); color: var(--fg); text-decoration: none; }
.aktarim-satir:last-child { border-bottom: 0; }
.aktarim-satir:hover .mono { color: var(--accent); }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 10px; height: 10px; margin-top: 5px; border: 0; box-shadow: none; }

/* ---- raporlar ---- */
.nowrap { white-space: nowrap; }
table.rapor td:first-child { min-width: 200px; }
table.rapor tr.devam td { border-top: 0; padding-top: 0; }
table.rapor tr:has(+ tr.devam) td { border-bottom: 0; }

/* ---- firmalar ---- */
.firm-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .firm-grid { grid-template-columns: minmax(0, 1fr); } }
.firm-list { display: flex; flex-direction: column; padding: 6px; }
.firm-list a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 7px; text-decoration: none; color: var(--fg); }
.firm-list a:hover { background: var(--surface-2); }
.firm-list a.on { background: var(--accent-soft); }
.mono-mark { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; background: var(--accent-soft); color: var(--accent); }
.logo-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 640px) { .logo-row { grid-template-columns: minmax(0, 1fr); } }
.drop { border: 1.5px dashed var(--line); border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; background: var(--bg); cursor: pointer; min-height: 120px; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input { display: none; }
.logo-preview { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.lp-bar { background: #FFFFFF; padding: 14px 16px; border-bottom: 3px solid var(--accent); display: flex; align-items: center; min-height: 72px; color: #5F6670; font-size: 12px; }
.lp-bar img { max-height: 44px; max-width: 220px; }
.lp-cap { font-size: 12px; color: var(--muted); padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; }
.calc { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.calc-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.calc-line span { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; font-family: var(--font-mono); font-size: 12px; }
.secret { display: flex; gap: 6px; }
.secret input { flex: 1; min-width: 0; }

/* ---- giriş sayfaları ---- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-card .brandmark { padding: 0; }
.qr { background: #FFFFFF; padding: 12px; border-radius: 8px; align-self: center; line-height: 0; }
.qr img { width: 200px; height: 200px; }
.code-input { font-family: var(--font-mono); font-size: 22px !important; letter-spacing: .3em; text-align: center; }
.keybox { font-family: var(--font-mono); font-size: 13px; background: var(--surface-2); border-radius: 6px; padding: 8px 10px; word-break: break-all; user-select: all; }

/* ---- herkese açık sayfalar ---- */
.public { max-width: 640px; margin: 0 auto; padding: 48px 16px; display: flex; flex-direction: column; gap: 12px; }
