/* ═══════════ Renkler ve ölçüler ═══════════ */
:root {
  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface-2: #e9eeeb;
  --ink: #15201c;
  --muted: #5a6762;
  --line: #d6dedb;
  --brand: #1f5e4b;
  --brand-ink: #ffffff;
  --brand-soft: #dbeae4;

  --sabah: #8f5300;
  --sabah-bg: #fff4de;
  --sabah-band: #f0a531;
  --aksam: #33408a;
  --aksam-bg: #e8eaf7;
  --aksam-band: #4a58a8;
  --temiz: #1b6b78;
  --temiz-bg: #dcf0f2;

  --wa: #138a48;
  --wa-ink: #ffffff;
  --call: #e9eeeb;
  --danger: #b3261e;
  --danger-bg: #fce8e6;
  --ok: #1d7543;
  --focus: #2f7dd1;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 20px;
  --shadow-sheet: 0 -8px 40px rgba(14, 30, 24, 0.18);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1412;
    --surface: #16201c;
    --surface-2: #1e2a25;
    --ink: #e6eeea;
    --muted: #98a7a1;
    --line: #2a3832;
    --brand: #62b89b;
    --brand-ink: #08130f;
    --brand-soft: #1b3a30;
    --sabah: #f4b95e;
    --sabah-bg: #2b2213;
    --sabah-band: #f0a531;
    --aksam: #aab4f2;
    --aksam-bg: #1b1f3c;
    --aksam-band: #7180d6;
    --temiz: #74c9d5;
    --temiz-bg: #13303a;
    --wa: #2bc76f;
    --wa-ink: #04170b;
    --call: #24332d;
    --danger: #ff8d84;
    --danger-bg: #3a1714;
    --ok: #6fd39a;
    --focus: #7fb6f5;
    --shadow-sheet: 0 -8px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

/* ═══════════ Temel ═══════════ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.has-sheet { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.86em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.t-err { color: var(--danger); }
.t-ok { color: var(--ok); display: inline-flex; align-items: center; gap: 4px; }
.t-ok .ic { width: 16px; height: 16px; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.ic { width: 20px; height: 20px; flex: none; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
#print-root { display: none; }

/* ═══════════ Düğmeler ═══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--r-m);
  background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background-color .15s, transform .08s;
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-soft { background: var(--surface); border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-text { color: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 17px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { filter: brightness(1.07); }
.btn-call { background: var(--call); color: var(--ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn-call { background: var(--call); color: var(--ink); width: 44px; height: 44px; }
.icon-btn-wa { background: var(--wa); color: var(--wa-ink); width: 44px; height: 44px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ═══════════ Kabuk ═══════════ */
.shell { min-height: 100vh; }
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav-brand, .nav-user { display: none; }
.nav-link {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600;
}
.nav-link .ic { width: 23px; height: 23px; }
.nav-link[aria-current] { color: var(--brand); }
.nav-link[aria-current] .ic { stroke-width: 2.2; }
#view { outline: none; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px); }

.page { padding: 20px 16px; max-width: 1180px; margin: 0 auto; }
.page-narrow { max-width: 760px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 28px; display: flex; align-items: baseline; gap: 10px; }
.page-head .count { font-size: 17px; color: var(--muted); font-weight: 500; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 14px; margin: 10px 0 14px; }
.sub-stats { color: var(--muted); font-size: 14px; margin: -8px 0 14px; }

@media (max-width: 640px) {
  .head-actions .btn span { display: none; }
  .head-actions .btn { padding: 0 12px; }
  .head-actions .btn-primary span { display: inline; }
  .hide-sm { display: none; }
}

@media (min-width: 900px) {
  .nav {
    inset: 0 auto 0 0; width: 232px; height: auto; flex-direction: column; padding: 20px 12px;
    border-top: 0; border-right: 1px solid var(--line); gap: 4px;
  }
  .nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; padding: 6px 10px 22px; color: var(--brand); }
  .nav-brand .ic { width: 26px; height: 26px; }
  .nav-link { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 12px; border-radius: 10px; font-size: 15px; }
  .nav-link:hover { background: var(--surface-2); color: var(--ink); }
  .nav-link[aria-current] { background: var(--brand-soft); color: var(--brand); }
  .nav-user { display: block; margin-top: auto; padding: 10px 12px; color: var(--muted); font-size: 14px; }
  #view { margin-left: 232px; padding-bottom: 40px; }
  .page { padding: 32px 36px; }
}

/* ═══════════ Giriş ═══════════ */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.login-card h1 { font-size: 26px; }
.login-mark {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink);
}
.login-mark .ic { width: 30px; height: 30px; }

/* ═══════════ Form ═══════════ */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-size: 14px; font-weight: 600; color: var(--muted); padding: 0; }
.field input, .field select, textarea, .search input, .select select {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface);
  font-size: 16px; /* iOS yakınlaştırmasın */
}
.field input:focus, textarea:focus, .search input:focus, .select select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
textarea { resize: vertical; line-height: 1.45; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-error { color: var(--danger); background: var(--danger-bg); padding: 10px 12px; border-radius: var(--r-s); font-size: 14px; }
.field-msg { font-size: 13px; color: var(--muted); min-height: 1em; }
.form-actions { display: flex; justify-content: flex-end; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.search { position: relative; display: block; flex: 1 1 220px; }
.search .ic { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search input { padding-left: 40px; }
.select { display: block; flex: 0 1 auto; }
.select select { padding-right: 32px; min-width: 120px; }

.segmented {
  display: flex; gap: 4px; padding: 4px; border-radius: var(--r-m); background: var(--surface-2); margin-bottom: 4px;
}
.segmented button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer;
}
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

.seg-mini { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.seg-mini button, .seg-mini label span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer;
}
.seg-mini button[aria-pressed="true"], .seg-mini input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.seg-mini label { display: flex; flex: 1; }
.seg-mini label span { flex: 1; justify-content: center; }
.seg-mini input { position: absolute; opacity: 0; pointer-events: none; }
.seg-mini input:focus-visible + span { outline: 2.5px solid var(--focus); }
.seg-fill { display: flex; }
.seg-mini .ic { width: 18px; height: 18px; }

/* ═══════════ Etiketler ═══════════ */
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.tag-warn { background: var(--danger-bg); color: var(--danger); }
.lang {
  display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; vertical-align: 2px;
}
.lang-tr { background: #fde3e1; color: #9b1c14; }
.lang-id { background: #ffe9d6; color: #8a3a00; }
@media (prefers-color-scheme: dark) {
  .lang-tr { background: #47201d; color: #ffb4ad; }
  .lang-id { background: #45291a; color: #ffc59a; }
}

/* ═══════════ BUGÜN ═══════════ */
.page-today { max-width: 760px; }
.today-head { margin: 4px 0 16px; }
.today-date { color: var(--muted); font-weight: 500; }
.today-head h1 { font-size: clamp(38px, 11vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }

.day-strip {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 22px;
}
.day-pill {
  display: grid; justify-items: center; gap: 1px; padding: 8px 0 7px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--surface); cursor: pointer; color: var(--muted);
}
.dp-label { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.dp-num { font-size: 19px; font-weight: 650; color: var(--ink); line-height: 1.2; }
.dp-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.dp-dot.is-empty { background: transparent; }
.day-pill.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.day-pill.is-active .dp-num { color: var(--brand-ink); }
.day-pill.is-active .dp-dot { background: var(--brand-ink); }
.day-pill.is-active .dp-dot.is-empty { background: transparent; }

.duty {
  position: relative; border-radius: var(--r-l); padding: 16px 14px 14px 18px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
}
.duty::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; }
.duty-sabah::before { background: var(--sabah-band); }
.duty-aksam::before { background: var(--aksam-band); }
.duty-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.duty-title { display: flex; align-items: center; gap: 10px; }
.duty-title h2 { font-size: 24px; }
.duty-ic { width: 28px; height: 28px; }
.duty-sabah .duty-ic { color: var(--sabah-band); }
.duty-aksam .duty-ic { color: var(--aksam-band); }
.duty-count { font-size: 13px; color: var(--muted); font-weight: 500; padding-top: 4px; }
.duty-sub { margin-top: 12px; }
.duty-sub h3 {
  display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 650; color: var(--muted); margin-bottom: 6px;
}
.duty-sub h3 .ic { width: 17px; height: 17px; }

.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.person {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 10px 10px 12px; border-radius: var(--r-m); background: var(--bg);
}
.duty-sabah .person { background: var(--sabah-bg); }
.duty-aksam .person { background: var(--aksam-bg); }
.person.is-sent { opacity: 0.8; }
.p-main { min-width: 0; flex: 1 1 180px; display: grid; gap: 4px; }
.p-name { font-weight: 650; font-size: 16.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.p-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.person .tag { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.p-sent {
  justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 5px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); font-size: 13px; font-weight: 600; cursor: pointer;
}
.p-sent .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.p-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.p-actions .btn { min-height: 44px; padding: 0 14px; }
.no-phone { font-size: 13px; color: var(--danger); font-weight: 600; }
.empty-line { color: var(--muted); font-size: 14px; padding: 6px 0; }
@media (max-width: 420px) {
  .p-actions { width: 100%; }
  .p-actions .btn { flex: 1; }
  .p-actions .btn-call { flex: 0 0 auto; }
}

.empty-card {
  border: 1.5px dashed var(--line); border-radius: var(--r-l); padding: 28px 22px; display: grid; gap: 12px; justify-items: start;
  background: var(--surface);
}
.empty-card h2 { font-size: 20px; }
.empty-card p { color: var(--muted); max-width: 60ch; }
.empty-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Sırayla gönder */
.queue { display: grid; gap: 14px; }
.queue-progress { display: flex; gap: 4px; }
.queue-progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-2); }
.queue-progress .is-done { background: var(--ok); }
.queue-progress .is-now { background: var(--brand); }
.queue-step { font-size: 14px; color: var(--muted); font-weight: 600; }
.queue-person { display: grid; gap: 6px; }
.queue-person .p-name { font-size: 22px; }
.queue-msg-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: -8px; }
.queue-msg {
  margin: 0; padding: 12px 14px; border-radius: 4px var(--r-m) var(--r-m) var(--r-m);
  background: color-mix(in srgb, var(--wa) 12%, var(--surface)); white-space: pre-wrap; font-size: 15px;
}
.queue-note { display: flex; gap: 6px; align-items: center; color: var(--ok); font-size: 14px; font-weight: 600; }
.queue-note .ic { width: 17px; height: 17px; }
.queue-nav { display: flex; justify-content: space-between; gap: 8px; }
.queue-done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 10px 0; }
.big-check { width: 52px; height: 52px; color: var(--ok); stroke-width: 2.4; }

/* ═══════════ ÇİZELGE ═══════════ */
.roster-wrap { border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.roster { width: 100%; border-collapse: collapse; table-layout: fixed; }
.roster th, .roster td { border-bottom: 1px solid var(--line); vertical-align: top; }
.roster tbody tr:last-child th, .roster tbody tr:last-child td { border-bottom: 0; }
.roster thead th { padding: 12px 10px; font-size: 14px; text-align: left; font-weight: 650; }
.roster thead th:first-child { width: 112px; }
.roster thead .ic { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.th-sabah { background: var(--sabah-bg); color: var(--sabah); }
.th-aksam { background: var(--aksam-bg); color: var(--aksam); }
.roster tbody th { padding: 14px 10px; text-align: left; font-weight: 600; font-size: 15px; position: relative; }
.roster td { padding: 4px; border-left: 1px solid var(--line); }
.d-short { display: none; }
.roster tr.is-today th { color: var(--brand); }
.roster tr.is-today { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.today-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: 2px; }
.cell {
  width: 100%; min-height: 52px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px; padding: 8px;
  border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; text-align: left;
}
.cell:hover { border-color: var(--line); background: var(--bg); }
.cell-add { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; min-height: 26px; }
.cell-add .ic { width: 16px; height: 16px; }
.cell:hover .cell-add { color: var(--brand); }
.chip {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border-radius: 7px;
  font-size: 13.5px; font-weight: 600; line-height: 1.25; background: var(--surface-2);
}
.roster-yemek .chip { background: color-mix(in srgb, var(--brand) 13%, var(--surface)); }
.roster-temizlik .chip { background: var(--temiz-bg); color: var(--temiz); }
.chip-id { box-shadow: inset 3px 0 0 #e8853a; }
.roster-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.free { flex: 1 1 300px; }
.free summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 0; }
.free p { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
@media (max-width: 560px) {
  .roster thead th:first-child { width: 54px; }
  .d-long { display: none; }
  .d-short { display: inline; }
  .roster tbody th { padding: 14px 6px 14px 10px; font-size: 14px; }
  .today-dot { display: block; margin: 4px 0 0; }
  .cell { padding: 6px; }
  .chip { font-size: 13px; padding: 2px 7px; }
}

/* Hücre seçici */
.pick-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; position: sticky; top: 0; z-index: 1; background: var(--surface); padding-bottom: 4px; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pick {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--line);
  cursor: pointer; background: var(--surface);
}
.pick:hover { background: var(--bg); }
.pick.is-on { border-color: var(--brand); background: var(--brand-soft); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-box {
  flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent;
}
.pick-box .ic { width: 16px; height: 16px; stroke-width: 3; }
.pick.is-on .pick-box { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pick input:focus-visible + .pick-box { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.pick-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pick-clash { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--sabah); font-weight: 600; }
.pick-clash .ic { width: 15px; height: 15px; }
.pick-load { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pick-count { font-size: 14px; color: var(--muted); font-weight: 600; margin-right: auto; }

/* ═══════════ TALEBELER ═══════════ */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.view-toggle { margin-left: auto; }
@media (max-width: 640px) { .view-toggle span { display: none; } .view-toggle { margin-left: 0; } }

.grid-wrap {
  overflow: auto; max-height: calc(100vh - 260px); min-height: 200px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface);
}
.grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; font-size: 15px; }
.grid thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-size: 13px; font-weight: 650; color: var(--muted);
  padding: 9px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
}
.grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; position: relative; }
.grid tr > :last-child { border-right: 0; }
.grid .g-num { width: 44px; text-align: center; color: var(--muted); font-size: 13px; background: var(--surface-2); position: sticky; left: 0; z-index: 1; }
.grid thead .g-num { z-index: 3; }
.grid .g-num .ic { width: 16px; height: 16px; vertical-align: middle; }
.w-s { width: 104px; } .w-m { width: 150px; } .w-l { width: 190px; }
.grid .g-tasks { text-align: center; }
.grid .g-act { width: 48px; text-align: center; }
.gi {
  width: 100%; height: 42px; padding: 0 10px; border: 0; background: transparent; border-radius: 0; font-size: 15px;
}
select.gi { padding-right: 4px; cursor: pointer; }
.gi:focus { outline: none; background: color-mix(in srgb, var(--brand) 8%, var(--surface)); box-shadow: inset 0 0 0 2px var(--brand); }
.grid td.err .gi { box-shadow: inset 0 0 0 2px var(--danger); background: var(--danger-bg); }
.grid td.saving .gi { opacity: 0.6; }
.grid td.saved::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ok);
}
.grid tr.g-new td { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.grid tr.g-new .gi::placeholder { color: var(--muted); }
.grid tr.g-new td:last-child { padding: 0 8px; }
.grid tbody tr:hover td:not(.g-num) { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.grid tr.flash td { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--ok) 25%, transparent); } }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
.card { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.card-main {
  flex: 1; min-width: 0; display: grid; gap: 4px; padding: 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer;
}
.card-main:hover { background: var(--bg); }
.card-phone { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-actions { display: flex; gap: 6px; }

/* Yapıştırma */
.steps-mini { margin: 0 0 8px; padding-left: 20px; color: var(--ink); font-size: 15px; }
.paste-box { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; tab-size: 12; white-space: pre; overflow: auto; }
.paste-sum { margin: 14px 0 8px; font-size: 14px; }
.mini-table-wrap { overflow: auto; max-height: 320px; border: 1px solid var(--line); border-radius: var(--r-s); }
.mini-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.mini-table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 7px 8px; font-weight: 650; color: var(--muted); }
.mini-table td { padding: 7px 8px; border-top: 1px solid var(--line); }
.mini-table .row-err td { background: var(--danger-bg); }
.mini-table .row-skip td { color: var(--muted); text-decoration: line-through; }
.mini-table .row-skip td:last-child { text-decoration: none; }

/* Talebe kartı */
.task-list h3 { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.task-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.task-list li { display: flex; align-items: center; gap: 8px; font-size: 15px; padding: 6px 10px; border-radius: var(--r-s); }
.task-list .ic { width: 17px; height: 17px; }
.tl-sabah { background: var(--sabah-bg); }
.tl-sabah .ic { color: var(--sabah-band); }
.tl-aksam { background: var(--aksam-bg); }
.tl-aksam .ic { color: var(--aksam-band); }

/* ═══════════ AYARLAR ═══════════ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 18px; margin-bottom: 16px; display: grid; gap: 12px; }
.panel h2 { font-size: 19px; }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-row h2 { font-size: 17px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tpl-form { display: grid; gap: 18px; margin-top: 4px; }
.tpl { display: grid; gap: 6px; }
.tpl-label { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.tpl-label .ic { width: 18px; height: 18px; color: var(--muted); }
.tpl-preview { font-size: 13.5px; color: var(--muted); }
.tpl-preview span:first-child { font-weight: 600; }
.tpl .link { justify-self: start; font-size: 13.5px; }

/* ═══════════ Pencere ═══════════ */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 16, 13, 0.45); animation: fade .18s ease-out; }
.sheet {
  position: relative; width: 100%; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: var(--shadow-sheet);
  animation: rise .22s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 12px 10px 20px; }
.sheet-head h2 { font-size: 19px; }
.sheet-body { padding: 4px 20px 16px; overflow: auto; flex: 1; overscroll-behavior: contain; }
.sheet-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.sheet-wrap.out .sheet { animation: sink .18s ease-in forwards; }
.sheet-wrap.out .sheet-backdrop { animation: fade .18s ease-in reverse forwards; }
.confirm-text { color: var(--ink); }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { border-radius: var(--r-l); max-height: 86vh; animation-name: pop; }
  .sheet-wrap.out .sheet { animation-name: unpop; }
  .sheet-s { max-width: 440px; }
  .sheet-m { max-width: 600px; }
  .sheet-l { max-width: 960px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes sink { to { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
@keyframes unpop { to { transform: scale(.97); opacity: 0; } }

/* ═══════════ Bildirim ═══════════ */
#toast-root {
  position: fixed; z-index: 80; left: 50%; translate: -50% 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
  display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none;
}
@media (min-width: 900px) { #toast-root { bottom: 24px; left: calc(50% + 116px); } }
.toast {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-m); background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 500;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22); animation: rise .2s ease-out;
}
.toast-error { background: var(--danger); color: #fff; }
.toast-ok { background: var(--ok); color: #fff; }
@media (prefers-color-scheme: dark) { .toast-ok, .toast-error { color: #0b120f; } }
.toast button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 4px; }
.toast.out { opacity: 0; transition: opacity .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══════════ Yazdırma ═══════════ */
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  #app, #sheet-root, #toast-root { display: none !important; }
  #print-root { display: block; }
  #print-root h1 { font-size: 18pt; margin-bottom: 2pt; }
  #print-root h2 { font-size: 13pt; margin: 14pt 0 6pt; }
  .print-date { color: #555; font-size: 9pt; }
  #print-root table { width: 100%; border-collapse: collapse; table-layout: fixed; page-break-inside: avoid; }
  #print-root th, #print-root td { border: 1px solid #888; padding: 5pt 6pt; text-align: left; vertical-align: top; font-size: 10pt; }
  #print-root thead th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-root thead th:first-child { width: 22%; }
  .pchip { display: block; }
}
.sheet:focus { outline: none; }

/* ═══════════ Temizlikçi listesi ═══════════ */
.duty-temizlik::before { background: var(--temiz); }
.duty-temizlik .duty-ic { color: var(--temiz); }
.duty-temizlik .person { background: var(--temiz-bg); }
.p-num {
  flex: none; align-self: flex-start; width: 28px; height: 28px; margin-top: 1px; border-radius: 8px;
  display: grid; place-items: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--temiz) 16%, var(--surface)); color: var(--temiz);
}
.clean-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0 14px; }
.clean-head .hint { margin: 0; flex: 1 1 260px; }
.clean-list { margin-bottom: 8px; }
.clean-list .person { background: var(--surface); border: 1px solid var(--line); }
.clean-list .p-actions { align-items: center; }
.clean-list .no-phone { font-size: 14px; }
.pick-new { margin-top: 14px; font-size: 14px; color: var(--muted); }
.tl-temizlik { background: var(--temiz-bg); }
.tl-temizlik .ic { color: var(--temiz); }
.empty-card { margin-top: 12px; }
@media (max-width: 420px) {
  .person .p-num + .p-main { flex-basis: calc(100% - 40px); }
  .clean-list .p-actions .btn-wa { flex: 1; }
}
@media print {
  #print-root .print-list thead th:first-child { width: 8%; }
}
.clean-list .tag { background: var(--surface-2); }
