/* PROOFY yönetim paneli. Derleme yok, JavaScript yok. Vurgu: uygulamanın yeşili #1FE283.
   Butonlar hareket etmez: hover yalnızca rengi değiştirir. */

:root {
  --bg: #0b0c0f;
  --surface: #13151a;
  --surface-2: #1a1d24;
  --line: #262a33;
  --text: #eef0f3;
  --muted: #9aa1ad;
  --faint: #6b7280;
  --accent: #1fe283;
  --accent-hover: #4beb9c;
  --accent-ink: #04140c;
  --accent-soft: rgba(31, 226, 131, 0.12);
  --danger: #ff5d5d;
  --danger-hover: #ff7b7b;
  --danger-soft: rgba(255, 93, 93, 0.12);
  --warn: #f5b942;
  --warn-soft: rgba(245, 185, 66, 0.13);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; font-weight: 650; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* Layout */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: baseline; gap: 8px; padding: 0 10px 18px; }
.brand b { font-size: 19px; letter-spacing: 0.08em; }
.brand span { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 10px; border-radius: 8px; color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.count {
  min-width: 22px; padding: 1px 7px; border-radius: 99px; text-align: center;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700;
}
.side-foot { margin-top: 24px; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.side-foot form { margin-top: 8px; }
.main { padding: 28px 32px 60px; max-width: 1180px; width: 100%; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.head h1 { margin: 0; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .brand { padding: 0 0 10px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav a { white-space: nowrap; gap: 6px; }
  .side-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 8px 0 0; }
  .side-foot form { margin: 0; }
  .main { padding: 20px 16px 48px; }
}

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; }
a.stat { display: block; color: var(--text); }
a.stat:hover { border-color: var(--accent); text-decoration: none; }
.stat.hot .n { color: var(--accent); }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }

/* Bar chart (pure CSS) */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 44px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar b { font-size: 12px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.bar span { font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; }

/* Tabs and filters */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs a {
  padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.tabs a:hover { color: var(--text); border-color: var(--faint); text-decoration: none; }
.tabs a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tabs a .c { opacity: 0.75; margin-left: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toolbar input[type=search], .toolbar select { flex: 1 1 220px; max-width: 360px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.clip { max-width: 420px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }
.quote {
  background: var(--surface-2); border-left: 3px solid var(--line); border-radius: 6px;
  padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Badges */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.badge.ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.stars { color: var(--warn); letter-spacing: 1px; white-space: nowrap; }

/* Forms */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.code-input { font-family: var(--mono); font-size: 20px; letter-spacing: 0.3em; text-align: center; }
.field { margin-bottom: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.error { color: var(--danger); font-size: 13px; margin-top: 6px; }

/* Buttons: colour change only, no movement */
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 650; cursor: pointer; text-align: center;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--faint); background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #1a0505; }
.btn.danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.block { display: block; width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.linkbtn:hover { color: var(--text); text-decoration: underline; }

/* Destructive actions open in place and ask for a fresh code (no JavaScript: <details>). */
details.act { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
details.act + details.act { margin-top: 8px; }
details.act > summary {
  list-style: none; cursor: pointer; padding: 10px 12px; font-weight: 600; display: flex; justify-content: space-between; align-items: center;
}
details.act > summary::-webkit-details-marker { display: none; }
details.act > summary::after { content: "▾"; color: var(--muted); }
details.act[open] > summary::after { content: "▴"; }
details.act > summary:hover { color: var(--accent); }
details.act.danger > summary { color: var(--danger); }
details.act.danger > summary:hover { color: var(--danger-hover); }
details.act .body { padding: 2px 12px 14px; }
details.act .hint { font-size: 13px; color: var(--muted); margin-bottom: 10px; }

/* Flash messages */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent; }
.flash.ok { background: var(--accent-soft); color: var(--accent); }
.flash.bad { background: var(--danger-soft); color: var(--danger); }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 400px; padding: 28px; }
.auth .brand { padding: 0 0 16px; }
.qr { background: #fff; border-radius: 10px; padding: 10px; width: 240px; height: 240px; margin: 0 auto 12px; }
.qr svg { display: block; width: 100%; height: 100%; }
.secret { font-family: var(--mono); font-size: 15px; text-align: center; background: var(--surface-2); padding: 10px; border-radius: 8px; overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: var(--mono); }
.codes span { background: var(--surface-2); padding: 8px; border-radius: 6px; text-align: center; }

.photo { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.pager { display: flex; gap: 8px; justify-content: space-between; margin-top: 16px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.mt { margin-top: 16px; }
.mt-s { margin-top: 8px; }
