/* ============================================
   DEVRIYE MOBILE PWA - STYLE.CSS
   Dark Mode / Premium Design
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card2: #334155;
  --border: rgba(255,255,255,0.08);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #475569;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

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

html, body {
  width: 100%;
  max-width: 100vw;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== SPLASH ===== */
.splash {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}
.splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo { text-align: center; margin-bottom: 40px; }
.splash-logo .material-icons-round { font-size: 72px; color: var(--primary-light); }
.splash-logo h1 { font-size: 36px; font-weight: 800; color: #fff; letter-spacing: 2px; margin-top: 12px; }
.splash-logo p { color: var(--text-muted); margin-top: 4px; }
.splash-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(99,102,241,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== APP SHELL ===== */
.app { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.app.hidden { display: none; }

/* ===== SCREENS ===== */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transform: translateX(30px);
  transition: opacity var(--transition), transform var(--transition);
  overflow: hidden;
}
.screen.active {
  opacity: 1; pointer-events: all;
  transform: translateX(0);
}

/* ===== TOP BAR ===== */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  background: rgba(30,41,59,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}
.top-bar h2 { font-size: 18px; font-weight: 700; color: var(--text); }
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.top-bar-left .material-icons-round { font-size: 28px; color: var(--primary-light); }
.top-bar-left h2 { font-size: 20px; font-weight: 800; }
.top-bar-left small { color: var(--text-muted); font-size: 12px; }

.icon-btn {
  background: transparent; border: none; cursor: pointer;
  color: var(--text-muted); padding: 8px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.icon-btn:hover, .icon-btn:active { background: var(--bg-card); color: var(--text); }
.icon-btn .material-icons-round { font-size: 24px; }

/* ===== HOME CONTENT ===== */
.home-content {
  overflow-y: auto;
  flex: 1;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.tech-badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.tech-badge .material-icons-round { color: var(--primary-light); font-size: 20px; }
.tech-badge span:nth-child(2) { flex: 1; font-size: 14px; color: var(--text); font-weight: 500; }
.change-btn {
  background: transparent; border: 1px solid var(--primary);
  color: var(--primary); font-size: 12px; padding: 4px 10px;
  border-radius: 6px; cursor: pointer; font-weight: 500;
}

.scan-hero { margin-bottom: 20px; }
.scan-main-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none; border-radius: 20px; cursor: pointer;
  padding: 24px; text-align: center;
  box-shadow: 0 8px 32px rgba(99,102,241,0.4);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative; overflow: hidden;
}
.scan-main-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15), transparent 60%);
}
.scan-main-btn:active { transform: scale(0.97); box-shadow: 0 4px 16px rgba(99,102,241,0.3); }
.scan-icon-ring {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  border: 2px solid rgba(255,255,255,0.3);
}
.scan-icon-ring .material-icons-round { font-size: 40px; color: #fff; }
.scan-main-btn h3 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.scan-main-btn p { font-size: 14px; color: rgba(255,255,255,0.7); }

.quick-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 20px;
}
.quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: transform var(--transition), background var(--transition);
  color: var(--text); font-size: 13px; font-weight: 500;
}
.quick-card:active { transform: scale(0.96); background: var(--bg-card2); }
.quick-card .material-icons-round { font-size: 28px; color: var(--primary-light); }

.today-stats h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.stats-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.stat-item {
  border-radius: var(--radius-sm);
  padding: 16px 8px; text-align: center;
}
.stat-blue { background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3); }
.stat-green { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); }
.stat-red { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); }
.stat-num { display: block; font-size: 28px; font-weight: 800; }
.stat-blue .stat-num { color: var(--primary-light); }
.stat-green .stat-num { color: var(--success); }
.stat-red .stat-num { color: var(--danger); }
.stat-lbl { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ===== SCAN SCREEN ===== */
.scan-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.scan-tabs {
  display: flex; gap: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.scan-tab {
  flex: 1; padding: 12px 8px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 12px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.scan-tab .material-icons-round { font-size: 20px; }
.scan-tab.active { color: var(--primary-light); border-bottom-color: var(--primary); }

.tab-content { display: none; flex: 1; flex-direction: column; }
.tab-content.active { display: flex; }

.camera-viewport {
  flex: 1; position: relative; background: #000;
  overflow: hidden;
}
.camera-viewport video {
  width: 100%; height: 100%; object-fit: cover;
}
.scan-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
}
.scan-frame {
  width: 240px; height: 240px; position: relative;
}
.corner {
  position: absolute;
  width: 32px; height: 32px;
  border-color: var(--primary-light);
  border-style: solid;
}
.corner.tl { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.corner.bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }
.scan-line {
  position: absolute; left: 4px; right: 4px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  animation: scan-anim 2s ease-in-out infinite;
}
@keyframes scan-anim {
  0% { top: 8px; }
  100% { top: calc(100% - 10px); }
}
.scan-hint { color: rgba(255,255,255,0.7); font-size: 13px; text-align: center; padding: 0 24px; }

.nfc-area {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  padding: 40px;
}
.nfc-pulse {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(99,102,241,0.15);
  border: 2px solid rgba(99,102,241,0.4);
  display: flex; align-items: center; justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}
.nfc-pulse .material-icons-round { font-size: 60px; color: var(--primary-light); }
.nfc-area h3 { font-size: 20px; font-weight: 700; }
.nfc-area p { color: var(--text-muted); text-align: center; }
.nfc-status { font-size: 13px; color: var(--text-muted); min-height: 20px; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.4); }
  50% { box-shadow: 0 0 0 20px rgba(99,102,241,0); }
}

.manual-area {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px;
  gap: 20px;
}
.manual-icon { font-size: 60px !important; color: var(--text-faint); }
.manual-area h3 { font-size: 20px; font-weight: 700; }

/* ===== CHECKLIST SCREEN ===== */
.device-info-card {
  margin: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.device-header { display: flex; align-items: center; gap: 14px; }
.device-type-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.device-type-icon .material-icons-round { font-size: 28px; color: #fff; }
.device-details h3 { font-size: 18px; font-weight: 700; }
.device-details .device-code { font-size: 12px; color: var(--primary-light); font-weight: 600; letter-spacing: 1px; }
.device-details .device-loc { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.device-details .device-loc .material-icons-round { font-size: 14px; }

.checklist-container {
  flex: 1; overflow-y: auto;
  padding: 0 16px 100px;
}

.checklist-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.checklist-item.pass { border-color: rgba(16,185,129,0.5); }
.checklist-item.fail { border-color: rgba(239,68,68,0.5); }

.checklist-item-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
}
.checklist-item-num {
  width: 24px; height: 24px;
  border-radius: 50%; background: var(--bg-card2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  flex-shrink: 0;
}
.checklist-item-title { flex: 1; font-size: 14px; font-weight: 500; }
.checklist-actions {
  display: flex; gap: 8px;
}
.action-pass, .action-fail {
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  transition: all var(--transition);
}
.action-pass {
  border-color: rgba(16,185,129,0.4);
  background: transparent;
  color: var(--success);
}
.action-pass:hover, .action-pass.selected {
  background: var(--success); color: #fff;
  border-color: var(--success);
}
.action-fail {
  border-color: rgba(239,68,68,0.4);
  background: transparent;
  color: var(--danger);
}
.action-fail:hover, .action-fail.selected {
  background: var(--danger); color: #fff;
  border-color: var(--danger);
}
.action-pass .material-icons-round, .action-fail .material-icons-round { font-size: 16px; }

.checklist-item-status {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px 14px;
}
.status-badge {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px;
}
.status-badge.pass { background: rgba(16,185,129,0.15); color: var(--success); }
.status-badge.fail { background: rgba(239,68,68,0.15); color: var(--danger); }
.status-badge .material-icons-round { font-size: 14px; }

.fail-detail {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  background: rgba(239,68,68,0.05);
  display: none;
}
.fail-detail.visible { display: block; }
.fail-detail-note { font-size: 13px; color: var(--text-muted); margin-top: 6px; font-style: italic; }
.fail-detail-photo { margin-top: 10px; }
.fail-detail-photo img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }

/* ===== REPORT FORM ===== */
.report-form {
  flex: 1; overflow-y: auto;
  padding: 20px 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
.report-item-name {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.input-field {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.input-field:focus { border-color: var(--primary); }
.input-field.textarea { min-height: 120px; resize: vertical; }

.severity-buttons {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sev-btn {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all var(--transition);
}
.sev-btn .material-icons-round { font-size: 18px; }
.sev-btn[data-sev="low"].active { background: rgba(16,185,129,0.15); border-color: var(--success); color: var(--success); }
.sev-btn[data-sev="medium"].active { background: rgba(245,158,11,0.15); border-color: var(--warning); color: var(--warning); }
.sev-btn[data-sev="high"].active { background: rgba(239,68,68,0.15); border-color: var(--danger); color: var(--danger); }
.sev-btn[data-sev="critical"].active { background: rgba(239,68,68,0.25); border-color: #dc2626; color: #fca5a5; }

.photo-section { display: flex; flex-direction: column; gap: 12px; }
.photo-preview { position: relative; width: 120px; }
.photo-preview img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); }
.photo-remove {
  position: absolute; top: -8px; right: -8px;
  background: var(--danger); color: #fff;
  border: none; border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.photo-remove .material-icons-round { font-size: 14px; }
.photo-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== SEARCH / LISTS ===== */
.search-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.search-icon { color: var(--text-faint); font-size: 20px; }
.search-input {
  flex: 1; background: transparent; border: none;
  color: var(--text); font-size: 16px; outline: none;
  font-family: 'Inter', sans-serif;
}
.search-input::placeholder { color: var(--text-faint); }

.device-list {
  flex: 1; overflow-y: auto;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.device-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}
.device-item:active { transform: scale(0.98); background: var(--bg-card2); }
.device-item-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.device-item-icon .material-icons-round { font-size: 22px; color: #fff; }
.device-item-info { flex: 1; min-width: 0; }
.device-item-info h4 { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-item-info .device-code-sm { font-size: 11px; color: var(--primary-light); font-weight: 600; letter-spacing: 0.5px; }
.device-item-info .device-loc-sm { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.device-item .material-icons-round.chevron { color: var(--text-faint); font-size: 20px; }

.inspection-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}
.inspection-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.inspection-result-badge {
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.result-pass { background: rgba(16,185,129,0.15); color: var(--success); }
.result-fail { background: rgba(239,68,68,0.15); color: var(--danger); }
.result-progress { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.inspection-device { font-size: 14px; font-weight: 600; flex: 1; }
.inspection-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 14px; }
.inspection-meta span { display: flex; align-items: center; gap: 4px; }
.inspection-meta .material-icons-round { font-size: 14px; }

.report-list-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--warning);
  padding: 14px;
  margin-bottom: 10px;
}
.report-list-item.critical { border-left-color: var(--danger); }
.report-list-item.low { border-left-color: var(--success); }
.report-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.report-sev { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 3px 8px; border-radius: 4px; }
.sev-critical { background: rgba(239,68,68,0.2); color: var(--danger); }
.sev-high { background: rgba(239,68,68,0.15); color: #f87171; }
.sev-medium { background: rgba(245,158,11,0.15); color: var(--warning); }
.sev-low { background: rgba(16,185,129,0.15); color: var(--success); }
.report-device { font-size: 14px; font-weight: 600; flex: 1; }
.report-desc { font-size: 13px; color: var(--text-muted); }
.report-time { font-size: 11px; color: var(--text-faint); margin-top: 6px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600;
  transition: all var(--transition);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--bg-card2); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { width: 100%; justify-content: center; padding: 16px; font-size: 16px; }
.btn .material-icons-round { font-size: 18px; }

.bottom-actions {
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== INPUT GROUP ===== */
.input-group { display: flex; gap: 10px; }
.input-group .input-field { flex: 1; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: flex-end;
  transition: opacity var(--transition);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  animation: slide-up 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-body { padding: 16px 20px 20px; }
.tech-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.tech-item {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card2);
  cursor: pointer; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  transition: background var(--transition);
}
.tech-item:active { background: var(--primary-dark); }
.tech-item .material-icons-round { color: var(--text-muted); font-size: 18px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom));
  left: 16px; right: 16px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 14px; font-weight: 500;
  text-align: center;
  z-index: 9000;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease;
  border: 1px solid var(--border);
}
.toast.hidden { display: none; }
.toast.success { border-color: rgba(16,185,129,0.5); color: var(--success); }
.toast.error { border-color: rgba(239,68,68,0.5); color: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== LOADING ===== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.7);
  z-index: 8000;
  display: flex; align-items: center; justify-content: center;
}
.loading-overlay.hidden { display: none; }
.loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(99,102,241,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px;
  padding: 60px 20px; text-align: center;
}
.empty-state .material-icons-round { font-size: 56px; color: var(--text-faint); }
.empty-state p { color: var(--text-muted); font-size: 15px; }

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

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-card2); border-radius: 4px; }
