/* Şube Paneli — sade, nötr, tek vurgu rengi. Mobile-first. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --accent: #2f54d4;
  --accent-ink: #ffffff;
  --accent-soft: #eef2fd;
  --accent-line: #c7d3f7;
  --neg: #b42318;
  --neg-soft: #fef3f2;
  --pos: #067647;
  --warn-soft: #fffaeb;
  --warn-line: #fedf89;
  --warn-ink: #93370d;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --nav-h: 64px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.375rem; font-weight: 650; }
h2 { font-size: 1.0625rem; font-weight: 600; }
h3 { font-size: .9375rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--neg); }
.pos { color: var(--pos); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Uygulama kabuğu ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line); padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  display: flex; align-items: center; gap: 12px; min-height: 56px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 18px; height: 18px; stroke: #fff; }
.brand-text { min-width: 0; line-height: 1.2; }
.brand-text b { display: block; font-size: .9375rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { display: block; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

.main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 24px + var(--safe-b)); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: .875rem; margin-top: 2px; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line);
  display: flex; padding-bottom: var(--safe-b);
}
.bottomnav a {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--nav-h);
  color: var(--muted); font-size: .6875rem; font-weight: 500; text-decoration: none;
}
.bottomnav a span { max-width: 100%; padding: 0 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bottomnav a.on { color: var(--accent); }
.bottomnav a.on svg { stroke-width: 2.2; }
.sidenav { display: none; }

.signature { text-align: center; font-size: .75rem; color: #98a2b3; padding: 20px 16px 8px; letter-spacing: .01em; }
.signature a { color: var(--text-2); font-weight: 600; }
.signature a:hover { color: var(--accent); }

@media (min-width: 960px) {
  .app { padding-left: 232px; }
  .bottomnav { display: none; }
  .sidenav {
    display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 232px; background: var(--surface);
    border-right: 1px solid var(--line); padding: 16px 12px; gap: 2px; z-index: 25;
  }
  .sidenav .brand { padding: 4px 8px 16px; }
  .sidenav a.nav { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: .9375rem; }
  .sidenav a.nav:hover { background: var(--surface-2); text-decoration: none; }
  .sidenav a.nav.on { background: var(--accent-soft); color: var(--accent); }
  .sidenav .grow { flex: 1; }
  .topbar .brand { display: none; }
  .main { padding: 24px 32px 32px; }
  h1 { font-size: 1.5rem; }
}

/* ---------- Kartlar, ızgara ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.grid > .card, .grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head .muted { font-size: .8125rem; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .md-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .lg-2-1 { grid-template-columns: 2fr 1fr; } }

.kpi { padding: 14px 16px; }
.kpi .label { font-size: .75rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.375rem; font-weight: 650; margin-top: 4px; letter-spacing: -.02em; }
.kpi .hint { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.kpi.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.kpi.accent .label, .kpi.accent .hint { color: rgba(255, 255, 255, .8); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 600 .9375rem/1.2 var(--font);
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--neg); border-color: #fda29b; }
.btn.danger:hover { background: var(--neg-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .8125rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 52px; font-size: 1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Form ---------- */
label.f { display: block; }
label.f > span, .f-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px; font: 400 1rem/1.4 var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23667085' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
textarea.input { min-height: 80px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.money { text-align: right; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.input.sm { min-height: 40px; padding: 6px 10px; font-size: .9375rem; }
.help { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg label { padding: 8px 14px; border-radius: 8px; color: var(--text-2); font-size: .875rem; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; }
.seg a.on, .seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 0; }
.seg label span { padding: 8px 14px; border-radius: 8px; display: inline-flex; align-items: center; min-height: 38px; }
.seg.full { display: flex; } .seg.full > * { flex: 1; justify-content: center; } .seg.full label span { width: 100%; justify-content: center; }

/* ---------- Uyarılar ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: .9375rem; margin-bottom: 12px; }
.alert svg { margin-top: 1px; }
.alert.ok { background: #ecfdf3; border-color: #abefc6; color: #05603a; }
.alert.error { background: var(--neg-soft); border-color: #fecdca; color: #912018; }
.alert.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.alert.info { background: var(--accent-soft); border-color: var(--accent-line); color: #1e3a8a; }
.alert b { font-weight: 600; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.badge.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.badge.neg { background: var(--neg-soft); border-color: #fecdca; color: var(--neg); }
.badge.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.badge.ok { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.badge.demo { background: #f4f3ff; border-color: #d9d6fe; color: #5925dc; }

/* ---------- Liste / tablo ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .meta { font-size: .8125rem; color: var(--muted); }
a.row-link { color: inherit; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
a.row-link:hover { text-decoration: none; }
a.row-link:hover .title { color: var(--accent); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
table.t th, table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.t th { background: var(--surface-2); font-weight: 600; color: var(--text-2); font-size: .75rem; position: sticky; top: 0; z-index: 1; }
table.t th:first-child, table.t td:first-child { text-align: left; position: sticky; left: 0; background: inherit; z-index: 2; }
table.t tbody tr { background: var(--surface); }
table.t tbody tr:nth-child(even) { background: #fcfcfd; }
table.t tbody tr:hover { background: var(--accent-soft); }
table.t tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--line-strong); border-bottom: 0; }
table.t td.empty { color: #98a2b3; font-style: italic; }
table.t .col-key { background: #fafbff; }
table.t tr.missing td { color: #98a2b3; }
table.t td.l, table.t th.l { text-align: left; }

/* ---------- Kasa formu ---------- */
.money-row { display: grid; grid-template-columns: 1fr 150px; gap: 10px; align-items: center; padding: 6px 0; }
.money-row + .money-row { border-top: 1px dashed var(--line); }
.money-row label { font-weight: 500; color: var(--text-2); font-size: .9375rem; }
.money-row .input { min-height: 46px; }
@media (min-width: 520px) { .money-row { grid-template-columns: 1fr 190px; } }
.item-row { display: grid; grid-template-columns: 1fr 120px 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (min-width: 520px) { .item-row { grid-template-columns: 1fr 170px 44px; } }
.section-total { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 600; }
.sticky-sum {
  position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 15; margin: 16px -16px 0; padding: 12px 16px;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgba(16, 24, 40, .06);
}
.sticky-sum .sums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.sticky-sum .sums div { min-width: 0; }
.sticky-sum .sums span { display: block; font-size: .6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sticky-sum .sums b { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 960px) { .sticky-sum { bottom: 0; margin: 16px 0 0; border: 1px solid var(--line); border-radius: var(--r); } }

.calc-table { width: 100%; font-size: .9375rem; border-collapse: collapse; }
.calc-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.calc-table td:last-child { text-align: right; font-weight: 600; }
.calc-table tr.strong td { font-weight: 700; font-size: 1.0625rem; border-bottom: 0; }
.calc-table th { padding: 6px 0; font-size: .8125rem; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.calc-table th.num, .calc-table td.num { text-align: right; padding-left: 12px; }

/* ---------- Grafikler ---------- */
.bars .bar-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .875rem; }
.bars .track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bars .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.bars .fill.mute { background: #98a2b3; }
.bars .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.spark { width: 100%; height: 64px; display: block; }
.spark .b { fill: var(--accent); }
.spark .gap { fill: var(--line); }
.compare { display: grid; gap: 12px; }
@media (min-width: 720px) { .compare { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.compare .card { margin: 0; }
.compare dl { margin: 0; display: grid; grid-template-columns: 1fr auto; row-gap: 6px; font-size: .875rem; }
.compare dt { color: var(--muted); }
.compare dd { margin: 0; text-align: right; font-weight: 600; }

/* ---------- Giriş ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .brand { margin-bottom: 24px; }
.login-card .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
.login-card .brand-mark svg { width: 22px; height: 22px; }

/* ---------- Diğer ---------- */
.empty-state { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty-state svg { width: 32px; height: 32px; margin-bottom: 8px; color: #98a2b3; }
.filters { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
@media (min-width: 720px) { .filters { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.filters .input { min-height: 42px; font-size: .9375rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--accent); border-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs .count { font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .9375rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.log { border-left: 2px solid var(--line); padding-left: 12px; margin-left: 4px; }
.log + .log { margin-top: 12px; }
.log .when { font-size: .8125rem; color: var(--muted); }
.log ul { margin: 4px 0 0; padding-left: 18px; font-size: .875rem; }
details.inline > summary { cursor: pointer; list-style: none; }
details.inline > summary::-webkit-details-marker { display: none; }
.danger-zone { border-color: #fecdca; }
.modal-bg { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: none; align-items: flex-end; justify-content: center; z-index: 50; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 420px; padding: 20px; }
@media (min-width: 600px) { .modal-bg { align-items: center; } }
.pw-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.0625rem; background: var(--surface-2); border: 1px dashed var(--line-strong); padding: 8px 12px; border-radius: 8px; display: inline-block; user-select: all; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav .label { min-width: 120px; text-align: center; font-weight: 600; }
.day-status { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip { font-size: .75rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--warn-line); background: var(--warn-soft); color: var(--warn-ink); font-weight: 600; }
a.day-chip:hover { text-decoration: none; filter: brightness(.97); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .bottomnav, .sidenav, .topbar, .no-print, .signature { display: none !important; } .app { padding: 0; } .main { padding: 0; } }

/* ---------- Kullanıcı menüsü (sağ üst) ---------- */
.usermenu { position: relative; }
.usermenu > summary { list-style: none; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu[open] > summary { background: var(--surface-2); }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 30; }
.usermenu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; line-height: 1.3; }
.usermenu-who b { display: block; font-size: .9375rem; font-weight: 600; }
.usermenu-who span { display: block; font-size: .75rem; color: var(--muted); }
.usermenu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: .9375rem; text-align: left; cursor: pointer; }
.usermenu-item:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- Uygulamayı yükle kartı ---------- */
.install-card { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; margin-bottom: 14px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r); }
.install-card[hidden] { display: none; }
.install-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; flex: none; }
.install-ic svg { stroke: #fff; width: 18px; height: 18px; }
.install-body { flex: 1; min-width: 0; line-height: 1.35; font-size: .8125rem; color: var(--text-2); }
.install-body > b { display: block; font-size: .9375rem; font-weight: 600; color: var(--text); }
.install-body [hidden] { display: none; }

/* ---------- Kasa formu: avans/masraf salt okunur toplamlar ---------- */
.fixed-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fixed-total .val { font-size: 1.125rem; font-weight: 700; }
.fixed-total .src { font-size: .8125rem; color: var(--muted); }
.fixed-items { list-style: none; margin: 8px 0 0; padding: 0; font-size: .875rem; color: var(--text-2); }
.fixed-items li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-top: 1px dashed var(--line); }

/* ---------- Personel ve izin çizelgesi ---------- */
.daypick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.daypick legend { padding: 0; margin-bottom: 6px; width: 100%; }
.daypick label { cursor: pointer; }
.daypick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.daypick label span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 600; font-size: .875rem; color: var(--text-2); background: var(--surface); }
.daypick label input:checked + span { background: #f2f4f7; border-color: #667085; color: var(--text); box-shadow: inset 0 0 0 1px #667085; }
.daypick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .8125rem; color: var(--text-2); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
table.sched th, table.sched td { text-align: center; }
table.sched th .dnum { font-weight: 400; color: var(--muted); }
table.sched th.today { color: var(--accent); }
table.sched td:first-child { min-width: 150px; max-width: 200px; white-space: normal; box-shadow: 1px 0 0 var(--line); }
table.sched td:first-child .role { display: block; font-size: .75rem; color: var(--muted); }
table.sched td.cell { padding: 0; min-width: 84px; height: 48px; border-left: 1px solid #fff; }
table.sched td.cell > button, table.sched td.cell > span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 48px; border: 0; background: transparent; font: inherit; font-size: .8125rem; font-weight: 600; padding: 0 8px; }
table.sched td.cell > button { cursor: pointer; }
table.sched td.cell > button:hover { box-shadow: inset 0 0 0 2px var(--accent); }
table.sched td.st-none { color: #98a2b3; }
table.sched td.today { box-shadow: inset 0 3px 0 var(--accent); }
table.sched tr.grp td { background: var(--surface-2) !important; text-align: left; font-weight: 700; position: static; }
table.sched tr.grp td a { color: var(--text); }
table.sched tr.cnt td { background: #fafbff !important; font-size: .75rem; color: var(--text-2); vertical-align: top; line-height: 1.35; border-bottom: 2px solid var(--line-strong); }
table.sched tr.cnt td:first-child { font-weight: 700; color: var(--text); vertical-align: middle; }
table.sched tr.cnt td b { font-size: .9375rem; color: var(--text); }
table.sched tr.cnt td span { display: block; white-space: nowrap; }
table.sched tr.cnt td span.zero { color: var(--neg); font-weight: 600; }
table.sched tfoot td { text-align: center; }
table.sched tbody tr:hover { background: inherit; }
@media (max-width: 959px) {
  .bottomnav { overflow-x: auto; scrollbar-width: none; }
  .bottomnav::-webkit-scrollbar { display: none; }
  .bottomnav a { min-width: 64px; }
}
table.sched thead th:first-child { background: var(--surface-2); z-index: 3; box-shadow: 1px 0 0 var(--line); }
table.sched td.cell > button { color: inherit; }
.grid > * { min-width: 0; }
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (max-width: 719px) { .kpi-row .kpi { padding: 10px 12px; } .kpi-row .kpi .value { font-size: 1.125rem; } .kpi-row .kpi .label { font-size: .6875rem; } }
.kpi-row > .card { margin: 0; }
input[type="date"].input { min-width: 0; }

/* ---------- İzin çizelgesi: durum renkleri + mobil gün görünümü ---------- */
:root { --st-work-bg: #ecfdf3; --st-work-line: #abefc6; --st-work-ink: #067647;
  --st-weekly-bg: #fff4e5; --st-weekly-line: #fdc98b; --st-weekly-ink: #b54708;
  --st-annual-bg: #f4f3ff; --st-annual-line: #d9d6fe; --st-annual-ink: #5925dc; }
.legend { gap: 8px 20px; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.st-work { background: #12b76a; }
.dot.st-weekly { background: #f79009; }
.dot.st-annual { background: #7a5af8; }
td.st-work { background: var(--st-work-bg) !important; }
td.st-weekly { background: var(--st-weekly-bg) !important; }
td.st-annual { background: var(--st-annual-bg) !important; }
table.sched td.st-work { color: var(--st-work-ink); }
table.sched td.st-weekly { color: var(--st-weekly-ink); }
table.sched td.st-annual { color: var(--st-annual-ink); }
table.sched td:first-child .nm { display: block; font-weight: 600; }
.warn-tag { display: inline-block; font-size: .6875rem; font-weight: 600; color: var(--st-weekly-ink); background: var(--st-weekly-bg); border: 1px solid var(--st-weekly-line); border-radius: 999px; padding: 0 6px; vertical-align: 1px; white-space: nowrap; }
.stbadge { flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: 999px; font: inherit; font-size: .75rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
button.stbadge { cursor: pointer; }
.stbadge.st-work { background: var(--st-work-bg); border-color: var(--st-work-line); color: var(--st-work-ink); }
.stbadge.st-weekly { background: var(--st-weekly-bg); border-color: var(--st-weekly-line); color: var(--st-weekly-ink); }
.stbadge.st-annual { background: var(--st-annual-bg); border-color: var(--st-annual-line); color: var(--st-annual-ink); }
.stbadge.st-none { background: var(--surface-2); border-color: var(--line); color: #98a2b3; }

/* ---------- Personel listesi ---------- */
.staff-row .who { display: block; }
.staff-row .who .role { display: block; font-size: .8125rem; color: var(--muted); margin-top: 1px; }
.staff-row .off { flex: none; text-align: right; line-height: 1.2; }
.staff-row .off b { display: block; font-size: 1.0625rem; }
.staff-row .off b.undef { color: var(--st-weekly-ink); }
.staff-row .off span { font-size: .75rem; color: var(--muted); }
.staff-row .yl { white-space: nowrap; }

/* ---------- İzin çizelgesi: mobil liste + alttan açılan detay ---------- */
.m-filter { margin-bottom: 10px; }
.m-today { margin: 0 0 10px; font-size: 1rem; }
.m-staff { padding: 2px 14px; }
.m-staff .list > li { padding: 0; }
.m-staff a.row-link { padding: 12px 0; min-height: 56px; }
.m-staff .title { display: block; color: var(--text); overflow-wrap: anywhere; }
.m-staff .meta { display: block; margin-top: 1px; overflow-wrap: anywhere; }
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border: 0; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); color: var(--text); box-shadow: 0 -8px 30px rgba(16, 24, 40, .18); }
dialog.sheet::backdrop { background: rgba(16, 24, 40, .45); }
dialog.sheet[open] { animation: sheet-up .18s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.sheet[open] { animation: none; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.sheet-head .meta { font-size: .8125rem; color: var(--muted); }
.sheet .dl { font-size: .875rem; }
.sheet .dl dd.undef { color: var(--st-weekly-ink); font-weight: 600; }
.sheet-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0; }
.sheet-kpis > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.sheet-kpis span { display: block; font-size: .6875rem; color: var(--muted); }
.sheet-kpis b { font-size: 1.125rem; }
.sheet h3 { font-size: .875rem; margin: 0 0 6px; }
.sheet-leaves { list-style: none; margin: 0 0 4px; padding: 0; font-size: .875rem; }
.sheet-leaves li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.sheet-leaves li:first-child { border-top: 0; }
.sheet-leaves .meta { display: block; font-size: .75rem; color: var(--muted); }
.sheet-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.sheet-form .daypick label span { min-width: 44px; padding: 0 6px; }
.sheet-more { display: inline-block; margin-top: 12px; font-size: .875rem; }

/* ---------- QR Sipariş (personel) ---------- */
.qr-tabs { margin-bottom: 16px; }
.qr-filter { margin-bottom: 14px; flex-wrap: wrap; }
.qr-filter b { margin-left: 6px; font-size: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; min-width: 22px; text-align: center; }
.qr-filter a.on b { background: var(--accent); border-color: var(--accent); color: #fff; }
.qr-grid { display: grid; gap: 12px; align-items: start; }
@media (min-width: 760px) { .qr-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.qr-card { padding: 14px 16px; border-left: 4px solid var(--line-strong); margin: 0 !important; }
.qr-card.st-new { border-left-color: var(--neg); }
.qr-card.st-received { border-left-color: var(--accent); }
.qr-card.st-preparing { border-left-color: #dc6803; }
.qr-card.st-ready { border-left-color: var(--pos); }
.qr-card.st-cancelled { opacity: .75; }
.qr-card.fresh { animation: qr-fresh 1.2s ease-in-out 6; box-shadow: 0 0 0 3px rgba(180, 35, 24, .35); }
@keyframes qr-fresh { 50% { background: var(--neg-soft); } }
@media (prefers-reduced-motion: reduce) { .qr-card.fresh { animation: none; background: var(--neg-soft); } }
.qr-card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.qr-card-h .grow { flex: 1; min-width: 0; }
.qr-card-h .meta { display: block; font-size: .8125rem; color: var(--muted); }
.qr-no { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.qr-where { font-size: 1.0625rem; }
.st-new .qr-st { background: var(--neg-soft); border-color: #fecdca; color: var(--neg); }
.st-ready .qr-st { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.qr-items { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.qr-items li { display: flex; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); }
.qr-items .q { min-width: 26px; }
.qr-items .grow { flex: 1; min-width: 0; }
.qr-note { display: block; font-size: .8125rem; color: var(--warn-ink); background: var(--warn-soft); border-radius: 6px; padding: 2px 6px; margin-top: 3px; }
.qr-onote { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn-ink); font-size: .875rem; }
.qr-onote.neg { background: var(--neg-soft); color: var(--neg); }
.qr-total { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.qr-total b { font-size: 1.125rem; }
.qr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.qr-acts .btn.primary:not(.sm) { min-height: 48px; flex: 1 1 100%; font-size: 1rem; }
.qr-pay { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qr-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--surface-2); display: inline-grid; place-items: center; color: #98a2b3; }
.qr-thumb.lg { width: 96px; height: 96px; }
.qr-sml { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qr-opt-row { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; padding: 10px 0; border-top: 1px solid var(--line); align-items: end; }
.qr-opt-size .check { gap: 6px; }
@media (min-width: 900px) { .qr-opt-row { grid-template-columns: 1.3fr 1.1fr repeat(3, 110px) auto; } }
