/* ============ CSS Variables & Theme System ============ */
:root {
  /* Light Mode Colors (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.8);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --primary-light: #e0f2fe;
  --primary-dark: #0369a1;

  --secondary-color: #6366f1;
  --secondary-hover: #4f46e5;
  --secondary-light: #e0e7ff;

  --success-color: #10b981;
  --success-light: #d1fae5;
  --success-dark: #059669;

  --warning-color: #f59e0b;
  --warning-light: #fef3c7;
  --warning-dark: #d97706;

  --danger-color: #ef4444;
  --danger-light: #fee2e2;
  --danger-dark: #dc2626;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --navbar-height: 72px;
  --sidebar-width: 280px;
  --container-max: 1280px;
  --content-padding: 24px;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-glass: rgba(30, 41, 59, 0.8);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --border-color: #334155;
  --border-light: #475569;

  --primary-light: #0c4a6e;
  --secondary-light: #312e81;
  --success-light: #064e3b;
  --warning-light: #78350f;
  --danger-light: #7f1d1d;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3),
    0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
    0 4px 6px -4px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3),
    0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

/* ============ Reset & Base ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color var(--transition-normal),
    color var(--transition-normal);
}

/* ============ Typography ============ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

h1 {
  font-size: 1.875rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 1.125rem;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* ============ Layout Container ============ */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.main-content {
  flex: 1;
  padding: var(--content-padding);
  padding-top: calc(var(--navbar-height) + var(--content-padding));
}

/* ============ Navbar ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 var(--content-padding);
}

.navbar-inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-brand svg {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.navbar-menu a:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.navbar-menu a.active {
  background: var(--primary-light);
  color: var(--primary-color);
}

[data-theme="dark"] .navbar-menu a.active {
  background: var(--primary-light);
  color: var(--primary-color);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-md);
}

.mobile-menu-toggle:hover {
  background: var(--bg-tertiary);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* User Dropdown */
.user-dropdown-container {
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  font-size: 1rem;
  transition: transform var(--transition-fast);
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  display: none;
  flex-direction: column;
  padding: 8px;
  z-index: 1001;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-menu.active {
  display: flex;
}

.user-dropdown-header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.user-dropdown-name {
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.user-dropdown-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.user-dropdown-item {
  padding: 8px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-size: 0.875rem;
}

.user-dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.user-dropdown-item svg {
  width: 16px;
  height: 16px;
}

.user-dropdown-item.danger {
  color: var(--danger-color);
}

.user-dropdown-item.danger:hover {
  background: var(--danger-light);
}

/* Responsive Navbar */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .navbar-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  .navbar-menu.active {
    display: flex;
  }

  .navbar-menu a {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
  }
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* ============ Cards ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.card-title svg {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
}

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stat-cards {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-icon.primary {
  background: var(--primary-light);
  color: var(--primary-color);
}

.stat-icon.success {
  background: var(--success-light);
  color: var(--success-color);
}

.stat-icon.warning {
  background: var(--warning-light);
  color: var(--warning-color);
}

.stat-icon.danger {
  background: var(--danger-light);
  color: var(--danger-color);
}

.stat-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1;
}

.stat-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: var(--success-dark);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: var(--danger-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1rem;
}

/* ============ Forms ============ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  appearance: none;
  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='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* ============ Tables ============ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.table tr:hover td {
  background: var(--bg-tertiary);
}

.table-actions {
  display: flex;
  gap: 6px;
}

/* ============ Badges ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge svg {
  width: 12px;
  height: 12px;
}

.badge-success {
  background: var(--success-light);
  color: var(--success-color);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning-color);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger-color);
}

.badge-info {
  background: var(--primary-light);
  color: var(--primary-color);
}

/* ============ Modal ============ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: var(--content-padding);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger-color);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

/* ============ QR Code ============ */
.qr-container {
  text-align: center;
  padding: 32px;
  background: white;
  border-radius: var(--radius-lg);
  max-width: 320px;
  margin: 0 auto;
}

.qr-container img {
  max-width: 240px;
  margin-bottom: 16px;
}

.qr-container h4 {
  color: #1e293b;
  margin-bottom: 4px;
}

.qr-container p {
  color: #64748b;
  font-size: 0.875rem;
  margin: 4px 0;
}

/* ============ Dashboard Grid ============ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.chart-container {
  position: relative;
  height: 280px;
  width: 100%;
}

/* ============ Empty State ============ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 1rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.875rem;
}

/* ============ Loading ============ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============ Toast Notifications ============ */
.toast-container {
  position: fixed;
  top: calc(var(--navbar-height) + 16px);
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.2s ease;
  min-width: 280px;
  max-width: 400px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 3px solid var(--success-color);
}
.toast.error {
  border-left: 3px solid var(--danger-color);
}
.toast.warning {
  border-left: 3px solid var(--warning-color);
}
.toast.info {
  border-left: 3px solid var(--primary-color);
}

.toast-icon {
  font-size: 1.125rem;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* ============ Login Page ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-primary);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header .logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-header .logo svg {
  width: 32px;
  height: 32px;
}

.login-header h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============ Inspection Page ============ */
.inspection-page {
  min-height: 100vh;
  padding: 20px;
  background: var(--bg-primary);
}

.inspection-header {
  text-align: center;
  margin-bottom: 32px;
  padding-top: 20px;
}

.device-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 560px;
  margin: 0 auto;
}

.device-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.device-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.device-icon svg {
  width: 28px;
  height: 28px;
}

.device-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.device-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.device-detail-row:last-child {
  border-bottom: none;
}

.device-detail-row label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.device-detail-row span {
  font-weight: 500;
  color: var(--text-primary);
}

/* Status Options */
.status-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.status-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-secondary);
}

.status-option:hover {
  border-color: var(--primary-color);
}

.status-option input {
  display: none;
}

.status-option.selected {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.status-option svg {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
}

.status-option span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ============ Print Styles ============ */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .qr-container {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============ Page Header ============ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-left h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.page-header-left h1 svg {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
}

.page-header-left p {
  margin: 0;
  font-size: 0.875rem;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  :root {
    --content-padding: 16px;
    --navbar-height: 64px;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 12px;
  }

  .navbar-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-options {
    grid-template-columns: 1fr;
  }
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ============ Utility Classes ============ */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mt-4 {
  margin-top: 16px;
}
.mb-4 {
  margin-bottom: 16px;
}
.hidden {
  display: none !important;
}

/* ============ FOOTER ============ */
.main-footer {
  margin-top: auto;
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
  background-color: var(--bg-secondary);
}

.main-footer p {
  margin: 0;
}
