/* DestekGO Yönetim V4.0 — tasarım sistemi */
:root {
  --ink: #16202e;
  --ink-2: #3a4658;
  --muted: #6b778a;
  --faint: #98a2b3;
  --line: #e3e7ee;
  --line-2: #eef1f5;
  --paper: #f5f6f8;
  --surface: #ffffff;
  --navy: #13233f;
  --navy-2: #1b3156;
  --navy-3: #26406b;
  --orange: #ff7a00;
  --orange-ink: #c25700;
  --orange-soft: #fff1e4;
  --blue: #2457d6;
  --blue-soft: #eaf0fd;
  --green: #11875d;
  --green-soft: #e6f5ee;
  --red: #c8372d;
  --red-soft: #fcebea;
  --amber: #a86200;
  --amber-soft: #fdf3e2;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(19, 35, 63, .05), 0 6px 18px rgba(19, 35, 63, .05);
  --shadow-pop: 0 18px 50px rgba(19, 35, 63, .22);
  --rail: 248px;
  --top: 64px;
  --font: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, td.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- giriş ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); }
.login-side { background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-side .brand-mark { background: #fff; border-radius: 12px; padding: 12px 16px; width: max-content; }
.login-side .brand-mark img { display: block; height: 34px; }
.login-side h2 { font-size: 34px; line-height: 1.15; font-weight: 700; margin: 0 0 14px; max-width: 13em; letter-spacing: -.02em; }
.login-side p { color: #b9c6db; max-width: 34em; margin: 0; }
.login-ledger { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.12); border-radius: 12px; overflow: hidden; margin-top: 36px; max-width: 520px; }
.login-ledger div { background: var(--navy); padding: 14px 16px; }
.login-ledger b { display: block; font-size: 15px; }
.login-ledger span { color: #9fb0c9; font-size: 12px; }
.login-main { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.01em; }
.login-card p.lead { color: var(--muted); margin: 0 0 24px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; height: 44px; }
.login-card .otp-input { letter-spacing: .5em; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.login-note { font-size: 12px; color: var(--muted); margin-top: 18px; }
.login-error { color: var(--red); min-height: 20px; margin-top: 10px; font-size: 13px; }

/* ---------- kabuk ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--navy); color: #c9d4e6; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.rail-brand { padding: 18px 18px 14px; }
.rail-brand a { display: block; background: #fff; border-radius: 10px; padding: 9px 12px; }
.rail-brand img { display: block; height: 26px; }
.rail nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; scrollbar-width: thin; scrollbar-color: var(--navy-3) transparent; }
.rail-group { margin-top: 14px; }
.rail-group > span { display: block; font-size: 11.5px; color: #7f91ad; padding: 0 10px 6px; font-weight: 600; }
.rail a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #c9d4e6; font-weight: 500; text-decoration: none; position: relative; }
.rail a.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.rail a.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.rail a.nav.active { background: var(--navy-2); color: #fff; }
.rail a.nav.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.rail a.nav .count { margin-left: auto; background: var(--orange); color: #fff; border-radius: 9px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 18px; min-width: 18px; text-align: center; }
.rail-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.rail-foot .who { min-width: 0; flex: 1; }
.rail-foot .who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-foot .who span { font-size: 11.5px; color: #8fa1bd; }
.rail-foot button { background: none; border: 0; color: #9fb0c9; cursor: pointer; padding: 6px; border-radius: 6px; }
.rail-foot button:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); background: rgba(245,246,248,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 28px; }
.topbar .menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 70px 0 38px; }
.search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--faint); }
.search kbd { position: absolute; right: 10px; top: 10px; font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--paper); }
.search-results { position: absolute; top: 46px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); max-height: 420px; overflow: auto; padding: 6px; }
.search-results a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--paper); }
.search-results small { display: block; color: var(--muted); }
.search-results .kind { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; margin-top: 2px; flex: none; }
.topbar .spacer { flex: 1; }

.content { padding: 24px 28px 64px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.015em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumb a { color: var(--muted); }

/* ---------- düğmeler & form ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #cdd4df; background: #fbfcfd; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.accent { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.accent:hover { background: #ec6f00; }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.icon { width: 38px; padding: 0; justify-content: center; }
.btn.sm.icon { width: 30px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--red); }
.field small.help { color: var(--muted); font-size: 12px; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, select.input {
  height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: var(--surface); width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,87,214,.14); }
.field.check { flex-direction: row; align-items: center; gap: 9px; }
.field.check input { width: 17px; height: 17px; accent-color: var(--navy); }
.field.check label { font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-error { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 0; }

/* ---------- yüzeyler ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel + .panel, .panel + .grid, .grid + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.panel-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel-body { padding: 18px; }
.grid { display: grid; gap: 18px; }
.grid > .panel, .grid > section { margin-top: 0 !important; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 1fr) 360px; }

/* Defter bandı: tek yüzeyde bölmeli rakamlar */
.ledger { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.ledger > div { padding: 16px 18px; border-left: 1px solid var(--line-2); min-width: 0; }
.ledger > div:first-child { border-left: 0; }
.ledger small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.ledger b { display: block; font-size: 22px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ledger .pos b { color: var(--green); } .ledger .neg b { color: var(--red); } .ledger .warn b { color: var(--amber); }
.ledger a.cell { color: inherit; text-decoration: none; display: block; }

/* ---------- tablo ---------- */
.table-tools { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.table-tools .input { max-width: 300px; height: 36px; }
.table-tools select.input { max-width: 200px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fbfcfd; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: #fafbfd; }
.tbl td.right, .tbl th.right { text-align: right; }
.tbl td small { display: block; color: var(--muted); font-size: 12px; }
.tbl td .row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.tbl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--navy); }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.pager .pages { margin-left: auto; display: flex; gap: 4px; }
.pager button { min-width: 32px; height: 30px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; cursor: pointer; font-variant-numeric: tabular-nums; }
.pager button.cur { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager button:disabled { opacity: .45; cursor: default; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* ---------- rozet ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.orange { background: var(--orange-soft); color: var(--orange-ink); }
.badge.navy { background: var(--navy); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; flex: none; }

/* ---------- sekmeler ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 12px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--orange); }
.tabs .count { background: var(--line-2); border-radius: 9px; padding: 0 7px; font-size: 11.5px; color: var(--ink-2); }
.tab-body { padding-top: 18px; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(13, 23, 40, .45); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s ease-out; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: rise .18s ease-out; }
.modal.lg { max-width: 820px; } .modal.sm { max-width: 420px; } .modal.xl { max-width: 1080px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- bildirim ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-pop); max-width: 380px; animation: rise .18s ease-out; display: flex; gap: 10px; align-items: flex-start; }
.toast.error { background: var(--red); }
.toast.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #45d39b; margin-top: 7px; flex: none; }

/* ---------- yükleniyor ---------- */
.loading { padding: 40px; text-align: center; color: var(--muted); }
.skel { background: linear-gradient(90deg, var(--line-2), #f7f8fa, var(--line-2)); background-size: 200% 100%; animation: sh 1.2s infinite linear; border-radius: 8px; height: 14px; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- liste/tanım ---------- */
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list { display: flex; flex-direction: column; }
.list > .item { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.list > .item:last-child { border-bottom: 0; }
.list .item .grow { flex: 1; min-width: 0; }
.list .item small { display: block; color: var(--muted); }
.muted { color: var(--muted); }
.pos { color: var(--green); } .neg { color: var(--red); } .warn { color: var(--amber); }
.mono { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.note { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink-2); font-size: 13px; }
.note.warn { background: var(--amber-soft); border-color: #f2d9ad; color: #7a4800; }
.note.info { background: var(--blue-soft); border-color: #cfdcf8; color: #1d3f97; }

/* ---------- gündem şeridi (genel bakışın imzası) ---------- */
.agenda { background: var(--navy); color: #dbe4f2; border-radius: var(--radius-lg); padding: 18px 18px 14px; box-shadow: var(--shadow); }
.agenda-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.agenda-head h2 { color: #fff; font-size: 17px; margin: 0; }
.agenda-head span { color: #93a5c2; font-size: 13px; }
.agenda-head .legend { margin-left: auto; display: flex; gap: 12px; font-size: 12px; color: #a9b8d0; flex-wrap: wrap; }
.agenda-head .legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.strip { display: grid; grid-template-columns: repeat(14, minmax(64px, 1fr)); gap: 4px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--navy-3) transparent; }
.day { background: rgba(255,255,255,.04); border-radius: 9px; padding: 8px 8px 10px; min-height: 112px; display: flex; flex-direction: column; gap: 4px; cursor: default; border: 1px solid transparent; }
.day.today { border-color: var(--orange); background: rgba(255,122,0,.08); }
.day.weekend { background: rgba(255,255,255,.02); }
.day .d { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #93a5c2; }
.day .d b { color: #fff; font-size: 17px; font-variant-numeric: tabular-nums; }
.day .ev { font-size: 11.5px; line-height: 1.3; padding: 3px 5px; border-radius: 5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; text-decoration: none; display: block; }
.day .ev:hover { filter: brightness(1.15); text-decoration: none; }
.ev.k-due, i.k-due { background: #2f5fd0; }
.ev.k-invoice, i.k-invoice { background: #6b4fd8; }
.ev.k-subscription, i.k-subscription { background: var(--orange); }
.ev.k-request, i.k-request { background: #1f9a6c; }
.ev.k-overdue, i.k-overdue, .ev.k-expired, i.k-expired { background: var(--red); }
.day .more { font-size: 11px; color: #93a5c2; }
.backlog { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.backlog a { background: rgba(200,55,45,.18); color: #ffd1cd; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; text-decoration: none; }
.backlog a:hover { background: rgba(200,55,45,.3); }

/* ---------- müşteri kartı ---------- */
.cust-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.cust-mark { width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 700; flex: none; letter-spacing: -.02em; }
.cust-head h1 { margin: 0; font-size: 24px; letter-spacing: -.015em; }
.cust-head .meta { color: var(--muted); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.cust-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- grafik ---------- */
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 180px; padding: 6px 0 0; }
.bars .bar { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; position: relative; }
.bars .bar i { display: block; border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .bar i.in { background: var(--navy); }
.bars .bar i.out { background: #f3a35a; }
.bars-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 6px; }

/* ---------- mobil ---------- */
.tabbar { display: none; }
.rail-backdrop { display: none; }
@media (max-width: 1100px) {
  .grid.side { grid-template-columns: minmax(0, 1fr); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 90; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  .shell.menu-open .rail { transform: none; }
  .shell.menu-open .rail-backdrop { display: block; position: fixed; inset: 0; background: rgba(13,23,40,.45); z-index: 80; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar .hide-sm { display: none; }
  .search kbd { display: none; }
  .search input { padding-right: 12px; }
  .content { padding: 16px 16px 96px; }
  .page-head h1 { font-size: 21px; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger > div:nth-child(odd) { border-left: 0; }
  .ledger > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .ledger > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ledger b { font-size: 18px; }
  .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .tbl.cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; flex: none; }
  .tbl.cards td.primary-cell { display: block; text-align: left; font-size: 15px; }
  .tbl.cards td.primary-cell::before { display: none; }
  .tbl.cards td .row-actions { justify-content: flex-end; flex-wrap: wrap; }
  .modal { max-height: calc(100vh - 24px); }
  .overlay { padding: 12px; align-items: end; }
  .modal { border-radius: 16px 16px 12px 12px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); background: none; border: 0; text-decoration: none; padding: 4px 0; cursor: pointer; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .active { color: var(--navy); font-weight: 600; }
  .tabbar .add span.plus { width: 40px; height: 40px; border-radius: 12px; background: var(--orange); color: #fff; display: grid; place-items: center; margin-top: -14px; box-shadow: 0 6px 16px rgba(255,122,0,.35); }
  .toasts { left: 12px; right: 12px; bottom: 84px; }
  .agenda .strip { grid-template-columns: repeat(14, 92px); }
  .cust-head .actions { margin-left: 0; width: 100%; }
}

/* yazdırma */
@media print {
  .rail, .topbar, .tabbar, .page-head .actions, .btn { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .panel { box-shadow: none; }
}
