/*
 * style.css - Swan Industries Warehouse Telemetry System
 * Theme: Modern Sci-Fi Clean (White - Green - Orange)
 * Colors: Pure White (#ffffff), Swan Green (#00a651), Swan Orange (#f37023)
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;900&family=Prompt:wght@300;400;500;600;700&family=Rajdhani:wght@500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* SWAN Brand Colors */
  --swan-green: #00a651;
  --swan-green-dark: #008740;
  --swan-green-light: #e6f7ef;
  --swan-green-border: #a3e6c5;

  --swan-orange: #f37023;
  --swan-orange-dark: #d45610;
  --swan-orange-light: #fef1e9;
  --swan-orange-border: #fbc7a7;

  --swan-white: #ffffff;

  /* Primary & Accents */
  --primary: #00a651;
  --primary-hover: #008740;
  --primary-light: #e6f7ef;

  --accent-orange: #f37023;
  --accent-orange-hover: #d45610;
  --accent-orange-light: #fef1e9;

  --temp-red: #ea580c;
  --temp-bg: #fff7ed;
  --hum-green: #059669;
  --hum-bg: #ecfdf5;
  --warning: #d97706;

  /* Crisp Light Theme Surfaces */
  --bg-app: #f4f7fa;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  --text-main: #0f172a;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);

  --font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-scifi: 'Orbitron', 'Rajdhani', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  background-image:
    linear-gradient(rgba(0, 166, 81, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 166, 81, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 80px;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* Custom Clean Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--swan-green);
}

/* --- Layout --- */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* --- Top Header (Sleek White & Swan Brand Trims) --- */
.top-header {
  background: #ffffff;
  border-bottom: 2px solid var(--swan-green);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  color: var(--slate-900);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.brand-company-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scifi-brand-title {
  font-family: var(--font-scifi);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--swan-green-dark);
}

.scifi-system-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--swan-orange);
  background: var(--swan-orange-light);
  border: 1px solid var(--swan-orange-border);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.8px;
}

.scifi-brand-sub {
  font-size: 11.5px;
  color: var(--slate-500);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Node Status Indicator */
.scifi-node-indicator {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--swan-green-light);
  border: 1px solid var(--swan-green-border);
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--swan-green-dark);
  font-weight: 700;
}

@media (min-width: 640px) {
  .scifi-node-indicator {
    display: inline-flex;
  }
}

.pulse-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--swan-green);
  box-shadow: 0 0 8px rgba(0, 166, 81, 0.6);
  animation: beaconPulse 2s infinite;
}

@keyframes beaconPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.badge-scifi, .badge-gray {
  background: #f1f5f9 !important;
  color: var(--slate-700) !important;
  border: 1px solid #cbd5e1 !important;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* --- Desktop Sidebar Navigation --- */
.desktop-sidebar {
  display: none;
  width: 255px;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  padding: 24px 14px;
  flex-direction: column;
  gap: 8px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) {
  .desktop-sidebar {
    display: flex;
  }
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--slate-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.nav-link i {
  font-size: 20px;
  color: var(--slate-500);
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: #f8fafc;
  color: var(--swan-green-dark);
  border-color: #e2e8f0;
}

.nav-link:hover i {
  color: var(--swan-green);
}

.nav-link.active {
  background: var(--swan-green-light);
  color: var(--swan-green-dark);
  font-weight: 700;
  border-color: var(--swan-green-border);
  box-shadow: 0 2px 8px rgba(0, 166, 81, 0.12);
  border-left: 4px solid var(--swan-green);
}

.nav-link.active i {
  color: var(--swan-green);
}

/* --- Mobile Bottom Navigation --- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--slate-500);
  font-size: 10.5px;
  font-family: var(--font-family);
  font-weight: 500;
  padding: 6px 8px;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s ease;
}

.mobile-nav-btn i {
  font-size: 22px;
  margin-bottom: 2px;
}

.mobile-nav-btn.active {
  color: var(--swan-green);
  font-weight: 700;
}

/* --- Main Content Area --- */
.main-content {
  flex: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
  width: 100%;
}

@media (min-width: 768px) {
  .main-content {
    padding: 26px;
  }
}

.hidden {
  display: none !important;
}

.tab-content.hidden {
  display: none !important;
}

/* Section Titles */
.section-header {
  margin-bottom: 20px;
  border-left: 4px solid var(--swan-green);
  padding-left: 12px;
}

.section-header h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--slate-900);
}

.section-header p {
  font-size: 13px;
  color: var(--slate-500);
  margin-top: 2px;
}

/* --- Cards (Clean White with Swan Trim) --- */
.card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid #e2e8f0;
  margin-bottom: 22px;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}

/* Grid Layouts */
.entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 900px) {
  .entry-grid {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
  }
}

/* --- Visual Dial Gauge Section --- */
.gauge-container-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

.gauge-canvas-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .gauge-canvas-wrapper {
    width: 320px;
    height: 320px;
  }
}

#analogGaugeCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.gauge-legend-guide {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-temp {
  background-color: var(--swan-orange);
}

.dot-hum {
  background-color: var(--swan-green);
}

.real-meter-guide-link {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--swan-green-dark);
  background: var(--swan-green-light);
  border: 1px solid var(--swan-green-border);
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: 600;
  transition: all 0.2s ease;
}

.real-meter-guide-link:hover {
  background: #d1fae5;
}

/* --- Form Controls --- */
.form-group {
  margin-bottom: 16px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.input-control {
  width: 100%;
  height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid #cbd5e1;
  background-color: #ffffff;
  color: var(--slate-900);
  font-family: var(--font-family);
  font-size: 14px;
  transition: all 0.2s ease;
}

.input-control:focus {
  outline: none;
  border-color: var(--swan-green);
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.15);
}

select.input-control {
  cursor: pointer;
}

/* Stepper Controls */
.stepper-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--slate-700);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stepper-btn:hover {
  background: var(--swan-green-light);
  border-color: var(--swan-green);
  color: var(--swan-green-dark);
}

.stepper-input {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  height: 46px;
  border-radius: var(--radius-md);
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: var(--slate-900);
}

/* Form Card Borders */
.temp-card-border {
  border-left: 4px solid var(--swan-orange) !important;
  background: #fffaf6 !important;
  border: 1px solid #fed7aa;
}

.hum-card-border {
  border-left: 4px solid var(--swan-green) !important;
  background: #f7fdfa !important;
  border: 1px solid #bbf7d0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--swan-green) 0%, var(--swan-green-dark) 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 166, 81, 0.25);
}

.btn-primary:hover {
  background: var(--swan-green-dark);
  box-shadow: 0 4px 14px rgba(0, 166, 81, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: var(--slate-700);
  border: 1.5px solid #cbd5e1;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--swan-green);
  color: var(--swan-green-dark);
}

.btn-full {
  width: 100%;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-xs-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  color: var(--swan-green);
}

/* --- Status Pills --- */
.status-pill {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.pill-success {
  background: var(--swan-green-light);
  color: var(--swan-green-dark);
  border: 1px solid var(--swan-green-border);
}

.pill-warning {
  background: var(--swan-orange-light);
  color: var(--swan-orange-dark);
  border: 1px solid var(--swan-orange-border);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-red {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-zone {
  background: var(--swan-orange-light);
  color: var(--swan-orange-dark);
  border: 1px solid var(--swan-orange-border);
}

/* --- KPI Cards Grid (White Clean Telemetry Cards) --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

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

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-500);
}

.kpi-value {
  font-size: 29px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--slate-900);
  margin-bottom: 4px;
}

.kpi-value.text-red {
  color: var(--swan-orange) !important;
}

.kpi-value.text-green {
  color: var(--swan-green) !important;
}

.kpi-footer {
  font-size: 11.5px;
  color: var(--slate-500);
}

/* --- Dashboard Filter Bar (Top of Dashboard) --- */
.dashboard-filter-card {
  margin-bottom: 20px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dashboard-filter-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 166, 81, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 22px;
  flex-shrink: 0;
}

.filter-main-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-900);
}

.filter-sub-title {
  font-size: 12px;
  color: var(--slate-500);
}

.dashboard-filter-inputs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.filter-group select {
  height: 38px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}

.select-zone-highlight {
  min-width: 170px;
  border: 2px solid var(--primary) !important;
  background-color: #f8fafc;
  color: var(--slate-900);
  font-weight: 700 !important;
}

.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

/* --- Charts Section (Bright & High Contrast) --- */
.chart-container-box {
  position: relative;
  height: 360px;
  width: 100%;
}

.chart-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

/* --- Recent Activity List --- */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.recent-item:hover {
  background: #f1f5f9;
}

.recent-item.warning {
  border-color: #fecaca;
  background: #fff5f5;
}

.recent-item-icon {
  font-size: 22px;
}

.recent-item-details {
  flex: 1;
}

.recent-item-title {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--slate-800);
}

.recent-item-time {
  color: var(--slate-400);
  font-size: 11px;
}

.recent-item-values {
  display: flex;
  gap: 14px;
  font-size: 12px;
  margin-top: 4px;
}

.val-temp { color: var(--swan-orange); font-weight: 600; }
.val-hum { color: var(--swan-green); font-weight: 600; }
.val-staff { color: var(--slate-500); }

/* --- Data Table --- */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  background: #ffffff;
}

.data-table th {
  background: #f8fafc;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--slate-700);
  border-bottom: 1.5px solid #e2e8f0;
  font-family: var(--font-family);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--slate-800);
}

.data-table tr:hover {
  background: #f8fafc;
}

.table-row-warning {
  background: #fffaf0;
}

/* --- Printable QR Code Poster (Swan Branded) --- */
.qr-poster-preview {
  background: #ffffff;
  border: 2px dashed var(--swan-green);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow-md);
  color: #0f172a;
}

.qr-poster-logo-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 10px;
}

.qr-poster-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.qr-code-box {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 16px 0;
  border: 1px solid #cbd5e1;
}

.qr-poster-header h3 {
  font-size: 20px;
  color: #0f172a;
  font-weight: 700;
}

.qr-poster-header p {
  color: var(--swan-green);
  font-weight: 700;
  font-size: 18px;
  margin-top: 4px;
}

.qr-instructions-list {
  text-align: left;
  margin: 16px 0;
  background: #f8fafc;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.qr-instructions-list li {
  margin-bottom: 6px;
}

.qr-reference-photo {
  max-width: 180px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-top: 10px;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@media (min-width: 768px) {
  .toast-container {
    bottom: 24px;
  }
}

.toast {
  background: #0f172a;
  border: 1px solid #334155;
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  background: var(--swan-green);
  color: #ffffff;
}

.toast-error {
  background: #dc2626;
  color: #ffffff;
}

.toast-warning {
  background: var(--swan-orange);
  color: #ffffff;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  color: var(--slate-900);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.modal-body {
  padding: 22px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  background: #f8fafc;
}

/* Helpers */
.text-red { color: var(--swan-orange) !important; }
.text-green { color: var(--swan-green) !important; }
.text-orange { color: var(--warning) !important; }
.text-blue { color: #0284c7 !important; }
.text-muted { color: var(--slate-500); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.whitespace-nowrap { white-space: nowrap; }

/* Photo Upload Box */
.photo-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}

.photo-upload-zone:hover {
  border-color: var(--swan-green);
  background: var(--swan-green-light);
}

.preview-container {
  position: relative;
  margin-top: 10px;
  display: inline-block;
}

.preview-thumb {
  max-width: 120px;
  max-height: 120px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  display: block;
}

.btn-remove-photo {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

/* --- PRINT MEDIA STYLES --- */
@media print {
  body {
    background: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    padding: 0 !important;
  }

  .top-header,
  .desktop-sidebar,
  .mobile-bottom-nav,
  .toast-container,
  .no-print,
  #generateQrBtn,
  #printQrBtn,
  .btn {
    display: none !important;
  }

  .main-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tab-content {
    display: none !important;
  }

  #tab-qr, #tab-history {
    display: block !important;
  }

  .qr-poster-preview {
    border: 1px solid #333 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 20px !important;
    page-break-after: always;
  }
}
