/* Rantak arayüz stilleri (admin paneli ve genel site) — sade, ferah; 4K'ya kadar rem ölçekli. */
:root {
  --bg: #F5F7FB;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --ink: #101828;
  --muted: #475467;
  --faint: #667085;
  --line: #E6EAF2;
  --line-strong: #D0D5DD;
  --navy: #0E1A33;
  --navy-2: #16264A;
  --navy-ink: #B9C4D8;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --soft: #EAF1FF;
  --green: #067647;
  --green-bg: #E7F8EF;
  --amber: #B54708;
  --amber-bg: #FFF4E0;
  --red: #B42318;
  --red-bg: #FEECEB;
  --purple: #5925DC;
  --purple-bg: #F1EDFF;
  --gray-bg: #EEF1F6;
  --radius: 1.25rem;
  --radius-sm: 0.875rem;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 0.5rem 1.5rem rgba(16, 24, 40, 0.04);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
@media (min-width: 1920px) { html { font-size: 17px; } }
@media (min-width: 2560px) { html { font-size: 20px; } }
@media (min-width: 3200px) { html { font-size: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 0.9375rem; line-height: 1.5; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: #1E40AF; text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.125rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 800; }
p { margin: 0; }
code, .mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.875em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; border-radius: 0.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Yerleşim */
.shell { min-height: 100vh; display: flex; }
.side { width: 16rem; flex: 0 0 16rem; background: var(--navy); color: #FFF; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 0.75rem; padding: 0 0.5rem; color: #FFF; }
.brand:hover { color: #FFF; text-decoration: none; }
.brand-mark { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; background: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.brand-name { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-tag { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); background: #FDB022; border-radius: 999px; padding: 0.125rem 0.5rem; }
.nav { display: flex; flex-direction: column; gap: 0.25rem; }
.nav-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #7D8BA6; padding: 0.75rem 0.75rem 0.25rem; }
.nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.75rem; color: #D5DCEA; font-weight: 600; }
.nav a svg { flex: none; opacity: 0.85; }
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #FFF; text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(37, 99, 235, 0.22); color: #FFF; box-shadow: inset 3px 0 0 var(--primary); }
.nav a .count { margin-left: auto; font-size: 0.75rem; font-weight: 800; color: var(--navy); background: #FDB022; padding: 0.0625rem 0.5rem; border-radius: 999px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.side-foot .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.side-foot .who strong { font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 0.75rem; color: var(--navy-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot form { margin: 0; }
.icon-btn { width: 2.25rem; height: 2.25rem; border-radius: 0.75rem; border: 0; background: rgba(255, 255, 255, 0.08); color: #FFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.avatar { width: 2.25rem; height: 2.25rem; border-radius: 999px; background: #E8590C; color: #FFF; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-weight: 800; flex: none; }
.avatar.sm { width: 1.75rem; height: 1.75rem; font-size: 0.6875rem; }

.main { flex: 1; min-width: 0; padding: 1.75rem clamp(1rem, 2.5vw, 2.75rem) 3rem; display: flex; flex-direction: column; gap: 1.5rem; max-width: 120rem; }
.topbar { display: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.page-head .titles { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.page-head .sub { color: var(--muted); }
.crumbs { font-size: 0.8125rem; color: var(--faint); font-weight: 600; }
.crumbs a { color: var(--faint); }
.actions { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--navy); color: #FFF; padding: 0.75rem 1rem; position: sticky; top: 0; z-index: 20; }
  .side { display: none; position: fixed; inset: 3.75rem 0 0 0; width: auto; height: auto; z-index: 19; }
  body[data-menu="open"] .side { display: flex; }
  .side > .brand { display: none; }
  .main { padding-top: 1.25rem; }
  h1 { font-size: 1.5rem; }
}

/* Kartlar ve ızgaralar */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card-head .hint { font-size: 0.8125rem; color: var(--muted); }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card.flush > .card-head { padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1.5rem; align-items: start; }
.cols { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.cols > .grow { flex: 999 1 34rem; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.cols > .aside { flex: 1 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.125rem 1.25rem; display: flex; flex-direction: column; gap: 0.375rem; box-shadow: var(--shadow); }
.stat .label { font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.stat .value { font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.stat .note { font-size: 0.8125rem; color: var(--muted); }
.stat.dark { background: var(--navy); border-color: var(--navy); color: #FFF; }
.stat.dark .label, .stat.dark .note { color: var(--navy-ink); }
.stat .value.amber { color: var(--amber); }
.stat .value.red { color: var(--red); }
.stat .value.green { color: var(--green); }
a.stat:hover { text-decoration: none; border-color: #BFD3FE; }
a.stat { color: inherit; }

.bar { height: 0.5rem; border-radius: 999px; background: #EAEEF5; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.bars { display: flex; flex-direction: column; gap: 0.75rem; }
.bars .row { display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr auto; gap: 0.75rem; align-items: center; font-size: 0.875rem; }
.bars .row b { font-weight: 800; }

/* Rozetler */
.badge { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 800; padding: 0.1875rem 0.625rem; border-radius: 999px; white-space: nowrap; }
.badge-green { color: var(--green); background: var(--green-bg); }
.badge-amber { color: var(--amber); background: var(--amber-bg); }
.badge-red { color: var(--red); background: var(--red-bg); }
.badge-purple { color: var(--purple); background: var(--purple-bg); }
.badge-blue { color: var(--primary-dark); background: var(--soft); }
.badge-gray { color: var(--muted); background: var(--gray-bg); }
.dot { width: 0.625rem; height: 0.625rem; border-radius: 999px; display: inline-block; flex: none; }

/* Tablolar */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFCFF; }
td .primary-text { font-weight: 700; color: var(--ink); }
td .secondary-text { font-size: 0.8125rem; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; }
.row-link { color: inherit; display: flex; flex-direction: column; }
.row-link:hover { text-decoration: none; }
.row-link:hover .primary-text { color: var(--primary-dark); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.empty strong { color: var(--ink); }

/* Tanım listesi */
.facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0.625rem 1.25rem; margin: 0; font-size: 0.875rem; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* Düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 2.75rem; padding: 0 1.125rem; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 800; font-size: 0.9375rem; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background 0.15s, box-shadow 0.15s, border-color 0.15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #FFF; box-shadow: 0 0.5rem 1.25rem rgba(37, 99, 235, 0.24); }
.btn-primary:hover { background: var(--primary-dark); color: #FFF; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: #F2F5FA; color: var(--ink); }
.btn-soft { background: var(--soft); color: var(--primary-dark); }
.btn-soft:hover { background: #DCE8FF; color: var(--primary-dark); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: #FCD9D6; color: var(--red); }
.btn-success { background: var(--green); color: #FFF; }
.btn-success:hover { background: #055E39; color: #FFF; }
.btn-sm { height: 2.25rem; padding: 0 0.875rem; font-size: 0.8125rem; border-radius: 0.75rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary-dark); font-weight: 700; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.inline-form { display: inline; margin: 0; }

/* Formlar */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form-grid { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.field.span-all { grid-column: 1 / -1; }
.field > label, .field > .label { font-size: 0.8125rem; font-weight: 700; color: #344054; }
.field .help { font-size: 0.8125rem; color: var(--faint); }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 2.75rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); padding: 0.5rem 0.875rem; font-size: 0.9375rem; color: var(--ink);
}
.field textarea { min-height: 6rem; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 0.625rem; font-weight: 600; cursor: pointer; font-size: 0.9375rem; }
.check input { width: 1.125rem; height: 1.125rem; margin: 0.1875rem 0 0; accent-color: var(--primary); flex: none; }
.check .help { display: block; font-weight: 500; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .text { display: flex; flex-direction: column; gap: 0.125rem; }
.switch-row .text strong { font-weight: 700; }
.switch-row .text span { font-size: 0.8125rem; color: var(--faint); }
.switch { position: relative; width: 2.75rem; height: 1.5rem; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #D0D5DD; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1.125rem; height: 1.125rem; border-radius: 999px; background: #FFF; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.2); transition: transform 0.15s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(1.25rem); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25); }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.validation { background: var(--red-bg); color: var(--red); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-weight: 600; font-size: 0.875rem; }
.validation ul { margin: 0; padding-left: 1.125rem; }
.validation:empty, .validation.validation-summary-valid { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.filters .field { flex: 1 1 12rem; }
.filters .field.search { flex: 3 1 18rem; }

/* Bildirim şeritleri */
.flash { border-radius: var(--radius-sm); padding: 0.875rem 1.125rem; font-weight: 700; display: flex; gap: 0.75rem; align-items: center; }
.flash.ok { background: var(--green-bg); color: var(--green); }
.flash.err { background: var(--red-bg); color: var(--red); }
.notice { border-radius: var(--radius-sm); padding: 0.875rem 1.125rem; background: var(--soft); color: #1E3A8A; font-size: 0.875rem; display: flex; flex-direction: column; gap: 0.25rem; }
.notice.amber { background: var(--amber-bg); color: #7A2E0E; }
.notice.red { background: var(--red-bg); color: #7A271A; }
.charge-box { border: 1px solid #F5C77E; background: #FFFBF2; border-radius: var(--radius-sm); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.charge-box.late { border-color: #F2A39B; background: #FFF6F5; }
.charge-box .facts { margin: 0; }

/* Listeler */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.list-item .body strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .body span { font-size: 0.8125rem; color: var(--muted); }
.timeline { display: flex; flex-direction: column; gap: 0.875rem; }
.timeline .ev { display: flex; gap: 0.75rem; font-size: 0.875rem; }
.timeline .ev::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--primary); margin-top: 0.4375rem; flex: none; }
.timeline .ev .meta { color: var(--faint); font-size: 0.8125rem; }

/* Sekmeler (sayfa içi bağlantılar) */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tabs a { padding: 0.5rem 0.875rem; border-radius: 999px; font-size: 0.875rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.tabs a:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); }
.tabs a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #FFF; }

details.more { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem 1rem; background: var(--surface-2); }
details.more summary { cursor: pointer; font-weight: 700; }
details.more[open] summary { margin-bottom: 0.75rem; }

/* Giriş sayfaları */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: radial-gradient(60rem 30rem at 10% -10%, #DCE8FF 0%, transparent 60%), radial-gradient(50rem 30rem at 110% 110%, #E9E3FF 0%, transparent 55%), var(--bg); }
.auth-card { width: min(100%, 27rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1.5rem; padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem; box-shadow: 0 1.5rem 3rem rgba(14, 26, 51, 0.08); }
.auth-card .brand { color: var(--navy); padding: 0; }
.auth-card .brand:hover { color: var(--navy); }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .sub { color: var(--muted); font-size: 0.9375rem; }
.qr { align-self: center; width: 13rem; height: 13rem; border-radius: 1rem; border: 1px solid var(--line); padding: 0.5rem; background: #FFF; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 1rem; letter-spacing: 0.06em; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 0.75rem; padding: 0.625rem 0.875rem; text-align: center; overflow-wrap: anywhere; }
.code-input { text-align: center; font-size: 1.5rem !important; letter-spacing: 0.4em; font-weight: 800; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.8125rem; }
.stack { display: flex; flex-direction: column; gap: 0.5rem; }
.row-gap { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.right { margin-left: auto; }
.mt-0 { margin-top: 0; }
.danger-zone { border-color: #F9C9C3; }
.swatch { width: 1rem; height: 1rem; border-radius: 0.3125rem; display: inline-block; vertical-align: middle; }
pre.mail { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.75rem; font-size: 0.8125rem; max-height: 20rem; overflow: auto; margin: 0; }

/* Destek yazışması */
.thread { display: flex; flex-direction: column; gap: 0.875rem; }
.msg { max-width: min(46rem, 92%); align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 1rem 1rem 1rem 0.25rem; padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.375rem; }
.msg.mine { align-self: flex-end; background: var(--soft); border-color: #CFE0FF; border-radius: 1rem 1rem 0.25rem 1rem; }
.msg-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; font-size: 0.8125rem; }
.msg-meta span { color: var(--faint); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; }
