/* ==========================================================================
   E-Kiosk CMS – design system
   Neutral grey control panel: dark charcoal sidebar, light grey canvas,
   white cards, 6px radii, dense tables, status dots.
   ========================================================================== */

:root {
    --bg: #f3f4f6;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --surface-3: #f1f2f4;
    --border: #e4e6ea;
    --border-strong: #cfd3d9;
    --text: #17191c;
    --text-2: #43484f;
    --muted: #7b828b;
    --muted-2: #a2a8b0;

    --sidebar-bg: #1a1c20;
    --sidebar-bg-2: #202329;
    --sidebar-text: #aab0b8;
    --sidebar-text-strong: #ffffff;
    --sidebar-hover: #272a30;
    --sidebar-active: #2d3138;
    --sidebar-border: #2a2d33;

    --primary: #1f2226;
    --primary-hover: #34383e;
    --accent: #3b6ef0;
    --accent-soft: #e8eefc;
    --focus: rgba(59, 110, 240, .35);

    --success: #16a34a;
    --success-soft: #e7f7ec;
    --warning: #d97706;
    --warning-soft: #fdf3e3;
    --danger: #dc2626;
    --danger-soft: #fdeaea;
    --info: #2563eb;
    --info-soft: #e8effd;
    --neutral: #9aa1a9;
    --neutral-soft: #eef0f2;

    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 1px 2px rgba(16, 18, 22, .05), 0 0 0 1px rgba(16, 18, 22, .03);
    --shadow-lg: 0 12px 32px rgba(16, 18, 22, .18);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --sidebar-w: 232px;
    --topbar-h: 56px;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 18px; }
h2 { font-size: 15px; }
h3 { font-size: 13.5px; }
p { margin: 0 0 .75rem; }
img, svg, video { max-width: 100%; }
code, .mono { font-family: var(--mono); font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -4px; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 24px; height: 24px; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mt-1 { margin-top: .5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.gap-1 { gap: .5rem; }
.flex { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.between { justify-content: space-between; }
.hidden, [hidden] { display: none !important; }
.w-100 { width: 100%; }

/* --------------------------------------------------------------------------
   App shell
   -------------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--sidebar-border);
}
/* A page that asked for it (the till) folds the menu away by itself. The width is
   what animates, so the content grows into the space instead of the menu sliding over
   it - behind a counter you want the product buttons as wide as they can be. */
body.sidebar-auto .sidebar { transition: width .18s ease, flex-basis .18s ease; }
body.sidebar-auto.sidebar-hidden .sidebar {
    width: 0; flex-basis: 0; overflow: hidden; border-right: 0;
}
/* The menu button is normally for phones only; in this mode it is the way back. */
body.sidebar-auto .sidebar-toggle { display: inline-flex; }

.brand {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--topbar-h); padding: 0 14px 0 16px;
    border-bottom: 1px solid var(--sidebar-border);
}
.brand-link { display: flex; align-items: center; gap: 10px; color: var(--sidebar-text-strong); font-weight: 600; font-size: 14px; }
.brand-link:hover { text-decoration: none; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 6px;
    background: #ffffff; color: #1a1c20; font-weight: 700; font-size: 14px; letter-spacing: 0;
}
.brand-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-close { display: none; color: var(--sidebar-text); }

/* The menu scrolls when a customer has every module switched on. The browser's own
   scrollbar is a light grey slab against a near-black sidebar, so it gets one that
   belongs there: thin, dim, and only really visible while you are in the menu. */
.nav {
    flex: 1 1 auto; overflow-y: auto; padding: 8px 10px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-hover) transparent;
    overscroll-behavior: contain;
}
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb {
    background: #33373f; border-radius: 4px;
    border: 2px solid transparent; background-clip: content-box;
}
.nav:hover::-webkit-scrollbar-thumb { background: #454a54; background-clip: content-box; }
.nav::-webkit-scrollbar-thumb:hover { background: #565c68; background-clip: content-box; }

/* A section header is a button: click it to fold the module away. */
.nav-section {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; margin-top: 10px; padding: 6px 8px; cursor: pointer;
    background: none; border: 0; border-radius: var(--radius);
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); font-weight: 600; text-align: left;
}
.nav-section:first-child { margin-top: 0; }
.nav-section:hover { color: var(--sidebar-text-strong); background: var(--sidebar-hover); }
.nav-chevron { width: 14px; height: 14px; opacity: .6; transition: transform .15s ease; }
.nav-section.is-open .nav-chevron { transform: rotate(180deg); }
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; margin: 1px 0; border-radius: var(--radius);
    color: var(--sidebar-text); font-size: 13px; font-weight: 500;
}
.nav-link .icon { opacity: .7; width: 17px; height: 17px; }
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); text-decoration: none; }
/* The current page is marked by a line, not by a filled grey bar: quieter, and it
   still reads at a glance which item you are on. */
.nav-link.active {
    background: none; color: var(--sidebar-text-strong);
    box-shadow: inset 2px 0 0 var(--accent);
}
.nav-link.active .icon { opacity: 1; color: var(--accent); }
.nav-link.active:hover { background: var(--sidebar-hover); }

.sidebar-footer {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 12px 12px 16px; border-top: 1px solid var(--sidebar-border);
    background: var(--sidebar-bg-2);
}
.sidebar-user { flex: 1 1 auto; min-width: 0; }
.sidebar-user-name { color: var(--sidebar-text-strong); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .btn-ghost { color: var(--sidebar-text); }
.sidebar-footer .btn-ghost:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-backdrop { display: none; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 12px;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.topbar-title { flex: 1 1 auto; min-width: 0; }
.topbar-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-subtitle { font-size: 12px; color: var(--muted); margin-top: -2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.sidebar-toggle { display: none; }
.org-switch select { min-width: 200px; }

.content { padding: 24px; max-width: 1400px; width: 100%; }
.app-wide .content { max-width: none; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px; font-weight: 500; line-height: 1;
    cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background: var(--surface); }
.btn-danger { color: var(--danger); border-color: #f0c4c4; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-danger.btn-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger.btn-solid:hover { background: #b91c1c; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.form-group { margin-bottom: 14px; }
.form-group > label, .form-group > .form-label { display: block; margin-bottom: 5px; }
.form-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.form-group { margin-bottom: 14px; }
legend { display: block; padding: 0; font-size: 12.5px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.assignment-form { margin-top: 8px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="date"], input[type="time"], input[type="url"], input[type="tel"],
select, textarea {
    width: 100%; height: 34px; padding: 0 10px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px;
    transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 90px; padding: 8px 10px; line-height: 1.45; resize: vertical; }
select {
    appearance: none; -webkit-appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b828b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-3); color: var(--muted); }
input.is-invalid, select.is-invalid { border-color: var(--danger); }
input[type="checkbox"], input[type="radio"] { width: 15px; height: 15px; accent-color: var(--primary); vertical-align: -2px; margin: 0 6px 0 0; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.check-list { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.input-group { display: flex; }
.input-group > input { border-radius: var(--radius) 0 0 var(--radius); }
.input-group > .btn { border-radius: 0 var(--radius) var(--radius) 0; margin-left: -1px; }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 9px; top: 9px; color: var(--muted); width: 16px; height: 16px; }
.search-input input { padding-left: 30px; }
/* A toggle is a label, so `.form-group > label { display: block }` would flatten it and
   drop the knob (an absolutely positioned ::after) straight on top of its own text. */
.toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.form-group > label.toggle, .form-group > .toggle { display: inline-flex; margin-bottom: 0; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track { display: inline-block; vertical-align: middle; width: 34px; height: 20px; border-radius: 10px; background: var(--border-strong); position: relative; transition: background .15s; flex: 0 0 auto; }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--success); }
.toggle input:checked + .toggle-track::after { transform: translateX(14px); }
.toggle input:focus-visible + .toggle-track { box-shadow: 0 0 0 3px var(--focus); }

/* --------------------------------------------------------------------------
   Cards / panels
   -------------------------------------------------------------------------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 20px;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.card-header h2 { font-size: 13.5px; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.card-footer { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-title-meta { font-size: 12px; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4, .grid-main { grid-template-columns: minmax(0, 1fr); } }

.stat { padding: 14px 16px; }
.stat-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; line-height: 1.1; }
.stat-value.online { color: var(--success); }
.stat-value.offline { color: var(--danger); }
.stat-value.warning { color: var(--warning); }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat-link { display: block; color: inherit; }
.stat-link:hover { text-decoration: none; border-color: var(--border-strong); }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search-input { flex: 1 1 240px; max-width: 360px; }
.toolbar select { width: auto; min-width: 150px; }
.toolbar-spacer { flex: 1 1 auto; }

.dl { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.dl dt { color: var(--muted); font-weight: 500; }
.dl dd { margin: 0; word-break: break-word; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600;
    background: var(--surface-2); white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr[data-href] { cursor: pointer; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn { vertical-align: middle; }
.table td.shrink, .table th.shrink { width: 1%; white-space: nowrap; }
.table-dense th, .table-dense td { padding: 6px 10px; }
.table a.row-title { color: var(--text); font-weight: 500; }
.table a.row-title:hover { color: var(--accent); }
.cell-sub { font-size: 12px; color: var(--muted); }
.thumb { width: 56px; height: 36px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--border); display: block; }
.thumb-lg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: #111; }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* --------------------------------------------------------------------------
   Badges / status
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 8px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
    background: var(--neutral-soft); color: var(--text-2);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-online  { background: var(--success-soft); color: #15803d; }
.badge-offline { background: var(--danger-soft);  color: #b91c1c; }
.badge-warning { background: var(--warning-soft); color: #b45309; }
.badge-disabled{ background: var(--neutral-soft); color: var(--muted); }
.badge-info    { background: var(--info-soft);    color: #1d4ed8; }
.badge-neutral { background: var(--neutral-soft); color: var(--text-2); }
.badge-success { background: var(--success-soft); color: #15803d; }
.badge-danger  { background: var(--danger-soft);  color: #b91c1c; }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
.pill { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); font-size: 11.5px; color: var(--text-2); }

/* --------------------------------------------------------------------------
   Alerts / toasts
   -------------------------------------------------------------------------- */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; margin-bottom: 16px;
    border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius);
    background: var(--surface); font-size: 13px;
}
.alert-text { flex: 1 1 auto; }
.alert-close { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; }
.alert-success { border-left-color: var(--success); }
.alert-error, .alert-danger { border-left-color: var(--danger); }
.alert-warning { border-left-color: var(--warning); }
.alert-info { border-left-color: var(--info); }

.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
    min-width: 240px; max-width: 360px; padding: 10px 12px;
    background: #1f2226; color: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); font-size: 13px;
    border-left: 3px solid var(--neutral);
    animation: toast-in .18s ease-out;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 18, 22, .5); }
.modal-dialog {
    position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto;
    background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-lg);
    animation: toast-in .16s ease-out;
}
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 14px; }
.modal-body { padding: 18px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 8px 8px; }
body.modal-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Tabs / pagination / empty state
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab { padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; font-size: 13px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); border-bottom-color: var(--primary); }

.pagination { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px;
}
.page-link:hover { background: var(--surface-2); text-decoration: none; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { opacity: .4; }
.page-gap { color: var(--muted); padding: 0 4px; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .empty-icon { color: var(--muted-2); margin-bottom: 10px; }
.empty-state .empty-icon .icon { width: 36px; height: 36px; }
.empty-state h2 { color: var(--text); margin-bottom: 6px; }
.empty-state p { max-width: 420px; margin: 0 auto 14px; }

/* --------------------------------------------------------------------------
   Lists: sortable playlist items, media grid, checklists
   -------------------------------------------------------------------------- */
.sortable-list { list-style: none; margin: 0; padding: 0; }
.sortable-item {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.sortable-item:last-child { border-bottom: 0; }
.sortable-item.dragging { opacity: .4; }
.sortable-item.drag-over { box-shadow: inset 0 2px 0 var(--accent); }
.sortable-item.disabled-item { opacity: .55; }
.drag-handle { cursor: grab; color: var(--muted-2); display: flex; }
.drag-handle:active { cursor: grabbing; }
.sortable-item .item-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sortable-item .item-meta { font-size: 12px; color: var(--muted); }
.sortable-item input[type="number"] { width: 72px; height: 28px; font-size: 12px; }
.sortable-item select { height: 28px; font-size: 12px; width: auto; }

/* Till: a product grid beside the running order. Built for a finger on a tablet. */
.register { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .register { grid-template-columns: 1fr; } }

.register-menu { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
/* Spraakbediening: één balk boven de categorieën, uit tenzij je hem aanzet. */
.speech {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
    padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.speech.is-unsupported { opacity: .55; }
.speech.is-listening { background: var(--accent-soft); }
.speech-label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.speech-label .icon { width: 15px; height: 15px; }
.speech-status { flex: 1 1 160px; min-width: 0; }
.speech-suggestions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.speech-suggestions:empty { display: none; }
.speech-suggestion {
    padding: 7px 12px; cursor: pointer; font-size: 13px; font-weight: 600;
    background: var(--accent); color: #fff; border: 0; border-radius: 999px;
}
.speech-suggestion:active { transform: translateY(1px); }

.register-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px; border-bottom: 1px solid var(--border); }
.register-tab {
    flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface-2); font-weight: 600; font-size: 13px;
}
.register-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.register-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 10px; }
.register-group { grid-column: 1 / -1; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 2px 0; }
.register-product {
    display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
    min-height: 76px; padding: 10px 12px; text-align: left; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.register-product:hover { border-color: var(--accent); }
.register-product:active { transform: translateY(1px); }
.register-product.is-highlight { border-color: var(--accent); }
/* A product colour paints the whole button; the label turns black or white, whichever
   can be read on the colour that was picked (assets/js/register.js works out which),
   so nobody has to choose a text colour as well. The lift under the text follows it:
   a dark shadow under dark letters on a yellow button is just dirt. */
.register-product.has-color {
    background: var(--product-color); border-color: var(--product-color);
    color: #fff; color: var(--product-ink, #fff);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
    text-shadow: var(--product-shadow, 0 1px 1px rgba(0, 0, 0, .25));
}
.register-product.has-color .register-product-unit { color: inherit; opacity: .8; }
.register-tab[style*="--tab-color"].is-active { background: var(--tab-color); border-color: var(--tab-color); }

.product-row .product-color,
.category-row .product-color { display: inline-flex; align-items: center; gap: 4px; }
.product-row .product-color input[type="color"],
.category-row .product-color input[type="color"] {
    width: 30px; height: 28px; padding: 0; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: none; cursor: pointer;
}
.product-row .product-image { flex: 0 1 130px; width: auto; }

/* Recent events on the dashboard. One row per event: time, then who and what, with
   the message underneath. Deliberately not .log-line - that one is pre-wrap, which
   renders the indentation of the surrounding markup as if it were content. */
.event-list { list-style: none; margin: 0; padding: 0; }
.event {
    display: flex; gap: 12px; align-items: baseline;
    padding: 9px 16px; border-bottom: 1px solid var(--border);
}
.event:last-child { border-bottom: 0; }
.event-time {
    flex: 0 0 auto; width: 74px;
    font-family: var(--mono); font-size: 11.5px; color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.event-body { flex: 1 1 auto; min-width: 0; }
.event-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.event-head a, .event-screen { font-weight: 500; font-size: 13px; }
.event-name { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }
.event-message {
    display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-2);
    overflow-wrap: anywhere;
}
.event.is-warning .event-name { color: var(--warning); }
.event.is-error .event-name { color: var(--danger); }
.event.is-error .event-message { color: var(--danger); }

/* Camera scanner on the pairing page. The video only takes up room once it runs. */
.pair-scan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pair-scan .form-help { flex: 1 1 100%; margin-top: 0; }
.pair-scan-video {
    flex: 1 1 100%;
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius);
    background: #000;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Rich text field: a toolbar over a contenteditable (assets/js/richtext.js). */
.rt { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.rt-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
    padding: 4px 5px; border-bottom: 1px solid var(--border);
    background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0;
}
.rt-btn {
    min-width: 26px; height: 26px; padding: 0 6px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    background: none; color: var(--text-2); font-size: 12.5px; line-height: 1; cursor: pointer;
}
.rt-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border); }
.rt-sep { width: 1px; height: 16px; margin: 0 4px; background: var(--border); }
/* Second strip, only while the caret is in a table. Set apart so it reads as
   "these buttons are about the thing you are standing in". */
.rt-bar-table { background: var(--surface-3); border-bottom: 1px solid var(--border); }
.rt-bar-table .rt-btn { font-size: 12px; color: var(--muted-2); }
.rt-bar-table .rt-btn:hover { color: var(--text); background: var(--surface); }
.rt-area {
    min-height: 110px; max-height: 320px; overflow-y: auto;
    padding: 8px 10px; font-size: 13px; line-height: 1.5; outline: none;
}
.rt-area:focus { box-shadow: inset 0 0 0 2px var(--focus); border-radius: 0 0 var(--radius) var(--radius); }
.rt-area > *:first-child { margin-top: 0; }
.rt-area > *:last-child { margin-bottom: 0; }
.rt-area table { border-collapse: collapse; width: 100%; margin: 6px 0; }
.rt-area td, .rt-area th { border: 1px solid var(--border-strong); padding: 3px 6px; }
.rt-area ul, .rt-area ol { margin: 6px 0; padding-left: 22px; }
.rt-area h2 { font-size: 15px; margin: 8px 0 4px; }

/* A slide that would show nothing says so where you look at the list, not only when
   you are standing in front of the screen. */
.text-warning { color: var(--warning); }
.text-warning .icon { vertical-align: -2px; }

/* Opening hours of an order point: one row per day, times next to the checkbox. */
.hours-grid { display: flex; flex-direction: column; gap: 5px; }
.hours-row { display: flex; align-items: center; gap: 8px; }
.hours-row .check { flex: 0 0 108px; }
.hours-row input[type="time"] { width: auto; flex: 0 0 auto; height: 30px; font-size: 12.5px; }
.hours-row .muted { font-size: 12px; }

/* Template editor: one card-in-a-card per {{placeholder}} found in the HTML. */
.template-field {
    padding: 12px; margin-bottom: 10px;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.template-field:last-child { margin-bottom: 0; }
.template-field-head { margin-bottom: 8px; color: var(--muted); }
.template-field .form-group { margin-bottom: 10px; }

/* Rename in place. The pencil only appears on hover or focus: a list of names should
   read as names, not as a column of buttons. */
.row-name { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.rename-pencil {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; padding: 0; flex: 0 0 auto;
    border: 0; border-radius: var(--radius-sm); background: none;
    color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s, color .12s;
}
.row-name:hover .rename-pencil, .rename-pencil:focus-visible { opacity: 1; }
.rename-pencil:hover { color: var(--text); background: var(--surface-3); }
tr:hover .rename-pencil { opacity: .7; }
.rename-input {
    width: 100%; min-width: 140px; max-width: 420px;
    padding: 3px 7px; font-size: 13px; font-weight: 500;
}

/* The resolution of a display that is pairing. Big, because it decides which slide
   format you should design for this screen. */
.pair-resolution { padding: 10px 0 2px; }
.pair-resolution-value {
    font-size: 34px; font-weight: 600; letter-spacing: .02em; color: var(--text);
    font-variant-numeric: tabular-nums; line-height: 1.1;
}
.pair-resolution-label { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* Fullscreen till on its own device. */
body.register-device { display: block; background: var(--bg); }
.register-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 8px 14px; background: var(--sidebar-bg); color: var(--sidebar-text-strong);
}
.register-bar-name { display: flex; align-items: center; gap: 10px; }
.register-bar .btn-ghost { color: var(--sidebar-text); }
.register-bar .btn-ghost:hover { background: var(--sidebar-hover); color: #fff; }
.register-device-main { padding: 12px; }

.register-pair { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.register-pair-inner { max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.register-pair-inner h1 { margin: 12px 0 10px; font-size: 22px; }
.register-pair-form { margin: 16px 0; }
.register-pair-form label { display: block; font-size: 13px; margin-bottom: 5px; color: var(--muted); }

.register-product-name { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.register-product-price { font-weight: 700; font-size: 13px; }
.register-product-unit { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }

.register-order { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; position: sticky; top: 12px; }
.register-order-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.register-order-head h2 { margin: 0; font-size: 15px; }
.register-lines { list-style: none; margin: 0; padding: 0; max-height: 42vh; overflow-y: auto; }
.register-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.register-line-main { flex: 1 1 auto; min-width: 0; }
.register-line-name { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.register-line-meta { font-size: 11.5px; color: var(--muted); }
.register-line-controls { display: flex; align-items: center; gap: 4px; }
.register-line-total { flex: 0 0 auto; font-weight: 600; font-size: 13px; min-width: 64px; text-align: right; }
.register-step { width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-size: 15px; }
.register-qty { min-width: 40px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; }
.register-empty { padding: 14px 2px; font-size: 13px; }

.register-totals { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.register-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13.5px; }
.register-total { font-size: 18px; font-weight: 700; padding-top: 6px; }
.register-actions { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.register-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.register-day { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }

.keypad-display { font-size: 34px; font-weight: 700; text-align: right; padding: 10px 14px; background: var(--surface-3); border-radius: var(--radius); margin-bottom: 12px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad-key { padding: 16px; font-size: 20px; font-weight: 600; cursor: pointer; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.keypad-key:active { background: var(--surface-3); }
.receipt-number { font-size: 56px; font-weight: 800; line-height: 1; color: var(--accent); }
.modal-dialog.modal-sm { max-width: 380px; }

/* Slide editor: transparent handles on top of the rendered slide. */
.se-overlay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 5; }
.se-handle {
    position: absolute; cursor: move;
    border: 1px dashed rgba(255,255,255,.35);
    background: rgba(59,110,240,.04);
}
.se-handle:hover { border-color: rgba(255,255,255,.6); }
.se-handle.is-selected { border: 1px solid var(--accent); background: rgba(59,110,240,.12); }
.se-resize {
    position: absolute; right: -5px; bottom: -5px; width: 12px; height: 12px;
    border-radius: 2px; background: var(--accent); border: 2px solid #fff; cursor: nwse-resize;
    opacity: 0; transition: opacity .1s;
}
.se-handle:hover .se-resize,
.se-handle.is-selected .se-resize { opacity: 1; }

#slide-canvas { cursor: default; outline: none; }
#slide-canvas:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.slide-save-state { align-self: center; }
.slide-save-state.is-error { color: var(--danger); }

.check-list-stacked { flex-direction: column; gap: 6px; }
.check-block {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; margin-bottom: 6px; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.check-block:hover { border-color: var(--border-strong); }
.check-block input { margin-top: 3px; }

/* Product list editor (price lists) and the house style page. */
.sortable-compact .sortable-item { padding: 6px 10px; gap: 8px; }
.sortable-item .thumb-products { color: var(--accent); }
.sortable-item .btn.is-on { color: var(--accent); background: var(--accent-soft); }

.product-row .product-fields {
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.product-row .product-fields input,
.product-row .product-fields select { height: 28px; font-size: 12.5px; }
.product-row .product-name { flex: 2 1 180px; min-width: 120px; font-weight: 500; }
.product-row .product-price { flex: 0 0 82px; width: 82px; text-align: right; }
.product-row .product-unit { flex: 0 0 96px; width: 96px; }
.product-row .product-category { flex: 0 1 150px; width: auto; }
.product-row .product-tax { flex: 0 1 130px; width: auto; }
.product-row .product-description { margin-top: 4px; width: 100%; height: 26px; font-size: 12px; color: var(--muted); }
.category-row input { height: 28px; font-size: 12.5px; margin-bottom: 3px; }
.category-row input.small { font-size: 11.5px; height: 24px; }

.brand-colors { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.brand-color { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; }
.brand-color input[type="color"] {
    width: 34px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: none; cursor: pointer;
}

.brand-preview { padding: 18px 20px; font-size: 13px; line-height: 1.4; }
.brand-preview-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.brand-preview-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 5px 0; border-bottom: 1px solid; 
}
.brand-preview-row:last-of-type { border-bottom: 0; }
.brand-preview-chip { display: inline-block; margin-top: 12px; padding: 4px 12px; font-size: 12px; font-weight: 600; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.media-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.media-card .media-thumb { position: relative; aspect-ratio: 16 / 9; background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") center / 32px no-repeat; }
.media-card .media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card .media-type { position: absolute; top: 6px; left: 6px; }
.media-card .media-duration { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 3px; font-family: var(--mono); }
.media-card .media-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.media-card .media-title { font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card .media-meta { font-size: 11.5px; color: var(--muted); }
.media-card.selected { outline: 2px solid var(--accent); }
.media-card.selectable { cursor: pointer; }

.dropzone {
    border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
    padding: 28px 16px; text-align: center; color: var(--muted); background: var(--surface-2);
    transition: border-color .12s, background .12s;
}
.dropzone.drag-over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone strong { color: var(--text); }
.upload-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.upload-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.upload-name { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { flex: 0 0 140px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); width: 0; transition: width .15s; }
.progress-bar.done { background: var(--success); }
.progress-bar.error { background: var(--danger); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .check-mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.checklist li.done .check-mark { background: var(--success); border-color: var(--success); }
.checklist li.done .check-label { color: var(--muted); text-decoration: line-through; }
.checklist .check-label { flex: 1 1 auto; font-weight: 500; }

.code-display {
    font-family: var(--mono); font-size: 32px; font-weight: 600; letter-spacing: .12em;
    padding: 14px 20px; background: var(--surface-3); border-radius: var(--radius); display: inline-block;
}
.kv { display: inline-flex; gap: 6px; align-items: baseline; }
.kv .k { color: var(--muted); font-size: 12px; }

.metric-row { display: flex; gap: 20px; flex-wrap: wrap; }
.metric { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.metric .icon { color: var(--muted); }
.metric .v { font-weight: 600; }
.metric.warn .v { color: var(--warning); }

.screenshot-box { background: #111; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #777; }
.screenshot-box img { width: 100%; height: 100%; object-fit: contain; }
.screenshot-box.portrait { aspect-ratio: 9 / 16; max-height: 480px; }

/* A log message is usually a Dutch sentence, not machine output: read it in the body
   font. pre-wrap stays, so a message that really does contain newlines keeps them. */
.log-line { font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
/* A whole paragraph in red is hard to read; the badge already says what level it is,
   so the text only gets a hint of it. */
.log-level-error { color: var(--danger); }
.log-level-warning { color: var(--text-2); }
tr:has(.log-level-error) { background: var(--danger-soft); }

.command-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.command-btn { height: auto; padding: 10px 12px; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; white-space: normal; }
.command-btn small { color: var(--muted); font-weight: 400; }
.command-btn.danger { border-color: #f0c4c4; }
.command-btn.danger:hover { background: var(--danger-soft); }

.dow { display: inline-flex; gap: 2px; }
.dow span { width: 22px; height: 22px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600; background: var(--surface-3); color: var(--muted-2); }
.dow span.on { background: var(--primary); color: #fff; }

/* --------------------------------------------------------------------------
   Auth pages (login / signup / install)
   -------------------------------------------------------------------------- */
body.auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-brand { justify-content: center; margin-bottom: 20px; color: var(--text); font-size: 16px; }
.auth-brand .brand-mark { background: var(--primary); color: #fff; width: 30px; height: 30px; font-size: 15px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 28px; }
.auth-title { font-size: 18px; margin-bottom: 4px; }
.auth-sub { color: var(--muted); margin-bottom: 20px; font-size: 13px; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.auth-wide { max-width: 560px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .18s ease; }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(16,18,22,.45); z-index: 50; }
    .sidebar-close { display: inline-flex; }
    .sidebar-toggle { display: inline-flex; }
    .topbar { padding: 0 14px; }
    .content { padding: 16px; }
    .org-switch select { min-width: 140px; }
    .dl { grid-template-columns: 1fr; gap: 2px; }
    .dl dt { margin-top: 6px; }
}
@media print {
    .sidebar, .topbar, .toast-stack { display: none !important; }
    .content { padding: 0; }
}
