/* ═══════════════════════════════════════════════════════════════
   BICSA – Sistema de Incidentes | Global Styles – LIGHT THEME
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --accent:        #E87722;
  --accent-dark:   #C45E0A;
  --accent-light:  #FFF3E8;
  --accent-mid:    #F9923A;
  --accent-border: rgba(232,119,34,0.25);

  /* Backgrounds */
  --bg:            #F4F5F7;
  --bg-white:      #FFFFFF;
  --bg-card:       #FFFFFF;
  --bg-hover:      #FFF8F2;
  --bg-sidebar:    #1C1C1E;
  --bg-sidebar-hover: rgba(232,119,34,0.12);

  /* Text */
  --text:          #1A1A2E;
  --text-muted:    #5A6072;
  --text-dim:      #9CA3AF;
  --text-sidebar:  rgba(255,255,255,0.75);
  --text-sidebar-active: #FFFFFF;

  /* Borders */
  --border:        #E5E7EB;
  --border-hover:  #D0D5DD;
  --border-focus:  #E87722;

  /* Severity */
  --critical: #DC2626;
  --high:     #EA580C;
  --medium:   #D97706;
  --low:      #16A34A;

  /* Status */
  --success:  #16A34A;
  --error:    #DC2626;
  --warning:  #D97706;
  --info:     #2563EB;

  /* Layout */
  --sidebar-w:  260px;
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --shadow-xs:  0 1px 3px rgba(0,0,0,0.07);
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.12);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ══════════════════════════════════════════════════
   LAYOUT – Admin Shell
   ══════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar-logo {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo img { width: 130px; }
.sidebar-logo .logo-fallback {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 0.75rem 0.75rem 0.3rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-sidebar);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 0.15rem;
  border: 1px solid transparent;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: var(--accent);
  border-color: rgba(232,119,34,0.2);
}
.nav-item.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(232,119,34,0.35);
}
.nav-item svg { flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user { display: flex; align-items: center; gap: 0.75rem; }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.82rem; color: white;
  flex-shrink: 0;
}
.user-info .user-name { font-size: 0.84rem; font-weight: 600; color: rgba(255,255,255,0.9); }
.user-info .user-role { font-size: 0.71rem; color: rgba(255,255,255,0.35); }

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.top-bar {
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--bg-white);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-bar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.top-bar-actions { display: flex; align-items: center; gap: 0.75rem; }

.page-content { padding: 2rem; flex: 1; }

/* ══════════════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════════════ */

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.stat-card.critico::before { background: var(--critical); }
.stat-card.alto::before { background: var(--high); }
.stat-card.medio::before { background: var(--medium); }
.stat-card.bajo::before { background: var(--low); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  background: var(--accent-light);
  color: var(--accent);
}
.stat-card.critico .stat-card-icon { background: #FEE2E2; color: var(--critical); }
.stat-card.alto .stat-card-icon { background: #FFEDD5; color: var(--high); }
.stat-card.medio .stat-card-icon { background: #FEF3C7; color: var(--medium); }
.stat-card.bajo .stat-card-icon { background: #DCFCE7; color: var(--low); }

.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-card-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; font-weight: 500; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-critico { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.badge-alto    { background: #FFEDD5; color: #9A3412; border: 1px solid #FED7AA; }
.badge-medio   { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge-bajo    { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.badge-abierto { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-cerrado { background: #F3F4F6; color: #4B5563; border: 1px solid #E5E7EB; }
.badge-accent  { background: var(--accent-light); color: var(--accent); border: 1px solid var(--accent-border); }

/* ── Status Dots (Emoji Replacements) ── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.status-dot.critico { background-color: var(--critical); box-shadow: 0 0 6px rgba(220, 38, 38, 0.4); }
.status-dot.alto    { background-color: var(--high); box-shadow: 0 0 5px rgba(234, 88, 12, 0.4); }
.status-dot.medio   { background-color: var(--medium); }
.status-dot.bajo    { background-color: var(--low); }
.status-dot.abierto { background-color: #2563EB; box-shadow: 0 0 5px rgba(37, 99, 235, 0.4); }
.status-dot.cerrado { background-color: #4B5563; }

/* ── Toast SVG Colors ── */
.toast svg { flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--error); }
.toast.info svg { color: var(--info); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  font-family: inherit;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(232,119,34,0.35);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(232,119,34,0.45);
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--accent-mid), var(--accent));
}
.btn-secondary {
  background: var(--bg-white);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-hover);
}
.btn-danger { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.btn-danger:hover:not(:disabled) { background: #FECACA; }
.btn-success { background: #DCFCE7; color: #166534; border-color: #BBF7D0; }
.btn-success:hover:not(:disabled) { background: #BBF7D0; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.78rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 0.95rem; }
.btn-icon { padding: 0.52rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-label .required { color: var(--accent); margin-left: 0.2rem; }
.form-control {
  width: 100%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
  -webkit-appearance: none;
  box-shadow: var(--shadow-xs);
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,119,34,0.12);
}
.form-control::placeholder { color: #C0C4CC; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control option { background: white; color: var(--text); }

/* ── Checkbox / Radio Grid ── */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}
.check-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.check-item input[type="checkbox"],
.check-item input[type="radio"] { display: none; }
.check-item.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,119,34,0.10);
}
.check-dot {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.check-item.selected .check-dot::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
}
.radio-item .check-dot { border-radius: 50%; }
.radio-item.selected .check-dot::after { border-radius: 50%; background: var(--accent); }
.radio-item.selected.critico .check-dot::after { background: var(--critical); }
.radio-item.selected.alto .check-dot::after    { background: var(--high); }
.radio-item.selected.medio .check-dot::after   { background: var(--medium); }
.radio-item.selected.bajo .check-dot::after    { background: var(--low); }

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.section-number {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(232,119,34,0.35);
}
.section-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.section-subtitle { font-size: 0.78rem; color: var(--text-muted); }

/* ── Table ── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: white; }
thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: #F9FAFB;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #F3F4F6;
  font-size: 0.85rem;
  color: var(--text-muted);
  vertical-align: middle;
}
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: #FFF8F2; }
tbody tr:hover td { color: var(--text); }
tbody tr:last-child td { border-bottom: none; }

/* ── Filters Bar ── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.filter-select {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.filter-select:focus { border-color: var(--accent); color: var(--text); }
.search-input {
  flex: 1;
  min-width: 220px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,119,34,0.1); }

/* ── Charts ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
}
.chart-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chart-card h3 svg { color: var(--accent); }
canvas { max-width: 100%; }

/* ── Progress Bar ── */
.progress-bar {
  height: 7px;
  background: #F3F4F6;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.toast {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  animation: slideInRight 0.3s ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.info    { border-left: 3px solid var(--info); }
.toast-msg { font-size: 0.85rem; color: var(--text); font-weight: 500; }
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Upload Zone ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: #FAFAFA;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.upload-zone p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.upload-zone strong { color: var(--accent); }
.upload-file-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.upload-file-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
}
.upload-file-item .remove-file {
  margin-left: auto;
  cursor: pointer;
  color: var(--error);
  opacity: 0.6;
  transition: opacity var(--transition);
  background: none;
  border: none;
  display: flex;
  padding: 0;
}
.upload-file-item .remove-file:hover { opacity: 1; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(16px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

/* ── Validation Highlights & Shakes ── */
.form-control.is-invalid {
  border-color: var(--critical) !important;
  background-color: #FFF5F5 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}
@keyframes shake {
  0%, 100% { transform: scale(1) translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: scale(1) translateX(-5px); }
  20%, 40%, 60%, 80% { transform: scale(1) translateX(5px); }
}
.modal.shake {
  animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.modal-close {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  font-size: 0.9rem;
}
.modal-close:hover { background: #F3F4F6; color: var(--text); }

/* ── Provider row ── */
.provider-row { display: flex; align-items: center; gap: 0.75rem; }
.provider-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.provider-name { font-weight: 600; color: var(--text); font-size: 0.88rem; }

/* ══════════════════════════════════════════════════
   FORM LAYOUT
   ══════════════════════════════════════════════════ */
.form-shell {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.form-topbar {
  height: 64px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 4px 16px rgba(232,119,34,0.3);
  position: sticky;
  top: 0;
  z-index: 50;
}
.form-topbar-logo img { height: 46px; border-radius: 8px; }
.form-topbar-info { text-align: right; }
.form-topbar-title { font-size: 0.9rem; font-weight: 700; color: rgba(255,255,255,0.95); }
.form-topbar-num  { font-size: 0.75rem; color: rgba(255,255,255,0.75); font-weight: 700; }

.form-body {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem;
}

.form-hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(232,119,34,0.3);
}
.form-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.form-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 40%;
  width: 150px; height: 150px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.form-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.form-hero-title { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 0.3rem; }
.form-hero-sub   { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}
.form-section:hover { box-shadow: var(--shadow); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
  .form-row, .form-row.three { grid-template-columns: 1fr; }
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ── Incident Number ── */
.incident-number {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--accent-border);
  white-space: nowrap;
  display: inline-block;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-dim);
}
.empty-state svg { margin: 0 auto 1rem; color: #D1D5DB; }
.empty-state h3  { font-size: 1rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; }
.empty-state p   { font-size: 0.85rem; }

/* ── Provider cards in admin ── */
.provider-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* ── Loading spinner ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.9);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(232,119,34,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease forwards; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 1.5s ease-in-out infinite; }

/* ── Responsive sidebar ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .charts-grid { grid-template-columns: 1fr; }
}

/* ── Print ── */
@media print {
  .no-print { display: none !important; }
  body { background: white; color: #111; }
}

/* ═══════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════ */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #FFF5EC 0%, #FDE8D0 40%, #FAECD8 100%);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.login-bg::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,119,34,0.15), transparent 70%);
  border-radius: 50%;
}
.login-bg::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(232,119,34,0.10), transparent 70%);
  border-radius: 50%;
}
.login-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(232,119,34,0.15);
  position: relative;
  z-index: 1;
}
.login-logo-wrap {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo-wrap img { height: 56px; margin: 0 auto; }
.login-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}
.login-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.3rem;
  text-align: center;
}
.login-subtitle {
  font-size: 0.83rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.75rem;
}
.login-input-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.login-input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.login-input {
  width: 100%;
  padding: 0.75rem 0.9rem 0.75rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
  background: var(--bg);
}
.login-input:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(232,119,34,0.12);
}
.login-error {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.login-error.show { display: flex; }
.btn-login {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(232,119,34,0.35);
  margin-top: 0.5rem;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(232,119,34,0.45); }
.btn-login:active { transform: translateY(0); }
.login-back {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.login-back a { color: var(--accent); font-weight: 600; }
.login-back a:hover { text-decoration: underline; }
.login-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1.5rem;
}
