:root {
  /* Renkler FIEM logosundan: koyu yeşil #123D1F, açık yeşil #47A33A */
  --bg: #f3f7f1;
  --surface: #ffffff;
  --ink: #13201a;
  --muted: #56685c;
  --line: #d6e2d1;
  --brand: #14421f;
  --brand-hover: #1c5a2b;
  --brand-ink: #ffffff;
  --brand-soft: #e7f3e2;
  --brand-light: #47a33a;
  --ok: #35862c; /* geldi / ezberledi / çok iyi (beyaz yazı okunabilsin diye biraz koyu) */
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; color: var(--brand); }
h1 { font-size: 1.5rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
a { color: var(--brand); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }

/* üst çubuk */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 16px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--surface); color: var(--brand);
  border-bottom: 3px solid var(--brand-light); box-shadow: 0 2px 10px rgba(18,61,31,.06);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; text-decoration: none; color: var(--brand); }
.brand img { height: 56px; width: auto; display: block; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
@media (max-width: 640px) { .brand span { display: none; } }
.top-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-chip {
  display: flex; flex-direction: column; align-items: flex-end; border: 0; cursor: pointer;
  background: var(--brand-soft); color: var(--brand); padding: 5px 10px; border-radius: 10px; font: inherit; font-size: .9rem; font-weight: 650;
}
.user-chip small { font-weight: 500; color: var(--muted); font-size: .75rem; }
.lang-switch { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--line); }
.lang-switch button { border: 0; background: transparent; color: var(--brand); font: inherit; font-size: .8rem; font-weight: 650; padding: 5px 8px; cursor: pointer; }
.lang-switch button.on { background: var(--brand); color: #fff; }

/* sekmeler */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px 0; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a {
  padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.tabs a.on { color: var(--brand); border-color: var(--brand-light); }

.container { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }

/* giriş */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 20% 10%, var(--brand-soft), transparent 50%), radial-gradient(circle at 85% 90%, #e2f0dc, transparent 45%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px; padding: 28px 24px; box-shadow: var(--shadow); border-top: 5px solid var(--brand-light); }
.auth-top { display: flex; justify-content: flex-end; }
.auth-logo { width: 220px; max-width: 70%; height: auto; display: block; margin: 0 auto 16px; }
.auth-card h1.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.auth-card h1 { text-align: center; margin-bottom: 16px; }

/* formlar */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 400; color: var(--ink);
  background: #fff; border: 1.5px solid #c5cbc5; border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231d2521' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type=checkbox], input[type=radio] { display: inline; width: 20px; height: 20px; min-height: 0; margin: 0 8px 0 0; vertical-align: -4px; accent-color: var(--brand); }
label.check { font-weight: 400; display: flex; align-items: flex-start; gap: 2px; }
label.check input { flex-shrink: 0; margin-top: 2px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 4px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; color: var(--brand); }
fieldset.consent { background: #f4f9f1; border-color: #c6dfbd; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.seg label { font-weight: 500; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.seg label.disabled { opacity: .5; cursor: default; }
.form-error { color: var(--danger); font-weight: 600; min-height: 1em; margin: 4px 0; }
.form-error:empty { display: none; }

/* düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1.5px solid var(--brand); background: #fff; color: var(--brand);
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--brand-soft); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.sm { min-height: 34px; padding: 0 10px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.icon-btn { border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; padding: 6px 10px; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: var(--bg); }
.actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.actions.stack { flex-direction: column; } .actions.stack .btn { width: 100%; }

/* araç çubuğu ve tablolar */
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { margin: 0; max-width: 340px; flex: 1; min-width: 180px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tbl th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); background: #f1f7ee; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.off { opacity: .55; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions .btn { margin-left: 4px; }
@media (max-width: 760px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: 8px 4px; }
  .tbl td { border: 0; padding: 4px 10px; }
  .tbl td[data-l]::before { content: attr(data-l); display: block; font-size: .72rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
  .row-actions { text-align: left; white-space: normal; }
  .row-actions .btn { margin: 4px 4px 0 0; }
}
.pill { display: inline-block; font-size: .75rem; font-weight: 650; padding: 2px 8px; border-radius: 99px; background: #eef0ec; color: var(--muted); }
.pill.ok { background: var(--brand-soft); color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; background: var(--surface); border-radius: var(--radius); border: 1.5px dashed var(--line); }
.note { background: #edf6e9; border-left: 4px solid var(--brand-light); padding: 10px 14px; border-radius: 8px; color: var(--brand); }

/* kartlar ve özet */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-decoration: none; color: var(--muted); font-weight: 600; }
.stat span { display: block; font-size: 2rem; color: var(--brand); font-weight: 750; }
.stat { border-bottom: 3px solid var(--brand-light); }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid transparent; }
.card.link { text-decoration: none; color: inherit; }
.card.link:hover { border-color: var(--brand); }
.card.off { opacity: .55; }
.card p { margin: 4px 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-actions { display: flex; gap: 6px; margin-top: 10px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); max-width: 640px; }
.back { display: inline-block; margin-bottom: 10px; text-decoration: none; font-weight: 600; }
.loading { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, #eceee9, #f5f6f3, #eceee9); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* ders saatleri */
.slot { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.slot select { flex: 1.4; margin: 0; } .slot input { flex: 1; margin: 0; min-width: 0; }

/* pencere */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink); }
dialog.wide { width: min(720px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(18,61,31,.45); }
.dlg-head h2 { color: var(--brand); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.dlg-head h2 { margin: 0; font-size: 1.15rem; }
.dlg-body { padding: 16px 20px 20px; }
.cred-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: var(--brand-soft); border-radius: 10px; margin-bottom: 8px; }
.cred-row .mono { font-size: 1.05rem; font-weight: 700; }
details.preview { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
details.preview summary { cursor: pointer; font-weight: 600; color: var(--brand); }
details.preview .letter { font-size: .85rem; padding: 12px 0 0; }

/* bildirim */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 1000; box-shadow: var(--shadow); font-weight: 600; max-width: calc(100vw - 32px); }
.toast.err { background: var(--danger); }

/* mektup */
.letter { color: #000; font-family: Georgia, "Times New Roman", serif; line-height: 1.5; }
.letter-logo { width: 90px; height: auto; display: block; margin-bottom: 6px; }
.letter-head { display: flex; justify-content: space-between; gap: 20px; font-size: .9em; border-bottom: 1px solid #999; padding-bottom: 10px; margin-bottom: 30px; }
.letter-head .right { text-align: right; white-space: nowrap; }
.letter-addr { margin-bottom: 30px; min-height: 4em; }
.letter h3 { font-size: 1.05em; margin: 0 0 16px; }
.letter .cred { border: 1.5px solid #000; border-radius: 6px; padding: 10px 14px; margin: 14px 0; break-inside: avoid; }
.letter .cred-label { font-weight: bold; margin-bottom: 6px; }
.letter .cred table td { padding: 2px 16px 2px 0; }
.letter .cred .mono { font-size: 1.2em; font-weight: bold; }
.letter .sign { margin-top: 30px; }
#printArea { display: none; }
@media print {
  body > *:not(#printArea) { display: none !important; }
  html, body { background: #fff !important; }
  #printArea { display: block !important; padding: 15mm 18mm; font-size: 11pt; }
  @page { size: A4; margin: 0; }
}

/* zil ve bildirimler */
.bell { position: relative; border: 0; background: var(--brand-soft); color: var(--brand); font-size: 1.1rem; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.bell .badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e53935; color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; background: var(--bg); }
.notif-list li.unread { background: var(--brand-soft); border-left: 4px solid var(--brand); font-weight: 600; }
.section-title { margin-top: 26px; }

/* yoklama */
label.inline { margin: 0; }
label.inline input { min-width: 170px; }
.att-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.att-row { display: grid; grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr); gap: 10px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); }
.att-name { font-weight: 650; }
.att-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.att-btn { min-height: 46px; min-width: 84px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 650; cursor: pointer; color: var(--ink); }
.att-btn.on.present { background: var(--ok); border-color: var(--ok); color: #fff; }
.att-btn.on.absent { background: var(--danger); border-color: var(--danger); color: #fff; }
.att-btn.on.late { background: #ef8f00; border-color: #ef8f00; color: #fff; }
.att-btn.on.excused { background: #1e6fb8; border-color: #1e6fb8; color: #fff; }
.att-note { margin: 0; min-height: 40px; }
@media (max-width: 760px) {
  .att-row { grid-template-columns: 1fr; }
  .att-btns { display: grid; grid-template-columns: 1fr 1fr; }
  .att-btn { min-width: 0; }
}
.att-summary { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.att-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.att-count { text-align: center; font-size: .75rem; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 6px 2px; }
.att-count b { display: block; font-size: 1.2rem; }
.att-count.present b { color: var(--ok); } .att-count.absent b { color: var(--danger); }
.att-count.late b { color: #ef8f00; } .att-count.excused b { color: #1e6fb8; }
.att-days { list-style: none; padding: 0; margin: 6px 0 0; font-size: .9rem; }
.att-days li { padding: 3px 0; }
.att-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.att-dot.absent { background: var(--danger); } .att-dot.late { background: #ef8f00; } .att-dot.excused { background: #1e6fb8; }

/* sınıf alt sekmeleri */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.subtabs a { padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; font-size: .92rem; }
.subtabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ezber */
.bar { height: 8px; border-radius: 99px; background: #e8ebe6; overflow: hidden; margin: 4px 0 2px; max-width: 220px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-light), var(--ok)); border-radius: 99px; }
.memo-list { list-style: none; padding: 0; margin: 0 0 16px; counter-reset: m; }
.memo-list li { counter-increment: m; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 6px; box-shadow: var(--shadow); }
.memo-info::before { content: counter(m) ". "; font-weight: 700; color: var(--muted); }
.memo-tools { display: flex; gap: 2px; flex-shrink: 0; }
.memo-tools .icon-btn:disabled { opacity: .3; cursor: default; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.inline-form input, .inline-form select { margin: 0; flex: 1; min-width: 160px; }
.memo-rows { display: flex; flex-direction: column; gap: 6px; }
.memo-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--radius); padding: 8px 12px; box-shadow: var(--shadow); }
.memo-name { font-weight: 650; }
.st-btns { display: flex; gap: 6px; flex-shrink: 0; }
.st-btn { min-height: 44px; min-width: 92px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 650; font-size: .9rem; cursor: pointer; color: var(--ink); }
.st-btn.on.none { background: #eef0ec; border-color: #c5cbc5; }
.st-btn.on.learning { background: #ef8f00; border-color: #ef8f00; color: #fff; }
.st-btn.on.done { background: var(--ok); border-color: var(--ok); color: #fff; }
@media (max-width: 760px) {
  .memo-row { flex-direction: column; align-items: stretch; }
  .st-btns { display: grid; grid-template-columns: repeat(3, 1fr); }
  .st-btn { min-width: 0; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { background: var(--brand-soft); color: var(--brand); border-radius: 99px; padding: 3px 10px; font-size: .85rem; font-weight: 600; }
.pill.grade-good { background: #e3f1e4; color: var(--ok); } .pill.grade-ok { background: #e6eef8; color: #1e6fb8; } .pill.grade-repeat { background: #fdeee0; color: #b35c00; }

/* Kur'an formu ve plan */
.panel.wide { max-width: none; margin-bottom: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 620px) { .row3 { grid-template-columns: 1fr; gap: 0; } }
.week-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
@media (max-width: 520px) { .week-nav .wk-label { display: none; } .week-nav .btn { min-width: 44px; } }
.plan-day { background: var(--surface); }
.plan-day.today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.plan-box { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.plan-box .hw { margin-top: 4px; }
.card.todo { border-color: var(--brand-light); background: #f7fbf5; margin-top: 12px; }
.card + .card { margin-top: 12px; }

/* ses kayıtları */
.rec-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.rec-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.card .rec-item { background: var(--bg); border: 0; }
.rec-item.new { border-left: 4px solid var(--brand-light); }
.rec-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; }
.rec-item audio { width: 100%; height: 40px; margin: 8px 0 4px; display: block; }
.rec-review { margin-top: 4px; }
.rec-grades { margin: 6px 0; }
.st-btn.on.grade.good { background: var(--ok); border-color: var(--ok); color: #fff; }
.st-btn.on.grade.ok { background: #1e6fb8; border-color: #1e6fb8; color: #fff; }
.st-btn.on.grade.repeat { background: #ef8f00; border-color: #ef8f00; color: #fff; }
.rec-fb { margin: 4px 0 0; }
.rec-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px; background: var(--bg); border-radius: var(--radius); margin-bottom: 8px; }
.rec-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 24px; border-radius: 99px; border: 0; background: var(--danger); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.rec-btn .dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.rec-btn.on .dot { border-radius: 3px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--muted); }
.rec-box audio { width: 100%; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; font-weight: 600; }
label.file-pick { margin: 0; font-size: .9rem; }
.pill.new { background: var(--brand-light); color: #fff; }
.warn { color: var(--danger); font-weight: 600; }
.task-btn { margin: 8px 0 4px; white-space: normal; text-align: center; padding: 8px 14px; }
.task-done { color: var(--ok); font-weight: 600; }
.rec-target { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; }
.rec-item.req { border-left: 4px solid var(--brand-light); }
#askRec { margin: 8px 0; }

/* sınavlar */
.exam-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.exam-row { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto minmax(140px, 1fr); gap: 10px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); }
.exam-name { font-weight: 650; }
.exam-score { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.exam-score input { width: 90px; margin: 0; font-size: 1.1rem; font-weight: 700; text-align: center; }
.exam-score input:disabled { background: #eef0ec; }
.exam-abs { margin: 0; }
.exam-row .nt { margin: 0; min-height: 40px; }
@media (max-width: 760px) { .exam-row { grid-template-columns: 1fr auto; } .exam-row .nt { grid-column: 1 / -1; } .exam-name { grid-column: 1 / -1; } }
.exam-results { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.exam-res { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.exam-pts b { font-size: 1.2rem; color: var(--brand); }
.btn.ghost.danger { border-color: var(--danger); color: var(--danger); }

/* online kayıt */
.auth-card.wide { max-width: 640px; }
.auth-logo.small { width: 150px; }
.apply-link { margin-top: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.app-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-light); border-radius: var(--radius); padding: 10px 12px; }
.app-card.approved, .app-card.rejected { border-left-color: var(--line); opacity: .85; }
.app-details > div { margin: 3px 0; }
.app-card label { margin: 8px 0 0; }
.pill.kind-admin { background: var(--brand); color: #fff; } .pill.kind-teacher { background: var(--brand-light); color: #fff; } .pill.kind-student { background: var(--brand-soft); color: var(--brand); }
.link-row { display: flex; gap: 6px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.link-row input { flex: 1; min-width: 180px; margin: 0; font-size: .85rem; min-height: 36px; }
.link-label { font-weight: 650; min-width: 110px; font-size: .9rem; }
.acc-row { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.pending-link { display: block; text-decoration: none; font-weight: 650; margin-bottom: 14px; }
.sign-label { margin-top: 10px; }
.sign-label input { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive; font-size: 1.3rem; }
.level-q { margin-bottom: 12px; }
.level-label { font-weight: 650; font-size: .92rem; margin-bottom: 6px; }
.level-q .seg { margin-bottom: 0; }
.level-q .seg label { font-size: .9rem; }
.level-box { background: var(--brand-soft); border-radius: 8px; padding: 6px 10px; margin: 6px 0; line-height: 1.6; }

/* ---------- simgeler ---------- */
.ic { width: 1.1em; height: 1.1em; vertical-align: -.18em; flex-shrink: 0; }
.btn .ic, .menu-item .ic { width: 1.15em; height: 1.15em; }
.bell .ic { width: 22px; height: 22px; vertical-align: middle; }
.icon-btn .ic { width: 20px; height: 20px; vertical-align: middle; }
.card p .ic, .muted .ic, .app-details .ic { color: var(--brand-light); }
.subtabs a .ic { width: 1em; height: 1em; }
.back { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- telefonda ☰ menü ---------- */
.menu-btn { display: none; border: 0; background: var(--brand-soft); color: var(--brand); width: 42px; height: 42px; border-radius: 10px; cursor: pointer; flex-shrink: 0; }
.menu-btn .ic { width: 24px; height: 24px; vertical-align: middle; }
.only-mobile { display: none !important; }
dialog.drawer { margin: 0; top: 0; left: 0; height: 100%; max-height: 100%; width: min(320px, 86vw); border-radius: 0 18px 18px 0;
  display: flex; flex-direction: column; padding: 0; animation: slideIn .18s ease-out; }
dialog.drawer:not([open]) { display: none; }
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); border-bottom: 3px solid var(--brand-light); }
.drawer-head img { height: 44px; }
.drawer-head > div { flex: 1; min-width: 0; }
.drawer-head b { color: var(--brand); }
.drawer-nav { flex: 1; overflow-y: auto; padding: 8px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 10px; color: var(--ink); text-decoration: none;
  font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-item .ic { color: var(--brand-light); }
.menu-item:hover { background: var(--bg); }
.menu-item.on { background: var(--brand); color: #fff; }
.menu-item.on .ic { color: #fff; }
.menu-item.sub { padding-left: 22px; font-weight: 550; }
.menu-item.danger, .menu-item.danger .ic { color: var(--danger); }
.menu-group { margin: 12px 12px 4px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 8px 8px max(10px, env(safe-area-inset-bottom)); }
.drawer-lang { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: var(--brand-light); }
.mobile-title { padding: 10px 16px 0; }
.mobile-title button, .section-pill { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--brand);
  font: inherit; font-weight: 700; padding: 8px 12px; border-radius: 99px; cursor: pointer; }
.mobile-title button { font-size: 1.05rem; }
.class-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.class-title h2 { margin: 0; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .desk-only { display: none !important; }
  .only-mobile { display: inline-flex !important; }
  .mobile-title.only-mobile { display: block !important; }
  .tabs, .subtabs { display: none !important; }
  .topbar { gap: 8px; }
  .brand img { height: 48px; }
  .container { padding-top: 14px; }
}

/* ---------- telefonda kısa listeler ---------- */
@media (max-width: 760px) {
  .tbl tr { padding: 10px 14px; }
  .tbl td { padding: 2px 0; }
  .tbl td[data-l]::before { display: inline; content: attr(data-l) ": "; text-transform: none; letter-spacing: 0; font-size: .82rem; }
  .tbl td:first-child { font-size: 1.02rem; padding-bottom: 4px; }
  .tbl td:first-child::before, .tbl td[data-l="#"] { display: none !important; }
  .tbl td .muted.small, .tbl td div.small { display: inline; margin-left: 4px; }
  .tbl td:first-child div.small { display: block; margin-left: 0; }
  .row-actions { padding-top: 6px !important; }
}

/* veli: çocuk seçimi */
.child-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.child-switch button { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--brand); font: inherit; font-weight: 700; padding: 9px 16px; border-radius: 99px; cursor: pointer; }
.child-switch button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dot-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.cards.one-child { grid-template-columns: minmax(0, 640px); }
/* hoca: bugün dersi olan sınıf */
.card.today { border-color: var(--brand-light); box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow); }
.card h3 a { color: inherit; text-decoration: none; }
.pill .ic, .card p .pill .ic { color: inherit; }
/* telefonda sayfa adı: sadece başlık (menü sol üstte) */
.mobile-title h2 { margin: 0; font-size: 1.25rem; }
.section-label { align-items: center; gap: 6px; font-weight: 700; color: var(--brand-light); font-size: .95rem; }
.send-box { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--brand-soft); }
.send-box p { margin: 0 0 6px; }
/* pencerelerde uzun düğmeler taşmasın */
.dlg-body .btn { white-space: normal; text-align: center; max-width: 100%; }
@media (max-width: 520px) { .dlg-body .actions .btn.primary { flex: 1 1 auto; } }

/* şifreyi göster / gizle */
.pw-wrap { position: relative; display: block; margin-top: 5px; }
.pw-wrap input { margin-top: 0; padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none;
  color: var(--muted); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pw-eye:hover { background: var(--bg); color: var(--brand); }
.pw-eye .ic { width: 22px; height: 22px; }

/* iPhone: 16 pikselden küçük yazılı kutuya dokununca sayfa büyür ve geri küçülmez → kutular en az 16px */
input, select, textarea { font-size: max(16px, 1rem); }
body { overflow-x: clip; } /* yana taşan bir şey sayfayı kaydırmasın (üst çubuğun sabit kalmasını bozmaz) */

/* ---------- tablet ve dokunmatik ekranlar ---------- */
/* altta sabit kaydet çubuğu (yoklama, ders planı, sınav) */
.sticky-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 12px -16px 0; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); border-top: 2px solid var(--brand-light); box-shadow: 0 -4px 14px rgba(18,61,31,.08); backdrop-filter: blur(6px); }
.sticky-bar .btn.primary { min-width: 140px; }
.att-tally { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .9rem; }
.tally b { font-size: 1.05rem; }
.tally.present b { color: var(--ok); } .tally.absent b { color: var(--danger); } .tally.late b { color: #ef8f00; } .tally.excused b { color: #1e6fb8; }
.tally.left { color: var(--danger); font-weight: 600; }
/* öğrenci sayfası: önceki / sonraki */
.student-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 6px; }
.student-nav h2 { margin: 0; }
.student-nav > :last-child { justify-self: end; }
.student-nav > :first-child { justify-self: start; }
@media (max-width: 520px) { .student-nav .btn { padding: 0 10px; } }
/* parmakla dokunulan ekranlar (tablet, telefon): düğmeler büyük */
@media (pointer: coarse) {
  .btn { min-height: 48px; }
  .btn.sm { min-height: 44px; padding: 0 14px; font-size: .92rem; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .att-btn { min-height: 54px; font-size: 1rem; }
  .st-btn { min-height: 50px; }
  .tabs a { padding: 14px 16px; }
  .subtabs a { padding: 11px 16px; }
  .menu-item { padding: 13px 12px; }
  .exam-score input { min-height: 50px; }
  input[type=checkbox], input[type=radio] { width: 24px; height: 24px; }
}
/* tablet (dik): yoklama satırında not kutusu daha kısa, düğmeler geniş */
@media (min-width: 761px) and (max-width: 1100px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .att-row { grid-template-columns: minmax(130px, 1fr) auto minmax(110px, .7fr); }
  .att-btn { min-width: 92px; }
  .sticky-bar { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .subtabs { gap: 5px; }
  .subtabs a { padding-left: 11px; padding-right: 11px; }
}
@media (max-width: 520px) {
  .sticky-bar { flex-wrap: nowrap; }
  .att-tally { font-size: .76rem; gap: 2px 8px; flex: 1; min-width: 0; }
  .tally b { font-size: .95rem; }
  .sticky-bar .btn.primary { min-width: 0; flex-shrink: 0; }
}

/* ders defteri */
.log-row { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-light); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
.log-top { display: flex; gap: 8px; align-items: center; }
.log-top select { margin: 0; flex: 1; min-width: 0; }
.lg-min { display: flex; align-items: center; gap: 4px; }
.lg-min input { width: 84px; margin: 0; text-align: center; font-weight: 700; }
.lg-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip-btn { border: 1.5px solid var(--line); background: var(--bg); color: var(--brand); font: inherit; font-weight: 650; font-size: .88rem; border-radius: 99px; padding: 6px 12px; cursor: pointer; min-height: 36px; }
.chip-btn:hover { border-color: var(--brand-light); }
.lg-content { margin: 0; }
.log-note { margin-top: 12px; }
.note-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.log-list { display: flex; flex-direction: column; gap: 10px; }
.log-card { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.log-items { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.log-items td { padding: 5px 6px; border-top: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
.li-sub { font-weight: 650; color: var(--brand); white-space: nowrap; width: 1%; }
.li-min { white-space: nowrap; width: 1%; color: var(--muted); }
@media (max-width: 520px) { .log-items tr { display: grid; grid-template-columns: 1fr auto; } .log-items td:last-child { grid-column: 1 / -1; border-top: 0; padding-top: 0; } }
.missing-box { background: #fdf1f0; border: 1px solid #f0c9c6; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
.missing-box summary { font-weight: 700; color: var(--danger); cursor: pointer; }
.missing-box ul { margin: 8px 0 0; padding-left: 18px; }
.missing-box li { padding: 2px 0; }
.log-filter label { margin: 0; }
.log-filter input, .log-filter select { margin-top: 4px; }
/* Genel: bugünkü dersler */
.today-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.today-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.today-st { display: flex; gap: 6px; flex-wrap: wrap; }
.pill.warn-pill { background: #fdecea; color: var(--danger); }

/* ders sayfası */
.lesson-step { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 14px; border-left: 4px solid var(--brand-light); }
.lesson-step.todo { border-left-color: var(--danger); }
.lesson-step.done { border-left-color: var(--ok); }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.step-head h3 { margin: 0; }
.step-no { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lesson-step p { margin: 6px 0; }
.lesson-step .tally { margin-right: 8px; }
.slot-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: #fbfdfa; }
.slot-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 4px; }
.slot-time { font-weight: 700; color: var(--brand); }
.last-time { font-size: .92rem; background: var(--brand-soft); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.slot-card textarea, .slot-card select { margin: 6px 0; }
.slot-card .lg-min { justify-content: flex-end; }
.track-list { display: flex; flex-direction: column; gap: 4px; }
.track-row { display: grid; grid-template-columns: auto minmax(120px, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 10px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); min-height: 48px; }
.track-row:hover { background: var(--bg); }
.track-name { font-weight: 650; }
.track-go { color: var(--brand-light); font-size: 1.4rem; font-weight: 700; }
@media (max-width: 520px) { .track-row { grid-template-columns: auto 1fr auto; } .track-info { grid-column: 2 / 3; grid-row: 2; } .track-go { grid-row: 1 / 3; grid-column: 3; } }
.att-dot.none { background: #c5cbc5; } .att-dot.present { background: var(--ok); }
.back-lesson { margin-bottom: 10px; }
.notif-list li a { color: inherit; text-decoration: none; display: block; }
.notif-list li.alert { border-left-color: var(--danger); }
/* sınıf formu: ders saati kartı */
.slot-card-form { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
.slot-card-form > .slot { margin-bottom: 6px; }
.slot-extra { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 6px; }
.slot-extra select, .slot-extra input { margin: 0; }
@media (max-width: 520px) { .slot-extra { grid-template-columns: 1fr; } }

/* Ders türleri (Ayarlar) */
.subject-list { display: grid; gap: 8px; margin: 8px 0 12px; }
.subject-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.subject-row input { flex: 1 1 160px; min-width: 0; }
.subject-row.inactive input { opacity: .55; }

/* Müfredat konuları */
.cur-unit { margin: 8px 0; }
.cur-head { display: flex; align-items: center; gap: 6px; }
.cur-head .sp { flex: 1; }
.code-input { font-size: 1.6rem; letter-spacing: .4em; text-align: center; }
