/* MID-GO arayüz teması — "yumuşak pastel"
   Lila zemin üzerinde yüzen beyaz panel, açık menü, pastel kartlar, yumuşak gölgeler. */
:root {
  --page: #DCD8EE;
  --panel: #FBFBFE;
  --surface: #FFFFFF;
  --soft: #F4F2FC;
  --line: #ECE9F6;
  --line-strong: #DCD7F0;
  --ink: #26233A;
  --muted: #8A87A0;
  --faint: #A3A0B8;

  --brand: #8B7CF6;
  --brand-strong: #6E5BE8;
  --brand-ink: #4F3FC2;
  --brand-soft: #ECE9FD;

  --peach: #FFF1E3;   --peach-mid: #FFB98A;  --peach-strong: #FF9A4D;  --peach-ink: #A55A16;
  --lilac: #EFEBFE;   --lilac-mid: #A99DF8;
  --rose: #FFE9EC;    --rose-mid: #F7A1AE;   --rose-strong: #E2546A;   --rose-ink: #B23A4E;
  --sky: #E6F3FD;     --sky-mid: #7FB8EE;    --sky-strong: #3E8BD6;    --sky-ink: #2F6CA8;
  --mint: #E3F5EC;    --mint-strong: #2FA36B; --mint-ink: #1E7A50;

  --shadow: 0 4px 16px rgba(70, 58, 140, .08);
  --shadow-lg: 0 24px 60px rgba(70, 58, 140, .14);
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--page); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { color: var(--brand-ink); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; }

/* ---------- Form öğeleri ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 600; font-size: 13px; color: #4A4662; }
.input, .select {
  height: 48px; width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 0 14px; font: inherit; font-size: 15px; background: var(--soft); color: var(--ink);
  transition: border-color .15s, background .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus, .select:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px rgba(139, 124, 246, .15); }
.input.is-invalid, .select.is-invalid { border-color: var(--rose-strong); background: #FFF8F9; }
.field-error { color: var(--rose-ink); font-size: 12px; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
.textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.check input, .radio-card input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
fieldset { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 600; font-size: 13px; color: #4A4662; margin-bottom: 6px; padding: 0; }
.radio-card { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.code-input { font-size: 28px; font-weight: 800; letter-spacing: .45em; text-align: center; max-width: 220px; height: 62px; font-variant-numeric: tabular-nums; }
.code-input.sm { font-size: 17px; letter-spacing: .25em; height: 42px; max-width: 112px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--radius); border: none;
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(139, 124, 246, .32); }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-accent { background: var(--peach-strong); color: #fff; box-shadow: 0 6px 16px rgba(255, 154, 77, .32); }
.btn-accent:hover { background: #F2852F; color: #fff; }
.btn-ghost { background: var(--brand-soft); color: var(--brand-ink); }
.btn-ghost:hover { background: #E0DBFC; color: var(--brand-ink); }
.btn-plain { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:focus-visible, .input:focus-visible, a:focus-visible, .chip:focus-visible { outline: 3px solid #C4BBFB; outline-offset: 2px; }
.icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: #6F6B88; border: none; display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }

.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 10px; border: none; background: var(--soft); color: #6F6B88; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; border-radius: 8px; padding: 3px 8px; letter-spacing: .01em; }
.badge-ok { background: var(--mint); color: var(--mint-ink); }
.badge-warn { background: var(--peach); color: var(--peach-ink); }
.badge-over { background: var(--rose); color: var(--rose-ink); }
.badge-info { background: var(--brand-soft); color: var(--brand-ink); }
.badge-admin { background: var(--peach); color: var(--peach-ink); }

.alert { border-radius: 14px; padding: 12px 16px; font-weight: 600; font-size: 13px; }
.alert-error { background: var(--rose); color: var(--rose-ink); }
.alert-success { background: var(--mint); color: var(--mint-ink); }
.alert-info { background: var(--brand-soft); color: var(--brand-ink); }

.card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }

/* ---------- Uygulama kabuğu: lila zemin üstünde yüzen panel ---------- */
.shell { min-height: 100vh; padding: 24px; display: flex; }
.app { flex: 1; display: flex; flex-wrap: wrap; background: var(--panel); border-radius: 28px; box-shadow: var(--shadow-lg); overflow: hidden; min-width: 0; }

.sidenav { flex: 1 1 200px; max-width: 232px; padding: 26px 18px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 24px; font-weight: 800; font-size: 16px; color: var(--ink); }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--faint); letter-spacing: .02em; }
.sidenav a.nav { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--muted); font-weight: 600; }
.sidenav a.nav:hover { background: var(--soft); color: var(--ink); }
.sidenav a.nav[aria-current="page"] { background: var(--brand-soft); color: var(--ink); font-weight: 700; }
.sidenav a.nav[aria-current="page"] .ico { color: var(--brand-strong); }
.sidenav .nav-disabled { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; color: #C3C0D4; font-weight: 600; }
.sidenav .spacer { flex: 1; min-height: 20px; }
.side-card { background: var(--brand-soft); border-radius: 20px; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.side-card .t { font-weight: 700; }
.side-card .s { font-size: 12px; color: #6F6B88; }
.side-card form { margin: 0; }
.side-card.admin { background: var(--peach); }

.workspace { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 26px 26px 0; }
.topbar h1 { margin-right: auto; }
.admin-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 26px 0; padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--peach); color: var(--peach-ink); font-weight: 700; font-size: 13px; }
.admin-banner form { margin: 0 0 0 auto; }
.content { padding: 22px 26px 30px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.content.narrow { max-width: 880px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-head .actions:has(.search-pill) { flex-wrap: nowrap; flex: 0 1 420px; }
.page-head .actions .search-pill { flex: 1 1 auto; }

.search-pill { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); flex: 0 1 340px; color: var(--faint); }
.search-pill input { flex: 1; min-width: 0; border: none; background: transparent; font: inherit; font-size: 14px; color: var(--ink); height: 100%; }
.search-pill input:focus { outline: none; }
.search-pill .btn { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12px; }
.dot-alert { position: absolute; top: 11px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose-strong); }

/* ---------- Canlı pano ---------- */
.board-layout { display: flex; flex-wrap: wrap; flex: 1; min-width: 0; }
.board-layout > .content { flex: 999 1 560px; }
.rail { flex: 1 1 280px; max-width: 340px; padding: 26px 24px 30px; display: flex; flex-direction: column; gap: 22px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.tile { border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.tile:hover { color: var(--ink); box-shadow: var(--shadow); }
.tile .art { height: 96px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.tile .name { font-weight: 700; font-size: 15px; }
.tile .sub { font-size: 12px; }
.tile .foot { display: flex; align-items: center; justify-content: space-between; }
.tile .num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .num small { font-size: 14px; font-weight: 600; }
.tile .go { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.tile.peach { background: var(--peach); } .tile.peach .art { background: var(--peach-mid); } .tile.peach .sub, .tile.peach small { color: #8A6E58; } .tile.peach .go { background: var(--peach-strong); }
.tile.lilac { background: var(--lilac); } .tile.lilac .art { background: var(--lilac-mid); } .tile.lilac .sub { color: #7268A8; } .tile.lilac .go { background: var(--brand); }
.tile.rose  { background: var(--rose); }  .tile.rose .art  { background: var(--rose-mid); }  .tile.rose .sub  { color: #9A5662; } .tile.rose .go  { background: var(--rose-strong); }
.tile.sky   { background: var(--sky); }   .tile.sky .art   { background: var(--sky-mid); }   .tile.sky .sub   { color: #4E7396; } .tile.sky .go   { background: var(--sky-strong); }

.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-head .right { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.kids-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.kids-table th { text-align: left; color: var(--faint); font-weight: 600; font-size: 12px; padding: 6px 8px; }
.kids-table td { padding: 8px; vertical-align: middle; }
.kids-table tbody tr { transition: background .15s; }
.kids-table tbody tr:hover td { background: var(--soft); }
.kids-table tbody tr td:first-child { border-radius: 14px 0 0 14px; }
.kids-table tbody tr td:last-child { border-radius: 0 14px 14px 0; text-align: right; }
.person { display: flex; align-items: center; gap: 12px; }
.person .av { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; background: var(--brand-soft); color: var(--brand-ink); }
.person .nm { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.person .sm { font-size: 12px; color: var(--faint); }
.time-badge { display: inline-block; min-width: 92px; text-align: center; font-weight: 800; border-radius: 9px; padding: 5px 8px; font-variant-numeric: tabular-nums; background: var(--brand-soft); color: var(--brand-ink); }
.bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; width: 92px; }
.bar > span { display: block; height: 5px; border-radius: 3px; background: var(--brand); width: 100%; transition: width .9s linear; }

[data-state="ok"]   .av, [data-state="ok"] .time-badge     { background: var(--mint);  color: var(--mint-ink); }
[data-state="ok"]   .bar > span { background: var(--mint-strong); }
[data-state="warn"] .av, [data-state="warn"] .time-badge   { background: var(--peach); color: var(--peach-ink); }
[data-state="warn"] .bar > span { background: var(--peach-strong); }
[data-state="over"] .av, [data-state="over"] .time-badge   { background: var(--rose);  color: var(--rose-ink); }
[data-state="over"] .bar > span { background: var(--rose-strong); }
@media (prefers-reduced-motion: no-preference) {
  [data-state="over"] .time-badge { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(226, 84, 106, .18); } }
}

.profile { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.profile .av { width: 76px; height: 76px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; margin-bottom: 6px; }
.profile .nm { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.profile .sm { font-size: 12px; color: var(--faint); }
.verified { width: 16px; height: 16px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; }

.load { display: flex; align-items: flex-end; gap: 6px; height: 100px; }
.load .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.load .b { width: 100%; border-radius: 8px; background: #E4E0FB; min-height: 4px; }
.load .col.now .b { background: var(--brand); }
.load .h { font-size: 10px; font-weight: 700; color: var(--faint); }
.load .col.now .h { color: var(--brand-strong); }

.alert-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); }
.alert-item:hover { color: var(--ink); }
.alert-item .tx { flex: 1; min-width: 0; }
.alert-item .t { font-weight: 700; font-size: 13px; }
.alert-item .s { font-size: 11px; color: var(--faint); }
.alert-item.strong { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(139, 124, 246, .35); }
.alert-item.strong .s { color: #E4E0FB; }
.ring { flex: none; }
.ring .tr { stroke: var(--brand-soft); }
.ring .pr { stroke: var(--brand); }
.alert-item.strong .ring .tr { stroke: rgba(255, 255, 255, .3); }
.alert-item.strong .ring .pr { stroke: #fff; }
.ring text { font-size: 9px; font-weight: 800; fill: currentColor; font-family: var(--font); }

.empty { text-align: center; padding: 40px 20px; border-radius: var(--radius-lg); color: var(--muted); background: var(--soft); }
.empty strong { display: block; font-size: 17px; color: var(--ink); margin-bottom: 4px; }

/* ---------- Kartlar, tablolar ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi.warn { background: var(--peach); box-shadow: none; }
.kpi.warn .k, .kpi.warn .v { color: var(--peach-ink); }

.table-wrap { overflow-x: auto; position: relative; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 600px; }
.table th { text-align: left; color: var(--faint); font-size: 12px; font-weight: 600; padding: 8px 10px; }
.table td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.table td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.table .right { text-align: right; }

.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .main { flex: 999 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.split > .side { flex: 1 1 320px; }

.pkg { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pkg .info { flex: 1 1 200px; min-width: 0; }
.pkg .name { font-weight: 700; font-size: 15px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 4px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions form { margin: 0; }
.seg-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-radio .radio-card { flex: 1 1 120px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.datebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.datebar .seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; }
.datebar .seg a { padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: 13px; }
.datebar .seg a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Kayıt ve veli ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stepper li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--faint); font-weight: 600; font-size: 13px; }
.stepper .dot { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 800; }
.stepper li.current { color: var(--ink); }
.stepper li.current .dot { background: var(--brand); color: #fff; }
.stepper li.done { color: var(--mint-ink); }
.stepper li.done .dot { background: var(--mint); color: var(--mint-ink); }

.guardian-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.guardian-head .who { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.guardian-head .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avatar-lg { width: 68px; height: 68px; border-radius: 22px; background: var(--brand-soft); color: var(--brand-strong); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; flex: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kid { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.kid-head { display: flex; align-items: center; gap: 12px; }
.kid-avatar { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; background: var(--sky); color: var(--sky-ink); }
.kid-name { font-weight: 700; font-size: 15px; }
.kid-meta { font-size: 12px; color: var(--faint); }
.kid-body { display: flex; flex-direction: column; gap: 8px; }
.kid[data-state="inside"] .kid-avatar { background: var(--mint); color: var(--mint-ink); }
.health { background: var(--rose); color: var(--rose-ink); border-radius: 12px; padding: 8px 10px; font-size: 12px; }

.pickup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; }
.pickup .info { flex: 1 1 240px; min-width: 0; }
.pickup .name { font-weight: 700; }
.pickup form { margin: 0; }
.inline-verify { display: flex; gap: 6px; align-items: center; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
.summary-btn { cursor: pointer; font-weight: 700; color: var(--brand-ink); display: flex; align-items: center; gap: 8px; }

/* ---------- Giriş ekranları ---------- */
.auth-shell { min-height: 100vh; padding: 24px; display: flex; align-items: center; justify-content: center; }
.auth { width: 100%; max-width: 1080px; min-height: 620px; display: flex; flex-wrap: wrap; background: var(--panel); border-radius: 28px; box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-hero { flex: 1 1 380px; padding: 40px; display: flex; flex-direction: column; gap: 24px; background: var(--brand-soft); }
.auth-hero.is-admin { background: var(--peach); }
.auth-hero .art { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.auth-hero .title { font-size: 30px; font-weight: 800; line-height: 1.2; }
.auth-hero .lead { font-size: 15px; color: #6F6B88; max-width: 380px; margin: 6px 0 0; }
.auth-main { flex: 1 1 380px; display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.auth-form .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }

.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.error-page .card { max-width: 480px; text-align: center; display: flex; flex-direction: column; gap: 12px; padding: 32px; }
.error-page .code { font-size: 48px; font-weight: 800; color: var(--brand); }

@media (max-width: 760px) {
  .shell, .auth-shell { padding: 0; }
  .app, .auth { border-radius: 0; box-shadow: none; }
  .sidenav { max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px; }
  .brand { padding: 0 10px 0 4px; }
  .sidenav .spacer, .side-card { display: none; }
  .sidenav a.nav span { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .rail { max-width: none; padding: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head .actions:has(.search-pill) { flex: 1 1 100%; margin-left: 0; }
}

/* ---------- Kasa durumu ve giriş ekranı ---------- */
.shift-pill { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: center; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface); }
.shift-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.shift-pill.open { color: var(--mint-ink); } .shift-pill.open .dot { background: var(--mint-strong); }
.shift-pill.closed { color: var(--rose-ink); } .shift-pill.closed .dot { background: var(--rose-strong); }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pick { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent; transition: border-color .15s, background .15s; }
.pick:has(input:checked) { border-color: var(--brand); background: #FCFBFF; }
.pick:has(input:disabled) { opacity: .55; cursor: not-allowed; box-shadow: none; background: var(--soft); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .tick { margin-left: auto; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; color: transparent; flex: none; }
.pick:has(input:checked) .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.pick:has(input[type="radio"]) .tick { border-radius: 50%; }
.pick:has(input:focus-visible) { outline: 3px solid #C4BBFB; outline-offset: 2px; }
.pick .main { min-width: 0; }
.pick .t { font-weight: 700; }
.pick .s { font-size: 12px; color: var(--faint); }
.pick .price { font-weight: 800; font-variant-numeric: tabular-nums; }

.summary { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.summary .line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.summary .total .v { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pay-methods .pick { padding: 10px 12px; box-shadow: none; background: var(--soft); }

/* ---------- Satış ekranı ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.prod { justify-content: space-between; min-height: 170px; border: 2px solid transparent; }
.prod.in-cart { border-color: var(--brand); box-shadow: var(--shadow); }
.prod .qty { display: flex; align-items: center; gap: 6px; }
.prod .qty input { width: 56px; height: 40px; text-align: center; border: none; border-radius: 10px; background: var(--surface); font: inherit; font-weight: 800; font-size: 16px; color: var(--ink); -moz-appearance: textfield; }
.prod .qty input::-webkit-outer-spin-button, .prod .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.icon-btn.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; font-weight: 800; color: var(--ink); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.text-danger { color: var(--rose-ink); font-weight: 600; }

/* Kasa raporu · giriş-çıkış kayıtları */
.mv-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.mv-search { flex: 1 1 260px; max-width: 380px; height: 40px; }
.mv-table { min-width: 980px; }
.mv-table td { vertical-align: top; }
.mv-table .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.mv-table .mv-notes { max-width: 220px; }
.mv-table tr[data-flag="1"] td:first-child { box-shadow: inset 3px 0 0 var(--peach-strong); }

/* Canlı pano · bekletme */
[data-state="paused"] .av, [data-state="paused"] .time-badge { background: var(--sky); color: var(--sky-ink); }
[data-state="paused"] .bar > span { background: var(--sky-mid); }
.pause-note { white-space: nowrap; display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--sky-ink); }
.kid-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.pause-menu { position: relative; }
.kid-actions form { margin: 0; }
.pause-menu > summary { list-style: none; }
.pause-menu > summary::-webkit-details-marker { display: none; }
.pause-menu[open] > summary { background: var(--brand-soft); color: var(--brand-ink); }
.pause-pop { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); z-index: 5; display: flex; gap: 6px; margin: 0; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); }
.pause-pop .btn { background: var(--brand-soft); color: var(--brand-ink); white-space: nowrap; }
.pause-pop .t { display: none; }
.next-right { display: block; font-size: 10px; font-weight: 600; opacity: .8; line-height: 1; }
.btn:has(.next-right) { flex-direction: column; gap: 2px; height: auto; min-height: 40px; padding-top: 5px; padding-bottom: 5px; }

/* Teslim: uygulamadan onay bekleme */
.app-wait { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--sky); color: var(--sky-ink); font-weight: 700; }
.app-wait-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sky-strong); animation: appwait 1.2s ease-in-out infinite; }
@keyframes appwait { 50% { opacity: .25; transform: scale(.7); } }

/* Kasa raporu · açık kasa özeti ve kapanış */
.cash-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.cash-flow .kpi { flex: 1 1 160px; }
.cash-flow .op { display: flex; align-items: center; font-size: 22px; font-weight: 800; color: var(--faint); }
.cash-flow .kpi-strong { background: var(--lilac); }
.cash-flow .kpi-strong .v { color: var(--brand-ink); }
.close-box { display: grid; gap: 10px; max-width: 460px; padding: 14px; border-radius: 16px; background: var(--soft); }
.close-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.close-line label, .close-line > span { font-weight: 600; color: var(--muted); }
.close-line[data-state="ok"] strong { color: var(--mint-ink); }
.close-line[data-state="off"] strong { color: var(--rose-ink); }

/* Gün sonu (Z) raporu */
.z-doc { max-width: 760px; display: grid; gap: 18px; }
.z-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 2px dashed var(--line-strong); }
.z-title { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.z-meta { font-size: 13px; text-align: right; }
.z-doc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.z-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.z-table th { text-align: left; font-size: 12px; color: var(--faint); font-weight: 600; padding: 4px 0; }
.z-table td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.z-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.z-table .z-total td { font-weight: 800; border-top: 2px solid var(--ink); }
.z-notes { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.z-foot { font-size: 12px; color: var(--muted); border-top: 2px dashed var(--line-strong); padding-top: 12px; }
.z-sign { display: flex; justify-content: space-between; gap: 40px; margin-top: 36px; }
.z-sign span { flex: 1; border-top: 1px solid var(--ink); padding-top: 4px; text-align: center; color: var(--ink); }

@page { margin: 14mm; }
@media print {
  body { background: #fff; }
  .sidenav, .rail, .no-print, .topbar { display: none !important; }
  .shell, .app, .workspace, .content { display: block !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; background: #fff !important; max-width: none !important; }
  .z-doc { box-shadow: none; max-width: none; padding: 0; }
}

/* Yönetici · tanımlar ve kullanıcılar */
.pkg.is-editing { outline: 2px solid var(--brand); outline-offset: -2px; }
tr.is-editing td { background: #F3EFFF; }
tr.is-editing td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.day-chip { position: relative; cursor: pointer; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--soft); color: var(--muted); font-weight: 700; font-size: 12px; }
.day-chip input:checked + span { background: var(--brand); color: #fff; }
.day-chip input:focus-visible + span { outline: 3px solid #C4BBFB; outline-offset: 2px; }
.secret-box { display: grid; gap: 6px; margin-bottom: 16px; background: var(--mint); color: var(--mint-ink); }
.secret-line { display: flex; gap: 10px; align-items: baseline; }
.secret-line .mono { font-size: 16px; font-weight: 800; color: var(--ink); }
.secret-line .secret { letter-spacing: .08em; user-select: all; }

/* Fişler */
.orders { display: grid; gap: 12px; }
.order { display: grid; gap: 8px; }
.order.is-void { opacity: .7; }
.order-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.order-total { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.order-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.order-items li { display: flex; gap: 8px; }
.order-items li .mono { margin-left: auto; }
.order.is-void .order-items { text-decoration: line-through; }
.order-void { font-size: 12px; color: var(--rose-ink); background: var(--rose); border-radius: 10px; padding: 8px 10px; }
.order-void-form > summary { list-style: none; cursor: pointer; }
.order-void-form > summary::-webkit-details-marker { display: none; }

/* Şirketler ve şubeler */
.company { display: grid; gap: 10px; }
.company.is-void { opacity: .65; }
.company-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.company-head .name { font-weight: 800; font-size: 16px; }
.branch-code { margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 4px 10px; }
.branch-code strong { color: var(--brand-ink); letter-spacing: .06em; }

/* Küçük tablo butonları ve ayrıntı ekranları */
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; gap: 4px; box-shadow: none; }
.btn-quiet-danger { color: var(--rose-strong); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.form-card { max-width: 720px; }
.table .actions-cell { width: 1%; }
.table .actions-cell { white-space: nowrap; text-align: right; }
.table .actions-cell form { display: inline; margin: 0; }
.table .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.table td.num, .table th.num { text-align: right; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters .input, .filters .select { height: 38px; width: auto; min-width: 140px; max-width: 220px; font-size: 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--brand-ink); font-weight: 600; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.info-grid .k { font-size: 12px; color: var(--muted); }
.info-grid .v { font-weight: 700; }
.occ { display: inline-flex; flex-direction: column; gap: 4px; min-width: 70px; }
.occ .bar { height: 5px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.occ .bar > span { display: block; height: 100%; background: var(--mint-strong); }
.section-head > .btn:last-child { margin-left: auto; }

/* Sekmeler (Ayarlar) */
.tabs { display: flex; align-self: flex-start; width: max-content; max-width: 100%; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; margin: -8px 0 16px; }
.tabs a { padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: 13px; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Yetki matrisi */
.matrix-wrap { overflow-x: auto; }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; font-size: 13px; }
.matrix th, .matrix td { padding: 9px 10px; border-bottom: 1px solid var(--line, #EEEAF7); vertical-align: middle; }
.matrix thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; text-align: center; font-weight: 700; color: var(--ink); vertical-align: bottom; }
.matrix thead th:first-child { text-align: left; color: var(--muted); font-weight: 600; }
.matrix thead .role-h { min-width: 120px; }
.matrix thead .role-h .n { display: block; }
.matrix thead .role-h .c { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.matrix thead .role-h .a { display: flex; gap: 6px; justify-content: center; margin-top: 6px; font-size: 11px; font-weight: 600; }
.matrix thead .role-h .a form { margin: 0; }
.matrix thead .role-h .a button { background: none; border: 0; padding: 0; font: inherit; color: var(--rose-strong); cursor: pointer; }
.matrix .grp td { background: var(--soft); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.matrix td.cell { text-align: center; }
.matrix td.cell input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.matrix td.cell input:disabled { cursor: not-allowed; opacity: .55; }
.matrix .full { background: #F7F5FD; }
.matrix tbody tr:hover td:not(.full) { background: #FBFAFF; }
.matrix tbody tr.grp:hover td { background: var(--soft); }
.matrix .perm .k { display: block; font-size: 11px; color: var(--muted); font-family: var(--mono, monospace); }
.matrix-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.tabs-sub { background: transparent; border: 1px solid var(--line); margin-top: 0; }
