/* ============================================================
   PARKOS — Design tokens
   ============================================================ */
:root {
  --navy-900: #0E1A2E;
  --navy-800: #122340;
  --navy-700: #16273F;
  --navy-600: #1E3453;

  --blue-600: #2F6FE4;
  --blue-500: #4A82ED;
  --blue-50: #EBF1FD;

  --amber-500: #F5A623;
  --amber-600: #DD9114;
  --amber-50: #FFF6E7;

  --red-500: #E5484D;
  --red-600: #C93A3F;
  --red-50: #FCEBEC;

  --green-500: #1FA97A;
  --green-600: #178963;
  --green-50: #E9F8F2;

  --gray-25: #FBFCFD;
  --gray-50: #F5F7FA;
  --gray-100: #EEF1F5;
  --gray-200: #E2E6EC;
  --gray-300: #CDD3DD;
  --gray-400: #9AA4B2;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-900: #1A2233;

  --white: #FFFFFF;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 2px rgba(14, 26, 46, 0.06);
  --shadow-md: 0 4px 16px rgba(14, 26, 46, 0.08);
  --shadow-lg: 0 12px 32px rgba(14, 26, 46, 0.14);

  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; color: var(--navy-900); }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--amber-50); }
:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy-900);
  color: var(--gray-300);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  transition: width 0.2s ease;
  z-index: 20;
}
.sidebar.collapsed { width: var(--sidebar-w-collapsed); }

.sidebar-top { padding: 20px 16px 8px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--white);
  padding: 6px 4px; width: 100%; border-radius: var(--radius-md);
}
.brand-mark { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; }
.sidebar.collapsed .brand-name { display: none; }

.nav { flex: 1; overflow-y: auto; padding: 8px 12px; }
.nav-group { margin-bottom: 18px; }
.nav-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gray-500); font-weight: 600; padding: 0 10px; margin: 0 0 6px;
  white-space: nowrap; overflow: hidden;
}
.sidebar.collapsed .nav-label { opacity: 0; height: 0; margin: 0; }

.nav-item, .nav-subitem {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 9px 10px; border: none; background: none;
  color: var(--gray-300); border-radius: var(--radius-md); font-size: 13.5px;
  font-weight: 500; margin-bottom: 2px; text-align: left;
  position: relative; white-space: nowrap;
}
.nav-item:hover, .nav-subitem:hover { background: var(--navy-700); color: var(--white); }
.nav-item.active {
  background: var(--navy-600); color: var(--white);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: var(--amber-500); border-radius: 0 3px 3px 0;
}
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; color: inherit; }
.nav-text { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-chevron,
.sidebar.collapsed .nav-label { display: none; }
.sidebar.collapsed .nav-item, .sidebar.collapsed .nav-subitem { justify-content: center; }
.sidebar.collapsed .nav-sub { display: none !important; }

.nav-chevron { width: 13px; height: 13px; margin-left: auto; transition: transform 0.15s ease; flex-shrink: 0; }
.nav-parent.open .nav-chevron { transform: rotate(90deg); }
.nav-sub { display: none; padding-left: 30px; }
.nav-sub.open { display: block; }
.nav-subitem { font-size: 13px; padding: 8px 10px; }
.nav-subitem.active { color: var(--amber-500); background: var(--navy-700); font-weight: 600; }

.nav-badge {
  background: var(--red-500); color: var(--white); font-size: 10.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; margin-left: auto;
}

.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--navy-700); }
.mini-user { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.mini-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--amber-500);
  color: var(--navy-900); font-weight: 700; font-size: 12.5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mini-user-info { overflow: hidden; white-space: nowrap; }
.mini-user-name { font-size: 13px; font-weight: 600; color: var(--white); }
.mini-user-role { font-size: 11.5px; color: var(--gray-400); }
.sidebar.collapsed .mini-user-info { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 64px; flex-shrink: 0; background: var(--white); border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-md); border: 1px solid var(--gray-200);
  background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--gray-600);
}
.icon-btn:hover { background: var(--gray-50); }
.topbar-title { font-size: 19px; font-weight: 700; }
.env-pill {
  font-size: 11.5px; font-weight: 600; color: var(--amber-600); background: var(--amber-50);
  padding: 5px 11px; border-radius: 999px; border: 1px solid #F5DDAE;
}

.content { padding: 24px 28px 60px; max-width: 1440px; }

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: translateY(0);} }

/* ============================================================
   TOOLBAR / FILTERS
   ============================================================ */
.view-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 8px 12px;
  min-width: 280px; color: var(--gray-400);
}
.search-box input {
  border: none; outline: none; font-size: 13.5px; flex: 1; color: var(--gray-900); background: transparent;
}

.select-wrap { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--gray-600); }

.select, .input {
  border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 8px 12px;
  font-size: 13.5px; color: var(--gray-900); background: var(--white); outline: none;
}
.select:focus, .input:focus { border-color: var(--blue-500); }
.textarea { resize: vertical; font-family: inherit; }

.period-filter { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.period-select { min-width: 160px; }

.tab-filter { display: flex; gap: 6px; background: var(--gray-100); padding: 4px; border-radius: var(--radius-md); }
.tab-btn {
  border: none; background: transparent; padding: 7px 14px; border-radius: 7px; font-size: 13px;
  font-weight: 600; color: var(--gray-500);
}
.tab-btn.active { background: var(--white); color: var(--navy-900); box-shadow: var(--shadow-sm); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius-md); border: 1px solid transparent; transition: all 0.12s ease;
}
.btn-primary { background: var(--blue-600); color: var(--white); }
.btn-primary:hover { background: #2A63CC; }
.btn-ghost { background: var(--white); color: var(--gray-600); border-color: var(--gray-200); }
.btn-ghost:hover { background: var(--gray-50); }
.btn-danger { background: var(--red-500); color: var(--white); }
.btn-danger:hover { background: var(--red-600); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-outline { background: var(--white); border-color: var(--gray-300); color: var(--navy-900); }
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-600); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 26px; }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1280px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }

.kpi-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm);
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--gray-500); display: flex; align-items: center; gap: 5px; }
.kpi-value { font-family: var(--font-display); font-size: 27px; font-weight: 700; color: var(--navy-900); line-height: 1.1; }
.kpi-sub { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.kpi-mini-row { display: flex; gap: 12px; margin-top: 10px; }
.kpi-mini { font-size: 11.5px; color: var(--gray-600); display: flex; align-items: center; gap: 4px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green { background: var(--green-500); }
.dot-amber { background: var(--amber-500); }
.dot-red { background: var(--red-500); }
.dot-gray { background: var(--gray-400); }

.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip-q {
  width: 14px; height: 14px; border-radius: 50%; background: var(--gray-200); color: var(--gray-600);
  font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: help;
}
.tooltip-wrap:hover .tooltip-bubble { opacity: 1; visibility: visible; transform: translate(-50%, -4px); }
.tooltip-bubble {
  position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, 0);
  background: var(--navy-900); color: var(--white); font-size: 11.5px; font-weight: 500;
  padding: 8px 11px; border-radius: 8px; width: 220px; line-height: 1.4;
  opacity: 0; visibility: hidden; transition: all 0.15s ease; z-index: 30; pointer-events: none;
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   SECTION BLOCK / ATTENTION CARDS
   ============================================================ */
.section-block { margin-bottom: 26px; }
.section-block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-block-head h2 { font-size: 16px; font-weight: 700; }
.muted-text { font-size: 12.5px; color: var(--gray-500); }

.attention-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.attention-card {
  background: var(--white); border: 1px solid var(--gray-200); border-left: 4px solid var(--red-500);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm);
}
.attention-card.level-amber { border-left-color: var(--amber-500); }
.attention-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.attention-card-name { font-weight: 700; font-size: 14.5px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-red { background: var(--red-50); color: var(--red-600); }
.badge-amber { background: var(--amber-50); color: var(--amber-600); }
.badge-green { background: var(--green-50); color: var(--green-600); }
.badge-blue { background: var(--blue-50); color: var(--blue-600); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.attention-issue-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.attention-issue-list li { font-size: 12.5px; color: var(--gray-600); padding-left: 14px; position: relative; }
.attention-issue-list li::before { content: "•"; position: absolute; left: 0; color: var(--gray-400); }
.empty-note { color: var(--gray-500); font-size: 13.5px; padding: 24px; text-align: center; background: var(--white); border-radius: var(--radius-lg); border: 1px dashed var(--gray-300); }

/* ============================================================
   TABLE
   ============================================================ */
.table-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--gray-500); font-weight: 700; padding: 12px 18px; background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.th-actions { text-align: right !important; }
.table tbody td { padding: 13px 18px; font-size: 13.5px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--gray-25); }
.td-actions { text-align: right; white-space: nowrap; }
.cell-strong { font-weight: 600; color: var(--navy-900); }
.cell-num { font-variant-numeric: tabular-nums; }
.link-action { background: none; border: none; color: var(--blue-600); font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.link-action:hover { background: var(--blue-50); }
.link-action.danger { color: var(--red-500); }
.link-action.danger:hover { background: var(--red-50); }

/* ============================================================
   CHECKLIST
   ============================================================ */
.checklist-list { display: flex; flex-direction: column; gap: 10px; }
.checklist-item {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 14px 16px; display: flex; gap: 13px; align-items: flex-start; box-shadow: var(--shadow-sm);
}
.checklist-item.completed { opacity: 0.65; }
.checklist-item.overdue { border-left: 3px solid var(--red-500); }
.chk-checkbox {
  width: 21px; height: 21px; border-radius: 6px; border: 2px solid var(--gray-300); flex-shrink: 0;
  margin-top: 1px; display: flex; align-items: center; justify-content: center; background: var(--white);
}
.chk-checkbox.checked { background: var(--green-500); border-color: var(--green-500); }
.chk-checkbox svg { width: 13px; height: 13px; color: var(--white); }
.chk-body { flex: 1; min-width: 0; }
.chk-top { display: flex; align-items: center; justify-content: between; gap: 10px; flex-wrap: wrap; }
.chk-name { font-weight: 600; font-size: 14px; }
.chk-name.completed-text { text-decoration: line-through; color: var(--gray-500); }
.chk-time { margin-left: auto; font-size: 12px; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.chk-desc { font-size: 12.8px; color: var(--gray-600); margin-top: 4px; line-height: 1.45; }
.chk-desc.clamped { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.chk-expand { background: none; border: none; color: var(--blue-600); font-size: 12px; font-weight: 600; padding: 3px 0; margin-top: 2px; }

/* ============================================================
   EQUIPMENT (OPERACIONES)
   ============================================================ */
.equipment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.equipment-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.equipment-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.equipment-name { font-weight: 700; font-size: 14.5px; }
.equipment-metric { font-size: 12px; color: var(--gray-500); margin-bottom: 12px; }
.equipment-actions { display: flex; flex-direction: column; gap: 8px; }
.status-dot-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
}
.alert-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert-icon.sev-critical { background: var(--red-50); }
.alert-icon.sev-warning { background: var(--amber-50); }
.alert-icon.sev-info { background: var(--blue-50); }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 700; font-size: 14px; }
.alert-meta { font-size: 12px; color: var(--gray-500); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   ESTADO GRID / PROGRESS
   ============================================================ */
.estado-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.estado-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px; }
.estado-card-head { display: flex; align-items: center; justify-content: space-between; }
.estado-card-name { font-weight: 700; font-size: 15px; }
.progress-row { display: flex; flex-direction: column; gap: 5px; }
.progress-row-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-600); font-weight: 600; }
.progress-track { width: 100%; height: 8px; border-radius: 999px; background: var(--gray-100); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.fill-green { background: var(--green-500); }
.fill-amber { background: var(--amber-500); }
.fill-red { background: var(--red-500); }
.estado-stats-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--gray-600); padding-top: 4px; border-top: 1px solid var(--gray-100); }
.estado-stats-row b { color: var(--navy-900); }

/* ============================================================
   DETAIL VIEW
   ============================================================ */
.link-back { background: none; border: none; display: inline-flex; align-items: center; gap: 6px; color: var(--gray-600); font-size: 13px; font-weight: 600; margin-bottom: 16px; padding: 4px 0; }
.link-back:hover { color: var(--blue-600); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.detail-title { font-size: 22px; }
.detail-sub { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.detail-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 1100px) { .detail-columns { grid-template-columns: 1fr; } }
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-list-item {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.mini-list-name { font-weight: 600; font-size: 13.5px; }
.mini-list-metric { font-size: 12px; color: var(--gray-500); }
.mini-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.mini-kpi { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 12px 14px; }
.mini-kpi-val { font-size: 19px; font-weight: 700; font-family: var(--font-display); }
.mini-kpi-label { font-size: 11.5px; color: var(--gray-500); margin-top: 2px; }
.incident-detail-list { display: flex; flex-direction: column; gap: 6px; }
.incident-detail-item { font-size: 12.5px; color: var(--gray-600); background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; }

/* ============================================================
   ROLES
   ============================================================ */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.role-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.role-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.role-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-50); color: var(--blue-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.role-name { font-weight: 700; font-size: 14.5px; }
.role-count { font-size: 11.5px; color: var(--gray-500); }
.role-access-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.role-access-list li { font-size: 12.3px; color: var(--gray-600); padding-left: 14px; position: relative; }
.role-access-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green-500); font-weight: 700; }

/* ============================================================
   ASIGNADOS
   ============================================================ */
.assigned-list { display: flex; flex-direction: column; gap: 10px; }
.assigned-item { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.assigned-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-800); color: var(--white); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.assigned-name { font-weight: 700; font-size: 13.8px; }
.assigned-role { font-size: 11.8px; color: var(--gray-500); }
.assigned-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; max-width: 60%; justify-content: flex-end; }
.chip { font-size: 11.5px; font-weight: 600; background: var(--gray-100); color: var(--gray-600); padding: 4px 10px; border-radius: 999px; }

/* ============================================================
   FILE / IMAGE UPLOAD
   ============================================================ */
.file-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-btn { display: inline-flex; align-items: center; }
.image-upload-row { display: flex; align-items: center; gap: 14px; }
.image-preview {
  width: 68px; height: 68px; border-radius: var(--radius-md); background: var(--gray-100);
  border: 1px dashed var(--gray-300); background-size: cover; background-position: center;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 10.5px; text-align: center;
}
.image-upload-controls { display: flex; flex-direction: column; gap: 6px; }
.register-total-row {
  display: flex; justify-content: space-between; align-items: center; background: var(--blue-50);
  border-radius: var(--radius-md); padding: 10px 14px; font-size: 13px; color: var(--blue-600); margin-top: 4px;
}
.register-total-row b { font-family: var(--font-display); font-size: 15px; }

/* ============================================================
   DETAIL HEAD (parking meta)
   ============================================================ */
.detail-head-info { display: flex; align-items: flex-start; gap: 16px; }
.detail-thumb {
  width: 64px; height: 64px; border-radius: var(--radius-md); background: var(--navy-800);
  background-size: cover; background-position: center; flex-shrink: 0; border: 1px solid var(--gray-200);
}
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.detail-meta-chip {
  font-size: 11.5px; font-weight: 600; color: var(--gray-600); background: var(--gray-100);
  padding: 4px 10px; border-radius: 999px; display: flex; align-items: center; gap: 5px;
}
.detail-columns-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1200px) { .detail-columns-3 { grid-template-columns: 1fr; } }

.gasto-doc-actions { display: flex; gap: 10px; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(14, 26, 46, 0.5); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  display: none; background: var(--white); border-radius: var(--radius-lg); width: 560px; max-width: 100%;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn 0.16s ease;
}
.modal.open { display: block; }
.modal-sm { width: 440px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--gray-200); }
.modal-head h3 { font-size: 16.5px; }
.modal-close { background: none; border: none; font-size: 22px; line-height: 1; color: var(--gray-400); padding: 2px 6px; border-radius: 6px; }
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-hint { font-size: 13px; color: var(--gray-600); background: var(--gray-50); padding: 10px 12px; border-radius: 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--gray-200); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-switch { flex-direction: row; align-items: center; justify-content: space-between; }

.checkbox-chip-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 150px; overflow-y: auto; padding: 4px; border: 1px solid var(--gray-100); border-radius: var(--radius-md); }
.chip-checkbox { display: flex; align-items: center; gap: 6px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.chip-checkbox input { accent-color: var(--blue-600); }
.chip-checkbox.checked { background: var(--blue-50); border-color: var(--blue-500); color: var(--blue-600); font-weight: 600; }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; cursor: pointer; inset: 0; background: var(--gray-300); border-radius: 999px; transition: 0.15s; }
.switch-track::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--white); border-radius: 50%; transition: 0.15s; }
.switch input:checked + .switch-track { background: var(--blue-600); }
.switch input:checked + .switch-track::before { transform: translateX(18px); }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  background: var(--navy-900); color: var(--white); padding: 13px 18px; border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.2s ease; min-width: 260px; max-width: 360px;
}
.toast.success { border-left: 3px solid var(--green-500); }
.toast.error { border-left: 3px solid var(--red-500); }
.toast-icon { flex-shrink: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px);} to { opacity: 1; transform: translateX(0);} }
.toast.fade-out { animation: toastOut 0.2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ============================================================
   MISC / RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; }
  .kpi-grid, .kpi-grid-4 { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
