/*!********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[3]!./src/styles/globals.css ***!
  \********************************************************************************************************************************************************************************************************************************************************************/
/* ============================================
   PATROFI - Design System
   Guard Tour Verification & SOC Platform
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,450;14..32,500;14..32,550;14..32,600;14..32,700;14..32,800;14..32,900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  color-scheme: dark;
  /* Brand - refined indigo */
  --color-brand: #6366F1;
  --color-brand-light: #818CF8;
  --color-brand-dark: #4F46E5;
  --color-brand-glow: rgba(99, 102, 241, 0.12);
  --color-brand-subtle: rgba(99, 102, 241, 0.06);

  /* Accent - refined teal */
  --color-accent: #06B6A4;
  --color-accent-light: #2DD4BF;
  --color-accent-dark: #0D9488;

  /* Semantic */
  --color-success: #10B981;
  --color-warning: #F0A030;
  --color-danger: #F04438;
  --color-info: #6366F1;

  /* Surface - Dark Mode (default) */
  --color-bg-primary: #09090F;
  --color-bg-secondary: #111118;
  --color-bg-tertiary: #19191F;
  --color-bg-elevated: #1A1A24;
  --color-bg-glass: rgba(17, 17, 24, 0.75);
  --color-bg-hover: rgba(99, 102, 241, 0.06);
  --color-bg-subtle: rgba(255, 255, 255, 0.02);

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);
  --color-border-active: rgba(99, 102, 241, 0.35);
  --color-border-subtle: rgba(255, 255, 255, 0.03);
  --color-card-border: rgba(255, 255, 255, 0.14);

  /* Text */
  --color-text-primary: #ECECF1;
  --color-text-secondary: #8E8EA0;
  --color-text-muted: #5A5A72;
  --color-text-inverse: #111118;

  /* Shadows - layered, realistic */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -2px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.12), 0 0 48px rgba(99, 102, 241, 0.06);
  --shadow-card: 0 0 0 1px var(--color-card-border), 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 0 0 1px var(--color-border-hover), 0 8px 24px rgba(0, 0, 0, 0.25);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-2xs: 0.6875rem;   /* 11px */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.8125rem;    /* 13px */
  --font-size-base: 0.875rem;   /* 14px */
  --font-size-md: 0.9375rem;    /* 15px */
  --font-size-lg: 1.0625rem;    /* 17px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.625rem;    /* 26px */
  --font-size-3xl: 2rem;        /* 32px */
  --font-size-4xl: 2.5rem;      /* 40px */
  --font-size-5xl: 3.25rem;     /* 52px */
  --font-size-display: 4rem;    /* 64px */

  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.65;
  --line-height-loose: 1.8;

  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: -0.011em;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.06em;

  /* Spacing - generous, Apple-like */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 0.125rem;   /* 2px */
  --space-1: 0.25rem;      /* 4px */
  --space-1-5: 0.375rem;   /* 6px */
  --space-2: 0.5rem;       /* 8px */
  --space-2-5: 0.625rem;   /* 10px */
  --space-3: 0.75rem;      /* 12px */
  --space-3-5: 0.875rem;   /* 14px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-7: 1.75rem;      /* 28px */
  --space-8: 2rem;         /* 32px */
  --space-9: 2.25rem;      /* 36px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-14: 3.5rem;      /* 56px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  --space-32: 8rem;        /* 128px */

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --sidebar-width: 272px;
  --sidebar-collapsed: 76px;
  --header-height: 68px;
  --max-content-width: 1360px;
  --page-padding-x: var(--space-8);
  --page-padding-y: var(--space-8);
}

/* ── Light Mode ── */
[data-theme='light'] {
  color-scheme: light;
  --color-bg-primary: #FAFAFA;
  --color-bg-secondary: #FFFFFF;
  --color-bg-tertiary: #F5F5F7;
  --color-bg-elevated: #FFFFFF;
  --color-bg-glass: rgba(250, 250, 250, 0.85);
  --color-bg-hover: rgba(99, 102, 241, 0.04);
  --color-bg-subtle: rgba(0, 0, 0, 0.015);

  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-hover: rgba(0, 0, 0, 0.12);
  --color-border-active: rgba(99, 102, 241, 0.35);
  --color-border-subtle: rgba(0, 0, 0, 0.03);
  --color-card-border: rgba(0, 0, 0, 0.14);

  --color-text-primary: #1D1D1F;
  --color-text-secondary: #4B5563;
  --color-text-muted: #64748B;
  --color-text-inverse: #FFFFFF;

  /* Semantic - High Contrast for Light Mode */
  --color-success: #059669;
  --color-warning: #D97706;
  --color-danger: #DC2626;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, 0.12);
  --shadow-2xl: 0 32px 64px -16px rgba(0, 0, 0, 0.14);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.06);
  --shadow-card: 0 0 0 1px var(--color-card-border), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 0 0 1px var(--color-border-hover), 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  min-height: 100dvh;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-brand-light);
}

img {
  max-width: 100%;
  display: block;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}

::selection {
  background: var(--color-brand);
  color: white;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-border-hover);
  border-radius: var(--radius-full);
}

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

/* ── Keyframe Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: translate(-50%, -47%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 68, 56, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(240, 68, 56, 0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes subtle-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Utility Classes ── */
.fade-in { animation: fadeIn var(--transition-base) var(--ease-out-expo) forwards; }
.fade-in-up { animation: fadeInUp 450ms var(--ease-out-expo) forwards; }
.fade-in-down { animation: fadeInDown 450ms var(--ease-out-expo) forwards; }
.slide-in-left { animation: slideInLeft 400ms var(--ease-out-expo) forwards; }
.slide-in-right { animation: slideInRight 400ms var(--ease-out-expo) forwards; }
.scale-in { animation: scaleIn 300ms var(--ease-out-expo) forwards; }

/* Stagger children animations */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 450ms var(--ease-out-expo) forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 50ms; }
.stagger-children > *:nth-child(3) { animation-delay: 100ms; }
.stagger-children > *:nth-child(4) { animation-delay: 150ms; }
.stagger-children > *:nth-child(5) { animation-delay: 200ms; }
.stagger-children > *:nth-child(6) { animation-delay: 250ms; }
.stagger-children > *:nth-child(7) { animation-delay: 300ms; }
.stagger-children > *:nth-child(8) { animation-delay: 350ms; }

/* Text */
.text-2xs { font-size: var(--font-size-2xs); }
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-brand { color: var(--color-brand); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }

/* Spacing */
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.ml-auto { margin-left: auto; }

/*!***********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[3]!./src/styles/components.css ***!
  \***********************************************************************************************************************************************************************************************************************************************************************/
/* ============================================
   PATROFI - Component Styles
   ============================================ */

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 22px;
  font-size: var(--font-size-sm);
  font-weight: 550;
  line-height: 1;
  letter-spacing: var(--letter-spacing-normal);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.975);
  transition-duration: 80ms;
}

.btn-primary {
  background: var(--color-brand);
  color: white;
  border-color: var(--color-brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-dark);
  box-shadow: var(--shadow-glow), 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border-color: var(--color-border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-bg-elevated);
  border-color: var(--color-border-hover);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--color-success);
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-success:hover:not(:disabled) {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-danger:hover:not(:disabled) {
  background: #DC2626;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--color-brand);
  border-color: var(--color-border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--color-brand-subtle);
  border-color: var(--color-brand);
}

.btn-pricing-primary {
  background: var(--color-brand);
  color: white !important;
  border: 2px solid var(--color-brand);
  border-radius: 9999px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-base);
}

.btn-pricing-primary:hover:not(:disabled) {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  transform: translateY(-1px);
}

.btn-pricing-outline {
  background: transparent;
  color: var(--color-brand) !important;
  border: 2px solid var(--color-brand);
  border-radius: 9999px;
  font-weight: 600;
  transition: all var(--transition-base);
}

.btn-pricing-outline:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 14px;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 15px 32px;
  font-size: var(--font-size-md);
  border-radius: var(--radius-xl);
}

.btn-xl {
  padding: 18px 40px;
  font-size: var(--font-size-md);
  font-weight: 600;
  border-radius: var(--radius-xl);
}

.btn-icon {
  padding: 10px;
  min-width: 40px;
  min-height: 40px;
}

.btn-icon.btn-sm {
  padding: 7px;
  min-width: 32px;
  min-height: 32px;
}

/* ── Card ── */
.card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-card);
}

/* Datepicker dropdown now uses position:fixed - no overflow workarounds needed */

.card-hover:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card-glass {
  background: var(--color-bg-glass);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
}

.card-stat {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--stat-color, var(--color-brand)), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card-stat:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.06);
}

.card-stat:hover::before {
  opacity: 1;
}

.card-stat:hover .stat-icon {
  transform: scale(1.1);
}

[data-theme="light"] .card-stat {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .card-stat:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.card-stat .stat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--stat-color-bg, var(--color-brand-glow));
  color: var(--stat-color, var(--color-brand));
  transition: transform 0.3s ease;
}

.card-stat .stat-value {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-primary);
}

.card-stat .stat-label {
  font-size: var(--font-size-sm);
  font-weight: 450;
  color: var(--color-text-secondary);
  letter-spacing: var(--letter-spacing-normal);
}

/* ── Input ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: var(--letter-spacing-normal);
}

.required {
  color: var(--color-danger) !important;
  margin-left: 3px;
}

/* ── Universal Form Controls - Premium Browser Overrides ── */
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="search"],
textarea,
.form-input,
.form-select,
.form-textarea,
.auth-input {
  width: 100%;
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

select:hover:not(:disabled),
input:hover:not(:disabled),
textarea:hover:not(:disabled),
.form-input:hover:not(:disabled),
.form-select:hover:not(:disabled),
.form-textarea:hover:not(:disabled),
.auth-input:hover:not(:disabled) {
  border-color: var(--color-border-hover);
  background: var(--color-bg-secondary);
}

select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
textarea:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.auth-input:focus {
  border-color: var(--color-brand) !important;
  box-shadow: 0 0 0 3px var(--color-brand-glow), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  background: var(--color-bg-tertiary) !important;
}

select:disabled,
input:disabled,
textarea:disabled,
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--color-bg-primary) !important;
  border-color: var(--color-border) !important;
}

select,
.form-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23818CF8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 12px) center !important;
  padding-right: 36px !important;
  cursor: pointer;
}

select option {
  background: #111118;
  color: #ECECF1;
  padding: 8px 12px;
}

[data-theme="light"] select option {
  background: #FFFFFF;
  color: #0F172A;
}

.form-input::placeholder,
.form-textarea::placeholder,
.auth-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
  font-weight: 450;
}

/* Eliminate native browser autofill background chrome */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-text-primary) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--color-bg-tertiary) inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

.form-input.error,
.form-select.error,
select.error,
input.error {
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.12) !important;
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-textarea,
textarea {
  min-height: 100px;
  resize: vertical;
  line-height: var(--line-height-normal);
}

/* Premium input controls - eliminate browser native chrome */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
}

/* Premium Custom Checkbox styling */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-tertiary);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
  margin: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--color-brand-light);
  box-shadow: 0 0 0 2px var(--color-brand-glow);
}

input[type="checkbox"]:checked {
  background: var(--color-brand);
  border-color: var(--color-brand);
  box-shadow: 0 0 0 2px var(--color-brand-glow), 0 2px 6px rgba(99, 102, 241, 0.35);
}

input[type="checkbox"]:checked::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}

/* Premium Custom Radio styling */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-tertiary);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
  margin: 0;
}

input[type="radio"]:hover {
  border-color: var(--color-brand-light);
  box-shadow: 0 0 0 2px var(--color-brand-glow);
}

input[type="radio"]:checked {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 2px var(--color-brand-glow);
}

input[type="radio"]:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand);
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.4);
}

/* Premium Range Slider styling */
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--color-bg-secondary);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-brand);
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px var(--color-brand-glow);
}

/* Premium File Selector Button styling */
input[type="file"]::file-selector-button {
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 12px;
  font-family: inherit;
}

input[type="file"]::file-selector-button:hover {
  background: var(--color-brand);
  color: #FFFFFF;
  border-color: var(--color-brand);
}

/* Custom Select */
.custom-select {
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 12px 16px;
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
  text-align: left;
  font-family: inherit;
}

.custom-select-trigger:hover {
  border-color: var(--color-border-hover);
}

.custom-select-trigger:focus-visible {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-glow), var(--shadow-xs);
}

/* Compact variant for headers / toolbars */
.custom-select-sm .custom-select-trigger {
  padding: 8px 14px;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-md);
}

.custom-select-sm .custom-select-dropdown {
  min-width: 180px;
}

.custom-select-sm .custom-select-option {
  padding: 7px 10px;
  font-size: var(--font-size-xs);
}

.custom-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-placeholder {
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 200ms var(--ease-out-expo);
}

.custom-select-chevron.open {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  z-index: 200;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 5px;
  box-shadow: var(--shadow-xl);
  max-height: 260px;
  overflow-y: auto;
  animation: scaleIn 150ms var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  font-size: var(--font-size-sm);
  white-space: nowrap;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  font-family: inherit;
}

.custom-select-option:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.custom-select-option.selected {
  color: var(--color-brand);
  font-weight: 500;
  background: var(--color-brand-subtle, rgba(99, 102, 241, 0.06));
}

.custom-select-check {
  flex-shrink: 0;
  color: var(--color-brand);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--letter-spacing-wide);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-success {
  background: rgba(15, 204, 146, 0.1);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(240, 160, 48, 0.1);
  color: var(--color-warning);
}

.badge-danger {
  background: rgba(240, 68, 56, 0.1);
  color: var(--color-danger);
}

.badge-info {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-info);
}

.badge-muted {
  background: rgba(90, 90, 114, 0.1);
  color: var(--color-text-muted);
}

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Table ── */
.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: 14px 20px;
  text-align: left;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  color: var(--color-text-muted);
  background: var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td {
  padding: 16px 20px;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr {
  transition: background-color var(--transition-fast);
}

.table tr:hover td {
  background: var(--color-bg-hover);
}

.table .visitor-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.table .visitor-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-elevated));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.table .visitor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-6);
  animation: fadeIn 200ms var(--ease-out-expo);
}

/* Stacked modal (modal-on-modal, e.g. checkout over visitor details) */
.modal-overlay.modal-overlay-stacked {
  z-index: 1100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
}

.modal {
  background: rgba(var(--color-bg-secondary-rgb, 17, 17, 27), 0.92);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: scaleIn 280ms var(--ease-out-expo);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .modal {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.modal-lg {
  max-width: 740px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-7);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-tight);
}

.modal-body {
  padding: var(--space-7);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-7);
  border-top: 1px solid var(--color-border);
}

/* ── Toast / Alert ── */
.toast {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 16px 20px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: slideInRight 300ms var(--ease-out-expo);
  min-width: 340px;
  max-width: 440px;
}

.toast-item.toast-success { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.04); }
.toast-item.toast-error { border-color: rgba(240, 68, 56, 0.3); background: rgba(240, 68, 56, 0.04); }
.toast-item.toast-warning { border-color: rgba(240, 160, 48, 0.3); background: rgba(240, 160, 48, 0.04); }
.toast-item.toast-info { border-color: rgba(99, 102, 241, 0.3); background: rgba(99, 102, 241, 0.04); }

/* ── Avatar ── */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-brand), var(--color-brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--color-bg-secondary);
}

.avatar-sm {
  width: 34px;
  height: 34px;
  font-size: var(--font-size-xs);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--font-size-lg);
}

.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: var(--font-size-2xl);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Search ── */
.search-bar {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-bar .form-input {
  padding-left: 42px;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.pagination button {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination button:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-hover);
}

.pagination button.active {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: white;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-10);
  text-align: center;
  color: var(--color-text-muted);
}

.empty-state svg {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-5);
  opacity: 0.3;
}

.empty-state h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  letter-spacing: var(--letter-spacing-tight);
}

.empty-state p {
  font-size: var(--font-size-sm);
  max-width: 380px;
  line-height: var(--line-height-relaxed);
}

/* ── Loading Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  gap: var(--space-5);
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-8);
}

.tab {
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--color-text-primary);
}

.tab.active {
  color: var(--color-brand);
  border-bottom-color: var(--color-brand);
}

/* ── Dropdown ── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2);
  box-shadow: var(--shadow-xl);
  z-index: 100;
  animation: scaleIn 150ms var(--ease-out-expo);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-2) 0;
}

/* ── Toggle Switch ── */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle.active {
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 200ms var(--ease-out-expo);
  box-shadow: var(--shadow-sm);
}

.toggle.active::after {
  transform: translateX(22px);
}

/* ── Camera Capture ── */
.camera-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/3;
  background: var(--color-bg-primary);
  border: 2px dashed var(--color-border-hover);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-container .camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
}

.camera-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.capture-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-brand);
  border: 4px solid white;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.capture-btn:hover {
  transform: scale(1.08);
  background: var(--color-brand-dark);
}

.capture-btn:active {
  transform: scale(0.95);
}

/* ── Signature Pad ── */
.signature-pad {
  width: 100%;
  max-width: 500px;
  height: 200px;
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: crosshair;
  touch-action: none;
}

/* ── Photo Preview ── */
.photo-preview {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 2px solid var(--color-border);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview .remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background var(--transition-fast);
  backdrop-filter: blur(4px);
}

.photo-preview .remove-btn:hover {
  background: var(--color-danger);
}

/* ── Section Divider ── */
.section-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-8) 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hide-tablet { display: none !important; }
}

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  
  .modal {
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
  }

  .table-container {
    font-size: var(--font-size-xs);
  }

  .table th,
  .table td {
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: var(--space-5);
  }
  
  .btn {
    padding: 10px 18px;
  }
}

/* Skeleton loading shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--color-bg-tertiary) 25%, var(--color-bg-hover) 50%, var(--color-bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Usage meter */
.usage-meter {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.usage-meter-bar {
  height: 8px;
  background: var(--color-bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.usage-meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 600ms ease;
}

/* ══════════════════════════════════════════════
   DOCS LAYOUT
   ══════════════════════════════════════════════ */

.docs-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg-primary);
  overflow-y: auto;
  z-index: 30;
}

.docs-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.docs-main {
  flex: 1;
  margin-left: 280px;
  margin-right: 240px;
  padding: var(--space-8) var(--space-10) var(--space-16);
  animation: fadeIn 300ms ease;
  display: flex;
  justify-content: center;
}

.docs-content {
  width: 100%;
  max-width: 860px;
}

.status-dot-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}


.docs-right-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: fixed;
  top: 60px;
  right: 0;
  bottom: 0;
  border-left: 1px solid var(--color-border);
  background: var(--color-bg-primary);
  overflow-y: auto;
  padding: var(--space-8) var(--space-5);
  z-index: 30;
}


.docs-overlay {
  display: none;
}

.docs-sidebar-mobile {
  display: none;
}

/* Docs Content Typography */
.docs-content h1 {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
  line-height: 1.15;
}

.docs-content h2 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.docs-content h3 {
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.docs-content p {
  font-size: var(--font-size-sm);
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.docs-content ul, .docs-content ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.docs-content li {
  font-size: var(--font-size-sm);
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.docs-content strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.docs-content code {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-tertiary);
  font-size: 0.87em;
  color: var(--color-brand);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Callout Boxes */
.docs-callout {
  padding: var(--space-4) var(--space-5) var(--space-4) 48px;
  border-radius: var(--radius-lg);
  border: 1px solid;
  margin-bottom: var(--space-5);
  font-size: var(--font-size-sm);
  line-height: 1.7;
  position: relative;
}

.docs-callout::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.docs-callout-tip {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--color-text-secondary);
}

.docs-callout-tip::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .6 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E");
}

.docs-callout-tip strong { color: #10B981; }

.docs-callout-warning {
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--color-text-secondary);
}

.docs-callout-warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
}

.docs-callout-warning strong { color: #F59E0B; }

.docs-callout-note {
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--color-text-secondary);
}

.docs-callout-note::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
}

.docs-callout-note strong { color: #6366F1; }

/* Steps */
.docs-step {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.docs-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.docs-step-content {
  flex: 1;
}

.docs-step-content h3 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.docs-step-content p {
  margin-bottom: var(--space-2);
}

/* Prev/Next Navigation */
.docs-nav-footer {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.docs-nav-link {
  flex: 1;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 200ms;
}

.docs-nav-link:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-glow);
  transform: translateY(-1px);
}

.docs-nav-link-label {
  font-size: var(--font-size-2xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.docs-nav-link-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: var(--space-1);
}

/* Docs Feedback Card */
.docs-feedback-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-top: var(--space-10);
  gap: var(--space-4);
}

.docs-feedback-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.docs-feedback-desc {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.docs-feedback-buttons {
  display: flex;
  gap: var(--space-2);
}

.docs-feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-primary);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.docs-feedback-btn:hover:not(:disabled) {
  background: var(--color-bg-hover);
  border-color: var(--color-border-hover);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

.docs-feedback-btn.active {
  background: var(--color-brand-glow);
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.docs-feedback-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .docs-feedback-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

@media (max-width: 1200px) {
  .docs-right-sidebar {
    display: none;
  }
  .docs-main {
    margin-right: 0;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .docs-sidebar {
    display: none;
  }

  .docs-mobile-toggle {
    display: flex !important;
  }

  .docs-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
  }

  .docs-sidebar-mobile {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 280px;
    border-right: 1px solid var(--color-border);
    background: var(--color-bg-primary);
    overflow-y: auto;
    z-index: 45;
    animation: fadeIn 200ms ease;
  }

  .docs-main {
    margin-left: 0;
    padding: var(--space-6) var(--space-4) var(--space-12);
  }

  .docs-nav-footer {
    flex-direction: column;
  }
}

/* ── Alerts & Banners ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 12px var(--space-4) 12px 42px;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  border: 1px solid transparent;
  margin-bottom: var(--space-4);
  animation: fadeIn var(--transition-fast) var(--ease-out-expo) forwards;
  position: relative;
}

.alert::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 14px;
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.alert-danger {
  background: rgba(240, 68, 56, 0.08);
  border-color: rgba(240, 68, 56, 0.25);
  color: var(--color-danger);
}

.alert-danger::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23F04438' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--color-success);
}

.alert-success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
}

.alert-warning {
  background: rgba(240, 160, 48, 0.08);
  border-color: rgba(240, 160, 48, 0.25);
  color: var(--color-warning);
}

.alert-warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23F0A030' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
}

.alert-info {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--color-brand-light);
}

.alert-info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818CF8' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
}





/*!******************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[3]!./src/styles/pages.css ***!
  \******************************************************************************************************************************************************************************************************************************************************************/
/* ============================================
   PATROFI - Page Styles
   ============================================ */

/* ── Standalone Card Auth Container (Set Password / Single Card Pages) ── */
.auth-standalone-container {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-primary);
  position: relative;
  overflow: hidden;
}

.auth-standalone-container::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: kioskGlowPulse 8s ease-in-out infinite;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-6);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .auth-standalone-container {
    padding: var(--space-4) var(--space-3);
    align-items: center;
    justify-content: center;
  }

  .auth-card {
    padding: var(--space-5) var(--space-4);
  }
}

/* ── Split-Screen Auth Pages (Login / Signup) ── */
.auth-page,
.auth-container {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
  padding: 0 !important;
  margin: 0 !important;
  position: relative;
  overflow: hidden;
}

.auth-left {
  flex: 1;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-8);
  position: relative;
  overflow: hidden;
}

/* Ambient glow behind login form */
.auth-left::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: kioskGlowPulse 8s ease-in-out infinite;
  pointer-events: none;
}

.auth-right {
  flex: 1;
  background: linear-gradient(135deg, #0B0F1A 0%, #1a2744 50%, #0d1b2a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

.auth-right::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(59, 130, 246, 0.04) 50%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: kioskGlowPulse 6s ease-in-out infinite;
}

.auth-right .brand-text {
  position: relative;
  z-index: 1;
  text-align: center;
}

.auth-right .brand-text h1 {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.auth-right .brand-text p {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.6);
  max-width: 400px;
  line-height: 1.7;
}

.auth-form {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.auth-form .logo {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.auth-form h2,
.auth-form h1 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  letter-spacing: -0.025em;
}

.auth-form .subtitle {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

.auth-form .form-group+.form-group {
  margin-top: var(--space-5);
}

.auth-form .submit-btn {
  margin-top: var(--space-8);
  width: 100%;
}

.auth-form .auth-footer {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.auth-form .auth-footer a {
  color: var(--color-brand);
  font-weight: 500;
}

.auth-error {
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: var(--color-danger);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

@media (max-width: 860px) {
  .auth-page,
  .auth-container {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    flex-direction: column;
  }

  .auth-right {
    display: none !important;
  }

  .auth-left {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    padding: var(--space-4) var(--space-4);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .auth-left::-webkit-scrollbar {
    display: none;
  }
}

/* ── Dashboard Layout ── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-bg-primary);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(var(--color-bg-secondary-rgb, 17, 17, 27), 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: width var(--transition-base), transform var(--transition-base);
}

[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.85);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-brand {
  padding: 0 var(--space-5, 20px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: var(--header-height, 68px);
  box-sizing: border-box;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 0;
}

.sidebar-brand .brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: #6366F1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.sidebar.collapsed .brand-name {
  display: none;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-3, 12px) var(--space-3, 12px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Sidebar Section Headers (Title Case, Collapsible Accordion, & Increased Vertical Spacing - Entrifi Standard) */
.sidebar-section-group {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
}

.sidebar-section-group:first-child,
.sidebar-nav > .sidebar-section-group:first-of-type {
  margin-top: 6px;
}

.sidebar-section-static {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--color-text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none !important;
  user-select: none;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 10px;
  margin-top: 0;
  margin-bottom: 6px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md, 8px);
  color: var(--color-text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none !important;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast, 120ms), background var(--transition-fast, 120ms);
  text-align: left;
}

.sidebar-section-header:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: inherit;
  text-transform: none !important;
}

.sidebar-section-chevron {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-text-secondary);
  opacity: 0.75;
  flex-shrink: 0;
}

.sidebar-section-header:hover .sidebar-section-chevron {
  opacity: 1;
  color: var(--color-text-primary);
}

.sidebar-section-header.is-collapsed .sidebar-section-chevron {
  transform: rotate(-90deg);
}

.sidebar-section-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-items.is-collapsed {
  display: none;
}

.sidebar-section-label {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: none !important;
  letter-spacing: -0.015em;
  color: var(--color-text-secondary);
  padding: 6px 10px 4px;
  margin-top: 28px;
  margin-bottom: 6px;
  display: block;
}

.sidebar-section-label:first-child {
  margin-top: 6px;
}

.sidebar.collapsed .sidebar-section-static,
.sidebar.collapsed .sidebar-section-header,
.sidebar.collapsed .sidebar-section-label {
  display: none !important;
}

.sidebar.collapsed .sidebar-section-items {
  display: flex !important;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-md, 8px);
  color: var(--color-text-primary);
  opacity: 0.82;
  font-size: var(--font-size-sm, 14px);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast, 120ms);
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  opacity: 1;
}

.nav-item.active {
  background: var(--color-brand-glow);
  color: var(--color-brand);
  opacity: 1;
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--color-brand);
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item .nav-label {
  flex: 1;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge {
  display: none !important;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 8px 0;
}

.nav-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  line-height: 1.2;
}

.sidebar-footer {
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border-top: 1px solid var(--color-border);
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}

.nav-badge {
  background: var(--color-danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  line-height: 1;
}

.sidebar-footer {
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid var(--color-border);
}

/* Dashboard Main Content */
.dashboard-main {
  flex: 1;
  margin-left: 0;
  transition: margin-left var(--transition-base);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Desktop only: apply sidebar margin */
@media (min-width: 1025px) {
  .dashboard-main {
    margin-left: var(--sidebar-width);
  }
  .dashboard-main.sidebar-is-collapsed {
    margin-left: var(--sidebar-collapsed);
  }
}

.sidebar.collapsed~.dashboard-main {
  margin-left: var(--sidebar-collapsed);
}

/* JS-driven classes - eliminate hydration flash */
.dashboard-main.mobile {
  margin-left: 0 !important;
}

.dashboard-main.sidebar-is-collapsed {
  margin-left: var(--sidebar-collapsed);
}

/* Mobile: sidebar off-canvas, main full-width - placed here to guarantee override */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 60;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .dashboard-main,
  .sidebar.collapsed ~ .dashboard-main {
    margin-left: 0 !important;
  }
}

/* Header */
.dashboard-header {
  height: var(--header-height);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-left .page-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.notification-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notification-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.notification-btn .notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: 50%;
  border: 2px solid var(--color-bg-secondary);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  transform: scale(1.05);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.user-menu:hover {
  background: var(--color-bg-hover);
}

.user-menu .user-info {
  text-align: right;
  min-width: 120px;
}

.user-menu .user-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
}

.user-menu .user-role {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Dashboard Content */
.dashboard-content {
  flex: 1;
  padding: 20px 28px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.page-header h1 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.page-header .subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: nowrap;
}

.filter-grid {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: nowrap;
}

.filter-grid > div {
  min-width: 160px;
}

.filter-bar .search-bar {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.filter-bar .form-select,
.filter-bar select {
  min-width: 150px;
  max-width: 200px;
  padding: 8px 32px 8px 12px;
  font-size: var(--font-size-sm);
}

.filter-bar .form-input[type="date"] {
  max-width: 170px;
}

.filter-bar .custom-select-sm {
  min-width: 150px;
  max-width: 200px;
}

/* ── Check-In Page ── */
.checkin-page {
  max-width: 800px;
  margin: 0 auto;
}

.checkin-steps {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-8);
  padding: 0 var(--space-4);
}

.checkin-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.checkin-step.active {
  color: var(--color-brand);
}

.checkin-step.completed {
  color: var(--color-success);
}

.checkin-step .step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-xs);
  border: 2px solid currentColor;
  flex-shrink: 0;
}

.checkin-step.active .step-number {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: white;
}

.checkin-step.completed .step-number {
  background: var(--color-success);
  border-color: var(--color-success);
  color: white;
}

.checkin-step-divider {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 var(--space-3);
}

.checkin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .checkin-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Analytics Page ── */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.analytics-grid .chart-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  box-shadow: var(--shadow-card, var(--shadow-sm));
}

.analytics-grid .chart-card.full-width {
  grid-column: 1 / -1;
}

.chart-card .chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.chart-card .chart-title {
  font-size: var(--font-size-md);
  font-weight: 600;
}

@media (max-width: 768px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Kiosk Mode ── */
.kiosk-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  text-align: center;
  background: var(--color-bg-primary);
  position: relative;
  overflow: hidden;
}

/* Ambient background glow */
.kiosk-ambient-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: kioskGlowPulse 6s ease-in-out infinite;
}

@keyframes kioskGlowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* Hero section */
.kiosk-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
  position: relative;
  z-index: 1;
}

/* Brand mark */
.kiosk-brand-mark {
  margin-bottom: var(--space-2);
}

.kiosk-brand-logo {
  max-height: 44px;
  max-width: 200px;
  object-fit: contain;
}

.kiosk-brand-initial {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

/* Org name */
.kiosk-org-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

/* Location badge - prominent pill */
.kiosk-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-brand);
  letter-spacing: 0.02em;
}

/* Welcome message */
.kiosk-page .kiosk-welcome {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 440px;
  margin: 0;
  line-height: 1.6;
}

/* Action cards */
.kiosk-actions {
  display: flex;
  gap: var(--space-6);
  position: relative;
  z-index: 1;
}

.kiosk-action-card {
  width: 280px;
  padding: var(--space-8) var(--space-6);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

/* Shine effect overlay */
.kiosk-card-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.kiosk-action-card:hover .kiosk-card-shine {
  left: 100%;
}

.kiosk-action-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Accent variant for QR card */
.kiosk-action-card.kiosk-card-accent:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15), 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.kiosk-action-card.kiosk-card-accent .kiosk-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-accent);
}

.kiosk-action-card .kiosk-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  background: var(--color-brand-glow);
  color: var(--color-brand);
  transition: transform 0.3s ease;
}

.kiosk-action-card:hover .kiosk-icon {
  transform: scale(1.1);
}

.kiosk-action-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.kiosk-action-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Footer */
.kiosk-footer {
  margin-top: var(--space-10);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  position: relative;
  z-index: 1;
}

.kiosk-footer a {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 500;
}

.kiosk-footer a:hover {
  text-decoration: underline;
}

/* Light theme adjustments */
[data-theme="light"] .kiosk-action-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .kiosk-action-card:hover {
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .kiosk-ambient-glow {
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
}

@media (max-width: 768px) {
  .kiosk-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .kiosk-action-card {
    width: 100%;
  }
}

/* ── Emergency Mode ── */
.emergency-banner {
  background: linear-gradient(135deg, #DC2626, #EF4444);
  color: white;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  animation: pulse-glow 2s infinite;
}

.emergency-banner h2 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.emergency-count {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  text-align: center;
  padding: var(--space-8);
}

/* ── Landing Page ── */
.landing-page {
  min-height: 100vh;
  min-height: 100dvh;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: padding 300ms cubic-bezier(0.16, 1, 0.3, 1), background 300ms ease, border-color 300ms ease, backdrop-filter 300ms ease, box-shadow 300ms ease;
}

.landing-nav.scrolled {
  padding: var(--space-3) var(--space-8);
  background: var(--color-bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.landing-nav .nav-brand {
  display: inline-flex;
  align-items: center;
}

.landing-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.landing-nav .nav-links a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.landing-nav .nav-links a:hover {
  color: var(--color-text-primary);
}

.landing-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  cursor: pointer;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.theme-toggle-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  border-color: var(--color-brand);
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-12);
  padding: calc(var(--header-height) + var(--space-16)) var(--space-10) var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.04) 40%, transparent 70%);
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: kioskGlowPulse 8s ease-in-out infinite;
}

.landing-hero::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 164, 0.06) 0%, transparent 70%);
  bottom: 10%;
  right: -10%;
  pointer-events: none;
  animation: kioskGlowPulse 10s ease-in-out infinite;
  animation-delay: 3s;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 16px;
  background: var(--color-brand-glow);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-brand);
  margin-bottom: var(--space-6);
}

.landing-hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  letter-spacing: -0.035em;
}

.landing-hero h1 .gradient-text {
  background: linear-gradient(135deg, #818CF8, #6366F1, #06B6A4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-hero .hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-8);
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.hero-preview {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  padding: 3px;
  border-radius: calc(var(--radius-xl) + 3px);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 164, 0.3), rgba(99, 102, 241, 0.3));
  background-size: 200% 200%;
  animation: borderGlow 4s ease-in-out infinite;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 600ms cubic-bezier(0.16, 1, 0.3, 1);
  transform: perspective(1000px) rotateX(0deg) translateY(0);
}

.hero-preview:hover {
  transform: perspective(1000px) rotateX(2deg) translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 50px rgba(99, 102, 241, 0.15);
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-preview img {
  width: 100%;
  display: block;
  border-radius: var(--radius-xl);
}

.landing-features {
  padding: var(--space-24, 6rem) var(--space-10);
}

.landing-features h2 {
  text-align: center;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--space-12);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.feature-card {
  padding: var(--space-8);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all 300ms var(--ease-out-expo, ease);
}

.feature-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card .feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  background: var(--color-brand-glow);
  color: var(--color-brand);
}

.feature-card h3 {
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ── Settings Page ── */
.settings-section {
  margin-bottom: var(--space-8);
}

.settings-section h3 {
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.color-picker-group input[type="color"] {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 2px;
  background: transparent;
}


/* ── Landing Grid Classes (needed for responsive overrides) ── */
.landing-stats-section {
  padding: var(--space-12) var(--space-8) var(--space-6);
  max-width: 900px;
  margin: -2rem auto 0;
  position: relative;
  z-index: 3;
}

.landing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.landing-steps-section {
  padding: var(--space-16) var(--space-8);
  max-width: 1000px;
  margin: 0 auto;
}

.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  position: relative;
}

.landing-usecases-section {
  padding: var(--space-16) var(--space-8);
  max-width: 1000px;
  margin: 0 auto;
}

.landing-usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.landing-pricing-section {
  padding: var(--space-16) var(--space-8);
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.landing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: var(--space-4);
  max-width: calc(var(--cols, 5) * 300px);
  margin: 0 auto;
}


/* Testimonials Section */
.landing-testimonials-section {
  padding: var(--space-20) var(--space-8);
  max-width: 1100px;
  margin: 0 auto;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.testimonial-card {
  padding: var(--space-8);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), border-color 300ms ease, box-shadow 300ms ease;
  position: relative;
  overflow: hidden;
}

.testimonial-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--color-brand);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08);
}

.aggregate-rating-badge {
  transition: all 300ms ease;
}

.aggregate-rating-badge:hover {
  border-color: var(--color-brand) !important;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

/* Responsive Testimonials styling */
@media (max-width: 1024px) and (min-width: 769px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonials-grid > :last-child {
    grid-column: span 2;
    justify-self: center;
    width: 100%;
    max-width: calc(50% - (var(--space-6) / 2));
  }
}

@media (max-width: 768px) {
  .landing-testimonials-section {
    padding: var(--space-12) var(--space-4);
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.landing-faq-section {
  padding: var(--space-24) var(--space-8);
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-12);
  align-items: start;
}

.faq-sidebar {
  position: sticky;
  top: 100px;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) 0;
}

.faq-trigger {
  width: 100%;
  padding: var(--space-4) var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: left;
  gap: var(--space-4);
  transition: color 200ms ease;
}

.faq-trigger:hover {
  color: var(--color-brand);
}

.faq-icon-wrapper {
  color: var(--color-text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms ease;
}

.faq-trigger:hover .faq-icon-wrapper {
  color: var(--color-brand);
}

.faq-answer {
  padding: 0 var(--space-2) var(--space-5);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  animation: faqSlideDown 200ms ease-out;
}

@keyframes faqSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-cta-section {
  padding: var(--space-16) var(--space-8);
  text-align: center;
}

.landing-showcase-section {
  padding: var(--space-24) var(--space-6);
  max-width: 1100px;
  margin: 0 auto;
}

.landing-showcase-row-2 {
  margin-top: var(--space-32) !important;
}

.landing-footer-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

/* ── Dashboard Header Profile (responsive) ── */
.header-profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ── Responsive: 1024px (Tablet) ── */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
    background: var(--color-bg-secondary, #11111b);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  [data-theme="light"] .sidebar.open {
    background: #ffffff;
  }

  .dashboard-main {
    margin-left: 0 !important;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 45;
    animation: fadeIn 200ms ease;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  /* Landing page tablet and mobile - hide desktop nav links, show hamburger */
  .landing-nav .nav-links,
  .desktop-nav {
    display: none !important;
  }

  .landing-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
  }

  .landing-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    max-width: 100%;
  }

  .landing-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}

/* ── Landing Header & Navigation (Render-Blocking Critical Styles) ── */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.desktop-only-btn {
  display: inline-flex;
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-menu-btn {
    display: flex !important;
  }
}

@media (max-width: 640px) {
  .desktop-only-btn {
    display: none !important;
  }
  .hero-cta-group {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto 20px auto !important;
  }
  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100% !important;
    justify-content: center !important;
  }
  .metric-highlights-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .landing-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .metric-highlights-grid {
    grid-template-columns: 1fr !important;
  }
  .hero-trust-row {
    gap: 10px !important;
  }
}

/* Mobile menu button - premium animated hamburger */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  position: relative;
}

.mobile-menu-btn:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-brand);
}

.mobile-menu-btn .hamburger-lines {
  width: 18px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.mobile-menu-btn .hamburger-lines span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: 2px;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease, width 300ms cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.mobile-menu-btn:hover .hamburger-lines span {
  background: var(--color-brand);
}

/* Staggered widths for premium look */
.mobile-menu-btn .hamburger-lines span:nth-child(2) {
  width: 70%;
  margin-left: auto;
}

/* Open state - morph to X */
.mobile-menu-btn.open .hamburger-lines span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

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

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

/* ── Responsive: 768px (Mobile) ── */
@media (max-width: 768px) {
  .dashboard-main {
    overflow-x: hidden !important;
    max-width: 100vw;
  }

  .dashboard-content {
    padding: var(--space-4);
    max-width: 100vw;
  }

  .card {
    overflow: hidden;
    min-width: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .page-header h1 {
    font-size: var(--font-size-xl);
  }

  /* Table responsive - horizontal scroll */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
  }

  /* Filter bar */
  .filter-bar {
    flex-direction: column;
    gap: var(--space-3);
  }

  .filter-bar .search-bar {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100%;
  }

  .filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    width: 100%;
  }

  .filter-grid > div {
    min-width: 0 !important;
    width: 100%;
  }

  .filter-bar .form-input,
  .filter-bar .form-input[type="date"],
  .filter-bar .custom-select-sm,
  .filter-bar .form-select,
  .filter-bar select {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100%;
  }

  .filter-bar > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
  }

  /* Header profile */
  .header-profile .profile-name,
  .header-profile .profile-role {
    display: none;
  }

  /* Notification dropdown */
  .notification-dropdown {
    right: -40px;
    width: calc(100vw - 32px);
    max-width: 360px;
  }

  /* ── Landing page 768px ── */
  .landing-nav {
    padding: var(--space-3) var(--space-4);
  }

  .landing-nav .nav-links {
    display: none !important;
  }

  .landing-hero {
    padding: calc(var(--header-height) + var(--space-8)) var(--space-4) var(--space-8);
    gap: var(--space-8);
  }

  .landing-hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.75rem);
    margin-bottom: var(--space-4);
  }

  .landing-hero .hero-subtitle {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-6);
    max-width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto var(--space-4);
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-4) !important;
  }

  /* Landing stats */
  .landing-stats-section {
    padding: var(--space-4);
  }

  .landing-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
  }

  .landing-stat-value {
    font-size: var(--font-size-lg) !important;
  }

  .landing-stat-icon {
    width: 16px;
    height: 16px;
  }

  .landing-stat-item {
    padding: var(--space-3) var(--space-2) !important;
  }

  /* How it works */
  .landing-steps-section {
    padding: var(--space-10) var(--space-4);
  }

  .landing-steps-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }

  /* Connecting line hide on mobile */
  .landing-steps-grid .steps-line {
    display: none;
  }

  /* Features */
  .landing-features {
    padding: var(--space-12) var(--space-4);
  }

  .landing-features h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-8);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .feature-card {
    padding: var(--space-5);
  }

  /* Use cases */
  .landing-usecases-section {
    padding: var(--space-10) var(--space-4);
  }

  .landing-usecases-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Pricing */
  .landing-pricing-section {
    padding: var(--space-10) var(--space-4);
  }

  .landing-pricing-section h2 {
    font-size: var(--font-size-2xl) !important;
  }

  .landing-pricing-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    max-width: 450px;
    margin: 0 auto;
  }

  /* FAQ */
  .landing-faq-section {
    grid-template-columns: 1fr;
    padding: var(--space-12) var(--space-4);
    gap: var(--space-8);
  }

  .faq-sidebar {
    position: static;
  }

  /* CTA */
  .landing-cta-section {
    padding: var(--space-10) var(--space-4);
  }

  .landing-cta-section .card-glass {
    padding: var(--space-8) var(--space-5) !important;
  }

  .landing-showcase-section {
    padding: var(--space-12) var(--space-4);
  }

  .landing-showcase-row-2 {
    margin-top: var(--space-16) !important;
  }

  /* Footer */
  .landing-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  /* Footer bottom bar */
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }

  /* Check-in page */
  .checkin-steps {
    gap: var(--space-1);
  }

  .checkin-step span {
    font-size: var(--font-size-2xs);
  }

  /* Camera container */
  .camera-container {
    max-width: 100%;
    height: 280px;
  }

  /* Dashboard overview grid */
  .overview-grid {
    grid-template-columns: 1fr !important;
  }

  /* Modal */
  .modal {
    max-width: calc(100vw - 24px) !important;
    margin: 12px !important;
    max-height: calc(100dvh - 24px);
  }

  /* Emergency banner */
  .emergency-banner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }

  /* Billing cards - stack on mobile */
  .billing-usage-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Responsive: 480px (Small phone) ── */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    padding: 0 var(--space-4);
  }

  .dashboard-content {
    padding: var(--space-3);
  }

  .card {
    padding: var(--space-4);
  }

  .btn {
    padding: 10px 16px;
    font-size: var(--font-size-xs);
  }

  .stat-card {
    padding: var(--space-4);
  }

  .stat-card .stat-value {
    font-size: var(--font-size-xl);
  }

  /* Hide sign out text on very small screens */
  .btn .hide-mobile {
    display: none;
  }

  /* Landing hero - very small */
  .landing-hero h1 {
    font-size: 1.5rem;
  }

  .hero-badge {
    font-size: var(--font-size-xs);
    padding: 4px 12px;
  }

  .landing-nav .btn-sm {
    padding: 6px 12px;
    font-size: var(--font-size-xs);
  }

  /* Hide Sign In on very small screens - Get Started is enough */
  .landing-nav .nav-actions .btn-ghost {
    display: none;
  }

  .landing-nav .nav-actions {
    gap: var(--space-2);
  }

  /* Landing stats - compact row */
  .landing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  /* How it works - single column */
  .landing-steps-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .landing-footer-grid {
    grid-template-columns: 1fr;
  }

  /* Check-in steps minimal */
  .checkin-step-divider {
    margin: 0 var(--space-1);
  }

  .step-number {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  /* Kiosk */
  .kiosk-page {
    padding: var(--space-4);
  }

  .kiosk-org-name {
    font-size: var(--font-size-2xl);
  }

  .kiosk-page .kiosk-welcome {
    font-size: var(--font-size-base);
  }
}

/* ── Print Styles ── */
@media print {

  .sidebar,
  .dashboard-header,
  .page-header-actions,
  .filter-bar,
  .pagination,
  .btn,
  .theme-toggle,
  .notification-btn {
    display: none !important;
  }

  .dashboard-main {
    margin-left: 0 !important;
  }

  .dashboard-content {
    padding: 0;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .table-container {
    border: 1px solid #ddd;
    box-shadow: none;
  }
}

/* Badge Print Layout */
.badge-print {
  width: 86mm;
  height: 54mm;
  padding: 8mm;
  background: white;
  color: #111;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-family);
}

.badge-print .badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding-bottom: 4mm;
}

.badge-print .badge-visitor-name {
  font-size: 16px;
  font-weight: 700;
}

.badge-print .badge-company {
  font-size: 11px;
  color: #666;
}

.badge-print .badge-details {
  font-size: 10px;
  color: #444;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge-print .badge-qr {
  width: 60px;
  height: 60px;
}

/* ── Dashboard Two-Column Layout ── */
.dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.dashboard-two-col[data-cols="2"] {
  grid-template-columns: 2fr 1fr;
}

/* ══════════════════════════════════════════════
   MOBILE RESPONSIVE - FULL DASHBOARD AUDIT
   ══════════════════════════════════════════════ */

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  /* Sidebar: off-canvas on tablet */
  .sidebar {
    transform: translateX(-100%);
    z-index: 60;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0 !important;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 55;
    animation: fadeIn 200ms ease;
  }

  /* Header */
  .dashboard-header {
    padding: 0 var(--space-4);
  }

  .dashboard-content {
    padding: var(--space-5) var(--space-6);
  }

  /* Two-column layout → single column */
  .dashboard-content > div > div[style*="grid-template-columns: 2fr 1fr"],
  .dashboard-content > div > div[style*="gridTemplateColumns"] {
    /* Handled via inline style override in page */
  }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
  /* Content area */
  .dashboard-content {
    padding: var(--space-4);
  }

  .dashboard-header {
    padding: 0 var(--space-3);
    height: 56px;
  }

  /* Page header: stack title & actions */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
  }

  .page-header h1 {
    font-size: var(--font-size-xl);
  }

  .page-header-actions {
    width: 100%;
  }

  .page-header-actions .btn {
    flex: 1;
    justify-content: center;
  }

  /* Stats grid - 2 per row on mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-5);
  }

  /* Tables - horizontal scroll */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
  }

  /* Filter bar: wrap on mobile */
  .filter-bar {
    gap: var(--space-2);
    margin-bottom: var(--space-4);
  }

  .filter-bar .search-bar {
    max-width: 100%;
    min-width: 100%;
  }

  .filter-bar .form-select,
  .filter-bar select,
  .filter-bar .custom-select-sm {
    min-width: 0;
    flex: 1;
  }

  .filter-grid {
    width: 100%;
  }

  .filter-grid > div {
    min-width: 0;
    flex: 1;
  }

  /* Two-column grid → single column */
  .dashboard-two-col[data-cols="2"] {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .card {
    border-radius: var(--radius-lg);
  }

  .card-body {
    padding: var(--space-4);
  }

  .card-header {
    padding: var(--space-3) var(--space-4);
  }

  /* Stat cards */
  .card-stat {
    padding: var(--space-4);
  }

  .card-stat .stat-value {
    font-size: var(--font-size-xl);
  }

  /* User menu */
  .user-menu .user-info {
    display: none;
  }

  /* Notification dropdown */
  .dropdown-menu {
    position: fixed !important;
    top: 56px !important;
    left: var(--space-3) !important;
    right: var(--space-3) !important;
    width: auto !important;
    max-height: calc(100vh - 70px) !important;
  }

  /* Toast */
  .toast {
    left: var(--space-3);
    right: var(--space-3);
    top: var(--space-3);
  }

  .toast-item {
    min-width: 0;
    max-width: 100%;
  }

  /* Modal */
  .modal-overlay {
    padding: var(--space-3);
    align-items: center;
  }

  .modal {
    max-width: calc(100% - 24px);
    border-radius: var(--radius-2xl);
    max-height: 85vh;
  }

  .modal-header {
    padding: var(--space-4) var(--space-5);
  }

  .modal-body {
    padding: var(--space-5);
  }

  .modal-footer {
    padding: var(--space-4) var(--space-5);
  }

  /* Analytics grid */
  .analytics-grid {
    gap: var(--space-3);
  }

  .analytics-grid .chart-card {
    padding: var(--space-4);
  }

  /* Check-in steps */
  .checkin-steps {
    margin-bottom: var(--space-5);
    padding: 0;
  }

  .checkin-step .step-label {
    display: none;
  }

  /* Locations grid */
  .locations-grid {
    grid-template-columns: 1fr !important;
  }

  /* Empty state */
  .empty-state {
    padding: var(--space-10) var(--space-5);
  }

  /* Pagination */
  .pagination button {
    min-width: 34px;
    height: 34px;
    font-size: var(--font-size-xs);
  }

  /* Tabs */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    margin-bottom: var(--space-5);
  }

  .tab {
    white-space: nowrap;
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
  }

  /* ── Platform Admin Mobile ── */

  /* Status filter tabs - scroll horizontally */
  .filter-bar > div[style*="gap: 2px"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
  }

  .filter-bar > div[style*="gap: 2px"] button {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: var(--font-size-xs);
  }

  /* Force all multi-column inline grids inside dashboard to stack on mobile */
  .dashboard-content div[style*="grid-template-columns: 2fr"],
  .dashboard-content div[style*="grid-template-columns: 1fr 320px"],
  .dashboard-content div[style*="grid-template-columns: 1fr 1fr 1fr"],
  .dashboard-content div[style*="grid-template-columns: 1fr 1fr"],
  .dashboard-content div[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Small Mobile (≤480px) ── */
@media (max-width: 480px) {
  .dashboard-content {
    padding: var(--space-3);
  }

  /* Stats: still 2 per row but tighter */
  .stats-grid {
    gap: var(--space-2);
  }

  .card-stat {
    padding: var(--space-3);
  }

  .card-stat .stat-value {
    font-size: var(--font-size-lg);
  }

  .card-stat .stat-label {
    font-size: var(--font-size-2xs);
  }

  /* Page header */
  .page-header h1 {
    font-size: var(--font-size-lg);
  }

  .page-header .subtitle {
    font-size: var(--font-size-xs);
  }

  /* Buttons */
  .page-header-actions .btn {
    font-size: var(--font-size-xs);
    padding: 8px 14px;
  }

  /* Search bar */
  .search-bar {
    max-width: 100% !important;
  }
}

/* ============================================
   BLOG CONTENT - Premium Markdown Rendering
   ============================================ */

.blog-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-primary);
  letter-spacing: -0.003em;
}

.blog-content .blog-p {
  margin-bottom: 1.6em;
}

.blog-content .blog-h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 2.4em 0 0.8em;
  line-height: 1.2;
}

.blog-content .blog-h2 {
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin: 2em 0 0.7em;
  line-height: 1.25;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--color-border);
}

.blog-content .blog-h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 1.8em 0 0.6em;
  line-height: 1.3;
}

.blog-content .blog-h4 {
  font-size: 1.1rem;
  font-weight: 650;
  margin: 1.5em 0 0.5em;
  line-height: 1.4;
}

.blog-content .blog-blockquote {
  border: 1px solid rgba(99, 102, 241, 0.15);
  margin: 2em 0;
  padding: 1.4em 1.8em 1.4em 2.8em;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(99, 102, 241, 0.06));
  border-radius: var(--radius-lg);
  font-style: italic;
  color: var(--color-text-primary);
  font-size: 1.1rem;
  line-height: 1.8;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.blog-content .blog-blockquote::before {
  content: "“";
  position: absolute;
  top: -0.1em;
  left: 0.25em;
  font-size: 4.2rem;
  font-family: Georgia, serif;
  color: rgba(99, 102, 241, 0.18);
  line-height: 1;
  pointer-events: none;
}

.blog-content .blog-code-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.2em 1.4em;
  margin: 1.8em 0;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  position: relative;
}

.blog-content .blog-code-block::before {
  content: attr(data-lang);
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-family: inherit;
}

.blog-content .blog-inline-code {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.88em;
  font-weight: 500;
  color: var(--color-brand);
}

.blog-content .blog-ul,
.blog-content .blog-ol {
  margin: 1.4em 0;
  padding-left: 1.6em;
}

.blog-content .blog-li,
.blog-content .blog-oli {
  margin-bottom: 0.6em;
  line-height: 1.7;
}

.blog-content .blog-li::marker {
  color: var(--color-brand);
}

.blog-content .blog-oli::marker {
  color: var(--color-brand);
  font-weight: 600;
}

.blog-content .blog-link {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.blog-content .blog-link:hover {
  border-bottom-color: var(--color-brand);
}

.blog-content .blog-hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5em 0;
}

.blog-content .blog-figure {
  margin: 2em 0;
  text-align: center;
}

.blog-content .blog-img {
  max-width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.blog-content .blog-figure figcaption {
  margin-top: 0.6em;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.blog-content strong {
  font-weight: 700;
  color: var(--color-text-primary);
}

.blog-content em {
  font-style: italic;
}

/* Blog responsive */
@media (max-width: 640px) {
  .blog-content {
    font-size: 1rem;
    line-height: 1.8;
  }

  .blog-content .blog-h1 { font-size: 1.6rem; }
  .blog-content .blog-h2 { font-size: 1.35rem; }
  .blog-content .blog-h3 { font-size: 1.15rem; }
  .blog-content .blog-code-block { font-size: 0.8rem; padding: 0.8em 1em; }
}

/* ── Envoy-Style Blog Layout ── */
.blog-detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-12);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) var(--space-12);
}

.blog-detail-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  padding-right: var(--space-4);
}

.blog-detail-main {
  min-width: 0;
  max-width: 760px;
}

/* TOC styles */
.toc-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-8);
}

.toc-item-link {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  line-height: 1.4;
  font-weight: 500;
  transition: color 0.2s ease;
  display: block;
}

.toc-item-link:hover {
  color: var(--color-brand);
}

.toc-item-link.active {
  color: #E14B3B !important; /* Envoy-style red active highlight */
  font-weight: 600;
}

/* Stay in the know (Newsletter form) */
.newsletter-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.newsletter-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

.newsletter-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

.newsletter-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.newsletter-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: var(--space-2) 0;
}

.newsletter-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  cursor: pointer;
  line-height: 1.4;
}

.newsletter-checkbox-item input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
}

.newsletter-btn {
  background: #E14B3B; /* Envoy-style red subscribe button */
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  text-align: center;
}

.newsletter-btn:hover {
  background: #C93C2F;
}

.newsletter-btn:active {
  transform: scale(0.98);
}

/* Responsive constraints */
@media (max-width: 1024px) {
  .blog-detail-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .blog-detail-sidebar {
    position: static;
    order: 2; /* Move sidebar below the article content */
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-8);
    padding-right: 0;
  }
  
  .blog-detail-main {
    order: 1;
    max-width: 100%;
  }

  .toc-list {
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* ── Premium Transitions & Reveals ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children > *:nth-child(1) { transition-delay: 40ms; }
.stagger-children > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children > *:nth-child(3) { transition-delay: 120ms; }
.stagger-children > *:nth-child(4) { transition-delay: 160ms; }
.stagger-children > *:nth-child(5) { transition-delay: 200ms; }
.stagger-children > *:nth-child(6) { transition-delay: 240ms; }

/* Pricing Card hover cleanups */
.pricing-card {
  position: relative;
  overflow: visible;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 500ms cubic-bezier(0.16, 1, 0.3, 1), border-color 300ms ease;
}

.pricing-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: var(--shadow-xl) !important;
}

/* Price Switch transitions */
.price-animate {
  animation: priceFadeIn 250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes priceFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Integrated Sites and Paired Handsets Grid */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

@media (min-width: 580px) {
  .sites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 880px) {
  .sites-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1160px) {
  .sites-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.site-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-card:hover {
  border-color: var(--color-border-active);
  box-shadow: var(--shadow-md);
}

.site-devices-container {
  height: 220px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.site-devices-container::-webkit-scrollbar {
  width: 4px;
}

.site-devices-container::-webkit-scrollbar-track {
  background: transparent;
}

.site-devices-container::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.site-devices-container::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand);
}

/* ==========================================================================
   Header Navigation, Site Switcher & Modern Sidebar System (Entrifi Alignment)
   ========================================================================== */

/* ── Header Navigation & Breadcrumbs ── */
.header-nav-container {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  min-width: 0;
  flex: 1;
}

.header-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--color-border);
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast, 120ms);
  flex-shrink: 0;
}

.header-sidebar-toggle:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  border-color: var(--color-border-hover);
}

.header-sidebar-toggle:active {
  transform: scale(0.96);
}

.header-nav-divider {
  width: 1px;
  height: 18px;
  background: var(--color-border);
  flex-shrink: 0;
}

.header-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.breadcrumb-location-wrapper {
  position: relative;
  display: inline-block;
}

.breadcrumb-root-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all var(--transition-fast, 120ms);
  text-decoration: none;
  max-width: 260px;
  line-height: normal;
  box-sizing: border-box;
}

.breadcrumb-root-btn:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-hover);
  color: var(--color-brand);
}

.breadcrumb-root-btn.active {
  border-color: var(--color-brand);
  background: var(--color-bg-hover);
  color: var(--color-brand);
}

.breadcrumb-root-icon {
  color: var(--color-brand);
  flex-shrink: 0;
}

.breadcrumb-root-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-chevron {
  color: var(--color-text-muted);
  transition: transform 150ms ease;
  margin-left: 2px;
  flex-shrink: 0;
}

.breadcrumb-chevron.open {
  transform: rotate(180deg);
  color: var(--color-brand);
}

.breadcrumb-separator {
  color: var(--color-text-muted);
  opacity: 0.5;
  flex-shrink: 0;
}

.breadcrumb-item {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 450;
  padding: 2px 4px;
  border-radius: var(--radius-sm, 6px);
  transition: all var(--transition-fast, 120ms);
  white-space: nowrap;
}

.breadcrumb-link:hover {
  color: var(--color-brand);
  background: var(--color-bg-hover);
}

.breadcrumb-current {
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 4px;
}

/* ── Interactive Site Dropdown Menu ── */
.breadcrumb-location-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  max-width: 340px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow: hidden;
  animation: fadeIn 150ms ease;
}

.breadcrumb-location-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-tertiary);
}

.breadcrumb-search-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.breadcrumb-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: var(--color-text-primary);
  width: 100%;
  font-family: inherit;
}

.breadcrumb-location-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.breadcrumb-location-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md, 8px);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast, 120ms);
  font-family: inherit;
}

.breadcrumb-location-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.breadcrumb-location-item.selected {
  background: var(--color-brand-glow);
  color: var(--color-brand);
  font-weight: 600;
}

.breadcrumb-item-check {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
  flex-shrink: 0;
}

.breadcrumb-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-hq-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-brand-glow);
  color: var(--color-brand);
  line-height: 1.2;
}

.breadcrumb-suspended-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  line-height: 1.2;
}

.breadcrumb-location-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-tertiary);
  display: flex;
  justify-content: flex-end;
}

.breadcrumb-manage-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-brand);
  text-decoration: none;
}

.breadcrumb-manage-link:hover {
  text-decoration: underline;
}

/* ── Modern Collapsible Sidebar Sections (Entrifi Titlecase Standard) ── */
.sidebar-section-group {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
}

.sidebar-section-group:first-child,
.sidebar-section-group:first-of-type {
  margin-top: 6px;
}

.sidebar-section-static {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--color-text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none !important;
  user-select: none;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 10px;
  margin-top: 0;
  margin-bottom: 6px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md, 8px);
  color: var(--color-text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none !important;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast, 120ms), background var(--transition-fast, 120ms);
  text-align: left;
}

.sidebar-section-header:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: inherit;
  text-transform: none !important;
}

.sidebar-section-chevron {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-text-secondary);
  opacity: 0.75;
  flex-shrink: 0;
}

.sidebar-section-header:hover .sidebar-section-chevron {
  opacity: 1;
  color: var(--color-text-primary);
}

.sidebar-section-header.is-collapsed .sidebar-section-chevron {
  transform: rotate(-90deg);
}

.sidebar-section-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-items.is-collapsed {
  display: none;
}

.sidebar.collapsed .sidebar-section-static,
.sidebar.collapsed .sidebar-section-header,
.sidebar.collapsed .sidebar-section-chevron {
  display: none !important;
}

.sidebar.collapsed .sidebar-section-items {
  display: flex !important;
}

/* ── Sidebar Nav Items (Compact Entrifi Style) ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-md, 8px);
  color: var(--color-text-primary);
  opacity: 0.82;
  font-size: var(--font-size-sm, 14px);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast, 120ms);
  position: relative;
  user-select: none;
}

.nav-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  opacity: 1;
}

.nav-item.active {
  background: var(--color-brand-glow);
  color: var(--color-brand);
  opacity: 1;
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--color-brand);
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item .nav-label {
  flex: 1;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 8px 0;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge {
  display: none !important;
}

.sidebar-footer {
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border-top: 1px solid var(--color-border);
}

.platform-admin-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 2px 7px;
  border-radius: var(--radius-sm, 6px);
  background: var(--color-brand-glow);
  color: var(--color-brand);
  border: 1px solid rgba(99, 102, 241, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar.collapsed .platform-admin-badge {
  display: none;
}

/* ── Top Header Right Controls (User Menu & Notifications) ── */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast, 120ms);
}

.notification-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: background var(--transition-fast, 120ms);
}

.user-menu:hover {
  background: var(--color-bg-hover);
}

.user-menu .user-info {
  text-align: right;
  min-width: 100px;
}

.user-menu .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  line-height: 1.2;
}

.user-menu .user-role {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .header-sidebar-toggle,
  .header-nav-divider {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .header-nav-container,
  .header-breadcrumbs {
    display: none !important;
  }

  .header-right {
    gap: 8px !important;
  }

  .user-menu .user-info {
    display: none !important;
  }
}
