/* Tropika Admin — one surface, logo colours, no mixed themes */

:root {
  --sky: #7EC8E8;
  --gold: #F5C542;
  --grad: linear-gradient(90deg, #7EC8E8 0%, #F5C542 100%);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --nav-width: 272px;
  --header-height: 72px;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --control-h: 42px;
  --control-h-sm: 34px;
  --control-pad-x: 14px;
  --blur: 18px;
  --transition-base: 180ms var(--ease);
}

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f4f1ea;
  --canvas-ambient-1: rgba(245, 197, 66, 0.18);
  --canvas-ambient-2: rgba(126, 200, 232, 0.14);
  --surface-1: #fffcf7;
  --surface-2: #ffffff;
  --surface-3: #efeae0;
  --surface-header: rgba(244, 241, 234, 0.86);
  --veil: rgba(20, 16, 8, 0.028);
  --veil-2: rgba(20, 16, 8, 0.05);
  --veil-3: rgba(20, 16, 8, 0.08);
  --veil-hover: rgba(126, 200, 232, 0.1);
  --sunken: rgba(20, 16, 8, 0.04);
  --line: rgba(20, 16, 8, 0.08);
  --line-2: rgba(20, 16, 8, 0.13);
  --line-row: rgba(20, 16, 8, 0.05);
  --ink-1: #16130c;
  --ink-2: #5e584c;
  --ink-3: #8a8376;
  --brand: #c49212;
  --brand-bright: #e3b02a;
  --brand-deep: #8a6a0c;
  --brand-ink: #16130c;
  --brand-tint: rgba(245, 197, 66, 0.18);
  --brand-tint-2: rgba(245, 197, 66, 0.3);
  --brand-edge: rgba(196, 146, 18, 0.32);
  --info: #2a86ab;
  --info-tint: rgba(42, 134, 171, 0.1);
  --info-edge: rgba(42, 134, 171, 0.22);
  --success: #0d9a6a;
  --success-tint: rgba(13, 154, 106, 0.1);
  --success-edge: rgba(13, 154, 106, 0.22);
  --danger: #c63d52;
  --danger-tint: rgba(198, 61, 82, 0.1);
  --danger-edge: rgba(198, 61, 82, 0.22);
  --gold: #c49212;
  --shadow-1: 0 1px 2px rgba(22,19,12,0.04), 0 10px 28px rgba(22,19,12,0.05);
  --shadow-2: 0 18px 40px rgba(22,19,12,0.08);
  --shadow-3: 0 30px 70px rgba(22,19,12,0.14);
  --shadow-brand: 0 10px 24px rgba(196, 146, 18, 0.18);
  --skeleton-base: rgba(22,19,12,0.05);
  --skeleton-sheen: rgba(22,19,12,0.09);
  --scrim: rgba(22, 19, 12, 0.38);
  --scroll-thumb: rgba(22,19,12,0.16);
  --scroll-thumb-hover: rgba(22,19,12,0.28);
  --sidebar-bg: #141108;
  --sidebar-hover: rgba(255,255,255,0.05);
  --sidebar-active: transparent;
  --sidebar-line: rgba(255,255,255,0.08);
  --sidebar-ink-1: #f7f3ea;
  --sidebar-ink-2: #b9b09a;
  --sidebar-ink-3: #7d7564;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #07080b;
  --canvas-ambient-1: rgba(245, 197, 66, 0.14);
  --canvas-ambient-2: rgba(126, 200, 232, 0.12);
  --surface-1: #12151c;
  --surface-2: #161a23;
  --surface-3: #0c0e13;
  --surface-header: rgba(7, 8, 11, 0.72);
  --veil: rgba(255,255,255,0.03);
  --veil-2: rgba(255,255,255,0.055);
  --veil-3: rgba(255,255,255,0.09);
  --veil-hover: rgba(126, 200, 232, 0.07);
  --sunken: rgba(0,0,0,0.28);
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.13);
  --line-row: rgba(255,255,255,0.045);
  --ink-1: #f4f6fa;
  --ink-2: #9aa3b2;
  --ink-3: #6b7382;
  --brand: #F5C542;
  --brand-bright: #FFD35A;
  --brand-deep: #d4a017;
  --brand-ink: #141108;
  --brand-tint: rgba(245, 197, 66, 0.14);
  --brand-tint-2: rgba(245, 197, 66, 0.22);
  --brand-edge: rgba(245, 197, 66, 0.38);
  --info: #7EC8E8;
  --info-tint: rgba(126, 200, 232, 0.12);
  --info-edge: rgba(126, 200, 232, 0.3);
  --success: #3ee0a0;
  --success-tint: rgba(62, 224, 160, 0.12);
  --success-edge: rgba(62, 224, 160, 0.28);
  --danger: #ff6b7a;
  --danger-tint: rgba(255, 107, 122, 0.12);
  --danger-edge: rgba(255, 107, 122, 0.3);
  --gold: #F5C542;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.28);
  --shadow-2: 0 16px 40px rgba(0,0,0,0.4);
  --shadow-3: 0 30px 80px rgba(0,0,0,0.55);
  --shadow-brand: 0 10px 28px rgba(245, 197, 66, 0.22);
  --skeleton-base: rgba(255,255,255,0.04);
  --skeleton-sheen: rgba(255,255,255,0.09);
  --scrim: rgba(3, 4, 6, 0.72);
  --scroll-thumb: rgba(255,255,255,0.14);
  --scroll-thumb-hover: rgba(255,255,255,0.24);
  --sidebar-bg: #08090c;
  --sidebar-hover: rgba(255,255,255,0.045);
  --sidebar-active: transparent;
  --sidebar-line: rgba(255,255,255,0.06);
  --sidebar-ink-1: #f3f5f8;
  --sidebar-ink-2: #8b93a3;
  --sidebar-ink-3: #5c6472;
}

:root {
  --bg-base: var(--canvas);
  --bg-surface: var(--surface-2);
  --bg-card: var(--surface-1);
  --bg-glass: var(--veil);
  --bg-glass-strong: var(--veil-2);
  --border-subtle: var(--line);
  --border-highlight: var(--line-2);
  --border-glow: var(--brand-edge);
  --text-main: var(--ink-1);
  --text-muted: var(--ink-2);
  --text-dim: var(--ink-3);
  --accent-primary: var(--brand);
  --accent-primary-hover: var(--brand-bright);
  --accent-glow: var(--brand-tint-2);
  --accent-info: var(--info);
  --accent-success: var(--success);
  --accent-danger: var(--danger);
  --accent-gold: var(--gold);
  --danger-solid: #dc2626;
  --on-danger: #ffffff;
  --shadow-sm: var(--shadow-1);
  --shadow-lg: var(--shadow-2);
  --shadow-glow: var(--shadow-brand);
}

* { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; padding: 0; }

body {
  background-color: var(--canvas);
  background-image:
    radial-gradient(900px 520px at 88% -12%, var(--canvas-ambient-1), transparent 58%),
    radial-gradient(720px 480px at -8% 8%, var(--canvas-ambient-2), transparent 52%);
  background-attachment: fixed;
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

.stat-value, .page-info, .detail-val, td, .metric-row, .table-cap {
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--brand-tint-2); color: var(--ink-1); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb); border-radius: 99px;
  border: 3px solid transparent; background-clip: padding-box;
}
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.app-container { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

.sidebar {
  width: var(--nav-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-line);
  display: flex; flex-direction: column; flex-shrink: 0; z-index: 50;
  position: relative;
}
.sidebar::before {
  content: '';
  position: absolute; inset: 0 auto auto 0; height: 3px; width: 100%;
  background: var(--grad);
}

.sidebar-header {
  min-height: 88px; display: flex; align-items: center;
  padding: 18px 18px 8px;
}
.brand-mark {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit; min-width: 0;
}
.brand-logo {
  height: 54px; width: auto; display: block; flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(126,200,232,0.28));
  transition: transform 420ms var(--ease), filter 420ms var(--ease);
}
.brand-mark:hover .brand-logo {
  transform: scale(1.05) rotate(-3deg);
  filter: drop-shadow(0 10px 22px rgba(245,197,66,0.4));
}
.brand-name {
  font-weight: 750; font-size: 15px; color: var(--sidebar-ink-1);
  letter-spacing: -0.03em; line-height: 1.15;
}
.brand-name::after {
  content: 'Admin Panel';
  display: block; font-size: 10px; font-weight: 700;
  color: var(--sidebar-ink-3); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 4px;
}

.nav-links { flex: 1; padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-group-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--sidebar-ink-3);
  font-weight: 800; padding: 18px 12px 8px;
}
.nav-item, a.nav-item {
  display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px;
  color: var(--sidebar-ink-2); text-decoration: none; border-radius: 12px;
  font-weight: 600; font-size: 13.5px;
  position: relative; border: 1px solid transparent;
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease), border-color 180ms var(--ease);
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-ink-1); transform: translateX(2px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(126,200,232,0.16), rgba(245,197,66,0.1));
  border-color: rgba(245,197,66,0.18);
  pointer-events: none;
}
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 99px; background: var(--grad);
}
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.8px; opacity: 0.8; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; color: var(--gold); }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--sidebar-line); }
.user-profile {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--sidebar-line);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #141108;
}
.user-profile > div > div:first-child { color: var(--sidebar-ink-1) !important; }
.user-profile > div > div:last-child { color: var(--sidebar-ink-3) !important; }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.top-header {
  min-height: var(--header-height); padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-header);
  backdrop-filter: blur(var(--blur));
  z-index: 40; flex-shrink: 0;
}
.mobile-toggle {
  display: none; align-items: center; justify-content: center;
  width: var(--control-h); height: var(--control-h); padding: 0; flex-shrink: 0;
  background: var(--surface-1); border: 1px solid var(--line);
  color: var(--ink-1); cursor: pointer; border-radius: 12px;
}
.page-title h2 {
  margin: 0; font-size: 22px; font-weight: 750;
  color: var(--ink-1); letter-spacing: -0.04em; line-height: 1.15;
}
.page-title span {
  font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-left: 12px;
  padding-left: 12px; border-left: 1px solid var(--line-2);
}
.header-actions { display: flex; gap: 8px; align-items: center; }

.search-wrapper { position: relative; display: flex; align-items: center; }
.search-input {
  background: var(--surface-1); border: 1px solid var(--line); color: var(--ink-1);
  min-height: var(--control-h); padding: 0 14px 0 38px; border-radius: 12px;
  font-size: 13px; font-family: inherit; font-weight: 500; width: 260px;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), width 220ms var(--ease);
}
.search-input::placeholder { color: var(--ink-3); }
.search-input:focus { border-color: var(--sky); width: 320px; box-shadow: 0 0 0 4px rgba(126,200,232,0.15); }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--control-h); height: var(--control-h); padding: 0;
  border-radius: 12px; cursor: pointer;
  background: var(--surface-1); border: 1px solid var(--line); color: var(--ink-2);
}
.theme-toggle:hover { color: var(--gold); border-color: var(--brand-edge); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-h); padding: 0 var(--control-pad-x); border-radius: 12px;
  font-size: 13px; font-weight: 700; font-family: inherit;
  border: 1px solid var(--line); background: var(--surface-1); color: var(--ink-1);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease), background-position 400ms var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-2); }
.btn:disabled { opacity: 0.42; pointer-events: none; }
.btn-primary {
  background-image: var(--grad) !important;
  background-size: 160% 100% !important;
  color: #141108 !important;
  border: 0 !important;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background-position: 100% 50%; }
.btn-sm { min-height: var(--control-h-sm); padding: 0 12px; font-size: 12px; }
.btn-text {
  min-height: auto; padding: 4px 2px; background: transparent; border: none; box-shadow: none;
  color: var(--gold); font-weight: 750;
}
.btn-text:hover { color: var(--sky); transform: none; }

.dashboard-scroll { flex: 1; overflow-y: auto; padding: 28px 28px 48px; }
.view-section { display: none; animation: viewIn 420ms var(--ease) both; }
.view-section.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.content-max-width { max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.filter-container { margin-bottom: 0; }
.table-card-container, .table-card-standalone, .glass-panel { margin-top: 0; }

@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.95; } }
@keyframes shimmer { 0% { background-position: -420px 0; } 100% { background-position: 420px 0; } }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(62,224,160,0.55); } 70% { box-shadow: 0 0 0 10px rgba(62,224,160,0); } }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative; overflow: hidden;
  min-height: 148px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-1);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease);
}
.stat-card::after {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--grad); opacity: 0.55;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(245,197,66,0.28); }
.live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: currentColor;
  animation: livePulse 1.8s ease-out infinite;
}
.stat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.stat-label { font-size: 11px; color: var(--ink-3); font-weight: 750; text-transform: uppercase; letter-spacing: 0.12em; }
.stat-icon-bg {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--veil-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--sky);
}
.stat-value { font-size: 36px; font-weight: 750; letter-spacing: -0.05em; line-height: 1; margin-top: auto; color: var(--ink-1); }
.stat-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.trend-up {
  color: var(--success); display: inline-flex; align-items: center; gap: 4px;
  background: var(--success-tint); border: 1px solid var(--success-edge);
  padding: 3px 9px; border-radius: var(--radius-pill); font-weight: 750; font-size: 12px;
}
.trend-neutral { color: var(--ink-2); }

.glass-panel, .filter-container, .table-card-standalone, .table-card-container {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.glass-panel { padding: 20px; }
.filter-container {
  padding: 16px 18px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between;
}
.filter-left { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 10px; font-weight: 750; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }

.custom-select-wrapper { position: relative; display: inline-block; }
.custom-select {
  appearance: none; background: var(--surface-3); color: var(--ink-1);
  border: 1px solid var(--line); min-height: var(--control-h);
  padding: 0 34px 0 var(--control-pad-x); border-radius: 12px;
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; min-width: 148px; width: 100%;
}
.custom-select:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(126,200,232,0.14); }
.custom-select option { background: var(--surface-2); color: var(--ink-1); }
.select-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-3); pointer-events: none; }
.flatpickr-custom {
  background: var(--surface-3); color: var(--ink-1); border: 1px solid var(--line);
  min-height: var(--control-h); padding: 0 var(--control-pad-x); border-radius: 12px;
  font-size: 13px; font-family: inherit; font-weight: 600; min-width: 148px;
}

.table-toolbar {
  padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--line);
}
.table-toolbar-left { min-width: 0; flex: 1 1 auto; }
.table-toolbar h3 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -0.03em; color: var(--ink-1); }
.table-toolbar .subtitle { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }
.pagination-inline {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  flex: 0 0 auto; flex-wrap: wrap;
}
.pagination-inline .page-info { min-width: auto; white-space: nowrap; }
.table-scroll-area { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 12px 20px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-3); font-weight: 750;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(245,197,66,0.09), rgba(245,197,66,0.02));
  white-space: nowrap;
}
tbody td {
  padding: 16px 20px; border-bottom: 1px solid var(--line-row);
  vertical-align: middle; font-size: 13.5px; color: var(--ink-2);
}
tbody tr { transition: background 160ms var(--ease); cursor: pointer; }
tbody tr:hover { background: var(--veil-hover); }
tbody tr:last-child td { border-bottom: none; }
.cell-primary { font-weight: 750; color: var(--ink-1); letter-spacing: -0.02em; }
.cell-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 750;
  text-transform: uppercase; letter-spacing: 0.07em; white-space: nowrap;
  border: 1px solid transparent; background: var(--veil-2); color: var(--ink-2);
}
.badge.new { background: var(--info-tint); color: var(--info); border-color: var(--info-edge); }
.badge.confirmed, .badge.nye-paid, .badge.pkg-confirmed { background: var(--success-tint); color: var(--success); border-color: var(--success-edge); }
.badge.noshow, .badge.closed, .badge.cancelled, .badge.canceled, .badge.nye-manual { background: var(--danger-tint); color: var(--danger); border-color: var(--danger-edge); }
.badge.pkg-generated { background: var(--brand-tint); color: var(--brand); border-color: var(--brand-edge); }
/* IVR outcomes — gradients, distinct from Pending / Confirmed / Cancelled / No Show */
.badge.ivr_enquiry, .badge.ivr-answered {
  background: linear-gradient(135deg, #0f766e, #0e7490);
  color: #ecfeff;
  border-color: rgba(15, 118, 110, 0.7);
}
.badge.ivr_missed, .badge.ivr-missed {
  background: linear-gradient(135deg, #5b21b6, #9d174d);
  color: #faf5ff;
  border-color: rgba(91, 33, 182, 0.7);
}
:root[data-theme="dark"] .badge.ivr_enquiry,
:root[data-theme="dark"] .badge.ivr-answered {
  background: linear-gradient(135deg, #115e59, #155e75);
  color: #ccfbf1;
  border-color: rgba(20, 184, 166, 0.45);
}
:root[data-theme="dark"] .badge.ivr_missed,
:root[data-theme="dark"] .badge.ivr-missed {
  background: linear-gradient(135deg, #4c1d95, #831843);
  color: #f3e8ff;
  border-color: rgba(167, 139, 250, 0.4);
}
.badge.status-AVAILABLE { background: var(--success-tint); color: var(--success); border-color: var(--success-edge); }
.badge.status-OCCUPIED { background: var(--brand-tint); color: var(--brand); border-color: var(--brand-edge); }
.badge.status-DIRTY { background: var(--danger-tint); color: var(--danger); border-color: var(--danger-edge); }

.pagination-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 18px; border-top: 1px solid var(--line);
}
.pagination-bar.top { border-top: none; border-bottom: 1px solid var(--line); }
.page-info { font-size: 12.5px; color: var(--ink-2); font-weight: 700; min-width: 96px; text-align: center; }

.floor-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.zone-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.zone-tab {
  padding: 0 16px; min-height: var(--control-h-sm); display: inline-flex; align-items: center;
  border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700;
  color: var(--ink-2); background: var(--surface-1); border: 1px solid var(--line); cursor: pointer;
  transition: all 180ms var(--ease);
}
.zone-tab:hover { color: var(--ink-1); border-color: var(--line-2); }
.zone-tab.active { background: var(--grad); color: #141108; border-color: transparent; }
.zone-section { margin-bottom: 24px; }
.zone-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.zone-title { font-size: 16px; font-weight: 750; flex: 1; letter-spacing: -0.03em; color: var(--ink-1); }
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

.table-card {
  position: relative; padding: 16px 14px; border-radius: 16px; min-height: 112px;
  background: var(--surface-1); border: 1px solid var(--line);
  cursor: pointer; overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease);
}
.table-card:hover { transform: translateY(-3px); border-color: var(--sky); }
.table-card.status-AVAILABLE { box-shadow: inset 3px 0 0 var(--success); }
.table-card.status-OCCUPIED { box-shadow: inset 3px 0 0 var(--gold); }
.table-card.status-DIRTY { box-shadow: inset 3px 0 0 var(--danger); }
.table-name { font-weight: 750; font-size: 18px; letter-spacing: -0.04em; color: var(--ink-1); }
.table-cap { font-size: 12px; color: var(--ink-3); margin-top: 4px; font-weight: 600; }
.table-icon { position: absolute; right: 12px; bottom: 12px; width: 22px; height: 22px; opacity: 0.22; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 100; padding: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 10, 6, 0);
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition:
    opacity 320ms var(--ease),
    visibility 320ms linear,
    background 360ms var(--ease),
    backdrop-filter 420ms var(--ease),
    -webkit-backdrop-filter 420ms var(--ease);
}
.modal-overlay.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  background: var(--scrim);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.modal-overlay.closing {
  opacity: 0; visibility: hidden; pointer-events: none;
  background: rgba(12, 10, 6, 0);
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  transition:
    opacity 240ms cubic-bezier(0.4, 0, 1, 1),
    visibility 240ms linear,
    background 240ms cubic-bezier(0.4, 0, 1, 1),
    backdrop-filter 240ms cubic-bezier(0.4, 0, 1, 1),
    -webkit-backdrop-filter 240ms cubic-bezier(0.4, 0, 1, 1);
}
.modal-card {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.94);
  filter: blur(6px);
  transform-origin: center center;
  transition:
    opacity 380ms var(--ease),
    transform 480ms cubic-bezier(0.22, 1.15, 0.32, 1),
    filter 380ms var(--ease),
    box-shadow 480ms var(--ease);
  will-change: transform, opacity, filter;
}
.modal-overlay.open .modal-card {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(245, 197, 66, 0.08), 0 28px 80px rgba(12, 10, 6, 0.18);
}
.modal-overlay.closing .modal-card {
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.97);
  filter: blur(4px);
  transition:
    opacity 220ms cubic-bezier(0.4, 0, 1, 1),
    transform 260ms cubic-bezier(0.4, 0, 1, 1),
    filter 220ms cubic-bezier(0.4, 0, 1, 1),
    box-shadow 220ms cubic-bezier(0.4, 0, 1, 1);
}
.modal-card.wide { max-width: 840px; }
body.modal-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-overlay.open, .modal-overlay.closing,
  .modal-card, .modal-overlay.open .modal-card, .modal-overlay.closing .modal-card {
    transition-duration: 1ms !important;
    filter: none !important;
    transform: none !important;
  }
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--surface-2); z-index: 3;
}
.modal-header h3 { margin: 0; font-size: 17px; font-weight: 750; color: var(--ink-1); }
.modal-body { padding: 22px; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 10.5px; font-weight: 750; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 7px; }
.form-input {
  width: 100%; background: var(--surface-3); border: 1px solid var(--line); color: var(--ink-1);
  min-height: var(--control-h); padding: 9px var(--control-pad-x); border-radius: 12px;
  font-size: 14px; font-family: inherit; font-weight: 500;
}
.form-input:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(126,200,232,0.14); }
textarea.form-input { resize: vertical; min-height: 80px; line-height: 1.6; padding-top: 10px; }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-row); }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.detail-val { color: var(--ink-1); font-weight: 750; text-align: right; font-size: 13.5px; }

.toast {
  position: fixed; bottom: 22px; right: 22px; display: flex; align-items: center; gap: 9px;
  padding: 12px 16px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--line-2); color: var(--ink-1); font-weight: 700; font-size: 13px;
  box-shadow: var(--shadow-2); transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: transform 240ms var(--ease), opacity 240ms var(--ease); z-index: 200;
}
.toast svg { color: var(--success); }
.toast.visible { transform: translateY(0); opacity: 1; }
.toast.error { border-color: var(--danger-edge); color: var(--danger); }
.spinner-overlay { position: fixed; inset: 0; background: var(--scrim); display: none; align-items: center; justify-content: center; z-index: 150; }
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--veil-3); border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
.skeleton, #skeletonLoader > div {
  background: var(--skeleton-base) !important;
  background-image: linear-gradient(90deg, transparent, var(--skeleton-sheen), transparent) !important;
  background-repeat: no-repeat; background-size: 420px 100%;
  animation: shimmer 1.3s ease-in-out infinite; border-radius: 10px !important;
}

.bar-track { height: 8px; border-radius: 99px; background: var(--veil-3); overflow: hidden; margin-top: 8px; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--grad); transition: width 500ms var(--ease); }
.metric-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 16px; }

.flatpickr-calendar {
  background: var(--surface-2) !important; border: 1px solid var(--line-2) !important;
  border-radius: 14px !important; box-shadow: var(--shadow-2) !important;
  color: var(--ink-1) !important; font-family: var(--font-sans) !important;
}
.flatpickr-day.selected { background: var(--gold) !important; border-color: var(--gold) !important; color: #141108 !important; }

.auth-logout-btn {
  flex-shrink: 0; width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--sidebar-line);
  border-radius: 10px; color: var(--sidebar-ink-2); cursor: pointer;
}
.auth-logout-btn:hover { color: var(--sidebar-ink-1); border-color: var(--gold); }

html:not(.is-authed) body[data-page]:not([data-page="login"]) .app-container { visibility: hidden; }

body.login-body {
  overflow: auto; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 18px;
  background-color: var(--canvas);
  background-image:
    radial-gradient(920px 520px at 8% -12%, rgba(126,200,232,0.28), transparent 56%),
    radial-gradient(820px 500px at 108% 108%, rgba(245,197,66,0.26), transparent 52%),
    linear-gradient(180deg, #f8f4ec 0%, #f1ece2 100%);
}
.login-shell { width: min(440px, 100%); text-align: center; animation: viewIn 560ms var(--ease) both; }
.login-logo {
  width: min(230px, 70vw); height: auto; margin: 0 auto 18px;
  filter: drop-shadow(0 16px 40px rgba(126,200,232,0.22));
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.login-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: #2a86ab; margin: 0 0 8px; }
.login-title {
  margin: 0 0 6px; font-size: 32px; font-weight: 750; letter-spacing: -0.045em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-sub { margin: 0 0 28px; color: var(--ink-2); font-size: 15px; }
.login-card {
  text-align: left; background: rgba(255,252,247,0.92); border: 1px solid rgba(20,16,8,0.08);
  border-radius: 22px; padding: 28px 24px 24px; box-shadow: var(--shadow-3); backdrop-filter: blur(20px);
  position: relative;
}
.login-card::before {
  content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 3px;
  border-radius: 0 0 8px 8px; background: var(--grad);
}
.login-card label { display: block; margin: 0 0 8px; font-size: 11px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.login-card input {
  width: 100%; height: 50px; padding: 0 14px; margin-bottom: 16px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-1); font-size: 15px; font-family: inherit;
}
.login-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245,197,66,0.18); }
.login-card button[type="submit"] {
  width: 100%; height: 52px; margin-top: 4px; border: 0; border-radius: 12px; cursor: pointer;
  background-image: var(--grad); background-size: 160% 100%; color: #141108;
  font-weight: 800; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; font-family: inherit;
}
.login-card button[type="submit"]:hover { background-position: 100% 0; }
.login-alt-btn {
  width: 100%; height: 48px; margin-top: 10px; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--ink-1); font-family: inherit;
  border: 1px solid var(--line-2); font-weight: 750; font-size: 13px; letter-spacing: 0.04em;
}
.login-alt-btn:hover { border-color: var(--gold); color: var(--brand-deep); }
.login-error { display: none; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--danger-tint); border: 1px solid var(--danger-edge); color: var(--danger); font-size: 13px; }
.login-error.show { display: block; }
.login-hint { margin: 16px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.login-card[hidden] { display: none !important; }

.staff-create {
  display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 18px; align-items: start;
}
.staff-create-card { padding: 22px; }
.staff-create-head {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px;
}
.staff-create-icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(126,200,232,0.28), rgba(245,197,66,0.22));
  border: 1px solid var(--line); color: var(--brand-deep);
}
.staff-create-card h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.03em; }
.staff-create-card p { margin: 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.staff-email-input { min-width: 200px; font-size: 13px; }
.staff-name-input { min-width: 120px; font-size: 13px; }
html:not(.is-admin) .nav-admin-only { display: none !important; }
tbody tr.staff-row { cursor: default; }
tbody tr.staff-row:hover { background: transparent; }

.status-update-panel {
  margin-top: 20px; padding: 16px; background: var(--veil);
  border-radius: 12px; border: 1px solid var(--border-subtle);
}
.staff-notes-section { margin-top: 22px; }
.staff-note-card {
  padding: 12px 14px; margin-bottom: 8px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.staff-note-meta {
  font-size: 11px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.staff-note-body { font-size: 13.5px; color: var(--ink-1); line-height: 1.5; white-space: pre-wrap; }

.audit-panel {
  margin-top: 22px; padding: 16px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(126,200,232,0.08), rgba(245,197,66,0.06));
  border: 1px solid var(--line);
}
.audit-panel-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}
.audit-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.audit-item {
  display: grid; grid-template-columns: 16px 1fr; gap: 12px;
  position: relative; padding: 0 0 16px;
}
.audit-item:last-child { padding-bottom: 0; }
.audit-item::before {
  content: ''; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px;
  background: var(--line);
}
.audit-item:last-child::before { display: none; }
.audit-dot {
  width: 16px; height: 16px; border-radius: 50%; margin-top: 2px;
  background: var(--surface-2); border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(245,197,66,0.15);
}
.audit-received .audit-dot { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(126,200,232,0.18); }
.audit-status .audit-dot { border-color: var(--success); box-shadow: 0 0 0 3px rgba(13,154,106,0.15); }
.audit-body {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.audit-received .audit-body { border-color: rgba(126,200,232,0.35); }
.audit-status .audit-body { border-color: rgba(13,154,106,0.28); }
.audit-title { font-size: 13px; font-weight: 750; color: var(--ink-1); letter-spacing: -0.02em; }
.audit-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.audit-time { margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.audit-status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.audit-arrow { color: var(--ink-3); font-weight: 700; }
.audit-detail { margin-top: 8px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.audit-by { margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }

.audit-shimmer {
  display: flex; flex-direction: column; gap: 12px; min-height: 220px;
}
.audit-shimmer-sla {
  height: 96px; border-radius: 14px !important; width: 100%;
}
.audit-shimmer-item {
  height: 72px; border-radius: 12px !important; width: 100%;
}

.audit-sla {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; margin-bottom: 16px; padding: 16px 14px; border-radius: 14px;
  border: 1px solid var(--line);
}
.audit-sla-label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85;
}
.audit-sla-value {
  font-size: 42px; font-weight: 800; letter-spacing: -0.05em; line-height: 1.05; margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.audit-sla-sub { font-size: 12px; font-weight: 600; opacity: 0.8; }
.audit-sla-note {
  margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.audit-forgiven-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(255,255,255,0.55); border: 1px solid currentColor; opacity: 0.92;
}
.audit-forgiven-sub {
  font-size: 11px; font-weight: 650; line-height: 1.35; opacity: 0.78; max-width: 260px;
}
.audit-sla.is-forgiven .audit-forgiven-pill {
  background: rgba(255,255,255,0.72);
  border-color: rgba(14, 116, 144, 0.28);
  color: #0e7490;
  box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.08);
}
.audit-delta {
  font-size: 22px; font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tone-fast { color: var(--success); background: var(--success-tint); border-color: var(--success-edge); }
/* Special overnight-forgiven look — teal/sky, not gold warning or red miss */
.tone-forgiven {
  color: #0e7490;
  background: linear-gradient(160deg, rgba(126, 200, 232, 0.34), rgba(45, 212, 191, 0.22));
  border-color: rgba(14, 116, 144, 0.35);
  box-shadow:
    0 0 0 1px rgba(126, 200, 232, 0.35),
    0 12px 32px rgba(14, 116, 144, 0.14);
  animation: forgivenGlow 2.8s ease-in-out infinite;
}
@keyframes forgivenGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(126, 200, 232, 0.3), 0 10px 28px rgba(14, 116, 144, 0.12); }
  50% { box-shadow: 0 0 0 4px rgba(126, 200, 232, 0.22), 0 14px 36px rgba(45, 212, 191, 0.18); }
}
.tone-mid { color: #b7791f; background: rgba(245,197,66,0.18); border-color: rgba(196,146,18,0.35); }
.tone-slow { color: var(--danger); background: var(--danger-tint); border-color: var(--danger-edge); }
.tone-unknown { color: var(--ink-3); background: var(--veil-2); }
.audit-delta.tone-fast,
.audit-delta.tone-forgiven,
.audit-delta.tone-mid,
.audit-delta.tone-slow,
.audit-delta.tone-unknown {
  background: transparent; border: 0; box-shadow: none; animation: none;
}
.audit-delta.tone-forgiven { color: #0e7490; }

:root[data-theme="dark"] body.login-body {
  background-color: #07080b;
  background-image:
    radial-gradient(900px 500px at 12% -10%, rgba(126,200,232,0.18), transparent 55%),
    radial-gradient(800px 480px at 110% 110%, rgba(245,197,66,0.16), transparent 50%),
    linear-gradient(180deg, #07080b, #0c0e13);
}
:root[data-theme="dark"] .login-card {
  background: rgba(18,21,28,0.88); border-color: rgba(255,255,255,0.08);
}
:root[data-theme="dark"] .login-card input {
  background: #07080b; color: #f4f6f8; border-color: rgba(255,255,255,0.1);
}
:root[data-theme="dark"] .login-kicker { color: var(--sky); }

@media (max-width: 1200px) {
  :root { --nav-width: 248px; }
  .dashboard-scroll { padding: 22px 20px 36px; }
}
@media (max-width: 980px) {
  html, body { overflow: auto; height: auto; min-height: 100%; }
  body { overflow-x: hidden; }
  .app-container { height: auto; min-height: 100vh; width: 100%; flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 88vw);
    transform: translateX(-102%); box-shadow: var(--shadow-3);
    transition: transform 220ms var(--ease); z-index: 60;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-toggle { display: inline-flex; }
  .main-content { width: 100%; min-height: 100vh; }
  .app-container:has(.sidebar.open) .main-content::before {
    content: ''; position: fixed; inset: 0; z-index: 55; background: var(--scrim);
  }
  .dashboard-scroll { padding: 16px 14px 40px; -webkit-overflow-scrolling: touch; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 118px; padding: 14px 16px; }
  .stat-value { font-size: 28px; }
  .filter-container { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-left { width: 100%; flex-direction: column; align-items: stretch; }
  .filter-group, .custom-select-wrapper, .flatpickr-custom, .custom-select { width: 100%; min-width: 0; }
  .floor-controls { width: 100%; }
  .zone-nav { gap: 6px; }
  .zone-tab { min-height: 36px; padding: 0 12px; }
  .staff-create { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .top-header {
    height: auto; min-height: var(--header-height);
    flex-wrap: wrap; padding: 10px 12px; gap: 10px;
  }
  .header-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; justify-content: flex-end; }
  .search-wrapper { order: 10; flex: 1 1 100%; }
  .search-input, .search-input:focus { width: 100% !important; }
  .page-title { min-width: 0; }
  .page-title h2 { font-size: 18px; }
  .page-title span { display: block; margin: 2px 0 0; padding: 0; border: 0; font-size: 11.5px; }
  .header-actions .btn span { display: none; }
  .header-actions .btn { width: 42px; padding: 0; min-width: 42px; }
  .header-actions .btn-primary { width: auto; min-width: 42px; padding: 0 12px; }
  .table-scroll-area { margin: 0 -2px; }
  .table-scroll-area thead { display: none; }
  .table-scroll-area tbody:not([style*="display: none"]) { display: block !important; }
  .table-scroll-area tbody tr {
    display: block; margin-bottom: 10px; padding: 6px 14px;
    background: var(--surface-1); border: 1px solid var(--line); border-radius: 14px;
  }
  .table-scroll-area tbody td {
    display: block; position: relative; min-height: 40px;
    padding: 10px 0 10px 42%; text-align: right; border-bottom: 1px solid var(--line-row);
    word-break: break-word;
  }
  .table-scroll-area tbody td:last-child { border-bottom: none; }
  .table-scroll-area tbody td::before {
    content: attr(data-label); position: absolute; left: 0; top: 10px; width: 38%;
    text-align: left; font-size: 10px; font-weight: 750; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--ink-3);
  }
  .table-toolbar {
    flex-direction: row; flex-wrap: wrap; align-items: center;
    justify-content: space-between; padding: 12px 14px; gap: 10px;
  }
  .pagination-inline { width: auto; margin-left: auto; }
  .pagination-bar { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card, .modal-card.wide {
    max-width: none; width: 100%; max-height: 92vh;
    border-radius: 22px 22px 0 0;
    transform: translate3d(0, 110%, 0);
    filter: none;
    transform-origin: bottom center;
  }
  .modal-overlay.open .modal-card,
  .modal-overlay.open .modal-card.wide {
    transform: translate3d(0, 0, 0);
    box-shadow: 0 -18px 60px rgba(12, 10, 6, 0.22);
  }
  .modal-overlay.closing .modal-card,
  .modal-overlay.closing .modal-card.wide {
    transform: translate3d(0, 110%, 0);
    opacity: 0.96;
    filter: none;
  }
  .modal-body { padding: 16px; }
  .modal-header { padding: 14px 16px; }
  .status-update-panel .custom-select-wrapper { width: 100%; }
  .detail-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .detail-val { text-align: left; }
  .login-shell { width: min(440px, 100%); padding: 0; }
  .login-title { font-size: 26px; }
  .login-logo { width: min(180px, 58vw); }
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .table-scroll-area tbody:not([style*="display: none"]) {
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 11px;
  }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 104px; }
  .floor-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
  .brand-name { font-size: 14px; }
  .nav-item { min-height: 44px; }
  .btn, .theme-toggle, .mobile-toggle { min-height: 42px; }
  .zone-tab { font-size: 12px; }
}
@media (max-width: 480px) {
  .dashboard-scroll { padding: 12px 10px 32px; }
  .table-scroll-area tbody td { padding-left: 46%; }
  .table-scroll-area tbody td::before { width: 42%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
