/* ============================================================
   Testigos VPA — Sistema de Diseño
   Voluntad Popular — Venezuela
   ============================================================ */

/* ── IMPORTS ── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

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

/* ── VARIABLES ── */
:root {
  --navy: #f0f4f8;
  --navy2: #ffffff;
  --navy3: #e2e8f0;
  --navy4: #cbd5e1;
  --accent: #0077b6;
  --accent2: #023e8a;
  --accent-glow: rgba(0, 119, 182, 0.15);
  --gold: #d4a300;
  --gold-glow: rgba(212, 163, 0, 0.12);
  --text: #0f172a;
  --text2: #334155;
  --text3: #475569;
  --text4: #94a3b8;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.15);
  --border3: rgba(0,0,0,0.25);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.1);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.1);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --info: #2563eb;
  --info-bg: rgba(37, 99, 235, 0.1);
  --card: #ffffff;
  --card2: #f8fafc;
  --input-bg: #ffffff;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 100px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

html { height: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--navy4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── APP LAYOUT ── */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; display: flex; flex-direction: column; }

/* ── HEADER ── */
.header {
  background: linear-gradient(180deg, var(--navy2) 0%, var(--navy) 100%);
  border-bottom: 1px solid var(--border2);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-brand .logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #0077b6 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 12px rgba(0, 180, 216, 0.3);
}
.header-brand h1 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.2px;
}
.header-brand span {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-user {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--navy3);
  border: 1px solid var(--border2);
  font-size: 12px;
  color: var(--text2);
}
.header-user .user-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  pointer-events: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 180, 216, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger {
  background: transparent;
  border: 1px solid rgba(224,82,82,0.3);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-success {
  background: transparent;
  border: 1px solid rgba(46,194,126,0.3);
  color: var(--success);
}
.btn-success:hover { background: var(--success-bg); border-color: var(--success); }
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text3);
}
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; }
.btn-icon.btn-sm { padding: 6px; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }
.btn-group { display: flex; gap: 8px; }

/* ── TOOLBAR ── */
.toolbar {
  padding: 14px 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}
.search-wrap svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  opacity: 0.35;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: var(--input-bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-input::placeholder { color: var(--text4); }

select.filter-select,
.filter-select {
  padding: 9px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  min-width: 140px;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235a7289' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.filter-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.toolbar-right { display: flex; gap: 8px; margin-left: auto; }

/* ── STATS BAR ── */
.stats-bar {
  padding: 16px 20px;
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.stat {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat:first-child { padding-left: 0; }
.stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.stat-icon.total { background: var(--accent-glow); }
.stat-icon.filtered { background: var(--gold-glow); }
.stat-icon.estados { background: var(--success-bg); }
.stat-icon.municipios { background: var(--info-bg); }
.stat-content { display: flex; flex-direction: column; }
.stat-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.1;
}
.stat-value.accent { color: var(--accent); }
.stat-value.gold { color: var(--gold); }
.stat-value.success { color: var(--success); }
.stat-value.info { color: var(--info); }
.stat-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

/* ── TABLE ── */
.table-wrap { overflow-x: auto; flex: 1; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--navy2);
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border2);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 60px;
  z-index: 10;
  transition: color var(--transition);
}
thead th:hover { color: var(--accent); }
thead th .sort-icon { margin-left: 4px; opacity: 0.4; font-size: 10px; }
thead th.sorted { color: var(--accent); }
thead th.sorted .sort-icon { opacity: 1; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody tr.selected { background: rgba(0,180,216,0.05); }

td {
  padding: 11px 14px;
  color: var(--text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td.cedula {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}
td.nombre { font-weight: 500; }
td.actions { max-width: none; white-space: nowrap; }
td.obs-cell { color: var(--text3); font-style: italic; font-size: 12px; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}
.badge-estado { background: var(--success-bg); color: var(--success); border: 1px solid rgba(46,194,126,0.2); }
.badge-tipo { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(0,180,216,0.2); }
.badge-cne-ok { background: var(--success-bg); color: var(--success); border: 1px solid rgba(46,194,126,0.3); }
.badge-cne-warn { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(244,197,66,0.3); }
.badge-cne-fail { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(224,82,82,0.3); }
.badge-cne-none { background: rgba(90,114,137,0.1); color: var(--text3); border: 1px solid var(--border2); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text3);
}
.empty-state svg { opacity: 0.15; margin-bottom: 16px; }
.empty-state h3 { font-size: 17px; font-weight: 500; margin-bottom: 8px; color: var(--text2); }
.empty-state p { font-size: 13px; max-width: 360px; margin: 0 auto; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}
@keyframes modalIn {
  from { transform: translateY(24px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-header h2 { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.close-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: var(--navy3);
  border: 1px solid var(--border2);
  color: var(--text3);
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.close-btn:hover { color: var(--text); border-color: var(--border3); }

/* ── FORM ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text3);
  font-weight: 600;
}
.form-group label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition);
  width: 100%;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text4); }
.form-control.error { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.form-control.valid { border-color: var(--success); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint {
  font-size: 11px;
  color: var(--text4);
  margin-top: -2px;
}
.form-hint.error { color: var(--danger); }
.form-hint.success { color: var(--success); }

/* ── CNE VERIFICATION CARD ── */
.cne-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 13px;
  animation: fadeIn 0.3s ease;
}
.cne-card.verified { background: var(--success-bg); border: 1px solid rgba(46,194,126,0.2); color: var(--success); }
.cne-card.warning { background: var(--warning-bg); border: 1px solid rgba(244,197,66,0.2); color: var(--warning); }
.cne-card.not-found { background: var(--danger-bg); border: 1px solid rgba(224,82,82,0.2); color: var(--danger); }
.cne-card.loading { background: var(--info-bg); border: 1px solid rgba(108,141,255,0.2); color: var(--info); }
.cne-card .cne-icon { font-size: 20px; flex-shrink: 0; }
.cne-card .cne-info { flex: 1; }
.cne-card .cne-info strong { display: block; margin-bottom: 2px; }
.cne-card .cne-info small { font-size: 11px; opacity: 0.8; }

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

/* ── PAGINATION ── */
.pagination {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.pagination-info { font-size: 12px; color: var(--text3); font-family: var(--font-mono); }
.pagination-controls { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,180,216,0.3);
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── DROP ZONE ── */
.drop-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.drop-zone svg { opacity: 0.25; margin-bottom: 14px; }
.drop-zone p { font-size: 13px; color: var(--text3); }
.drop-zone strong { color: var(--text2); }

/* ── CONFIRM ── */
.confirm-body { padding: 24px; text-align: center; }
.confirm-body p { color: var(--text2); margin-top: 8px; font-size: 14px; }
.confirm-icon { font-size: 40px; margin-bottom: 14px; }

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 260px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border: 1px solid transparent;
}
.toast-success { background: #0d2a1a; border-color: rgba(46,194,126,0.3); color: #6ddbaa; }
.toast-error { background: #2a0d0d; border-color: rgba(224,82,82,0.3); color: #f08080; }
.toast-info { background: #0d1d2a; border-color: rgba(0,180,216,0.3); color: var(--accent); }
@keyframes toastIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── CHECKBOX ── */
input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; width: 15px; height: 15px; }
.row-checkbox { width: 40px; }

/* ── BULK BAR ── */
.bulk-bar {
  display: none;
  padding: 10px 20px;
  background: var(--accent-glow);
  border-bottom: 1px solid rgba(0,180,216,0.15);
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.bulk-bar.visible { display: flex; }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  padding: 0 20px;
  background: var(--card);
}
.tab {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab .tab-count {
  background: var(--navy3);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-family: var(--font-mono);
}
.tab.active .tab-count { background: var(--accent-glow); color: var(--accent); }

/* ── DASHBOARD CARDS ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 20px;
}
.dash-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
}
.dash-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-sm);
}
.dash-card h3 {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 12px;
}
.dash-card .dash-value {
  font-size: 36px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 6px;
}
.dash-card .dash-sub {
  font-size: 12px;
  color: var(--text3);
}
.chart-container {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.chart-container h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text2);
}
.chart-bar-group { display: flex; flex-direction: column; gap: 8px; }
.chart-bar-item {
  display: flex; align-items: center; gap: 12px;
}
.chart-bar-label {
  font-size: 12px;
  color: var(--text2);
  width: 100px;
  text-align: right;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-bar-track {
  flex: 1;
  height: 24px;
  background: var(--navy3);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.chart-bar-fill {
  height: 100%;
  border-radius: var(--radius);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fff;
  min-width: 32px;
}

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,180,216,0.06) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,197,66,0.04) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  pointer-events: none;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: modalIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-header {
  text-align: center;
  padding: 32px 24px 24px;
  border-bottom: 1px solid var(--border);
}
.login-logo {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--accent) 0%, #0077b6 100%);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(0, 180, 216, 0.3);
}
.login-header h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}
.login-header p {
  font-size: 13px;
  color: var(--text3);
}
.login-body { padding: 24px; }
.login-footer {
  padding: 16px 24px 24px;
  text-align: center;
}
.login-footer p {
  font-size: 12px;
  color: var(--text4);
}

/* ── LOGIN TABS ── */
.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border2);
}
.login-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  background: var(--navy3);
  transition: all var(--transition);
  border: none;
}
.login-tab:first-child { border-right: 1px solid var(--border2); }
.login-tab.active {
  background: var(--accent);
  color: #fff;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .form-group { gap: 6px; }

/* ── CAPTURISTA VIEW ── */
.capturista-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px;
}
.capturista-success {
  text-align: center;
  padding: 40px 24px;
  animation: fadeIn 0.4s ease;
}
.capturista-success .success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--success-bg);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
  border: 2px solid rgba(46,194,126,0.3);
}
.capturista-success h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.capturista-success p {
  color: var(--text3);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ── LOADING ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border-radius: inherit;
}

/* ── ADMIN MANAGEMENT SECTION ── */
.management-section {
  padding: 20px;
}
.management-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.code-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.code-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.code-item:hover { border-color: var(--border2); }
.code-item .code-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  flex: 1;
}
.code-item .code-desc {
  font-size: 12px;
  color: var(--text3);
  flex: 1;
}
.code-item .code-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.code-item .code-status.active { background: var(--success-bg); color: var(--success); }
.code-item .code-status.inactive { background: var(--danger-bg); color: var(--danger); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .header { padding: 0 14px; height: 54px; }
  .header-brand span { display: none; }
  .header-brand h1 { font-size: 14px; }
  .header-actions .btn span.btn-text { display: none; }
  
  .toolbar { padding: 12px 14px; }
  .search-wrap { max-width: 100%; min-width: auto; }
  .filter-select { min-width: 100px; font-size: 12px; }
  
  .stats-bar { padding: 12px 14px; flex-wrap: wrap; gap: 4px; }
  .stat { padding: 8px 12px; border-right: none; }
  .stat-value { font-size: 16px; }
  
  .form-grid { grid-template-columns: 1fr; }
  
  .modal { border-radius: var(--radius-lg); margin: 8px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  
  .pagination { padding: 12px 14px; flex-direction: column; gap: 10px; }
  
  .toolbar-right { width: 100%; justify-content: flex-end; }
  
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
  .dash-card { padding: 14px; }
  .dash-card .dash-value { font-size: 24px; }
  
  .tabs { padding: 0 14px; overflow-x: auto; }
  .tab { padding: 12px 14px; font-size: 12px; }
  
  td { padding: 8px 10px; font-size: 12px; }
  thead th { padding: 10px; font-size: 10px; }
  
  .toast-container { bottom: 12px; right: 12px; left: 12px; }
  .toast { min-width: auto; }
}

@media (max-width: 480px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-bar { justify-content: space-between; }
  .stat { flex: 1; text-align: center; justify-content: center; }
  .stat-icon { display: none; }
  
  .chart-bar-label { width: 70px; font-size: 11px; }
  
  .login-card { border-radius: var(--radius-lg); }
  .login-header { padding: 24px 20px 20px; }
  .login-body { padding: 20px; }
}

/* ── UTILITY CLASSES ── */
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text3); }
.text-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-600 { font-weight: 600; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }
