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

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

body {
  font-family: 'Inter', sans-serif;
  background: #0f172a;
  color: #f8fafc;
  min-height: 100vh;
  background-image: url('../img/jarabacoa.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: -15%;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
  z-index: 0;
  filter: blur(90px);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -15%;
  right: -15%;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
  z-index: 0;
  filter: blur(90px);
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

header { text-align: center; margin-bottom: 2rem; }

h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.45));
}

.subtitle { color: #94a3b8; margin-top: 0.4rem; font-weight: 500; }
.subtitle strong { color: #60a5fa; text-shadow: 0 0 10px rgba(96, 165, 250, 0.3); }

/* Staff menu */
#staffMenu {
  display: none;
  text-align: center;
  margin-bottom: 1.5rem;
  gap: 0.75rem;
  flex-direction: column;
}
#staffMenu.visible { display: flex; }
#staffMenu a {
  display: block;
  padding: 0.85rem 1.5rem;
  border-radius: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}
.btn-admin {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  text-shadow: 0 0 10px rgba(196, 181, 253, 0.4);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}
.btn-volunteer {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  text-shadow: 0 0 10px rgba(110, 231, 183, 0.4);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}
.btn-student {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  text-shadow: 0 0 10px rgba(147, 197, 253, 0.4);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

/* Card */
.card {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.25rem;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.card-header {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 0.85rem;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.card-header .card-title { font-size: 1.15rem; font-weight: 700; }

/* Schedule grid */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.time-slot {
  background: rgba(30, 41, 59, 0.7);
  border: 2px solid rgba(255,255,255,0.07);
  border-radius: 0.85rem;
  padding: 1.1rem 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  position: relative;
  user-select: none;
}
.time-slot:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}
.time-slot.selected {
  background: rgba(59, 130, 246, 0.28);
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
.time-slot .ts-icon {
  color: #60a5fa;
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: center;
}
.time-slot .ts-icon svg { width: 22px; height: 22px; }
.time-slot .ts-time { font-size: 1.05rem; font-weight: 700; color: #f8fafc; }
.time-slot .ts-route { font-size: 0.7rem; color: #64748b; font-family: monospace; margin-top: 0.2rem; }
.time-slot .ts-check {
  position: absolute;
  top: 0.45rem; right: 0.45rem;
  width: 18px; height: 18px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.15s;
}
.time-slot.selected .ts-check { opacity: 1; }

.tag-ida {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-top: 0.3rem;
  background: rgba(59,130,246,0.2);
  color: #93c5fd;
}
.tag-vuelta {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-top: 0.3rem;
  background: rgba(139,92,246,0.2);
  color: #c4b5fd;
}

.no-schedules {
  text-align: center;
  padding: 2rem;
  color: #475569;
  font-size: 0.9rem;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(59,130,246,0.35);
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(59,130,246,0.45); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Status msg */
#statusMsg {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2rem;
  color: #60a5fa;
  font-weight: 500;
}

/* Confirmed view */
#confirmedView { display: none; }
#confirmedView.visible { display: block; }

.confirmed-header { text-align: center; margin-bottom: 1.5rem; }
.confirmed-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.45));
  margin-bottom: 0.25rem;
}
.check-badge {
  width: 64px; height: 64px;
  background: rgba(16,185,129,0.15);
  border: 2px solid rgba(16,185,129,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
}
.check-badge svg { width: 32px; height: 32px; color: #34d399; }

.confirmed-trips { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.trip-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.trip-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trip-icon.ida { background: rgba(59,130,246,0.15); color: #60a5fa; box-shadow: 0 0 12px rgba(59,130,246,0.25); }
.trip-icon.vuelta { background: rgba(139,92,246,0.15); color: #c4b5fd; box-shadow: 0 0 12px rgba(139,92,246,0.25); }
.trip-icon svg { width: 20px; height: 20px; }
.trip-info { flex: 1; }
.trip-label { font-size: 0.7rem; text-transform: uppercase; color: #64748b; font-weight: 700; }
.trip-time { font-size: 1.2rem; font-weight: 700; color: #f8fafc; }
.trip-route { font-size: 0.7rem; color: #64748b; font-family: monospace; }
.trip-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.badge-confirmed { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); box-shadow: 0 0 10px rgba(16,185,129,0.2); }
.badge-espera { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); box-shadow: 0 0 10px rgba(245,158,11,0.2); }

/* Action buttons */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}
.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  transition: all 0.2s;
  text-align: center;
}
.btn-action svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-action:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-green  { color: #34d399; border-color: rgba(52,211,153,0.25); background: rgba(52,211,153,0.08); }
.btn-blue   { color: #60a5fa; border-color: rgba(96,165,250,0.25); background: rgba(96,165,250,0.08); }
.btn-rose   { color: #fb7185; border-color: rgba(251,113,133,0.25); background: rgba(251,113,133,0.08); }
.btn-slate  { color: #94a3b8; border-color: rgba(148,163,184,0.25); background: rgba(148,163,184,0.08); }

/* Logout */
.logout-wrap { text-align: center; margin-top: 2rem; }
.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: #64748b;
  padding: 0.6rem 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-logout:hover { border-color: rgba(239,68,68,0.4); color: #f87171; }

/* Loading */
.loading-text { text-align: center; color: #475569; padding: 2rem; font-size: 0.9rem; }

/* Hidden utility */
.hidden { display: none !important; }

/* Session banner */
.session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.85rem;
  margin-bottom: 1.25rem;
  border: 1px solid;
  font-size: 0.82rem;
  font-weight: 600;
}
.session-banner.manana {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.3);
  color: #fbbf24;
}
.session-banner.tarde {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.3);
  color: #a5b4fc;
}
.session-banner.override {
  background: rgba(52,211,153,0.1);
  border-color: rgba(52,211,153,0.3);
  color: #34d399;
}
.session-close-time {
  font-size: 0.72rem;
  opacity: 0.75;
  font-weight: 500;
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background: #0f172a !important; /* Solid dark blue/black */
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 1.5rem !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.z-200 { z-index: 200 !important; }

/* Modal de espera (premium white design) */
.btn-espera {
  background: #ffffff !important;
  color: #3b82f6 !important;
  border: none !important;
  border-radius: 2.5rem !important;
  padding: 0.75rem 1.5rem !important;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  margin-bottom: 0.5rem;
}

.btn-espera:hover {
  transform: translateY(-2px);
  background: #f1f5f9 !important;
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}

.btn-espera:active {
  transform: translateY(0);
}

.espera-icon-text {
  font-size: 1.25rem;
  line-height: 1;
}

.espera-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.espera-label {
  font-size: 1rem;
  font-weight: 700;
  color: #3b82f6;
  line-height: 1.2;
}

.espera-sub {
  font-size: 0.75rem;
  color: #60a5fa;
  font-weight: 500;
  line-height: 1.2;
}

/* Override specifics from other files if they exist */
.btn-espera-camino, .btn-espera-parada {
  border-color: transparent !important;
}

/* Utility classes used in votar.html */
.max-w-380 { max-width: 380px !important; }
.text-center { text-align: center !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.mb-1-25 { margin-bottom: 1.25rem !important; }
.mb-1-5 { margin-bottom: 1.5rem !important; }
.mb-0-4 { margin-bottom: 0.4rem !important; }
.w-64 { width: 64px !important; }
.h-64 { height: 64px !important; }
.bg-blue-glow {
  background: rgba(59, 130, 246, 0.12) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}
.rounded-full { border-radius: 9999px !important; }
.flex-col { display: flex !important; flex-direction: column !important; }
.gap-3 { gap: 0.75rem !important; }
.text-blue-400 { color: #60a5fa !important; }
.text-slate-500 { color: #64748b !important; }
.text-white { color: #ffffff !important; }
.font-bold { font-weight: 700 !important; }
.text-xl-3 { font-size: 1.875rem !important; }
.text-sm { font-size: 0.875rem !important; }
.lh-1-5 { line-height: 1.5 !important; }
.icon-medium { width: 2rem; height: 2rem; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }

@media (max-width: 500px) {
  .schedule-grid { grid-template-columns: repeat(2, 1fr); }
  .action-grid { grid-template-columns: 1fr; }
}
