/* ═══════════════════════════════════════════════════════
   SIB – Sistema Integral de Beneficiarios
   Alcaldía Municipal · Rionegro, Antioquia
   Diseño: Gobierno · Profesional · Accesible
════════════════════════════════════════════════════════ */

:root {
  --primary: #1a3a6b;
  --primary-light: #2352a0;
  --primary-dark: #0f2447;
  --accent: #c8922a;
  --accent-light: #e0a83a;
  --success: #1a7f37;
  --danger: #c0392b;
  --warning: #d97706;
  --info: #0077b6;

  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --bg-sidebar: #0f2447;

  --text-main: #1a2535;
  --text-muted: #6b7a8d;
  --text-light: #9aa5b4;
  --border: #dde1e8;
  --border-light: #eef0f3;

  --sidebar-w: 258px;
  --topbar-h: 60px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 12px rgba(26,58,107,0.10);
  --shadow-lg: 0 8px 32px rgba(26,58,107,0.16);

  --font: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

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

/* ════════════════════════════════════
   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;
  transition: transform .3s ease, width .3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .user-data { display: none; }
.sidebar.collapsed .logo-wrap { justify-content: center; }
.sidebar.collapsed .user-info { justify-content: center; }

.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-main { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 1.5px; }
.logo-sub { font-size: 10.5px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.sidebar-toggle {
  background: none; border: none; color: rgba(255,255,255,0.5);
  cursor: pointer; padding: 4px; font-size: 14px; flex-shrink: 0;
  transition: color .2s;
}
.sidebar-toggle:hover { color: white; }

.nav-menu { flex: 1; padding: 12px 10px; }
.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  color: rgba(255,255,255,0.3); text-transform: uppercase;
  padding: 14px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 450;
  transition: all .18s;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 2px;
}
.nav-item i { width: 18px; text-align: center; flex-shrink: 0; font-size: 14px; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: var(--primary-light); color: white; font-weight: 600; }
.nav-item.active i { color: var(--accent-light); }

.sidebar-footer {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); font-size: 14px;
  flex-shrink: 0;
}
.user-data { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10.5px; color: rgba(255,255,255,0.4); margin-top: 1px; }

/* ════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .3s ease;
}
.main-content.collapsed { margin-left: 68px; }

/* ─── TOPBAR ─── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.breadcrumb i { color: var(--primary); }
.bc-sep { color: var(--border); }
#breadcrumbLabel { color: var(--text-main); font-weight: 500; }
.topbar-clock { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); letter-spacing: .5px; }
.notif-btn { position: relative; cursor: pointer; font-size: 18px; color: var(--text-muted); }
.notif-badge {
  position: absolute; top: -5px; right: -6px;
  background: var(--danger); color: white;
  font-size: 9px; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.logout-btn { background: none; border: none; cursor: pointer; color: var(--danger); font-size: 15px; padding: 4px; }

/* ═══════════════════════════════════
   VIEWS
═══════════════════════════════════ */

 /* Marca de agua personal */
        .watermark {
            position: fixed;
            bottom: 8px;
            right: 12px;
            font-size: 0.7rem;
            color: #999;
            opacity: 0.5;
            pointer-events: none;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            letter-spacing: 0.5px;
            z-index: 10;
        }
.views-wrap { flex: 1; }
.view { display: none; padding: 28px 28px 40px; animation: fadeIn .25s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 22px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.page-header h2 i { font-size: 20px; color: var(--accent); }
.page-header p { color: var(--text-muted); font-size: 13.5px; margin-top: 5px; }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.card-section-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
}
.card-section-title i { color: var(--primary); font-size: 13px; }
.mt-20 { margin-top: 20px; }
.mt-8 { margin-top: 8px; }

/* ─── FORM ─── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-col { grid-column: 1 / -1; }
.form-group label {
  font-size: 12.5px; font-weight: 600;
  color: var(--text-main); letter-spacing: .3px;
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font);
  font-size: 14px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafbfc;
  color: var(--text-main);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(35,82,160,0.12);
  outline: none;
  background: white;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.form-msg { margin-top: 14px; font-size: 13.5px; }
.form-msg.success { color: var(--success); }
.form-msg.error { color: var(--danger); }

.input-with-btn { display: flex; gap: 8px; }
.input-with-btn input { flex: 1; }

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--primary);
  color: white; border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(26,58,107,0.25);
}
.btn-primary:hover { background: var(--primary-light); box-shadow: 0 4px 16px rgba(26,58,107,0.3); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: white; color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s;
}
.btn-secondary:hover { background: var(--primary); color: white; }
.btn-outline {
  background: transparent; color: var(--text-muted);
  border: 1.5px solid var(--border);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s; width: 100%; justify-content: center;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.full-width { width: 100%; justify-content: center; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-search {
  background: var(--accent); color: white; border: none;
  padding: 0 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font); font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background .2s; white-space: nowrap; flex-shrink: 0;
}
.btn-search:hover { background: var(--accent-light); }

/* ════════════════════════════════════
   LOGIN
════════════════════════════════════ */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #2d6a9f 100%);
  padding: 20px;
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-icon {
  width: 64px; height: 64px;
  background: var(--primary);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 28px;
  margin: 0 auto 14px;
  box-shadow: 0 6px 20px rgba(26,58,107,0.35);
}
.login-logo h1 { font-size: 32px; font-weight: 800; color: var(--primary); letter-spacing: 2px; }
.login-logo p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.login-logo span { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: .5px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-error { color: var(--danger); font-size: 13px; text-align: center; min-height: 18px; }
.login-demo-note { text-align: center; font-size: 12px; color: var(--text-light); margin-top: 8px; }
.login-demo-note b { color: var(--primary); }

/* ════════════════════════════════════
   SEARCH HERO
════════════════════════════════════ */
.search-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  padding: 40px 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
}
.search-box-wrap { max-width: 640px; margin: 0 auto; }
.search-input-group {
  display: flex;
  background: white;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.search-prefix-icon {
  padding: 0 14px;
  color: var(--text-muted); font-size: 16px;
  display: flex; align-items: center;
  background: white;
}
.search-cedula-input {
  flex: 1; border: none; outline: none;
  padding: 14px 8px; font-size: 18px;
  font-family: var(--font-mono); font-weight: 500;
  color: var(--text-main);
  background: white;
  letter-spacing: 1px;
}
.search-shortcuts {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; flex-wrap: wrap;
}
.search-shortcuts span { color: rgba(255,255,255,0.55); font-size: 12px; }
.chip {
  background: rgba(255,255,255,0.15); color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 100px; padding: 4px 14px;
  font-family: var(--font-mono); font-size: 12px; cursor: pointer;
  transition: all .2s;
}
.chip:hover { background: rgba(255,255,255,0.28); }

/* ─── SEARCH RESULT ─── */
.search-result-wrap {}
.beneficiary-profile {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}
.profile-left { display: flex; flex-direction: column; gap: 16px; }
.profile-right { display: flex; flex-direction: column; gap: 16px; }

.profile-id-card {
  background: linear-gradient(145deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  padding: 24px;
  color: white;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.profile-id-card::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.profile-id-card::after {
  content: '';
  position: absolute; bottom: -20px; left: -20px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.profile-avatar {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 14px;
  border: 3px solid rgba(255,255,255,0.3);
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-cedula { font-family: var(--font-mono); font-size: 13px; opacity: .75; margin-top: 2px; }
.profile-badge {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 100px; font-size: 11.5px; font-weight: 600;
}
.profile-badge.activo { background: rgba(26,127,55,0.4); }
.profile-badge.inactivo { background: rgba(192,57,43,0.4); }

.profile-details-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border-light); padding: 18px; box-shadow: var(--shadow); }
.profile-detail-row { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 13.5px; }
.profile-detail-row:last-child { border-bottom: none; }
.profile-detail-row i { color: var(--primary); width: 16px; text-align: center; margin-top: 1px; flex-shrink: 0; }
.profile-detail-label { color: var(--text-muted); min-width: 110px; }
.profile-detail-value { color: var(--text-main); font-weight: 500; }

.profile-obs-card { background: #fffbf0; border: 1px solid #f0e0a0; border-radius: var(--radius); padding: 14px 16px; font-size: 13px; color: #7a5a00; display: flex; gap: 10px; }
.profile-obs-card i { flex-shrink: 0; margin-top: 2px; }

/* Programs */
.programs-list { display: flex; flex-direction: column; gap: 14px; }
.program-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.program-card-header {
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}
.program-title-wrap { display: flex; align-items: center; gap: 10px; }
.program-type-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.program-name { font-size: 14px; font-weight: 700; color: var(--text-main); }
.program-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.program-value { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--success); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.badge-activo { background: #dcfce7; color: #166534; }
.badge-inactivo { background: #fee2e2; color: #991b1b; }
.badge-entregado { background: #dcfce7; color: #166534; }
.badge-pendiente { background: #fef9c3; color: #854d0e; }

.program-card-body { padding: 14px 18px; }
.program-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.entregas-title { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.entrega-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--bg); margin-bottom: 5px;
  font-size: 13px;
}
.entrega-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); min-width: 90px; }
.entrega-desc { flex: 1; color: var(--text-main); }
.entrega-valor { font-family: var(--font-mono); font-weight: 600; color: var(--success); min-width: 90px; text-align: right; }
.entrega-func { font-size: 11.5px; color: var(--text-light); min-width: 110px; text-align: right; }

.no-results-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 50px 30px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
}
.no-results-card .no-icon { font-size: 48px; color: var(--border); margin-bottom: 16px; }
.no-results-card h3 { font-size: 18px; color: var(--text-muted); margin-bottom: 8px; }
.no-results-card p { font-size: 14px; color: var(--text-light); }

/* ════════════════════════════════════
   TOOLBAR / TABLE
════════════════════════════════════ */
.toolbar {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.toolbar-left { display: flex; gap: 10px; flex: 1; }
.toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar-search {
  flex: 1; max-width: 300px;
  font-family: var(--font); font-size: 13.5px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  transition: border-color .2s;
}
.toolbar-search:focus { border-color: var(--primary-light); outline: none; }
.toolbar-select {
  font-family: var(--font); font-size: 13.5px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
}

.table-wrap {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead { background: var(--primary); }
.data-table thead th {
  padding: 12px 16px; text-align: left;
  color: rgba(255,255,255,0.9);
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .7px; text-transform: uppercase;
  white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background .15s; }
.data-table tbody tr:hover { background: #f0f4ff; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody td { padding: 12px 16px; vertical-align: middle; }
.td-cedula { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--primary); }
.td-name { font-weight: 600; }
.program-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e8f0fe; color: var(--primary);
  border-radius: 100px; padding: 2px 9px;
  font-size: 11.5px; font-weight: 600; margin: 2px 2px 2px 0;
}
.btn-icon {
  background: none; border: none; cursor: pointer;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px;
  transition: all .15s;
}
.btn-icon.view-btn:hover { background: #e8f0fe; color: var(--primary); }
.btn-icon.edit-btn:hover { background: #fef3c7; color: var(--warning); }
.btn-icon.del-btn:hover { background: #fee2e2; color: var(--danger); }

/* ════════════════════════════════════
   IMPORT
════════════════════════════════════ */
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 24px; }
.import-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 24px;
  box-shadow: var(--shadow);
}
.import-card h3 { font-size: 15px; font-weight: 700; margin: 12px 0 6px; color: var(--text-main); }
.import-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.import-card-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px;
}
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 22px; text-align: center;
  margin-bottom: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 13px;
  transition: all .2s;
}
.drop-zone i { font-size: 28px; color: var(--border); }
.drop-zone small { font-size: 11.5px; color: var(--text-light); }
.drop-zone.drag-over { border-color: var(--primary-light); background: #f0f4ff; }
.json-paste {
  width: 100%; font-family: var(--font-mono); font-size: 12px;
  padding: 10px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: #fafbfc;
  resize: vertical; color: var(--text-main);
}
.import-result-wrap .card { overflow: auto; max-height: 400px; }

/* ════════════════════════════════════
   REPORTS / STATS
════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; bottom: -14px; right: -14px;
  width: 70px; height: 70px; border-radius: 50%;
  background: currentColor; opacity: .06;
}
.stat-label { font-size: 11.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.stat-icon { position: absolute; top: 18px; right: 18px; font-size: 22px; opacity: .3; }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-card { min-height: 220px; }
.chart-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.chart-bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.chart-bar-label { min-width: 130px; color: var(--text-muted); font-size: 12.5px; }
.chart-bar-track { flex: 1; height: 22px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.4,0,.2,1); display: flex; align-items: center; padding-left: 8px; color: white; font-size: 11.5px; font-weight: 700; }
.chart-bar-val { min-width: 36px; font-weight: 700; text-align: right; color: var(--text-main); }

/* ════════════════════════════════════
   HELP
════════════════════════════════════ */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.help-card { text-align: center; padding: 30px 20px; }
.help-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 22px; margin: 0 auto 16px;
}
.help-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text-main); }
.help-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* ════════════════════════════════════
   MINI BENEFICIARY CARD
════════════════════════════════════ */
.beneficiario-mini-card {
  background: #f0f4ff;
  border: 1.5px solid #c7d9f8;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; margin-bottom: 16px;
}
.beneficiario-mini-card.hidden { display: none; }
.beneficiario-mini-card .mini-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.mini-name { font-weight: 700; color: var(--primary); }
.mini-info { font-size: 12px; color: var(--text-muted); }

/* ════════════════════════════════════
   TOAST
════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 999;
}
.toast {
  background: var(--text-main); color: white;
  padding: 13px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  animation: slideInRight .3s ease;
  max-width: 340px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ════════════════════════════════════
   MODAL
════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white; border-radius: var(--radius);
  width: 94%; max-width: 600px; max-height: 90vh;
  overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: fadeIn .2s ease;
}
.modal-header {
  padding: 18px 24px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--primary); }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .beneficiary-profile { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full-col { grid-column: 1; }
}
@media (max-width: 600px) {
  .view { padding: 16px 14px 30px; }
  .search-hero { padding: 24px 16px; }
  .topbar { padding: 0 14px; }
  .topbar-clock { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
