:root {
  --bg: #f6f4f0;
  --surface: #ffffff;
  --surface-2: #f1ede6;
  --text: #1c1917;
  --muted: #6b645c;
  --border: #e4ded4;
  --accent: #b45309;
  --accent-ink: #ffffff;
  --accent-soft: #fdf0e1;
  --ok: #15803d;      --ok-soft: #e5f5ea;
  --warn: #a16207;    --warn-soft: #fdf5d8;
  --info: #1d4ed8;    --info-soft: #e6edfd;
  --bad: #b91c1c;     --bad-soft: #fde8e8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.05);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #141210;
  --surface: #1d1a17;
  --surface-2: #27231f;
  --text: #f3efe9;
  --muted: #a39b91;
  --border: #36302a;
  --accent: #f59e0b;
  --accent-ink: #1c1917;
  --accent-soft: #3a2a12;
  --ok: #4ade80;      --ok-soft: #14301f;
  --warn: #facc15;    --warn-soft: #332a0e;
  --info: #93c5fd;    --info-soft: #172544;
  --bad: #f87171;     --bad-soft: #3a1717;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar { padding-top: env(safe-area-inset-top); }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--text); white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); }
#nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
#nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--muted); white-space: nowrap; font-weight: 500; }
#nav a:hover { background: var(--surface-2); color: var(--text); }
#nav a.active { background: var(--accent-soft); color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#userbox { display: flex; align-items: center; gap: 8px; }
.user-name { font-weight: 600; font-size: 14px; white-space: nowrap; }
.role-chip { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }

main#app { padding-top: 24px; padding-bottom: 48px; }

/* ---------- Generic UI ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.ok { color: var(--ok); }
.btn.ok:hover { background: var(--ok-soft); border-color: var(--ok); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.muted { background: var(--surface-2); color: var(--muted); }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; flex-wrap: wrap; }
.tab { padding: 7px 14px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form label { flex: 1 1 150px; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 14px; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: center; min-height: calc(100vh - 160px); }
.auth-hero h1 { font-size: 40px; margin-top: 16px; }
.auth-hero p { font-size: 18px; color: var(--muted); margin-top: 8px; max-width: 420px; }
.auth-hero ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); }
.logo-big { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 30px; }
.auth-card .tabs { margin-bottom: 16px; }
.auth-single { max-width: 440px; margin: 32px auto; }
.demo { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; gap: 8px; }

/* işlem sürerken */
body.busy { cursor: progress; }
body.busy #app { opacity: .7; pointer-events: none; transition: opacity .15s; }

/* ---------- Platform: arama, uyarı bandı, çağrı kartı ---------- */
.hero.col { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.search { display: flex; gap: 8px; flex-wrap: wrap; }
.search input { flex: 1 1 220px; }
.search select { flex: 0 1 190px; width: auto; }
.banner { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; border: 0; font-weight: 500; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
a.pick { color: var(--text); }

/* ---------- Randevu taşıma ---------- */
.moved-note { color: var(--info); background: var(--info-soft); padding: 4px 8px; border-radius: 8px; align-self: flex-start; }
#modal .days { padding-bottom: 6px; }
td .btn.sm { margin-left: 6px; }
/* pencere kaydırılsa da onay düğmesi altta görünür kalsın */
.sticky-bar { position: sticky; bottom: -22px; margin: 12px -22px -22px; padding: 12px 22px 16px; background: var(--surface); border-top: 1px solid var(--border); }

/* ---------- Hesap silme ---------- */
.danger-zone { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-color: var(--bad-soft); }

/* ---------- Hukuki metinler ---------- */
.legal { max-width: 780px; margin: 0 auto; line-height: 1.65; }
.legal h1 { font-size: 24px; margin: 14px 0 4px; }
.legal h2 { font-size: 17px; margin: 22px 0 6px; }
.legal p, .legal ul { margin: 0 0 10px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
mark.todo { background: var(--warn-soft); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.legal-links { margin-top: 14px; text-align: center; }
.check span { font-weight: 400; }
.check input[type="checkbox"], .check input[type="radio"] { flex: none; width: 16px; height: 16px; margin-top: 2px; }
form .check { align-items: flex-start; }

/* ---------- Install (PWA) ---------- */
.install { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; }
.auth-hero .install { max-width: 420px; }
.install-ico { font-size: 26px; }

/* ---------- Customer home ---------- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.hero h1 { font-size: 24px; }
.reminder { display: flex; gap: 12px; align-items: center; background: var(--info-soft); color: var(--info); border: 0; margin-bottom: 14px; }
.reminder b { color: var(--text); }
.loyalty .dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin: 12px 0 8px; }
.loyalty .dot { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--border); display: grid; place-items: center; font-size: 12px; color: var(--accent-ink); }
.loyalty .dot.on { background: var(--accent); border: 2px solid var(--accent); }
.loyalty .dot.gift { border-style: solid; border-color: var(--accent); color: var(--accent); }

.barber { display: flex; flex-direction: column; gap: 10px; }
.barber.selectable { cursor: pointer; text-align: left; font: inherit; color: inherit; }
.barber.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.barber-head { display: flex; gap: 12px; align-items: center; }
.barber-head > div:nth-child(2) { flex: 1; min-width: 0; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--c, var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.fav { font-size: 18px; color: var(--muted); }
.fav.on { color: #e11d48; border-color: #e11d48; }
.stars { color: #f59e0b; letter-spacing: 1px; }
.barber-foot { display: flex; gap: 6px; align-items: center; }

.svc-list { display: flex; flex-direction: column; }
.svc { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.svc:last-child { border-bottom: 0; }
.svc .price { font-weight: 700; }
.info-list { display: grid; gap: 10px; margin: 12px 0 16px; }

/* ---------- Booking ---------- */
.book { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
/* grid sütunu, içindeki yatay kaydırmalı gün şeridi yüzünden ekrandan genişlemesin */
.book > *, .dash-grid > * { min-width: 0; }
.step { margin-bottom: 16px; }
.step-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.step.locked .step-num { background: var(--surface-2); color: var(--muted); }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pick {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.pick:hover { border-color: var(--accent); }
.pick.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pick .meta { font-size: 12px; color: var(--muted); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day {
  flex: none; width: 66px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12px;
}
.day b { font-size: 20px; }
.day:hover:not(:disabled) { border-color: var(--accent); }
.day.selected { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { padding: 9px 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.slot:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.slot.selected { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.slot:disabled { background: var(--surface-2); color: var(--muted); text-decoration: line-through; cursor: not-allowed; border-color: transparent; }
.hint { padding: 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.summary { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.sum-path { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-weight: 600; padding: 12px; background: var(--accent-soft); border-radius: 10px; font-size: 14px; }
.sum-path .arrow { color: var(--accent); }
.sum-rows { display: grid; gap: 6px; font-size: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; }
.sum-row.total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.sum-row.discount { color: var(--ok); }
.err { color: var(--bad); font-size: 13px; }
.okmsg { color: var(--ok); font-size: 13px; }
.radio-group { display: grid; gap: 6px; }

/* ---------- Appointment cards ---------- */
.appt { display: flex; gap: 14px; }
.appt-date { flex: none; width: 58px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; }
.appt-date b { font-size: 22px; line-height: 1; }
.appt-date span { font-size: 12px; text-transform: uppercase; }
.appt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.appt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.appt-body .btn-row { margin-top: 6px; }
.appt-row { display: flex; gap: 16px; align-items: center; border-left: 4px solid var(--border); }
.appt-row.status-pending { border-left-color: var(--warn); }
.appt-row.status-confirmed { border-left-color: var(--info); }
.appt-row.status-completed { border-left-color: var(--ok); }
.appt-row.status-cancelled { border-left-color: var(--bad); opacity: .75; }
.appt-row.status-noshow { border-left-color: var(--muted); opacity: .75; }
.appt-row .time { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.appt-row .time b { font-size: 18px; }
.appt-row .time span { font-size: 12px; color: var(--muted); }
.appt-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* ---------- Week grid ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-col { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px; min-height: 200px; display: flex; flex-direction: column; gap: 6px; }
.week-col.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.week-col.closed { background: var(--surface-2); }
.week-head { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.week-head b { display: block; font-size: 15px; color: var(--text); }
.mini { font-size: 12px; padding: 6px 7px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--border); }
.mini b { display: block; }
.mini.pending { border-left-color: var(--warn); }
.mini.confirmed { border-left-color: var(--info); }
.mini.completed { border-left-color: var(--ok); }
.mini.cancelled, .mini.noshow { border-left-color: var(--bad); opacity: .6; text-decoration: line-through; }

/* ---------- Hours editor ---------- */
.hours-table { display: grid; gap: 8px; }
.hours-row { display: grid; grid-template-columns: 130px 120px 1fr 1fr; gap: 10px; align-items: center; }
.hours-row.off input[type="time"] { opacity: .4; }
.leave-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.leave { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; }
.leave button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { padding: 16px; }
.stat .lbl { font-size: 13px; color: var(--muted); }
.stat .val { font-size: 28px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stat.accent .lbl { color: inherit; opacity: .85; }
.stat .val.ok { color: var(--ok); }
.stat .val.warn { color: var(--warn); }
.stat .val.bad { color: var(--bad); }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 14px; }
.bars { display: flex; gap: 10px; height: 190px; align-items: stretch; margin-top: 14px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 70%; max-width: 46px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar-col.today .bar { background: var(--accent); opacity: .55; }
.bar-val { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-lbl { font-size: 12px; color: var(--muted); }
.top-item { display: flex; align-items: center; gap: 12px; }
.top-item .big { font-size: 18px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; padding: 0; }
.table-wrap table { min-width: 720px; }
td input, td select { padding: 6px 8px; }
td input[type="number"] { max-width: 110px; }

/* coupons */
.coupon { display: flex; flex-direction: column; gap: 10px; border-style: dashed; border-width: 2px; }
.coupon-code { font-family: ui-monospace, Consolas, monospace; font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: .05em; }

/* ---------- Modal & toast ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal[hidden] { display: none; }
.modal-card { position: relative; background: var(--surface); border-radius: 16px; padding: 22px; width: 100%; max-width: 480px; max-height: 85vh; overflow: auto; }
.modal-x { position: absolute; top: 12px; right: 12px; }
.star-pick { display: flex; gap: 4px; font-size: 32px; }
.star-pick button { border: 0; background: none; cursor: pointer; color: var(--border); padding: 0; font-size: inherit; line-height: 1; }
.star-pick button.on { color: #f59e0b; }
.review { padding: 12px 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .book, .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .week { grid-template-columns: 1fr; }
  .week-col { min-height: 0; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; gap: 24px; min-height: 0; }
  .auth-hero h1 { font-size: 30px; }
  .user-name, .role-chip { display: none; }
  #nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface);
    border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 2px;
  }
  #nav a { flex: 1; flex-direction: column; gap: 0; font-size: 11px; padding: 6px 4px; min-width: 62px; }
  #nav a .ico { font-size: 18px; }
  main#app { padding-bottom: 96px; }
  .toast { bottom: 90px; }
  .hours-row { grid-template-columns: 1fr 1fr; }
  .appt-row { flex-wrap: wrap; }
  .appt-row .actions { width: 100%; justify-content: flex-start; }
  .row2 { grid-template-columns: 1fr; }
  .grid.c2, .grid.c3 { grid-template-columns: 1fr; }
}

/* Randevu tamamlandı penceresi */
.done-head { text-align: center; margin-bottom: 12px; }
.done-ico { font-size: 46px; line-height: 1; margin-bottom: 8px; }
.done-head h2 { margin-bottom: 6px; }
.done-when { font-size: 17px; margin-bottom: 2px; }
.done-q { text-align: center; margin-bottom: 8px; }
.done-q + .chips { justify-content: center; }
.done-note { text-align: center; margin-bottom: 14px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }

/* İşletmenin elle eklediği randevu */
.tag-guest { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.setting { padding: 12px; border: 1px solid var(--border); border-radius: 12px; display: grid; gap: 4px; }

/* Öğle arası / saat kapatma */
.rest-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding-left: 4px; margin-top: -2px; }
.rest-row input[type="time"] { max-width: 130px; }
.hours-row.off .rest-row { opacity: .4; }
.closed-row { background: var(--surface-2); border-style: dashed; }
.mini.closed { background: var(--surface-2); color: var(--muted); border-left-color: var(--muted); }

/* Ödeme ve müşteri kartı */
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cust-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.cust-link:hover { color: var(--accent); }
.cust-card .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cust-card .stat .val { font-size: 18px; }
.cust-card .stat { padding: 10px 12px; }
@media (max-width: 520px) { .cust-card .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.txt-warn { color: var(--warn); font-weight: 600; }

/* Raporlar */
.rbars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-bottom: 18px; }
.rbar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.rbar span { display: block; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.rbar em { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10px; font-style: normal; color: var(--muted); }
.table-wrap table.fit, .table-wrap table.heat { min-width: 0; }
table.fit th, table.fit td { padding: 8px 6px; }
table.heat { border-collapse: separate; border-spacing: 3px; width: auto; }
table.heat th { font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px; border: 0; text-transform: none; }
table.heat td { width: 32px; min-width: 26px; height: 26px; text-align: center; font-size: 11px; border-radius: 5px; padding: 0; border: 0;
  background: color-mix(in srgb, var(--accent) calc(var(--h) * 85%), var(--surface-2)); color: var(--text); }
tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
.prim-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prim-row input { width: 70px; text-align: right; }

/* Geri çağırma */
.wb-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wb-row .btn-row { margin: 0; }
#wb-msg { width: 100%; margin-top: 4px; }

/* Bekleme listesi */
.wait-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.wait-staff summary { cursor: pointer; list-style: none; }
.wait-staff summary::-webkit-details-marker { display: none; }
.wait-staff .svc .btn { margin-left: 4px; }
