/* ============================================================
   SISTEMA ELECTORAL - LIGHT MINIMALIST THEME
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #7A1B29;
  --primary-light: #fdf2f4;
  --primary-border: #fda4af;
  --accent: #9f1239;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-faint: #94a3b8;
  --bg-dark: #2e0912;
  --gradient-primary: linear-gradient(135deg, #be123c, #7A1B29);
  --transition: all 0.2s ease;
  
  --dark-btn: #4c0519;
  --dark-btn-hover: #7A1B29;
  
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --backdrop-blur: blur(12px);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

*:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* NAVBAR COMPONENT */
.navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
  display: flex; justify-content: space-between; align-items: center;
}
.navbar-brand {
  display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; color: var(--text-main);
}
.navbar-brand-icon {
  width: 36px; height: 36px; border-radius: 8px; background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.navbar-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.navbar-brand-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.navbar-nav {
  display: flex; align-items: center; gap: 8px;
}
.nav-link {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px; 
  border-radius: 100px; font-size: 0.9rem; font-weight: 600; color: var(--text-main);
  transition: all 0.2s;
}
.nav-link:hover { background: var(--bg-body); }
.nav-link.active {
  background: var(--dark-btn); color: white;
}
.nav-link svg { width: 16px; height: 16px; }

/* HERO SECTION */
.hero-section {
  text-align: center; padding: 80px 24px 64px; margin-bottom: 48px;
  background: linear-gradient(-45deg, #fff1f2, #ffe4e6, #ffffff, #fef2f2);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  border-radius: 0 0 40px 40px;
  box-shadow: inset 0 -10px 30px rgba(0,0,0,0.02);
}
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-title { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 12px; letter-spacing: -0.03em; color: var(--bg-dark); }
.hero-subtitle { font-size: 1.35rem; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.hero-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* GRID CARDS (3 cols) */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 24px;
}
.info-card {
  background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px 24px; box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.info-card:hover {
  transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary-border); background: #fff;
}
.info-icon {
  color: var(--primary); font-size: 1.5rem; margin-bottom: 16px; height: 32px;
}
.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.info-card .info-date { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.info-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ACTION CARDS (2 cols) */
.action-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 24px; margin-bottom: 48px;
}
.action-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 40px;
  text-align: center; display: flex; flex-direction: column; align-items: center;
  box-shadow: var(--shadow-md); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden;
}
.action-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--gradient-primary); transform: scaleX(0); transition: transform 0.3s ease; transform-origin: left;
}
.action-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: transparent; }
.action-card:hover::after { transform: scaleX(1); }
.action-icon {
  color: var(--primary); width: 48px; height: 48px; margin-bottom: 16px;
}
.action-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.action-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 24px; }
.btn-dark {
  background: var(--dark-btn); color: white; padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem;
  border: none; cursor: pointer; width: 100%; transition: background 0.2s; display: inline-block; text-align: center;
}
.btn-dark:hover { background: var(--dark-btn-hover); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-outline {
  background: #fff;
  color: var(--text-main);
  border-color: var(--border);
}
.btn-outline:hover { background: #f8fafc; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(122,27,41, 0.39);
}
.btn-primary:hover { 
  filter: brightness(1.05); 
  box-shadow: 0 6px 20px rgba(122,27,41, 0.23); 
}
.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.btn-gold:hover { filter: brightness(0.95); }
.btn-lg { padding: 12px 20px; font-size: 0.95rem; }

button,
input,
select,
textarea {
  min-height: 42px;
}

/* REQUISITOS BOX */
.req-box {
  background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: var(--radius-lg); padding: 32px;
  margin-bottom: 64px;
}
.req-icon { color: var(--primary); margin-bottom: 12px; width: 24px; height: 24px; }
.req-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.req-list { list-style: none; }
.req-list li {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: 0.95rem; color: var(--text-main);
}
.req-list li svg { color: var(--primary); width: 20px; height: 20px; flex-shrink: 0; }

/* AUTH PAGES (Login) */
.auth-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 48px 40px;
  width: 100%; max-width: 450px; text-align: center; box-shadow: var(--shadow-xl);
}
.auth-icon { color: var(--primary); width: 48px; height: 48px; margin: 0 auto 16px; }
.auth-icon.admin { color: #ef4444; }
.auth-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.auth-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 32px; }

.form-group { margin-bottom: 20px; text-align: left; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }
.form-control {
  width: 100%; padding: 12px 16px; background: #f1f5f9; border: 1px solid transparent; border-radius: var(--radius-md);
  font-size: 0.95rem; color: var(--text-main); transition: 0.2s; outline: none;
}
.form-control:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-light); }
.auth-alert-box {
  background: #fefce8; border: 1px solid #fef08a; padding: 16px; border-radius: var(--radius-md); text-align: left;
  font-size: 0.85rem; color: #b45309; display: flex; gap: 12px; margin-top: 24px;
}
.auth-alert-box.blue { background: var(--primary-light); border-color: var(--primary-border); color: #1e40af; }

/* CANDIDATES PAGE */
.cand-page-header { text-align: center; padding: 48px 0; }
.cand-page-title { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.cand-page-sub { font-size: 1.1rem; color: var(--text-muted); }

.cands-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 24px; margin-bottom: 64px;
}
.cand-item-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 24px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-md); transition: var(--transition);
}
.cand-item-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: var(--primary-border);
}
.cand-item-header { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.cand-item-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #f1f5f9; }
.cand-item-info { flex: 1; }
.cand-item-name { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.cand-item-badge { display: inline-block; background: var(--dark-btn); color: white; padding: 2px 10px; border-radius: 100px; font-size: 0.75rem; font-weight: 600; margin-bottom: 4px; }
.cand-item-loc { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.cand-item-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; flex: 1; }

/* SPLIT AUTH CARD (Voter Login Mockup) */
.auth-split-card {
  background: var(--bg-card); border-radius: 16px; overflow: hidden;
  width: 100%; max-width: 480px; text-align: left; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}
.auth-split-header {
  background: var(--gradient-primary); color: white;
  padding: 40px 32px; text-align: center;
}
.auth-split-icon { width: 56px; height: 56px; margin: 0 auto 16px; color: white; }
.auth-split-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.auth-split-subtitle { font-size: 0.95rem; font-weight: 500; color: #e0e7ff; }
.auth-split-body { padding: 32px; }
.auth-split-blue-box {
  background: #f0f9ff; border: 1px solid #bae6fd; border-radius: var(--radius-md);
  padding: 16px; color: #0369a1; font-size: 0.85rem; margin-bottom: 24px; display: flex; gap: 12px; align-items: flex-start;
}
.auth-split-yellow-box {
  background: #fefce8; border: 1px solid #fef08a; border-radius: var(--radius-md);
  padding: 16px; color: #b45309; font-size: 0.85rem; margin-top: 24px; display: flex; gap: 12px; align-items: flex-start;
}
.auth-split-footer {
  padding: 0 32px 32px;
}
.auth-split-check-list { list-style: none; }
.auth-split-check-list li {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-muted);
}
.auth-split-check-list li svg { color: #10b981; width: 16px; height: 16px; flex-shrink: 0; }

/* ALERT MESSAGE */
.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 0.9rem; margin-bottom: 24px; }
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #dcfce3; color: #15803d; border: 1px solid #bbf7d0; }

/* MODAL STYLES */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
  z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--bg-card); border-radius: var(--radius-xl);
  width: 100%; max-width: 600px; max-height: 90vh; display: flex; flex-direction: column;
  transform: translateY(20px); transition: 0.4s; box-shadow: var(--shadow-md);
  overflow: hidden;
}
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 24px; overflow-y: auto; line-height: 1.6; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); text-align: right; }

.view-props-link {
  position: absolute; right: 24px; bottom: 24px;
  color: var(--accent); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: color 0.2s;
  padding: 8px 12px; border-radius: 6px;
  background: rgba(159,18,57,0.1);
}
.view-props-link:hover { color: #fff; background: var(--accent); }

@media (max-width: 768px) {
  /* Layout constraints */
  .container { padding: 0 16px; }
  
  /* Navbar */
  .navbar-inner { flex-direction: column; gap: 16px; }
  .navbar-nav { width: 100%; justify-content: center; flex-wrap: wrap; }
  .nav-link { padding: 8px 12px; font-size: 0.85rem; }
  
  /* Hero & Flow */
  .hero-section { padding: 40px 0 32px; }
  .hero-title { font-size: 2rem; }
  .action-grid { grid-template-columns: 1fr; margin-bottom: 32px; }
  .action-card { padding: 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .req-box { padding: 24px; }
  
  /* Cands Grid */
  .cands-grid { grid-template-columns: 1fr; padding: 0 16px; }
  
  /* Split Card Form (Mob) */
  .auth-split-card { max-width: 100%; border-radius: 12px; }
  .auth-split-header { padding: 32px 20px; }
  .auth-split-body { padding: 20px; }
  .auth-split-footer { padding: 0 20px 24px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.6rem, 7vw, 2rem); }
  .hero-subtitle { font-size: 1rem; }
  .hero-desc { font-size: 0.92rem; }
  .action-card { padding: 18px; }
  .req-box { padding: 18px; }
}
/* ---- AVATAR INITIALS (Global) ---- */
.avatar-circle {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; color: white;
  text-transform: uppercase; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: #cbd5e1;
}
.avatar-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.avatar-green { background: linear-gradient(135deg, #10b981, #059669); }
.avatar-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.avatar-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.avatar-pink { background: linear-gradient(135deg, #ec4899, #be185d); }
.avatar-red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
