* {
  box-sizing: border-box;
}

:root {
  --bg: #050814;
  --panel: rgba(13, 22, 36, 0.94);
  --border: rgba(45, 212, 191, 0.24);
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --text: #f8fafc;
  --muted: #9ca3af;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 191, 0.14), transparent 30%),
    radial-gradient(circle at 88% 40%, rgba(56, 189, 248, 0.13), transparent 34%),
    linear-gradient(135deg, #020617, #07111f, #030712);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 80%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.055;
  background-image: url("/Frame 1.png?v=20260703-brand");
  background-repeat: no-repeat;
  background-position: 62% 52%;
  background-size: min(52vw, 620px);
  filter: grayscale(0.15) drop-shadow(0 0 55px rgba(56, 189, 248, 0.2));
}

.app-shell {
  min-height: 100vh;
  display: flex;
  position: relative;
  z-index: auto;
}

.mobile-menu-btn,
.mobile-sidebar-backdrop {
  display: none;
}

.sidebar {
  width: 280px;
  min-height: 100vh;
  padding: 22px;
  background: rgba(2, 6, 23, 0.94);
  border-right: 1px solid rgba(45, 212, 191, 0.2);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 38px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(0, 213, 255, 0.08);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6px;
}

.logo-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex: 0 0 70px;
}

.brand-mark .logo-img {
  width: 100%;
  height: 100%;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav-btn,
.logout-btn {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  color: white;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.nav-btn.active,
.nav-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111827;
  border: none;
}

.nav-group {
  margin-bottom: 8px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  overflow: hidden;
}

.nav-group[open] {
  border-color: rgba(45, 212, 191, 0.34);
}

.nav-group:has(.nav-btn.active) {
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  list-style: none;
}

.nav-group-toggle::-webkit-details-marker {
  display: none;
}

.nav-group-caret {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
  transition: transform 160ms ease;
}

.nav-group[open] .nav-group-caret {
  transform: rotate(180deg);
}

.nav-submenu {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px 18px;
}

.nav-sub-btn {
  position: relative;
  margin-bottom: 0;
  padding-left: 24px;
  border-radius: 12px;
  font-size: 13px;
  background: rgba(2, 6, 23, 0.52);
}

.nav-sub-btn::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
  opacity: 0.85;
}

.logout-btn {
  margin-top: 20px;
  background: rgba(127, 29, 29, 0.6);
}

.main {
  flex: 1;
  padding: 30px;
  overflow-x: hidden;
  min-width: 0;
}

.topbar,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.topbar h2,
.section-head h2 {
  margin: 0;
}

.live-pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--success);
  color: var(--success);
  background: rgba(34, 197, 94, 0.08);
}

.staff-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.staff-task-alert {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 8px 13px 8px 9px;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 999px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(56, 189, 248, 0.08)),
    rgba(2, 6, 23, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 34px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  text-align: left;
}

.staff-task-alert:hover {
  border-color: rgba(45, 212, 191, 0.58);
  transform: translateY(-1px);
}

.staff-task-alert-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #05111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 1000;
}

.staff-task-alert span:last-child {
  display: grid;
  gap: 2px;
}

.staff-task-alert strong {
  color: #ecfeff;
  font-size: 13px;
}

.staff-task-alert small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.staff-task-alert.has-overdue {
  border-color: rgba(248, 113, 113, 0.55);
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.16), rgba(45, 212, 191, 0.08)),
    rgba(2, 6, 23, 0.68);
}

.staff-task-alert.has-overdue .staff-task-alert-icon {
  color: #fff7ed;
  background: linear-gradient(135deg, #ef4444, #fb7185);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.quick-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  padding: 10px 15px;
  font-weight: 800;
  cursor: pointer;
}

.quick-pill:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07111f;
}

.home-command-hero,
.staff-mission-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 20%, rgba(45, 212, 191, 0.22), transparent 32%),
    radial-gradient(circle at 86% 8%, rgba(56, 189, 248, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(2, 8, 23, 0.94), rgba(8, 47, 73, 0.52));
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-command-hero::before,
.staff-mission-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
}

.home-command-copy,
.home-command-orb,
.staff-mission-copy,
.staff-mission-scan {
  position: relative;
  z-index: 1;
}

.home-command-copy h1,
.staff-mission-copy h1 {
  margin: 6px 0 8px;
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.home-command-copy p,
.staff-mission-copy p {
  margin: 0;
  max-width: 760px;
  color: #b6d5e8;
  font-weight: 800;
  line-height: 1.45;
}

.home-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-command-orb {
  width: 190px;
  min-height: 190px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.18), rgba(2, 6, 23, 0.62) 62%);
  border: 1px solid rgba(103, 232, 249, 0.24);
}

.home-command-orb img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.35));
}

.home-command-orb span {
  color: #67e8f9;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-ring {
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  border: 1px dashed rgba(125, 211, 252, 0.34);
  animation: commandSpin 18s linear infinite;
}

@keyframes commandSpin {
  to { transform: rotate(360deg); }
}

.command-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
}

.command-pill span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 9px;
  color: #06111f;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
  font-size: 11px;
  font-weight: 1000;
}

.command-status-grid .command-status-card,
.command-chart-card {
  border-color: rgba(45, 212, 191, 0.24);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.34)),
    rgba(2, 6, 23, 0.8);
}

.command-status-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.command-insight-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.command-insight-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 16px;
  text-align: left;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 18px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.36)),
    rgba(2, 6, 23, 0.78);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.command-insight-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -54px;
  top: -54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.22), transparent 64%);
}

.command-insight-card:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 212, 191, 0.58);
}

.command-insight-card span,
.command-insight-card small {
  color: var(--muted);
  font-weight: 900;
}

.command-insight-card span {
  color: #67e8f9;
  font-size: 12px;
  text-transform: uppercase;
}

.command-insight-card strong {
  color: #f8fafc;
  font-size: 23px;
  overflow-wrap: anywhere;
}

.command-insight-card.danger-signal {
  border-color: rgba(251, 113, 133, 0.24);
  background:
    radial-gradient(circle at 90% 0%, rgba(251, 113, 133, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.36));
}

.pipeline-card p {
  color: #c7d2fe;
  font-size: 0;
}

.pipeline-card p::after {
  content: "RFQ to Approval to Invoice to Payment";
  font-size: 15px;
  font-weight: 900;
}

.staff-mission-hero {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
}

.staff-mission-copy span {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
  font-size: 12px;
  font-weight: 1000;
}

.staff-mission-scan {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 22px;
  color: #06111f;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
  box-shadow: 0 18px 44px rgba(45, 212, 191, 0.16);
  cursor: pointer;
}

.staff-mission-scan span {
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.staff-mission-scan strong {
  font-size: 25px;
}

.staff-mission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.staff-mission-tile {
  min-width: 0;
  min-height: 132px;
  display: grid;
  gap: 8px;
  padding: 18px;
  text-align: left;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 18px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.16), transparent 34%),
    rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.staff-mission-tile:hover {
  border-color: rgba(45, 212, 191, 0.58);
  transform: translateY(-1px);
}

.staff-mission-tile span,
.staff-mission-tile small {
  color: var(--muted);
  font-weight: 900;
}

.staff-mission-tile strong {
  color: #ecfeff;
  font-size: 28px;
  overflow-wrap: anywhere;
}

.staff-mission-tile.danger-tile {
  background:
    radial-gradient(circle at 18% 12%, rgba(248, 113, 113, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.82);
  border-color: rgba(248, 113, 113, 0.24);
}

.staff-shift-console {
  background:
    radial-gradient(circle at 12% 20%, rgba(45, 212, 191, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.42));
}

.cell-subtext {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.time-pair {
  display: grid;
  gap: 6px;
}

.time-pair span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 9px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.42);
  font-size: 12px;
  font-weight: 800;
}

.table-action-stack {
  display: grid;
  gap: 8px;
  min-width: 86px;
}

.staff-action-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.staff-action-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.34));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 42px rgba(0, 0, 0, 0.18);
}

.staff-action-card:hover {
  border-color: rgba(45, 212, 191, 0.58);
  transform: translateY(-1px);
}

.staff-action-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-action-card strong {
  font-size: 20px;
}

.staff-action-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.staff-home-metrics {
  grid-template-columns: minmax(260px, 420px);
}

.staff-sidebar-profile {
  display: none;
}

.staff-profile-shell {
  display: grid;
  gap: 18px;
  max-width: 860px;
}

.staff-profile-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 18px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 18px;
  background: radial-gradient(circle at center, rgba(45, 212, 191, 0.16), transparent 56%), rgba(2, 6, 23, 0.72);
}

.staff-avatar {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(45, 212, 191, 0.42);
  border-radius: 50%;
  color: #ecfeff;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.95), rgba(56, 189, 248, 0.88));
  box-shadow: 0 0 44px rgba(45, 212, 191, 0.24);
  font-size: 42px;
  font-weight: 900;
}

.staff-avatar.small {
  width: 74px;
  height: 74px;
  font-size: 26px;
}

.staff-profile-hero h2 {
  margin: 0;
  font-size: 30px;
}

.staff-role-pill {
  padding: 8px 18px;
  border: 1px solid rgba(45, 212, 191, 0.32);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
  font-weight: 900;
}

.profile-block h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.profile-list {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.58);
}

.profile-row,
.profile-action {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.profile-row:last-child,
.profile-action:last-child {
  border-bottom: 0;
}

.profile-row span,
.profile-action span {
  color: var(--muted);
  font-weight: 800;
}

.profile-row strong,
.profile-action strong {
  overflow-wrap: anywhere;
}

.profile-action {
  cursor: pointer;
}

.profile-action:hover {
  background: rgba(45, 212, 191, 0.08);
}

.profile-action strong::after {
  content: ">";
  float: right;
  color: var(--accent);
}

.danger-link span,
.danger-link strong {
  color: #fca5a5;
}

.dashboard-kpis .card {
  min-height: 132px;
}

.dashboard-kpis p {
  margin: 14px 0 6px;
  font-size: 24px;
}

.dashboard-kpis span,
.rank-list span {
  color: var(--muted);
  font-size: 12px;
}

.kpi-teal {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(15, 23, 42, 0.94));
}

.kpi-blue {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.94));
}

.kpi-green {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.94));
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.42);
}

.invoice-item-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(120px, 0.6fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.invoice-item-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.invoice-item-row input {
  margin-bottom: 0;
}

.invoice-remove-btn {
  margin-top: 24px;
}

.manual-invoice-dialog {
  width: min(1160px, calc(100vw - 32px));
}

.manual-invoice-dialog .stock-dialog-grid {
  grid-template-columns: minmax(290px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
}

.manual-invoice-dialog .dialog-card {
  min-width: 0;
}

.manual-invoice-dialog .invoice-item-row {
  grid-template-columns: minmax(260px, 1fr) minmax(92px, 0.35fr) minmax(132px, 0.45fr) 96px;
  align-items: end;
}

.manual-invoice-dialog .invoice-remove-btn {
  width: 100%;
  min-height: 42px;
  margin-top: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.gst-control-panel {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.12), transparent 54%),
    rgba(2, 6, 23, 0.42);
}

.gst-control-panel.gst-off {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.54);
}

.gst-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gst-control-head div {
  display: grid;
  gap: 4px;
}

.gst-control-head strong {
  color: #ecfeff;
  font-size: 14px;
}

.gst-control-head span,
.gst-rate-field span,
.manual-invoice-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.gst-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.gst-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gst-toggle-track {
  position: relative;
  width: 46px;
  height: 24px;
  border: 1px solid rgba(45, 212, 191, 0.42);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: inset 0 0 18px rgba(45, 212, 191, 0.14);
}

.gst-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #94a3b8;
  transition: transform 0.18s ease, background 0.18s ease;
}

.gst-toggle input:checked + .gst-toggle-track::after {
  transform: translateX(22px);
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
}

.gst-toggle b {
  color: #dffcff;
  font-size: 12px;
}

.gst-rate-field {
  display: grid;
  gap: 7px;
}

.gst-rate-field input:disabled {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
}

.manual-invoice-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.manual-invoice-summary div {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
}

.manual-invoice-summary strong {
  color: #ecfeff;
  font-size: 18px;
}

.manual-invoice-summary .manual-invoice-total {
  border-color: rgba(45, 212, 191, 0.42);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(56, 189, 248, 0.12));
}

.expense-dialog-panel {
  width: min(1120px, calc(100vw - 32px));
}

.expense-dialog-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
}

.expense-dialog-shell .dialog-card {
  min-width: 0;
}

.expense-money-card {
  position: relative;
  overflow: hidden;
}

.expense-money-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 12%, rgba(45, 212, 191, 0.16), transparent 32%),
    linear-gradient(135deg, transparent, rgba(56, 189, 248, 0.08));
}

.expense-money-card > * {
  position: relative;
  z-index: 1;
}

.expense-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.expense-card-head h4 {
  margin-bottom: 4px;
}

.expense-card-head p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.expense-status-chip {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(45, 212, 191, 0.32);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(45, 212, 191, 0.1);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.04em;
}

.expense-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.expense-summary-strip div {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.48);
}

.expense-summary-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
}

.expense-summary-strip strong {
  color: #ecfeff;
  font-size: 17px;
}

.expense-upload-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.12), transparent),
    rgba(2, 6, 23, 0.5);
}

.expense-upload-note strong {
  color: #ecfeff;
  white-space: nowrap;
}

.expense-upload-note span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.customer-suggestion-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  margin: 10px 0 12px;
  overflow-y: auto;
}

.customer-suggestion-btn,
.selected-customer-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 12px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.46);
  text-align: left;
}

.customer-suggestion-btn {
  cursor: pointer;
}

.customer-suggestion-btn:hover {
  border-color: rgba(45, 212, 191, 0.58);
  background: rgba(45, 212, 191, 0.1);
}

.customer-suggestion-btn strong {
  color: #ecfeff;
  font-size: 14px;
}

.customer-suggestion-btn span,
.customer-suggestion-btn small,
.selected-customer-card span,
.selected-customer-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.selected-customer-card {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.08);
}

.customer-search-empty {
  padding: 12px;
  border: 1px dashed rgba(45, 212, 191, 0.22);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.32);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(45, 212, 191, 0.16);
  color: var(--accent);
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.82);
  color: white;
  outline: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
  grid-column: 1 / -1;
}

.primary-btn,
.small-btn,
.secondary-btn,
.danger-btn {
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
  border: none;
}

.primary-btn,
.small-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111827;
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: white;
}

.danger-btn {
  background: var(--danger);
  color: white;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
  color: #e2e8f0;
}

th {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 13px;
}

.hidden-section {
  display: none !important;
}

.page-section {
  display: block;
  min-width: 0;
}

.mobile-card {
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.6);
}

.card-list {
  display: grid;
  gap: 16px;
}

.roster-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.roster-generator-card {
  display: grid;
  gap: 18px;
}

.roster-generator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}

.roster-generator-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.roster-generator-grid select[multiple] {
  min-height: 96px;
}

.roster-generate-btn {
  min-height: 48px;
}

.roster-shift-card {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.34)),
    rgba(2, 6, 23, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.roster-date-block {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.12);
}

.roster-date-block strong {
  font-size: 18px;
  line-height: 1.15;
}

.roster-date-block span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #bff7ff;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.roster-shift-main {
  min-width: 0;
}

.roster-shift-main h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.roster-shift-main p,
.roster-shift-main small {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 800;
}

.roster-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #dffbff;
  background: rgba(2, 6, 23, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.16);
  line-height: 1.35;
}

.compact-head {
  margin-bottom: 14px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  background: rgba(0, 213, 255, 0.15);
  color: var(--accent);
  border: 1px solid var(--border);
}

.active-badge {
  background: rgba(0, 213, 255, 0.2);
  color: var(--accent);
}

.danger-badge {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.35);
}

.success-badge {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.35);
}

.money-positive {
  color: var(--success);
  font-weight: 900;
}

.money-danger {
  color: #f87171;
  font-weight: 900;
}

.empty-state,
.status-note {
  color: var(--muted);
  font-weight: 800;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: black;
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  display: none;
  z-index: 9999;
}

.app-notification-banner {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 13000;
  width: min(520px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(45, 212, 191, 0.36);
  border-radius: 18px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 212, 191, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(2, 8, 20, 0.96), rgba(8, 47, 73, 0.92));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-notification-banner.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.app-notification-banner.success {
  border-color: rgba(34, 197, 94, 0.42);
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 197, 94, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(2, 8, 20, 0.96), rgba(6, 78, 59, 0.9));
}

.app-notification-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #03111d;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.24);
}

.app-notification-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.app-notification-copy strong,
.app-notification-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-notification-copy strong {
  color: #e0f2fe;
  font-size: 14px;
  font-weight: 1000;
  white-space: nowrap;
}

.app-notification-copy span {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.global-qr-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(45, 212, 191, 0.45);
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
  color: #020617;
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.28);
  font-weight: 1000;
  cursor: pointer;
}

.global-qr-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(12px);
}

.global-qr-backdrop.active {
  display: grid;
}

.global-qr-panel {
  width: min(430px, 100%);
  position: relative;
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 22px;
  padding: 22px;
  background: #0f172a;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.global-qr-panel h3 {
  margin: 0 0 8px;
}

.global-qr-panel p {
  color: var(--muted);
}

.global-qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  background: rgba(2, 6, 23, 0.8);
  color: #f8fafc;
  cursor: pointer;
}

.branded-qr-frame {
  position: relative;
  width: min(280px, 78vw);
  aspect-ratio: 1;
  margin: 18px auto;
  border-radius: 20px;
  padding: 16px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d7dee8;
}

.branded-qr-frame > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.branded-qr-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #07111f;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.16);
  overflow: hidden;
}

.branded-qr-logo img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.global-qr-url {
  word-break: break-word;
  font-size: 12px;
}

.qr-brand-strip {
  width: min(260px, 100%);
  margin: -6px auto 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  background: rgba(7, 17, 31, 0.76);
  color: #b8d7e8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.qr-brand-strip img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.settings-qr-frame {
  width: 150px;
  margin: 0;
}

.settings-qr-frame .branded-qr-logo {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border-width: 2px;
}

.settings-qr-frame .branded-qr-logo img {
  width: 20px;
  height: 20px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.chart-grid .card {
  min-height: 410px;
  overflow: hidden;
}

.command-chart-card {
  position: relative;
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.13), transparent 34%),
    radial-gradient(circle at 12% 100%, rgba(45, 212, 191, 0.11), transparent 36%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(8, 18, 32, 0.9));
  border-color: rgba(45, 212, 191, 0.28);
  box-shadow:
    0 18px 60px rgba(6, 182, 212, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.command-chart-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.8;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent);
}

.command-chart-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.48), transparent);
  pointer-events: none;
}

.chart-grid canvas {
  width: 100% !important;
  height: 320px !important;
  max-height: 320px !important;
  position: relative;
  z-index: 1;
}

.expense-chart-grid .card {
  min-height: 360px;
}

.finance-chart-card {
  min-height: 360px;
}

.supplier-intelligence-card {
  margin-top: 22px;
  min-height: 0;
  overflow: hidden;
  position: relative;
  border-color: rgba(45, 212, 191, 0.34);
  background:
    radial-gradient(circle at 16% 18%, rgba(45, 212, 191, 0.18), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(56, 189, 248, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(2, 12, 27, 0.96), rgba(9, 27, 46, 0.92));
  box-shadow: 0 22px 70px rgba(6, 182, 212, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.supplier-intelligence-card .secondary-btn {
  white-space: nowrap;
}

.supplier-intelligence-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent);
}

.supplier-intelligence-head,
.supplier-intelligence-grid,
.supplier-exposure-strip {
  position: relative;
  z-index: 1;
}

.supplier-intelligence-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.supplier-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.supplier-head-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(45, 212, 191, 0.22);
  font-size: 12px;
  font-weight: 900;
}

.supplier-intelligence-head h3 {
  margin: 4px 0 6px;
  font-size: 26px;
}

.supplier-intelligence-head p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.45;
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.95);
}

.supplier-intelligence-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(320px, 1.12fr) minmax(280px, 1fr);
  gap: 18px;
}

.supplier-orbit-card,
.supplier-flow-card,
.supplier-queue-card {
  min-width: 0;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 18px;
  padding: 18px;
  background: rgba(2, 8, 23, 0.56);
  box-shadow: inset 0 0 30px rgba(45, 212, 191, 0.035);
}

.supplier-orbit-canvas {
  height: 232px;
  position: relative;
  display: grid;
  place-items: center;
}

.supplier-orbit-canvas canvas {
  width: 100% !important;
  height: 226px !important;
}

.supplier-orbit-core {
  position: absolute;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.98), rgba(8, 18, 32, 0.82));
  border: 1px solid rgba(103, 232, 249, 0.28);
  box-shadow: 0 0 34px rgba(56, 189, 248, 0.12);
}

.supplier-orbit-core span,
.supplier-orbit-core small,
.supplier-orbit-stats span,
.supplier-flow-label span,
.supplier-flow-money span,
.supplier-upcoming-item span,
.supplier-exposure-card span,
.supplier-exposure-card small,
.mini-head span {
  color: var(--muted);
}

.supplier-orbit-core strong {
  margin: 7px 0 4px;
  color: #e0f2fe;
  font-size: 18px;
}

.supplier-orbit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.supplier-orbit-stats div {
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.14);
}

.supplier-orbit-stats strong {
  display: block;
  margin-top: 6px;
  color: #f8fafc;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.mini-head {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.mini-head h3,
.mini-head h4 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
  letter-spacing: 0;
}

.mini-head span {
  padding: 6px 10px;
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.supplier-flow-list,
.supplier-upcoming-list {
  display: grid;
  gap: 12px;
}

.supplier-flow-row {
  display: grid;
  grid-template-columns: minmax(104px, 0.78fr) minmax(120px, 1fr) minmax(100px, 0.66fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.54);
}

.supplier-flow-label strong,
.supplier-flow-label span,
.supplier-flow-money span,
.supplier-flow-money strong {
  display: block;
}

.supplier-flow-label span,
.supplier-flow-money span {
  margin-top: 4px;
  font-size: 12px;
}

.supplier-flow-money {
  text-align: right;
}

.supplier-flow-money strong {
  margin-top: 4px;
  color: #67e8f9;
}

.supplier-flow-track {
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(45, 212, 191, 0.18);
}

.supplier-flow-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2dd4bf, #38bdf8);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.28);
  position: relative;
}

.supplier-flow-fill i {
  position: absolute;
  inset: 0 0 0 auto;
  display: block;
  background: linear-gradient(90deg, #f59e0b, #fb7185);
}

.supplier-upcoming-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(8, 47, 73, 0.36));
}

.supplier-payment-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #06111f !important;
  font-weight: 900;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
}

.supplier-upcoming-item strong,
.supplier-upcoming-item span {
  display: block;
}

.supplier-upcoming-item > div:last-child {
  text-align: right;
}

.supplier-upcoming-item > div:last-child strong {
  color: #e0f2fe;
}

.supplier-exposure-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.supplier-exposure-card {
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  background: rgba(2, 8, 23, 0.62);
}

.supplier-exposure-card strong,
.supplier-exposure-card small {
  display: block;
}

.supplier-exposure-card strong {
  margin: 7px 0 5px;
  color: #f8fafc;
  font-size: 18px;
}

.compact-empty {
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(45, 212, 191, 0.22);
  background: rgba(2, 8, 23, 0.48);
}

.compact-head {
  margin-bottom: 12px;
  align-items: center;
}

.compact-head h3 {
  margin: 0 0 4px;
}

.compact-head p {
  margin: 0;
}

.register-control-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(56, 189, 248, 0.06)),
    rgba(2, 8, 23, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.register-control-panel strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0;
}

.register-control-panel span {
  color: var(--muted);
  font-size: 12px;
}

.register-control-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.register-control-actions label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.register-control-actions select {
  width: auto;
  min-width: 86px;
  height: 38px;
  padding: 0 12px;
}

.register-control-actions button {
  min-height: 38px;
}

.login-page {
  display: grid;
  place-items: center;
  height: 100vh;
}

.login-shell {
  width: 100%;
  display: grid;
  place-items: center;
}

.login-card {
  width: 420px;
  max-width: 92vw;
  padding: 32px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  text-align: center;
}

.login-logo-box {
  width: 176px;
  height: 176px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.login-logo {
  width: 176px !important;
  max-width: 176px !important;
  height: auto !important;
  max-height: 176px !important;
  object-fit: contain !important;
}

.login-card label {
  display: block;
  text-align: left;
  margin: 10px 0 6px;
  font-weight: 800;
  font-size: 13px;
}

.login-card input {
  margin-bottom: 12px;
}

.register-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.register-privacy input {
  width: auto;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.login-btn {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: black;
  font-weight: 900;
  cursor: pointer;
}

.status {
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 12px;
}

tr:hover td {
  background: rgba(45, 212, 191, 0.04);
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.success-text {
  color: #86efac;
  font-size: 12px;
}

.stock-toolbar {
  max-width: 280px;
  margin-bottom: 20px;
}

.stock-table-card {
  border-color: rgba(45, 212, 191, 0.24);
}

.stock-table-card td,
.stock-table-card th {
  vertical-align: top;
}

.icon-btn {
  min-width: 62px;
  border: 0;
  border-radius: 9px;
  padding: 8px 10px;
  margin: 2px;
  cursor: pointer;
  color: #111827;
  font-weight: 900;
  background: #7dd3fc;
}

.danger-icon {
  background: #ef4444;
  color: #ffffff;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.expense-file-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
}

.expense-file-row {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.42);
}

.file-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.file-badge-btn {
  border: 1px solid rgba(45, 212, 191, 0.32);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.file-badge-btn:hover {
  border-color: rgba(45, 212, 191, 0.62);
  background: rgba(45, 212, 191, 0.18);
}

.file-row a {
  color: var(--accent);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.file-row small {
  display: block;
}

.mini-danger {
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.access-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.45);
}

.access-check input {
  width: auto;
}

.stock-dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.single-dialog-grid {
  grid-template-columns: 1fr;
}

.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.payment-summary-card {
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(45, 212, 191, 0.12), rgba(14, 165, 233, 0.08)),
    rgba(2, 6, 23, 0.62);
}

.payment-summary-card span,
.field-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 7px;
}

.payment-summary-card strong {
  display: block;
  font-size: clamp(20px, 2.2vw, 28px);
}

.payment-dialog-grid {
  grid-template-columns: minmax(300px, 0.75fr) minmax(460px, 1.25fr);
}

.mini-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 12px;
}

.mini-table-wrap table {
  min-width: 680px;
}

.statement-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 14px 0;
}

.statement-results {
  display: grid;
  gap: 12px;
}

.statement-result-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(45, 212, 191, 0.1), rgba(14, 165, 233, 0.06)),
    rgba(2, 6, 23, 0.62);
}

.statement-result-card strong,
.statement-result-card span {
  display: block;
}

.statement-result-card > div:first-child span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.statement-result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.statement-result-metrics span {
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 10px;
  padding: 9px;
  background: rgba(15, 23, 42, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.dialog-card {
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.dialog-card h4 {
  margin: 0 0 12px;
}

.dialog-card input,
.dialog-card select,
.dialog-card textarea {
  margin-bottom: 12px;
}

.dialog-card textarea {
  min-height: 96px;
  resize: vertical;
}

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.form-field span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
}

.form-field input,
.form-field select,
.form-field textarea,
.dialog-card .form-field input {
  margin-bottom: 0;
}

.labelled-grid {
  align-items: end;
  margin-bottom: 12px;
}

.material-live-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.material-live-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.48);
}

.material-live-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.material-live-summary strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.danger-text {
  color: var(--warning) !important;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.portal-links,
.public-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.portal-links a,
.secondary-link,
.privacy-check a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.portal-links a:hover,
.secondary-link:hover,
.privacy-check a:hover {
  text-decoration: underline;
}

.public-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 44px 0;
}

.public-hero {
  min-height: 34vh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  padding: 22px 0 28px;
}

.public-logo {
  width: 196px;
  max-width: 100%;
  height: auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
}

.public-hero p:not(.eyebrow) {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 16px;
}

.public-card h2 {
  margin-top: 0;
}

.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 4px;
  color: #cbd5e1;
  font-weight: 800;
}

.privacy-check input {
  width: auto;
  margin-top: 2px;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.72);
  z-index: 13000;
}

.dialog-backdrop.active {
  display: grid;
}

.dialog-panel {
  width: min(560px, 100%);
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.45);
}

body.staff-dialog-open .mobile-menu-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.92);
}

.dialog-panel.wide-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
}

.dialog-panel.material-dialog {
  width: min(1320px, calc(100vw - 32px));
}

.dialog-panel.supplier-dialog {
  width: min(980px, calc(100vw - 32px));
}

.dialog-panel.supplier-dialog .stock-dialog-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.dialog-panel.supplier-dialog .dialog-card {
  padding: 20px;
}

.dialog-panel.supplier-dialog input,
.dialog-panel.supplier-dialog select,
.dialog-panel.supplier-dialog textarea {
  min-height: 46px;
}

.dialog-panel.supplier-dialog textarea {
  min-height: 120px;
}

.dialog-panel.compliance-dialog {
  width: min(1180px, calc(100vw - 32px));
}

.compliance-dialog-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.full-span {
  grid-column: 1 / -1;
}

.dialog-panel h3 {
  margin: 0 0 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}

.system-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.system-action {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.54);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.compact-head {
  margin-bottom: 12px;
}

.compliance-register {
  display: grid;
  gap: 18px;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compliance-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.42);
}

.compliance-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.compliance-card h4 {
  margin: 0 0 4px;
}

.compliance-card p {
  margin: 0;
}

.status-chip {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.28);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.compliance-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.warning-strip {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fde68a;
  font-size: 12px;
  font-weight: 900;
}

.compliance-files {
  display: grid;
  gap: 4px;
}

.inline-actions {
  justify-content: flex-start;
  margin-top: 4px;
}

.forms-library {
  display: grid;
  gap: 18px;
}

.form-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.form-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.42);
}

.form-card.chart-form-card {
  border-color: rgba(56, 189, 248, 0.32);
  background:
    linear-gradient(145deg, rgba(8, 47, 73, 0.58), rgba(2, 6, 23, 0.64)),
    linear-gradient(135deg, rgba(45, 212, 191, 0.1), transparent);
}

.form-visual {
  position: relative;
  display: grid;
  min-height: 126px;
  margin-bottom: 2px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(45, 212, 191, 0.08)),
    rgba(2, 6, 23, 0.5);
}

.form-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.46;
}

.form-visual::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -32px;
  width: 104px;
  height: 104px;
  border: 16px solid rgba(45, 212, 191, 0.16);
  border-radius: 50%;
}

.form-visual-screen {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 8px;
  width: min(156px, 72%);
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.form-visual-screen span {
  display: block;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.26);
}

.form-visual-screen span:nth-child(1) {
  height: 44%;
}

.form-visual-screen span:nth-child(2) {
  height: 78%;
}

.form-visual-screen span:nth-child(3) {
  height: 58%;
}

.form-visual-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(2, 6, 23, 0.64);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-visual-hygiene .form-visual-screen,
.form-visual-ppe .form-visual-screen,
.form-visual-machinery-chart .form-visual-screen,
.form-visual-hazard-chart .form-visual-screen {
  width: min(180px, 78%);
}

.form-visual-hygiene .form-visual-screen span {
  border-radius: 8px;
}

.form-visual-hygiene .form-visual-screen span:nth-child(1),
.form-visual-hygiene .form-visual-screen span:nth-child(3) {
  height: 54%;
  background: linear-gradient(180deg, #67e8f9, #22c55e);
}

.form-visual-ppe .form-visual-screen {
  grid-template-columns: 1fr 1fr;
}

.form-visual-ppe .form-visual-screen span {
  height: 54px;
  border-radius: 50% 50% 14px 14px;
  background: linear-gradient(180deg, #facc15, #2dd4bf);
}

.form-visual-ppe .form-visual-screen span:nth-child(3) {
  grid-column: 1 / -1;
  height: 18px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.82);
}

.form-visual-machinery-chart .form-visual-screen {
  grid-template-columns: repeat(4, 1fr);
}

.form-visual-machinery-chart .form-visual-screen span {
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(180deg, #94a3b8, #38bdf8);
}

.form-visual-machinery-chart .form-visual-screen span:nth-child(2) {
  height: 66px;
}

.form-visual-hazard-chart {
  border-color: rgba(245, 158, 11, 0.36);
}

.form-visual-hazard-chart .form-visual-screen {
  grid-template-columns: 1fr;
  place-items: center;
}

.form-visual-hazard-chart .form-visual-screen span {
  width: 62px;
  height: 62px;
  clip-path: polygon(50% 0, 100% 90%, 0 90%);
  border-radius: 0;
  background: linear-gradient(180deg, #facc15, #ef4444);
}

.form-visual-hazard-chart .form-visual-screen span:nth-child(2),
.form-visual-hazard-chart .form-visual-screen span:nth-child(3) {
  display: none;
}

.form-visual-safety .form-visual-screen span,
.form-visual-incident .form-visual-screen span,
.form-visual-risk .form-visual-screen span,
.form-visual-visitor .form-visual-screen span {
  background: linear-gradient(180deg, #facc15, #22c55e);
}

.form-visual-dispatch .form-visual-screen span,
.form-visual-client .form-visual-screen span,
.form-visual-contract .form-visual-screen span,
.form-visual-staff .form-visual-screen span {
  border-radius: 7px;
  background: linear-gradient(180deg, #38bdf8, #2dd4bf);
}

.form-card h4 {
  margin: 0;
}

.form-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.competitor-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.competitor-card {
  align-content: stretch;
  min-height: 0;
  gap: 14px;
}

.competitor-card-head {
  display: grid;
  gap: 10px;
}

.competitor-card h4 {
  margin: 0;
  color: #ecfeff;
  font-size: 18px;
  line-height: 1.25;
}

.competitor-info-grid {
  display: grid;
  gap: 8px;
}

.competitor-info-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(45, 212, 191, 0.12);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.34);
}

.competitor-info-row span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
}

.competitor-info-row strong {
  min-width: 0;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.competitor-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
  align-self: end;
  margin-top: 4px;
}

.competitor-actions button {
  width: 100%;
  min-height: 38px;
  margin: 0;
}

.system-action strong {
  display: block;
  color: var(--accent);
  margin-bottom: 6px;
}

.qr-tool-card {
  border-color: rgba(56, 189, 248, 0.3);
}

.qr-preview-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.48);
}

.qr-preview-panel img {
  width: 180px;
  height: 180px;
  padding: 10px;
  border-radius: 14px;
  background: #ffffff;
}

.qr-preview-panel strong {
  display: block;
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 8px;
}

.qr-preview-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.system-action span {
  color: var(--muted);
  font-size: 12px;
}

.shift-modal .dialog-panel {
  width: min(520px, 100%);
  text-align: center;
}

.shift-quote {
  font-size: 18px;
  line-height: 1.45;
  color: #e0f2fe;
}

.shift-subtext {
  color: var(--muted);
  font-weight: 800;
}

.timesheet-group-list {
  display: grid;
  gap: 16px;
}

.timesheet-group {
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
  overflow: hidden;
}

.timesheet-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.7);
}

.timesheet-group-head h3 {
  margin: 0;
  font-size: 16px;
}

.timesheet-group-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timesheet-total {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
    background:
      linear-gradient(180deg, rgba(8, 18, 33, 0.96), rgba(2, 6, 23, 1)),
      radial-gradient(circle at 30% 0%, rgba(45, 212, 191, 0.16), transparent 38%);
  }

  .app-shell {
    display: block;
    width: 100%;
    max-width: 100vw;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .mobile-menu-btn {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 10001;
    display: grid;
    gap: 5px;
    width: 46px;
    height: 44px;
    padding: 10px;
    border: 1px solid rgba(45, 212, 191, 0.38);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
  }

  .mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(5px);
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 9999;
    width: min(82vw, 340px);
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 18px calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-104%);
    transition: transform 180ms ease;
    border-right: 1px solid rgba(45, 212, 191, 0.32);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.45);
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    margin-bottom: 24px;
  }

  .staff-portal .brand {
    display: none;
  }

  .staff-sidebar-profile {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 0 -18px 22px;
    padding: 20px 18px 22px;
    border-bottom: 1px solid rgba(45, 212, 191, 0.22);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(45, 212, 191, 0.12));
  }

  .staff-sidebar-profile strong,
  .staff-sidebar-profile span,
  .staff-sidebar-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .staff-sidebar-profile strong {
    font-size: 18px;
  }

  .staff-sidebar-profile span {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 800;
  }

  .staff-sidebar-profile small {
    width: fit-content;
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #06202a;
    background: var(--accent);
    font-weight: 900;
  }

  .main {
    width: 100%;
    max-width: 100vw;
    padding: calc(64px + env(safe-area-inset-top, 0px)) 12px 24px;
  }

  .staff-portal .main {
    padding: calc(64px + env(safe-area-inset-top, 0px)) 14px calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .metric-grid,
  .chart-grid,
  .command-insight-strip,
  .supplier-intelligence-grid,
  .form-grid,
  .settings-grid,
  .system-action-grid,
  .invoice-item-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  .topbar h2,
  .section-head h2 {
    font-size: 22px;
    line-height: 1.2;
  }

  .topbar p,
  .section-head p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.35;
  }

  .topbar {
    padding-right: 0;
    padding: 14px;
    border: 1px solid rgba(45, 212, 191, 0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.36));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  }

  .staff-portal .topbar {
    min-height: 118px;
    justify-content: flex-end;
    padding: 18px 16px;
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.94), rgba(6, 78, 59, 0.56));
  }

  .staff-portal .topbar h2 {
    font-size: 24px;
  }

  .staff-top-actions {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .staff-task-alert {
    flex: 1 1 240px;
    border-radius: 16px;
  }

  .staff-portal .topbar .live-pill {
    display: inline-flex;
    font-size: 12px;
    padding: 8px 11px;
  }

  .live-pill {
    align-self: flex-start;
  }

  .dashboard-action-row {
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    margin-left: -2px;
    margin-right: -2px;
    -webkit-overflow-scrolling: touch;
  }

  .quick-pill {
    flex: 0 0 auto;
    padding: 9px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .card {
    width: 100%;
    max-width: 100%;
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 18, 33, 0.86));
    border-color: rgba(45, 212, 191, 0.2);
  }

  .staff-action-hub {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .staff-action-card {
    min-height: 104px;
    border-radius: 18px;
    padding: 16px;
  }

  .roster-card-grid {
    grid-template-columns: 1fr;
  }

  .roster-generator-grid {
    grid-template-columns: 1fr;
  }

  .roster-shift-card {
    grid-template-columns: 1fr;
    border-radius: 18px;
    padding: 14px;
  }

  .roster-date-block {
    min-height: auto;
  }

  .manual-invoice-dialog .stock-dialog-grid,
  .manual-invoice-dialog .invoice-item-row,
  .expense-dialog-shell {
    grid-template-columns: 1fr;
  }

  .manual-invoice-summary {
    grid-template-columns: 1fr;
  }

  .expense-summary-strip {
    grid-template-columns: 1fr;
  }

  .expense-upload-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .gst-control-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-invoice-dialog .invoice-remove-btn {
    margin-top: 0;
  }

  .staff-profile-shell {
    max-width: none;
    gap: 18px;
  }

  .staff-profile-hero {
    margin-top: -4px;
    padding: 30px 16px 28px;
    border-radius: 22px;
    background: radial-gradient(circle at center, rgba(45, 212, 191, 0.22), transparent 58%), rgba(2, 6, 23, 0.86);
  }

  .staff-avatar {
    width: 112px;
    height: 112px;
    font-size: 40px;
  }

  .staff-profile-hero h2 {
    font-size: 28px;
    text-align: center;
  }

  .profile-block h3 {
    margin-left: 2px;
    font-size: 12px;
    letter-spacing: 4px;
  }

  .profile-list {
    border-radius: 20px;
  }

  .profile-row,
  .profile-action {
    min-height: 64px;
    padding: 16px;
    grid-template-columns: minmax(98px, 0.62fr) minmax(0, 1fr);
  }

  .card h3 {
    font-size: 18px;
    line-height: 1.25;
  }

  .dashboard-kpis p {
    font-size: 22px;
  }

  .supplier-intelligence-head {
    flex-direction: column;
  }

  .supplier-intelligence-head .secondary-btn,
  .supplier-head-actions {
    width: 100%;
  }

  .supplier-head-actions {
    justify-content: stretch;
  }

  .supplier-head-actions span {
    flex: 1 1 auto;
    justify-content: center;
  }

  .supplier-flow-row {
    grid-template-columns: 1fr;
  }

  .supplier-flow-money,
  .supplier-upcoming-item > div:last-child {
    text-align: left;
  }

  .supplier-orbit-stats {
    grid-template-columns: 1fr;
  }

  .command-insight-card {
    min-height: 104px;
  }

  .form-grid {
    width: 100%;
  }

  input,
  select,
  textarea {
    min-width: 0;
    padding: 12px;
    font-size: 16px;
  }

  .primary-btn,
  .small-btn,
  .secondary-btn,
  .danger-btn,
  .logout-btn,
  .nav-btn {
    min-height: 44px;
  }

  .section-head .primary-btn,
  .section-head .secondary-btn,
  .section-head .danger-btn {
    width: 100%;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 6px;
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  th,
  td {
    padding: 10px;
    font-size: 13px;
  }

  .stock-table-card table,
  .stock-table-card {
    min-width: 0;
  }

  table.responsive-table {
    display: block;
  }

  table.responsive-table thead {
    display: none;
  }

  table.responsive-table tbody {
    display: grid;
    gap: 12px;
  }

  table.responsive-table tr {
    display: grid;
    padding: 12px;
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  table.responsive-table td {
    display: grid;
    grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 36px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    word-break: break-word;
  }

  table.responsive-table td:last-child {
    border-bottom: 0;
  }

  table.responsive-table td::before {
    content: attr(data-label);
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.35;
    text-transform: uppercase;
  }

  table.responsive-table td:empty::after {
    content: "-";
    color: var(--muted);
  }

  table.responsive-table td button,
  table.responsive-table td .small-btn,
  table.responsive-table td .danger-btn,
  table.responsive-table td .secondary-btn,
  table.responsive-table td .icon-btn {
    width: 100%;
    margin: 3px 0;
  }

  .chart-grid .card {
    height: auto;
    min-height: 380px;
    overflow: visible;
  }

  .chart-grid canvas {
    width: 100% !important;
    height: 285px !important;
    max-height: 285px !important;
  }

  .expense-chart-grid .card {
    min-height: 320px;
    overflow: visible;
  }

  .expense-chart-grid canvas {
    width: 100% !important;
    height: 240px !important;
    max-height: 240px !important;
  }

  .stock-dialog-grid,
  .payment-summary-grid,
  .payment-dialog-grid,
  .statement-search-bar,
  .statement-result-card,
  .statement-result-metrics,
  .split-grid,
  .access-grid,
  .material-live-summary {
    grid-template-columns: 1fr;
  }

  .register-control-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .register-control-actions {
    justify-content: stretch;
  }

  .register-control-actions label,
  .register-control-actions select,
  .register-control-actions button {
    width: 100%;
  }

  .invoice-item-row {
    margin-bottom: 14px;
  }

  .invoice-remove-btn {
    width: 100%;
    margin-top: 0;
  }

  .dialog-backdrop {
    align-items: start;
    padding: 10px;
    overflow-y: auto;
  }

  .dialog-panel,
  .dialog-panel.wide-dialog {
    width: 100%;
    max-width: 100%;
    max-height: none;
    padding: 16px;
    border-radius: 14px;
  }

  .dialog-card {
    padding: 12px;
  }

  .dialog-panel.supplier-dialog .stock-dialog-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dialog-panel.supplier-dialog .dialog-card {
    padding: 14px;
  }

  .compliance-grid,
  .form-card-grid,
  .compliance-dialog-grid,
  .compliance-meta {
    grid-template-columns: 1fr;
  }

  .compliance-card-top {
    display: grid;
  }

  .stock-toolbar {
    max-width: none;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .card-actions button {
    width: 100%;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions button {
    width: 100%;
  }

  .rank-item,
  .timesheet-group-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .timesheet-group-head {
    flex-direction: column;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    text-align: center;
  }

  .public-hero {
    grid-template-columns: 1fr;
  }

  .public-hero h1 {
    font-size: 32px;
  }
}

@media (max-width: 520px) {
  .home-command-hero {
    padding: 14px;
    border-radius: 18px;
  }

  .home-command-copy h1 {
    font-size: 30px;
  }

  .home-command-actions {
    gap: 8px;
  }

  .command-pill {
    min-height: 40px;
    gap: 7px;
  }

  .command-pill span {
    width: 22px;
    height: 22px;
    border-radius: 8px;
  }

  .command-insight-strip {
    grid-template-columns: 1fr;
  }

  .command-insight-card {
    min-height: 92px;
    padding: 14px;
    border-radius: 16px;
  }

  .command-insight-card strong {
    font-size: 20px;
  }

  .chart-grid {
    gap: 14px;
  }

  .chart-grid .card {
    min-height: 360px;
    padding: 14px;
    border-radius: 18px;
  }

  .chart-grid canvas {
    height: 266px !important;
    max-height: 266px !important;
  }

  .mini-head {
    align-items: flex-start;
    gap: 8px;
  }

  .mini-head h3,
  .mini-head h4 {
    font-size: 16px;
  }

  .mini-head span {
    padding: 5px 8px;
    font-size: 11px;
  }

  .command-status-grid .command-status-card {
    min-height: 112px;
  }

  .supplier-intelligence-card {
    border-radius: 18px;
  }

  .supplier-intelligence-head h3 {
    font-size: 20px;
  }

  .supplier-intelligence-head p {
    font-size: 13px;
  }

  .supplier-orbit-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .supplier-orbit-stats div {
    padding: 8px;
  }

  .supplier-orbit-stats strong {
    font-size: 13px;
  }

  .supplier-exposure-strip {
    grid-template-columns: 1fr;
  }

  .mobile-menu-btn {
    top: 10px;
    left: 10px;
  }

  .main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .logo-img {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .metric-grid {
    gap: 12px;
  }

  .staff-portal .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .staff-portal .metric-grid .card {
    min-height: 104px;
  }

  .staff-portal .metric-grid .card h3 {
    font-size: 13px;
  }

  .staff-portal .metric-grid .card p {
    margin: 8px 0 0;
  }

  .staff-portal .metric-grid .card strong {
    font-size: 22px;
  }

  .staff-portal .metric-grid .card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .dashboard-action-row {
    margin-bottom: 12px;
  }

  .card {
    padding: 12px;
  }

  .command-insight-strip {
    grid-template-columns: 1fr;
  }

  .supplier-intelligence-card {
    margin-top: 16px;
    padding: 16px;
  }

  .supplier-intelligence-head h3 {
    font-size: 22px;
  }

  .supplier-orbit-card,
  .supplier-flow-card,
  .supplier-queue-card {
    padding: 14px;
  }

  .supplier-orbit-canvas {
    height: 210px;
  }

  .supplier-orbit-canvas canvas {
    height: 206px !important;
  }

  .supplier-orbit-core {
    width: 126px;
    height: 126px;
  }

  .supplier-upcoming-item {
    grid-template-columns: 32px 1fr;
  }

  .supplier-upcoming-item > div:last-child {
    grid-column: 2;
  }

  table.responsive-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-row,
  .profile-action {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .topbar h2,
  .section-head h2 {
    font-size: 20px;
  }

  .live-pill,
  .badge {
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  :root {
    --mobile-card-radius: 22px;
  }

  body {
    background:
      radial-gradient(circle at 50% -10%, rgba(45, 212, 191, 0.18), transparent 42%),
      linear-gradient(180deg, #030712 0%, #07111f 48%, #020617 100%);
  }

  body::before {
    background-size: 30px 30px;
    opacity: 0.65;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 72%);
  }

  body::after {
    opacity: 0.045;
    background-position: 50% 32%;
    background-size: min(86vw, 360px);
  }

  .mobile-menu-btn {
    top: max(12px, env(safe-area-inset-top, 0px));
    left: 12px;
    width: 52px;
    height: 52px;
    gap: 6px;
    padding: 13px;
    border-radius: 17px;
    background:
      linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.92));
    border-color: rgba(45, 212, 191, 0.5);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .mobile-menu-btn span {
    height: 2px;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  body.mobile-menu-open .mobile-menu-btn {
    background: linear-gradient(145deg, rgba(4, 47, 46, 0.98), rgba(8, 47, 73, 0.95));
  }

  body.mobile-menu-open .mobile-menu-btn span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  body.mobile-menu-open .mobile-menu-btn span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-menu-open .mobile-menu-btn span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .mobile-sidebar-backdrop {
    background: rgba(2, 6, 23, 0.74);
    backdrop-filter: blur(8px);
  }

  .sidebar {
    width: min(88vw, 360px);
    padding: calc(78px + env(safe-area-inset-top, 0px)) 14px calc(22px + env(safe-area-inset-bottom, 0px));
    border-right-color: rgba(45, 212, 191, 0.36);
    border-radius: 0 26px 26px 0;
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.99), rgba(8, 18, 33, 0.99)),
      linear-gradient(135deg, rgba(45, 212, 191, 0.12), transparent);
    box-shadow: 28px 0 70px rgba(0, 0, 0, 0.58), inset -1px 0 0 rgba(255, 255, 255, 0.05);
  }

  .brand {
    margin: 0 2px 18px;
    padding: 13px;
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(8, 47, 73, 0.28));
  }

  .brand h1 {
    font-size: 17px;
  }

  .nav-btn,
  .logout-btn,
  .nav-group {
    border-radius: 17px;
  }

  .nav-btn,
  .logout-btn {
    min-height: 50px;
    margin-bottom: 9px;
    padding: 13px 14px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.7));
    border-color: rgba(45, 212, 191, 0.22);
  }

  .nav-btn.active,
  .nav-btn:hover {
    border-color: transparent;
    box-shadow: 0 14px 34px rgba(45, 212, 191, 0.2);
  }

  .nav-group {
    background: rgba(15, 23, 42, 0.58);
  }

  .nav-group-toggle {
    min-height: 52px;
    padding: 14px;
  }

  .nav-submenu {
    padding: 0 10px 10px;
  }

  .nav-sub-btn {
    padding-left: 26px;
    border-radius: 14px;
  }

  .logout-btn {
    margin-top: 22px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.8), rgba(69, 10, 10, 0.72));
  }

  .main {
    padding: calc(78px + env(safe-area-inset-top, 0px)) 14px calc(34px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    position: relative;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    border-color: rgba(45, 212, 191, 0.26);
    background:
      linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.44)),
      linear-gradient(90deg, rgba(45, 212, 191, 0.12), transparent);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
  }

  .topbar h2,
  .section-head h2 {
    font-size: 23px;
  }

  .topbar p,
  .section-head p {
    color: #cbd5e1;
  }

  .live-pill {
    padding: 9px 12px;
    background: rgba(34, 197, 94, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .dashboard-action-row {
    padding: 2px 2px 8px;
    scrollbar-width: none;
  }

  .dashboard-action-row::-webkit-scrollbar {
    display: none;
  }

  .quick-pill {
    min-height: 42px;
    border-color: rgba(45, 212, 191, 0.28);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.34));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .card,
  .mobile-card,
  .form-card,
  .compliance-card,
  .staff-action-card,
  .profile-list,
  .dialog-card {
    border-radius: var(--mobile-card-radius);
    border-color: rgba(45, 212, 191, 0.24);
    background:
      linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(8, 18, 33, 0.9)),
      linear-gradient(135deg, rgba(45, 212, 191, 0.08), transparent);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .metric-grid .card {
    min-height: 112px;
  }

  .card h3 {
    font-size: 17px;
  }

  .card p {
    line-height: 1.42;
  }

  .staff-portal .topbar {
    min-height: 132px;
    border-radius: 0 0 28px 28px;
    margin: calc(-78px - env(safe-area-inset-top, 0px)) -14px 18px;
    padding: calc(84px + env(safe-area-inset-top, 0px)) 18px 20px;
    background:
      linear-gradient(135deg, rgba(8, 47, 73, 0.98), rgba(4, 47, 46, 0.82)),
      linear-gradient(90deg, rgba(45, 212, 191, 0.2), transparent);
  }

  .staff-portal .main {
    padding-top: calc(78px + env(safe-area-inset-top, 0px));
  }

  .staff-action-hub {
    grid-template-columns: 1fr;
  }

  .staff-action-card {
    min-height: 112px;
  }

  .staff-profile-hero {
    border-radius: 26px;
    background:
      radial-gradient(circle at center, rgba(45, 212, 191, 0.22), transparent 58%),
      linear-gradient(145deg, rgba(2, 6, 23, 0.92), rgba(8, 47, 73, 0.3));
  }

  .staff-avatar {
    background: linear-gradient(135deg, #2dd4bf, #38bdf8);
    color: #020617;
  }

  .profile-row,
  .profile-action {
    min-height: 68px;
  }

  table.responsive-table tbody {
    gap: 14px;
  }

  table.responsive-table tr {
    padding: 14px;
    border-radius: 20px;
    border-color: rgba(45, 212, 191, 0.24);
    background:
      linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(8, 18, 33, 0.86)),
      linear-gradient(135deg, rgba(56, 189, 248, 0.08), transparent);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  table.responsive-table td {
    grid-template-columns: minmax(118px, 36%) minmax(0, 1fr);
    min-height: 40px;
    padding: 10px 0;
  }

  table.responsive-table td::before {
    color: #67e8f9;
  }

  table.responsive-table td button,
  table.responsive-table td .small-btn,
  table.responsive-table td .danger-btn,
  table.responsive-table td .secondary-btn,
  table.responsive-table td .icon-btn {
    min-height: 42px;
    border-radius: 14px;
  }

  .dialog-backdrop {
    padding: 12px;
  }

  .dialog-panel,
  .dialog-panel.wide-dialog {
    padding: 18px;
    border-radius: 24px;
    background:
      linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(8, 18, 33, 0.96)),
      linear-gradient(135deg, rgba(45, 212, 191, 0.1), transparent);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .dialog-panel h3 {
    font-size: 21px;
  }

  .dialog-actions {
    gap: 10px;
    padding-top: 6px;
  }

  .dialog-actions button {
    min-height: 48px;
    border-radius: 15px;
  }

  .qr-preview-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  input,
  select,
  textarea {
    border-radius: 15px;
    border-color: rgba(45, 212, 191, 0.3);
    background: rgba(2, 6, 23, 0.72);
  }

  input:focus,
  select:focus,
  textarea:focus {
    outline: 2px solid rgba(45, 212, 191, 0.26);
    border-color: rgba(45, 212, 191, 0.72);
  }
}

@media (max-width: 520px) {
  .mobile-menu-btn {
    width: 50px;
    height: 50px;
  }

  .main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    padding: 16px;
  }

  .topbar h2,
  .section-head h2 {
    font-size: 21px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .staff-portal .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card,
  .mobile-card,
  .form-card,
  .compliance-card,
  .staff-action-card,
  .profile-list,
  .dialog-card {
    border-radius: 20px;
  }

  table.responsive-table td {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .competitor-card-grid {
    grid-template-columns: 1fr;
  }

  .competitor-info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 900px) {
  body.mobile-menu-open .app-shell {
    z-index: auto;
  }

  .mobile-sidebar-backdrop {
    z-index: 9000;
    background:
      radial-gradient(circle at 18% 16%, rgba(45, 212, 191, 0.2), transparent 32%),
      radial-gradient(circle at 92% 80%, rgba(56, 189, 248, 0.13), transparent 30%),
      rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(9px);
  }

  .mobile-menu-btn {
    z-index: 12000;
    width: 44px;
    height: 44px;
    padding: 11px;
    border-radius: 14px;
    border-color: rgba(125, 211, 252, 0.7);
    background:
      linear-gradient(145deg, rgba(6, 78, 59, 0.96), rgba(8, 47, 73, 0.95)),
      rgba(2, 6, 23, 0.96);
    box-shadow: 0 16px 42px rgba(45, 212, 191, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  .sidebar {
    z-index: 11000;
    display: flex;
    flex-direction: column;
    width: min(72vw, 276px);
    padding: calc(58px + env(safe-area-inset-top, 0px)) 8px calc(12px + env(safe-area-inset-bottom, 0px));
    color: #f8fafc;
    opacity: 1;
    visibility: visible;
    background:
      linear-gradient(180deg, rgba(1, 8, 20, 0.99), rgba(5, 15, 28, 0.99)),
      radial-gradient(circle at 22% 6%, rgba(45, 212, 191, 0.22), transparent 36%),
      radial-gradient(circle at 96% 22%, rgba(56, 189, 248, 0.18), transparent 32%);
    border-right: 1px solid rgba(125, 211, 252, 0.42);
    border-radius: 0 22px 22px 0;
    box-shadow: 24px 0 68px rgba(0, 0, 0, 0.66), inset -1px 0 0 rgba(255, 255, 255, 0.08);
    transform: translateX(-108%);
    scrollbar-width: thin;
    scrollbar-color: rgba(45, 212, 191, 0.42) rgba(2, 6, 23, 0.2);
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar::before {
    display: none;
  }

  .sidebar::-webkit-scrollbar {
    width: 6px;
  }

  .sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.42);
  }

  .sidebar .brand,
  .staff-sidebar-profile {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin: 0 0 8px;
    padding: 8px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.42)),
      rgba(2, 6, 23, 0.76);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }

  .staff-portal .brand {
    display: none;
  }

  .sidebar .logo-img,
  .staff-avatar.small {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.26));
  }

  .sidebar .brand h1,
  .staff-sidebar-profile strong {
    color: #ffffff;
    font-size: 13px;
    line-height: 1.1;
  }

  .sidebar .brand p,
  .staff-sidebar-profile span,
  .staff-sidebar-profile small {
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 800;
  }

  .staff-sidebar-profile small {
    width: fit-content;
    margin-top: 5px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #06202a;
    background: linear-gradient(135deg, #2dd4bf, #7dd3fc);
    font-size: 10px;
  }

  .nav-btn,
  .logout-btn,
  .nav-group {
    width: 100%;
    border-radius: 12px;
  }

  .nav-btn,
  .logout-btn,
  .nav-group-toggle {
    min-height: 36px;
    margin-bottom: 6px;
    padding: 8px 10px;
    color: #f8fafc;
    background:
      linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.76)),
      rgba(15, 23, 42, 0.86);
    border-color: rgba(45, 212, 191, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-size: 12px;
    letter-spacing: 0;
  }

  .nav-btn.active,
  .nav-btn:hover,
  .nav-group:has(.nav-btn.active) > .nav-group-toggle {
    color: #03111d;
    background: linear-gradient(135deg, #2dd4bf, #38bdf8);
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(45, 212, 191, 0.22);
  }

  .nav-group {
    padding: 5px;
    background:
      linear-gradient(135deg, rgba(45, 212, 191, 0.06), transparent),
      rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(45, 212, 191, 0.2);
    margin-bottom: 7px;
  }

  .nav-submenu {
    padding: 4px 1px 0;
  }

  .nav-sub-btn {
    min-height: 33px;
    padding-left: 12px;
    font-size: 11px;
    background: rgba(2, 6, 23, 0.72);
    border-color: rgba(125, 211, 252, 0.18);
  }

  .logout-btn {
    position: sticky;
    bottom: 0;
    margin-top: 8px;
    min-height: 38px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.92), rgba(69, 10, 10, 0.78));
    border-color: rgba(248, 113, 113, 0.32);
    box-shadow: 0 -16px 30px rgba(2, 6, 23, 0.5);
  }
}

.shift-action-row,
.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.shift-qr-console {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.shift-qr-card,
.shift-qr-instructions {
  min-height: 100%;
}

.shift-qr-card {
  display: grid;
  justify-items: center;
  text-align: center;
}

.qr-command-head,
.shift-scan-statusbar {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(56, 189, 248, 0.08)),
    rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(45, 212, 191, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.qr-command-head h3 {
  margin: 0;
}

.scan-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.13), 0 0 20px rgba(34, 197, 94, 0.8);
  animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.72;
  }

  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

.shift-qr-frame {
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 14px auto;
  padding: 14px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(56, 189, 248, 0.1)),
    rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: 0 22px 54px rgba(8, 47, 73, 0.38), inset 0 0 0 8px rgba(2, 6, 23, 0.06);
}

.shift-qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
  display: block;
}

.shift-qr-countdown {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 47, 73, 0.72);
  border: 1px solid rgba(45, 212, 191, 0.28);
}

.shift-qr-countdown strong {
  color: #67e8f9;
}

.shift-token-text {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #94a3b8;
  font-size: 12px;
}

.settings-toggle-row,
.access-toggle-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(45, 212, 191, 0.22);
}

.settings-toggle-row span,
.access-toggle-row span {
  display: grid;
  gap: 4px;
}

.settings-toggle-row small,
.access-toggle-row small {
  color: #94a3b8;
}

.settings-toggle-row input[type="checkbox"],
.access-toggle-row input[type="checkbox"] {
  width: 54px;
  height: 28px;
  flex: 0 0 auto;
  accent-color: #22d3ee;
}

.access-toggle-row strong {
  color: #e0f2fe;
}

.shift-scan-panel {
  display: grid;
  gap: 12px;
}

.shift-scan-statusbar {
  justify-content: flex-start;
  width: 100%;
  border-radius: 18px;
}

.shift-scan-statusbar strong {
  color: #f8fafc;
}

.shift-scan-statusbar small {
  margin-left: auto;
  color: #93c5fd;
  font-weight: 800;
}

.shift-scan-camera {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(45, 212, 191, 0.55);
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.84), rgba(2, 6, 23, 0.94)),
    radial-gradient(circle at 50% 40%, rgba(45, 212, 191, 0.22), transparent 30%),
    #020617;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 18px 42px rgba(0, 0, 0, 0.32),
    0 0 42px rgba(45, 212, 191, 0.12);
}

.shift-scan-camera video {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
  object-fit: cover;
}

.shift-scan-reticle {
  position: absolute;
  inset: 13%;
  border-radius: 24px;
  border: 2px solid rgba(103, 232, 249, 0.9);
  box-shadow:
    0 0 0 999px rgba(2, 6, 23, 0.36),
    0 0 32px rgba(45, 212, 191, 0.32),
    inset 0 0 28px rgba(56, 189, 248, 0.2);
  pointer-events: none;
}

.shift-scan-reticle::before,
.shift-scan-reticle::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.85);
}

.shift-scan-reticle::before {
  top: 28%;
}

.shift-scan-reticle::after {
  bottom: 28%;
}

.shift-manual-panel {
  padding: 10px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.16), rgba(15, 23, 42, 0.52)),
    rgba(2, 6, 23, 0.36);
  border: 1px solid rgba(125, 211, 252, 0.28);
}

.shift-manual-panel summary {
  cursor: pointer;
  color: #a5f3fc;
  font-weight: 900;
  list-style: none;
}

.shift-manual-panel summary::-webkit-details-marker {
  display: none;
}

.shift-manual-panel input {
  margin-top: 10px;
}

.shift-manual-panel .compact-actions {
  margin-top: 10px;
}

.shift-manual-panel .secondary-btn {
  width: 100%;
  color: #dffafe;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.98), rgba(14, 116, 144, 0.74));
  border-color: rgba(125, 211, 252, 0.32);
}

.shift-camera-actions {
  display: grid;
  gap: 8px;
}

.shift-camera-actions button {
  width: 100%;
}

.shift-qr-dialog-backdrop {
  padding: max(10px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
  align-items: start;
  overflow-y: auto;
}

.shift-qr-dialog-panel {
  width: min(430px, 100%);
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 22px;
}

.shift-qr-dialog-panel h3 {
  margin-bottom: 12px;
  padding-left: 0;
  font-size: 24px;
  line-height: 1.15;
}

.shift-qr-dialog-panel .dialog-actions {
  margin-top: 12px;
}

.shift-qr-dialog-backdrop {
  align-items: center;
  padding: max(8px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(12px);
}

.shift-qr-dialog-panel {
  width: min(460px, 100%);
  max-height: calc(100dvh - 18px);
  padding: 18px;
  border-radius: 28px;
  border-color: rgba(103, 232, 249, 0.34);
  background:
    radial-gradient(circle at 50% 0%, rgba(45, 212, 191, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 8, 23, 0.98));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.shift-qr-dialog-panel h3 {
  margin-bottom: 12px;
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: 0;
}

.shift-scan-panel {
  gap: 10px;
}

.shift-scan-statusbar {
  padding: 13px 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 22%, rgba(34, 197, 94, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.86), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(45, 212, 191, 0.28);
}

.shift-scan-statusbar strong,
.shift-scan-statusbar small {
  display: block;
}

.shift-scan-statusbar strong {
  font-size: 17px;
}

.shift-scan-statusbar small {
  margin: 3px 0 0;
}

.shift-scan-statusbar em {
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8);
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
  white-space: nowrap;
}

.shift-scan-camera {
  min-height: 260px;
  border-radius: 28px;
  border-color: rgba(103, 232, 249, 0.52);
  background:
    radial-gradient(circle at 50% 42%, rgba(45, 212, 191, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.82), rgba(2, 6, 23, 0.96));
  box-shadow: inset 0 0 30px rgba(45, 212, 191, 0.12), 0 20px 60px rgba(2, 6, 23, 0.36);
}

.shift-scan-camera video {
  min-height: 260px;
}

.shift-scan-reticle {
  inset: 18% 16%;
  border-radius: 26px;
  box-shadow:
    0 0 0 999px rgba(2, 6, 23, 0.28),
    0 0 32px rgba(45, 212, 191, 0.32),
    inset 0 0 28px rgba(56, 189, 248, 0.2);
}

.shift-scan-reticle::before,
.shift-scan-reticle::after {
  left: 12%;
  right: 12%;
}

.shift-scan-corners {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border-radius: 22px;
  background:
    linear-gradient(#67e8f9, #67e8f9) left top / 42px 2px no-repeat,
    linear-gradient(#67e8f9, #67e8f9) left top / 2px 42px no-repeat,
    linear-gradient(#67e8f9, #67e8f9) right top / 42px 2px no-repeat,
    linear-gradient(#67e8f9, #67e8f9) right top / 2px 42px no-repeat,
    linear-gradient(#67e8f9, #67e8f9) left bottom / 42px 2px no-repeat,
    linear-gradient(#67e8f9, #67e8f9) left bottom / 2px 42px no-repeat,
    linear-gradient(#67e8f9, #67e8f9) right bottom / 42px 2px no-repeat,
    linear-gradient(#67e8f9, #67e8f9) right bottom / 2px 42px no-repeat;
  opacity: 0.68;
}

.shift-qr-dialog-panel #shiftQrScanStatus {
  margin: 2px 0 0;
  padding: 10px 2px;
  color: #cbd5e1;
  font-size: 16px;
}

.shift-qr-dialog-panel .dialog-actions {
  margin-top: 10px;
}

.shift-qr-dialog-panel .dialog-actions .secondary-btn {
  width: 100%;
  min-height: 50px;
  border-radius: 18px;
  border-color: rgba(103, 232, 249, 0.22);
  background: rgba(15, 23, 42, 0.72);
}

.field-label {
  color: #a5f3fc;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .home-command-hero,
  .staff-mission-hero {
    grid-template-columns: 1fr;
    padding: 18px;
    border-radius: 20px;
  }

  .home-command-orb {
    width: 132px;
    min-height: 132px;
    justify-self: center;
  }

  .home-command-orb img {
    width: 68px;
    height: 68px;
  }

  .home-command-actions > button,
  .staff-mission-scan {
    width: 100%;
  }

  .staff-mission-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .staff-mission-tile {
    min-height: 112px;
    padding: 14px;
    border-radius: 16px;
  }

  .staff-mission-tile strong {
    font-size: 22px;
  }

  .shift-qr-console {
    grid-template-columns: 1fr;
  }

  .shift-qr-frame {
    width: min(100%, 230px);
    border-radius: 22px;
  }

  .settings-toggle-row,
  .access-toggle-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .shift-scan-camera,
  .shift-scan-camera video {
    min-height: 240px;
  }

  .shift-scan-statusbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .shift-scan-statusbar small {
    margin-left: 0;
  }

  .compact-actions > button,
  .shift-action-row > button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .shift-qr-dialog-backdrop {
    place-items: start center;
    padding: max(6px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px));
  }

  .shift-qr-dialog-panel {
    width: 100%;
    max-height: calc(100dvh - 14px);
    padding: 12px;
    border-radius: 22px;
  }

  .shift-qr-dialog-panel h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .shift-scan-panel {
    gap: 9px;
  }

  .shift-scan-statusbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    padding: 10px;
    border-radius: 16px;
  }

  .shift-scan-statusbar strong {
    font-size: 15px;
  }

  .shift-scan-statusbar small {
    font-size: 12px;
  }

  .shift-scan-statusbar em {
    padding: 6px 8px;
    font-size: 11px;
  }

  .shift-scan-camera,
  .shift-scan-camera video {
    min-height: 210px;
    max-height: 30dvh;
  }

  .shift-scan-camera {
    border-radius: 20px;
  }

  .shift-scan-reticle {
    inset: 18% 14%;
    border-radius: 18px;
  }

  .shift-scan-corners {
    inset: 8px;
    border-radius: 18px;
  }

  .shift-manual-panel {
    padding: 8px;
    border-radius: 14px;
  }

  .shift-manual-panel summary {
    font-size: 14px;
  }

  .shift-manual-panel input {
    min-height: 42px;
    margin-top: 8px;
  }

  .shift-qr-dialog-panel .dialog-actions {
    position: sticky;
    bottom: -12px;
    margin: 8px -12px -12px;
    padding: 10px 12px 12px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.98) 34%);
  }
}

@media (max-width: 900px) {
  body.mobile-menu-open {
    overflow: hidden;
  }

  body.mobile-menu-open .app-shell {
    filter: none;
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    z-index: 9000;
    background:
      radial-gradient(circle at 92% 16%, rgba(45, 212, 191, 0.14), transparent 30%),
      rgba(1, 8, 20, 0.74);
    backdrop-filter: blur(7px);
    transition: opacity 0.22s ease;
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    z-index: 12000;
    border-radius: 16px;
  }

  body.mobile-menu-open .mobile-menu-btn {
    left: 16px;
    top: calc(10px + env(safe-area-inset-top, 0px));
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 11000;
    width: min(82vw, 318px);
    max-width: 318px;
    height: 100dvh;
    padding: calc(66px + env(safe-area-inset-top, 0px)) 12px calc(16px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    border-right: 1px solid rgba(45, 212, 191, 0.34);
    border-radius: 0 22px 22px 0;
    background:
      linear-gradient(180deg, rgba(2, 8, 20, 0.98), rgba(3, 12, 26, 0.98)),
      radial-gradient(circle at 18% 7%, rgba(45, 212, 191, 0.16), transparent 36%);
    box-shadow: 20px 0 52px rgba(0, 0, 0, 0.58);
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar .brand,
  .staff-sidebar-profile {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 66px;
    margin: 0 0 12px;
    padding: 9px 10px;
    border-radius: 18px;
  }

  .sidebar .logo-img,
  .staff-avatar.small {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
  }

  .sidebar .brand h1,
  .staff-sidebar-profile strong {
    font-size: 16px;
    line-height: 1.08;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar .brand p,
  .staff-sidebar-profile span,
  .staff-sidebar-profile small {
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-btn,
  .nav-group-toggle,
  .logout-btn {
    min-height: 44px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.15;
  }

  .nav-group {
    margin: 0 0 8px;
    padding: 6px;
    border-radius: 18px;
  }

  .nav-submenu {
    display: grid;
    gap: 7px;
    padding: 2px 0 0;
  }

  .nav-sub-btn {
    min-height: 38px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 13px;
    font-size: 13px;
  }

  .nav-sub-btn::before {
    width: 5px;
    height: 5px;
    margin-right: 6px;
  }

  .logout-btn {
    position: static;
    margin-top: 10px;
    margin-bottom: 0;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.92), rgba(69, 10, 10, 0.88));
    box-shadow: none;
  }
}

@media (max-width: 420px) {
  .sidebar {
    width: min(84vw, 304px);
    max-width: 304px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-btn,
  .nav-group-toggle,
  .logout-btn {
    min-height: 42px;
    font-size: 13px;
  }

  .sidebar .brand h1,
  .staff-sidebar-profile strong {
    font-size: 15px;
  }
}

/* Standalone shift QR terminal */
.shift-terminal-page {
  min-height: 100dvh;
  margin: 0;
  color: #f8fafc;
  background:
    radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.18), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.14), transparent 28%),
    linear-gradient(135deg, #020617 0%, #061626 46%, #020617 100%);
  overflow-x: hidden;
}

.shift-terminal-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.055) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.92), rgba(0,0,0,0.42));
}

.shift-terminal-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 42px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(18px, 3vw, 34px);
}

.shift-terminal-hero,
.shift-terminal-grid,
.terminal-command-panel,
.terminal-qr-stage {
  border: 1px solid rgba(45, 212, 191, 0.24);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(8, 47, 73, 0.42)),
    rgba(2, 6, 23, 0.72);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.shift-terminal-hero {
  min-height: 108px;
  padding: clamp(16px, 2vw, 24px);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.terminal-brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.terminal-brand-lockup img {
  width: clamp(58px, 7vw, 86px);
  height: clamp(58px, 7vw, 86px);
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.terminal-brand-lockup span,
.terminal-eyebrow {
  display: block;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-brand-lockup strong {
  display: block;
  margin-top: 3px;
  font-size: clamp(22px, 3vw, 42px);
  line-height: 1;
}

.terminal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  color: #dcfce7;
  background: rgba(4, 120, 87, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.36);
  white-space: nowrap;
}

.shift-terminal-grid {
  min-height: 0;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 34px;
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(360px, 1.08fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.terminal-qr-stage {
  position: relative;
  min-height: clamp(480px, 60vh, 760px);
  border-radius: 34px;
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 50px);
  overflow: hidden;
}

.terminal-qr-orbit {
  position: absolute;
  width: min(80%, 640px);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px dashed rgba(103, 232, 249, 0.28);
  box-shadow: inset 0 0 80px rgba(45, 212, 191, 0.08), 0 0 80px rgba(14, 165, 233, 0.1);
}

.terminal-qr-orbit::before,
.terminal-qr-orbit::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  inset: 11%;
  border: 1px solid rgba(45, 212, 191, 0.12);
}

.terminal-qr-orbit::after {
  inset: 25%;
  border-style: dashed;
}

.terminal-qr-frame {
  position: relative;
  z-index: 1;
  width: min(72vw, 430px);
  aspect-ratio: 1;
  padding: clamp(16px, 2vw, 24px);
  border-radius: 36px;
  background: #ffffff;
  border: 10px solid rgba(224, 242, 254, 0.92);
  box-shadow: 0 32px 90px rgba(8, 47, 73, 0.54), 0 0 0 1px rgba(45, 212, 191, 0.35);
}

.terminal-qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 20px;
}

.terminal-countdown-ring {
  position: absolute;
  z-index: 2;
  right: clamp(18px, 3vw, 38px);
  bottom: clamp(18px, 3vw, 38px);
  min-width: 118px;
  min-height: 118px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.22), rgba(8, 47, 73, 0.9));
  border: 1px solid rgba(103, 232, 249, 0.4);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.terminal-countdown-ring span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-countdown-ring strong {
  color: #67e8f9;
  font-size: 28px;
}

.terminal-command-panel {
  border-radius: 34px;
  padding: clamp(24px, 4vw, 54px);
  display: grid;
  align-content: center;
  gap: 18px;
}

.terminal-command-panel h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(36px, 5vw, 78px);
  line-height: 0.95;
}

.terminal-command-panel p {
  max-width: 720px;
  color: #b6c7d8;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.55;
}

.terminal-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.terminal-signal-grid div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(45, 212, 191, 0.18);
}

.terminal-signal-grid strong,
.terminal-signal-grid span {
  display: block;
}

.terminal-signal-grid strong {
  font-size: 22px;
  color: #f8fafc;
}

.terminal-signal-grid span,
.terminal-token-state {
  color: #94a3b8;
  font-size: 13px;
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.terminal-actions button {
  min-height: 48px;
}

/* Staff QR scanner polish */
.pro-shift-scanner .shift-scan-camera {
  min-height: 320px;
  isolation: isolate;
}

.shift-camera-glass {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.08), transparent 35%, rgba(45, 212, 191, 0.08)),
    radial-gradient(circle at 50% 45%, transparent 24%, rgba(2, 6, 23, 0.38) 68%);
}

.shift-scanline {
  position: absolute;
  z-index: 4;
  left: 18%;
  right: 18%;
  top: 24%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #67e8f9, transparent);
  box-shadow: 0 0 24px rgba(103, 232, 249, 0.85);
  animation: shiftScannerSweep 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shiftScannerSweep {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(150px); opacity: 1; }
}

.shift-scan-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(103, 232, 249, 0.28);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.shift-scan-feedback {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(45, 212, 191, 0.18);
}

.shift-scan-feedback strong {
  color: #f8fafc;
}

.shift-scan-feedback span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.pro-shift-scanner .shift-scan-reticle,
.pro-shift-scanner .shift-scan-corners,
.pro-shift-scanner .shift-scanline,
.pro-shift-scanner .shift-scan-hint {
  z-index: 3;
}

@media (max-width: 980px) {
  .shift-terminal-grid {
    grid-template-columns: 1fr;
  }

  .terminal-qr-stage {
    min-height: 520px;
  }

  .terminal-command-panel {
    align-content: start;
  }
}

@media (max-width: 620px) {
  .shift-terminal-shell {
    padding: 12px;
  }

  .shift-terminal-hero {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 22px;
  }

  .terminal-status-pill {
    width: 100%;
    justify-content: center;
  }

  .shift-terminal-grid,
  .terminal-command-panel,
  .terminal-qr-stage {
    border-radius: 24px;
  }

  .terminal-qr-stage {
    min-height: 380px;
    padding: 18px;
  }

  .terminal-qr-frame {
    width: min(84vw, 300px);
    border-width: 7px;
    border-radius: 28px;
  }

  .terminal-countdown-ring {
    position: static;
    min-width: auto;
    min-height: auto;
    margin-top: 14px;
    padding: 10px 16px;
    display: inline-flex;
  }

  .terminal-signal-grid {
    grid-template-columns: 1fr;
  }

  .terminal-actions button {
    width: 100%;
  }

  .pro-shift-scanner .shift-scan-camera,
  .pro-shift-scanner .shift-scan-camera video {
    min-height: 260px;
    max-height: 42dvh;
  }
}

/* 2026-06-30 mobile navigation refinement */
@media (max-width: 900px) {
  body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  .mobile-menu-btn {
    top: max(10px, env(safe-area-inset-top, 0px));
    left: 10px;
    width: 46px;
    height: 46px;
    padding: 11px;
    border-radius: 15px;
    z-index: 14000;
    background: linear-gradient(145deg, rgba(8, 47, 73, 0.96), rgba(15, 23, 42, 0.94));
    border: 1px solid rgba(103, 232, 249, 0.42);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34), 0 0 22px rgba(45, 212, 191, 0.16);
  }

  body.mobile-menu-open .mobile-menu-btn {
    left: min(calc(78vw - 58px), 236px);
    background: linear-gradient(145deg, rgba(4, 47, 46, 0.98), rgba(8, 47, 73, 0.96));
  }

  .mobile-menu-btn span {
    height: 2px;
    background: #67e8f9;
  }

  .mobile-sidebar-backdrop {
    display: block;
    opacity: 0;
    pointer-events: none;
    z-index: 12998;
    background:
      radial-gradient(circle at 82% 20%, rgba(45, 212, 191, 0.13), transparent 34%),
      rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(8px);
    transition: opacity 180ms ease;
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 13000;
    display: flex;
    flex-direction: column;
    width: min(78vw, 294px);
    max-width: 294px;
    height: 100dvh;
    min-height: 100dvh;
    padding: calc(62px + env(safe-area-inset-top, 0px)) 10px calc(12px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(calc(-100% - 18px));
    border-right: 1px solid rgba(103, 232, 249, 0.28);
    border-radius: 0 24px 24px 0;
    background:
      radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.16), transparent 36%),
      linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(5, 14, 29, 0.98));
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.42);
    scrollbar-width: thin;
    scrollbar-color: rgba(45, 212, 191, 0.55) transparent;
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar::-webkit-scrollbar {
    width: 5px;
  }

  .sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.5);
  }

  .sidebar .brand,
  .staff-sidebar-profile {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 56px;
    margin: 0 0 8px;
    padding: 8px;
    border-radius: 15px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(103, 232, 249, 0.22);
  }

  .sidebar .logo-img,
  .staff-avatar.small {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 12px;
    object-fit: contain;
  }

  .sidebar .brand h1,
  .staff-sidebar-profile strong {
    font-size: 14px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar .brand p,
  .staff-sidebar-profile span,
  .staff-sidebar-profile small {
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-btn,
  .nav-group-toggle,
  .logout-btn {
    min-height: 38px;
    margin-bottom: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.18;
    letter-spacing: 0;
  }

  .nav-group {
    margin: 0 0 7px;
    padding: 5px;
    border-radius: 15px;
  }

  .nav-submenu {
    gap: 5px;
    padding: 0 5px 5px 9px;
  }

  .nav-sub-btn {
    min-height: 34px;
    margin-bottom: 0;
    padding: 7px 9px;
    font-size: 11.5px;
  }

  .nav-group-caret {
    width: 20px;
    height: 20px;
    border-radius: 7px;
    flex: 0 0 auto;
  }

  .logout-btn {
    position: static;
    margin-top: auto;
    margin-bottom: 0;
    min-height: 40px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.92), rgba(69, 10, 10, 0.88));
    box-shadow: none;
  }
}

@media (max-width: 420px) {
  body.mobile-menu-open .mobile-menu-btn {
    left: min(calc(82vw - 58px), 224px);
  }

  .sidebar {
    width: min(82vw, 286px);
    max-width: 286px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .nav-btn,
  .nav-group-toggle,
  .logout-btn {
    min-height: 36px;
    font-size: 12px;
  }

  .nav-sub-btn {
    min-height: 32px;
    font-size: 11px;
  }
}

/* 2026-07-01 precision mobile app shell */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    background:
      radial-gradient(circle at 18% -8%, rgba(45, 212, 191, 0.20), transparent 32%),
      radial-gradient(circle at 95% 16%, rgba(56, 189, 248, 0.16), transparent 30%),
      linear-gradient(180deg, #020617 0%, #06111f 48%, #020617 100%);
  }

  body.mobile-menu-open {
    position: fixed;
    inset: 0;
    width: 100%;
    overflow: hidden;
  }

  .app-shell {
    display: block;
    width: 100%;
    min-height: 100dvh;
  }

  .main {
    width: 100%;
    min-width: 0;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 14px calc(22px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }

  .mobile-menu-btn {
    display: grid;
    place-items: center;
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    width: 48px;
    height: 48px;
    padding: 12px;
    border-radius: 16px;
    z-index: 22000;
    border: 1px solid rgba(103, 232, 249, 0.45);
    background:
      linear-gradient(145deg, rgba(8, 47, 73, 0.94), rgba(2, 6, 23, 0.96));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38), 0 0 22px rgba(45, 212, 191, 0.20);
  }

  .mobile-menu-btn span {
    display: block;
    width: 21px;
    height: 2px;
    margin: 2px 0;
    border-radius: 999px;
    background: #67e8f9;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  body.mobile-menu-open .mobile-menu-btn {
    left: clamp(218px, calc(74vw - 56px), 246px);
    background: rgba(2, 6, 23, 0.92);
  }

  body.mobile-menu-open .mobile-menu-btn span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.mobile-menu-open .mobile-menu-btn span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-menu-open .mobile-menu-btn span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20900;
    opacity: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 88% 18%, rgba(45, 212, 191, 0.14), transparent 34%),
      rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 180ms ease;
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 21000;
    width: min(74vw, 278px);
    max-width: 278px;
    height: 100dvh;
    min-height: 100dvh;
    padding: calc(64px + env(safe-area-inset-top, 0px)) 9px calc(18px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    transform: translateX(calc(-100% - 18px));
    border-right: 1px solid rgba(103, 232, 249, 0.28);
    border-radius: 0 22px 22px 0;
    background:
      linear-gradient(180deg, rgba(4, 12, 24, 0.99), rgba(2, 6, 23, 0.99)),
      radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.20), transparent 35%);
    box-shadow: 24px 0 66px rgba(0, 0, 0, 0.48);
    scrollbar-width: thin;
    scrollbar-color: rgba(45, 212, 191, 0.55) transparent;
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar::-webkit-scrollbar {
    width: 4px;
  }

  .sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.58);
  }

  .sidebar .brand,
  .staff-sidebar-profile {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    min-height: 50px;
    margin: 0 0 8px;
    padding: 7px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(103, 232, 249, 0.18);
    box-shadow: none;
  }

  .sidebar .logo-img,
  .staff-avatar.small {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
    object-fit: contain;
  }

  .sidebar .brand h1,
  .staff-sidebar-profile strong {
    font-size: 13px;
    line-height: 1.08;
    letter-spacing: 0;
  }

  .sidebar .brand p,
  .staff-sidebar-profile span,
  .staff-sidebar-profile small {
    font-size: 10px;
    line-height: 1.2;
    opacity: 0.82;
  }

  .nav-btn,
  .nav-group-toggle,
  .logout-btn {
    min-height: 33px;
    width: 100%;
    margin: 0 0 5px;
    padding: 7px 9px;
    border-radius: 11px;
    font-size: 11.5px;
    line-height: 1.12;
    letter-spacing: 0;
    text-align: left;
    box-shadow: none;
  }

  .nav-btn::before {
    left: 9px;
    width: 4px;
    height: 4px;
  }

  .nav-btn.nav-sub-btn {
    padding-left: 18px;
  }

  .nav-group {
    margin: 0 0 6px;
    padding: 5px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.36);
    border: 1px solid rgba(45, 212, 191, 0.18);
  }

  .nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    background: transparent;
    border-color: transparent;
  }

  .nav-submenu {
    display: grid;
    gap: 4px;
    padding: 0;
  }

  .nav-sub-btn {
    min-height: 31px;
    margin: 0;
    font-size: 10.5px;
    border-radius: 10px;
  }

  .nav-group-caret {
    width: 18px;
    height: 18px;
    border-radius: 7px;
    font-size: 10px;
  }

  .sidebar .hidden-section,
  .sidebar details.hidden-section,
  .sidebar button.hidden-section {
    display: none !important;
  }

  .logout-btn {
    position: relative;
    inset: auto;
    margin: 8px 0 0;
    min-height: 36px;
    text-align: center;
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.88), rgba(69, 10, 10, 0.94));
  }

  .topbar,
  .section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
    margin-bottom: 16px;
  }

  .topbar h2,
  .section-head h2 {
    font-size: clamp(20px, 6vw, 26px);
    line-height: 1.08;
  }

  .topbar p,
  .section-head p {
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .live-pill,
  .staff-task-alert {
    justify-self: start;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .metric-grid,
  .dashboard-kpis,
  .chart-grid,
  .command-status-grid,
  .expense-chart-grid,
  .supplier-intelligence-grid,
  .staff-dashboard-grid,
  .roster-card-grid,
  .form-grid,
  .dialog-grid,
  .customer-form-grid,
  .material-dialog-grid,
  .supplier-form-grid,
  .expense-dialog-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .dashboard-action-row,
  .home-command-actions,
  .staff-top-actions,
  .card-actions,
  .section-actions,
  .terminal-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .quick-pill,
  .primary-btn,
  .secondary-btn,
  .danger-btn,
  .success-btn,
  .ghost-btn {
    min-height: 38px;
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .card,
  .command-status-card,
  .command-insight-card,
  .command-chart-card,
  .supplier-intelligence-card,
  .dialog-panel,
  .dialog-card,
  .staff-action-card,
  .profile-block,
  .staff-profile-hero,
  .shift-card,
  .stock-table-card {
    border-radius: 16px;
    padding: 14px;
  }

  .home-command-hero,
  .staff-mission-hero {
    grid-template-columns: 1fr;
    padding: 16px;
    border-radius: 18px;
  }

  .home-command-copy h1,
  .staff-mission-copy h1 {
    font-size: clamp(28px, 10vw, 40px);
    line-height: 1;
  }

  .home-command-orb {
    display: none;
  }

  .chart-grid .card,
  .command-chart-card,
  .finance-chart-card,
  .expense-chart-grid .card {
    min-height: 300px;
  }

  .chart-grid canvas,
  .command-chart-card canvas,
  .finance-chart-card canvas {
    height: 240px !important;
    max-height: 240px !important;
  }

  .table-wrap,
  .mini-table-wrap {
    margin-inline: -2px;
    border-radius: 13px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 680px;
  }

  th,
  td {
    padding: 10px 9px;
    font-size: 12px;
    line-height: 1.18;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .dialog-backdrop,
  .modal-backdrop {
    align-items: flex-start;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 10px calc(12px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }

  .dialog-panel,
  .dialog-panel.wide-dialog,
  .dialog-panel.material-dialog,
  .expense-dialog-panel,
  .manual-invoice-dialog .dialog-panel {
    width: 100% !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 22px);
    overflow-y: auto;
  }

  .global-qr-floating,
  .global-qr-button {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }
}

@media (max-width: 430px) {
  .main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .sidebar {
    width: min(72vw, 268px);
    max-width: 268px;
    padding-left: 8px;
    padding-right: 8px;
  }

  body.mobile-menu-open .mobile-menu-btn {
    left: clamp(198px, calc(72vw - 52px), 220px);
  }

  .nav-btn,
  .nav-group-toggle,
  .logout-btn {
    min-height: 31px;
    padding: 6px 8px;
    font-size: 10.8px;
  }

  .nav-sub-btn {
    min-height: 29px;
    font-size: 10px;
  }

  .sidebar .brand,
  .staff-sidebar-profile {
    min-height: 46px;
    padding: 6px;
  }

  .sidebar .logo-img,
  .staff-avatar.small {
    width: 31px;
    height: 31px;
  }
}

/* Premium admin operations shell - 20260701 */
:root {
  --shell-sidebar: 238px;
  --shell-topbar: 76px;
  --shell-bg: #030914;
  --shell-panel: rgba(9, 20, 36, 0.82);
  --shell-border: rgba(54, 212, 224, 0.26);
  --shell-cyan: #38d5e1;
  --shell-blue: #3aa9ff;
  --shell-text-soft: #a9b7c9;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 78% 8%, rgba(47, 167, 255, 0.14), transparent 30rem),
    radial-gradient(circle at 20% 18%, rgba(42, 219, 205, 0.12), transparent 24rem),
    linear-gradient(135deg, #020712 0%, #061321 52%, #020712 100%);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--shell-sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar.vv-sidebar {
  position: sticky;
  top: 0;
  z-index: 7200;
  width: var(--shell-sidebar);
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 12px;
  border-right: 1px solid rgba(56, 213, 225, 0.18);
  background: linear-gradient(180deg, rgba(3, 8, 20, 0.96), rgba(6, 13, 28, 0.94));
  box-shadow: 16px 0 36px rgba(0, 0, 0, 0.22);
}

.shell-brand {
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(56, 213, 225, 0.14);
  border-radius: 14px;
  background: rgba(12, 24, 42, 0.68);
}

.shell-brand .logo-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.shell-brand h1 {
  font-size: 0.94rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.shell-brand p {
  font-size: 0.68rem;
  color: var(--shell-text-soft);
}

.sidebar-nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 4px 10px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 213, 225, 0.55) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(56, 213, 225, 0.45); border-radius: 99px; }

.nav-section-label {
  display: block;
  margin: 14px 8px 7px;
  color: rgba(168, 184, 202, 0.76);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar .nav-btn,
.sidebar .nav-group-toggle,
.sidebar .logout-btn {
  min-height: 38px;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.sidebar .nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 0 0 6px;
  padding: 9px 10px;
  color: #eef7ff;
  background: rgba(9, 17, 34, 0.76);
  border: 1px solid rgba(56, 213, 225, 0.2);
  box-shadow: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar .nav-btn::before,
.sidebar .nav-group-toggle::before {
  content: attr(data-icon);
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  color: #02131a;
  font-size: 0.62rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--shell-cyan), var(--shell-blue));
  box-shadow: 0 0 16px rgba(56, 213, 225, 0.18);
}

.sidebar .nav-btn:hover,
.sidebar .nav-group-toggle:hover {
  transform: translateX(2px);
  border-color: rgba(56, 213, 225, 0.44);
  background: rgba(13, 31, 52, 0.9);
}

.sidebar .nav-btn.active {
  color: #031018;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(54, 209, 220, 0.98), rgba(63, 184, 255, 0.95));
  box-shadow: 0 12px 34px rgba(44, 206, 223, 0.18);
}

.sidebar .nav-btn.active::before {
  background: rgba(255, 255, 255, 0.85);
}

.nav-group {
  margin: 0 0 8px;
  padding: 6px;
  border: 1px solid rgba(56, 213, 225, 0.17);
  border-radius: 14px;
  background: rgba(7, 15, 30, 0.64);
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 8px;
  cursor: pointer;
}

.nav-group-toggle span:first-of-type {
  flex: 1;
}

.nav-group-caret {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 8px;
  color: var(--shell-cyan);
  background: rgba(56, 213, 225, 0.1);
}

.nav-submenu {
  display: grid;
  gap: 4px;
  padding: 6px 0 0 6px;
}

.sidebar .nav-sub-btn {
  min-height: 34px;
  margin-bottom: 0;
  padding: 7px 9px;
  font-size: 0.73rem;
}

.sidebar .nav-sub-btn::before {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  border-radius: 7px;
  font-size: 0.52rem;
}

.sidebar-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, transparent, rgba(3, 8, 20, 0.94));
}

.sidebar .logout-btn {
  width: 100%;
  margin: 0;
  background: linear-gradient(135deg, rgba(142, 29, 43, 0.95), rgba(98, 20, 31, 0.95));
  border: 1px solid rgba(255, 97, 105, 0.35);
}

.main {
  min-width: 0;
  padding: 0;
}

.topbar.vv-topbar {
  position: sticky;
  top: 0;
  z-index: 6200;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: var(--shell-topbar);
  padding: 12px clamp(18px, 2.4vw, 32px);
  border-bottom: 1px solid rgba(56, 213, 225, 0.16);
  background: rgba(4, 11, 24, 0.82);
  backdrop-filter: blur(18px);
}

.topbar-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(56, 213, 225, 0.32);
  background: rgba(13, 28, 48, 0.86);
  place-items: center;
  gap: 4px;
  padding: 9px;
}

.topbar-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 20px;
  background: var(--shell-cyan);
}

.topbar-title {
  min-width: 0;
}

.topbar-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--shell-cyan);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.topbar-title h2 {
  margin: 0;
  font-size: clamp(1.02rem, 1.6vw, 1.35rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-title p {
  margin: 4px 0 0;
  color: var(--shell-text-soft);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.topbar-quick-action,
.notification-bell,
.profile-chip {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(56, 213, 225, 0.28);
  background: rgba(9, 20, 36, 0.82);
  color: #f3fbff;
  font-weight: 850;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.topbar-quick-action {
  padding: 0 16px;
  background: linear-gradient(135deg, rgba(55, 212, 224, 0.92), rgba(63, 184, 255, 0.92));
  color: #02131d;
}

.notification-center {
  position: relative;
}

.notification-bell {
  position: relative;
  width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
}

.bell-mark {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #071421;
  background: linear-gradient(135deg, var(--shell-cyan), var(--shell-blue));
  font-weight: 950;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 0.62rem;
  background: #ff4e6a;
  border: 2px solid #061120;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid rgba(56, 213, 225, 0.3);
  border-radius: 18px;
  background: rgba(5, 14, 29, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42), 0 0 30px rgba(56, 213, 225, 0.1);
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 10px;
  color: #f5fbff;
}

.notification-panel-head span {
  color: var(--shell-cyan);
  font-size: 0.72rem;
  font-weight: 850;
}

.notification-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 11px 10px;
  text-align: left;
  border: 1px solid rgba(56, 213, 225, 0.15);
  border-radius: 14px;
  color: #f7fbff;
  background: rgba(13, 25, 43, 0.78);
}

.notification-item:hover {
  border-color: rgba(56, 213, 225, 0.4);
  background: rgba(16, 35, 59, 0.95);
}

.notification-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--shell-cyan);
  box-shadow: 0 0 14px currentColor;
}

.notification-dot.invoice { background: #ff7f8a; }
.notification-dot.supplier { background: #ffc857; }
.notification-dot.stock { background: #38e08b; }
.notification-dot.compliance { background: #a17cff; }

.notification-item strong,
.notification-item small {
  display: block;
}

.notification-item small {
  margin-top: 3px;
  color: var(--shell-text-soft);
  font-size: 0.72rem;
  line-height: 1.35;
}

.notification-empty {
  padding: 18px 12px;
  color: var(--shell-text-soft);
  text-align: center;
  border: 1px dashed rgba(56, 213, 225, 0.22);
  border-radius: 14px;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 5px;
}

.profile-initial {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #02131d;
  background: linear-gradient(135deg, var(--shell-cyan), var(--shell-blue));
}

.main .page-section {
  padding: 24px clamp(18px, 2.4vw, 34px) 42px;
}

.metric-grid,
.dashboard-kpis,
.command-grid,
.register-grid,
.form-grid {
  gap: clamp(14px, 1.6vw, 22px);
}

.card,
.data-panel,
.home-command-hero,
.debt-command-centre,
.dialog-card {
  border-color: rgba(56, 213, 225, 0.2);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.home-command-hero {
  margin-bottom: 18px;
}

.mobile-sidebar-backdrop {
  background: rgba(0, 6, 16, 0.66);
  backdrop-filter: blur(6px);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .sidebar.vv-sidebar {
    width: 218px;
  }

  .topbar-quick-action,
  .live-pill {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --shell-topbar: 68px;
  }

  .app-shell {
    display: block;
  }

  .topbar.vv-topbar {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    min-height: var(--shell-topbar);
    padding: calc(8px + env(safe-area-inset-top)) 12px 9px;
    margin: 0;
  }

  .topbar-menu-btn {
    display: grid;
  }

  .topbar-kicker,
  .profile-chip span:last-child {
    display: none;
  }

  .topbar-title h2 {
    font-size: 1rem;
  }

  .topbar-title p {
    font-size: 0.68rem;
    max-width: 44vw;
  }

  .topbar-actions {
    gap: 8px;
  }

  .notification-bell,
  .profile-chip {
    width: 38px;
    min-height: 38px;
  }

  .profile-chip {
    padding: 0;
    justify-content: center;
  }

  .profile-initial {
    width: 28px;
    height: 28px;
  }

  .notification-panel {
    position: fixed;
    top: calc(var(--shell-topbar) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
  }

  .sidebar.vv-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(76vw, 292px);
    height: 100dvh;
    transform: translateX(calc(-100% - 20px));
    transition: transform 0.26s ease;
    border-right: 1px solid rgba(56, 213, 225, 0.24);
    border-radius: 0 22px 22px 0;
    padding: calc(12px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
  }

  body.mobile-menu-open .sidebar.vv-sidebar {
    transform: translateX(0);
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .shell-brand {
    min-height: 52px;
    padding: 7px;
  }

  .shell-brand .logo-img {
    width: 38px;
    height: 38px;
  }

  .shell-brand h1 {
    font-size: 0.86rem;
  }

  .shell-brand p {
    font-size: 0.62rem;
  }

  .nav-section-label {
    margin: 11px 7px 6px;
    font-size: 0.56rem;
  }

  .sidebar .nav-btn,
  .sidebar .nav-group-toggle,
  .sidebar .logout-btn {
    min-height: 34px;
    border-radius: 11px;
    font-size: 0.72rem;
    padding: 7px 8px;
  }

  .sidebar .nav-btn::before,
  .sidebar .nav-group-toggle::before {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
    border-radius: 8px;
    font-size: 0.5rem;
  }

  .nav-group {
    padding: 5px;
    border-radius: 13px;
  }

  .nav-submenu {
    padding-left: 4px;
  }

  .main .page-section {
    padding: 16px 12px 28px;
  }

  .home-command-hero,
  .metric-grid,
  .dashboard-kpis,
  .command-grid,
  .register-grid,
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-action-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .command-pill {
    flex: 0 0 auto;
  }

  .card,
  .data-panel,
  .debt-command-centre,
  .home-command-hero {
    border-radius: 16px;
  }

  canvas {
    max-width: 100% !important;
  }
}

@media (max-width: 430px) {
  .sidebar.vv-sidebar {
    width: min(78vw, 276px);
  }

  .topbar-title p {
    max-width: 38vw;
  }

  .notification-panel {
    left: 8px;
    right: 8px;
  }
}

/* Functional audit action polish - 20260701 */
.table-loading-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #9ee8ff;
  font-weight: 800;
  letter-spacing: 0;
}

.table-loading-state::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #31d6e8;
  box-shadow: 0 0 18px rgba(49, 214, 232, 0.9);
}

.rfq-picker-panel,
.invoice-qr-dialog {
  display: grid;
  gap: 16px;
}

.rfq-picker-panel label {
  display: grid;
  gap: 8px;
}

.rfq-invoice-preview,
.empty-state-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(48, 214, 232, 0.28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(48, 214, 232, 0.1), rgba(6, 15, 31, 0.78));
}

.rfq-invoice-preview div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 8px;
}

.rfq-invoice-preview div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rfq-invoice-preview span,
.empty-state-panel span {
  color: #9fb2c6;
  font-size: 0.88rem;
}

.rfq-invoice-preview strong,
.empty-state-panel strong {
  color: #ffffff;
}

.invoice-qr-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(48, 214, 232, 0.35);
  background: radial-gradient(circle at 50% 0%, rgba(48, 214, 232, 0.18), rgba(4, 12, 26, 0.94));
  text-align: center;
}

.invoice-qr-card img {
  width: min(230px, 70vw);
  height: min(230px, 70vw);
  object-fit: contain;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38), 0 0 34px rgba(48, 214, 232, 0.26);
}

.invoice-qr-card strong {
  color: #ffffff;
  font-size: 1.04rem;
}

.invoice-qr-card span {
  max-width: 420px;
  color: #a9bfd0;
  font-size: 0.9rem;
}

.invoice-qr-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .rfq-invoice-preview div {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-qr-actions > * {
    width: 100%;
    justify-content: center;
  }
}


/* Final admin shell audit - 20260701 */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.sidebar.vv-sidebar,
.topbar.vv-topbar,
.notification-panel,
.dialog-panel {
  box-sizing: border-box;
}

.notification-panel {
  z-index: 14000;
}

.notification-dot.meeting {
  background: #60a5fa;
}

@media (max-width: 860px) {
  :root {
    --shell-topbar: 64px;
  }

  body.mobile-menu-open {
    overflow: hidden !important;
    touch-action: none;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
  }

  .main {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: clip !important;
  }

  .topbar.vv-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 9000 !important;
    grid-template-columns: 40px minmax(0, 1fr) auto !important;
    gap: 9px !important;
    min-height: var(--shell-topbar) !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) 10px 8px !important;
    border-radius: 0 !important;
  }

  .topbar-menu-btn {
    display: grid !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 9px !important;
    border-radius: 14px !important;
    z-index: 15000 !important;
  }

  .topbar-menu-btn span {
    width: 18px !important;
  }

  .topbar-title h2 {
    font-size: 0.98rem !important;
    line-height: 1.1 !important;
  }

  .topbar-title p {
    max-width: 42vw !important;
    font-size: 0.68rem !important;
  }

  .topbar-actions {
    gap: 6px !important;
  }

  .notification-bell,
  .profile-chip {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    flex: 0 0 38px !important;
  }

  .mobile-sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 11000 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    background: rgba(0, 8, 18, 0.72) !important;
    backdrop-filter: blur(9px) !important;
    transition: opacity 180ms ease !important;
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar.vv-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 12000 !important;
    width: min(74vw, 284px) !important;
    max-width: 284px !important;
    height: 100dvh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 9px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 0 20px 20px 0 !important;
    transform: translate3d(-104%, 0, 0) !important;
    transition: transform 240ms cubic-bezier(.2,.75,.2,1), box-shadow 240ms ease !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, rgba(3, 9, 21, 0.99), rgba(7, 17, 35, 0.98)) !important;
    box-shadow: none !important;
  }

  body.mobile-menu-open .sidebar.vv-sidebar {
    transform: translate3d(0, 0, 0) !important;
    box-shadow: 26px 0 70px rgba(0, 0, 0, 0.46), 0 0 32px rgba(45, 212, 191, 0.16) !important;
  }

  .shell-brand {
    min-height: 48px !important;
    padding: 6px !important;
    border-radius: 14px !important;
  }

  .shell-brand .logo-img {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  .shell-brand h1 {
    font-size: 0.8rem !important;
    line-height: 1 !important;
  }

  .shell-brand p {
    font-size: 0.58rem !important;
  }

  .sidebar-nav {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 2px 2px 12px 0 !important;
    overscroll-behavior: contain !important;
  }

  .nav-section-label {
    margin: 9px 7px 5px !important;
    font-size: 0.52rem !important;
    letter-spacing: 0.09em !important;
  }

  .sidebar .nav-btn,
  .sidebar .nav-group-toggle,
  .sidebar .logout-btn {
    min-height: 34px !important;
    border-radius: 11px !important;
    font-size: 0.72rem !important;
    line-height: 1.1 !important;
    padding: 7px 8px !important;
    margin-bottom: 5px !important;
  }

  .sidebar .nav-btn::before,
  .sidebar .nav-group-toggle::before {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    border-radius: 7px !important;
    font-size: 0.48rem !important;
  }

  .nav-group {
    margin-bottom: 6px !important;
    padding: 5px !important;
    border-radius: 13px !important;
  }

  .nav-submenu {
    gap: 4px !important;
    padding: 4px 0 0 4px !important;
  }

  .sidebar-footer {
    position: sticky !important;
    bottom: 0 !important;
    padding-top: 8px !important;
    background: linear-gradient(180deg, rgba(3, 9, 21, 0), rgba(3, 9, 21, 0.98) 35%) !important;
  }

  .main .page-section {
    padding: 14px 10px 26px !important;
  }

  .notification-panel {
    position: fixed !important;
    top: calc(var(--shell-topbar) + 8px) !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-height: min(72dvh, 520px) !important;
    overflow-y: auto !important;
    z-index: 16000 !important;
  }

  .dialog-panel,
  .wide-dialog,
  .manual-invoice-dialog {
    width: calc(100vw - 18px) !important;
    max-width: calc(100vw - 18px) !important;
    max-height: calc(100dvh - 22px) !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 430px) {
  .sidebar.vv-sidebar {
    width: min(72vw, 264px) !important;
    max-width: 264px !important;
  }

  .topbar-title p {
    max-width: 34vw !important;
  }

  .sidebar .nav-btn,
  .sidebar .nav-group-toggle,
  .sidebar .logout-btn {
    font-size: 0.68rem !important;
  }
}

/* Universal responsive operations audit - 20260702 */
:root {
  --vv-mobile-gutter: clamp(10px, 3.8vw, 18px);
  --vv-card-radius: clamp(14px, 3vw, 20px);
  --vv-hit: 44px;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}

button,
[role="button"],
.nav-btn,
.nav-group-toggle,
.quick-pill,
.primary-btn,
.secondary-btn,
.danger-btn,
.success-btn,
.ghost-btn,
.small-btn,
.icon-btn {
  min-height: var(--vv-hit);
}

.main,
.page-section,
.section-head,
.topbar,
.card,
.data-panel,
.table-wrap,
.mini-table-wrap,
.dialog-panel,
.dialog-card,
.form-grid,
.stock-dialog-grid,
.metric-grid,
.dashboard-kpis,
.chart-grid,
.command-status-grid,
.command-insight-strip,
.expense-chart-grid,
.supplier-intelligence-grid,
.staff-dashboard-grid,
.roster-card-grid,
.register-shell,
.register-list,
.register-controls,
.notification-panel {
  min-width: 0;
  max-width: 100%;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.table-wrap,
.mini-table-wrap,
.table-container,
.register-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.sidebar-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(3, 8, 20, 0), rgba(3, 8, 20, 0.96) 28%);
}

.notification-panel {
  z-index: 23000;
}

.dialog-backdrop,
.modal-backdrop,
#dialogBackdrop {
  z-index: 24000;
}

@media (min-width: 1440px) {
  .main {
    padding-inline: clamp(32px, 3vw, 56px);
  }

  .metric-grid.dashboard-kpis,
  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-insight-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  body.mobile-menu-open,
  html.mobile-menu-open {
    overflow: auto;
  }

  .topbar-menu-btn,
  .mobile-menu-btn,
  .mobile-sidebar-backdrop {
    display: none !important;
  }

  .sidebar.vv-sidebar,
  .sidebar {
    transform: none !important;
  }

  .metric-grid,
  .dashboard-kpis,
  .command-status-grid,
  .chart-grid,
  .expense-chart-grid,
  .supplier-intelligence-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid,
  .stock-dialog-grid,
  .dialog-grid,
  .customer-form-grid,
  .supplier-form-grid,
  .expense-dialog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  body,
  html {
    overflow-x: hidden !important;
  }

  body.mobile-menu-open,
  html.mobile-menu-open {
    overflow: hidden !important;
  }

  .app-shell {
    display: block !important;
    width: 100%;
    min-height: 100dvh;
  }

  .main {
    width: 100%;
    max-width: 100vw;
    padding: calc(82px + env(safe-area-inset-top, 0px)) var(--vv-mobile-gutter) calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden;
  }

  .topbar.vv-topbar,
  .topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 18000;
    min-height: calc(66px + env(safe-area-inset-top, 0px));
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: calc(9px + env(safe-area-inset-top, 0px)) var(--vv-mobile-gutter) 9px;
    border-bottom: 1px solid rgba(56, 213, 225, 0.18);
    background: rgba(3, 8, 20, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .topbar-title {
    min-width: 0;
  }

  .topbar-title h2,
  .topbar h2 {
    font-size: clamp(17px, 4.4vw, 23px) !important;
    line-height: 1.08;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-title p,
  .topbar-kicker {
    display: none !important;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }

  .topbar-quick-action,
  .live-pill,
  .profile-chip #profileNameLabel {
    display: none !important;
  }

  .profile-chip,
  .notification-bell,
  .topbar-menu-btn,
  .mobile-menu-btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 15px;
  }

  .topbar-menu-btn,
  .mobile-menu-btn {
    display: inline-grid !important;
    place-items: center;
    position: relative !important;
    inset: auto !important;
    z-index: 18100;
    background: linear-gradient(145deg, rgba(8, 47, 73, 0.94), rgba(2, 6, 23, 0.98));
    border: 1px solid rgba(103, 232, 249, 0.42);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  }

  .topbar-menu-btn span,
  .mobile-menu-btn span {
    width: 20px;
    height: 2px;
    margin: 2px 0;
    border-radius: 999px;
    background: #67e8f9;
  }

  body.mobile-menu-open .topbar-menu-btn span:nth-child(1),
  html.mobile-menu-open .topbar-menu-btn span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.mobile-menu-open .topbar-menu-btn span:nth-child(2),
  html.mobile-menu-open .topbar-menu-btn span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-menu-open .topbar-menu-btn span:nth-child(3),
  html.mobile-menu-open .topbar-menu-btn span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-sidebar-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 19000;
    opacity: 0;
    pointer-events: none;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 180ms ease;
  }

  body.mobile-menu-open .mobile-sidebar-backdrop,
  html.mobile-menu-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar.vv-sidebar,
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 20000 !important;
    width: min(72vw, 292px) !important;
    max-width: calc(100vw - 68px) !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 10px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 0 18px 18px 0 !important;
    border-right: 1px solid rgba(103, 232, 249, 0.3) !important;
    overflow: hidden !important;
    transform: translateX(calc(-100% - 18px)) !important;
    transition: transform 220ms cubic-bezier(.2,.8,.2,1) !important;
    background: linear-gradient(180deg, rgba(3, 8, 20, 0.98), rgba(7, 17, 32, 0.97));
    box-shadow: 24px 0 64px rgba(0, 0, 0, 0.46);
  }

  body.mobile-menu-open .sidebar.vv-sidebar,
  body.mobile-menu-open .sidebar,
  html.mobile-menu-open .sidebar.vv-sidebar,
  html.mobile-menu-open .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-nav {
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar .brand,
  .shell-brand {
    min-height: 48px !important;
    padding: 7px !important;
    border-radius: 14px !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center;
  }

  .sidebar .logo-img,
  .shell-brand .logo-img {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  .sidebar .brand h1,
  .shell-brand h1 {
    font-size: 0.82rem !important;
    line-height: 1.05;
  }

  .sidebar .brand p,
  .shell-brand p {
    font-size: 0.62rem !important;
    line-height: 1.15;
  }

  .nav-section-label {
    margin: 9px 6px 5px !important;
    font-size: 0.55rem !important;
  }

  .sidebar .nav-btn,
  .sidebar .nav-group-toggle,
  .sidebar .logout-btn {
    min-height: 36px !important;
    margin-bottom: 5px !important;
    padding: 7px 8px !important;
    border-radius: 11px !important;
    font-size: 0.72rem !important;
    line-height: 1.12 !important;
  }

  .sidebar .nav-btn::before,
  .sidebar .nav-group-toggle::before {
    flex-basis: 22px !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 8px !important;
    font-size: 0.54rem !important;
  }

  .sidebar .nav-sub-btn {
    min-height: 33px !important;
    padding-left: 9px !important;
    font-size: 0.68rem !important;
  }

  .nav-group {
    margin-bottom: 6px !important;
    padding: 5px !important;
    border-radius: 13px !important;
  }

  .notification-panel {
    position: fixed !important;
    top: calc(64px + env(safe-area-inset-top, 0px)) !important;
    right: var(--vv-mobile-gutter) !important;
    left: var(--vv-mobile-gutter) !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(70dvh, 520px) !important;
    overflow-y: auto;
    border-radius: 18px !important;
  }

  .section-head,
  .page-toolbar,
  .register-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .section-actions,
  .dashboard-action-row,
  .home-command-actions,
  .staff-top-actions,
  .card-actions,
  .terminal-actions,
  .register-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
  }

  .quick-pill,
  .primary-btn,
  .secondary-btn,
  .danger-btn,
  .success-btn,
  .ghost-btn,
  .small-btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .metric-grid,
  .dashboard-kpis,
  .command-status-grid,
  .chart-grid,
  .expense-chart-grid,
  .supplier-intelligence-grid,
  .staff-dashboard-grid,
  .roster-card-grid,
  .command-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .form-grid,
  .stock-dialog-grid,
  .dialog-grid,
  .customer-form-grid,
  .material-dialog-grid,
  .supplier-form-grid,
  .expense-dialog-grid,
  .manual-invoice-dialog .stock-dialog-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .home-command-hero,
  .staff-mission-hero {
    grid-template-columns: 1fr !important;
    padding: clamp(16px, 3vw, 24px) !important;
  }

  .home-command-orb {
    display: none !important;
  }

  .card,
  .data-panel,
  .dialog-card,
  .command-status-card,
  .command-insight-card,
  .command-chart-card,
  .supplier-intelligence-card,
  .staff-action-card,
  .profile-block,
  .stock-table-card {
    border-radius: var(--vv-card-radius) !important;
    padding: clamp(13px, 2.5vw, 18px) !important;
  }

  .chart-grid .card,
  .command-chart-card,
  .finance-chart-card,
  .expense-chart-grid .card {
    min-height: 260px !important;
  }

  .chart-grid canvas,
  .command-chart-card canvas,
  .finance-chart-card canvas,
  .expense-chart-grid canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: clamp(190px, 34vw, 250px) !important;
    max-height: 260px !important;
  }

  .dialog-backdrop,
  .modal-backdrop,
  #dialogBackdrop {
    align-items: flex-start !important;
    padding: calc(10px + env(safe-area-inset-top, 0px)) var(--vv-mobile-gutter) calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
  }

  .dialog-panel,
  .dialog-panel.wide-dialog,
  .dialog-panel.material-dialog,
  .dialog-panel.supplier-dialog,
  .expense-dialog-panel,
  .manual-invoice-dialog .dialog-panel {
    width: 100% !important;
    max-width: calc(100vw - (var(--vv-mobile-gutter) * 2)) !important;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #dialogBody,
  .dialog-body,
  .modal-body {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dialog-actions,
  .modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
    padding-top: 10px;
    background: linear-gradient(180deg, rgba(9, 19, 36, 0), rgba(9, 19, 36, 0.98) 34%);
  }

  .dialog-actions button,
  .modal-actions button {
    width: 100%;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px !important;
  }

  textarea {
    min-height: 112px;
  }
}

@media (max-width: 767px) {
  :root {
    --vv-hit: 42px;
  }

  .main {
    padding-top: calc(74px + env(safe-area-inset-top, 0px)) !important;
  }

  .topbar.vv-topbar,
  .topbar {
    min-height: calc(62px + env(safe-area-inset-top, 0px));
    gap: 8px;
  }

  .sidebar.vv-sidebar,
  .sidebar {
    width: min(68vw, 250px) !important;
    max-width: calc(100vw - 76px) !important;
  }

  .sidebar .nav-btn,
  .sidebar .nav-group-toggle,
  .sidebar .logout-btn {
    min-height: 34px !important;
    font-size: 0.68rem !important;
  }

  .sidebar .nav-sub-btn {
    min-height: 31px !important;
    font-size: 0.64rem !important;
  }

  .metric-grid,
  .dashboard-kpis,
  .command-status-grid,
  .chart-grid,
  .expense-chart-grid,
  .supplier-intelligence-grid,
  .staff-dashboard-grid,
  .roster-card-grid,
  .command-insight-strip,
  .section-actions,
  .dashboard-action-row,
  .home-command-actions,
  .staff-top-actions,
  .card-actions,
  .terminal-actions,
  .register-actions {
    grid-template-columns: 1fr !important;
  }

  .home-command-copy h1,
  .staff-mission-copy h1,
  .page-section h1 {
    font-size: clamp(25px, 8vw, 34px) !important;
    line-height: 1.04;
  }

  .card h3,
  .data-panel h3,
  .command-status-card h3 {
    font-size: clamp(15px, 4.3vw, 19px) !important;
  }

  .card p,
  .data-panel p,
  .command-status-card p {
    overflow-wrap: anywhere;
  }

  .table-wrap,
  .mini-table-wrap,
  .table-container,
  .register-table-wrap {
    overflow: visible !important;
  }

  table.responsive-table,
  table.responsive-table thead,
  table.responsive-table tbody,
  table.responsive-table tr,
  table.responsive-table th,
  table.responsive-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  table.responsive-table {
    border: 0 !important;
    background: transparent !important;
  }

  table.responsive-table thead {
    display: none !important;
  }

  table.responsive-table tbody {
    display: grid !important;
    gap: 12px !important;
  }

  table.responsive-table tr {
    padding: 11px !important;
    border: 1px solid rgba(56, 213, 225, 0.24) !important;
    border-radius: 16px !important;
    background: linear-gradient(145deg, rgba(9, 18, 34, 0.9), rgba(5, 13, 26, 0.92)) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  }

  table.responsive-table td {
    display: grid !important;
    grid-template-columns: minmax(92px, 36%) minmax(0, 1fr) !important;
    align-items: start;
    gap: 8px !important;
    padding: 8px 2px !important;
    border: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word;
    font-size: 0.86rem !important;
    line-height: 1.25 !important;
  }

  table.responsive-table td + td {
    border-top: 1px solid rgba(148, 163, 184, 0.12) !important;
  }

  table.responsive-table td::before {
    content: attr(data-label);
    color: #5eead4;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  table.responsive-table td:last-child {
    display: flex !important;
    flex-wrap: wrap;
    grid-template-columns: none !important;
    gap: 8px !important;
    padding-top: 11px !important;
  }

  table.responsive-table td:last-child::before {
    flex: 0 0 100%;
  }

  table.responsive-table td button,
  table.responsive-table td .small-btn,
  table.responsive-table td .danger-btn,
  table.responsive-table td .secondary-btn,
  table.responsive-table td .icon-btn {
    flex: 1 1 118px;
    min-width: min(118px, 100%);
    min-height: 40px !important;
    margin: 0 !important;
  }

  .register-controls {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .register-controls select,
  .register-controls button {
    width: 100%;
  }

  .notification-panel {
    top: calc(60px + env(safe-area-inset-top, 0px)) !important;
    right: 10px !important;
    left: 10px !important;
  }

  .dialog-panel,
  .dialog-panel.wide-dialog,
  .dialog-panel.material-dialog,
  .dialog-panel.supplier-dialog,
  .expense-dialog-panel,
  .manual-invoice-dialog .dialog-panel {
    border-radius: 18px !important;
  }
}

@media (max-width: 390px) {
  .sidebar.vv-sidebar,
  .sidebar {
    width: min(66vw, 232px) !important;
    max-width: calc(100vw - 82px) !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .sidebar .brand,
  .shell-brand {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    min-height: 44px !important;
  }

  .sidebar .logo-img,
  .shell-brand .logo-img {
    width: 30px !important;
    height: 30px !important;
  }

  .sidebar .brand h1,
  .shell-brand h1 {
    font-size: 0.76rem !important;
  }

  .sidebar .brand p,
  .shell-brand p {
    font-size: 0.58rem !important;
  }

  .sidebar .nav-btn,
  .sidebar .nav-group-toggle,
  .sidebar .logout-btn {
    min-height: 32px !important;
    padding: 6px 7px !important;
    font-size: 0.63rem !important;
  }

  .sidebar .nav-btn::before,
  .sidebar .nav-group-toggle::before {
    flex-basis: 20px !important;
    width: 20px !important;
    height: 20px !important;
  }

  .topbar-title h2,
  .topbar h2 {
    font-size: 17px !important;
  }
}




/* Voxel Veda AI assistant widget */
.vv-ai-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: grid;
  justify-items: end;
  gap: 12px;
  font-family: inherit;
}

.vv-ai-toggle,
.vv-ai-close,
.vv-ai-quick-actions button,
.vv-ai-input-row button,
.vv-ai-actions button,
.vv-ai-actions a {
  font: inherit;
}

.vv-ai-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(125, 244, 255, .42);
  border-radius: 20px 20px 6px 20px;
  color: #061b2d;
  background: linear-gradient(135deg, #9df8ff, #1ccdf0 48%, #0877ff);
  box-shadow: 0 18px 42px rgba(4, 146, 207, .3), inset 0 1px 0 rgba(255,255,255,.82);
  cursor: pointer;
  font-weight: 950;
}

.vv-ai-orb {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 13px 13px 4px 13px;
  color: #e8fbff;
  background: #061b2d;
  font-size: 12px;
  letter-spacing: 0;
}

.vv-ai-panel {
  width: min(390px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(37, 215, 238, .34);
  border-radius: 0 28px 0 28px;
  color: #061b2d;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(229,248,255,.96));
  box-shadow: 0 28px 80px rgba(3, 25, 42, .24), inset 0 1px 0 rgba(255,255,255,.95);
  backdrop-filter: blur(18px);
}

.vv-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.vv-ai-head h2 {
  margin: 0;
  color: #061b2d;
  font-size: 24px;
  line-height: 1.05;
}

.vv-ai-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 14px 14px 4px 14px;
  color: #08324d;
  background: rgba(7, 119, 255, .08);
  cursor: pointer;
  font-weight: 900;
}

.vv-ai-messages {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  padding: 4px 2px 10px;
}

.vv-ai-message {
  width: fit-content;
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 15px 15px 5px 15px;
  font-size: 13px;
  line-height: 1.45;
}

.vv-ai-message.bot {
  color: #173146;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(5,80,120,.12);
}

.vv-ai-message.user {
  justify-self: end;
  color: #031726;
  background: linear-gradient(135deg, #9df8ff, #1ccdf0);
}

.vv-ai-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
}

.vv-ai-quick-actions button,
.vv-ai-actions button,
.vv-ai-actions a,
.vv-ai-input-row button {
  border: 1px solid rgba(5, 80, 120, .14);
  border-radius: 14px 14px 5px 14px;
  color: #10283a;
  background: rgba(255,255,255,.78);
  text-decoration: none;
  cursor: pointer;
  font-weight: 850;
}

.vv-ai-quick-actions button {
  min-height: 36px;
  font-size: 12px;
}

.vv-ai-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.vv-ai-input-row input {
  min-width: 0;
  border: 1px solid rgba(5, 80, 120, .16);
  border-radius: 16px 16px 5px 16px;
  padding: 11px 12px;
  color: #061b2d;
  background: rgba(255,255,255,.86);
}

.vv-ai-input-row button {
  padding: 0 14px;
  background: linear-gradient(135deg, #9df8ff, #1ccdf0);
}

.vv-ai-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.vv-ai-actions button,
.vv-ai-actions a {
  padding: 9px 11px;
  font-size: 12px;
}

.vv-ai-toggle:hover,
.vv-ai-quick-actions button:hover,
.vv-ai-actions button:hover,
.vv-ai-actions a:hover,
.vv-ai-input-row button:hover {
  transform: translateY(-2px);
}

@media (max-width: 620px) {
  .vv-ai-widget {
    right: 14px;
    bottom: 14px;
    left: 14px;
    justify-items: stretch;
  }

  .vv-ai-toggle {
    justify-content: center;
  }

  .vv-ai-panel {
    width: auto;
  }

  .vv-ai-quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Advanced Voxel Veda AI intake polish */
.vv-ai-widget.is-open .vv-ai-toggle {
  transform: translateY(-2px) scale(.98);
}

.vv-ai-stage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(13, 148, 180, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: #0e7490;
  font-size: 11px;
  font-weight: 900;
}

.vv-ai-stage strong {
  display: inline-grid;
  min-width: 34px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  color: #031726;
  background: linear-gradient(135deg, #a7f3ff, #22d3ee);
}

.vv-ai-insight-card {
  display: grid;
  gap: 8px;
  width: min(100%, 290px);
  padding: 12px;
  border: 1px solid rgba(13, 148, 180, .18);
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(225,246,255,.86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.vv-ai-insight-card div {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  line-height: 1.35;
}

.vv-ai-insight-card strong {
  color: #075985;
}

.vv-ai-insight-card span {
  color: #173146;
}

.vv-ai-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vv-ai-actions button,
.vv-ai-actions a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 420px) {
  .vv-ai-panel {
    padding: 16px;
  }

  .vv-ai-head h2 {
    font-size: 21px;
  }

  .vv-ai-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Voxel Veda AI triage upgrade */
.vv-ai-quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vv-ai-quick-actions button:nth-last-child(-n+2) {
  background: linear-gradient(135deg, rgba(230, 250, 255, .94), rgba(174, 243, 255, .78));
  border-color: rgba(14, 165, 233, .24);
}

.vv-ai-insight-card h3 {
  margin: 0 0 4px;
  color: #063047;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.vv-ai-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 92%;
}

.vv-ai-chip-row span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(6, 182, 212, .28);
  border-radius: 999px;
  color: #064e64;
  background: rgba(209, 250, 254, .78);
  font-size: 11px;
  font-weight: 900;
}

.vv-ai-panel {
  position: relative;
  overflow: hidden;
}

.vv-ai-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 145, 178, .07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(8, 145, 178, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 72%);
}

.vv-ai-panel > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 620px) {
  .vv-ai-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* End Voxel Veda AI triage upgrade */
/* End advanced Voxel Veda AI intake polish */
/* End Voxel Veda AI assistant widget */

/* ================= WORKFORCE OPS SUITE 20260703 ================= */
.workforce-command-metrics,
.roster-command-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workforce-action-centre,
.roster-intelligence-card {
  border-color: rgba(48, 213, 230, 0.34);
  background: linear-gradient(135deg, rgba(12, 26, 44, 0.96), rgba(9, 31, 39, 0.88));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.04);
}

.timesheet-send-grid {
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
  align-items: end;
}

.roster-signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.roster-signal-card,
.roster-week-card {
  border: 1px solid rgba(48, 213, 230, 0.28);
  border-radius: 14px;
  padding: 14px;
  background: rgba(3, 10, 25, 0.55);
  min-width: 0;
}

.roster-signal-card span,
.roster-week-card span,
.roster-week-card small {
  display: block;
  color: rgba(224, 242, 254, 0.72);
  font-size: 0.78rem;
}

.roster-signal-card strong,
.roster-week-card strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 1rem;
}

.roster-signal-card.ok { border-color: rgba(34, 197, 94, 0.38); }
.roster-signal-card.warn { border-color: rgba(250, 204, 21, 0.45); }
.roster-signal-card.danger { border-color: rgba(248, 113, 113, 0.48); }
.roster-signal-card.info { border-color: rgba(56, 189, 248, 0.42); }

.roster-week-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.empty-state.compact {
  padding: 14px;
  border: 1px dashed rgba(48, 213, 230, 0.32);
  border-radius: 12px;
  color: rgba(224, 242, 254, 0.7);
}

@media (max-width: 1023px) {
  .workforce-command-metrics,
  .roster-command-metrics,
  .roster-signal-grid,
  .timesheet-send-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .workforce-command-metrics,
  .roster-command-metrics,
  .roster-signal-grid,
  .timesheet-send-grid,
  .roster-generator-grid {
    grid-template-columns: 1fr !important;
  }

  .workforce-action-centre .section-head,
  .roster-intelligence-card .section-head {
    gap: 12px;
  }

  .workforce-action-centre .card-actions,
  .roster-intelligence-card .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .workforce-action-centre .card-actions button,
  .roster-intelligence-card .card-actions button {
    width: 100%;
    min-height: 44px;
  }
}