:root {
  color: #172033;
  background: #eef4ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #162235;
  --muted: #68778c;
  --line: #dce4ec;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --surface-tint: #eef7ff;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --nav: #0b1f34;
  --shadow-sm: 0 8px 24px rgb(15 23 42 / 7%);
  --shadow-md: 0 24px 64px rgb(15 23 42 / 14%);
  --radius-sm: 0.85rem;
  --radius-md: 1.15rem;
  --radius-lg: 1.65rem;
  --tap: 2.9rem;
}

* { box-sizing: border-box; }
html { min-width: 0; min-height: 100%; overflow-x: hidden; background: radial-gradient(circle at top left, #dff7ff 0, transparent 28rem), #eef4ff; }
body { min-width: 0; margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: transparent; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgb(37 99 235 / 45%); outline-offset: 3px; }
button { min-height: var(--tap); touch-action: manipulation; }
[hidden] { display: none !important; }

.button-loading { cursor: wait !important; opacity: 0.78; transform: none !important; }
.button-loading, .action-toast { display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem; }
.loading-spinner { display: inline-block; flex: 0 0 auto; width: 1.05rem; height: 1.05rem; border: 0.16rem solid currentColor; border-right-color: transparent; border-radius: 50%; animation: action-spin 700ms linear infinite; }
.toast-region { position: fixed; z-index: 1000; top: 1rem; right: 1rem; display: grid; gap: 0.65rem; width: min(24rem, calc(100vw - 2rem)); pointer-events: none; }
.action-toast { justify-content: flex-start; min-height: 3.5rem; border: 1px solid rgb(255 255 255 / 18%); border-radius: 1rem; padding: 0.85rem 1rem; color: #fff; font-weight: 850; line-height: 1.35; text-align: left; box-shadow: 0 18px 46px rgb(15 23 42 / 28%); animation: toast-in 180ms ease-out; }
.action-toast--loading { background: #1e3a5f; }
.action-toast--success { background: #166534; }
.action-toast--error { background: #991b1b; }
.action-toast__icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 1.35rem; height: 1.35rem; border: 0.12rem solid currentColor; border-radius: 50%; font-size: 0.8rem; }
@keyframes action-spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-0.5rem); } }
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation-duration: 1.4s; } .action-toast { animation: none; } }

.brand-heading, .sidebar-brand, .mobile-route-brand { display: flex; align-items: center; gap: 0.85rem; }
.brand-heading { margin-bottom: 1.25rem; }
.brand-heading .eyebrow { opacity: 1; color: var(--primary); }
.brand-logo { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: 1rem; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 14px 30px rgb(15 118 110 / 28%); overflow: hidden; }
.brand-logo--large { width: 3.95rem; height: 3.95rem; border-radius: 1.3rem; }
.brand-logo__plate { position: absolute; left: 0.55rem; bottom: 0.55rem; width: 1.7rem; height: 1.7rem; border: 0.22rem solid #f8fafc; border-radius: 50%; background: rgb(248 250 252 / 18%); }
.brand-logo--large .brand-logo__plate { left: 0.7rem; bottom: 0.7rem; width: 2.05rem; height: 2.05rem; }
.brand-logo__fork, .brand-logo__knife { position: absolute; top: -0.55rem; width: 0.18rem; height: 1.9rem; border-radius: 999px; background: #f8fafc; }
.brand-logo__fork { left: 0.4rem; box-shadow: 0.25rem 0 0 #f8fafc, 0.5rem 0 0 #f8fafc; }
.brand-logo__knife { right: -0.28rem; transform: rotate(10deg); }
.brand-logo__receipt { position: absolute; right: 0.45rem; top: 0.5rem; width: 1.15rem; height: 1.65rem; border-radius: 0.3rem; background: #fff; transform: rotate(8deg); box-shadow: inset 0 -0.25rem 0 rgb(15 118 110 / 18%); }
.brand-logo--large .brand-logo__receipt { right: 0.6rem; top: 0.65rem; width: 1.4rem; height: 1.9rem; }
.brand-logo__receipt span { display: block; height: 0.13rem; margin: 0.32rem 0.25rem 0; border-radius: 999px; background: var(--primary); }

.login-shell { display: grid; grid-template-columns: minmax(25rem, 1.05fr) minmax(27rem, 0.95fr); min-height: 100vh; background: #f7f9fc; }
.login-welcome { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; overflow: hidden; padding: clamp(2rem, 5vw, 4.75rem); background: linear-gradient(145deg, #071b2c 0%, #0d3741 55%, #0f766e 120%); color: #fff; }
.login-welcome::before, .login-welcome::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.login-welcome::before { width: 34rem; height: 34rem; right: -16rem; top: -12rem; border: 1px solid rgb(255 255 255 / 10%); box-shadow: 0 0 0 5rem rgb(255 255 255 / 2.5%), 0 0 0 10rem rgb(255 255 255 / 2%); }
.login-welcome::after { width: 25rem; height: 25rem; left: -15rem; bottom: -15rem; background: rgb(45 212 191 / 10%); filter: blur(1px); }
.login-welcome__brand { display: flex; align-items: center; gap: 1rem; }
.login-welcome__brand strong { display: block; font-size: 1.2rem; letter-spacing: 0.08em; }
.login-welcome__brand span { display: block; margin-top: 0.2rem; color: #a8c5c8; font-size: 0.78rem; font-weight: 700; }
.login-welcome__content { max-width: 38rem; margin-block: 4rem; }
.login-welcome__content .eyebrow { color: #5eead4; opacity: 1; }
.login-welcome__content h1 { margin: 1rem 0 1.35rem; font-size: clamp(3rem, 6vw, 5.7rem); line-height: 0.94; letter-spacing: -0.07em; }
.login-welcome__content > p:not(.eyebrow) { max-width: 34rem; color: #c8d9dc; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.7; }
.login-benefits { display: grid; gap: 0.9rem; margin: 2.25rem 0 0; padding: 0; list-style: none; color: #e8f2f3; font-weight: 700; }
.login-benefits li { display: flex; align-items: center; gap: 0.75rem; }
.login-benefits span { display: inline-grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: rgb(45 212 191 / 16%); color: #5eead4; font-size: 0.75rem; }
.login-welcome__footer { display: flex; align-items: center; gap: 0.65rem; margin: 0; color: #9fb9bd; font-size: 0.82rem; font-weight: 700; }
.status-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0.3rem rgb(52 211 153 / 12%); }
.login-card { align-self: center; width: min(calc(100% - 3rem), 31rem); margin: 2rem auto; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid #e2e8f0; border-radius: 1.5rem; background: #fff; box-shadow: 0 20px 60px rgb(15 23 42 / 10%); }
.login-card__heading { margin-bottom: 2rem; }
.login-card__heading .eyebrow { color: var(--primary); opacity: 1; }
.login-card h2 { margin: 0.5rem 0 0.65rem; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1; letter-spacing: -0.055em; }
.login-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.login-card .login-field { display: grid; gap: 0.55rem; margin: 1.15rem 0; color: #344256; font-size: 0.88rem; font-weight: 800; }
.login-input { display: flex; align-items: center; min-height: 3.35rem; border: 1px solid #ced8e3; border-radius: 0.8rem; background: #fbfcfe; transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease; }
.login-input:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgb(15 118 110 / 10%); }
.login-input__icon { display: grid; place-items: center; width: 3rem; color: #7c8a9e; font-size: 1rem; font-weight: 900; }
.login-input__icon--lock { position: relative; height: 1rem; }
.login-input__icon--lock::before { content: ''; width: 0.68rem; height: 0.55rem; border: 2px solid currentColor; border-radius: 0.18rem; transform: translateY(0.22rem); }
.login-input__icon--lock::after { content: ''; position: absolute; top: 0.05rem; width: 0.45rem; height: 0.45rem; border: 2px solid currentColor; border-bottom: 0; border-radius: 0.5rem 0.5rem 0 0; }
.login-input input { flex: 1; min-width: 0; min-height: 3.2rem; border: 0 !important; outline: 0; padding: 0.75rem 0.5rem !important; background: transparent !important; box-shadow: none !important; }
.login-input input::placeholder { color: #9aa7b8; }
.password-toggle { min-height: auto; margin-right: 0.65rem; border: 0; background: transparent; color: var(--primary); font-size: 0.78rem; font-weight: 900; cursor: pointer; }
.login-card .login-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 3.4rem; margin-top: 1.4rem; padding-inline: 1.15rem; }
.login-card .login-submit:disabled { cursor: wait; opacity: 0.7; transform: none; }
.login-security { display: flex; align-items: flex-start; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1.35rem; border-top: 1px solid #e8edf3; }
.login-security > span { padding-top: 0.08rem; filter: grayscale(1); opacity: 0.6; }
.login-security p { font-size: 0.76rem; line-height: 1.55; }
.login-security strong { color: #526176; }
.login-card input, .staff-form input, .staff-form select, .station-quick-add-form input, .inline-staff-form input, .inline-staff-form select, .table-admin-row input, .table-admin-row select, .open-table-form input, .checkout-box select, .billing-draft select, .mobile-route-bar select { min-height: var(--tap); border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.78rem 0.9rem; background: #fff; color: var(--ink); box-shadow: 0 1px 0 rgb(15 23 42 / 3%); }
.login-card button, .secondary, .staff-form button, .station-quick-add-form button, .inline-staff-form button, .table-admin-row button, .open-table-form button, .checkout-box button, .billing-action, .bill-split-card button, .ticket-actions button, .menu-admin-row button, .dashboard-hero button, .dashboard-action button { border: 0; border-radius: 0.9rem; padding: 0.8rem 1rem; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 900; cursor: pointer; box-shadow: 0 12px 22px rgb(15 118 110 / 18%); transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease; }
.login-card button:hover, .secondary:hover, .staff-form button:hover, .station-quick-add-form button:hover, .inline-staff-form button:hover, .table-admin-row button:hover, .open-table-form button:hover, .checkout-box button:hover, .billing-action:hover:not(:disabled), .bill-split-card button:hover:not(:disabled), .ticket-actions button:hover, .menu-admin-row button:hover { transform: translateY(-1px); box-shadow: 0 16px 26px rgb(37 99 235 / 20%); }
.login-card .password-toggle { min-height: auto; margin-right: 0.65rem; border: 0; padding: 0.45rem; background: transparent; color: var(--primary); box-shadow: none; font-size: 0.78rem; font-weight: 900; cursor: pointer; }
.login-card .password-toggle:hover { transform: none; background: rgb(15 118 110 / 7%); box-shadow: none; }
.form-error { border-radius: 0.7rem; padding: 0.7rem 0.85rem; background: #fff1f0; color: #b42318 !important; font-size: 0.84rem; font-weight: 800; }

.app-shell { --sidebar-width: 18.5rem; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); width: 100%; min-width: 0; min-height: 100vh; transition: grid-template-columns 180ms ease; }
.app-shell.sidebar-is-collapsed { --sidebar-width: 5.25rem; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; gap: 1rem; width: var(--sidebar-width); min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 1.35rem; background: linear-gradient(180deg, #102a43, #071827 72%); color: #f8fafc; box-shadow: 10px 0 35px rgb(15 23 42 / 16%); transition: width 180ms ease; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; }
.sidebar-toggle { flex: 0 0 auto; width: 2.25rem; min-height: 2.25rem; border: 1px solid rgb(255 255 255 / 18%); border-radius: 0.75rem; background: rgb(255 255 255 / 10%); color: #fff; font-size: 1.5rem; cursor: pointer; }
.sidebar-brand h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.04em; }
.sidebar-brand span, .mobile-route-brand span { display: block; color: #9fb3c8; font-size: 0.78rem; font-weight: 800; }
.sidebar-user { margin: 0; padding: 0.8rem 0.9rem; border: 1px solid rgb(255 255 255 / 10%); border-radius: 1rem; background: rgb(255 255 255 / 7%); color: #d9e2ec; font-weight: 800; overflow-wrap: anywhere; }
.sidebar h2 { margin: 0.55rem 0 0; color: #bcccdc; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 0.35rem; }
.sidebar a { min-height: 2.8rem; display: flex; align-items: center; padding: 0.78rem 0.9rem; border-radius: 0.95rem; color: #d9e2ec; font-weight: 850; transition: background 140ms ease, transform 140ms ease, color 140ms ease; }
.sidebar a.active, .sidebar a:hover { background: rgb(255 255 255 / 13%); color: #fff; transform: translateX(2px); }
.sidebar a.active { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%); }
.sidebar .secondary { margin-top: auto; background: rgb(255 255 255 / 12%); box-shadow: none; }
.sidebar-is-collapsed .sidebar { align-items: center; padding-inline: 0.7rem; overflow-x: hidden; }
.sidebar-is-collapsed .sidebar-top { flex-direction: column; }
.sidebar-is-collapsed .sidebar-brand > div, .sidebar-is-collapsed .sidebar-user, .sidebar-is-collapsed .sidebar h2 { display: none; }
.sidebar-is-collapsed .sidebar nav { width: 100%; }
.sidebar-is-collapsed .sidebar a { justify-content: center; padding-inline: 0.3rem; font-size: 0; }
.sidebar-is-collapsed .sidebar a::after { content: attr(data-short-label); font-size: 0.76rem; letter-spacing: 0.04em; }
.sidebar-is-collapsed .sidebar .secondary { width: 100%; padding-inline: 0; font-size: 0; }
.sidebar-is-collapsed .sidebar .secondary::after { content: '\21AA'; font-size: 1.25rem; }
.content { grid-column: 2; width: 100%; min-width: 0; max-width: 100vw; padding: clamp(1rem, 2.5vw, 2rem); overflow-x: hidden; }
.mobile-route-bar, .tablet-role-nav { display: none; }

.network-banner { position: sticky; top: 1rem; z-index: 5; margin-bottom: 1rem; padding: 0.82rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: rgb(255 255 255 / 88%); color: var(--muted); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); font-weight: 900; }
.network-banner.online { border-color: rgb(22 163 74 / 24%); color: #166534; background: rgb(240 253 244 / 90%); }
.network-banner.degraded { border-color: rgb(245 158 11 / 30%); color: #92400e; background: rgb(255 251 235 / 92%); }
.network-banner.offline { border-color: rgb(220 38 38 / 30%); color: #991b1b; background: rgb(254 242 242 / 92%); }

.page { display: grid; min-width: 0; max-width: 100%; gap: clamp(1rem, 2vw, 1.5rem); }
.page-header { position: relative; overflow: hidden; padding: clamp(1.25rem, 4vw, 2rem); border-radius: var(--radius-lg); background: linear-gradient(135deg, #0f766e 0%, #2563eb 72%, #7c3aed 100%); color: #fff; box-shadow: var(--shadow-md); }
.page-header::after { content: ''; position: absolute; right: -4rem; top: -5rem; width: 16rem; height: 16rem; border-radius: 999px; background: rgb(255 255 255 / 13%); }
.page-header h2 { position: relative; margin: 0.25rem 0; font-size: clamp(2rem, 6vw, 3.65rem); line-height: 0.96; letter-spacing: -0.075em; }
.page-header p { position: relative; max-width: 60rem; margin-bottom: 0; color: rgb(255 255 255 / 84%); line-height: 1.55; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.13em; font-size: 0.72rem; font-weight: 950; opacity: 0.76; }
.card-grid, .admin-panel, .kds-board, .progress-lanes, .menu-admin-list, .report-grid, .audit-results { display: grid; gap: 1rem; }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.card, .json-preview, .pos-panel, .kds-ticket, .progress-lane { border: 1px solid rgb(219 230 243 / 90%); border-radius: var(--radius-md); background: rgb(255 255 255 / 92%); box-shadow: var(--shadow-sm); }
.card { padding: clamp(0.95rem, 2.5vw, 1.2rem); }
.card h3 { margin-top: 0; letter-spacing: -0.03em; }

.dashboard-page .card-grid { display: none; }
.dashboard-page--service .page-header { background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%); }
.dashboard-page--cashier .page-header { background: linear-gradient(135deg, #7c2d12 0%, #ea580c 45%, #2563eb 100%); }
.dashboard-page--prep .page-header { background: linear-gradient(135deg, #581c87 0%, #7c3aed 48%, #2563eb 100%); }
.dashboard-page--inventory .page-header { background: linear-gradient(135deg, #166534 0%, #16a34a 48%, #0f766e 100%); }
.dashboard-page--admin .page-header, .dashboard-page--management .page-header { background: linear-gradient(135deg, #0f172a 0%, #115e59 48%, #2563eb 100%); }
.dashboard-hero { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 1px solid rgb(15 118 110 / 18%); border-radius: var(--radius-lg); padding: clamp(1rem, 3vw, 1.4rem); background: linear-gradient(135deg, rgb(255 255 255 / 95%), rgb(240 253 250 / 95%)); box-shadow: var(--shadow-sm); }
.dashboard-hero h3 { margin: 0.2rem 0; font-size: clamp(1.45rem, 4vw, 2.2rem); letter-spacing: -0.055em; }
.dashboard-hero p:not(.eyebrow) { max-width: 48rem; margin: 0; color: var(--muted); line-height: 1.55; }
.dashboard-hero button { min-width: min(100%, 13rem); }
.dashboard-metrics, .dashboard-actions { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.dashboard-metric { display: grid; gap: 0.45rem; border-top: 0.35rem solid var(--accent); }
.dashboard-metric span { color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; }
.dashboard-metric strong { font-size: clamp(1.65rem, 5vw, 2.55rem); line-height: 1; letter-spacing: -0.06em; color: var(--primary); }
.dashboard-metric p, .dashboard-action p { margin: 0; color: var(--muted); line-height: 1.5; }
.dashboard-metric.ready { border-top-color: var(--success); }
.dashboard-metric.warning, .dashboard-metric.queued { border-top-color: var(--warning); }
.dashboard-metric.critical { border-top-color: var(--danger); }
.dashboard-action { display: grid; align-content: space-between; gap: 0.85rem; }
.dashboard-action button { justify-self: start; min-width: 7rem; }
.dashboard-section-title { margin: 0.25rem 0 -0.25rem; letter-spacing: -0.045em; }

.order-station-page .card-grid { display: none; }
.order-station-page .page-header { padding-block: clamp(1rem, 2.5vw, 1.5rem); }
.order-station-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1rem, 2.5vw, 1.4rem); border-radius: var(--radius-lg); background: linear-gradient(135deg, #0f172a, #134e4a); color: #fff; box-shadow: var(--shadow-md); }
.order-station-hero h3 { margin: 0.15rem 0; font-size: clamp(1.55rem, 4vw, 2.4rem); letter-spacing: -0.055em; }
.order-station-hero p:not(.eyebrow) { margin: 0; color: rgb(255 255 255 / 75%); font-weight: 800; }
.order-station-hero button, .station-primary { min-height: 3.4rem; border: 0; border-radius: 1rem; padding: 0.85rem 1.15rem; background: linear-gradient(135deg, #14b8a6, #2563eb); color: #fff; font-weight: 950; cursor: pointer; box-shadow: 0 12px 25px rgb(0 0 0 / 20%); }
.order-station-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(17rem, 0.7fr); gap: 1rem; align-items: start; }
.order-station-grid { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.order-station-grid .table-tile { min-height: 8.5rem; }
.order-station-action { position: sticky; top: 1rem; display: grid; gap: 1rem; background: linear-gradient(160deg, #fff, #f0fdfa); }
.order-station-action h3 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.25rem); letter-spacing: -0.055em; }
.order-station-action > p { margin: 0; }
.order-station-summary { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.order-station-summary span { padding: 0.5rem 0.7rem; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 0.8rem; font-weight: 900; }
.order-station-open-form { display: grid; gap: 0.9rem; }
.order-station-open-form label { display: grid; gap: 0.45rem; font-weight: 900; }
.order-station-open-form input { width: 100%; min-height: 3.4rem; border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.8rem; background: #fff; color: var(--ink); font-size: 1.1rem; }
.json-preview { max-height: 32rem; overflow: auto; padding: 1rem; white-space: pre-wrap; }
.json-preview.compact { max-height: 18rem; }
.admin-card { display: grid; gap: 1rem; }
.staff-form, .station-quick-add-form, .inline-staff-form { display: grid; gap: 0.75rem; }
.staff-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); align-items: end; }
.staff-form label, .station-quick-add-form label, .inline-staff-form label, .open-table-form label, .checkout-box label, .billing-draft label { display: grid; gap: 0.4rem; color: #334155; font-weight: 850; }
.staff-list-card { grid-column: 1 / -1; min-width: 0; }
.staff-table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
.staff-table { width: 100%; min-width: 58rem; border-collapse: collapse; }
.staff-table th, .staff-table td { padding: 0.95rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.staff-table th { background: var(--surface-tint); color: #334155; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; }
.status-pill, .badge { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 0.24rem 0.65rem; font-size: 0.74rem; font-weight: 950; text-transform: uppercase; }
.status-pill.active, .badge.ready { background: #dcfce7; color: #166534; }
.status-pill.inactive, .badge { background: #e5e7eb; color: #334155; }

.pos-workspace { display: grid; grid-template-columns: minmax(17rem, 0.85fr) minmax(20rem, 1fr) minmax(22rem, 1.15fr); min-width: 0; max-width: 100%; gap: 1rem; align-items: start; }
.pos-panel { min-width: 0; max-width: 100%; padding: clamp(0.95rem, 2vw, 1.15rem); }
.pos-panel-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-bottom: 1rem; }
.pos-panel-heading h3, .order-panel h3 { margin: 0; letter-spacing: -0.035em; }
.pos-panel-heading span, .muted { color: var(--muted); }
.table-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.7rem), 1fr)); gap: 0.75rem; }
.table-tile, .menu-item-card { min-height: 6.8rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(180deg, #fff, var(--surface-soft)); color: var(--ink); padding: 0.95rem; text-align: left; cursor: pointer; box-shadow: 0 8px 18px rgb(15 23 42 / 5%); }
.menu-item-card { transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease; }
.menu-item-card:hover:not(:disabled) { transform: translateY(-2px); border-color: rgb(37 99 235 / 35%); box-shadow: var(--shadow-sm); }
.table-tile { display: grid; gap: 0.4rem; }
.table-tile strong { font-size: 1.1rem; }
.table-tile span { width: fit-content; border-radius: 999px; padding: 0.2rem 0.58rem; font-size: 0.72rem; font-weight: 950; text-transform: uppercase; }
.table-tile.available > span:first-of-type { background: #dcfce7; color: #166534; }
.table-tile.occupied > span:first-of-type { background: #ffedd5; color: #9a3412; }
.table-tile.inactive > span:first-of-type { background: #e5e7eb; color: #4b5563; }
.table-tile .prep-label { background: #e0f2fe; color: #075985; }
.table-tile .prep-label.preparing { background: #fef3c7; color: #92400e; }
.table-tile .prep-label.ready { background: #dcfce7; color: #166534; }
.table-tile .prep-label.served { background: #ede9fe; color: #5b21b6; }
.table-tile.selected { outline: 3px solid rgb(37 99 235 / 45%); background: #eff6ff; }
.open-table-form { display: grid; gap: 1rem; }
.cart-list { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto; gap: 0.75rem; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; }
.cart-row small { display: block; color: var(--muted); margin-top: 0.15rem; }
.quantity-controls { display: inline-flex; align-items: center; gap: 0.45rem; }
.quantity-controls button { width: 2.35rem; height: 2.35rem; border: 0; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-weight: 950; cursor: pointer; }
.checkout-box { display: grid; gap: 0.85rem; border-radius: var(--radius-md); background: linear-gradient(180deg, #eff6ff, #f0fdfa); padding: 1rem; }
.checkout-box div { display: flex; justify-content: space-between; gap: 1rem; }
.checkout-box .pay-clean { background: var(--success); }

.billing-workspace { grid-template-columns: minmax(18rem, 0.8fr) minmax(28rem, 1.6fr); }
.order-table-list { grid-template-columns: 1fr; }
.order-table-list .table-tile { min-height: 5.8rem; }
.order-entry-workspace .order-summary-box p { margin: 0; }
.order-entry-workspace.table-selection-collapsed { grid-template-columns: minmax(20rem, 1fr) minmax(22rem, 1.15fr); }
.table-panel--collapsed { grid-column: 1 / -1; padding-block: 0.8rem; }
.table-panel--collapsed .pos-panel-heading { align-items: center; margin: 0; }
.table-panel--collapsed .pos-panel-heading > div { display: grid; gap: 0.2rem; }
.table-panel--collapsed .order-table-list { display: none; margin-top: 1rem; }
.table-panel--collapsed.table-panel--expanded .order-table-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.billing-table-grid .table-tile:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.billing-detail-panel { display: grid; gap: 1rem; }
.billing-draft, .billing-summary, .bill-lines, .bill-splits, .billing-actions, .ordered-items-review { display: grid; gap: 0.85rem; }
.ordered-items-review { border: 1px solid rgb(15 118 110 / 18%); border-radius: var(--radius-md); background: linear-gradient(180deg, #f0fdfa, #f8fbff); padding: 1rem; box-shadow: 0 10px 24px rgb(15 118 110 / 8%); }
.ordered-items-review__heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.ordered-items-review__heading h4 { margin: 0.2rem 0 0; letter-spacing: -0.035em; }
.ordered-items-review__heading strong { color: var(--primary); white-space: nowrap; }
.ordered-items-review__list { display: grid; gap: 0.55rem; }
.ordered-item-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; border-radius: var(--radius-sm); background: #fff; padding: 0.75rem 0.85rem; border: 1px solid rgb(15 118 110 / 12%); }
.ordered-item-row small { display: block; color: var(--muted); margin-top: 0.18rem; }
.billing-draft { border-radius: var(--radius-md); background: linear-gradient(180deg, #eff6ff, #f8fbff); padding: 1rem; }
.bill-total-card { display: grid; gap: 0.25rem; border-radius: var(--radius-md); padding: 1rem; background: linear-gradient(135deg, #0f766e, #2563eb); color: #fff; box-shadow: var(--shadow-sm); }
.bill-total-card span, .bill-total-card small { color: rgb(255 255 255 / 82%); font-weight: 800; }
.bill-total-card strong { font-size: clamp(1.75rem, 5vw, 2.65rem); line-height: 1; letter-spacing: -0.06em; }
.bill-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.bill-metrics div, .bill-line-row, .bill-split-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 0.8rem; }
.bill-metrics span, .bill-line-row small, .bill-split-card p { color: var(--muted); }
.bill-metrics strong { display: block; margin-top: 0.2rem; }
.bill-lines h4, .bill-splits h4 { margin: 0.25rem 0 0; }
.bill-line-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.bill-line-row small { display: block; margin-top: 0.18rem; }
.bill-split-card { display: grid; gap: 0.65rem; border-left: 0.45rem solid var(--warning); }
.bill-split-card.paid { border-left-color: var(--success); }
.bill-split-card > div { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.bill-split-card p { margin: 0; }
.bill-split-card button:disabled, .billing-action:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }
.billing-actions { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.billing-actions .close-table { background: var(--success); }


.table-floor-summary { display: grid; gap: 1rem; }
.floor-plan { position: relative; min-height: clamp(28rem, 58vh, 44rem); border: 1px dashed #b7c8da; border-radius: var(--radius-lg); background: linear-gradient(90deg, rgb(219 230 243 / 45%) 1px, transparent 1px), linear-gradient(rgb(219 230 243 / 45%) 1px, transparent 1px), linear-gradient(135deg, #f8fbff, #eef7ff); background-size: 25% 25%, 25% 25%, auto; overflow: hidden; }
.floor-plan--service { min-height: clamp(26rem, 52vh, 38rem); }
.floor-plan--editable { min-height: clamp(30rem, 62vh, 46rem); touch-action: none; }
.floor-table { position: absolute; width: min(10.5rem, 42%); transform: translate(-50%, -50%); }
.floor-table--draggable { cursor: grab; touch-action: none; user-select: none; }
.floor-table--draggable.dragging { cursor: grabbing; z-index: 5; border-color: rgb(37 99 235 / 65%); box-shadow: 0 22px 38px rgb(37 99 235 / 22%); }
.react-flow.table-layout-flow { position: relative; min-height: clamp(30rem, 62vh, 46rem); border: 1px solid rgb(183 200 218 / 90%); border-radius: var(--radius-lg); background: linear-gradient(135deg, #f8fbff, #eef7ff); overflow: hidden; touch-action: none; }
.table-layout-flow__background { position: absolute; inset: 0; background-image: radial-gradient(circle, rgb(100 116 139 / 32%) 1px, transparent 1px), linear-gradient(90deg, rgb(219 230 243 / 50%) 1px, transparent 1px), linear-gradient(rgb(219 230 243 / 50%) 1px, transparent 1px); background-size: 1.25rem 1.25rem, 25% 25%, 25% 25%; pointer-events: none; }
.table-layout-flow__viewport, .table-layout-flow__nodes { position: absolute; inset: 0; transform-origin: center; }
.table-layout-node { position: absolute; width: min(10.5rem, 42%); transform: translate(-50%, -50%); cursor: grab; touch-action: none; user-select: none; z-index: 1; }
.table-layout-node.selected { outline: 0.2rem solid rgb(37 99 235 / 40%); outline-offset: 0.18rem; }
.table-layout-node.dragging { cursor: grabbing; z-index: 5; border-color: rgb(37 99 235 / 65%); box-shadow: 0 22px 38px rgb(37 99 235 / 22%); }
.table-layout-flow__controls { position: absolute; right: 1rem; top: 1rem; z-index: 8; display: flex; gap: 0.35rem; padding: 0.35rem; border: 1px solid var(--line); border-radius: 999px; background: rgb(255 255 255 / 88%); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); }
.table-layout-flow__controls button { min-width: 2.35rem; min-height: 2.35rem; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 950; cursor: pointer; }
.table-layout-flow__controls button:hover { background: var(--surface-soft); color: var(--primary); }
.table-layout-flow__empty { position: absolute; inset: 1rem; z-index: 1; display: grid; place-items: center; text-align: center; }
.table-layout-flow--readonly { min-height: clamp(28rem, 58vh, 44rem); touch-action: auto; }
.table-layout-node--readonly { cursor: pointer; }
.table-admin-row.selected { border-color: rgb(37 99 235 / 45%); border-top-color: rgb(37 99 235 / 45%); border-radius: var(--radius-sm); background: rgb(219 234 254 / 45%); padding: 0.85rem; }
.table-admin-panel { grid-template-columns: minmax(min(100%, 19rem), 0.7fr) minmax(min(100%, 32rem), 1.3fr); align-items: start; }
.table-layout-editor { display: grid; gap: 0.85rem; }
.table-admin-row { display: grid; grid-template-columns: minmax(9rem, 1.2fr) repeat(4, minmax(5.5rem, 0.65fr)) minmax(6rem, 0.75fr) auto auto; gap: 0.6rem; align-items: end; border-top: 1px solid var(--line); padding-top: 0.85rem; }
.table-admin-row label { display: grid; gap: 0.25rem; color: var(--muted); font-size: 0.78rem; font-weight: 850; }
.table-admin-row small { display: block; color: var(--muted); margin-top: 0.2rem; }

.menu-category { display: grid; gap: 0.75rem; margin-top: 1rem; }
.menu-category h4 { margin: 0; color: #334155; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 0.75rem; }
.menu-item-card { display: grid; gap: 0.38rem; }
.menu-item-card span { font-weight: 950; color: var(--primary); }
.menu-item-card small { color: var(--muted); text-transform: uppercase; font-weight: 850; letter-spacing: 0.04em; }
.menu-item-card:disabled, .ticket-actions button:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }

.empty-state { border: 1px dashed #bfd0e2; border-radius: var(--radius-md); padding: 1rem; color: var(--muted); background: var(--surface-soft); }
.badge.queued { background: #e0f2fe; color: #075985; }
.badge.preparing, .badge.warning { background: #fef3c7; color: #92400e; }
.badge.served { background: #ede9fe; color: #5b21b6; }
.badge.critical { background: #fee2e2; color: #991b1b; }
.kds-board { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.kds-ticket { display: grid; gap: 0.75rem; border-left-width: 0.5rem; padding: 1rem; }
.kds-ticket.queued { border-left-color: #0ea5e9; }
.kds-ticket.preparing { border-left-color: var(--warning); }
.kds-ticket.ready { border-left-color: var(--success); }
.ticket-head, .menu-admin-row, .progress-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.ticket-head strong { font-size: 1.15rem; }
.ticket-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ticket-actions button, .menu-admin-row button { padding: 0.68rem 0.85rem; }
.menu-admin-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.menu-item-edit-form { width: 100%; margin-top: 0.85rem; padding: 0.85rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.menu-admin-row .danger, .menu-item-edit-form .cancel-edit { background: linear-gradient(135deg, var(--danger), #f97316); }
.bulk-upload-dialog { width: min(1100px, 94vw); max-height: 90vh; border: 0; border-radius: var(--radius-md); padding: 0; box-shadow: var(--shadow-lg); }
.bulk-upload-dialog::backdrop { background: rgb(15 23 42 / 58%); backdrop-filter: blur(3px); }
.bulk-upload-shell { padding: 1.25rem; display: grid; gap: 1rem; }
.bulk-upload-shell > header, .bulk-upload-shell footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.bulk-upload-shell header h2, .bulk-upload-shell header p { margin: 0; }
.bulk-upload-picker { padding: 1rem; border: 1px dashed var(--primary); border-radius: var(--radius-sm); background: var(--surface-soft); }
.bulk-preview { display: grid; gap: 1rem; min-width: 0; }
.bulk-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.bulk-summary > div { display: grid; gap: .2rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.bulk-summary small, .bulk-summary span { color: var(--muted); }
.bulk-dependencies, .bulk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.bulk-dependencies span { padding: .3rem .55rem; border-radius: 999px; background: #ecfdf5; color: #047857; font-weight: 800; }
.bulk-table-wrap { max-height: 45vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.bulk-table-wrap table { margin: 0; }
.bulk-action { font-weight: 900; font-size: .76rem; }
.bulk-action--create { color: #047857; } .bulk-action--update { color: #b45309; } .bulk-action--unchanged { color: var(--muted); }
.bulk-validation-errors { padding: .8rem; border: 1px solid #fecaca; background: #fef2f2; border-radius: var(--radius-sm); color: #991b1b; }
.bulk-complete { text-align: center; padding: 1.5rem; border-radius: var(--radius-sm); background: #ecfdf5; }
@media (max-width: 760px) { .bulk-summary { grid-template-columns: 1fr 1fr; } }
.progress-lanes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.progress-lane { padding: 1rem; }
.progress-row { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.progress-row small, .menu-admin-row small { display: block; color: var(--muted); margin-top: 0.2rem; }
.menu-admin-list { grid-template-columns: minmax(0, 1fr); align-items: start; }
.menu-admin-column-header, .menu-admin-row { grid-template-columns: minmax(12rem, 1fr) 7rem 7rem minmax(20rem, auto); column-gap: 0.75rem; }
.menu-admin-column-header { position: sticky; top: 0.75rem; z-index: 4; display: grid; align-items: center; min-height: 3rem; padding: 0.65rem clamp(0.95rem, 2.5vw, 1.2rem); border: 1px solid rgb(207 224 237 / 90%); border-radius: 0.85rem; background: rgb(255 255 255 / 94%); color: #526176; box-shadow: var(--shadow-sm); backdrop-filter: blur(16px); font-size: 0.72rem; font-weight: 950; letter-spacing: 0.07em; text-transform: uppercase; }
.menu-category-admin { display: grid; align-content: start; gap: 0.75rem; overflow: hidden; }
.menu-category-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 4rem; margin: calc(clamp(0.95rem, 2.5vw, 1.2rem) * -1) calc(clamp(0.95rem, 2.5vw, 1.2rem) * -1) 0; padding: 0.72rem clamp(0.95rem, 2.5vw, 1.2rem); border-bottom: 1px solid #cfe0ed; background: linear-gradient(135deg, #eef8f8, #edf4ff); }
.menu-category-header h3 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 1.1rem; line-height: 1.25; }
.menu-category-actions { display: flex; flex: 0 0 auto; gap: 0.35rem; }
.menu-category-action { display: inline-grid; place-items: center; width: 2.25rem; min-height: 2.25rem; padding: 0; border: 1px solid rgb(15 118 110 / 18%); border-radius: 0.65rem; background: #fff; color: var(--primary); box-shadow: 0 3px 10px rgb(15 23 42 / 7%); cursor: pointer; transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease; }
.menu-category-action svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-category-action:hover { border-color: rgb(15 118 110 / 42%); background: #f8fffe; transform: translateY(-1px); }
.menu-category-action.danger { border-color: rgb(220 38 38 / 18%); color: var(--danger); }
.menu-category-action.danger:hover { border-color: rgb(220 38 38 / 42%); background: #fff7f7; }
.menu-admin-row { display: grid; align-items: center; min-height: 4.75rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.menu-admin-item { min-width: 0; }
.menu-admin-item strong, .menu-admin-item small { overflow-wrap: anywhere; }
.menu-admin-availability, .menu-admin-promotion { justify-self: start; }
.menu-admin-row .menu-admin-actions { flex-wrap: nowrap; }
.alert-card.warning { border-left: 0.45rem solid var(--warning); }
.alert-card.critical { border-left: 0.45rem solid var(--danger); }
.report-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.report-card strong { font-size: 1.65rem; color: var(--primary); }
.report-rows { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 0.75rem; }
.audit-card h3 { margin-bottom: 0.35rem; text-transform: capitalize; }
.audit-card pre { max-height: 14rem; overflow: auto; border-radius: 0.9rem; background: #102a43; color: #f8fafc; padding: 0.85rem; }
.exception-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.exception-totals div { display: flex; flex-direction: column; gap: .25rem; padding: .75rem; border-radius: .75rem; background: #f4f7fa; text-transform: capitalize; }
.table-scroll { overflow-x: auto; }
.exception-report table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.exception-report th, .exception-report td { padding: .65rem; border-bottom: 1px solid #d9e2ec; text-align: left; white-space: nowrap; }
.report-exception { border-left: .3rem solid #c2410c; background: #fff7ed; color: #9a3412; padding: .75rem; }
.report-ok { border-left: .3rem solid #15803d; background: #f0fdf4; color: #166534; padding: .75rem; }
.exception-row { background: #fff7ed; }

@media (max-width: 1400px) {
  .pos-workspace, .billing-workspace, .table-admin-panel, .order-entry-workspace.table-selection-collapsed { grid-template-columns: minmax(0, 1fr); }
  .table-admin-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1050px) {
  .order-station-workspace { grid-template-columns: minmax(0, 1fr); }
  .order-station-action { position: static; grid-row: 1; }
  .order-station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --tap: 3.15rem; }
  .login-shell { grid-template-columns: minmax(0, 0.8fr) minmax(24rem, 1.2fr); }
  .login-welcome { padding: 2rem; }
  .login-welcome__content h1 { font-size: clamp(2.6rem, 7vw, 4rem); }
  .login-benefits { display: none; }
  .unified-navigation-shell { --sidebar-width: 15rem; }
  .unified-navigation-shell.sidebar-is-collapsed { --sidebar-width: 5.25rem; }
  .unified-navigation-shell .sidebar { padding: 1rem; }
  .unified-navigation-shell .content { padding: 1rem; }
  .mobile-route-brand strong { display: block; letter-spacing: -0.04em; }
  .mobile-route-brand .brand-logo { width: 2.65rem; height: 2.65rem; border-radius: 0.85rem; }
  .page-header { border-radius: 1.3rem; }
  .staff-table { font-size: 0.92rem; }
  .menu-admin-column-header, .menu-admin-row { grid-template-columns: minmax(10rem, 1fr) 6.5rem 6.5rem; }
  .menu-admin-column-header span:last-child { display: none; }
  .menu-admin-row .menu-admin-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 760px) {
  .order-station-hero { align-items: stretch; flex-direction: column; }
  .order-station-hero button, .station-primary { width: 100%; }
}

@media (max-width: 640px) {
  .login-shell { display: block; min-height: 100vh; padding: 0; background: #f7f9fc; }
  .login-welcome { min-height: auto; padding: 1.25rem 1.25rem 3.5rem; border-radius: 0 0 2rem 2rem; }
  .login-welcome__brand .brand-logo { width: 2.75rem; height: 2.75rem; border-radius: 0.9rem; }
  .login-welcome__content { margin: 3rem 0 0; }
  .login-welcome__content h1 { margin-block: 0.7rem 0; font-size: clamp(2.65rem, 13vw, 3.8rem); }
  .login-welcome__content > p:not(.eyebrow), .login-welcome__footer { display: none; }
  .login-card { width: calc(100% - 1.5rem); margin: -1.8rem auto 1rem; padding: 1.4rem; border-radius: 1.25rem; box-shadow: 0 18px 45px rgb(15 23 42 / 13%); }
  .login-card__heading { margin-bottom: 1.4rem; }
  .login-card h2 { font-size: 2rem; }
  .unified-navigation-shell { grid-template-columns: 1fr; }
  .unified-navigation-shell .sidebar { display: none; }
  .unified-navigation-shell .content { grid-column: 1; padding: 0.85rem; }
  .unified-navigation-shell .mobile-route-bar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr minmax(8.5rem, 45%); gap: 0.75rem; align-items: center; margin: -0.85rem -0.85rem 0; padding: 0.75rem 0.85rem; background: rgb(255 255 255 / 92%); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); backdrop-filter: blur(16px); }
  .unified-navigation-shell .mobile-route-bar select { display: block; }
  .unified-navigation-shell .network-banner { top: 4.9rem; border-radius: 1rem; }
  .page-header h2 { font-size: clamp(2rem, 12vw, 2.8rem); }
  .card-grid, .table-grid, .menu-grid, .kds-board, .progress-lanes, .menu-admin-list, .report-grid, .dashboard-metrics, .dashboard-actions { grid-template-columns: 1fr; }
  .dashboard-hero { align-items: stretch; flex-direction: column; }
  .dashboard-hero button, .dashboard-action button { width: 100%; }
  .order-station-page .page-header { display: none; }
  .order-station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-station-grid .table-tile { min-height: 7.7rem; padding: 0.8rem; }
  .floor-plan { min-height: 34rem; }
  .floor-table { width: min(9.5rem, 46%); }
  .table-admin-row { grid-template-columns: 1fr; }
  .pos-panel-heading, .cart-row, .checkout-box div, .bill-line-row, .bill-split-card > div, .ordered-item-row, .ordered-items-review__heading { align-items: stretch; }
  .cart-row { grid-template-columns: 1fr; }
  .bill-metrics { grid-template-columns: 1fr; }
  .quantity-controls { justify-content: space-between; width: 100%; }
  .quantity-controls button { width: 3rem; height: 3rem; }
  .ticket-actions button, .menu-admin-row button, .staff-form button, .inline-staff-form button { width: 100%; }
  .menu-admin-column-header { top: 4.75rem; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 0.45rem; padding-inline: 0.75rem; font-size: 0.64rem; letter-spacing: 0.035em; }
  .menu-admin-row { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 0.45rem; }
  .menu-admin-row .menu-admin-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

.previous-orders { display: grid; gap: 0.8rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.previous-orders__heading, .previous-order-card__heading, .previous-order-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.previous-orders__heading h4 { margin: 0.2rem 0 0; font-size: 1.2rem; }
.previous-orders__heading > span { color: var(--muted); font-weight: 850; }
.previous-order-card { display: grid; gap: 0.8rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.previous-order-card__heading > div, .previous-order-item > span { display: grid; gap: 0.2rem; }
.previous-order-card small, .previous-order-item small { color: var(--muted); text-transform: capitalize; }
.order-status { padding: 0.38rem 0.65rem; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 0.75rem; font-weight: 950; text-transform: capitalize; }
.order-status--in-preparation { background: #fef3c7; color: #92400e; }
.order-status--completed { background: #dcfce7; color: #166534; }
.order-status--delivered { background: #dbeafe; color: #1e40af; }
.order-status--cancelled { background: #fee2e2; color: #991b1b; }
.previous-order-items { display: grid; gap: 0.6rem; }
.previous-order-item { padding-top: 0.6rem; border-top: 1px solid var(--line); }

.admin-launchpad { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0.85rem; margin: 1rem 0; }
.admin-launchpad button { border: 0; border-radius: var(--radius-md); padding: 1rem; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 950; box-shadow: var(--shadow-sm); cursor: pointer; }
.admin-launchpad-heading { grid-column: 1 / -1; padding: 0.2rem 0.1rem; }
.admin-launchpad-heading h3 { margin: 0.1rem 0 0.2rem; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.admin-launchpad-heading p { margin: 0; }
.bill-settings-panel { grid-template-columns: minmax(min(100%, 48rem), 1fr) minmax(min(100%, 20rem), 0.36fr); align-items: start; gap: 1.2rem; }
.bill-settings-form { display: grid; gap: 1rem; min-width: 0; }
.bill-settings-form input[readonly] { background: #f1f5f9; color: var(--muted); cursor: not-allowed; }
.settings-overview-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 0.75rem; }
.settings-overview-card__item { display: grid; gap: 0.22rem; min-width: 0; padding: 1rem; border: 1px solid rgb(15 118 110 / 14%); border-radius: var(--radius-md); background: linear-gradient(145deg, #fff, #f0fdfa); box-shadow: var(--shadow-sm); }
.settings-overview-card__item span, .settings-section-heading .eyebrow, .receipt-preview-card .eyebrow, .settings-card--add-station .eyebrow { color: var(--primary); font-size: 0.72rem; font-weight: 950; letter-spacing: 0.1em; text-transform: uppercase; }
.settings-overview-card__item strong { overflow: hidden; color: var(--ink); font-size: clamp(1.2rem, 3vw, 1.75rem); line-height: 1.05; letter-spacing: -0.045em; text-overflow: ellipsis; white-space: nowrap; }
.settings-overview-card__item small { overflow: hidden; color: var(--muted); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.settings-overview-card--wrap-values .settings-overview-card__item strong,
.settings-overview-card--wrap-values .settings-overview-card__item small { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.settings-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-top: 0.45rem; padding: 0 0.15rem; }
.settings-section-heading h3, .settings-card--add-station h3 { margin: 0.1rem 0 0; letter-spacing: -0.04em; }
.settings-section-heading p:not(.eyebrow), .settings-card--add-station p { max-width: 34rem; margin: 0; color: var(--muted); line-height: 1.45; }
.settings-card { display: grid; gap: 0.85rem; padding: clamp(1rem, 2.5vw, 1.25rem); border: 1px solid rgb(219 230 243 / 90%); border-radius: var(--radius-lg); background: rgb(255 255 255 / 92%); box-shadow: var(--shadow-sm); }
.settings-card textarea { min-height: 5.8rem; resize: vertical; }
.settings-field-grid { display: grid; gap: 0.85rem; }
.settings-field-grid--bill { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-field-grid--printer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-field-grid--station { grid-template-columns: minmax(8rem, 0.75fr) minmax(12rem, 1.2fr) minmax(7rem, 0.6fr) minmax(10rem, 1fr) minmax(12rem, 1.2fr); }
.settings-field-grid__wide { grid-column: 1 / -1; }
.settings-card label, .station-settings-card label { display: grid; gap: 0.4rem; color: #334155; font-weight: 850; }
.settings-card input, .settings-card textarea, .station-settings-card input, .station-settings-card select { width: 100%; min-width: 0; min-height: var(--tap); border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.78rem 0.9rem; background: #fff; color: var(--ink); box-shadow: 0 1px 0 rgb(15 23 42 / 3%); }
.settings-card--receipt-printer { grid-template-columns: minmax(12rem, 0.25fr) 1fr; align-items: end; }
.settings-card--stations { gap: 0; padding: 0; overflow: hidden; }
.station-settings-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1rem; border-bottom: 1px solid var(--line); background: #fff; }
.station-settings-card:last-child { border-bottom: 0; }
.station-settings-card__order { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: 999px; background: #ccfbf1; color: var(--primary-dark); font-weight: 950; }
.station-settings-card__main { display: grid; gap: 0.75rem; min-width: 0; }
.station-settings-card__heading { display: flex; align-items: start; justify-content: space-between; gap: 0.75rem; }
.station-settings-card__heading h4 { margin: 0; font-size: 1.08rem; letter-spacing: -0.03em; }
.station-settings-card__heading small { display: block; margin-top: 0.12rem; color: var(--muted); font-weight: 850; }
.station-settings-card__toggles { display: grid; grid-column: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.settings-card--add-station { grid-template-columns: minmax(14rem, 0.7fr) minmax(18rem, 1fr); align-items: end; }
.settings-save-bar { position: sticky; bottom: 0.75rem; z-index: 4; display: flex; justify-content: flex-end; gap: 1rem; align-items: center; margin-top: 0.2rem; padding: 0.75rem; border: 1px solid rgb(219 230 243 / 88%); border-radius: var(--radius-lg); background: rgb(255 255 255 / 88%); box-shadow: var(--shadow-md); backdrop-filter: blur(16px); }
.settings-save-bar .form-error { flex: 1 1 auto; margin: 0; }
.settings-save-bar button { min-width: min(100%, 12rem); }
.checkbox-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 0.5rem; font-weight: 900; color: var(--ink) !important; }
.checkbox-row input { width: 1.2rem; height: 1.2rem; min-height: auto; padding: 0; box-shadow: none; }
.settings-toggle { min-height: var(--tap); padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface-soft); }
.settings-sidebar { position: sticky; top: 1rem; display: grid; gap: 1rem; min-width: 0; }
.receipt-preview-card, .settings-help-card { position: static; }
.receipt-preview-paper { display: grid; gap: 0.35rem; padding: 1rem; border: 1px dashed #94a3b8; border-radius: var(--radius-sm); background: linear-gradient(180deg, #fff, #f8fafc); color: #334155; text-align: center; }
.receipt-preview-paper strong { color: var(--ink); font-size: 1.1rem; }
.receipt-preview-paper span, .receipt-preview-paper em { color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
.receipt-preview-paper hr { width: 100%; border: 0; border-top: 1px dashed #cbd5e1; }
.receipt-preview-paper__line { padding: 0.45rem; border-radius: 0.55rem; background: var(--surface-soft); }
.receipt-preview-paper .receipt-preview-paper__table { padding: 0.55rem; border: 2px solid var(--ink); border-radius: 0.55rem; background: #fef08a; color: #111827; font-size: 1.2rem; font-weight: 950; }
.settings-help-card ol { margin: 0; padding-left: 1.15rem; color: var(--muted); line-height: 1.55; }

/* Cloud synchronization has a denser information model than the shared admin
   form. Keep its sections explicit so controls never compete for grid space. */
.cloud-sync-panel { gap: 1.15rem; }
.sync-health-card { gap: 1rem; overflow: hidden; }
.sync-health-card__heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sync-health-card__heading h3 { margin: 0.16rem 0 0; font-size: clamp(1.25rem, 2vw, 1.6rem); }
.sync-status-pill { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.48rem; padding: 0.5rem 0.75rem; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 0.76rem; font-weight: 950; letter-spacing: 0.04em; text-transform: uppercase; }
.sync-status-pill i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 0.22rem rgb(148 163 184 / 16%); }
.sync-status-pill--enabled { background: #dcfce7; color: #166534; }
.sync-status-pill--enabled i { background: #22c55e; box-shadow: 0 0 0 0.22rem rgb(34 197 94 / 16%); }
.sync-health-card .settings-overview-card { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sync-health-card .settings-overview-card__item { min-height: 6.75rem; align-content: center; box-shadow: none; }
.sync-health-card .settings-overview-card__item strong { font-size: clamp(1.05rem, 1.8vw, 1.45rem); }
.sync-error-summary { display: flex; align-items: baseline; gap: 0.65rem; margin: 0; padding: 0.72rem 0.85rem; border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--muted); font-size: 0.86rem; }
.sync-error-summary strong { color: #475569; }
.sync-error-summary .link-button { margin-left: auto; border: 0; padding: 0; background: transparent; color: #1d4ed8; box-shadow: none; text-decoration: underline; }
.sync-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.sync-actions button { min-width: 10rem; }
.sync-phase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.sync-phase-grid > div { display: grid; gap: 0.25rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.sync-phase-grid span, .sync-phase-grid small { color: var(--muted); }
.sync-phase--healthy { color: #15803d; } .sync-phase--error { color: #b91c1c; }
.sync-diagnostics { gap: 1rem; }
.sync-diagnostics h4 { margin: 0; }
.sync-endpoints { display: grid; gap: 0.55rem; }
.sync-endpoints > div { display: grid; grid-template-columns: minmax(8rem, 0.25fr) 1fr; gap: 0.75rem; padding: 0.65rem; border-radius: var(--radius-sm); background: var(--surface-soft); }
.sync-endpoints code { overflow-wrap: anywhere; }
.sync-activity { display: grid; gap: 0.4rem; margin-top: 0.65rem; }
.sync-activity > div { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(7rem, 0.5fr) 2fr; gap: 0.6rem; padding: 0.55rem; border-bottom: 1px solid var(--line); }
.sync-error-dialog { width: min(42rem, calc(100% - 2rem)); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.sync-error-dialog::backdrop { background: rgb(15 23 42 / 55%); }
.sync-error-dialog form { position: relative; display: grid; gap: 1rem; }
.sync-error-dialog .dialog-close { position: absolute; top: -0.5rem; right: 0; min-width: 2.5rem; padding: 0.3rem; background: transparent; color: var(--ink); box-shadow: none; font-size: 1.5rem; }
.sync-error-detail dl { display: grid; grid-template-columns: 8rem 1fr; gap: 0.55rem 1rem; }
.sync-error-detail dt { color: var(--muted); font-weight: 850; }
.sync-error-detail dd { margin: 0; overflow-wrap: anywhere; }
.cloud-sync-form.staff-form { display: grid; grid-template-columns: 1fr; gap: 1.15rem; align-items: stretch; }
.cloud-sync-form__intro { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.cloud-sync-form__intro h3 { margin: 0.15rem 0 0.25rem; font-size: clamp(1.25rem, 2vw, 1.55rem); }
.cloud-sync-form__intro p:not(.eyebrow) { max-width: 42rem; margin: 0; color: var(--muted); line-height: 1.5; }
.cloud-sync-form__intro .settings-toggle { flex: 0 0 min(100%, 20rem); padding: 0.8rem 0.9rem; }
.cloud-sync-form__intro .settings-toggle span { display: grid; gap: 0.14rem; }
.cloud-sync-form__intro .settings-toggle small { color: var(--muted); font-weight: 750; }
.cloud-sync-fieldset { display: grid; min-width: 0; gap: 0.9rem; margin: 0; border: 0; border-radius: var(--radius-md); padding: 1rem; background: var(--surface-soft); }
.cloud-sync-fieldset legend { padding: 0 0.35rem; color: var(--ink); font-size: 1rem; font-weight: 950; letter-spacing: -0.02em; }
.cloud-sync-fieldset--connection { grid-template-columns: minmax(16rem, 1.55fr) repeat(2, minmax(9rem, 0.7fr)); }
.cloud-sync-field--token { grid-column: 1 / -1; }
.cloud-sync-fieldset--schedule { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cloud-sync-fieldset label { position: relative; min-width: 0; }
.cloud-sync-fieldset label > small { min-height: 1.1em; color: var(--muted); font-size: 0.75rem; font-weight: 750; overflow-wrap: anywhere; }
.cloud-sync-fieldset .field-unit { position: absolute; top: 0.08rem; right: 0; color: var(--muted); font-size: 0.7rem; font-weight: 750; text-transform: uppercase; }
.cloud-sync-form .settings-save-bar { grid-column: auto; margin-top: 0; }
.cloud-sync-form .secondary-button { border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; box-shadow: none; }
.cloud-sync-form .secondary-button:hover { border-color: #93c5fd; background: #dbeafe; box-shadow: none; }


@media (max-width: 1200px) {
  .bill-settings-panel { grid-template-columns: 1fr; }
  .settings-sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
  .settings-field-grid--station { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sync-health-card .settings-overview-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cloud-sync-fieldset--connection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cloud-sync-field--url, .cloud-sync-field--token { grid-column: 1 / -1; }
  .cloud-sync-fieldset--schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .settings-section-heading, .settings-save-bar, .station-settings-card__heading { align-items: stretch; flex-direction: column; }
  .settings-field-grid--bill, .settings-field-grid--printer, .settings-field-grid--station, .settings-card--receipt-printer, .settings-card--add-station { grid-template-columns: 1fr; }
  .station-settings-card { grid-template-columns: 1fr; align-items: stretch; }
  .station-settings-card__toggles { grid-column: auto; grid-template-columns: 1fr; }
  .station-settings-card__order { width: 2rem; height: 2rem; }
  .settings-save-bar { bottom: 0.4rem; }
  .settings-save-bar button { width: 100%; }
  .sync-health-card__heading, .cloud-sync-form__intro { align-items: stretch; flex-direction: column; }
  .sync-status-pill { align-self: flex-start; }
  .sync-health-card .settings-overview-card { grid-template-columns: 1fr 1fr; }
  .cloud-sync-form__intro .settings-toggle { flex-basis: auto; width: 100%; }
  .cloud-sync-fieldset--connection, .cloud-sync-fieldset--schedule { grid-template-columns: 1fr; }
  .cloud-sync-field--url, .cloud-sync-field--token { grid-column: auto; }
  .cloud-sync-form .settings-save-bar { gap: 0.65rem; }
  .sync-error-summary { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .sync-phase-grid { grid-template-columns: 1fr; }
  .sync-endpoints > div, .sync-activity > div, .sync-error-detail dl { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .sync-health-card .settings-overview-card { grid-template-columns: 1fr; }
}

.sales-history-panel { gap: 1rem; }
.sales-history-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sales-history-tabs button { border: 1px solid var(--line); background: #fff; color: var(--muted); box-shadow: none; }
.sales-history-tabs button.active { border-color: rgb(15 118 110 / 35%); background: var(--primary); color: #fff; }
.sales-history-body { display: grid; gap: 1rem; }
.sales-summary-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.sales-history-wide { grid-column: 1 / -1; }
.sales-history-wide ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.55rem; }

.superadmin-page .page-header { background: radial-gradient(circle at 85% 15%, rgb(255 255 255 / 22%), transparent 16rem), linear-gradient(135deg, #115e59 0%, #0f766e 42%, #1d4ed8 100%); }
.superadmin-page > .card-grid { display: none; }
.workspace-tabs { position: sticky; top: 0.85rem; z-index: 6; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 0.4rem; min-width: 0; max-width: 100%; padding: 0.45rem; border: 1px solid rgb(219 230 243 / 88%); border-radius: 1.25rem; background: rgb(255 255 255 / 88%); box-shadow: var(--shadow-sm); backdrop-filter: blur(18px); }
.workspace-tabs button { display: grid; gap: 0.18rem; min-width: 0; min-height: 3.8rem; border: 0; border-radius: 0.9rem; padding: 0.65rem 0.8rem; background: transparent; color: var(--muted); text-align: left; cursor: pointer; transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
.workspace-tabs button span { color: inherit; font-size: 0.88rem; font-weight: 950; }
.workspace-tabs button small { overflow: hidden; color: inherit; font-size: 0.7rem; font-weight: 750; opacity: 0.78; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tabs button:hover { background: var(--surface-tint); color: var(--primary-dark); }
.workspace-tabs button.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 10px 22px rgb(15 118 110 / 22%); transform: translateY(-1px); }
.superadmin-panel { grid-template-columns: minmax(min(100%, 32rem), 1fr) minmax(min(100%, 28rem), 0.95fr); align-items: stretch; }
.superadmin-panel[data-active-tab] { grid-template-columns: minmax(0, 1fr); }
.superadmin-panel [data-admin-panel] { animation: panel-enter 180ms ease-out; }
@keyframes panel-enter { from { opacity: 0; transform: translateY(0.35rem); } to { opacity: 1; transform: translateY(0); } }
.staff-create-card, .superadmin-overview-card { min-height: 100%; }
.staff-create-card { background: linear-gradient(180deg, #fff, #f8fafc); }
.staff-create-card > div:first-child p:last-child { margin-bottom: 0; }
.superadmin-overview-card { overflow: hidden; background: linear-gradient(145deg, #0f172a 0%, #134e4a 58%, #0f766e 100%); color: #fff; border-color: rgb(255 255 255 / 14%); }
.superadmin-overview-card .eyebrow, .superadmin-overview-card p, .superadmin-overview-card span, .superadmin-overview-card small { color: rgb(255 255 255 / 76%); }
.superadmin-overview-card h3 { margin-bottom: 0.35rem; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.superadmin-overview-card p { margin: 0.2rem 0; }
.superadmin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.superadmin-metrics div, .superadmin-printer-card, .superadmin-monitor-card { border: 1px solid rgb(255 255 255 / 14%); border-radius: 1rem; background: rgb(255 255 255 / 10%); padding: 0.85rem; backdrop-filter: blur(12px); }
.superadmin-metrics strong { display: block; font-size: clamp(1.45rem, 4vw, 2.1rem); letter-spacing: -0.06em; }
.superadmin-metrics span { display: block; margin-top: 0.1rem; font-size: 0.78rem; font-weight: 850; }
.superadmin-printers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.superadmin-monitor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.superadmin-printer-card, .superadmin-monitor-card { display: grid; gap: 0.35rem; }
.superadmin-printer-card strong { font-size: 1rem; }
.superadmin-printer-card .badge { width: fit-content; }
.superadmin-printer-card small { overflow-wrap: anywhere; }
.superadmin-station-card, .superadmin-localization-card { grid-column: 1 / -1; gap: 1.25rem; }
.localization-panel .superadmin-localization-card { max-width: 82rem; margin-inline: auto; width: 100%; }
.localization-form { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: stretch; }
.localization-form__layout { display: grid; grid-template-columns: minmax(18rem, 0.7fr) minmax(28rem, 1.3fr); gap: 1rem; align-items: start; }
.localization-form__settings, .localization-form__editor { min-width: 0; }
.localization-form__settings { display: grid; gap: 0.85rem; align-content: start; }
.localization-form__settings label { margin: 0; }
.localization-form__fonts { margin: 0; line-height: 1.5; }
.localization-form__actions { display: flex; gap: 0.85rem; align-items: center; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 1rem; }
.localization-form__actions .form-error { flex: 1 1 auto; margin: 0; }
.localization-form__actions button { min-width: min(100%, 15rem); }
.locale-preview { display: grid; gap: 0.35rem; border: 1px solid var(--line); border-radius: 0.9rem; background: linear-gradient(180deg, #fff, #f8fafc); padding: 0.9rem; }
.locale-preview strong { font-size: 1.1rem; }
.locale-preview span, .locale-preview small { color: var(--muted); line-height: 1.45; }
.translation-map { display: grid; gap: 0.5rem; max-height: min(34rem, 58vh); overflow: auto; border: 1px solid var(--line); border-radius: 1rem; padding: 0.75rem; background: #fff; }
.translation-map__header, .translation-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 1fr); gap: 0.75rem; align-items: center; }
.translation-map__header { position: sticky; top: -0.75rem; z-index: 1; padding: 0.45rem 0; background: #fff; color: var(--muted); font-size: 0.75rem; font-weight: 950; text-transform: uppercase; letter-spacing: 0.08em; }
.translation-row { margin: 0; color: var(--ink) !important; }
.translation-row span { display: grid; gap: 0.15rem; min-width: 0; }
.translation-row small { color: var(--muted); font-weight: 750; overflow-wrap: anywhere; }
.translation-row strong { font-size: 0.9rem; overflow-wrap: anywhere; }
.translation-row input { min-width: 0; font-family: 'Noto Sans Myanmar', 'Padauk', 'Myanmar Text', 'Pyidaungsu', sans-serif; }
.superadmin-page .admin-launchpad { margin-top: 0; }
.superadmin-page .superadmin-settings-launchpad { grid-template-columns: minmax(100%, 1fr); }
.superadmin-page .admin-launchpad button { display: grid; gap: 0.35rem; min-height: 7.5rem; text-align: left; background: linear-gradient(135deg, #0f766e, #2563eb); transition: transform 140ms ease, box-shadow 140ms ease; }
.superadmin-page .admin-launchpad button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.superadmin-page .admin-launchpad button span { font-size: 1rem; }
.superadmin-page .admin-launchpad button small { color: rgb(255 255 255 / 78%); font-weight: 750; line-height: 1.35; }

@media (max-width: 1200px) {
  .superadmin-panel, .localization-form__layout { grid-template-columns: 1fr; }
  .translation-map { max-height: 30rem; }
}

@media (max-width: 760px) {
  .workspace-tabs { top: 0.35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: -0.15rem; border-radius: 1rem; }
  .superadmin-metrics, .superadmin-printers { grid-template-columns: 1fr 1fr; }
  .translation-map__header, .translation-row { grid-template-columns: 1fr; }
  .translation-map__header { display: none; }
  .localization-form__actions { align-items: stretch; flex-direction: column; }
  .localization-form__actions button { width: 100%; }
}

@media (max-width: 520px) {
  .superadmin-metrics, .superadmin-printers, .superadmin-monitor { grid-template-columns: 1fr; }
}

.cloud-monitor-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; border: 1px solid #bae6fd; border-radius: 1rem; padding: .75rem 1rem; background: #f0f9ff; color: #0c4a6e; }
.cloud-monitor-banner > div { display: grid; gap: .15rem; }
.cloud-monitor-banner > div:last-child { text-align: right; }
.cloud-monitor-banner strong { font-size: .92rem; }
.cloud-monitor-banner span, .cloud-monitor-banner small { font-size: .76rem; font-weight: 750; }
.cloud-monitor-banner--delayed { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.cloud-monitor-banner--remote-status-unknown, .cloud-monitor-banner--unknown { border-color: #e2e8f0; background: #f8fafc; color: #475569; }
.cloud-operational-readonly button:disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 620px) { .cloud-monitor-banner { align-items: flex-start; flex-direction: column; } .cloud-monitor-banner > div:last-child { text-align: left; } }

/* Daily close report */
.reports-page { gap: 1rem; }
.reports-page .page-header { background: radial-gradient(circle at 88% 18%, rgb(255 255 255 / 18%), transparent 13rem), linear-gradient(135deg, #0f172a 0%, #115e59 48%, #2563eb 100%); }
.report-toolbar { display: grid; grid-template-columns: 1fr; align-items: stretch; gap: 1rem; padding: clamp(1rem, 2vw, 1.35rem); border: 1px solid rgb(219 230 243 / 90%); border-radius: var(--radius-lg); background: rgb(255 255 255 / 94%); box-shadow: var(--shadow-sm); }
.report-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.report-filter-heading h2 { margin: .15rem 0; font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -.04em; }
.report-filter-heading p:last-child { margin: 0; color: var(--muted); line-height: 1.45; }
.report-filter-heading button { flex: 0 0 auto; min-width: 9rem; }
.report-primary-filters, .report-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.report-toolbar label { display: grid; gap: .4rem; min-width: 0; color: #334155; font-size: .78rem; font-weight: 900; }
.report-toolbar input, .report-toolbar select { width: 100%; min-width: 0; }
.report-advanced-filters { border-top: 1px solid var(--line); padding-top: .85rem; }
.report-advanced-filters summary { display: flex; align-items: baseline; gap: .65rem; width: fit-content; color: var(--primary-dark); font-weight: 950; cursor: pointer; }
.report-advanced-filters summary span { color: var(--muted); font-size: .75rem; font-weight: 750; }
.report-advanced-filters[open] summary { margin-bottom: .9rem; }
.report-tabs { position: sticky; top: .6rem; z-index: 4; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; padding: .45rem; border: 1px solid rgb(219 230 243 / 90%); border-radius: 1.2rem; background: rgb(255 255 255 / 92%); box-shadow: var(--shadow-sm); backdrop-filter: blur(16px); }
.report-tabs button { display: grid; gap: .15rem; min-width: 0; min-height: 3.65rem; border: 0; border-radius: .85rem; padding: .6rem .8rem; background: transparent; color: var(--muted); text-align: left; cursor: pointer; box-shadow: none; transition: background 140ms ease, color 140ms ease, transform 140ms ease; }
.report-tabs button span { font-size: .88rem; font-weight: 950; }
.report-tabs button small { overflow: hidden; color: inherit; font-size: .69rem; font-weight: 750; opacity: .8; text-overflow: ellipsis; white-space: nowrap; }
.report-tabs button:hover { background: var(--surface-tint); color: var(--primary-dark); }
.report-tabs button.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 10px 24px rgb(15 118 110 / 20%); transform: translateY(-1px); }
.report-workspace, .report-tab-panel { min-width: 0; }
.report-tab-panel { display: grid; gap: 1rem; animation: panel-enter 180ms ease-out; }
.report-tab-panel > .report-card { margin: 0; }
.report-tab-panel > .report-card > h2:first-child { margin-top: 0; }
.daily-summary-actions { display: flex; gap: .65rem; justify-content: flex-end; margin: 0; }
.daily-summary-actions .secondary-button { min-height: 2.7rem; border: 1px solid var(--line); border-radius: .8rem; padding: .65rem .9rem; background: #fff; color: var(--ink); font-weight: 850; cursor: pointer; }
.report-failure { color: #991b1b; }
.daily-summary-report { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.daily-summary-report .report-card:last-child { grid-column: 1 / -1; }
.daily-summary-report .report-card { border-top: .25rem solid var(--primary); }
.daily-summary-report .report-card:nth-child(2) { border-top-color: var(--accent); }
.summary-ledger { margin: 0; }
.summary-ledger > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--border-color, #e5e7eb); text-transform: capitalize; }
.summary-ledger dd { margin: 0; font-variant-numeric: tabular-nums; }
.summary-ledger .ledger-total { font-size: 1.08rem; font-weight: 700; border-top: 2px solid currentColor; }
@media (max-width: 1000px) { .report-primary-filters, .report-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .report-filter-heading { align-items: stretch; flex-direction: column; } .report-filter-heading button { width: 100%; } .report-primary-filters, .report-filter-grid { grid-template-columns: 1fr; } .report-advanced-filters summary span { display: none; } .report-tabs { top: .35rem; grid-template-columns: repeat(5, minmax(4.8rem, 1fr)); overflow-x: auto; } .report-tabs button small { display: none; } .daily-summary-report { grid-template-columns: 1fr; } .daily-summary-report .report-card:last-child { grid-column: auto; } }
@media print { .app-sidebar, .app-header, .network-banner, .report-filter-form, .report-tabs, .daily-summary-actions { display: none !important; } .report-tab-panel { display: block !important; } .report-tab-panel[hidden] { display: none !important; } .daily-summary-report { display: block; } .daily-summary-report .card { break-inside: avoid; box-shadow: none; margin-bottom: 1rem; } }
