:root {
  --au-bg: #f4f6fb;
  --au-surface: #ffffff;
  --au-surface-soft: #f8fafc;
  --au-border: rgba(15, 23, 42, 0.08);
  --au-text: #0f172a;
  --au-muted: #64748b;
  --au-primary: #4f46e5;
  --au-primary-soft: rgba(79, 70, 229, 0.12);
  --au-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --au-shadow-hover: 0 14px 34px -10px rgba(79, 70, 229, 0.18);
}

[data-bs-theme="dark"] {
  --au-bg: #0b1120;
  --au-surface: #111827;
  --au-surface-soft: #1e293b;
  --au-border: rgba(255, 255, 255, 0.08);
  --au-text: #f1f5f9;
  --au-muted: #94a3b8;
  --au-primary: #6366f1;
  --au-primary-soft: rgba(99, 102, 241, 0.18);
  --au-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
  --au-shadow-hover: 0 14px 34px -10px rgba(99, 102, 241, 0.25);
}

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

body {
  background-color: var(--au-bg);
  color: var(--au-text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: 78px;
  }
  .au-kpi-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.1rem;
    border-radius: 10px;
  }
}

/* Top Navbar */
.au-navbar {
  background-color: var(--au-surface);
  border-bottom: 1px solid var(--au-border);
  backdrop-filter: blur(12px);
  z-index: 1030;
}

.au-brand-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

.au-nav-pill {
  border-radius: 12px;
  padding: 0.5rem 0.95rem;
  font-weight: 500;
  color: var(--au-muted);
  border: none;
  background: transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.au-nav-pill:hover {
  color: var(--au-primary);
  background-color: var(--au-primary-soft);
}

.au-nav-pill.active {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Cards */
.au-card {
  background-color: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 1rem;
  box-shadow: var(--au-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.au-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--au-shadow-hover);
}

.au-kpi-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.au-soft-box {
  background-color: var(--au-surface-soft);
  border: 1px solid var(--au-border);
  border-radius: 0.85rem;
}

/* Bottom Navigation Bar (Mobile < 768px) */
.au-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background-color: var(--au-surface);
  border-top: 1px solid var(--au-border);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
  z-index: 1040;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 6px;
}

.au-bottom-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--au-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 4px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.au-bottom-btn i {
  font-size: 1.25rem;
}

.au-bottom-btn.active {
  color: var(--au-primary);
  background-color: var(--au-primary-soft);
  font-weight: 600;
}

/* Mode Switcher */
.au-mode-btn {
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
}

/* Chart Container */
.au-chart-wrap {
  position: relative;
  height: 290px;
  width: 100%;
}

.au-chart-wrap-sm {
  position: relative;
  height: 250px;
  width: 100%;
}

/* Vue Transitions */
.fade-slide-enter-active,
.fade-slide-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fade-slide-enter-from {
  opacity: 0;
  transform: translateY(8px);
}

.fade-slide-leave-to {
  opacity: 0;
  transform: translateY(-6px);
}

/* Toast Notification */
.au-toast-container {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 1080;
  max-width: 360px;
}

/* Camera & Scanner helpers for upcoming modules */
.au-video-box {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: #0f172a;
}

.au-video-box video,
.au-video-box canvas {
  width: 100%;
  display: block;
}

@media (min-width: 992px) {
  .au-kiosk-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .au-kiosk-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .au-kiosk-content {
    flex: 1 1 auto;
    min-height: 0;
  }
  .au-kiosk-content > [class*="col-"] {
    height: 100%;
  }
  .au-kiosk-video-box {
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100vh - 285px);
  }
  .au-kiosk-video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.au-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.au-qr-card {
  border: 1px dashed var(--au-border);
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
  color: #0f172a;
  page-break-inside: avoid;
}

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

.spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@media print {
  body * {
    visibility: hidden !important;
  }
  #qrPrintArea,
  #qrPrintArea * {
    visibility: visible !important;
  }
  #qrPrintArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 12px;
  }
  .no-print {
    display: none !important;
  }
}


