:root {
  --primary: #c41e24;
  --primary-dark: #9b1119;
  --primary-light: #fef2f2;
  --primary-glow: rgba(196, 30, 36, 0.15);
  --accent: #1a56db;
  --accent-light: #e1effe;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --success: #059669;
  --success-light: #ecfdf5;
  --info: #3b82f6;
  --info-light: #eff6ff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1), 0 4px 10px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.12), 0 8px 16px -4px rgba(0,0,0,0.06);
}

[data-theme="dark"] {
  --primary-light: #3b1517;
  --primary-glow: rgba(196, 30, 36, 0.25);
  --accent-light: #1a2744;
  --danger-light: #3b1517;
  --warning-light: #3b2f0a;
  --success-light: #0a2e1f;
  --info-light: #1a2744;
  --gray-50: #0f172a;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-400: #64748b;
  --gray-500: #94a3b8;
  --gray-600: #cbd5e1;
  --gray-700: #e2e8f0;
  --gray-800: #f1f5f9;
  --gray-900: #f8fafc;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.5), 0 4px 10px -2px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.6), 0 8px 16px -4px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

.app-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  color: white;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--primary);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-title h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-logo {
  height: 40px;
  width: auto;
  filter: brightness(1.1);
  background: rgba(255,255,255,0.95);
  padding: 4px 8px;
  border-radius: 6px;
}

nav {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  padding: 4px;
  border-radius: 10px;
}

nav button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s;
  position: relative;
  letter-spacing: 0.2px;
}

nav button:hover {
  background: rgba(255,255,255,0.12);
  color: white;
}

nav button.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(196, 30, 36, 0.4);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px;
  animation: fadeIn 0.3s ease;
}

.page { display: none; }
.page.active { display: block; animation: fadeInUp 0.35s ease; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--gray-100);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.stat-card:nth-child(1)::before { background: var(--accent); }
.stat-card:nth-child(2)::before { background: var(--warning); }
.stat-card:nth-child(3)::before { background: var(--danger); }
.stat-card:nth-child(4)::before { background: var(--success); }

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.total { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.stat-icon.open { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.stat-icon.critical { background: linear-gradient(135deg, #fecaca, #fca5a5); }
.stat-icon.injuries { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }

.stat-info h3 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--gray-900);
}

.stat-info p {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--gray-100);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}

.card-body { padding: 22px; }

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.filters select, .filters input {
  padding: 9px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  color: var(--gray-700);
  transition: all 0.2s;
  font-weight: 500;
}

.filters select:focus, .filters input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}

.filters input { flex: 1; min-width: 200px; }

.btn {
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.1px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(196, 30, 36, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(196, 30, 36, 0.4);
  transform: translateY(-1px);
}

.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.btn-danger:hover { box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35); transform: translateY(-1px); }

.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.btn-success:hover { box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35); transform: translateY(-1px); }

.btn-outline {
  background: white;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  box-shadow: var(--shadow);
}

.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 10px; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}

.incident-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 700px;
}

.incident-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
}

.incident-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.incident-table tr {
  cursor: pointer;
  transition: all 0.2s;
}

.incident-table tbody tr:hover {
  background: linear-gradient(90deg, var(--primary-light), white);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-minor { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.badge-moderate { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.badge-serious { background: linear-gradient(135deg, #fed7aa, #fdba74); color: #9a3412; }
.badge-critical { background: linear-gradient(135deg, #fecaca, #fca5a5); color: #991b1b; }
.badge-fatal { background: linear-gradient(135deg, #374151, #1f2937); color: white; }

.badge-open { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.badge-investigating { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.badge-resolved { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.badge-closed { background: var(--gray-200); color: var(--gray-600); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.form-section {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px;
  border: 1px solid var(--gray-100);
  transition: box-shadow 0.3s;
}

.form-section:hover {
  box-shadow: var(--shadow-md);
}

.form-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), transparent) 1;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 5px;
  letter-spacing: 0.1px;
}

.form-group label .required { color: var(--primary); font-weight: 700; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.25s;
  font-family: inherit;
  background: white;
  color: var(--gray-800);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

.form-group textarea { resize: vertical; min-height: 80px; }

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

.photo-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: linear-gradient(180deg, var(--gray-50), white);
  position: relative;
  overflow: hidden;
}

.photo-upload-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.photo-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.photo-upload-area:hover::before { opacity: 1; }

.photo-upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.01);
}

.photo-upload-area p { color: var(--gray-500); margin-top: 8px; font-size: 14px; position: relative; }
.photo-upload-area .upload-icon { font-size: 40px; position: relative; }

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.photo-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.photo-preview:hover { transform: scale(1.04); }

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

.photo-preview .remove-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.photo-preview .remove-photo:hover { transform: scale(1.15); }

.switch-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gray-300);
  border-radius: 26px;
  transition: 0.3s;
}

.switch-slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.switch input:checked + .switch-slider { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.switch input:checked + .switch-slider:before { transform: translateX(22px); }

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 2px solid var(--gray-100);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  animation: slideDown 0.3s ease;
}

.detail-title h2 { font-size: 26px; font-weight: 800; color: var(--gray-900); }
.detail-title .report-num { color: var(--gray-500); font-size: 14px; margin-top: 4px; font-weight: 500; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 22px;
}

.detail-section {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  border: 1px solid var(--gray-100);
  transition: all 0.25s;
}

.detail-section:hover {
  box-shadow: var(--shadow-md);
}

.detail-section h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-100);
}

.detail-field {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-50);
}

.detail-field:last-child { border-bottom: none; }
.detail-field .label { color: var(--gray-500); font-size: 13px; font-weight: 600; }
.detail-field .value { font-size: 14px; font-weight: 500; text-align: right; max-width: 60%; color: var(--gray-800); }

.detail-text {
  padding: 10px 0;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.7;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.photo-gallery img {
  width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
  aspect-ratio: 4/3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.photo-gallery img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.gps-btn {
  background: linear-gradient(135deg, var(--accent-light), #dbeafe);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  transition: all 0.25s;
}

.gps-btn:hover {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
  transform: translateY(-1px);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pagination button {
  padding: 8px 14px;
  border: 1.5px solid var(--gray-200);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination button:hover { background: var(--gray-50); border-color: var(--gray-300); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 2px 6px rgba(196, 30, 36, 0.3); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }

.modal-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
  animation: fadeIn 0.5s ease;
}

.empty-state .empty-icon { font-size: 56px; margin-bottom: 20px; }
.empty-state h3 { font-size: 20px; color: var(--gray-600); margin-bottom: 10px; font-weight: 700; }
.empty-state p { font-size: 15px; color: var(--gray-500); }

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 14px 22px;
  border-radius: var(--radius);
  color: white;
  font-weight: 600;
  font-size: 14px;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }

.injury-fields { display: none; }
.injury-fields.show { display: block; animation: slideDown 0.3s ease; }

.witness-entry {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--gray-50);
  transition: border-color 0.2s;
}

.witness-entry:hover { border-color: var(--gray-300); }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.map-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 14px;
  margin-top: 8px;
  border: 1px solid var(--gray-200);
}

.gps-coords {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.gps-coords span {
  font-size: 13px;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-family: 'SF Mono', SFMono-Regular, monospace;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 250;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
}

.mobile-nav {
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  width: 280px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding-top: 60px;
  overflow-y: auto;
}

.mobile-nav button {
  width: 100%;
  min-height: 48px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: white;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav button:hover,
.mobile-nav button.active {
  background: rgba(255,255,255,0.1);
}

body.nav-open .mobile-nav {
  transform: translateX(0);
}

body.nav-open .mobile-nav-overlay {
  display: block;
}

.lang-toggle {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
}

.login-lang-toggle {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.login-lang-toggle:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .app-header .header-content { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .app-header nav { display: none; }
  .header-title h1 { font-size: 14px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-logo { height: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; gap: 12px; }
  .stat-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
  .stat-info h3 { font-size: 22px; }
  .stat-info p { font-size: 10px; }
  .form-section { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-group input, .form-group select, .form-group textarea { font-size: 16px; padding: 12px; }
  .btn { min-height: 44px; font-size: 14px; }
  .btn-lg { min-height: 48px; width: 100%; }
  .filters { flex-direction: column; }
  .filters select, .filters input { width: 100%; min-width: unset; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-header { flex-direction: column; gap: 12px; }
  .detail-header > div { width: 100%; flex-wrap: wrap; }
  .photo-gallery { grid-template-columns: repeat(2, 1fr); }
  .incident-table { font-size: 11px; min-width: 600px; }
  .incident-table th, .incident-table td { padding: 8px 6px; }
  .container { padding: 12px; }
  .toast { left: 12px; right: 12px; bottom: 12px; }
  .admin-modal-content { width: 95vw; max-height: 95vh; border-radius: 12px; }
  .card-header { flex-direction: column; gap: 8px; align-items: flex-start; }
  .card-header > div { width: 100%; }
  .user-menu { gap: 4px; }
  .user-name { display: none; }
  .user-menu .btn { padding: 6px 10px; font-size: 11px; }
  .admin-tabs { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-tab { white-space: nowrap; padding: 8px 14px; font-size: 13px; min-height: 40px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .pagination { gap: 2px; }
  .pagination button { padding: 8px 10px; min-height: 40px; }
  .vehicle-party { padding: 12px; }
  .witness-entry { padding: 10px; }
  .gps-coords { flex-direction: column; gap: 4px; }
  .report-stat { min-width: 70px; padding: 8px 10px; font-size: 12px; }
  .report-stat strong { font-size: 18px; }
  .login-container { margin: 16px; padding: 28px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .header-title h1 { font-size: 12px; max-width: 150px; }
  .header-logo { height: 28px; }
  .photo-gallery { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-title h2 { font-size: 20px; }
  .badge { font-size: 10px; padding: 3px 8px; }
  .admin-tab { font-size: 12px; padding: 6px 10px; }
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 30%, #1a1a2e 60%, #16213e 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(196, 30, 36, 0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(26, 86, 219, 0.1) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
}

.login-container {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 44px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  position: relative;
  animation: fadeInUp 0.5s ease;
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  max-width: 280px;
  height: auto;
  margin-bottom: 16px;
}

.login-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.login-header p {
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
}

.login-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
  animation: slideDown 0.3s ease;
}

.login-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-200);
}

.login-footer p {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 5px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
}

.badge-role-admin { background: linear-gradient(135deg, #7c3aed, #6d28d9); color: white; }
.badge-role-management { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.badge-role-crew { background: linear-gradient(135deg, #10b981, #059669); color: white; }

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: white;
  padding: 5px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}

.admin-tab {
  padding: 10px 22px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  transition: all 0.25s;
}

.admin-tab:hover { background: var(--gray-100); color: var(--gray-700); }
.admin-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(196, 30, 36, 0.3);
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; animation: fadeInUp 0.3s ease; }

.admin-modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: fadeInUp 0.3s ease;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(180deg, var(--gray-50), white);
}

.admin-modal-header h3 { font-size: 18px; font-weight: 700; }

.admin-modal-body {
  padding: 26px;
}

.vehicle-party {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.vehicle-party-detail {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.report-stat {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--primary);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  min-width: 100px;
  text-align: center;
}
.report-stat strong {
  display: block;
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 2px;
}
.btn-success {
  background: linear-gradient(135deg, var(--success), #047857);
  color: white;
  border: none;
}
.btn-success:hover {
  background: linear-gradient(135deg, #047857, #065f46);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  min-width: auto;
}

/* Animated stat counter */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-card .stat-info h3.counting {
  animation: countUp 0.3s ease forwards;
}

/* Stat card gradient backgrounds */
.stat-card.stat-gradient-blue { background: linear-gradient(135deg, #f0f5ff 0%, #e8effd 100%); }
.stat-card.stat-gradient-yellow { background: linear-gradient(135deg, #fffcf0 0%, #fef9e7 100%); }
.stat-card.stat-gradient-red { background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%); }
.stat-card.stat-gradient-green { background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); }
.stat-card.stat-gradient-purple { background: linear-gradient(135deg, #faf5ff 0%, #f5f0ff 100%); }

.stat-card:nth-child(5)::before { background: #7c3aed; }

/* Donut chart */
.donut-chart-container {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-segment {
  fill: none;
  stroke-width: 32;
  transition: stroke-dasharray 0.6s ease, stroke-dashoffset 0.6s ease;
}

.donut-chart .donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-chart .donut-center .donut-total {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.donut-chart .donut-center .donut-label {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.donut-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.donut-legend-item span:last-child {
  font-weight: 700;
  color: var(--gray-900);
  margin-left: auto;
}

/* Welcome banner */
.welcome-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 80%, #1a56db 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(196, 30, 36, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -60%;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-banner .welcome-text {
  position: relative;
  z-index: 1;
}

.welcome-banner .welcome-text h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.welcome-banner .welcome-text p {
  font-size: 14px;
  opacity: 0.8;
  font-weight: 400;
}

.welcome-banner .welcome-date {
  position: relative;
  z-index: 1;
  text-align: right;
  font-size: 13px;
  opacity: 0.85;
  font-weight: 500;
}

.welcome-banner .welcome-date .welcome-time {
  font-size: 20px;
  font-weight: 700;
  opacity: 1;
}

/* Custom confirm modal */
.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.confirm-modal.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.confirm-modal-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.3s ease;
  text-align: center;
}

.confirm-modal-content .confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.confirm-modal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.confirm-modal-content p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 120px;
  justify-content: center;
}

/* Enhanced toast with icon and progress bar */
.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 0 0 var(--radius) var(--radius);
  animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

.toast.info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Floating Action Button (FAB) */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(196, 30, 36, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fabPulse 2s ease-in-out infinite;
}

.fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 24px rgba(196, 30, 36, 0.5);
  animation: none;
}

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(196, 30, 36, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(196, 30, 36, 0.6); }
}

.fab-tooltip {
  position: absolute;
  right: 64px;
  background: var(--gray-800);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.fab:hover .fab-tooltip {
  opacity: 1;
}

/* Incident type icon badges */
.type-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.type-icon.type-injury { background: linear-gradient(135deg, #fecaca, #fca5a5); }
.type-icon.type-near-miss { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.type-icon.type-property-damage { background: linear-gradient(135deg, #fed7aa, #fdba74); }
.type-icon.type-environmental { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.type-icon.type-fire { background: linear-gradient(135deg, #fecaca, #f87171); }
.type-icon.type-vehicle { background: linear-gradient(135deg, #dbeafe, #93c5fd); }
.type-icon.type-default { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }

/* Recent incident card hover effects */
.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border-left: 4px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.recent-item:hover {
  background: var(--gray-50);
  border-left-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.recent-item + .recent-item {
  border-top: 1px solid var(--gray-100);
}

.recent-item .recent-info {
  flex: 1;
  min-width: 0;
}

.recent-item .recent-info .recent-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item .recent-info .recent-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.recent-item .recent-time {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
  white-space: nowrap;
}

/* Form progress indicator */
.form-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 20px 0;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  position: relative;
}

.progress-step .step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s;
}

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

.progress-step.active {
  color: var(--primary);
}

.progress-step.active .step-number {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(196, 30, 36, 0.3);
}

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

.progress-step.completed .step-number {
  background: linear-gradient(135deg, var(--success), #047857);
  color: white;
}

.progress-connector {
  width: 40px;
  height: 2px;
  background: var(--gray-200);
  margin: 0 4px;
  transition: background 0.3s;
}

.progress-connector.completed {
  background: var(--success);
}

/* Status workflow bar */
.status-flow {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 16px 0;
  flex-wrap: wrap;
}

.status-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  background: var(--gray-100);
  border-radius: 50px;
  transition: all 0.3s;
  position: relative;
}

.status-step.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(196, 30, 36, 0.25);
}

.status-step.completed {
  background: linear-gradient(135deg, var(--success), #047857);
  color: white;
}

.status-step-connector {
  width: 20px;
  height: 2px;
  background: var(--gray-200);
  margin: 0 2px;
}

.status-step-connector.completed {
  background: var(--success);
}

/* Button ripple effect */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.btn:active::after {
  animation: ripple 0.6s ease-out;
}

/* Section dividers with gradient lines */
.section-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gray-200), var(--primary-glow), var(--gray-200), transparent);
  margin: 28px 0;
  border: none;
}

/* Active nav indicator */
.nav-active-indicator {
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #ff6b6b, var(--primary));
  background-size: 200% 100%;
  animation: navIndicatorGlow 2s ease-in-out infinite;
  border-radius: 3px;
}

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

/* Notes timeline */
.notes-timeline {
  position: relative;
  padding-left: 28px;
}

.notes-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--gray-200));
}

.note-item {
  position: relative;
  padding: 16px;
  margin-bottom: 16px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
  transition: all 0.25s;
}

.note-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-200);
}

.note-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.note-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.note-header .note-user {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}

.note-header .note-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 50px;
}

.note-header .note-time {
  font-size: 11px;
  color: var(--gray-400);
  margin-left: auto;
  font-weight: 500;
}

.note-body {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
}

.note-form {
  margin-top: 20px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.note-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: all 0.25s;
  background: white;
}

.note-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.note-form .btn {
  margin-top: 10px;
}

.no-notes {
  text-align: center;
  padding: 32px 16px;
  color: var(--gray-400);
  font-size: 14px;
}

.no-notes .no-notes-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

/* Mobile responsive for new components */
@media (max-width: 768px) {
  .welcome-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 12px;
  }

  .welcome-banner .welcome-date {
    text-align: center;
  }

  .welcome-banner .welcome-text h2 {
    font-size: 18px;
  }

  .donut-chart-container {
    flex-direction: column;
    align-items: center;
  }

  .donut-chart {
    width: 140px;
    height: 140px;
  }

  .donut-legend {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .form-progress {
    gap: 0;
  }

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

  .progress-connector {
    width: 20px;
  }

  .fab {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .confirm-modal-content {
    padding: 24px;
    margin: 16px;
  }

  .status-flow {
    gap: 4px;
  }

  .status-step {
    padding: 4px 10px;
    font-size: 11px;
  }

  .notes-timeline {
    padding-left: 20px;
  }

  .note-item {
    padding: 12px;
  }

  .recent-item {
    padding: 12px;
  }
}

@media (min-width: 769px) {
  .progress-step .step-label {
    display: inline;
  }
}

/* ===== Dark Mode Component Overrides ===== */
[data-theme="dark"] body {
  background: #0f172a;
  color: #e2e8f0;
}

[data-theme="dark"] .app-header {
  background: linear-gradient(135deg, #0a0a1a 0%, #0f1629 40%, #0a1e3d 100%);
}

[data-theme="dark"] .stat-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .stat-card:hover {
  border-color: #475569;
}

[data-theme="dark"] .stat-card.stat-gradient-blue { background: linear-gradient(135deg, #1a2744 0%, #1e293b 100%); }
[data-theme="dark"] .stat-card.stat-gradient-yellow { background: linear-gradient(135deg, #2e2a1a 0%, #1e293b 100%); }
[data-theme="dark"] .stat-card.stat-gradient-red { background: linear-gradient(135deg, #2e1a1a 0%, #1e293b 100%); }
[data-theme="dark"] .stat-card.stat-gradient-green { background: linear-gradient(135deg, #1a2e22 0%, #1e293b 100%); }
[data-theme="dark"] .stat-card.stat-gradient-purple { background: linear-gradient(135deg, #251a2e 0%, #1e293b 100%); }

[data-theme="dark"] .card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .card-header {
  background: linear-gradient(180deg, #1e293b 0%, #1e293b 100%);
  border-bottom-color: #334155;
}

[data-theme="dark"] .form-section {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .form-section h3 {
  border-image: linear-gradient(90deg, var(--primary), transparent) 1;
}

[data-theme="dark"] .detail-section {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .btn-outline {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] .btn-outline:hover {
  background: #334155;
  border-color: #64748b;
}

[data-theme="dark"] .filters select,
[data-theme="dark"] .filters input {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
  color: #64748b;
}

[data-theme="dark"] .incident-table th {
  background: #1a2332;
  color: #94a3b8;
  border-bottom-color: #475569;
}

[data-theme="dark"] .incident-table td {
  border-bottom-color: #334155;
}

[data-theme="dark"] .incident-table tbody tr:hover {
  background: linear-gradient(90deg, #3b1517, #1e293b);
}

[data-theme="dark"] .photo-upload-area {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-color: #475569;
}

[data-theme="dark"] .photo-upload-area:hover {
  background: #3b1517;
  border-color: var(--primary);
}

[data-theme="dark"] .witness-entry {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .witness-entry:hover {
  border-color: #475569;
}

[data-theme="dark"] .pagination button {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .pagination button:hover {
  background: #334155;
  border-color: #475569;
}

[data-theme="dark"] .login-container {
  background: rgba(30, 41, 59, 0.97);
  color: #e2e8f0;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

[data-theme="dark"] .login-header h1 {
  color: #f8fafc;
}

[data-theme="dark"] .login-header p {
  color: #94a3b8;
}

[data-theme="dark"] .login-page {
  background: linear-gradient(135deg, #050a14 0%, #0f172a 30%, #0a0a1a 60%, #0f1629 100%);
}

[data-theme="dark"] .login-footer {
  border-top-color: #334155;
}

[data-theme="dark"] .login-footer p {
  color: #64748b;
}

[data-theme="dark"] .modal-overlay {
  background: rgba(0,0,0,0.9);
}

[data-theme="dark"] .mobile-nav {
  background: linear-gradient(180deg, #0a0a1a 0%, #0f1629 50%, #0a1e3d 100%);
}

[data-theme="dark"] .gps-btn {
  background: linear-gradient(135deg, #1a2744, #1e293b);
  color: #60a5fa;
  border-color: #3b82f6;
}

[data-theme="dark"] .gps-btn:hover {
  background: #3b82f6;
  color: white;
}

[data-theme="dark"] .gps-coords span {
  background: #1a2332;
  color: #94a3b8;
}

[data-theme="dark"] .map-placeholder {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .welcome-banner {
  background: linear-gradient(135deg, #0a0a1a 0%, #0f1629 40%, #0a1e3d 80%, #1a3a6d 100%);
}

[data-theme="dark"] .confirm-modal-content {
  background: #1e293b;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

[data-theme="dark"] .confirm-modal-content h3 {
  color: #f8fafc;
}

[data-theme="dark"] .confirm-modal-content p {
  color: #94a3b8;
}

[data-theme="dark"] .note-form {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .note-form textarea {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

[data-theme="dark"] .note-item {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .note-item:hover {
  border-color: #475569;
}

[data-theme="dark"] .note-item::before {
  border-color: #1e293b;
}

[data-theme="dark"] .recent-item:hover {
  background: #1a2332;
}

[data-theme="dark"] .recent-item + .recent-item {
  border-top-color: #334155;
}

[data-theme="dark"] .donut-center {
  background: #1e293b;
}

[data-theme="dark"] .admin-modal-content {
  background: #1e293b;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

[data-theme="dark"] .admin-modal-header {
  background: linear-gradient(180deg, #1a2332, #1e293b);
  border-bottom-color: #334155;
}

[data-theme="dark"] .admin-modal-header h3 {
  color: #f8fafc;
}

[data-theme="dark"] .admin-tab {
  color: #94a3b8;
}

[data-theme="dark"] .admin-tab:hover {
  background: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .admin-tabs {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .detail-field .value {
  color: #e2e8f0;
}

[data-theme="dark"] .detail-text {
  color: #cbd5e1;
}

[data-theme="dark"] .report-stat {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .empty-state h3 {
  color: #94a3b8;
}

[data-theme="dark"] .empty-state p {
  color: #64748b;
}

[data-theme="dark"] .vehicle-party {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .vehicle-party-detail {
  background: #1a2332;
  border-color: #334155;
}

[data-theme="dark"] .switch-slider {
  background: #475569;
}

[data-theme="dark"] .confirm-modal {
  background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .stat-icon.total { background: linear-gradient(135deg, #1a2744, #1e3a5f); }
[data-theme="dark"] .stat-icon.open { background: linear-gradient(135deg, #3b2f0a, #4a3a0f); }
[data-theme="dark"] .stat-icon.critical { background: linear-gradient(135deg, #3b1517, #4a1a1d); }
[data-theme="dark"] .stat-icon.injuries { background: linear-gradient(135deg, #0a2e1f, #0f3d2a); }

[data-theme="dark"] .login-error {
  background: #3b1517;
  border-color: #7f1d1d;
}

[data-theme="dark"] .form-actions {
  border-top-color: #334155;
}

[data-theme="dark"] .detail-field {
  border-bottom-color: #1e293b;
}

[data-theme="dark"] .detail-section h3 {
  border-bottom-color: #334155;
}

[data-theme="dark"] .progress-step .step-number {
  background: #334155;
}

[data-theme="dark"] .progress-connector {
  background: #334155;
}

[data-theme="dark"] .status-step {
  background: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .status-step-connector {
  background: #334155;
}

[data-theme="dark"] .section-divider {
  background: linear-gradient(90deg, transparent, #334155, rgba(196, 30, 36, 0.25), #334155, transparent);
}

[data-theme="dark"] .user-name {
  background: rgba(255,255,255,0.12);
}

[data-theme="dark"] .fab-tooltip {
  background: #f1f5f9;
  color: #0f172a;
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: white;
  width: 40px;
  height: 34px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
  transform: scale(1.05);
}

.login-container .theme-toggle {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.12);
  color: #475569;
}

.login-container .theme-toggle:hover {
  background: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.2);
}

[data-theme="dark"] .login-container .theme-toggle {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #e2e8f0;
}

[data-theme="dark"] .login-container .theme-toggle:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
}

/* ===== Language Selector (Segmented Control) ===== */
.lang-selector {
  display: inline-flex;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
  border: 1.5px solid rgba(255,255,255,0.15);
}

.lang-selector .lang-option {
  padding: 5px 14px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.25s;
  letter-spacing: 0.5px;
}

.lang-selector .lang-option:hover {
  color: rgba(255,255,255,0.9);
}

.lang-selector .lang-option.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(196, 30, 36, 0.4);
}

.login-lang-selector {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
}

.login-lang-selector .lang-option {
  color: rgba(0,0,0,0.45);
  padding: 7px 18px;
  font-size: 13px;
}

.login-lang-selector .lang-option:hover {
  color: rgba(0,0,0,0.7);
}

.login-lang-selector .lang-option.active {
  color: white;
}

[data-theme="dark"] .login-lang-selector {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="dark"] .login-lang-selector .lang-option {
  color: rgba(255,255,255,0.5);
}

[data-theme="dark"] .login-lang-selector .lang-option:hover {
  color: rgba(255,255,255,0.8);
}

.mobile-nav .lang-selector {
  width: 100%;
  justify-content: center;
  margin: 8px 16px;
  box-sizing: border-box;
}

.mobile-nav .lang-selector .lang-option {
  flex: 1;
  text-align: center;
}

.login-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.header-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Mobile Bottom Bar ===== */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

[data-theme="dark"] .mobile-bottom-bar {
  background: #0a0a1a;
  border-top-color: rgba(255,255,255,0.06);
}

.mobile-bottom-bar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 52px;
  transition: all 0.2s;
  position: relative;
  letter-spacing: 0.3px;
}

.mobile-bottom-bar button .bottom-bar-icon {
  font-size: 22px;
  line-height: 1;
}

.mobile-bottom-bar button:hover,
.mobile-bottom-bar button.active {
  color: white;
}

.mobile-bottom-bar button.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
  }

  body.has-bottom-bar {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  body.has-bottom-bar .fab {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  body.has-bottom-bar .toast {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-row {
    gap: 16px;
  }

  .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
  }

  .stat-card {
    padding: 16px;
    gap: 14px;
  }

  .stat-info h3 {
    font-size: 24px;
  }
}

@media (min-width: 769px) {
  .mobile-bottom-bar {
    display: none !important;
  }
}

@media print {
  .app-header, nav, .user-menu, .form-actions, .filters, .pagination { display: none !important; }
  .page { display: block !important; }
  .page:not(.active) { display: none !important; }
  .detail-section { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .container { max-width: 100%; padding: 0; }
  body { background: white; }
  .detail-header { flex-direction: column; }
  .badge { border: 1px solid currentColor; }
  #page-reports .btn { display: none !important; }
  #page-reports .card { box-shadow: none; border: 1px solid #ddd; }
  .report-stat { border: 1px solid #ddd; }
  .incident-table { font-size: 10px; }
  .incident-table th { background: #333 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

