:root {
  --bg: #f3f6ef;
  --surface: #ffffff;
  --surface-2: #f6f9f2;
  --text: #172015;
  --muted: #5b6957;
  --line: #e0e8d9;
  --primary: #2e7225;
  --primary-ink: #ffffff;
  --accent: #c8d400;
  --accent-soft: #f3f7d2;
  --accent-ink: #263d10;
  --in: #11845b;
  --in-soft: #e3f4ec;
  --out: #c4661a;
  --out-soft: #fbeee2;
  --warn: #b7791f;
  --warn-soft: #fdf3dc;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 22, .05), 0 6px 20px rgba(16, 24, 22, .06);
  --tabbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d130c;
    --surface: #151d14;
    --surface-2: #1b2519;
    --text: #e8eee5;
    --muted: #9eac99;
    --line: #263224;
    --primary: #8fcf6f;
    --primary-ink: #0b1609;
    --accent: #d6e255;
    --accent-soft: #232c12;
    --accent-ink: #e9f0b0;
    --in: #3cc58f;
    --in-soft: #12291f;
    --out: #f0954a;
    --out-soft: #2c1d10;
    --warn: #e5b04a;
    --warn-soft: #2a2312;
    --bad: #f07a6e;
    --bad-soft: #2d1513;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
body.has-tabbar .content { padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--primary); }
code { font: 600 1rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Kabuk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title > div { display: flex; flex-direction: column; min-width: 0; }
.topbar-title strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { max-width: 720px; margin: 0 auto; padding: 16px; }
.page { display: flex; flex-direction: column; gap: 14px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-around; gap: 2px;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 0 6px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar a, .tabbar .tab-more {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font: inherit; font-size: .7rem; font-weight: 650;
  background: none; border: 0; padding: 0; width: auto; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tabbar a > span:last-child, .tabbar .tab-more > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-icon {
  position: relative; font-size: 1.2rem; line-height: 1; display: grid; place-items: center;
  width: 46px; height: 30px; border-radius: 15px; transition: background .18s, transform .18s;
}
.tabbar .active { color: var(--primary); }
.tabbar .active .tab-icon { background: color-mix(in srgb, var(--primary) 14%, transparent); transform: translateY(-1px); }
.tab-icon-more { display: flex; gap: 3px; }
.tab-icon-more i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tab-badge {
  position: absolute; top: -4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: .68rem; font-weight: 750; line-height: 18px; text-align: center; font-style: normal;
}

/* ---------- Menü (alttan açılan) ---------- */
dialog.menu-sheet {
  border: 0; padding: 0; margin: auto auto 0; width: min(560px, 100%); max-height: 88dvh;
  border-radius: 26px 26px 0 0; background: var(--surface); color: var(--text);
  display: flex; flex-direction: column; animation: menu-up .22s cubic-bezier(.2, .8, .2, 1);
}
dialog.menu-sheet.closing { animation: menu-down .16s ease-in forwards; }
dialog.menu-sheet::backdrop { background: rgba(8, 14, 12, .42); backdrop-filter: blur(2px); }
@keyframes menu-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes menu-down { to { transform: translateY(100%); } }
@media (min-width: 700px) { dialog.menu-sheet { margin: auto; border-radius: 24px; } }
.menu-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px 12px; }
.menu-avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 0; padding: 0; overflow: hidden; cursor: pointer; font: inherit;
  background: linear-gradient(135deg, var(--accent), var(--primary)); color: #fff; font-weight: 800; font-size: 1.1rem;
}
.menu-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-body { overflow-y: auto; padding: 0 14px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.menu-group h3 { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 4px 8px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.menu-tile {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 10px; border-radius: 18px;
  text-decoration: none; color: var(--text); background: var(--surface-2); border: 1px solid transparent;
  transition: transform .12s, border-color .12s;
}
.menu-tile:active { transform: scale(.96); }
.menu-tile.current { border-color: var(--primary); }
.menu-tile-icon {
  position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem;
  background: var(--tile, #e3f4ec); color: var(--tile-ink, #0f5e4f);
}
.menu-tile-label { font-size: .78rem; font-weight: 650; text-align: center; line-height: 1.15; }
.menu-tile.g-ben { --tile: #e3f4ec; --tile-ink: #0f5e4f; }
.menu-tile.g-sinif { --tile: #fff1d6; --tile-ink: #9a5b00; }
.menu-tile.g-para { --tile: #e6efff; --tile-ink: #1f4fa8; }
.menu-tile.g-yonetim { --tile: #f3e8ff; --tile-ink: #6b3fa0; }
@media (prefers-color-scheme: dark) {
  .menu-tile.g-ben { --tile: #12291f; --tile-ink: #3cc58f; }
  .menu-tile.g-sinif { --tile: #2c2210; --tile-ink: #f0b44a; }
  .menu-tile.g-para { --tile: #142036; --tile-ink: #7fa8f5; }
  .menu-tile.g-yonetim { --tile: #241a33; --tile-ink: #c39cf0; }
}
.menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.menu-action {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.menu-action-out { color: var(--bad); }

/* ---------- Kart ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.hero { align-items: center; text-align: center; padding: 22px 18px 20px; }
.clock { font-size: 3.2rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.status-line { font-weight: 600; color: var(--muted); }
.status-line.is-in { color: var(--in); }

/* ---------- Ana düğme ---------- */
.punch {
  width: min(260px, 72vw); aspect-ratio: 1; border-radius: 50%;
  border: 0; cursor: pointer; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font: inherit; margin: 6px auto;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .35), inset 0 -6px 0 rgba(0, 0, 0, .12);
  transition: transform .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.punch:active { transform: scale(.97); }
.punch:disabled { filter: grayscale(.4) brightness(.9); cursor: progress; }
.punch-in { background: radial-gradient(circle at 30% 25%, #2bb57f, var(--in) 70%); }
.punch-out { background: radial-gradient(circle at 30% 25%, #ec8a3c, var(--out) 70%); }
.punch-label { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }
.punch-sub { font-size: .9rem; opacity: .9; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.field small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; min-height: 48px;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.check input { width: 22px; height: 22px; min-height: 0; }
.form-error { color: var(--bad); font-size: .9rem; font-weight: 600; }
.form-error:empty { display: none; }
.form-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn-lg { min-height: 54px; font-size: 1.05rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 1.3rem; cursor: pointer;
}
.icon-btn:disabled { opacity: .35; }

/* ---------- Liste ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; width: 100%; }
.list-btn { background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chev { color: var(--muted); font-size: 1.4rem; }
.staff-row { display: flex; gap: 12px; padding: 14px 0; align-items: flex-start; }
.staff-row.is-inactive { opacity: .55; }
.col-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px;
  padding: 8px 10px; background: var(--warn-soft); border-radius: 10px; font-size: .9rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.timeline li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.timeline li.tl-in { box-shadow: inset 4px 0 0 var(--in); }
.timeline li.tl-out { box-shadow: inset 4px 0 0 var(--out); }
.timeline li.is-void { opacity: .55; text-decoration: line-through; }
.timeline li.is-void .small { text-decoration: none; }
.tl-time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.2em; }

.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.chip-good { background: var(--in-soft); color: var(--in); }
.chip-neutral { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.chip-muted { background: var(--surface-2); color: var(--muted); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); vertical-align: middle; }
.tag-good { background: var(--in-soft); color: var(--in); border-color: transparent; }

/* ---------- Bugün ---------- */
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.stat { border-radius: 14px; padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; }
.stat strong { font-size: 1.6rem; line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-good { background: var(--in-soft); }
.stat-good strong { color: var(--in); }
.stat-warn { background: var(--warn-soft); }
.stat-warn strong { color: var(--warn); }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; padding: 0 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.clickable { cursor: pointer; }
.warn-text { color: var(--warn); font-weight: 700; }

/* ---------- Giriş ekranı ---------- */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 100%); gap: 18px; }
.brand { display: flex; align-items: center; gap: 14px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.segmented button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 650; padding: 10px; border-radius: 9px; cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Alt sayfa (dialog) ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: min(640px, 100%); max-height: 92dvh;
  border-radius: 20px 20px 0 0; background: var(--surface); color: var(--text);
}
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 20px; } }
dialog.sheet::backdrop { background: rgba(8, 14, 12, .45); }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-body { padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; }

/* ---------- Durum ---------- */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--muted); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--muted); text-align: center; padding: 16px 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 12px; font-weight: 600;
  background: #15201d; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: all .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-bad { background: var(--bad); }
.toast-warn { background: #8a5a12; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.code-input { text-transform: uppercase; letter-spacing: .15em; }
.tag-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.stack-tight { display: flex; flex-direction: column; gap: 6px; }
.ip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ip-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.row-gap input { flex: 1; min-width: 0; }
.net-banner { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 12px 14px; border-radius: 12px; text-align: left; font-size: .9rem; }
.net-banner[hidden] { display: none; }
.net-bad { background: var(--bad-soft); color: var(--bad); }
.net-warn { background: var(--warn-soft); color: var(--warn); }
.net-banner span { color: var(--text); }
.punch-blocked { filter: grayscale(.85) opacity(.55); }
.week-grid { display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px; align-items: center; }
.week-grid input { min-height: 42px; padding: 8px 10px; }
.week-day { font-weight: 700; font-size: .9rem; }
[hidden] { display: none !important; }
.duty-table { display: grid; grid-template-columns: 40px 1fr 1fr; gap: 8px 10px; align-items: start; }
.duty-cell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 36px; padding: 6px; border-radius: 10px; background: var(--surface-2); }
.person-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; }
.person-chip button { border: 0; background: transparent; color: var(--muted); font-size: 1rem; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; }
.pick-list { max-height: 50dvh; overflow-y: auto; }
.pick-row { padding: 10px 0; }
.steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alert-list li { padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); font-size: .92rem; }
.alert-list li.al-gec, .alert-list li.al-erken { background: var(--warn-soft); }
.tabbar a { font-size: .66rem; }
/* Basılı tut: düğme 1,5 sn'de içten dolar (home.js HOLD_MS ile aynı) */
.punch { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.punch > span { position: relative; z-index: 1; }
.punch::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 255, 255, .28); transform: scale(0); }
.punch.holding::before { animation: punch-fill 1.5s linear forwards; }
@keyframes punch-fill { from { transform: scale(0); } to { transform: scale(1); } }
.punch-done { background: var(--surface-2); color: var(--in); box-shadow: inset 0 0 0 3px var(--in); cursor: default; }
.punch-done .punch-sub { color: var(--muted); opacity: 1; }
.chip-bad { background: var(--surface-2); color: var(--out); border: 1px solid var(--out); }
.card-attention { box-shadow: inset 4px 0 0 var(--warn); }
.request-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.request-row:last-child { border-bottom: 0; }
.request-actions { display: flex; gap: 8px; }
.confirm-time { font-size: 2.6rem; font-weight: 800; text-align: center; letter-spacing: -.02em; margin: 4px 0 0; }
.btn-confirm { min-height: 56px; font-size: 1.1rem; }
.btn-confirm.btn-in { background: var(--in); border-color: var(--in); }
.btn-confirm.btn-out { background: var(--out); border-color: var(--out); }
.compact-list .list-row { padding: 8px 0; gap: 8px; }
.compact-list .list-row > :last-child { text-align: right; }
.day-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.seg-wrap { grid-template-columns: 1fr 1fr; gap: 4px; }
.seg-wrap button { padding: 9px 6px; font-size: .9rem; }
.strong { font-weight: 700; }
.danger-text { color: var(--out); }
.link-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
/* İzin: hukuki kayıt */
.seg-3 { grid-template-columns: repeat(2, 1fr); }
.request-actions.wrap { flex-wrap: wrap; }
.warn-text { color: var(--warn); font-weight: 600; }
.declaration { margin: 0; padding: 10px 12px; border-left: 3px solid var(--line); background: var(--surface-2); border-radius: 8px; font-size: .92rem; }
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: 8px; align-items: baseline; }
.kv > :last-child { min-width: 0; overflow-wrap: anywhere; }
.doc-img { width: 100%; height: auto; border-radius: 8px; }
.kvkk-text { max-height: 55vh; overflow-y: auto; font-size: .9rem; line-height: 1.5; padding-right: 4px; }
.kvkk-text h3 { margin: 12px 0 4px; font-size: .95rem; }
/* Yazdırılabilir belgeler */
.print-page { background: #fff; color: #000; padding: 24px; border-radius: 8px; display: grid; gap: 14px; }
.print-head { text-align: center; }
.print-head h1 { font-size: 1.15rem; margin: 6px 0 0; letter-spacing: .03em; }
.print-head strong { font-size: .95rem; }
.print-page h2 { font-size: 1rem; margin: 0; }
.print-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.print-table th, .print-table td { border: 1px solid #999; padding: 6px 8px; text-align: left; vertical-align: top; }
.print-table tbody th { width: 38%; background: #f3f3f3; font-weight: 600; }
.list-table thead th { background: #f3f3f3; }
.table-wrap { overflow-x: auto; }
.print-page .declaration { background: #f7f7f7; border-left-color: #999; color: #000; }
.sign-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.sign-grid p { margin: 2px 0; }
.sign-line { margin-top: 36px !important; border-top: 1px solid #000; padding-top: 4px; font-size: .8rem; }
.print-page .muted { color: #555; }
@media print {
  .topbar, .tabbar, .no-print, .toast { display: none !important; }
  body, .content, .page { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .print-page { padding: 0; border-radius: 0; }
  @page { size: A4; margin: 16mm; }
}

.tasks-slot:empty { display: none; }
.sign-row td { height: 2.4em; }

/* ---------- Tahsilat ---------- */
.stat-money strong { font-size: 1.05rem; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: .85rem; font-weight: 650;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap; cursor: pointer; }
.chip-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.list-row.clickable { cursor: pointer; }
.list-row.clickable:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money-table td, .money-table th { font-size: .85rem; }
.line-row { display: grid; grid-template-columns: 1fr 4.5rem auto; gap: 6px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.line-row select { grid-column: 1 / -1; }
.stats:has(> .stat-money) { grid-template-columns: 1fr 1fr; }
.list.compact .list-row { padding: 6px 0; }
hr.cut { border: 0; border-top: 1px dashed #999; margin: 18px 0; }
.receipt { break-inside: avoid; }

.stack-tight.right { align-items: flex-end; text-align: right; }
.good-text { color: var(--in); }
.cash-row > .row-between { flex-wrap: nowrap; align-items: flex-start; }
.cash-row > .row-between > :first-child { flex: 1; min-width: 0; }
.cash-row > .row-between > .stack-tight { flex-shrink: 0; gap: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pill { font-size: .78rem; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.pill-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); font-weight: 600; }
.chips-row { position: relative; }
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.parent-page { max-width: 640px; margin: 0 auto; padding: 16px; } .parent-page .topbar-title { margin-bottom: 12px; }
.parent-page { display: flex; flex-direction: column; gap: 12px; }
.help summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.help summary::after { content: "›"; color: var(--muted); font-size: 1.2rem; transition: transform .15s; }
.help[open] summary::after { transform: rotate(90deg); }
.help-list { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.45; }
.help-btn { font-weight: 800; min-width: 36px; justify-content: center; }
.topbar .row-gap { flex-wrap: nowrap; gap: 4px; }
.help.card { padding-top: 14px; padding-bottom: 14px; }
.help summary::after { display: inline-block; } .help summary::-webkit-details-marker { display: none; }
.kv-list { display: grid; gap: 10px; margin: 8px 0 12px; }
.kv-list .kv > div { white-space: pre-wrap; }

/* Öğrenci yoklaması */
.roll-row { display: grid; gap: 6px; padding: 10px 0; }
.seg-5 { grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 3px; }
.seg-5 button { padding: 8px 2px; font-size: .85rem; }
.seg-5 button[data-s="yok"][aria-selected="true"] { background: var(--out); color: #fff; }
.seg-5 button[data-s="gec"][aria-selected="true"] { background: var(--warn-soft); color: var(--warn); }

/* WhatsApp metni önizleme */
.share-preview { white-space: pre-wrap; font: inherit; font-size: .85rem; background: var(--surface-2); border-radius: 10px; padding: 10px; max-height: 45vh; overflow: auto; margin: 0; }

/* Bildirim kutusu ve herkese nöbet listesi (0051) */
.bell-btn { position: relative; min-width: 36px; justify-content: center; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.bell-count[hidden] { display: none; }
.list-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; color: inherit; text-decoration: none; }
.notif-new { background: var(--warn-soft); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.nowrap { white-space: nowrap; }
.duty-day h3 { margin: 0 0 6px; font-size: 1rem; }
.duty-today { box-shadow: inset 4px 0 0 var(--primary); }
.duty-names { text-align: right; }
.duty-names .mine { color: var(--primary); }

/* Fotoğraf paylaşımı (0053) */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.photo-cell { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.photo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; aspect-ratio: 1; }
.photo-full { width: 100%; height: auto; border-radius: 12px; display: block; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; cursor: pointer; }
.chip-toggle[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check-row input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.consent p { margin: 0; }

/* ---------- Sınıfım (0057–0059) ---------- */
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.block { display: block; }
.good { color: var(--in); }
.link-like { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.class-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.class-chips::-webkit-scrollbar { display: none; }
.class-chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px;
  padding: 8px 14px; font: inherit; font-weight: 650; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.class-chip small { color: var(--muted); font-weight: 500; }
.class-chip.mine { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.class-chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.class-chip.on small { color: inherit; opacity: .8; }
.section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.section-tile {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 20px; text-decoration: none;
  color: var(--text); background: var(--tile); border: 1px solid color-mix(in srgb, var(--tile-ink) 18%, transparent);
  transition: transform .12s; min-height: 108px;
}
.section-tile:active { transform: scale(.97); }
.section-tile strong { font-size: .98rem; }
.section-tile small { color: var(--muted); font-size: .78rem; }
.section-icon { font-size: 1.6rem; line-height: 1; margin-bottom: 4px; }
.section-badge { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px;
  background: var(--bad); color: #fff; font-size: .75rem; font-weight: 750; line-height: 22px; text-align: center; }
.t1 { --tile: #e9f7ef; --tile-ink: #11845b; } .t2 { --tile: #e8f0ff; --tile-ink: #1f4fa8; } .t3 { --tile: #fff4dc; --tile-ink: #b7791f; }
.t4 { --tile: #fdeaf3; --tile-ink: #b03a7a; } .t5 { --tile: #efe9ff; --tile-ink: #6b3fa0; } .t6 { --tile: #e3f6f8; --tile-ink: #137a86; }
.t7 { --tile: #fde8e6; --tile-ink: #b42318; } .t8 { --tile: var(--surface); --tile-ink: var(--line); }
@media (prefers-color-scheme: dark) {
  .t1 { --tile: #12291f; } .t2 { --tile: #142036; } .t3 { --tile: #2a2312; } .t4 { --tile: #2c1622; }
  .t5 { --tile: #221a33; } .t6 { --tile: #10282b; } .t7 { --tile: #2d1513; }
}
.section-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-top strong { font-size: 1.05rem; }
.class-switch summary { cursor: pointer; color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.class-head h2 { margin: 0; }
.seg-3 { grid-template-columns: 1fr 1fr 1fr; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sticky-save { position: sticky; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.kid-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.kid-card.is-absent { opacity: .55; }
.allergy-note { color: var(--bad); font-size: .85rem; font-weight: 600; margin: 0; }
.kid-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kid-line-label { width: 64px; font-size: .8rem; color: var(--muted); font-weight: 650; }
.kid-line select { width: auto; }
.meal-row { display: flex; gap: 4px; flex: 1; min-width: 0; }
.pick {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.pick span { font-size: 1.1rem; line-height: 1; }
.pick small { font-size: .66rem; color: var(--muted); }
.pick[aria-pressed="true"] { background: var(--in-soft); border-color: var(--in); }
.pick[aria-pressed="true"] small { color: var(--in); font-weight: 700; }
.thread-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 2px; background: none; border: 0; border-bottom: 1px solid var(--line);
  font: inherit; color: inherit; text-align: left; cursor: pointer; }
.thread-row.unread strong { color: var(--primary); }
.avatar-sm { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 750; }
.count-dot { min-width: 22px; height: 22px; border-radius: 11px; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 750; line-height: 22px; text-align: center; padding: 0 6px; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 55dvh; overflow-y: auto; padding: 4px 2px; }
.chat-page { max-height: 50dvh; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble small { font-size: .7rem; opacity: .75; }
.bubble.me { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; }
.news-item { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.photo-cell.small { width: 48px; }
.bar-row { display: flex; flex-direction: column; gap: 4px; }
.bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; }
.w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; }
.w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }
.date-badge { width: 46px; flex: none; text-align: center; border-radius: 12px; background: var(--surface-2); padding: 5px 0; display: flex; flex-direction: column; }
.date-badge strong { font-size: 1.1rem; line-height: 1.1; }
.date-badge small { font-size: .7rem; color: var(--muted); }
.is-past { opacity: .5; }
.sched-day h4 { margin: 6px 0 2px; }
.sched-edit { display: grid; grid-template-columns: 64px 84px 84px 1fr 1fr 32px; gap: 6px; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
@media (max-width: 520px) { .sched-edit { grid-template-columns: 60px 1fr 1fr 32px; } .sched-edit input[type="text"], .sched-edit select[aria-label="Öğretmen"] { grid-column: 1 / 4; } }
.big-emoji { font-size: 1.4rem; }
.karne-area h4 { margin: 10px 0 6px; }
.karne-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.rate-row { display: flex; gap: 4px; }
.rate { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: .75rem; font-weight: 650; cursor: pointer; }
.rate.r1[aria-pressed="true"] { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.rate.r2[aria-pressed="true"] { background: #e8f0ff; color: #1f4fa8; border-color: #1f4fa8; }
.rate.r3[aria-pressed="true"] { background: var(--in-soft); color: var(--in); border-color: var(--in); }
.rate-txt { font-size: .8rem; }
.rate-txt.r1 { color: var(--warn); } .rate-txt.r2 { color: #1f4fa8; } .rate-txt.r3 { color: var(--in); }
.print-only { display: none; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.portfolio-item { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.portfolio-item figcaption { display: flex; flex-direction: column; gap: 2px; }
.menu-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.menu-day.is-today { border-color: var(--primary); }
.menu-day h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
.menu-line { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; font-size: .9rem; }
.menu-line > span:first-child { color: var(--muted); font-weight: 650; font-size: .82rem; }
/* veli */
.alert-list { gap: 6px; }
.alert-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--text); background: var(--surface-2); font-weight: 600; }
.alert-row.warn { background: var(--warn-soft); color: var(--warn); }
.day-report { display: flex; flex-direction: column; gap: 6px; }
.day-report-row { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.link-card { text-decoration: none; color: var(--primary); font-weight: 700; }
.sub-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.sub-chips .chip-toggle { flex: none; text-decoration: none; white-space: nowrap; }
.survey-opt { text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.survey-opt[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); font-weight: 700; }
/* yazdırma: yalnız açık pencere */
@media print {
  body.printing > *:not(dialog) { display: none !important; }
  body.printing dialog { position: static; max-height: none; box-shadow: none; }
  body.printing .sheet-head, body.printing .no-print, body.printing .btn { display: none !important; }
  .print-only { display: block; }
  body:not(.printing) .tabbar, body:not(.printing) .topbar, body:not(.printing) .no-print { display: none !important; }
}
.karne-item > .grow { min-width: 150px; }
.photo-cell { position: relative; }
.photo-badge { position: absolute; top: 4px; right: 4px; display: none; font-size: .9rem; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.photo-cell.is-archived .photo-badge { display: block; }
/* Veli gördü (0116) */
.photo-seen { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 999px; font-size: .72rem; background: rgba(0,0,0,.6); color: #fff; }
.photo-seen:empty { display: none; }
/* Galeri videosu (0117): hücrede ▶ ve süre; kayıt düğmesi kayıttayken kırmızı */
.photo-play { position: absolute; left: 4px; top: 4px; padding: 1px 6px; border-radius: 999px; font-size: .72rem; background: rgba(0,0,0,.6); color: #fff; }
video.photo-full { background: #000; max-height: 70vh; }
.btn.is-recording { background: #c62828; border-color: #c62828; color: #fff; }
.assign-class summary { cursor: pointer; padding: 6px 0; }
.is-today-row strong { color: var(--primary); }
.foto-yok { background: var(--line, #ddd); min-height: 60px; }
.rank-no { min-width: 2em; text-align: center; font-weight: 700; }
.ai-advice summary, .ai-review summary { cursor: pointer; padding: 6px 0; }
/* Veli formları (0072) */
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form-q { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.form-q.has-error { border-color: var(--bad, #c0392b); box-shadow: inset 4px 0 0 var(--bad, #c0392b); }
.form-q .req { color: var(--bad, #c0392b); }
.answers { display: grid; gap: 4px 0; margin: 0; }
.answers dt { font-weight: 700; font-size: .9rem; margin-top: 8px; }
.answers dd { margin: 0; }
/* Okul işleri (0074) */
.issue-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.issue-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
/* Teslim (0076) */
.tag-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
/* Yemek sayısı (0078) */
.big-number { font-size: 1.5rem; font-weight: 800; margin: 0; }
/* Yardım çağrısı + mola (0081) */
.btn-sos { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 750; width: 100%; }
.help-in { padding: 10px 0; border-bottom: 1px solid var(--line); }
.help-mine { padding: 8px 0; }
/* Kayıp eşya (0091) + veliye bilgi paneli (0092) */
.lost-row { display: flex; gap: 12px; align-items: flex-start; }
.lost-thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; flex: none; }
.lost-thumb-btn { padding: 0; border: 0; background: none; flex: none; cursor: zoom-in; }
.info-mark { width: 1.4em; flex: none; text-align: center; }

/* ---------- Aksaray Doğa Koleji kimliği (logo renkleri: koyu yeşil #2e7225, fıstık yeşili #c8d400) ---------- */
.topbar { border-bottom: 0; }
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 55%, var(--accent) 100%);
  opacity: .9;
}
.topbar-logo { width: 34px; height: 38px; object-fit: contain; flex: none; }
.topbar-title strong { color: var(--primary); letter-spacing: .01em; }

.btn-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff) 0%, var(--primary) 100%); }
.tabbar .active .tab-icon { background: color-mix(in srgb, var(--accent) 38%, transparent); }

/* Giriş ekranı: yaprak tonlarında yumuşak zemin + büyük logo */
.auth-wrap {
  background:
    radial-gradient(60rem 30rem at 110% -10%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
    radial-gradient(50rem 28rem at -20% 110%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 60%),
    var(--bg);
}
.auth-card { position: relative; overflow: hidden; padding-top: 26px; }
.auth-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.brand-hero { flex-direction: column; justify-content: center; text-align: center; gap: 6px; }
.brand-logo { width: 132px; height: auto; display: block; margin: 0 auto; }
.brand-sub {
  color: var(--primary); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; background: var(--accent-soft);
}

/* Veli uygulaması başlığı */
.parent-page .topbar-title { padding: 10px 12px; border-radius: var(--radius); background: var(--surface);
  box-shadow: inset 0 -3px 0 var(--accent), var(--shadow); }

@media (prefers-color-scheme: dark) {
  .topbar-logo { content: url("../icons/amblem-beyaz.png"); }
  .brand-logo { content: url("../icons/logo-beyaz.png"); }
}

/* ---------- Yan menü (Karar Akademi düzeni, 2026-10-15) ---------- */
.icon { display: block; }
.tab-icon .icon { width: 22px; height: 22px; }
.tabbar a:not(.active) .tab-icon, .tabbar .tab-more:not(.active) .tab-icon { opacity: .85; }
.menu-btn { margin-right: 2px; flex: none; }
.menu-btn .icon { width: 22px; height: 22px; }

dialog.side-drawer {
  border: 0; padding: 0; margin: 0 auto 0 0; height: 100dvh; max-height: 100dvh; width: min(320px, 86vw);
  border-radius: 0 22px 22px 0; background: var(--surface); color: var(--text);
  display: flex; flex-direction: column; animation: side-in .2s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 10px 40px rgba(8, 14, 12, .25);
}
dialog.side-drawer.closing { animation: side-out .17s ease-in forwards; }
dialog.side-drawer::backdrop { background: rgba(8, 14, 12, .42); backdrop-filter: blur(2px); }
@keyframes side-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes side-out { to { transform: translateX(-100%); } }

.side-head { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.side-body { overflow-y: auto; padding: 8px 10px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.side-group { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.side-group + .side-group { border-top: 1px solid var(--line); }
.side-group h3 { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 4px 10px 4px; }
.side-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px;
  color: var(--text); text-decoration: none; font: inherit; font-weight: 600; font-size: .95rem; text-align: left;
  background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.side-row:hover { background: var(--surface-2); }
.side-row:active { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.side-row.active { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--primary); }
.side-icon { display: grid; place-items: center; width: 24px; color: var(--muted); flex: none; }
.side-row.active .side-icon { color: var(--primary); }
.side-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff;
  font-size: .72rem; font-weight: 750; line-height: 20px; text-align: center; }
.side-out, .side-out .side-icon { color: var(--bad); }

/* Bilgisayarda: menü solda sabit, alt çubuk ve ☰ gizli */
.side-nav { display: none; }
@media (min-width: 1000px) {
  .side-nav {
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: 272px; z-index: 11;
    background: var(--surface); border-right: 1px solid var(--line);
  }
  body:has(.side-nav) #app > .topbar, body:has(.side-nav) #app > main, body:has(.side-nav) #app > .view-banner { margin-left: 272px; }
  body:has(.side-nav) .tabbar, body:has(.side-nav) .menu-btn { display: none; }
  body.has-tabbar:has(.side-nav) .content { padding-bottom: 32px; }
}

/* ---------- Sık görünüm (Veli, 2026-10-15: "yazılar çok büyük, ekrana daha çok sığsın") ----------
   Kök yazı boyu 16 → 14.5px (bütün rem ölçüleri birlikte küçülür), kart/liste/düğme boşlukları daraldı.
   Form alanları 16px kalır (iPhone odaklanınca yakınlaştırmasın). Geri almak: bu bloğu silmek yeter. */
html { font-size: 14.5px; }
body { font-size: 1rem; line-height: 1.4; }
.content { padding: 12px; }
.page, .stack { gap: 10px; }
.card { padding: 14px; gap: 10px; border-radius: 14px; }
.hero { padding: 16px 14px; }
.btn { min-height: 42px; padding: 0 14px; border-radius: 11px; }
.btn-small { min-height: 32px; padding: 0 10px; }
.btn-lg { min-height: 48px; }
input, select, textarea { padding: 9px 12px; min-height: 42px; border-radius: 10px; }
textarea { min-height: 80px; }
.field { gap: 4px; }
.list-row { padding: 9px 0; }
.request-row { padding: 9px 0; gap: 6px; }
.staff-row { padding: 10px 0; }
.timeline { gap: 6px; }
.timeline li { padding: 8px 10px; }
.stats { gap: 8px; }
.stat { padding: 9px 10px; border-radius: 12px; }
.stat strong { font-size: 1.4rem; }
.table td { padding: 9px 6px; }
.form-box { padding: 11px; }
.sheet-head { padding: 12px 14px; }
.sheet-body { padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); }
.help.card { padding-top: 12px; padding-bottom: 12px; }
.help.card:not([open]) { gap: 0; }
.parent-page { padding: 12px; gap: 10px; }
.topbar { padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
.section-grid { gap: 8px; }
.section-tile { min-height: 0; padding: 10px 12px; border-radius: 16px; gap: 2px; }
.section-icon { font-size: 1.35rem; margin-bottom: 2px; }
details.help:not([open])::details-content { display: none; }

/* ---------- Karar Akademi görünümü (gece 2026-10-16; yalnız görünüm, içerik aynı) ----------
   Inter yazı tipi (kendi sunucumuzdan, OFL), iskelet yükleme, sayfa geçişi, simgeli boş durum, yumuşak dokunma geri bildirimi.
   Geri almak: bu bloğu silmek (ui.js loading/empty eski sürümüyle de çalışır). */
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
body, button, input, select, textarea { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
h1, h2, h3 { letter-spacing: -.01em; }
.clock, .stat strong, .confirm-time { font-feature-settings: "tnum" 1; }

/* iskelet yükleme */
.loading { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 2px; }
.skeleton { display: block; background: linear-gradient(90deg, color-mix(in srgb, var(--line) 70%, var(--surface)), color-mix(in srgb, var(--muted) 22%, var(--surface)), color-mix(in srgb, var(--line) 70%, var(--surface))); background-size: 200% 100%;
  animation: sk 1.2s ease-in-out infinite; border-radius: 8px; }
.sk-line { height: 14px; width: 100%; }
.sk-w60 { width: 60%; } .sk-w80 { width: 80%; }
.loading-text { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 2px; }
@keyframes sk { to { background-position: -200% 0; } }

/* sayfa geçişi: yeni ekran hafifçe yukarı kayarak belirir */
.content > .page { animation: page-in .2s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* boş durum: simge + metin */
.empty { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; }
.empty-icon { color: color-mix(in srgb, var(--muted) 45%, var(--surface)); display: grid; place-items: center; }
@media (prefers-color-scheme: dark) { .empty-icon { color: var(--muted); opacity: .6; } }

/* dokunma geri bildirimi */
.btn { transition: transform .06s, filter .15s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.card a.link-card:active, .section-tile:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  .skeleton, .content > .page, .spinner { animation: none; }
}
/* Ana ekrana ekleme kapısı (veli) */
.gate h2 { font-size: 1.25rem; }
.gate-ok { color: var(--in); font-weight: 800; font-size: 1.2rem; }
/* Veli Okul / Çocuğum bölüm başlığı (kutucuktan açılınca) */
.sub-head { align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.sub-head h2 { margin: 0; font-size: 1.15rem; }
/* Veli Menü: bütün bölümler tek ekranda (3 sütun, küçük kutucuk) */
.section-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.section-grid.compact .section-tile { min-height: 82px; padding: 10px; border-radius: 16px; gap: 2px; }
.section-grid.compact .section-tile strong { font-size: .84rem; line-height: 1.2; }
.section-grid.compact .section-icon { font-size: 1.35rem; }
.menu-group { margin: 6px 2px -4px; font-size: 1rem; color: var(--muted); }
/* Bugün kısayolları: Menü'de seçme (☆/★) */
button.section-tile { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.section-tile .pin-mark { position: absolute; top: 8px; right: 10px; font-size: 1.1rem; color: var(--muted); }
.section-tile .pin-mark.on { color: #d49b00; }
.section-tile.pinned { box-shadow: 0 0 0 2px var(--primary) inset; }
.pin-hint { display: block; padding: 4px 0; }
/* Kapı ekranı (danışma tableti/TV): büyük yazı, tam ekran */
.door-screen { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 24px; background: var(--bg); color: var(--text); }
.door-screen::backdrop { background: var(--bg); }
.door-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.door-head h2 { margin: 0; font-size: 2rem; flex: 1; }
.door-clock { font-size: 1.6rem; font-weight: 700; color: var(--muted); }
.door-list { display: grid; gap: 12px; }
.door-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 20px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); }
.door-row.bekliyor { border-color: #d49b00; }
.door-row.iniyor { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.door-row.bitti { opacity: .55; }
.door-name { font-size: 1.9rem; }
.door-class { font-size: 1.2rem; color: var(--muted); grid-column: 1; }
.door-state { font-size: 1.4rem; font-weight: 700; grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
.door-empty { font-size: 1.6rem; color: var(--muted); text-align: center; margin-top: 20vh; }
/* Yüz kapatma (fotoğraf izni olmayan çocuk) */
.cover-cell { display: flex; flex-direction: column; gap: 4px; align-items: stretch; position: relative; }
.cover-done { position: absolute; top: 6px; left: 6px; }
.cover-canvas { width: 100%; height: auto; border-radius: 12px; touch-action: manipulation; cursor: crosshair; }
.list-row.tone-bad { color: var(--bad); font-weight: 600; }
.list-row.tone-warn { color: var(--warn); }
/* Anı defteri (0130) */
.yearbook { display: flex; flex-direction: column; gap: 18px; }
.yb-cover { text-align: center; padding: 24px 8px; border: 2px solid var(--line); border-radius: 18px; }
.yb-cover h1 { font-size: 1.8rem; margin: 6px 0; }
.yb-school { font-weight: 800; color: var(--primary); margin: 0; letter-spacing: .02em; }
.yb-sub { font-weight: 650; margin: 0 0 8px; }
.yb-cover .yb-photo { max-width: 70%; max-height: 320px; border-radius: 14px; margin-top: 12px; }
.yb-part h2 { font-size: 1.15rem; border-bottom: 2px solid var(--line); padding-bottom: 4px; }
.yb-item { margin: 10px 0; break-inside: avoid; }
.yb-item p { margin: 4px 0 0; }
.yb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.yb-grid figure { margin: 0; break-inside: avoid; }
.yb-grid .yb-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.yb-month h3 { font-size: 1rem; margin: 12px 0 6px; }
@media print {
  .yb-cover { break-after: page; border: none; }
  .yb-part { break-before: page; }
  .yb-grid { grid-template-columns: repeat(4, 1fr); }
}
.expert-post summary { cursor: pointer; list-style: none; }
.expert-post summary::-webkit-details-marker { display: none; }
.expert-post[open] summary { margin-bottom: 8px; }
.big-name { font-size: 1.15rem; font-weight: 750; margin: 4px 0; }

/* Veli yazışmaları (0135) */
.plain-row { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
/* Fotoğraflı duyuru (0136) */
.news-photo { width: 100%; max-height: 420px; object-fit: contain; border-radius: 12px; background: var(--surface-2, #f3f3f3); display: block; margin: 6px 0; }
/* Ana ekrana ekleme kapısı: iPhone Safari'de alttaki Paylaş düğmesini gösteren ok */
.big-steps li { font-size: 1.05rem; margin-bottom: 10px; }
.share-hint { position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center;
  font-weight: 750; color: var(--primary); pointer-events: none; z-index: 50; }
.share-hint-arrow { font-size: 2rem; animation: share-bob 1.2s ease-in-out infinite; }
@keyframes share-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .share-hint-arrow { animation: none; } }
/* Veli ↔ personel geçişi (aynı telefonda ikisi de olan çalışan) */
.topbar .switch-btn { white-space: nowrap; flex: none; }

/* Yoğun görünüm (Veli, 2026-10-20: "ekrana daha çok yazı sığmalı"): yazı biraz küçük, kart/boşluklar dar.
   Giriş alanları 16px kalır (iPhone yakınlaştırmasın); dokunma alanları en az 32px. */
body { font-size: 15px; line-height: 1.38; }
.content { padding: 10px; }
.card { padding: 12px; gap: 9px; border-radius: 14px; }
.stack { gap: 10px; }
.stack-tight { gap: 6px; }
h1 { font-size: 1.25rem; }
h2 { font-size: 1.02rem; }
h3 { font-size: .95rem; }
.small { font-size: .82rem; }
.list-row { padding: 7px 0; gap: 8px; }
.request-row { padding: 7px 0; }
.menu-group h3 { margin-bottom: 6px; }
.sheet-head { padding: 12px 14px; }
.sheet-body { padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); }
.empty { padding: 10px 0; }
.hero { padding: 16px 12px 14px; }

/* Profil fotoğrafı (0149) */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar-sm { width: 34px; height: 34px; font-size: .75rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.3rem; }
.avatar-empty { color: var(--muted); font-weight: 700; border: 1px solid var(--line); }
.avatar-btn { border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 50%; line-height: 0; }
.avatar-row { display: flex; align-items: center; gap: 10px; }
.rules-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* ---------- Günlük işler (0167) ---------- */
.day-plan-title { font-size: 1.6rem; margin: 4px 0 0; }
.day-plan-row { gap: 10px; align-items: flex-start; }
.day-plan-row.done strong { color: var(--muted); text-decoration: line-through; }
.day-plan-mark { flex: none; width: 1.5em; text-align: center; font-size: 1.1rem; }
dialog.day-plan .list-row strong { font-size: 1.05rem; }

/* ---------- Sınıf yarışması (0174) ---------- */
.contest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.contest-item { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.contest-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-2); }

/* Mesajlar (0178): kendi mesajım hafif renkli */
.msg-mine { background: var(--surface-2); border-radius: 10px; padding-left: 8px; }

/* Plan etkinlik işaretleri (0179) */
.plan-act { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.bubble small.read-yes { opacity: 1; font-weight: 700; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; }
.list-row.unread { background: var(--accent-soft); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.list-row.unread strong { color: var(--primary); }
/* Mesajda fotoğraf (0192) */
.msg-photo { display: block; width: 220px; max-width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.msg-photo-chosen { display: inline-flex; align-items: center; gap: 8px; }
.msg-photo-pick { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
/* Geç/erken uyarısı (0229): kocaman kırmızı, ana ekranın en üstünde ve çıkış onayında */
.alarm-big { background: #d92d20; color: #fff; border: 3px solid #7a271a; text-align: center; padding: 18px 14px; }
.alarm-big strong { display: block; font-size: 1.6rem; font-weight: 850; letter-spacing: .02em; line-height: 1.2; }
.alarm-big p { margin: 8px 0 0; font-size: 1.05rem; font-weight: 600; color: #fff; }
.day-times { width: 100%; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.day-times strong { display: block; font-size: 1.1rem; }
.day-times span { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }
/* Haftanın eksikleri (0230): günlük açılış penceresinde kırmızı çerçeveli */
.week-gaps { border: 2px solid var(--bad); background: var(--bad-soft); border-radius: 14px; padding: 12px; }
.week-gaps h3 { color: var(--bad); margin: 0 0 6px; font-size: 1.15rem; }
.week-gaps .list-row { padding: 6px 0; font-weight: 600; }
