:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #6b7280;
  --faint: #9aa1ad;
  --border: #e4e7ec;
  --border-strong: #cfd4dc;
  --primary: #1f5f52;
  --primary-600: #194f44;
  --primary-50: #e9f3f0;
  --danger: #c2412d;
  --danger-50: #fcecea;
  --warn: #b7791f;
  --warn-50: #fdf5e6;
  --ok: #1d8a5c;
  --ok-50: #e7f6ee;
  --info: #2f62c9;
  --info-50: #eaf0fc;
  --gray-50: #f0f1f4;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.18);
  --cw: 46px;          /* takvim gün genişliği */
  --rowh: 46px;
  --sidebar: 228px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Yerleşim ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: #fff; border-right: 1px solid var(--border);
  position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 18px 12px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font-weight: 700; font-size: 16px; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 700; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #3b4352; font-weight: 500; }
.nav a:hover { background: var(--gray-50); }
.nav a.active { background: var(--primary-50); color: var(--primary); }
.nav svg { width: 19px; height: 19px; flex: none; }
.sidebar .user-box { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 20px 28px 8px; flex-wrap: wrap; }
.topbar h1 { margin-right: auto; }
.content { padding: 12px 28px 40px; }
.bottom-nav, .fab, .mobile-head { display: none; }

@media (max-width: 860px) {
  :root { --cw: 40px; --rowh: 44px; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .mobile-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
    background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 15; font-weight: 700; }
  .mobile-head .brand-mark { width: 28px; height: 28px; font-size: 14px; }
  .topbar { padding: 14px 16px 4px; }
  .topbar h1 { font-size: 19px; }
  .content { padding: 8px 16px 24px; }
  .bottom-nav { display: flex; position: fixed; inset: auto 0 0 0; background: #fff; border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom); z-index: 30; }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px;
    font-size: 11px; color: var(--muted); }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom));
    width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: #fff; border: 0;
    box-shadow: var(--shadow-lg); z-index: 25; }
  .fab svg { width: 26px; height: 26px; }
  .hide-mobile { display: none !important; }
}

/* ---------- Bileşenler ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border-strong); background: #fff; cursor: pointer; font-weight: 550;
  white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--gray-50); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.danger { color: var(--danger); border-color: #efc4bd; }
.btn.danger:hover { background: var(--danger-50); }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--gray-50); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin-right: auto; font-size: 15px; }
.card-body { padding: 14px 16px; }
.empty { padding: 22px 16px; text-align: center; color: var(--faint); font-size: 14px; }

.grid { display: grid; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 14px 16px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 24px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 1100px) { .dash-cols { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; } .stat .value { font-size: 20px; } }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-confirmed { background: var(--info-50); color: var(--info); }
.b-checked_in { background: var(--ok-50); color: var(--ok); }
.b-checked_out { background: var(--gray-50); color: #5b6472; }
.b-cancelled, .b-no_show { background: var(--danger-50); color: var(--danger); }
.b-warn { background: var(--warn-50); color: var(--warn); }

/* Oda kartları */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.room { padding: 12px 14px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong); cursor: pointer; box-shadow: var(--shadow); min-height: 104px;
  display: flex; flex-direction: column; gap: 4px; }
.room:hover { border-color: var(--border-strong); }
.room .r-top { display: flex; align-items: center; gap: 6px; }
.room .r-name { font-weight: 650; margin-right: auto; }
.room .r-state { font-size: 12.5px; font-weight: 600; }
.room .r-guest { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .r-sub { font-size: 12.5px; color: var(--muted); }
.room.free { border-left-color: #b9c0cb; }
.room.free .r-state { color: var(--muted); }
.room.occupied { border-left-color: var(--ok); }
.room.occupied .r-state { color: var(--ok); }
.room.arriving { border-left-color: var(--info); }
.room.arriving .r-state { color: var(--info); }
.room.departing { border-left-color: var(--warn); }
.room.departing .r-state { color: var(--warn); }
.clean-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--muted); }
.clean-tag.dirty { color: var(--warn); background: var(--warn-50); border-color: #f1dcb4; }
@media (max-width: 860px) { .rooms { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; } }

/* Liste */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li:hover { background: #fafbfc; }
.li .li-main { flex: 1; min-width: 0; }
.li .li-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .li-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.li .li-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.room-chip { flex: none; min-width: 52px; height: 36px; padding: 0 8px; border-radius: 8px; background: var(--gray-50);
  display: grid; place-items: center; font-weight: 650; font-size: 13px; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fafbfc; }
.tbl tr:last-child td { border-bottom: 0; }

/* Araç çubuğu */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 420px; }
.search input { padding-left: 36px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 550; color: #3b4352; }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; height: 36px; padding: 0 12px; cursor: pointer; font-weight: 550; font-size: 13px; }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button.on { background: var(--primary-50); color: var(--primary); }

/* Form */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 550; color: #3b4352; }
.field > span .req { color: var(--danger); }
.input, select.input, textarea.input {
  width: 100%; height: 40px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 11px; background: #fff;
  outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 70px; padding: 9px 11px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,95,82,.14); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 14px; }
.form-grid.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-grid.c4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.form-grid .span2 { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .form-grid, .form-grid.c3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid.c4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid .span2 { grid-column: 1 / -1; }
  .input { font-size: 16px; }   /* iOS yakınlaştırmayı engeller */
}
.section-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title:first-child { margin-top: 0; }
.section-title .grow { flex: 1; }
.form-error { background: var(--danger-50); color: var(--danger); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.hint { background: var(--warn-50); color: #7a5414; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }

/* Misafir arama */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--border-strong);
  border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 5; max-height: 260px; overflow: auto; }
.ac-item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover { background: var(--gray-50); }
.picked { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--primary); background: var(--primary-50);
  border-radius: 8px; }
.picked .grow { flex: 1; min-width: 0; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 100; display: flex; align-items: flex-start;
  justify-content: center; padding: 40px 16px; overflow-y: auto; animation: fade .12s ease-out; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 720px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.modal.narrow { max-width: 460px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin-right: auto; font-size: 17px; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .spacer { margin-right: auto; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  .modal-bg { padding: 0; display: block; background: #fff; }
  .modal { border-radius: 0; min-height: 100%; max-width: none; }
  .modal-head { position: sticky; top: 0; background: #fff; z-index: 2; padding-top: calc(14px + env(safe-area-inset-top)); }
  .modal-body { padding: 16px; flex: 1; }
  .modal-foot { position: sticky; bottom: 0; background: #fff; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .modal-foot .spacer { margin-right: 0; flex-basis: 100%; }
}

/* Rezervasyon detayı */
.res-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.res-summary > div { background: #fff; padding: 10px 12px; }
.res-summary .k { font-size: 12px; color: var(--muted); }
.res-summary .v { font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .res-summary { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.guest-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.guest-row .grow { flex: 1; min-width: 0; }
.pay-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.pay-row:last-child { border-bottom: 0; }
.pay-row .grow { flex: 1; }
.balance-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.balance-line.total { font-weight: 700; font-size: 15px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; }
.due { color: var(--danger); }
.paid-ok { color: var(--ok); }

/* ---------- Takvim (doluluk çizelgesi) ---------- */
.cal-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
  max-height: calc(100vh - 150px); -webkit-overflow-scrolling: touch; }
.cal { position: relative; display: grid; min-width: max-content; user-select: none; -webkit-user-select: none; }
.cal-corner, .cal-day, .cal-room, .cal-cell { border-bottom: 1px solid var(--border); }
.cal-corner { position: sticky; left: 0; top: 0; z-index: 6; background: #fafbfc; border-right: 1px solid var(--border);
  padding: 8px 10px; font-size: 12px; color: var(--muted); display: flex; align-items: flex-end; }
.cal-day { position: sticky; top: 0; z-index: 4; background: #fafbfc; text-align: center; padding: 6px 0 5px; font-size: 11px;
  color: var(--muted); border-right: 1px solid var(--border); line-height: 1.25; }
.cal-day b { display: block; font-size: 14px; color: var(--text); font-weight: 600; }
.cal-day .mon { display: block; font-size: 10px; font-weight: 700; color: var(--primary); text-transform: uppercase; height: 12px; }
.cal-day.we { background: #f3f4f7; }
.cal-day.today { background: var(--primary); color: #dfeee9; }
.cal-day.today b, .cal-day.today .mon { color: #fff; }
.cal-room { position: sticky; left: 0; z-index: 3; background: #fff; border-right: 1px solid var(--border); padding: 0 10px;
  display: flex; flex-direction: column; justify-content: center; height: var(--rowh); }
.cal-room .n { font-weight: 650; font-size: 14px; }
.cal-room .t, .cal-room .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-room .t { font-size: 11.5px; color: var(--muted); }
.cal-cell { height: var(--rowh); border-right: 1px solid #eef0f3; cursor: cell; }
.cal-cell.we { background: #fafbfc; }
.cal-cell.today { background: #f1f8f5; }
.cal-cell:hover { background: var(--primary-50); }
.cal-cell.sel { background: #cfe6de; }
.bar { position: absolute; height: calc(var(--rowh) - 12px); border-radius: 6px; padding: 0 8px; display: flex; align-items: center;
  gap: 6px; font-size: 12.5px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; cursor: pointer; z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.bar span { overflow: hidden; text-overflow: ellipsis; }
.bar.confirmed { background: var(--info); }
.bar.checked_in { background: var(--ok); }
.bar.checked_out { background: #a3abb7; }
.bar.unpaid::after { content: ""; position: absolute; right: 5px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #ffd166; }
.bar:hover { filter: brightness(1.06); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }

/* Giriş ekranı */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1200px 500px at 50% -10%, #dcebe6 0%, transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; padding: 28px; }
.auth-card .brand { padding: 0 0 20px; justify-content: center; font-size: 18px; }
.auth-card .brand-mark { width: 40px; height: 40px; font-size: 18px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .btn { height: 44px; }

/* Bildirim */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #1c2330; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: fade .15s ease-out; }
.toast.err { background: var(--danger); }
@media (max-width: 860px) { #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; }
.kv .k { color: var(--muted); }
.loading { padding: 40px; text-align: center; color: var(--faint); }

/* İşlem kaydı */
.act-gray { background: var(--gray-50); color: #5b6472; }
.act-blue { background: var(--info-50); color: var(--info); }
.act-green { background: var(--ok-50); color: var(--ok); }
.act-amber { background: var(--warn-50); color: var(--warn); }
.act-red { background: var(--danger-50); color: var(--danger); }
.log-day { padding: 10px 16px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: #fafbfc;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.log-row { display: flex; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.log-row:last-child { border-bottom: 0; }
.log-row.click { cursor: pointer; }
.log-row.click:hover { background: #fafbfc; }
.log-time { flex: none; width: 46px; color: var(--muted); font-size: 13px; padding-top: 2px; }
.details .log-time, .history .log-time { width: 118px; }
.log-main { flex: 1; min-width: 0; }
.log-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.log-det { font-size: 13.5px; color: #3b4352; margin-top: 3px; line-height: 1.45; overflow-wrap: anywhere; }
.history .log-list { border: 1px solid var(--border); border-radius: var(--radius); margin-top: 10px; max-height: 360px; overflow: auto; }
.history .log-row { padding: 9px 12px; }
details.history > summary { list-style: none; }
details.history > summary::before { content: "▸"; margin-right: 6px; }
details.history[open] > summary::before { content: "▾"; }
@media (max-width: 860px) { .log-row { gap: 10px; padding: 10px 14px; } .history .log-time { width: 70px; } }

/* ---------- Günlük form (kâğıt görünümü) ---------- */
.sheet-wrap { padding-top: 20px; }
.sheet { background: #fff; max-width: 1180px; margin: 0 auto; padding: 26px; border: 1px solid var(--border); box-shadow: var(--shadow); color: #1a1a1a; }
.sheet-head { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; margin-bottom: 22px; }
.sh-box { border: 2px solid #1a1a1a; min-height: 76px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 12px; }
.sh-title { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 30px; letter-spacing: .03em; }
.sh-datebox { justify-content: space-between; gap: 4px; padding: 6px; }
.sh-date-in { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sh-date { font-weight: 700; text-decoration: underline; font-size: 17px; }
.sh-nav { border: 0; background: transparent; width: 32px; height: 40px; cursor: pointer; color: #555; border-radius: 6px; display: grid; place-items: center; }
.sh-nav:hover { background: var(--gray-50); color: #000; }
.sh-nav svg { width: 20px; height: 20px; }
.sh-today { border: 1px solid var(--border-strong); background: #fff; border-radius: 999px; font-size: 12px; padding: 2px 10px; cursor: pointer; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.box { border: 2px solid #1a1a1a; display: flex; flex-direction: column; background: #fff; min-width: 0; }
.box.rbox { cursor: pointer; transition: box-shadow .12s; }
.box.rbox:hover { box-shadow: 0 0 0 3px rgba(31,95,82,.18); }
.box-title { position: relative; text-align: center; font-weight: 700; font-size: 17px; padding: 5px 6px; border-bottom: 1.5px solid #1a1a1a; min-height: 34px; }
.bx-tag { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: .02em; }
.bx-tag.in { background: var(--ok-50); color: var(--ok); }
.bx-tag.arr { background: var(--info-50); color: var(--info); }
.bx-tag.out { background: var(--gray-50); color: #5b6472; }
.bx-dep { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--warn-50); color: var(--warn); max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); border-bottom: 1px solid #555; min-height: 40px; }
.box-row.wide { grid-template-columns: 46% minmax(0, 1fr); }
.box-row .lb { border-right: 1px solid #aaa; padding: 0 8px; display: flex; align-items: center; font-size: 13.5px; color: #333; }
.box-row.wide .lb { justify-content: center; }
.box-row .vl { padding: 4px 10px; display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.box-row .vl .small { font-weight: 500; }
.box-row.click { cursor: pointer; }
.box-row.click:hover { background: #fafbfc; }
.bx-empty { color: #b0b5bd; font-weight: 500; font-size: 13px; }
.bx-miss { color: var(--warn); font-weight: 600; font-size: 13px; }
.box-tutar { display: flex; align-items: center; gap: 8px; padding: 0 8px; min-height: 42px; border-bottom: 1.5px solid #1a1a1a; }
.box-tutar .lb2 { font-size: 13.5px; color: #333; }
.box-tutar .vl2 { flex: 1; font-weight: 700; font-size: 14.5px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.box-tutar .vl2 .small { font-weight: 600; }
.ft { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #333; cursor: pointer; padding: 6px 4px; user-select: none; }
.ft i { width: 13px; height: 13px; border: 1.5px solid #333; display: inline-block; border-radius: 2px; }
.ft.on i { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 2px #fff; }
.pay3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pay3 > div { border-right: 1px solid #555; min-width: 0; }
.pay3 > div:last-child { border-right: 0; }
.pay3 .h { text-align: center; font-size: 13px; color: #333; padding: 5px 2px; border-bottom: 1px solid #555; }
.pay3 .v { min-height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13.5px; cursor: pointer;
  font-variant-numeric: tabular-nums; padding: 2px; }
.box.full .pay3 .v:hover { background: var(--primary-50); }
.box.full .pay3 .v:empty::after { content: "+"; color: #c3c8cf; font-weight: 500; font-size: 18px; }
.acc .acc-total { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.acc .acc-total .lb { font-size: 13.5px; color: #333; }
.acc-big { font-size: 28px; font-weight: 700; text-align: center; margin: auto 0; }
.note { min-height: 300px; }
.note-area { flex: 1; width: 100%; border: 0; outline: none; resize: none; padding: 0 12px; font: inherit; font-size: 15px; min-height: 260px;
  line-height: 46px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 45px, #555 45px, #555 46px); background-attachment: local; }
.note-st { padding: 4px 10px 6px; min-height: 22px; }
@media (max-width: 1100px) { .sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .sheet-wrap { padding: 0; }
  .sheet { padding: 12px; border: 0; box-shadow: none; }
  .sheet-head { grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
  .sh-box { min-height: 56px; }
  .sh-title { font-size: 21px; }
  .sh-date { font-size: 15.5px; }
}
@media (max-width: 640px) { .sheet-grid { grid-template-columns: 1fr; gap: 14px; } }
