/* Waffle Cup marka: fuşya #EC008C, krem #FFF7ED, koyu metin #292127. DejaVu Sans ya da Türkçe karakter desteği tam eşdeğeri. */
:root {
  --fusya: #ec008c;
  --fusya-ink: #b5006c;
  --fusya-soft: #fde1f0;
  --krem: #fff7ed;
  --ink: #292127;
  --muted: #7b6e74;
  --line: #f1e3d6;
  --surface: #ffffff;
  --sunk: #fffbf6;
  --good: #1e8a57;
  --good-soft: #dff3e8;
  --bad: #c8215e;
  --bad-soft: #fbe1ea;
  --warn: #a86a00;
  --warn-soft: #fff1d6;
  --rail: #292127;
  --rail-ink: #f6eef1;
  --rail-mute: #b7a9b0;
  --r: 14px;
  --font: "DejaVu Sans", "Noto Sans", "Segoe UI", Verdana, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--krem);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--fusya-ink); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--rail); color: var(--rail-ink); padding: 22px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand b { display: block; color: var(--fusya); font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.brand small { display: block; color: var(--rail-mute); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .group { color: var(--rail-mute); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; margin: 12px 10px 4px; }
.nav a { color: var(--rail-mute); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; }
.nav a:hover { color: var(--rail-ink); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { background: var(--fusya); color: #fff; }
.userbox { margin-top: auto; background: #352b32; border-radius: 12px; padding: 12px; font-size: 12px; color: var(--rail-mute); }
.userbox b { color: var(--rail-ink); display: block; font-size: 13px; }
.userbox form { margin-top: 8px; }
.userbox button { background: none; border: 1px solid #574850; color: var(--rail-ink); border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; }
.main { min-width: 0; padding: 26px 28px 64px; }
.inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: sticky; top: 0; height: auto; z-index: 10; padding: 10px 16px; gap: 8px; }
  .brand { display: flex; align-items: baseline; gap: 10px; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav .group { display: none; }
  .nav a { white-space: nowrap; }
  .userbox { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; margin: 0; }
  .userbox form { margin: 0; }
  .main { padding: 16px 16px 64px; }
  h1 { font-size: 22px; }
}

/* ---------- Sayfa başlığı ---------- */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fusya-ink); margin-bottom: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.filters label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.filters select, .filters input { padding: 6px 8px; font-size: 14px; }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .g-main { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi.dark .k, .kpi.dark .s { color: #cbbcc3; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.kpi.dark .pos { color: #7fe0ae; }
.kpi.dark .neg { color: #ff8fbf; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- Tablo ---------- */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.t { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.t th, .t td { padding: 9px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); vertical-align: top; }
.t th:first-child, .t td:first-child, .t .l { text-align: left; }
.t th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; background: var(--sunk); font-weight: 700; }
.t tr:last-child td { border-bottom: 0; }
.t tr.tot td { font-weight: 700; background: var(--sunk); }
.t tr.group td { background: var(--sunk); font-weight: 700; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.t td.wrap { white-space: normal; min-width: 180px; }
.t input, .t select { padding: 6px 8px; font-size: 14px; width: 110px; }
.t input.w-s { width: 70px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--fusya); }

/* ---------- Form ---------- */
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--sunk); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--fusya); outline-offset: -1px; background: #fff; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--fusya); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.form .wide { grid-column: 1 / -1; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.btn { font: 700 14px var(--font); border-radius: 9px; padding: 9px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { border-color: var(--muted); }
.btn.pri { background: var(--fusya); border-color: var(--fusya); color: #fff; }
.btn.pri:hover { background: var(--fusya-ink); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; }
.btn.danger { color: var(--bad); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
@media (max-width: 700px) { .quick { grid-template-columns: repeat(2, 1fr); } }
.quick .btn { padding: 14px 10px; }

/* ---------- Durum ---------- */
.flash { border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.flash.ok { background: var(--good-soft); color: var(--good); }
.flash.hata { background: var(--bad-soft); color: var(--bad); }
.note { border-radius: 10px; padding: 10px 14px; background: var(--fusya-soft); color: var(--fusya-ink); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11.5px; font-weight: 700; background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.fus { background: var(--fusya-soft); color: var(--fusya-ink); border-color: transparent; }
.empty { padding: 26px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.alerts { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.alerts li { padding: 8px 12px; border-radius: 8px; background: var(--sunk); border-left: 3px solid var(--warn); }
.alerts li.bad { border-left-color: var(--bad); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--fusya); }
.pl div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.pl div span:first-child { color: var(--muted); }
.pl div.res { border: 0; padding-top: 14px; font-weight: 800; }
.pl div.res b { font-size: 22px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; border-bottom: 1px solid var(--line); }
.bars span { flex: 1; min-width: 3px; background: var(--fusya-soft); border-radius: 3px 3px 0 0; position: relative; }
.bars span i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--fusya); border-radius: 3px 3px 0 0; }
.barx { display: flex; gap: 3px; font-size: 10px; color: var(--muted); }
.barx span { flex: 1; text-align: center; min-width: 3px; overflow: hidden; }
.meter { height: 8px; background: var(--sunk); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); min-width: 80px; }
.meter i { display: block; height: 100%; background: var(--fusya); }
.demo { background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 400px; }
details summary { cursor: pointer; font-weight: 700; }
:focus-visible { outline: 2px solid var(--fusya); outline-offset: 2px; }
@media print { .side, .filters, .actions, form button { display: none !important; } .shell { display: block; } }
.btn.big { padding: 14px 22px; font-size: 16px; }
.alerts li.ok { border-left-color: var(--good); }
.form1 { display: flex; flex-direction: column; gap: 10px; }
form.actions { display: inline-flex; margin: 2px 4px 2px 0; }
.secret { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 12px 14px; font-weight: 700; word-break: break-all; }
[hidden] { display: none !important; }
.pl b { white-space: nowrap; }
