/* ==========================================================================
   PULSE GUARD // RESTAURANT & BAR OPERATIONS OS
   Professional Hospitality & Back-of-House Inventory Architecture
   Warm Culinary Dark Obsidian & Glare-Free Crisp Stone Light Mode
   Clean Solid Tactile Cards (Zero Sci-Fi Glass Blur / Zero Neon Purple)
   Customizable Shift Roster & Direct Wholesale Ordering
   ========================================================================== */

/* 1. DESIGN TOKENS & MINIMALIST RESTAURANT OS PALETTE */
:root {
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* 6 Core Modern Minimalist Tokens (Neutral Tones + Single Accent) */
  --bg-app: #09090b;          /* Neutral Deep Zinc canvas */
  --bg-surface: #18181b;      /* Tactile surface card */
  --text-primary: #f4f4f5;    /* High-contrast crisp text (WCAG AAA) */
  --text-secondary: #a1a1aa;  /* Balanced secondary zinc (WCAG AA) */
  --border: #27272a;          /* Clean subtle border */
  --accent: #3b82f6;          /* Singular precision Cobalt Blue */

  /* Functional & State Tokens derived from Core Palette */
  --accent-hover: #2563eb;
  --accent-active: #1d4ed8;
  --accent-subtle: rgba(59, 130, 246, 0.12);
  --accent-border: rgba(59, 130, 246, 0.35);

  --copper-primary: var(--accent);
  --copper-hover: var(--accent-hover);
  --copper-bg: var(--accent-subtle);
  --copper-border: var(--accent-border);

  --culinary-green: #10b981;
  --culinary-green-hover: #34d399;
  --culinary-green-bg: rgba(16, 185, 129, 0.12);
  --culinary-green-border: rgba(16, 185, 129, 0.35);

  --culinary-amber: #f59e0b;
  --culinary-amber-hover: #fbbf24;
  --culinary-amber-bg: rgba(245, 158, 11, 0.12);
  --culinary-amber-border: rgba(245, 158, 11, 0.35);

  --culinary-orange: #f97316;
  --culinary-orange-hover: #fb923c;
  --culinary-orange-bg: rgba(249, 115, 22, 0.12);
  --culinary-orange-border: rgba(249, 115, 22, 0.35);

  --culinary-red: #ef4444;
  --culinary-red-hover: #f87171;
  --culinary-red-bg: rgba(239, 68, 68, 0.12);
  --culinary-red-border: rgba(239, 68, 68, 0.35);

  --sidebar-width: 255px;
  
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  --transition-speed: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* DARK MODE: WARM OBSIDIAN & TACTILE RESTAURANT SLATE (NIGHT SHIFT & KITCHEN) */
body.theme-dark {
  --bg-app: #09090b;
  --bg-sidebar: var(--bg-surface);
  --bg-card: var(--bg-surface);
  --bg-surface: #18181b;
  --bg-surface-elevated: #27272a;
  --bg-input: #121215;

  --border-subtle: var(--border);
  --border-medium: #3f3f46;
  --border-focus: var(--accent);
  --border-divider: var(--border);

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --color-cyan: var(--accent);
  --color-green: #10b981;
  --color-amber: #f59e0b;
  --color-orange: #f97316;
  --color-red: #ef4444;
  --color-purple: var(--text-secondary);

  --badge-s1-bg: rgba(245, 158, 11, 0.12);
  --badge-s1-text: #fbbf24;
  --badge-s1-border: rgba(245, 158, 11, 0.3);

  --badge-s2-bg: rgba(249, 115, 22, 0.12);
  --badge-s2-text: #fb923c;
  --badge-s2-border: rgba(249, 115, 22, 0.3);

  --badge-s3-bg: rgba(239, 68, 68, 0.12);
  --badge-s3-text: #f87171;
  --badge-s3-border: rgba(239, 68, 68, 0.3);

  --badge-hl-bg: rgba(16, 185, 129, 0.12);
  --badge-hl-text: #34d399;
  --badge-hl-border: rgba(16, 185, 129, 0.3);

  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* LIGHT MODE: CRISP LINEN & WARM STONE SLATE (DAY SHIFT & FLOOR MANAGEMENT) */
body.theme-light {
  --bg-app: #f4f4f5;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f4f4f5;
  --bg-input: #ffffff;

  --border: #e4e4e7;
  --border-subtle: var(--border);
  --border-medium: #d4d4d8;
  --border-focus: var(--accent);
  --border-divider: var(--border);

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-active: #1e40af;
  --accent-subtle: rgba(37, 99, 235, 0.08);
  --accent-border: rgba(37, 99, 235, 0.25);

  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;

  --color-cyan: var(--accent);
  --color-green: #15803d;
  --color-amber: #b45309;
  --color-orange: #c2410c;
  --color-red: #b91c1c;
  --color-purple: var(--text-secondary);

  --badge-s1-bg: #fffbeb;
  --badge-s1-text: #92400e;
  --badge-s1-border: #fde68a;

  --badge-s2-bg: #fff7ed;
  --badge-s2-text: #9a3412;
  --badge-s2-border: #fed7aa;

  --badge-s3-bg: #fef2f2;
  --badge-s3-text: #991b1b;
  --badge-s3-border: #fecaca;

  --badge-hl-bg: #f0fdf4;
  --badge-hl-text: #166534;
  --badge-hl-border: #bbf7d0;

  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 2. BASE RESETS & SLEEK MINIMAL SCROLLBAR SYSTEM */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
}

:root {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

html.light, body.theme-light {
  scrollbar-color: rgba(71, 85, 105, 0.32) transparent;
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-display);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  touch-action: none;
}

button, a, input, select, textarea, [role="button"] {
  touch-action: manipulation;
}

/* MINIMAL GLOBAL WEBKIT SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.28);
  border-radius: 9999px;
  border: 1px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent);
}

::-webkit-scrollbar-thumb:active {
  background-color: var(--accent-hover);
}

::-webkit-scrollbar-corner {
  background: transparent !important;
}

/* Light Mode Global Scrollbar */
body.theme-light ::-webkit-scrollbar-thumb {
  background-color: rgba(113, 113, 122, 0.32);
}

body.theme-light ::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent);
}

body.theme-light ::-webkit-scrollbar-thumb:active {
  background-color: var(--accent-hover);
}

/* ACCESSIBILITY: SKIP TO CONTENT */
.skip-link {
  position: fixed;
  top: -120px;
  left: 1rem;
  background: var(--color-cyan);
  color: #ffffff !important;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  z-index: 99999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}
body.theme-light .skip-link {
  background: var(--color-cyan);
}

/* ACCESSIBILITY: SCREEN READER ONLY UTILITY */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ACCESSIBILITY: HIGH CONTRAST FOCUS VISIBLE */
:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}
body.theme-light :focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
.story-pill:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}
body.theme-light button:focus-visible,
body.theme-light a:focus-visible,
body.theme-light input:focus-visible,
body.theme-light select:focus-visible,
body.theme-light [role="button"]:focus-visible,
body.theme-light .story-pill:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}

/* ACCESSIBILITY: PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .copilot-pulse-dot,
  .status-online-dot,
  .modal-dialog-box,
  .toast-notification {
    animation: none !important;
    transition: none !important;
  }
}

/* TYPOGRAPHY & UTILITY CLASSES */
.font-mono { font-family: var(--font-mono); }
.text-cyan { color: var(--color-cyan) !important; font-weight: 700; }
.text-green { color: var(--color-green) !important; font-weight: 700; }
.text-amber { color: var(--color-amber) !important; font-weight: 700; }
.text-orange { color: var(--color-orange) !important; font-weight: 700; }
.text-red { color: var(--color-red) !important; font-weight: 700; }
.text-purple { color: var(--color-purple) !important; font-weight: 700; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }

.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* 3. SOLID TACTILE CARDS & RESTAURANT STATUS BADGES */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.glass-card:hover {
  border-color: var(--border-medium);
}

.badge-stage1 {
  background: var(--badge-s1-bg);
  color: var(--badge-s1-text);
  border: 1px solid var(--badge-s1-border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-stage2 {
  background: var(--badge-s2-bg);
  color: var(--badge-s2-text);
  border: 1px solid var(--badge-s2-border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-stage3 {
  background: var(--badge-s3-bg);
  color: var(--badge-s3-text);
  border: 1px solid var(--badge-s3-border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-healthy {
  background: var(--badge-hl-bg);
  color: var(--badge-hl-text);
  border: 1px solid var(--badge-hl-border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* BUTTONS (+10px BORDER RADII) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.55rem 1.15rem;
  border-radius: 18px; /* thickened (+10px) */
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-speed);
  outline: none;
  white-space: nowrap;
}
.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.74rem;
  border-radius: 16px; /* thickened (+10px) */
}
.btn-primary {
  background: var(--color-cyan);
  color: #ffffff;
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-ghost:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}
body.theme-light .btn-ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
body.theme-light .btn-ghost:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

.btn-danger {
  background: var(--color-red);
  color: #ffffff;
  border-color: var(--color-red);
}
.btn-danger:hover {
  filter: brightness(1.1);
}
.btn-delete {
  color: var(--color-red) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}
.btn-delete:hover {
  background: rgba(220, 38, 38, 0.14) !important;
  border-color: var(--color-red) !important;
}

.btn-success {
  background: rgba(34, 197, 94, 0.16);
  color: var(--color-green);
  border: 1.5px solid rgba(34, 197, 94, 0.4);
}
.btn-success:hover {
  background: rgba(34, 197, 94, 0.28);
  border-color: var(--color-green);
}
body.theme-light .btn-success {
  background: rgba(21, 128, 61, 0.16);
  color: var(--color-green);
  border: 1.5px solid rgba(21, 128, 61, 0.5);
}

/* FORM CONTROLS (+10px BORDER RADII) */
.form-input, .form-select {
  width: 100%;
  padding: 0.6rem 0.95rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 18px; /* thickened (+10px) */
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-speed);
}
.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
}
.form-control-group {
  margin-bottom: 0.85rem;
}
.form-label-styled {
  display: block;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.form-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* 4. LEFT SIDEBAR */
.sidebar-shell {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  z-index: 50;
  transition: background-color var(--transition-speed);
}
.sidebar-header {
  margin-bottom: 1.25rem;
}
.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  margin-bottom: 1rem;
}
.minimal-logo-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pulse-shield-svg {
  width: 100%;
  height: 100%;
}

/* DYNAMIC LOGO SVG STROKES (Dark Mode & Light Mode) */
body.theme-dark .logo-shield-path {
  stroke: var(--color-cyan);
}
body.theme-dark .logo-pulse-path {
  stroke: var(--text-primary);
}

body.theme-light .logo-shield-path {
  stroke: var(--color-cyan);
}
body.theme-light .logo-pulse-path {
  stroke: var(--text-primary);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
}
.brand-accent {
  color: var(--color-cyan);
}
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 1px;
}

/* THEME TOGGLE SWITCH */
.theme-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px; /* thickened (+10px) */
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-speed);
}
.theme-toggle-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
  color: var(--text-primary);
}
.theme-toggle-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.theme-micro-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-speed);
}
body.theme-dark .theme-micro-pill {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent-border);
}
body.theme-light .theme-micro-pill {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* THEME TOGGLE ICONS: Dark mode shows active Moon; Light mode shows active Sun */
body.theme-dark .moon-icon {
  display: inline-block !important;
  width: 14px;
  height: 14px;
  color: var(--accent);
}
body.theme-dark .sun-icon {
  display: none !important;
}

body.theme-light .sun-icon {
  display: inline-block !important;
  width: 14px;
  height: 14px;
  color: var(--accent);
}
body.theme-light .moon-icon {
  display: none !important;
}

/* NAVIGATION LINKS */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px; /* thickened (+10px) */
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-speed);
  text-align: left;
  position: relative;
}
.nav-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.nav-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--color-cyan);
  border-color: var(--border-subtle);
}
.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.nav-text {
  flex: 1;
}
.nav-counter-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(248, 113, 113, 0.2);
  color: var(--color-red);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.billing-nav-btn {
  border-color: rgba(74, 222, 128, 0.25);
  background: rgba(74, 222, 128, 0.04);
}
.billing-nav-btn:hover {
  background: rgba(74, 222, 128, 0.1);
  color: var(--color-green);
}
.nav-micro-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  background: rgba(74, 222, 128, 0.15);
  color: var(--color-green);
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-sm);
}

/* OPERATIONS ASSISTANT BUTTON IN SIDEBAR */
.force-copilot-nav-btn {
  margin-top: 0.5rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  position: relative;
}
.force-copilot-nav-btn:hover, .force-copilot-nav-btn.active {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
  color: var(--text-primary);
}
body.theme-light .force-copilot-nav-btn {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}
body.theme-light .force-copilot-nav-btn:hover, body.theme-light .force-copilot-nav-btn.active {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
  color: var(--text-primary);
}
.copilot-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-cyan);
}
.copilot-friend-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--accent-subtle);
  color: var(--color-cyan);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-border);
}

/* SIDEBAR FOOTER (Admin & Accounts Profile Button) */
.sidebar-bottom {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}
.profile-admin-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 18px; /* thickened (+10px) */
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  width: 100%;
  transition: all var(--transition-speed);
  text-align: left;
}
.profile-admin-btn:hover, .profile-admin-btn.active {
  border-color: var(--color-cyan);
  background: var(--bg-surface-elevated);
}
.profile-admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 16px; /* thickened (+10px) */
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
body.theme-light .profile-admin-avatar {
  background: var(--accent-subtle);
  border-color: var(--accent-border);
}
.profile-admin-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.profile-admin-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-admin-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--color-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 6px var(--color-green);
}

/* 5. WORKSPACE CONTAINER (Side-by-Side Flex Layout with DOCKED FORCE AI) */
.workspace-container {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  position: relative;
  align-items: flex-start;
  transition: all var(--transition-speed);
}

.main-viewport {
  margin-left: 0;
  flex: 1 1 0%;
  min-width: 0;
  padding: 1.75rem 2.25rem 5rem 2.25rem;
  width: auto;
  max-width: 100%;
  overflow-x: hidden;
  transition: padding var(--transition-speed);
}

.mobile-top-bar, .mobile-bottom-nav {
  display: none;
}
.page-pane {
  display: none;
  width: 100%;
}
.page-pane.active {
  display: block;
}

/* DOCKED FORCE COPILOT SIDE GRID BOX (Non-Blocking) */
.force-side-dock {
  width: 400px;
  min-width: 375px;
  max-width: 420px;
  height: calc(100vh - 2rem);
  position: sticky;
  top: 1rem;
  margin-right: 1.75rem;
  margin-left: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  z-index: 30;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              min-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              margin 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.3s ease;
}

.force-side-dock.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  padding: 0 !important;
  border: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.force-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.force-dock-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.force-dock-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  display: block;
}
.force-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--color-green);
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
}

.dock-tool-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-speed);
}
.dock-tool-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.force-side-dock .force-quick-prompts {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.6rem 0.85rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: none;
}
.force-side-dock .force-quick-prompts::-webkit-scrollbar {
  display: none;
}

.force-side-dock .force-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
}

.force-side-dock .force-input-container {
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
}

/* Floating Launcher Pill when Dock is Collapsed */
.force-dock-pill {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 50;
  transition: all 0.2s ease;
}
.force-dock-pill:hover {
  transform: translateY(-2px);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

/* APPRECIATION BUBBLE WITH CELEBRATION ANIMATION */
.appreciation-bubble {
  background: rgba(34, 197, 94, 0.14) !important;
  border: 1.5px solid rgba(34, 197, 94, 0.45) !important;
  color: var(--text-primary) !important;
  animation: celebratePop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
body.theme-light .appreciation-bubble {
  background: rgba(21, 128, 61, 0.12) !important;
  border: 1.5px solid rgba(21, 128, 61, 0.45) !important;
  color: var(--text-primary) !important;
}
@keyframes celebratePop {
  0% { transform: scale(0.92); opacity: 0; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

/* RESOLVED ORDERS FADE OUT */
.anim-fade-out {
  opacity: 0 !important;
  transform: translateY(-16px) scale(0.96) !important;
  transition: opacity 0.35s ease, transform 0.35s ease !important;
  pointer-events: none !important;
}

/* 6. PAGE 1: ALERTS FEED & SLEEK MINIMAL HORIZONTAL STRIPS */
.stories-strip-wrapper {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.65rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

body.theme-light .stories-strip-wrapper,
body.theme-light .category-pills-horizontal {
  scrollbar-color: rgba(71, 85, 105, 0.32) transparent;
}

.stories-strip-wrapper::-webkit-scrollbar,
.category-pills-horizontal::-webkit-scrollbar {
  height: 4px;
}

.stories-strip-wrapper::-webkit-scrollbar-track,
.category-pills-horizontal::-webkit-scrollbar-track {
  background: transparent !important;
}

.stories-strip-wrapper::-webkit-scrollbar-thumb,
.category-pills-horizontal::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.28);
  border-radius: 9999px;
  border: none;
  transition: background-color 0.2s ease;
}

.stories-strip-wrapper::-webkit-scrollbar-thumb:hover,
.category-pills-horizontal::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent);
}

body.theme-light .stories-strip-wrapper::-webkit-scrollbar-thumb,
body.theme-light .category-pills-horizontal::-webkit-scrollbar-thumb {
  background-color: rgba(113, 113, 122, 0.32);
}

body.theme-light .stories-strip-wrapper::-webkit-scrollbar-thumb:hover,
body.theme-light .category-pills-horizontal::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent);
}

.story-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.95rem;
  min-height: 44px;
  border-radius: 22px; /* thickened (+10px) */
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-speed), transform 0.12s ease;
}
.story-pill:hover, .story-pill.active-pill {
  border-color: var(--color-cyan);
  background: var(--bg-surface-elevated);
}
.story-pill:active {
  transform: scale(0.96);
}
.story-icon-ring {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.ring-all { background: var(--accent-subtle); color: var(--color-cyan); }
.ring-s3 { background: var(--badge-s3-bg); color: var(--color-red); }
.ring-s2 { background: var(--badge-s2-bg); color: var(--color-orange); }
.ring-s1 { background: var(--badge-s1-bg); color: var(--color-amber); }
.ring-cat { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.ring-resolved { background: var(--badge-hl-bg); color: var(--color-green); }

.story-pill.pill-resolved:hover, .story-pill.pill-resolved.active-pill {
  border-color: var(--color-green);
  background: var(--badge-hl-bg);
}
.story-pill-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* SECTION TITLE & FINANCIAL RISK BADGE */
.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.pastel-badge-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-cyan);
  background: var(--copper-bg);
  border: 1px solid var(--copper-border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.35rem;
}
body.theme-light .pastel-badge-tag {
  background: var(--copper-bg);
  color: var(--color-cyan);
  border-color: var(--copper-border);
}
.pastel-heading {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}
.pastel-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  max-width: 680px;
  line-height: 1.5;
}

.upcoming-risk-badge {
  background: var(--bg-card);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius-md); /* thickened (+10px) */
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.risk-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-red);
}
.risk-amount {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-red);
  line-height: 1.1;
  margin: 0.15rem 0;
}
.risk-detail {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ALERT CARDS */
.alerts-feed-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.alert-card-shell {
  padding: 1.35rem;
  border-radius: 26px; /* thickened (+10px) */
  transition: transform var(--transition-speed), border-color var(--transition-speed);
}
.alert-card-shell:hover {
  transform: translateY(-2px);
}
.alert-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-divider);
}
.alert-card-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.alert-category-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 20px; /* thickened (+10px) */
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan);
  flex-shrink: 0;
}
.alert-code-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-cyan);
}
.alert-prod-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.15rem;
}

.alert-card-body {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.horizon-telemetry-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.horizon-days-big {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  display: block;
}
.horizon-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  display: block;
}
.stock-balance-big {
  font-size: 1.15rem;
  font-weight: 800;
  display: block;
}

.unattended-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px; /* thickened (+10px) */
  padding: 0.85rem 1rem;
}
.unattended-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.unattended-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.unattended-loss-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-divider);
  font-size: 0.8rem;
}

.resolution-playbook-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px; /* thickened (+10px) */
  padding: 0.75rem 1rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.resolution-playbook-text {
  font-size: 0.8rem;
  color: var(--text-primary);
  flex: 1 1 min(100%, 260px);
}

.alert-action-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-divider);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.action-strip-btns {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* 7. PAGE 2: P&L INSIGHTS & CHARTS */
.pnl-hero-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pnl-hero-cell {
  padding: 1.25rem;
  border-radius: 24px; /* thickened (+10px) */
}
.pnl-cell-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}
.pnl-cell-value {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 900;
  margin: 0.25rem 0;
}
.pnl-cell-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.chart-container-wrapper {
  position: relative;
  height: 320px;
  width: 100%;
}
.focused-product-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.ledger-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  gap: 1rem;
}
.ledger-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px; /* thickened (+10px) */
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-speed);
}
.ledger-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-cyan);
}
.ledger-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.ledger-card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* 8. PAGE 3: STOCKS & SEPARATE LAST WEEK SALES BOXES */
.filter-controls-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.search-field-wrapper {
  position: relative;
  flex: 1 1 min(100%, 280px);
  width: 100%;
}
.search-field-ico {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.search-input-styled {
  padding-left: 2.4rem;
}
.category-pills-horizontal {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 0.2rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.cat-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  min-height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px; /* thickened (+10px) */
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-speed), transform 0.12s ease;
}
.cat-pill-btn:hover, .cat-pill-btn.active {
  background: var(--bg-surface-elevated);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}
.cat-pill-btn:active {
  transform: scale(0.96);
}

.category-dept-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 26px; /* thickened (+10px) */
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.category-dept-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-divider);
}
.dept-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}
.dept-sku-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px; /* thickened (+10px) */
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: transform var(--transition-speed);
}
.dept-sku-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-cyan);
}

/* LAST WEEK SALES VELOCITY PANEL & BOXES */
.velocity-master-panel {
  padding: 1.35rem;
  border-radius: 26px; /* thickened (+10px) */
  margin-top: 1.5rem;
}
.velocity-panel-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-divider);
  margin-bottom: 1rem;
}
.velocity-ico-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--copper-bg);
  border: 1px solid var(--copper-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.velocity-boxes-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.velocity-unit-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: border-color var(--transition-speed);
}
.velocity-unit-box:hover {
  border-color: var(--color-cyan);
}
.v-sku-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-cyan);
  background: var(--copper-bg);
  border: 1px solid var(--copper-border);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
}
.v-input-field {
  width: 90px;
  padding: 0.35rem 0.65rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  text-align: center;
}

/* 9. PAGE 4: ADMIN / ACCOUNTS & SHIFT ROSTER */
.profile-overview-card {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
}
.profile-meta-grid {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.profile-store-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--copper-bg);
  border: 1.5px solid var(--copper-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-details-column {
  flex: 1;
}
.profile-store-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
}
.status-pill-green {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-green);
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
}

.profile-stats-strip {
  display: flex;
  gap: 1.5rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}
.p-stat-item {
  display: flex;
  flex-direction: column;
}
.p-stat-number {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 900;
}
.p-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.profile-bio-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px; /* thickened (+10px) */
  padding: 0.85rem 1rem;
}
.manager-name-text {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}
.manager-role-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}
.manager-security-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border-divider);
}

/* MANAGERS CARDS & CENTERED SHIFT CONTACTS */
.managers-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 1rem;
}
.manager-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px; /* thickened (+10px) */
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition-speed);
}
.manager-card.is-active-duty {
  border-color: var(--color-green);
  box-shadow: 0 4px 18px rgba(74, 222, 128, 0.12);
}
.manager-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.mgr-avatar {
  width: 42px;
  height: 42px;
  border-radius: 20px; /* thickened (+10px) */
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--color-cyan);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.mgr-info-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.mgr-info-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.shift-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 16px; /* thickened (+10px) */
}
.shift-morning { background: var(--copper-bg); color: var(--color-cyan); border: 1px solid var(--copper-border); }
.shift-evening { background: var(--badge-s2-bg); color: var(--color-orange); border: 1px solid var(--badge-s2-border); }
.shift-night { background: rgba(113, 113, 122, 0.15); color: var(--text-secondary); border: 1px solid rgba(113, 113, 122, 0.3); }
.shift-general { background: var(--badge-s1-bg); color: var(--color-amber); border: 1px solid var(--badge-s1-border); }

/* Centered Shift Schedule Contact Chips */
.mgr-contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border-divider);
  border-bottom: 1px solid var(--border-divider);
}
.mgr-contact-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 18px; /* thickened (+10px) */
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-align: center;
}
.mgr-contact-chip span {
  text-align: center;
}

.manager-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.25rem;
}
.duty-status-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
}
.duty-status-pill.active { color: var(--color-green); }
.duty-status-pill.inactive { color: var(--text-muted); }

/* QUICK SHIFT PRESET PILL BUTTONS */
.preset-pill-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-speed);
}
.preset-pill-btn:hover {
  background: var(--bg-surface);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}
body.theme-light .preset-pill-btn {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
body.theme-light .preset-pill-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--accent);
  border-color: var(--accent);
}

/* FINANCIAL STATEMENTS */
.financial-statements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}
.draft-statement-card {
  padding: 1.35rem;
  border-radius: 26px; /* thickened (+10px) */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.draft-statement-header {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-divider);
}
.statement-tag-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.35rem;
}
.tag-cyan { background: var(--copper-bg); color: var(--color-cyan); }
.tag-purple { background: rgba(113, 113, 122, 0.15); color: var(--text-secondary); }
.statement-headline {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}
.draft-statement-body {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.statement-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}
.stmt-lbl { color: var(--text-secondary); }
.stmt-val { font-weight: 700; }
.line-green { border-top: 1px dashed var(--border-divider); padding-top: 0.5rem; }
.line-red { border-top: 1px dashed var(--border-divider); padding-top: 0.5rem; }
.draft-statement-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-divider);
}
.audit-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* 10. MODALS (+10px BORDER RADII) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}
.modal-dialog-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 28px; /* thickened (+10px) */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-dialog-box.modal-sm { max-width: 440px; }
.modal-dialog-box.modal-md { max-width: 580px; }
.modal-dialog-box.modal-lg { max-width: 860px; }
@keyframes modalScale {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-divider);
  margin-bottom: 1rem;
}
.modal-title-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-close-trigger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-speed);
}
.modal-close-trigger:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.modal-actions-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-divider);
}

/* 11. POS BILLING MODAL */
.pos-dual-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
}
.pos-search-strip {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.pos-sku-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.pos-sku-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px; /* thickened (+10px) */
  padding: 0.65rem;
  cursor: pointer;
  transition: all var(--transition-speed);
}
.pos-sku-chip:hover {
  border-color: var(--color-cyan);
  background: var(--bg-surface-elevated);
}
.pos-bill-panel {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px; /* thickened (+10px) */
}
.pos-cart-list {
  flex: 1;
  max-height: 220px;
  overflow-y: auto;
  margin: 0.65rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.pos-summary-block {
  border-top: 1px solid var(--border-divider);
  padding-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.pos-sum-row { display: flex; justify-content: space-between; color: var(--text-secondary); }
.pos-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 900;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-divider);
}

/* 12. CHAT BUBBLES (+10px BORDER RADII) */
.force-avatar-pill {
  width: 32px;
  height: 32px;
  border-radius: 16px; /* thickened (+10px) */
  background: rgba(192, 132, 252, 0.15);
  border: 1px solid rgba(192, 132, 252, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-prompt-pill {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 16px; /* thickened (+10px) */
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-speed);
}
.quick-prompt-pill:hover {
  background: var(--bg-surface);
  border-color: var(--color-purple);
  color: var(--color-purple);
}
.chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: 22px; /* thickened (+10px) */
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 90%;
  word-break: break-word;
}
.user-bubble {
  align-self: flex-end;
  background: var(--color-cyan);
  color: #ffffff;
  border-bottom-right-radius: 6px;
}
body.theme-light .user-bubble {
  background: var(--color-cyan);
  color: #ffffff;
}
.bot-bubble {
  align-self: flex-start;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 6px;
}
body.theme-light .bot-bubble {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
.chat-speaker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-cyan);
  display: block;
  margin-bottom: 0.25rem;
  letter-spacing: 0.05em;
}

/* 13. TOAST NOTIFICATION */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--color-cyan);
  border-radius: 22px; /* thickened (+10px) */
  padding: 0.75rem 1.35rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 200;
}

/* 14. RESPONSIVE DESIGN (Tablets, Mobile & Fluid Layouts 320px - 1920px) */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 1100px) {
  .force-side-dock {
    width: 340px;
    min-width: 320px;
  }
}

@media (max-width: 900px) {
  .sidebar-shell { 
    display: none !important; 
  }
  
  .workspace-container {
    margin-left: 0 !important;
    width: 100% !important;
    flex-direction: column !important;
  }
  
  .main-viewport {
    padding: 1rem 1rem 5.5rem 1rem !important;
    width: 100% !important;
  }
  
  .force-side-dock {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 480px;
    position: relative;
    top: 0;
    margin: 1rem 0;
    border-radius: var(--radius-lg);
  }

  .force-side-dock.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
  }

  .mobile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  }

  .icon-action-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-speed), transform 0.12s ease;
  }
  .icon-action-btn:hover {
    background: var(--bg-surface-elevated);
  }
  .icon-action-btn:active {
    transform: scale(0.93);
    background: var(--bg-surface);
  }

  /* FIXED MOBILE BOTTOM NAVIGATION */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 95;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem env(safe-area-inset-bottom, 0px) 0.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-display);
    padding: 0.35rem 0.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    flex: 1;
    min-height: 44px; /* WCAG 2.1 AA touch target */
    min-width: 44px;
    transition: color var(--transition-speed), transform 0.12s ease;
  }

  .mobile-nav-btn.active {
    color: var(--color-cyan);
  }

  body.theme-light .mobile-nav-btn.active {
    color: var(--color-cyan);
  }

  .mobile-nav-btn:hover {
    color: var(--text-primary);
  }
  .mobile-nav-btn:active {
    transform: scale(0.94);
  }

  .mob-badge {
    position: absolute;
    top: 2px;
    right: 18%;
    background: var(--color-red);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 900;
    padding: 0.08rem 0.35rem;
    border-radius: 9999px;
    min-width: 14px;
    text-align: center;
  }
  
  .pos-dual-container { 
    grid-template-columns: 1fr; 
  }
  
  /* Mobile Input Font Size (Stops iOS Safari Auto-Zoom) */
  .form-input, 
  .form-select, 
  .v-input-field, 
  .search-input-styled {
    font-size: 16px !important;
    min-height: 44px;
  }

  .btn-sm {
    min-height: 44px;
    padding: 0.5rem 0.95rem;
    font-size: 0.82rem;
  }

  .modal-close-trigger {
    width: 44px;
    height: 44px;
  }

  .dock-tool-btn {
    width: 44px;
    height: 44px;
  }

  .preset-pill-btn,
  .quick-prompt-pill {
    min-height: 38px;
    padding: 0.4rem 0.75rem;
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
  }

  /* SLIDE-UP SHEET FOR FORCE COPILOT ON MOBILE */
  .force-side-dock {
    position: fixed !important;
    top: auto !important;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 72vh !important;
    height: 72dvh !important;
    margin: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 28px !important;
    border-top-right-radius: 28px !important;
    z-index: 92 !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55) !important;
    display: flex !important;
    flex-direction: column !important;
    animation: forceSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes forceSlideUp {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
  }
  .force-side-dock.collapsed {
    display: none !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .force-side-dock .force-chat-thread {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
  }
  .force-side-dock .force-input-container {
    position: sticky;
    bottom: 0;
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-subtle);
  }

  /* VELOCITY BOXES RESPONSIVE ALIGNMENT */
  .velocity-unit-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 1.15rem;
  }
  .velocity-telemetry-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-subtle);
  }
  .velocity-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    flex-wrap: wrap;
  }

  .profile-stats-strip { 
    justify-content: flex-start; 
  }
}

@media (max-width: 640px) {
  .section-title-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .upcoming-risk-badge {
    width: 100%;
    text-align: left;
    align-items: flex-start;
  }

  /* MODALS AS FULL-SCREEN / BOTTOM SHEETS ON MOBILE */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal-dialog-box {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 94vh !important;
    max-height: 94dvh !important;
    height: auto;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 28px !important;
    border-top-right-radius: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSheetUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes modalSheetUp {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
  }
  .modal-header-row {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-card);
    padding: 1.1rem 1.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-divider);
    flex-shrink: 0;
  }
  .modal-form-content,
  .modal-dialog-box > form,
  .modal-dialog-box > .space-y-3 {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1.25rem 1rem 1.25rem;
    flex: 1;
    max-height: calc(94dvh - 140px);
  }
  .modal-actions-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: var(--bg-card);
    padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom, 0px)) 1.25rem;
    margin-top: 0;
    border-top: 1px solid var(--border-divider);
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  }
  .modal-actions-footer .btn {
    flex: 1;
    min-height: 46px;
    justify-content: center;
    font-size: 0.85rem;
  }

  /* POS CASHIER MODAL MOBILE LAYOUT */
  #modal-billing .pos-dual-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    padding: 1rem 1.25rem;
    max-height: calc(94dvh - 140px);
  }
  #modal-billing .pos-sku-picker-grid {
    max-height: 220px;
  }
  #modal-billing .pos-bill-panel {
    padding: 1rem;
  }
  #modal-billing .pos-cart-list {
    max-height: 140px;
  }
  #modal-billing .pos-summary-block {
    padding-top: 0.75rem;
  }
  #modal-billing #btn-complete-bill {
    min-height: 48px;
  }

  .form-dual-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .action-btn-cluster {
    width: 100%;
    flex-direction: column;
  }
  .action-btn-cluster .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .financial-statements-grid {
    grid-template-columns: 1fr;
  }

  /* Profile Overview Card on Mobile */
  .profile-meta-grid {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .profile-store-icon {
    width: 52px;
    height: 52px;
  }
  .profile-stats-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    width: 100%;
  }

  .ledger-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .ledger-card-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }
  .ledger-card-actions .btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .alert-action-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .action-strip-btns {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .action-strip-btns .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .resolution-playbook-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .resolution-playbook-bar .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .velocity-telemetry-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .velocity-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .velocity-actions-row > div {
    width: 100%;
    justify-content: space-between;
  }
  .velocity-actions-row .btn {
    flex: 1;
    min-height: 44px;
  }
  .ledger-card-actions {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
  }
  .ledger-card-actions .btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
  }
}

@media (max-width: 380px) {
  .main-viewport {
    padding: 0.75rem 0.5rem 5.5rem 0.5rem !important;
  }
  .pnl-hero-strip {
    grid-template-columns: 1fr;
  }
  .mobile-nav-btn span:not(.mob-badge) {
    font-size: 0.58rem;
  }
}

/* MOBILE LANDSCAPE COMPACT MODE */
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-bottom-bar {
    height: calc(48px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-nav-btn {
    min-height: 38px;
    font-size: 0.58rem;
    gap: 0.1rem;
  }
  .mobile-nav-btn i {
    width: 14px;
    height: 14px;
  }
  .main-viewport {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .force-side-dock {
    height: 84vh !important;
    height: 84dvh !important;
  }
}
