:root {
  --ink: #1b2433; --muted: #667085; --line: #e4e7ec; --bg: #f5f6f8; --card: #fff;
  --brand: #12766b; --brand-2: #0f6359; --brand-soft: #e4f2ef; --side: #172338; --side-2: #1f2d45; --gold: #f6c324;
  --ok: #15803d; --ok-soft: #e8f5ec; --warn: #b45309; --warn-soft: #fdf1e1;
  --danger: #c2362b; --danger-soft: #fdecea; --info: #2f5fb3; --info-soft: #e8eefb;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--brand); }

/* Giriş */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, #2c5292 0%, transparent 60%), var(--side); }
.auth-card { width: min(420px, 100%); background: var(--card); border-radius: 18px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.auth-card h1 { font-size: 22px; margin: 16px 0 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

/* Form */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: #33405a; }
.field small { color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border: 1px solid #cdd5e1; border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(44, 82, 146, .18); }
textarea.input { min-height: 90px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-top: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: 10px; border: 1px solid #cdd5e1; background: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: #f5f7fb; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #172e55; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #e9edf4; }
.btn.light { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; padding: 12px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; font-size: 16px; color: var(--muted); }
.icon-btn:hover { background: #e9edf4; }
.icon-btn.light { color: #fff; }
.icon-btn.light:hover { background: rgba(255, 255, 255, .15); }

/* İskelet */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: #c9d3e6; padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; color: #fff; }
.sidebar .brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 16px; background: var(--brand-2); }
.sidebar .brand b { display: block; font-size: 15px; line-height: 1.2; }
.sidebar .brand small { color: #8b9bbb; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #c9d3e6; text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: var(--brand-2); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .sep { margin: 12px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6c7ea3; }
.sidebar .me { margin-top: auto; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); display: flex; align-items: center; gap: 10px; }
.sidebar .me > div:not(.avatar) { min-width: 0; flex: 1; }
.sidebar .me b { display: block; color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .me small { color: #8b9bbb; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 28px 0; }
.topbar h1 { font-size: 22px; }
.topbar .today { margin-left: auto; color: var(--muted); font-size: 14px; }
.menu-btn { display: none; }
.page { padding: 18px 28px 48px; max-width: 1280px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.card h2 { font-size: 16px; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat small { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat b { display: block; font-size: 26px; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat.ok b { color: var(--ok); } .stat.warn b { color: var(--warn); } .stat.danger b { color: var(--danger); } .stat.info b { color: var(--info); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar .input { width: auto; }
.toolbar .grow { flex: 1 1 200px; min-width: 160px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: #e6eaf1; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; color: #46536b; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.datebox { display: inline-flex; align-items: center; gap: 4px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e9edf4; color: #46536b; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); } .badge.info { background: var(--info-soft); color: var(--info); }

.list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.item .who { min-width: 0; flex: 1; }
.item .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .who small { color: var(--muted); }
.item .acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.item .times { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
select.mini { padding: 6px 8px; border-radius: 8px; border: 1px solid #cdd5e1; background: #fff; font-size: 13px; }
.empty {padding: 36px 16px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed #cdd5e1; border-radius: var(--radius); }

.table-wrap { overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th, .t td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f7f9fc; position: sticky; top: 0; z-index: 1; }
.t tr:last-child td { border-bottom: 0; }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.t td.wrapcell { white-space: normal; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover { background: #f4f7fc; }

/* Takip matrisi */
.matrix th.col, .matrix td.cell { text-align: center; padding: 6px; }
.matrix th.col small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; }
.matrix .sticky { position: sticky; left: 0; background: #fff; z-index: 2; box-shadow: 1px 0 0 var(--line); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.matrix th.sticky { background: #f7f9fc; z-index: 3; }
.mark { width: 40px; height: 34px; border-radius: 9px; border: 1px solid #cdd5e1; background: #fff; font-weight: 800; cursor: pointer; }
.mark.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.mark.late { background: #e0a526; border-color: #e0a526; color: #fff; }
.mark.missed { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Kurumsal görünüm: lacivert menü, açık zemin, beyaz kartlar, petrol yeşili vurgu */
.sidebar { background: var(--side); border-right: 1px solid rgba(255, 255, 255, .04); padding: 16px 12px; gap: 2px; }
.sidebar .brand { padding: 2px 8px 14px; }
.sidebar .brand b { font-size: 16px; letter-spacing: .01em; }
.sidebar .brand small { color: #8c99b0; font-size: 12px; }
.sidebar .brand-logo { width: 40px; height: 40px; object-fit: contain; flex: none; border-radius: 10px; background: #fff; padding: 3px; }
.nav a { position: relative; padding: 9px 12px; color: #cdd5e2; font-size: 14.5px; border-radius: 9px; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a.active { background: var(--side-2); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #2bb3a1; }
.nav .sep { margin: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #8190a8; }
.nav .sep:first-child { margin-top: 2px; }
.nav a .ext { margin-left: auto; opacity: .5; font-size: 12px; }
.sidebar .me { background: rgba(255, 255, 255, .05); }
.sidebar .me .avatar { background: #2b3a55; color: #fff; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 28px; min-height: 62px; }
.topbar h1 { font-size: 18px; font-weight: 700; color: var(--ink); }
.page { padding-top: 22px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { font-size: 24px; letter-spacing: -.01em; }
.page-head p { color: var(--muted); margin-top: 2px; }
.page-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border-color: #d0d5dd; border-radius: 9px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.outline-ok { color: var(--ok); border-color: #b7dcc4; }
.btn.outline-danger { color: var(--danger); border-color: #f1b8b2; }
.input:focus, .gin:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18, 118, 107, .16); }
.stat { border-top: 0; }
.stat.info b { color: var(--info); }
.t th { color: #667085; background: #f5f6f8; font-weight: 700; }
.auth { min-height: 100vh; background: radial-gradient(1000px 520px at 10% -10%, #24456b 0%, transparent 60%), var(--side); }
.auth-logo { width: 200px; height: auto; display: block; margin: 0 auto 6px; }
.auth-card h1, .auth-card .sub { text-align: center; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabbar a { padding: 10px 16px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabbar a:hover { color: var(--ink); }
.tabbar a.on { color: var(--brand); border-bottom-color: var(--brand); }
.pills { display: inline-flex; gap: 2px; background: #eef0f3; border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.pills a, .pills button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: #475467; cursor: pointer; text-decoration: none; }
.pills .on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.trk-pills { margin-bottom: 16px; }
.trk-pills:empty { display: none; }
.trk-pills small { color: var(--muted); font-weight: 500; }
.trk-pills b { margin-left: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trk-head { margin-top: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid #d0d5dd; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); }
.chip b { font-variant-numeric: tabular-nums; }
.chip.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.muted { color: var(--muted); }
.money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.money.neg { color: var(--danger); }
.money.pos { color: var(--ok); }

/* Fotoğraflar */
.avatar.photo { object-fit: cover; background: #e5ebf5; padding: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 84px; height: 84px; font-size: 26px; }
.who-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.photo-field { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.photo-field label.btn { cursor: pointer; }

/* E-Okul */
.t.grades th.col, .t.grades td.cell { text-align: center; padding: 6px 4px; }
.t.grades td.wrapcell { min-width: 150px; }
.gin { width: 58px; padding: 7px 4px; text-align: center; border: 1px solid #cdd5e1; border-radius: 8px; background: #fff; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.gin:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(44, 82, 146, .18); }
.gin:disabled { background: #f0f2f7; color: #a7b0c0; cursor: not-allowed; }
.gin.saving { background: #fff8e1; }
.t tfoot td { border-top: 2px solid var(--line); border-bottom: 0; background: #f7f9fc; }
.muted { color: var(--muted); }
.eokul-note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.club-stat-line { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; text-transform: none; letter-spacing: 0; }
.club-stat-line b { display: inline; font-size: inherit; color: inherit; font-weight: 700; }
.eokul-status { margin: -4px 0 14px; padding: 10px 14px; border-radius: 10px; background: #eef1f7; color: #33405a; font-weight: 600; }
.eokul-status.ok { background: var(--ok-soft); color: var(--ok); }
.eokul-status.warn { background: var(--warn-soft); color: var(--warn); }
.eokul-status.danger { background: var(--danger-soft); color: var(--danger); }

/* Pencere, bildirim */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 18, 36, .55); display: grid; place-items: center; padding: 16px; z-index: 60; overflow-y: auto; }
.modal { width: min(520px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.wide { width: min(860px, 100%); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal header h3 { font-size: 17px; }
.modal-body { padding: 16px 20px 20px; overflow-y: auto; }
.confirm-text { color: #33405a; }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 12px; background: #15284b; color: #fff; font-weight: 600; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); transition: opacity .3s, transform .3s; text-align: center; }
.toast.error { background: var(--danger); }
.toast.hide { opacity: 0; transform: translateY(8px); }

/* Sınavlar */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.exam-card { display: block; padding: 16px; text-decoration: none; color: inherit; }
.exam-card:hover { border-color: var(--brand-2); }
.exam-card b { font-size: 16px; display: block; }
.exam-card small { color: var(--muted); }
.exam-card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.subj-row { display: grid; grid-template-columns: 1fr 96px 34px; gap: 8px; margin-bottom: 8px; }
.key-row { display: grid; grid-template-columns: 160px 1fr 70px; gap: 10px; align-items: center; margin-bottom: 10px; }
.key-row input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.key-row .cnt { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.key-row .cnt.bad { color: var(--danger); font-weight: 700; }
.preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; max-width: 520px; }
.preview svg { display: block; width: 100%; height: auto; }
.review-sum { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.review-subj { margin-top: 14px; }
.review-subj h4 { margin: 0 0 8px; font-size: 14px; display: flex; justify-content: space-between; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; }
.q { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 8px; border: 1px solid #cdd5e1; background: #fff; cursor: pointer; font-size: 13px; }
.q span { color: var(--muted); font-variant-numeric: tabular-nums; }
.q b { font-size: 15px; }
.q.ok { background: var(--ok-soft); border-color: #a8dcc9; }
.q.bad { background: var(--danger-soft); border-color: #f0b6b0; }
.q.flag { background: #fff3c4; border-color: #e0a526; box-shadow: 0 0 0 2px rgba(224, 165, 38, .35); }

/* Kamera */
.scanner { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; display: flex; flex-direction: column; }
.scanner header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.scanner-view { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.scanner video { width: 100%; height: 100%; object-fit: contain; }
.scanner .guide { position: absolute; border: 2px dashed rgba(255, 255, 255, .7); border-radius: 10px; pointer-events: none; }
.scanner .guide.sheet { height: 88%; aspect-ratio: 210 / 297; max-width: 92%; }
.scanner .guide.qr { width: min(60vw, 280px); aspect-ratio: 1; }
.scanner footer { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 6px; justify-items: center; text-align: center; background: #0a1428; }
.scanner-status { font-weight: 700; font-size: 16px; }
.scanner-status.error { color: #ff9d94; } .scanner-status.ok { color: #7fe3c2; }
.scanner-hint { color: #a9b6cf; font-size: 13px; }

/* Yazdırma */
#print-root { display: none; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm; padding: 10mm; }
.qr-card { border: 0.3mm solid #999; border-radius: 3mm; padding: 4mm; text-align: center; break-inside: avoid; font-family: Arial, sans-serif; }
.qr-card svg { width: 34mm; height: 34mm; }
.qr-card b { display: block; font-size: 11pt; margin-top: 2mm; }
.qr-card small { font-size: 9pt; color: #444; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
  .sheet { width: 210mm; height: 297mm; page-break-after: always; break-after: page; overflow: hidden; }
  .sheet:last-child { page-break-after: auto; break-after: auto; }
  .sheet svg { display: block; width: 210mm; height: 297mm; }
  body:not(.printing) .sidebar, body:not(.printing) .topbar .menu-btn, body:not(.printing) .toolbar, body:not(.printing) .no-print { display: none !important; }
  body:not(.printing) .shell { display: block; }
  body:not(.printing) .page { padding: 12mm; max-width: none; }
  body:not(.printing) .table-wrap { overflow: visible; border: 0; }
  .t th { position: static; }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 40; transform: translateX(-100%); transition: transform .28s cubic-bezier(.4, 0, .2, 1), box-shadow .28s ease; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0); }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
  .menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; }
  .topbar { padding: 14px 16px 0; }
  .topbar h1 { font-size: 19px; }
  .topbar .today { display: none; }
  .page { padding: 14px 16px 48px; }
  .row, .key-row { grid-template-columns: 1fr; }
  .key-row .cnt { text-align: left; }
  .item { flex-wrap: wrap; }
  .item .acts { width: 100%; justify-content: flex-start; padding-left: 50px; }
}

/* Etüt yoklaması */
.rc-list { padding: 0; overflow: hidden; }
.rc-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.rc-row:last-child { border-bottom: 0; }
.rc-row .who-cell { flex: 1; min-width: 180px; }
.rc-row .who-cell b { display: block; }
.rc-row .who-cell small { font-size: 12px; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; border: 1px solid #d0d5dd; background: #fff; font-weight: 600; font-size: 13px; color: #475467; cursor: pointer; white-space: nowrap; }
.opt i { font-style: normal; font-size: 12px; opacity: .8; }
.opt:hover { background: #f9fafb; }
.opt.on { border-width: 2px; padding: 6px 10px; }
.opt.ok.on { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.opt.danger.on { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.opt.info.on { border-color: var(--info); color: var(--info); background: var(--info-soft); }
.opt.warn.on { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }

/* Kantin */
.kantin { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pcard { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.pcard.off { opacity: .55; }
.pcard .pimg { height: 96px; border-radius: 9px; background: linear-gradient(160deg, #f3f6f8, #e8eef1); display: grid; place-items: center; font-size: 46px; }
.pcard > b { font-size: 14.5px; line-height: 1.25; }
.pcard .prow { display: flex; justify-content: space-between; align-items: baseline; }
.pcard .pmenu { position: absolute; top: 14px; left: 14px; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--muted); z-index: 1; }
.qty { display: flex; align-items: center; justify-content: space-between; border: 1px solid #d0d5dd; border-radius: 8px; overflow: hidden; }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; font-size: 17px; cursor: pointer; color: var(--ink); }
.qty span { font-weight: 700; font-size: 13px; padding: 0 6px; }
.qty.on { background: var(--brand-soft); border-color: #a9d6cd; color: var(--brand); }
.qty.on button { color: var(--brand); }
.cart { position: sticky; top: 16px; padding: 16px; }
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cart-head h3 { font-size: 17px; }
.clines { max-height: 46vh; overflow: auto; }
.cline { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cline > div:not(.qty) { flex: 1; min-width: 0; }
.cline b { display: block; font-size: 14px; }
.cline small { font-size: 12px; }
.cline .qty { width: 104px; flex: none; }
.cem { width: 34px; height: 34px; border-radius: 8px; background: #f2f5f7; display: grid; place-items: center; font-size: 19px; flex: none; }
.ctotal { display: flex; justify-content: space-between; padding: 14px 0 12px; font-size: 16px; }
.ctotal b { font-size: 19px; }
.cstudent { display: flex; gap: 8px; margin-bottom: 8px; }
.cbal { font-size: 14px; margin-bottom: 10px; color: var(--muted); }
.emoji-pick label { font-size: 20px; padding: 4px 8px; }
.emoji-pick input { display: none; }
.emoji-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* Bakiye */
.stats.big .stat { padding: 18px 20px; }
.stats.big .stat b { font-size: 30px; }
.stats.big .stat span { display: block; font-size: 13px; margin-top: 2px; }
.stats.big .stat small { text-transform: none; letter-spacing: 0; font-size: 14px; color: #475467; }

/* Öğrenci kartları */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.scard { padding: 18px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; cursor: pointer; }
.scard:hover { border-color: #a9d6cd; }
.scard b { font-size: 15px; margin-top: 6px; }
.smeta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: var(--muted); margin: 6px 0 2px; }
.smeta b { font-size: 13px; color: var(--ink); margin: 0; }

@media (max-width: 1100px) { .kantin { grid-template-columns: minmax(0, 1fr); } .cart { position: static; } }
.kantin > div, .att-layout > *, .faz-right > * { min-width: 0; }
@media (max-width: 860px) {
  .rc-row { flex-wrap: wrap; }
  .opts { justify-content: flex-start; width: 100%; }
  .page-head .acts { margin-left: 0; }
}

/* Yoklama: kapı karekodu hareketleri */
.att-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.qr-feed { position: sticky; top: 16px; }
.qr-feed h2 { font-size: 15px; }
.qr-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; }
.qr-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0 10px 10px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.qr-list li.in { border-left-color: var(--ok); }
.qr-list li.out { border-left-color: var(--info); }
.qr-list li:last-child { border-bottom: 0; }
.qr-list .avatar { flex: none; }
.qr-list .qn { flex: 1; min-width: 0; }
.qr-list .qn b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.25; word-break: break-word; }
.qr-list small { display: block; font-size: 12px; margin-top: 1px; }
.qr-list .r { flex: none; display: grid; justify-items: end; gap: 4px; }
.qr-list .r time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.qr-list .r .badge { font-size: 11.5px; white-space: nowrap; }
.qr-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.qr-chips .badge { font-size: 11px; padding: 2px 7px; }
@media (max-width: 1100px) { .att-layout { grid-template-columns: 1fr; } .qr-feed { position: static; order: -1; } }

/* Kapı Ekranı (QR) yönetim sayfası */
.kiosk-admin { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.kiosk-prev { padding: 0; overflow: hidden; background: #0e1013; }
.kiosk-stage { position: relative; width: 100%; overflow: hidden; }
.kiosk-stage iframe { position: absolute; top: 0; left: 0; width: 1366px; height: 768px; border: 0; transform-origin: 0 0; pointer-events: none; }
@media (max-width: 1100px) { .kiosk-admin { grid-template-columns: 1fr; } }
.icard { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.icard textarea { grid-column: 1; resize: vertical; min-height: 54px; }
.icard [data-act=rm] { grid-row: 1; grid-column: 2; }

/* Masaüstü menü: sabit bir sütun; içeriğin üstüne binmez. Üst çubuktaki ☰ düğmesi geniş (248px) ↔ dar (68px, yalnızca simge) geçiş yapar. */
@media (min-width: 861px) {
  .shell { grid-template-columns: auto minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100vh; overflow-x: hidden; width: 248px; transition: width .26s cubic-bezier(.4, 0, .2, 1), padding .26s cubic-bezier(.4, 0, .2, 1); will-change: width; }
  .sidebar .brand > div, .nav a > span, .sidebar .me > div:not(.avatar) { white-space: nowrap; transition: opacity .18s ease .08s; }
  .nav a { transition: background-color .15s, color .15s, width .26s cubic-bezier(.4, 0, .2, 1), padding .26s cubic-bezier(.4, 0, .2, 1); }
  .nav .sep { transition: margin .26s, font-size .2s, height .2s; overflow: hidden; white-space: nowrap; }
  .menu-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 17px; cursor: pointer; color: var(--ink); flex: none; }
  .menu-btn:hover { background: #f2f4f7; }
  body.nav-collapsed .sidebar { width: 68px; padding-left: 12px; padding-right: 12px; }
  /* Dar menüde yazılar solarak kaybolur; ekran okuyucular adları yine okur (opacity), bağlantıların title'ı da var */
  body.nav-collapsed .sidebar .brand > div, body.nav-collapsed .nav a > span, body.nav-collapsed .sidebar .me > div:not(.avatar) { opacity: 0; transition-delay: 0s; pointer-events: none; }
  body.nav-collapsed .nav a > span, body.nav-collapsed .sidebar .brand > div { width: 0; overflow: hidden; }
  body.nav-collapsed .sidebar .brand { padding-left: 2px; }
  body.nav-collapsed .nav .sep { font-size: 0; height: 1px; padding: 0; margin: 10px 8px; background: rgba(255, 255, 255, .12); }
  body.nav-collapsed .nav a { width: 44px; padding: 10px 13px; gap: 0; }
  body.nav-collapsed .sidebar .me { flex-direction: column; padding: 8px 2px; gap: 6px; }
  body.nav-collapsed .sidebar .me > div:not(.avatar) { position: absolute; }
  body.nav-collapsed .sidebar .me .avatar { width: 34px; height: 34px; }
}
/* Seçili sayfa menüde belirgin */
.nav a.active { background: var(--brand); color: #fff; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.nav a.active svg { stroke-width: 2.2; }
.nav a.active::before { background: var(--gold); }
body.nav-collapsed .nav a.active::before { left: -12px; }
/* Klavye odak göstergesi: tüm etkileşimli öğelerde açık ve tutarlı */
:where(a, button, [tabindex], summary, label.btn, .chip, .opt, .mark):focus-visible { outline: 3px solid #1f7aec; outline-offset: 2px; border-radius: 8px; }
.sidebar :where(a, button):focus-visible { outline-color: var(--gold); }
.input:focus-visible, .gin:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
label.btn:has(input[type=file]:focus-visible) { outline: 3px solid #1f7aec; outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-head.no-title { align-items: center; }
/* Giriş: şifre göster / gizle */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 92px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: #f2f4f7; color: #344054; font-size: 13px; font-weight: 600; cursor: pointer; }
.pw-toggle:hover { background: #e6e9ef; }
.pw-toggle svg { width: 16px; height: 16px; }
.pw-toggle[aria-pressed=true] svg { opacity: .55; }

/* Grafik (js/chart.js) */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: #e7eaee; stroke-width: 1; }
.ch-y { font-size: 12px; fill: #667085; text-anchor: end; }
.ch-x { font-size: 12px; fill: #667085; text-anchor: middle; }
.ch-area { opacity: .12; }
.ch-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 6px; color: #344054; }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.chart-empty { padding: 30px 0; text-align: center; }
.trend-card { margin-bottom: 16px; }
.trend-chips { margin-bottom: 8px; }
.trend-chips .chip { font-size: 13px; padding: 6px 12px; }
.trend-chips .chip:not(.on) { opacity: .55; }
.trend-up { color: var(--ok); }
.trend-down { color: var(--danger); }

/* MEB ders çizelgesi penceresi */
.meb-tools { flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.meb-tools .field { margin: 0; min-width: 150px; }
.meb-list .meb-sec th { background: #f2f5f7; text-align: left; font-size: 14px; position: sticky; top: 0; z-index: 1; }
.meb-list .meb-grp td { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding-top: 10px; }
.meb-list select.input.mini { padding: 4px 8px; height: auto; font-size: 13px; width: auto; display: inline-block; }

/* Satış raporu */
.sr-presets { margin-bottom: 14px; }
.sr-filters { align-items: flex-end; gap: 12px; }
.sr-filters .field { margin: 0; min-width: 170px; }
.sr-stats .stat span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.sr-stats .stat b { font-size: 26px; }
.sr-tables { margin-top: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .sr-tables { grid-template-columns: 1fr; } }

/* Kullanıcılar: ana yönetici kartı */
.owner-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; border-left: 4px solid var(--brand); }
.owner-card h2 { font-size: 20px; }
.users-h { margin: 18px 0 8px; font-size: 15px; }

/* E-Okul şube kıyası */
.cmp-card { margin-bottom: 16px; }
.cmp-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 14px; }
.cmp-tiles .stat span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.cmp-tiles .stat:nth-child(3) { border-right: 2px solid var(--line); }
@media (max-width: 1200px) { .cmp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dbar { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.dbar-track { position: relative; flex: 1; height: 10px; border-radius: 99px; background: #eef1f4; overflow: hidden; }
.dbar.big .dbar-track { height: 14px; }
.dbar-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: #98a2b3; }
.dbar-fill { position: absolute; top: 0; bottom: 0; }
.dbar-fill.up { background: var(--ok); border-radius: 0 99px 99px 0; }
.dbar-fill.down { background: var(--danger); border-radius: 99px 0 0 99px; }
.dbar b { font-size: 13px; white-space: nowrap; min-width: 64px; text-align: right; }
.dbar.big b { font-size: 17px; }
.cmp-table input.sin { width: 72px; }

/* Namaz takibi: yoklama saati ve izinli öğrenciler */
.trk-state { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.trk-state.open { background: #e7f6ef; color: var(--ok); }
.trk-state.closed { background: #f2f4f7; color: #475467; }
.rc-row.on-leave { opacity: .45; background: #f8f9fb; }
.rc-row.on-leave .opts { pointer-events: none; }
.opt:disabled { cursor: not-allowed; opacity: .55; }

/* KTS: kitapçık türü seçimi (optik kontrol penceresi) */
.booklet-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0 12px; }
.booklet-pick > span { font-weight: 700; margin-right: 4px; }
.booklet-pick button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #98a2b3; background: #fff; font-weight: 800; font-size: 15px; cursor: pointer; }
.booklet-pick button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.booklet-pick.flag { border-color: var(--warn); background: #fff8eb; }
.booklet-pick small { flex-basis: 100%; color: #b54708; }

/* Kelebek sistemi (sınav oturma planı) */
.kel-hall { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.kel-hall .input { width: auto; }
.kel-hall [data-f=name] { min-width: 160px; }
.kel-hall [type=number] { width: 70px; }
.kel-hall label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.kel-plan { margin-top: 14px; }
.kel-plan-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.kel-plan-head b { font-size: 16px; }
.kel-board { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #667085; background: #eef1f4; border-radius: 6px; padding: 5px; margin-bottom: 8px; }
.kel-grid { display: grid; gap: 6px; }
.kel-seat { position: relative; border: 1px solid #d0d5dd; border-radius: 8px; padding: 16px 6px 6px; min-height: 58px; background: #fff; font-size: 12px; line-height: 1.25; }
.kel-seat b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kel-seat small { color: #667085; }
.kel-seat .no { position: absolute; top: 3px; left: 6px; font-size: 10.5px; font-weight: 700; color: #98a2b3; }
.kel-seat .bk { position: absolute; top: 3px; right: 5px; font-size: 10.5px; font-weight: 800; background: #12766b; color: #fff; border-radius: 4px; padding: 0 5px; }
.kel-seat.empty { background: #f8f9fb; border-style: dashed; }
.kel-seat.lv9 { border-left: 4px solid #2f6fdb; }
.kel-seat.lv10 { border-left: 4px solid #12766b; }
.kel-seat.lv11 { border-left: 4px solid #c2620c; }
.kel-seat.lv12 { border-left: 4px solid #8b3fd1; }
#print-root.kelebek-mode .kpage { width: 210mm; min-height: 297mm; padding: 12mm; box-sizing: border-box; page-break-after: always; break-after: page; font-family: Arial, Helvetica, sans-serif; color: #111; }
#print-root.kelebek-mode .kpage:last-child { page-break-after: auto; break-after: auto; }
.khead2 { margin-bottom: 6mm; }
.khead2 b { display: block; font-size: 13pt; }
.khead2 span { font-size: 10pt; color: #444; }
.khead2 h1 { font-size: 17pt; margin: 2mm 0 0; }
.kelebek-mode .kel-seat { min-height: 17mm; font-size: 9pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.kelebek-mode .kel-seat b { font-size: 9.5pt; white-space: normal; }
.kfoot { font-size: 9pt; color: #555; margin-top: 4mm; }
.ktable { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
.ktable th, .ktable td { border: 0.3mm solid #999; padding: 2mm 3mm; text-align: left; }
.ktable th { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ktable td:last-child { min-width: 30mm; }

/* KTS öğrenciye özel soru sayıları */
.cnt-table .input{width:64px;min-width:0;padding:6px 4px;text-align:center}
.cnt-table tr.cnt-bulk td{background:var(--soft, rgba(0,0,0,.03))}

/* Program ekranı resimleri (yönetim sayfası) */
.pimg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pimg { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f4f4f5; }
.pimg img, .pimg-miss { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.pimg-miss { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.pimg-n { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 7px; }
.pimg-acts { display: flex; gap: 4px; justify-content: flex-end; padding: 6px; background: var(--card, #fff); }
label.btn.disabled { opacity: .6; pointer-events: none; }

/* KTS analizi */
.abar { display: inline-block; vertical-align: middle; width: 110px; height: 8px; border-radius: 6px; background: #eef0f3; overflow: hidden; }
.abar i { display: block; height: 100%; background: var(--info, #2563eb); border-radius: 6px; }
.abar.ok i { background: #16a34a; } .abar.mid i { background: #eab308; } .abar.bad i { background: #dc2626; }
.qmap { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: start; margin-bottom: 10px; }
.qmap > div { display: flex; flex-wrap: wrap; gap: 4px; }
.qcell { width: 40px; height: 40px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; line-height: 1.05; color: #fff; }
.qcell small { font-size: 9.5px; font-weight: 600; opacity: .85; }
.qcell.ok { background: #16a34a; } .qcell.mid { background: #ca8a04; } .qcell.bad { background: #dc2626; } .qcell.none { background: #e5e7eb; color: #6b7280; }
@media (max-width: 640px) { .qmap { grid-template-columns: 1fr; } }
/* Ana sayfa: dikkat isteyenler */
.alert-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.alert-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; border-top: 3px solid #f59e0b; }
.alert-group.absent, .alert-group.namaz { border-top-color: #dc2626; } .alert-group.kts { border-top-color: #7c3aed; } .alert-group.debt { border-top-color: #0ea5e9; }
.alert-group h3 { font-size: 15px; margin: 0 0 2px; display: flex; align-items: center; gap: 6px; }
.alert-group ul { list-style: none; margin: 8px 0 0; padding: 0; }
.alert-group li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); }
.alert-group li.more { display: none; } .alert-group.open li.more { display: flex; }
.alert-acts { display: flex; gap: 4px; flex-shrink: 0; }
.icon-btn.wa { color: #16a34a; font-size: 17px; }
/* Talebe karnesi (yazdırma) */
#print-root.karne-mode .kpage { width: 210mm; min-height: 297mm; padding: 11mm 12mm; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; color: #111; font-size: 10pt; }
.karne h1 { font-size: 19pt; margin: 1mm 0; } .karne h2 { font-size: 11pt; margin: 0 0 2mm; color: #0f766e; text-transform: uppercase; letter-spacing: .04em; }
.karne section { margin-top: 4.5mm; break-inside: avoid; } .karne p { margin: 1mm 0; }
.k-head { display: flex; gap: 5mm; align-items: center; border-bottom: .6mm solid #0f766e; padding-bottom: 3mm; }
.k-head img { width: 22mm; height: 22mm; border-radius: 3mm; object-fit: cover; }
.k-head > div:nth-child(2), .k-head > div:first-child:not(.k-date) { flex: 1; } .k-head small { color: #555; font-weight: 700; }
.k-date { text-align: right; font-weight: 700; } .k-date small { font-weight: 400; color: #555; }
.k-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2mm; }
.k-box { border: .3mm solid #cfd8d6; border-radius: 2mm; padding: 2mm; } .k-box small { display: block; font-size: 7.5pt; color: #555; font-weight: 700; }
.k-box b { display: block; font-size: 14pt; margin-top: .5mm; } .k-box span { font-size: 7.5pt; color: #555; }
.k-t { width: 100%; border-collapse: collapse; } .k-t th, .k-t td { border-bottom: .2mm solid #ddd; padding: 1.2mm 1.5mm; text-align: left; }
.k-t th { font-size: 8pt; color: #555; } .k-t .up { color: #15803d; font-weight: 700; } .k-t .down { color: #dc2626; font-weight: 700; } .k-sum td { font-weight: 700; border-top: .4mm solid #999; }
.k-chart { width: 100%; height: 30mm; display: block; margin-bottom: 2mm; }
.k-two { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; } .k-muted { color: #666; } .karne ul { margin: 1mm 0 0 4mm; padding: 0; }
.k-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 20mm; margin-top: 10mm; text-align: center; } .k-sign div { border-top: .3mm solid #999; padding-top: 2mm; color: #555; }
/* Takipler: çevrimdışı kuyruk ve telefon görünümü (büyük, tek elle basılan düğmeler) */
.trk-queue { background: #fff7e6; border: 1px solid #f5c26b; color: #8a5a00; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
@media (max-width: 640px) {
  .rc-row { padding: 12px; gap: 8px; }
  .rc-row .who-cell { min-width: 0; width: 100%; }
  .opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
  .opt { flex-direction: column; justify-content: center; gap: 2px; min-height: 54px; padding: 8px 2px; font-size: 12.5px; border-radius: 12px; }
  .opt i { font-size: 19px; opacity: 1; }
  .opt.on { padding: 7px 1px; }
  .chips { position: sticky; top: 0; z-index: 5; background: var(--bg, #f6f7f9); padding: 8px 0; margin: 0 -2px 10px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .chips .chip { flex-shrink: 0; }
  .trk-pills { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .trk-pills button { flex-shrink: 0; }
  .trk-head .acts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .trk-head .acts .btn { min-height: 46px; }
}
.key-scan { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.key-scan small { flex: 1; min-width: 220px; }

/* Takipler: ana yönetici sekmeleri sürükleyerek sıralar */
.tabbar.sortable a { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tabbar.is-sorting a { cursor: grabbing; }
.tabbar a.dragging { opacity: .85; background: var(--ok-soft, #e7f6ef); border-radius: 8px 8px 0 0; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
/* Workwin Takip: öğrenci kartının sağında ders özeti */
.faz-right { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
.faz-sum { position: sticky; top: 12px; }
.faz-sum h2 { margin: 0 0 12px; }
.faz-sum-stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 12px; }
.faz-sum-stats .stat b { font-size: 22px; }
.faz-sum .t td, .faz-sum .t th { padding-left: 8px; padding-right: 8px; }
.faz-sum-total td { border-top: 2px solid var(--line); background: var(--bg); }
@media (max-width: 1250px) { .faz-right { grid-template-columns: minmax(0, 1fr); } .faz-sum { position: static; } }
/* ===== Arayüz düzeltmeleri (2026-11-18) ===== */
.confirm-text { white-space: pre-line; line-height: 1.6; }
/* Etiketli filtreler (Öğrenciler) */
.toolbar.filters { align-items: flex-end; }
.filter { display: grid; gap: 4px; min-width: 0; }
.filter > span { font-size: 12.5px; font-weight: 600; color: #33405a; }
.filter.grow { flex: 1 1 260px; }
.filter .input { width: 100%; }
.stu-filters select.input { min-width: 150px; }
.show-sm { display: none !important; }
.stu-head { align-items: flex-start; flex-wrap: wrap; }
.stu-qr { margin: 0; text-align: center; }
.stu-qr svg { width: 108px; height: 108px; display: block; border: 1px solid var(--line); border-radius: 8px; }
.stu-qr figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* Kantin: telefonda alttaki sepet çubuğu */
.kantin-acts .input { width: 220px; }
.cartbar { display: none; }
@media (max-width: 1100px) {
  .cartbar:not([hidden]) { display: flex; position: sticky; bottom: 10px; z-index: 20; margin-top: 14px; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--side); color: #fff; box-shadow: 0 10px 30px rgba(16, 24, 40, .3); }
  .cartbar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .kantin { gap: 14px; }
}
/* Telefon ve küçük tablet */
@media (max-width: 860px) {
  .topbar { padding: 12px 16px; min-height: 56px; }
  .toolbar .input { min-width: 0; }
  .toolbar > select.input, .toolbar > .grow, .toolbar > input[type=search] { flex: 1 1 160px; max-width: none !important; }
  .page-head .acts { width: 100%; }
  /* Takipler: altı sekmenin hepsi görünür (ızgara) */
  .tabbar.trk-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; border-bottom: 0; overflow: visible; }
  .tabbar.trk-tabs a { margin: 0; padding: 9px 6px; text-align: center; white-space: normal; line-height: 1.2; font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: grid; place-items: center; min-height: 44px; }
  .tabbar.trk-tabs a.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
  /* Diğer sekme çubukları kaydırılabilir: kenarlarda devamı olduğunu gösteren gölge */
  .tabbar:not(.trk-tabs) { mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); padding: 0 8px; }
  /* Kantin */
  .kantin-acts { display: grid !important; grid-template-columns: 1fr; }
  .kantin-acts .input { width: 100%; }
  .kantin-cats { position: static; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .pcard .pimg { height: 72px; font-size: 38px; }
  .qty button { width: 40px; height: 40px; }
  .cline .qty { width: 124px; }
  /* E-Okul: ders adı sütunu kaydırırken sabit kalır */
  .t.grades td.wrapcell, .t.grades th:first-child { position: sticky; left: 0; background: #fff; z-index: 2; min-width: 120px; max-width: 150px; box-shadow: 1px 0 0 var(--line); }
  .t.grades th:first-child { background: #f5f6f8; z-index: 3; }
}
@media (max-width: 640px) {
  .stu-table .opt-col { display: none; }
  .show-sm { display: inline-flex !important; }
  .stu-filters .filter, .stu-filters .filter.grow { flex: 1 1 100%; }
  .stu-filters label.badge { margin-bottom: 0 !important; }
  .stu-tools { gap: 6px; }
  .stu-tools .btn { flex: 1 1 calc(50% - 6px); }
  .stu-table td, .stu-table th { padding: 9px 8px; }
  .stu-table .who-cell b { white-space: normal; }
  .tabbar.trk-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .datebox { flex: 1 1 100%; }
  .datebox .input { flex: 1; }
  .datebox .btn { min-width: 44px; min-height: 42px; }
  .toolbar > select.input { flex: 1 1 100%; min-height: 42px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 22px; }
  .page-head h2 { font-size: 20px; }
}
/* Kullanıcılar: toplu oturum kapatma ayrı bir güvenlik alanında */
.danger-zone { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1px solid #f1c3be; border-left: 4px solid var(--danger); background: #fffafa; }
.danger-zone > div { flex: 1 1 320px; }
.danger-zone h2 { color: var(--danger); margin-bottom: 4px; }
.dz-warn { background: var(--danger-soft); color: #8f241c; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 0 0 12px; }
/* Bakiye işlemleri: yükleme / iade / tahsilat ayrı renklerle */
.btn.k-topup { color: var(--ok); border-color: #b7dcc4; }
.btn.k-refund { color: var(--info); border-color: #bccbea; }
.btn.k-charge { color: var(--warn); border-color: #f0cf9f; }
.k-topup-t { color: var(--ok); } .k-refund-t { color: var(--info); } .k-charge-t { color: var(--warn); }
.wallet-acts { white-space: nowrap; }
/* Satış raporu: seçili aralık ve satıcı */
.sr-scope { display: flex; gap: 8px 18px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; background: var(--brand-soft); color: #0b4a43; font-size: 14px; }
.sr-scope:empty { display: none; }
/* Ayarlar: bölüm kısayolları */
.set-nav { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 4px 0 12px; }
.set-nav a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
.set-nav a:hover { border-color: var(--brand); color: var(--brand); }
#general:focus, #backup:focus, [id^=set-]:focus { outline: none; box-shadow: 0 0 0 3px rgba(18, 118, 107, .25); }
/* Kapı / Program ekranı: önizleme, ayarlar ve gerçek ekranı açma ayrı */
.kiosk-h { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.kiosk-h small { font-weight: 400; font-size: 13px; }
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; flex: none; }
.screen-open { align-items: center; padding: 8px 10px; border: 1px dashed #b7c4d6; border-radius: 12px; background: #fff; }
.screen-open .muted { font-size: 13px; }
/* KTS listesi: tarih, sınıf ve giriş durumu öne çıkar */
.exam-card .ex-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.exam-card .ex-date { font-size: 13px; font-weight: 700; color: var(--ink); background: #eef1f5; border-radius: 8px; padding: 3px 9px; }
.exam-card .ex-cls { font-size: 13px; font-weight: 700; color: var(--info); background: var(--info-soft); border-radius: 8px; padding: 3px 9px; }
/* Workwin Takip: seçim özeti */
.faz-sel { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; padding: 8px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--brand-soft); color: #0b4a43; font-size: 14px; }
.faz-sel b { color: var(--ink); }
.faz-layout { grid-template-columns: 300px minmax(0, 1fr); }
@media (max-width: 1100px) { .faz-layout { grid-template-columns: 1fr; } .faz-layout #students { max-height: 46vh; overflow: auto; } }
@media (max-width: 860px) {
  .t.yr td:first-child, .t.yr th:first-child { position: sticky; left: 0; background: #fff; z-index: 2; box-shadow: 1px 0 0 var(--line); white-space: normal; min-width: 110px; }
  .t.yr th:first-child { background: #f5f6f8; }
  .t.yr td, .t.yr th { padding: 8px; }
  .gin { width: 50px; padding: 8px 2px; }
}
@media (max-width: 640px) {
  .stu-table td, .stu-table th { white-space: normal; }
  .stu-table td:last-child { width: 1%; }
  .stu-table td:last-child .btn { display: flex; width: 100%; margin: 3px 0; }
  .stu-table .avatar.sm { display: none; }
}
label.badge { white-space: normal; max-width: 100%; }
@media (max-width: 640px) {
  .wallet-acts { white-space: normal; width: 1%; }
  .wallet-acts .btn { display: flex; width: 100%; margin: 3px 0; }
  #rows .t td, #rows .t th { white-space: normal; padding: 9px 8px; }
  #rows .avatar.sm { display: none; }
}
/* Sol menü: kaydırma çubuğu görünmez (fare tekerleği / dokunma ile kaydırma sürer); dar menüde aralıklar sıkı */
.sidebar { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }
@media (min-width: 861px) {
  body.nav-collapsed .nav .sep { margin: 7px 8px; }
  body.nav-collapsed .nav a { padding: 8px 13px; }
}
/* Sol üst logo: ana sayfaya bağlantı */
a.brand { text-decoration: none; border-radius: 12px; }
a.brand:hover .brand-logo { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
@media (prefers-reduced-motion: reduce) { .sidebar, .nav a, .sidebar .brand > div, .nav a > span { transition: none !important; } }
/* Veli paneli erişimi (öğrenci kartı) */
.veli-people { display: grid; gap: 8px; }
.veli-people .btn { justify-content: flex-start; white-space: normal; text-align: left; }
.veli-issued { border: 1px solid #a9d6cd; background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; }
.veli-code { font-size: 24px; letter-spacing: .2em; font-variant-numeric: tabular-nums; color: var(--brand); }

/* Öğrenciler · Kart görünümü (Workwin Takip öğrenci kartlarıyla aynı) */
.stu-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stu-cards .item { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.stu-cards .item:hover { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(18, 118, 107, .18); }

/* İki adımlı giriş (mail kodu) */
.mfa-code { font-size: 26px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.form-info { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.mfa-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.mfa-timer { position: relative; width: 96px; height: 96px; margin: 4px auto 14px; display: grid; place-items: center; text-align: center; }
.mfa-timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.mfa-timer circle { fill: none; stroke-width: 3; }
.mfa-timer .bg { stroke: #e6eaf1; }
.mfa-timer .fg { stroke: var(--brand, #12766b); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .2s; }
.mfa-timer b { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 18px; }
.mfa-timer small { font-size: 11px; color: var(--muted); margin-top: -18px; }
.mfa-timer.low .fg { stroke: var(--warn, #b7791f); }
.mfa-timer.low b { color: var(--warn, #b7791f); }
.mfa-timer.done .fg { stroke: var(--danger, #c53030); }
.mfa-timer.done b { color: var(--danger, #c53030); }
.mfa-code:disabled { opacity: .5; }
/* Web Sitesi > Kulüpler: afiş ve kulüp düzenleme */
.poster-edit { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 4px 0 6px; }
.poster-edit img { width: 150px; aspect-ratio: 1199 / 1312; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f1f4f8; }
.poster-edit > div { flex: 1; min-width: 220px; }
.club-edits { display: grid; gap: 12px; }
.club-edit { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.club-edit-img { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.club-edit-img img, .club-edit-img > span { width: 140px; height: 140px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: #f1f4f8; }
.club-edit-img > span { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.club-edit .field { margin-bottom: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
label.btn.busy { opacity: .6; pointer-events: none; }
label.btn.busy::after { content: "…"; }
@media (max-width: 700px) {
  .club-edit { grid-template-columns: 1fr; }
  .club-edit-img { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .club-edit-img img, .club-edit-img > span { width: 96px; height: 96px; }
  .row3 { grid-template-columns: 1fr 1fr; }
}