/* Celsus veri toplama — yönetim paneli. Marka renkleri celsussite/css/style.css'ten. */
:root {
  --ink: #0a0f1e;
  --ink-2: #101729;
  --ink-3: #1a2238;
  --paper: #f7f4ec;
  --paper-2: #efeadd;
  --accent: #f5b841;
  --accent-deep: #d99a1b;
  --blue: #4f86f7;

  --bg: var(--paper);
  --surface: #fffdf8;
  --surface-2: var(--paper-2);
  --text: #141a2c;
  --muted: #4a5469;
  --line: #dcd5c3;
  --focus: var(--blue);
  --ok: #1f7a4d;
  --ok-bg: #e2f2e8;
  --warn: #8a5a00;
  --warn-bg: #fbeccb;
  --bad: #b3261e;
  --bad-bg: #fbe3e1;
  --info-bg: #e6eefe;
  --shadow: 0 1px 2px rgb(10 15 30 / .06), 0 4px 16px rgb(10 15 30 / .06);
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --surface: var(--ink-2);
    --surface-2: var(--ink-3);
    --text: #edf1f7;
    --muted: #93a0b8;
    --line: #283150;
    --ok: #6fd39c;
    --ok-bg: #133526;
    --warn: #f5c56b;
    --warn-bg: #3a2c0d;
    --bad: #ff8a80;
    --bad-bg: #401b19;
    --info-bg: #17264a;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
  }
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); }
.small-text { font-size: .87rem; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* --- üst çubuk --- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  padding: .55rem 1.2rem;
  background: var(--ink); color: #edf1f7;
  border-bottom: 3px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: .55rem; color: #edf1f7; text-decoration: none; font-weight: 700; }
.brand-mark { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); }
.topnav { display: flex; gap: .3rem; flex: 1; flex-wrap: wrap; }
.topnav a { color: #c9d2e3; text-decoration: none; padding: .45rem .75rem; border-radius: 6px; white-space: nowrap; }
.topnav a:hover, .topnav a[aria-current="page"] { background: var(--ink-3); color: #fff; }
.who { display: flex; align-items: center; gap: .7rem; font-size: .9rem; color: #c9d2e3; }
.topbar .btn.ghost { color: #edf1f7; border-color: #3a4566; }

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.2rem 4rem; }
main:focus { outline: none; }

/* --- kartlar, formlar --- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem 1.3rem; margin-bottom: 1.2rem;
}
details.card > summary { cursor: pointer; min-height: 32px; }
details.card[open] > summary { margin-bottom: 1rem; }
.card.narrow { max-width: 440px; margin: 3rem auto; }
.row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 200px; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.field > span { font-weight: 600; font-size: .9rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .84rem; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 7px; padding: .55rem .7rem; min-height: 42px;
  width: 100%;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
textarea.tall { min-height: 260px; }
input.code-input { font-size: 1.5rem; letter-spacing: .35em; text-align: center; font-family: ui-monospace, Menlo, monospace; }
.check { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; margin-right: 1rem; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: none; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }

.btn {
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: .4rem;
  min-height: 42px; padding: .5rem 1rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent-deep); color: var(--ink); }
/* Sabit koyu kırmızı: koyu temada açık kırmızı zemin + beyaz yazı okunmuyordu. */
.btn.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: .3rem .7rem; font-size: .88rem; }
.btn.icon { min-width: 40px; padding: .3rem .5rem; }

/* --- sekmeler --- */
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.crumb { font-size: .9rem; margin-bottom: .3rem; }
.tabs { display: flex; gap: .2rem; border-bottom: 2px solid var(--line); margin-bottom: 1.2rem; flex-wrap: wrap; }
.tabs a {
  padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* --- tablolar --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
tbody tr:hover { background: var(--surface-2); }
tr.clickable { cursor: pointer; }
tr.selected { background: var(--info-bg); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- rozetler, bantlar --- */
.badge {
  display: inline-block; font-size: .78rem; font-weight: 700; padding: .12rem .5rem;
  border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--blue); }
.banner { border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.banner.info { background: var(--info-bg); }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--accent-deep); }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.big-count { font-size: 1.6rem; font-weight: 800; color: var(--warn); margin-right: .3rem; }

/* --- sorular --- */
.qlist { list-style: none; padding: 0; margin: 0 0 1rem; }
.qitem { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin-bottom: .6rem; background: var(--surface); }
.qhead { display: flex; gap: .7rem; align-items: flex-start; }
.qlabel { font-weight: 800; color: var(--accent-deep); min-width: 2.6rem; }
.qtext { flex: 1; }
.qtext .hint-line { color: var(--muted); font-size: .88rem; }
.qtools { display: flex; gap: .3rem; }
.qmeta { margin-top: .4rem; font-size: .85rem; color: var(--muted); }
.preview-list { background: var(--surface-2); border-radius: 8px; padding: .6rem 1rem .6rem 2rem; margin: .5rem 0 1rem; }

/* --- cevaplar --- */
.split { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.answer { border-top: 1px solid var(--line); padding: .9rem 0; }
.answer:first-of-type { border-top: 0; }
.answer audio { width: 100%; max-width: 460px; }
.answer video { width: 100%; max-width: 520px; border-radius: 8px; background: #000; }
.written { white-space: pre-wrap; background: var(--surface-2); padding: .7rem .9rem; border-radius: 8px; }
.dl-box { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* --- tehlike bölgesi --- */
.danger-zone { border: 2px solid var(--bad); }
.danger-zone h2 { color: var(--bad); }

/* --- diyalog --- */
dialog {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem;
  background: var(--surface); color: var(--text); max-width: 540px; width: calc(100% - 2rem);
  box-shadow: 0 10px 40px rgb(0 0 0 / .35);
}
dialog::backdrop { background: rgb(10 15 30 / .55); }
dialog ul { padding-left: 1.2rem; }

/* --- bildirimler --- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 50; max-width: min(420px, calc(100% - 2rem)); }
.toast { background: var(--ink-3); color: #edf1f7; padding: .7rem 1rem; border-radius: 8px; box-shadow: var(--shadow); border-left: 5px solid var(--blue); }
.toast.ok { border-left-color: #6fd39c; }
.toast.bad { border-left-color: #ff8a80; }

.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.loading { color: var(--muted); padding: 2rem 0; }

@media (max-width: 640px) {
  main { padding: 1rem .8rem 3rem; }
  .card { padding: 1rem; }
  .who span { display: none; }
  .topnav { order: 3; flex-basis: 100%; }
  .topbar { gap: .5rem; }
}
