/* Admin panel — brendsiz dizayn sistemi. Tokenlər: /shared/theme.css; vurğu rəngi (--accent) restoranın brend rəngidir.
   Səthlər ağ, fon açıq boz; kölgə yüngül; rəqəmlər cədvəl enli (tabular). */
:root {
  --nav-text: #4b5462;
  --bg: var(--paper); --card: var(--surface);
  --primary: var(--accent); --primary-2: var(--accent-2); --danger: var(--pome); --ok: var(--leaf);
  --radius: 10px; --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(16, 20, 26, .05);
  --shadow: 0 24px 60px -12px rgba(16, 20, 26, .28), 0 0 0 1px rgba(16, 20, 26, .05);
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -.022em; }
h2 { font-size: 18px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 22px 0 10px; font-weight: 650; }
h3.sub { font-size: 13px; font-weight: 600; color: var(--muted); margin: 20px 0 4px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 40px; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.note { background: var(--accent-tint); border: 1px solid var(--accent-soft); padding: 10px 14px; border-radius: var(--radius); }
code { font-family: ui-monospace, Consolas, monospace; background: var(--line-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

/* Düymələr */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; box-shadow: var(--shadow-1);
  transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { border-color: #c5cad3; background: #fafbfc; text-decoration: none; }
.btn:active:not(:disabled) { background: var(--line-2); box-shadow: none; }
.btn:focus-visible, .inp:focus-visible, .tab:focus-visible, .icon-btn:focus-visible, .nav-link:focus-visible, .nav-title:focus-visible, .chip:focus-visible, button.link:focus-visible {
  outline: 3px solid var(--accent-soft); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(16, 20, 26, .18); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { background: var(--pome); border-color: var(--pome); color: #fff; }
.btn.danger:hover { background: #b62f43; border-color: #b62f43; }
.btn.danger.ghost { background: transparent; color: var(--pome); border-color: transparent; box-shadow: none; }
.btn.danger.ghost:hover { background: var(--pome-tint); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; height: 46px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 15px; }
.icon-btn:hover:not(:disabled) { background: var(--line-2); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-2); font: inherit; font-weight: 600; cursor: pointer; }
button.link:hover { text-decoration: underline; }

/* Sahələr */
.inp { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--surface); color: var(--text); transition: border-color .12s, box-shadow .12s; }
.inp:hover:not(:disabled) { border-color: #c5cad3; }
.inp:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.inp { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.5; }
.inp:disabled { background-color: var(--paper); color: var(--muted); }
select.inp { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367707d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 15px; }
.inp.sm { height: 32px; border-radius: 8px; }
.inp.num { text-align: right; width: 100px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .lbl { font-size: 13px; font-weight: 600; color: var(--text); }
.field small { color: var(--muted); font-size: 12.5px; }
.field.inline { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.field.inline .lbl { margin: 0; color: var(--muted); font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .span { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.checks.col { flex-direction: column; gap: 10px; }
.checks.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 10px 0; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; }
.toggle .sw { width: 38px; height: 22px; border-radius: 22px; background: #c9ced6; position: relative; transition: background .15s; flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 20, 26, .25); transition: transform .15s; }
.toggle input:checked + .sw { background: var(--accent); }
.toggle input:checked + .sw::after { transform: translateX(16px); }
.toggle input:focus-visible + .sw { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.toggle.small { font-size: 13px; color: var(--muted); }
.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.swatches.pick .swatch { width: 32px; height: 32px; border-width: 3px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; cursor: pointer; font: inherit; font-weight: 500; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg { display: inline-flex; margin-left: 8px; vertical-align: middle; background: var(--line-2); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 11px; cursor: pointer; color: var(--muted); border-radius: 7px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* Çərçivə */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.shell.collapsed { grid-template-columns: 68px 1fr; }
.shell.collapsed .side-nav .lbl { display: none; }
.side-nav { background: var(--surface); border-right: 1px solid var(--line); color: var(--nav-text); padding: 0 12px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 15.5px; padding: 14px 4px 16px; letter-spacing: -.01em; }
.brand .lbl { flex: 1; min-width: 0; overflow: hidden; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.brand.big { font-size: 19px; padding: 0 0 8px; }
.logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; flex: none; font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent); }
.nav-group { margin-bottom: 2px; }
.nav-title { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: var(--radius); background: transparent;
  color: var(--nav-text); font: inherit; font-size: 14px; font-weight: 550; text-align: left; cursor: pointer; transition: background .12s, color .12s; }
.nav-title:hover { background: var(--line-2); color: var(--text); }
.nav-title .ico { width: 20px; flex: none; color: #8a93a0; transition: color .12s; }
.nav-title.active { color: var(--text); font-weight: 650; }
.nav-title.active .ico { color: var(--accent); }
.nav-group.open > .nav-title { color: var(--text); }
.nav-ico { display: block; margin: 0 auto; }
.nav-title .chev { margin-left: auto; color: #a3aab5; font-size: 17px; line-height: 1; transition: transform .15s; }
.nav-group.open > .nav-title .chev { transform: rotate(90deg); }
.nav-sub { margin: 2px 0 10px 20px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-link { display: block; padding: 7px 10px; border-radius: 8px; color: var(--nav-text); font-size: 13.5px; }
.nav-link:hover { background: var(--line-2); color: var(--text); text-decoration: none; }
.nav-link.on { color: var(--accent-2); font-weight: 650; background: var(--accent-tint); }
.shell.collapsed .side-nav { overflow-x: hidden; padding: 0 10px 16px; }
.shell.collapsed .nav-title { justify-content: center; padding: 11px 0; }
.shell.collapsed .nav-title.active { background: var(--accent-tint); }
.shell.collapsed .side-nav .brand { flex-direction: column; gap: 8px; padding: 14px 0 12px; }
.shell.collapsed .side-nav .brand .icon-btn { width: 40px; background: var(--line-2); color: var(--text); font-size: 18px; }
.soon { display: none; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 32px; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.crumbs-top { color: var(--muted); font-size: 13.5px; }
.crumbs-top b { color: var(--text); font-weight: 600; }
.me { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; font-weight: 600; }
.me small { color: var(--muted); font-weight: 400; font-size: 12px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-2); font-weight: 700; font-size: 14px; border: 1px solid var(--accent-soft); flex: none; }
.page { padding: 28px 32px 56px; max-width: 1480px; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; min-height: 38px; }
.page-head h1 a { color: var(--accent-2); }
.count { display: inline-block; vertical-align: middle; color: var(--muted); font-weight: 600; font-size: 13px; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--line-2); letter-spacing: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .inp { width: auto; }
.search { min-width: 260px; padding-left: 36px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367707d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 12px center / 16px no-repeat; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-1); }
.card h3:first-child { margin-top: 0; }
.card.soft { background: transparent; border-style: dashed; box-shadow: none; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.card + .card, .card + .charts, .charts + .card { margin-top: 16px; }

/* Tablar */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; }
.tabs.inline { border: 0; padding: 0; gap: 2px; }
.tabs.wrap { flex-wrap: wrap; }
.tab { border: 0; background: none; font: inherit; font-weight: 500; padding: 11px 12px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 650; }
.tabs.inline .tab { padding: 6px 11px; border-radius: 999px; border: 0; margin: 0; }
.tabs.inline .tab:hover { background: var(--line-2); }
.tabs.inline .tab.on { background: var(--ink); color: #fff; }

/* Cədvəl */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: auto; box-shadow: var(--shadow-1); }
.table-scroll { overflow-x: auto; }
.table-scroll .grid th, .table-scroll .grid td { white-space: nowrap; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; position: sticky; top: 0; white-space: nowrap; }
.grid td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tr.click { cursor: pointer; }
.grid tr.click:hover td { background: #f7f8fa; }
.grid .num { text-align: right; }
.grid th.num { font-family: inherit; font-size: 12.5px; }
.grid .center { text-align: center; }
.grid.compact td, .grid.compact th { padding: 7px 10px; }
.grid tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.grid tr.grp td { background: var(--paper); font-weight: 650; font-size: 12.5px; }
.grid tr.removed td { color: var(--muted); text-decoration: line-through; }
.grid.perm td:first-child { min-width: 240px; }
.report-table tbody tr:last-child td { border-top: 2px solid var(--ink); font-weight: 700; background: #fafbfc; }
.yes { color: var(--leaf); font-weight: 700; }
.no { color: #c3c8d0; }
.perm-group { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 16px 14px; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.perm-group legend { font-weight: 650; padding: 0 6px; }
.totals-table { margin-top: 12px; max-width: 360px; margin-left: auto; }
.lines-edit td { vertical-align: middle; }
.lines-edit .inp { min-width: 0; width: 100%; }
.lines-edit td:first-child { min-width: 240px; }
.lines-edit td:first-child .inp + .inp { margin-top: 6px; }

/* Vəziyyət nişanları */
.st-open, .st-closed, .st-cancel { font-weight: 650; }
.st-open { color: #9a6a00; }
.st-closed { color: var(--leaf); }
.st-cancel { color: var(--pome); }
.badge-app { align-self: flex-start; font-size: 12px; font-weight: 650; padding: 2px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-2); }

/* Yan pəncərə */
.drawer-bg { position: fixed; inset: 0; background: rgba(16, 20, 26, .4); display: flex; justify-content: flex-end; z-index: 20; }
.drawer { width: min(580px, 100vw); background: var(--surface); height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slide .18s ease-out; }
.drawer.wide { width: min(820px, 100vw); }
@keyframes slide { from { transform: translateX(24px); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } * { transition: none !important; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 26px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px; }
.drawer-foot { display: flex; align-items: center; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: #fafbfc; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; gap: 8px; }
.picker { position: relative; margin-top: 10px; }
.picker-list { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); position: absolute; left: 0; right: 0; z-index: 5; max-height: 280px; overflow-y: auto; }
.picker-list button { width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 4px; font: inherit; cursor: pointer; }
.picker-list button:hover { background: var(--teal-tint); }
dl.info { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; margin: 0; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0 10px 14px; border-left: 2px solid var(--line); margin-left: 4px; }
.timeline li.sus { border-left-color: var(--pome); background: var(--pome-tint); }
.timeline time { color: var(--muted); margin-right: 8px; }

/* Modal + bildiriş */
.modal-bg { position: fixed; inset: 0; background: rgba(16, 20, 26, .45); display: grid; place-items: center; z-index: 40; }
.modal { background: var(--surface); border-radius: 18px; padding: 26px; width: min(440px, 92vw); box-shadow: var(--shadow); }
.modal p { margin: 0 0 20px; line-height: 1.5; font-size: 15px; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4ad295; flex: none; }
.toast.err::before { background: #ff6b81; }
.warnbox { background: var(--pome-tint); border: 1px solid #f6cfd5; border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; }
.errlist { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }

/* Giriş */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 520px at 12% -8%, var(--accent-soft), transparent 62%), radial-gradient(760px 520px at 108% 108%, var(--accent-tint), transparent 60%), var(--paper); }
.auth-card { width: min(410px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 34px; border-radius: 20px; box-shadow: var(--shadow); border: 0; }
.auth-card h1 { font-size: 24px; }

/* Masa planı */
.editor { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.board { position: relative; aspect-ratio: var(--cols) / var(--rows); background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: calc(100% / var(--cols)) calc(100% / var(--rows)); touch-action: none; user-select: none; }
.tbl { position: absolute; padding: 3px; cursor: grab; }
.tbl span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 10px; background: var(--surface); border: 1.5px solid #c3c9d2; box-shadow: var(--shadow-1); color: var(--ink); font-weight: 650; font-size: 13px; text-align: center; overflow: hidden; }
.tbl.sel span { background: var(--accent); border-color: var(--accent-2); color: #fff; }
.tbl .grip { position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--ink-3) 50%); border-bottom-right-radius: 5px; }
.side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 64px; }
.code { font: 700 32px/1.2 var(--num); letter-spacing: .16em; background: var(--accent-tint); border: 1.5px dashed var(--accent); padding: 10px 18px; border-radius: var(--radius-lg); }

/* Statistika */
.period { gap: 6px; margin-bottom: 16px; }
.period .inp[type=date] { width: auto; }
.period .btn.sm { height: 32px; border-radius: 999px; }
.period .btn.sm.primary { background: var(--ink); border-color: var(--ink); }
/* Göstəricilər: ayrı-ayrı kart yox, bir zolaqda sütunlar */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0 -1px -1px 0; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 27px; line-height: 1.2; font-weight: 650; letter-spacing: -.025em; }
.stat-delta { font-size: 12.5px; min-height: 18px; }
.stat-delta .up { color: var(--leaf); font-weight: 650; }
.stat-delta .down { color: var(--pome); font-weight: 650; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; margin-bottom: 14px; }
.charts .card + .card { margin-top: 0; }
.chart h3, .charts .card h3 { margin: 0 0 14px; font-size: 15px; }
.charts .card .table-wrap { border: 0; border-radius: 0; box-shadow: none; margin: 0 -22px -22px; border-top: 1px solid var(--line-2); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 200px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.bar-slot { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 8px; outline: none; }
.bar { width: 100%; max-width: 34px; background: var(--accent); border-radius: 6px 6px 0 0; transition: background .12s; }
.bar.on, .bar-slot:focus-visible .bar { background: var(--ink); }
.bar-x { position: absolute; bottom: -20px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 6px 10px; border-radius: var(--radius);
  font-size: 14px; white-space: nowrap; z-index: 5; pointer-events: none; }
.tip .muted { color: #b6bdc8; }
.pnl { max-width: 680px; padding: 0; overflow: hidden; }
.pnl > p { padding: 0 20px 16px; margin: 12px 0 0; }
.pnl tr.total td { font-weight: 700; border-top: 2px solid var(--ink); background: #fafbfc; }
.pnl td.indent { padding-left: 36px; color: var(--muted); }
.receipt-preview { background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 16px; font: 12px/1.45 ui-monospace, Consolas, monospace; white-space: pre; overflow-x: auto; margin: 0;
  box-shadow: 0 2px 0 var(--line); }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.order-list { list-style: none; margin: 0; padding: 0; }
.order-row { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.order-row:last-child { border-bottom: 0; }
.crumbs-admin { margin: 8px 0 12px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.app-grid .card + .card { margin-top: 0; }
.app-card { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; transition: border-color .12s; }
.app-card:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 6px 20px -8px rgba(16, 20, 26, .18); }
.app-card b { font-size: 16px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side-nav { position: static; height: auto; }
  .form-grid, .perm-group, .editor { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .topbar { padding: 0 16px; position: static; }
  dl.info { grid-template-columns: 1fr; gap: 2px 0; }
  dl.info dd { margin-bottom: 10px; }
}

/* Statistika (lövhələr): dövr seçimi, "Ümumi" siyahısı, göstərici kartları, qrafiklər */
.period-seg { margin-left: 0; padding: 3px; border-radius: 11px; }
.period-seg button { font-size: 13.5px; padding: 6px 13px; border-radius: 8px; }
.period-seg button.on { color: var(--accent-2); }
.dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.dash .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 16px; }
.card-head small { font-size: 12px; }
.card-head small b { color: var(--accent-2); font-weight: 600; }
.card-foot { margin: 16px -22px -22px; padding: 12px 22px; border-top: 1px solid var(--line-2); text-align: right; font-weight: 600; font-size: 13px; }
.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; align-items: baseline; gap: 10px; padding: 8.5px 0; }
.kv li > i { flex: 1; border-bottom: 1px solid var(--line-2); transform: translateY(-4px); min-width: 20px; }
.kv .k { color: var(--text); }
.kv b { font-weight: 600; white-space: nowrap; }
.zero { color: #b3b9c2; font-weight: 500 !important; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--leaf); }
.delta.down { color: var(--pome); }
h2.sec { margin: 26px 0 12px; font-size: 19px; }
h2.sec:first-of-type { margin-top: 6px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 18px 20px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.kpi-card > span { color: var(--muted); font-size: 13.5px; }
.kpi-card > b { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.kpi-card footer { align-self: stretch; display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-tile { font: inherit; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 16px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text); transition: border-color .12s, background .12s; }
.kpi-tile > span { color: var(--muted); font-size: 13.5px; }
.kpi-tile > b { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.kpi-tile .spark { color: var(--accent-lite); margin-top: 6px; max-width: 100%; }
.kpi-tile:hover { border-color: var(--accent-soft); }
.kpi-tile.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
.kpi-tile.on > span { color: rgba(255, 255, 255, .82); }
.kpi-tile.on .spark { color: #fff; }
.kpi-tile:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.charts.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.charts.wide-left { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); margin-top: 16px; }
.chart-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.chart-card header h3 { margin: 0; font-size: 15px; }
.seg.icons { margin-left: auto; }
.seg.icons button { padding: 5px 7px; display: grid; place-items: center; }
.seg.icons button.on { color: var(--accent); }
.two-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.th-sum { display: block; color: var(--accent-2); font-weight: 600; font-size: 12.5px; margin-top: 2px; }
/* sütun qrafiki */
.cols, .area { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; }
.cols-y { display: flex; flex-direction: column; justify-content: space-between; height: var(--h); color: var(--muted); font-size: 11.5px; text-align: right; line-height: 1; transform: translateY(-.5em); padding-bottom: 0; }
.cols-plot { position: relative; height: var(--h); display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid #c9ced6; margin-bottom: 26px; }
.cols.tilt .cols-plot { margin-bottom: 64px; }
.gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line-2); pointer-events: none; }
.cols-plot > .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 6px; outline: none; }
.col-bar { width: 100%; max-width: 46px; background: var(--accent); border-radius: 4px 4px 0 0; position: relative; transition: background .12s; }
.col-bar.on, .col:focus-visible .col-bar { background: var(--accent-2); }
.col-bar b { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--text); }
.col-x { position: absolute; top: calc(100% + 7px); font-size: 11.5px; color: var(--muted); white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.cols.tilt .col-x { transform-origin: top right; right: 50%; transform: rotate(-42deg); text-align: right; }
.cols .tip, .area .tip { font-size: 13px; line-height: 1.5; text-align: left; }
/* sahə qrafiki */
.area-plot { position: relative; height: var(--h); border-bottom: 1px solid #c9ced6; margin-bottom: 26px; }
.area-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.area-slot { position: absolute; top: 0; bottom: 0; }
.area-slot .col-x { left: 50%; transform: translateX(-50%); }
.area-slot .cross { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed #aab1bb; }
.area-slot .dot { position: absolute; left: 50%; width: 9px; height: 9px; margin: 0 0 -4.5px -4.5px; border-radius: 50%; border: 2px solid #fff; }
.area-slot .tip { bottom: auto; top: 8px; transform: none; }
.area-slot .tip.right { left: calc(50% + 10px); }
.area-slot .tip.left { left: auto; right: calc(50% + 10px); }
.tip .key { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.area .legend.row { grid-column: 2; }
/* halqa + açıqlama */
.donut { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.donut svg path { transition: opacity .12s; cursor: default; }
.legend { list-style: none; margin: 0; padding: 0; align-self: stretch; }
.legend li { display: flex; align-items: center; gap: 9px; padding: 6px 6px; border-radius: 8px; }
.legend li.on { background: var(--line-2); }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend b { font-weight: 600; white-space: nowrap; }
.legend small { color: var(--muted); width: 34px; text-align: right; }
.legend.row { display: flex; gap: 18px; flex-wrap: wrap; }
.legend.row li { padding: 0; }
.legend.row span { flex: none; color: var(--muted); font-size: 13px; }
@media (max-width: 1000px) { .dash, .charts.wide-left, .two-tables { grid-template-columns: 1fr; } }

/* Tarixçə və hesabat süzgəcləri */
select.inp.filter { width: auto; max-width: 240px; font-weight: 600; background-color: var(--accent-tint); border-color: var(--accent-soft); color: var(--accent-2); }
select.inp.filter.on { background-color: var(--accent); border-color: var(--accent); color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
select.inp.filter option { color: var(--text); background: #fff; font-weight: 400; }
.who { line-height: 1.3; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.log-act { display: inline-flex; align-items: center; gap: 10px; }
.log-act svg { flex: none; color: var(--muted); }
.log-act.sus { color: var(--pome); font-weight: 600; }
.log-act.sus svg { color: var(--pome); }
.badge-sus { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--pome-tint); color: var(--pome); }

/* Çeklər cədvəli və bəli/xeyr nişanları */
.when { line-height: 1.3; text-align: left; }
.when small { display: block; color: var(--muted); font-size: 12px; }
.idlink { color: var(--accent-2); font-weight: 600; }
.grid tr.row-open td { background: var(--saffron-tint); }
.grid tr.row-open.click:hover td { background: #fdeec6; }
.grid tr.row-void td { color: var(--muted); }
.yes, .no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; }
.yes { background: var(--leaf-tint); color: var(--leaf); }
.no { background: var(--pome-tint); color: var(--pome); }

/* Maliyyə: cədvəl-vərəq (mənfəət-zərər, pul axını), alt tablar */
.grid.sheet th, .grid.sheet td { border-right: 1px solid var(--line-2); padding: 9px 14px; }
.grid.sheet th:last-child, .grid.sheet td:last-child { border-right: 0; }
.grid.sheet tr.head td { background: var(--accent-tint); font-weight: 600; }
.grid.sheet tr.total td { background: var(--accent-tint); font-weight: 700; border-top: 1px solid var(--accent-soft); }
.pnl.wide { max-width: none; }
.sub-tabs { margin-right: 6px; }
.when, .who { white-space: nowrap; }
.grid td.num, .grid th { white-space: nowrap; }
.thumb { display: block; width: 40px; height: 40px; }
.thumb.ph { background: var(--line-2); border-style: dashed; }
.clip { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.bulk-bar { background: var(--accent-tint); border: 1px solid var(--accent-soft); border-radius: var(--radius); padding: 8px 12px; }
.balance-box { background: var(--accent-tint); border: 1px solid var(--accent-soft); border-style: solid; align-items: stretch; }

/* QR masalar: çap üçün kartlar */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.qr-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; break-inside: avoid; }
.qr-brand { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.qr-img svg { display: block; width: 200px; height: 200px; }
.qr-name { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.qr-hall { color: var(--muted); font-size: 13px; }
.qr-hint { font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; }
@media print {
  .side-nav, .topbar, .no-print, .toasts { display: none !important; }
  .shell { display: block; } body { background: #fff; } .page { padding: 0; max-width: none; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 10mm; margin: 0; }
  .qr-card { border: 1px dashed #999; border-radius: 0; box-shadow: none; padding: 8mm 4mm; }
}

/* Fayl sahəsi (qaimə şəkli/PDF) */
.file-field { display: flex; align-items: center; gap: 8px; min-height: 38px; flex-wrap: wrap; }
.file-field a { max-width: 220px; }
.img-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.thumb.big { width: 64px; height: 64px; }
.thumb.round { border-radius: 50%; object-fit: cover; }
.u-ava { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 10px; background: var(--line-2); display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.stars { color: #e0a82e; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: var(--line, #d7dbe0); }
tr.row-alert td:first-child { box-shadow: inset 3px 0 0 var(--pome, #c0392b); }

/* ---------- Bölmə rəngləri (2026-11-17): hər bölmənin öz rəngi — yalnız naviqasiyada və başlıq nişanında.
   Əməl düymələri restoranın brend rəngində (--accent) qalır. Rəng = harada olduğunu göstərən məlumat. ---------- */
[data-sec="stats"] { --sec: #7357e8; }      /* Statistika — təhlil, bənövşəyi */
[data-sec="sales"] { --sec: #2b6fe0; }      /* Satış — mavi */
[data-sec="finance"] { --sec: #15905a; }    /* Maliyyə — pul, yaşıl */
[data-sec="menu"] { --sec: #e2700f; }       /* Menyu — yemək, iştah, narıncı */
[data-sec="marketing"] { --sec: #d8436f; }  /* Marketinq — müştəri, çəhrayı */
[data-sec="inventory"] { --sec: #0d8a86; }  /* İnventar — anbar, firuzəyi */
[data-sec="staff"] { --sec: #5257d6; }      /* Əməkdaş — indiqo */
[data-sec="apps"] { --sec: #0b88b5; }       /* Tətbiqlər */
[data-sec="devices"] { --sec: #5f6b7d; }    /* Cihazlar — sakit */
[data-sec="settings"] { --sec: #5f6b7d; }   /* Tənzimləmələr — sakit */
.nav-group[data-sec] .nav-title .ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: color-mix(in srgb, var(--sec) 11%, #fff); color: var(--sec); transition: background .15s, color .15s; }
.nav-group[data-sec] .nav-title .ico svg { width: 17px; height: 17px; }
.nav-group[data-sec] .nav-title.active .ico { background: var(--sec); color: #fff; }
.nav-group[data-sec] .nav-title { padding: 6px 8px; }
.nav-group[data-sec] .nav-sub { margin-left: 22px; border-left-color: color-mix(in srgb, var(--sec) 22%, #fff); }
.nav-group[data-sec] .nav-link.on { color: color-mix(in srgb, var(--sec) 82%, #000); background: color-mix(in srgb, var(--sec) 9%, #fff); }
.sec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--sec, var(--accent)); margin-right: 9px; vertical-align: 1px; }
.main[data-sec] .page-head h1 { display: flex; align-items: center; gap: 12px; }
.main[data-sec] .page-head h1::before { content: ""; width: 6px; height: 26px; border-radius: 3px; background: var(--sec); flex: none; }
img.avatar { object-fit: cover; padding: 0; }

/* Süzgəclər: boşdursa sakit, seçiləndə brend rəngi */
select.inp.filter { background-color: var(--surface); border-color: var(--line); color: var(--text); font-weight: 500; }
select.inp.filter.on { background-color: var(--accent-tint); border-color: var(--accent-soft); color: var(--accent-2); font-weight: 650; }

/* Cədvəl: adlar mətn rəngində (link yalnız üzərinə gələndə), bir az sıx sətirlər */
.idlink { color: var(--text); font-weight: 600; }
.grid tr.click:hover .idlink { color: var(--accent-2); }
.grid td { padding: 11px 16px; }
.grid .thumb { width: 38px; height: 38px; border-radius: 10px; }
.thumb.ini { display: grid; place-items: center; font-weight: 700; font-size: 15px; border: 0;
  background: color-mix(in srgb, var(--c, #8a93a0) 16%, #fff); color: color-mix(in srgb, var(--c, #5f6b7d) 85%, #000); }

/* Lövhə: əsas göstəricilər */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 4px 0 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 15px; display: grid; gap: 6px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--k); }
.kpi .k { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .v { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .s { display: flex; align-items: center; gap: 8px; min-height: 20px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Giriş ekranı: solda brend paneli (restoranın rəngi), sağda forma ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); place-items: stretch; padding: 0; background: var(--paper); }
.auth-brand { background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #0b1020)); color: #fff; padding: 44px 40px; display: flex; flex-direction: column; gap: 28px; }
.auth-logo { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; font-weight: 700; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); }
.auth-brand > div b { display: block; font-size: 26px; letter-spacing: -.02em; }
.auth-brand > div span { opacity: .78; font-size: 15px; }
.auth-mods { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 12px; }
.auth-mods li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.auth-mods i { width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--sec) 70%, #fff); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.auth-brand small { opacity: .7; text-transform: none; font-size: 13.5px; }
.auth-card { align-self: center; justify-self: center; width: min(400px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 16px; padding: 0; background: none; border: 0; box-shadow: none; }
.auth-card h1 { font-size: 28px; }
.auth-card > .muted { margin: -8px 0 6px; }
.pw { position: relative; display: block; }
.pw .inp { padding-right: 84px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--line-2); color: var(--ink-3); border-radius: 8px; padding: 5px 10px; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.btn.lg { min-height: 48px; font-size: 15.5px; }
@media (max-width: 760px) { .auth { grid-template-columns: 1fr; } .auth-brand { padding: 24px; gap: 14px; } .auth-mods, .auth-brand small { display: none; } .auth-card { padding: 28px 0; } }

/* ---------- Formalar: bölmə başlıqları, məcburi sahə, düymə-seçimlər ---------- */
.fsec { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.form-grid > .fsec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.fsec h4 { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--text); }
.fsec p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.req { color: var(--pome); font-style: normal; margin-left: 3px; font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.pill:hover { border-color: var(--accent-soft); }
.pill.on { background: var(--accent-tint); border-color: var(--accent-soft); color: var(--accent-2); }
.margin-note { margin: -4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--leaf-tint); color: #0f5c3c; font-size: 13.5px; }

/* Boş vəziyyət: nə baş verdi + növbəti addım */
td.empty-cell { padding: 44px 16px !important; }
.empty-box { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); }
.empty-box::before { content: ""; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--sec, var(--accent)) 12%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sec, var(--accent)) 22%, #fff); margin-bottom: 4px; }
.empty-box b { color: var(--text); font-size: 15px; }
.empty-box .btn { margin-top: 6px; }
.row > .img-upload { flex: none; flex-wrap: nowrap; }

/* Şifrəni unutdum / bərpa kodu */
.auth-switch { align-self: center; }
.recovery { display: flex; flex-direction: column; gap: 14px; }
.recovery .row { display: flex; flex-wrap: wrap; gap: 8px; }
.recovery-code { display: block; padding: 16px; border-radius: 14px; background: var(--accent-soft, #eef6f3); text-align: center;
  font: 700 26px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 2px; user-select: all; }
@media print { body * { visibility: hidden; } .recovery-code, .recovery-code * { visibility: visible; } .recovery-code { position: fixed; top: 40px; left: 0; right: 0; } }
/* Brend loqosu (Tənzimləmələr → Brend loqosu): şəkil hərfin yerini tutur */
.logo:has(img), .auth-logo:has(img) { background: none; border: 0; box-shadow: none; overflow: hidden; }
.logo img, .auth-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.grid tbody tr.on td { background: color-mix(in srgb, var(--accent) 9%, transparent); }

.tabs-select, .filter-toggle { display: none; }
.toolbar .filters { display: contents; }
.board-scroll { min-width: 0; }
/* ---------- Telefon (≤ 860 px): menyu yandan açılır, cədvəllər üfüqi sürüşür, formalar tam en ---------- */
.nav-burger, .nav-backdrop { display: none; }
@media (max-width: 860px) {
  .shell, .shell.collapsed { display: block; overflow-x: clip; }   /* səhifə yana sürüşməsin (clip yapışqan üst zolağı pozmur) */
  .side-nav { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100dvh; z-index: 60; transform: translateX(-102%); transition: transform .25s ease; padding-bottom: 28px; }
  /* kölgə yalnız açıq olanda — bağlı menyunun kölgəsi sol kənarda boz zolaq kimi görünürdü */
  .shell.nav-open .side-nav { transform: none; box-shadow: 0 0 40px rgba(16, 20, 26, .25); }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(16, 20, 26, .45); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  .shell.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .nav-burger { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; font-size: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .topbar { position: sticky; top: 0; z-index: 15; height: 54px; padding: 0 12px; gap: 10px; background: var(--surface); }
  .crumbs-top { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .topbar .me { display: none; }
  .page { padding: 14px 12px 40px; }
  .page-head { gap: 10px; margin-bottom: 14px; } .page-head h1 { font-size: 21px; flex-basis: 100%; }
  .page-head .btn, .page-head a.btn { flex: 1 1 auto; justify-content: center; }
  .toolbar { gap: 8px; } .toolbar .inp, .toolbar select, .toolbar input { flex: 1 1 140px; min-width: 0; width: auto; }
  .tabs { padding: 0 8px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; } .tabs::-webkit-scrollbar { display: none; } .tabs .tab { flex: none; }
  /* 19 hesabat adı 6 sətir tuturdu — telefonda bir açılan siyahı */
  .tabs.wrap { display: none; } .tabs-select { display: block; flex: 1 1 100%; }
  /* dövr düymələri bir sətirdə (söz ortadan qırılmasın) */
  .toolbar.period .period-seg { display: flex; flex: 1 1 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .period-seg::-webkit-scrollbar { display: none; }
  .period-seg button { flex: 1 0 auto; white-space: nowrap; padding: 8px 8px; font-size: 13px; }
  .toolbar.period > .muted { flex: none; }
  /* süzgəclər bir düymənin arxasında — siyahı ekranın yuxarısından başlasın */
  .toolbar .search { flex: 1 1 58%; }
  .toolbar > .btn:not(.filter-toggle), .toolbar > a.btn { flex: 1 1 auto; justify-content: center; }
  .filter-toggle { display: inline-flex; flex: none; }
  .toolbar .filters { display: none; }
  .toolbar .filters.open { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 100%; order: 5; }
  /* boş siyahı yazısı enli cədvəlin ortasında qalıb kəsilirdi */
  td.empty-cell { white-space: normal !important; }
  .empty-box { position: sticky; left: 12px; width: calc(100vw - 74px); }
  /* sətirli redaktə cədvəlləri (tədarük, toplu əməliyyat): öz içində üfüqi sürüşür, sahələr sıxılmır */
  table.lines-edit { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .lines-edit td .inp, .lines-edit td select { min-width: 96px; }
  .lines-edit td:first-child { min-width: 190px; }
  .lines-edit input[type=date] { min-width: 150px; }
  .drawer-body { overflow-x: hidden; }
  /* masa planı: lövhə oxunaqlı ölçüdə qalır, öz qutusunda sürüşür; masanı sürükləmək işləyir */
  .board-scroll { overflow: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); }
  .board-scroll .board { min-width: 720px; touch-action: pan-x pan-y; }
  .board-scroll .tbl { touch-action: none; }
  .side { position: static; }
  .page-head .grow { display: none; }
  /* cədvəl sıxılmır — öz qutusunda üfüqi sürüşür; ilk sütun yerində qalır */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.grid th, table.grid td { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
  .table-wrap > table.grid:not(.perm):not(.lines-edit):not(.sheet) td:first-child, .table-wrap > table.grid:not(.perm):not(.lines-edit):not(.sheet) th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line-2); max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .drawer, .drawer.wide { width: 100vw; }
  .drawer-head { padding: 14px 16px; } .drawer-body { padding: 16px; } .drawer-foot { padding: 12px 16px; flex-wrap: wrap; } .drawer-foot .btn { flex: 1 1 auto; justify-content: center; }
  .modal { width: 94vw; padding: 20px; }
  .card { padding-left: 16px; padding-right: 16px; }
  .charts .card .table-wrap { margin: 0 -16px -16px; }
  input, select, textarea { font-size: 16px; }   /* iOS yaxınlaşdırmasın */
  .totals-table { max-width: none; }
}
/* Ofisiantın bəxşiş kartı (çap) */
.tip-card .tip-brand { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* Yarımfabrikatın çıxımı (Tərkib tabı) */
.yield-box { background: var(--surface-2, #f6f7f9); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 6px; }
