[hidden] { display: none !important; }
:root {
  --bg: #f4f6f8; --card: #fff; --text: #1d2733; --muted: #66727f; --line: #dde3e8;
  --pri: #1565c0; --pri-d: #0d47a1; --ok: #2e7d32; --err: #c62828; --warn: #ef6c00;
  --lv-normal: #e8f5e9; --lv-late: #fff3e0; --lv-early: #fffde7; --lv-over: #f3e5f5;
  --lv-auto: #ffebee; --lv-approved: #e3f2fd; --lv-absent: #eeeeee; --lv-open: #e8f5e9;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--pri); }
h1 { font-size: 22px; margin: 4px 0 14px; }
h2 { font-size: 17px; margin: 22px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }
.container { max-width: 1400px; margin: 0 auto; padding: 16px; }

/* Üst menü */
.topbar { background: #102a43; color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 16px; min-height: 52px; flex-wrap: wrap; }
.topbar .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 16px; }
.topbar nav { display: flex; gap: 2px; align-items: center; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: #cfd8e3; text-decoration: none; padding: 15px 8px; font-size: 13.5px; }
.topbar nav a:hover, .topbar nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.topbar .who { margin-left: auto; color: #cfd8e3; padding: 0 8px; }
.navbtn { display: none; color: #fff; font-size: 22px; cursor: pointer; margin-left: auto; }
@media (max-width: 900px) {
  .navbtn { display: block; }
  .topbar nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 8px; }
  #navtoggle:checked ~ nav { display: flex; }
  .topbar nav a { padding: 10px; }
  .topbar .who { margin: 6px 0; padding: 0 10px; }
}

/* Form ve butonlar */
input, select, textarea, button { font: inherit; }
input[type=text], input[type=search], input[type=password], input[type=date], input[type=time], input[type=number],
input[type=datetime-local], input:not([type]), select, textarea {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 0; width: 100%;
}
button, .btn { display: inline-block; background: var(--pri); color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { background: var(--pri-d); }
button:disabled { background: #9aa5b1; cursor: not-allowed; }
.btn.light, button.light { background: #e7edf3; color: var(--text); }
.btn.light:hover, button.light:hover { background: #d7e0e9; }
.btn.danger, button.danger { background: var(--err); }
.btn.small, button.small { padding: 4px 9px; font-size: 12px; }
button.big { padding: 12px; font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.narrow-form { max-width: 420px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.chk { flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 400 !important; }
.chk input { width: auto; }
.inline { display: inline; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.center-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.card.narrow { width: 100%; max-width: 420px; }
.logo { text-align: center; color: var(--pri); margin-bottom: 0; }
.center-page .muted { text-align: center; }

.flash { padding: 10px 12px; border-radius: 6px; margin: 0 0 12px; border: 1px solid; }
.flash.ok { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }
.flash.err { background: #ffebee; border-color: #ef9a9a; color: #b71c1c; }
.flash.warn { background: #fff8e1; border-color: #ffe082; color: #8d6e00; }
.checks { list-style: none; padding: 0; } .checks .ok { color: var(--ok); } .checks .bad { color: var(--err); }

/* Rapor filtresi */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 130px; }
.filters .chk { font-size: 13px; color: var(--text); min-width: 0; padding-bottom: 8px; }
.filters .exports { margin-left: auto; display: flex; gap: 6px; }

/* Tablolar */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
table.report { border-collapse: collapse; width: 100%; font-size: 13px; }
table.report th, table.report td { border-bottom: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
table.report th { background: #f0f3f6; position: sticky; top: 0; white-space: nowrap; font-weight: 600; }
table.report td.num { text-align: right; white-space: nowrap; }
table.report td.nowrap { white-space: nowrap; }
tr.lv-normal td, tr.lv-open td { background: var(--lv-normal); }
tr.lv-late td { background: var(--lv-late); }
tr.lv-early td { background: var(--lv-early); }
tr.lv-over td { background: var(--lv-over); }
tr.lv-auto td { background: var(--lv-auto); }
tr.lv-approved td { background: var(--lv-approved); }
tr.lv-absent td { background: var(--lv-absent); color: #555; }
tr.lv-strong td { background: #ffebee; } tr.lv-medium td { background: #fff3e0; } tr.lv-weak td { background: #fffde7; }

.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; margin: 1px 2px 1px 0; white-space: nowrap; border: 1px solid transparent; }
.b-normal, .b-open { background: #c8e6c9; color: #1b5e20; }
.b-late { background: #ffcc80; color: #7a3e00; }
.b-early { background: #fff176; color: #5d4f00; }
.b-over { background: #ce93d8; color: #4a148c; }
.b-auto { background: #ef9a9a; color: #7f0000; }
.b-approved { background: #90caf9; color: #0d3c78; }
.b-absent { background: #bdbdbd; color: #333; }
.b-edited { background: #fff; border-color: #999; color: #444; }
.b-strong { background: #ef9a9a; color: #7f0000; } .b-medium { background: #ffcc80; color: #7a3e00; } .b-weak { background: #fff59d; color: #5d4f00; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; font-size: 12px; }
.summary-cards { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.summary-cards div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.summary-cards b { font-size: 18px; display: block; }
.note-cell { max-width: 320px; font-size: 12.5px; }
.actions { white-space: nowrap; }

/* Harita (eğitmen) */
.map-big { height: 520px; border-radius: 10px; border: 1px solid var(--line); }
.map-mid { height: 380px; border-radius: 10px; border: 1px solid var(--line); }
.layout-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } .map-big { height: 380px; } }
.daypick { display: flex; flex-wrap: wrap; gap: 8px; }
.daypick label { flex-direction: row; gap: 4px; font-weight: 400; }
.daypick input { width: auto; }
.multi { max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; background: #fff; }
.multi label { flex-direction: row; font-weight: 400; gap: 6px; align-items: center; }
.multi input { width: auto; }

/* KVKK ve 2FA */
.card.wide { width: 100%; max-width: 760px; }
.kvkk-box { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px; background: #fafbfc; font-size: 13.5px; }
.kvkk-box h3, .kvkk-text h3 { font-size: 14.5px; margin: 14px 0 4px; }
.kvkk-box p, .kvkk-box li { margin: 4px 0; }
.kvkk-chk { font-size: 15px; padding: 10px; background: #e3f2fd; border-radius: 8px; }
.kvkk-chk input { width: 20px; height: 20px; }
.site-foot { text-align: center; font-size: 12px; padding: 18px 0 24px; }
.center-page .site-foot { padding: 12px 0 0; }
.qr { width: 220px; max-width: 100%; margin: 10px auto; background: #fff; }
.qr svg { width: 100%; height: auto; display: block; }
.code-input { font-size: 24px !important; letter-spacing: 6px; text-align: center; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.recovery-codes code { background: #f0f3f6; padding: 6px; border-radius: 6px; text-align: center; font-size: 15px; }
.steps { padding-left: 18px; } .steps li { margin: 8px 0; }
code.secret { font-size: 14px; word-break: break-all; }

/* Öğrenci ekranı */
body.student { background: #eef2f6; }
.student-wrap { max-width: 520px; margin: 0 auto; padding: 12px; }
.s-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.s-name { font-weight: 700; font-size: 16px; }
.s-links { display: flex; gap: 12px; font-size: 13px; }
.s-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.s-area-name { font-size: 18px; font-weight: 700; }
.s-map { height: 210px; border-radius: 10px; margin: 10px 0; }
.loc-status { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.loc-status.wait { background: #fff8e1; color: #8d6e00; }
.loc-status.ok { background: #e8f5e9; color: #1b5e20; }
.loc-status.in { background: #e3f2fd; color: #0d3c78; }
.loc-status.bad { background: #ffebee; color: #b71c1c; }
.action-btn { width: 100%; padding: 22px; font-size: 22px; font-weight: 800; border-radius: 14px; letter-spacing: .5px; }
.action-btn.in { background: #2e7d32; } .action-btn.in:hover { background: #1b5e20; }
.action-btn.out { background: #c62828; } .action-btn.out:hover { background: #8e0000; }
.action-btn:disabled { background: #b0bac4; }
.s-result { margin-top: 12px; padding: 12px; border-radius: 8px; }
.s-result.ok { background: #e8f5e9; color: #1b5e20; } .s-result.err { background: #ffebee; color: #b71c1c; }
.s-today-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.s-today { list-style: none; margin: 0; padding: 0; }
.s-today li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.s-today li:last-child { border-bottom: 0; }

/* Bina içi doğrulama / QR */
.verify-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.verify-box legend { font-weight: 700; padding: 0 4px; }
.kiosk-url { font-size: 12px; margin-top: 6px; }
.b-qr { background: #d1c4e9; color: #311b92; } .b-lowacc { background: #ffe0b2; color: #7a3e00; } .b-manual { background: #eceff1; color: #37474f; }

/* Saha ekranı (kiosk) */
body.kiosk { background: #0d1b2a; color: #fff; min-height: 100vh; margin: 0; }
.kiosk-wrap { max-width: 720px; margin: 0 auto; padding: 18px; display: flex; flex-direction: column; min-height: 100vh; box-sizing: border-box; }
.kiosk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kiosk-app { color: #9fb3c8; font-size: 14px; }
.kiosk-head h1 { font-size: 26px; margin: 4px 0 0; color: #fff; }
.kiosk-clock { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kiosk-qr { background: #fff; border-radius: 14px; padding: 14px; margin: 18px auto 10px; width: min(80vw, 62vh, 520px); aspect-ratio: 1; box-sizing: border-box; }
.kiosk-qr svg { width: 100%; height: 100%; display: block; }
.kiosk-bar { height: 8px; background: #1b2f45; border-radius: 4px; overflow: hidden; width: min(80vw, 62vh, 520px); margin: 0 auto; }
.kiosk-bar div { height: 100%; background: #4fc3f7; transition: width .9s linear; }
.kiosk-note { text-align: center; color: #cfd8e3; font-size: 17px; margin: 16px 0; }
.kiosk-foot { margin-top: auto; text-align: center; color: #7b8fa3; font-size: 13px; }
.kiosk-revoked { color: #b71c1c; font-size: 18px; text-align: center; padding: 30px 10px; }

/* Öğrenci QR tarayıcı */
.scan-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.scan-wrap video { width: min(92vw, 480px); border-radius: 12px; background: #000; }
.scan-wrap .scan-msg { color: #fff; margin: 12px 0; text-align: center; }
.qr-btn { width: 100%; margin-top: 10px; padding: 14px; font-size: 17px; font-weight: 700; border-radius: 12px; background: #4527a0; }
.qr-btn:hover { background: #311b92; }
.loc-tip { font-size: 12.5px; margin: -6px 0 12px; color: #5d4f00; background: #fffde7; border-radius: 8px; padding: 8px 10px; }
