/* =====================================================
   ESTUDIANTES.CSS — Flujo: Registro → Cupón → Pago
   Tu Materia Online
   ===================================================== */

:root {
  --bg-dark: #000c18;
  --bg-card: rgba(1, 28, 52, 0.75);
  --bg-input: rgba(1, 28, 52, 0.5);
  --primary: #00E5FF;
  --primary-glow: rgba(0, 229, 255, 0.25);
  --secondary: #0A84FF;
  --accent: #FFD100;
  --success: #00D26A;
  --danger: #FF453A;
  --warning: #FF9F0A;
  --text-main: #FFFFFF;
  --text-muted: #B3D4FF;
  --border: rgba(0, 163, 255, 0.25);
}

/* ─── Overlay ──────────────────────────────────────── */
.student-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 8, 20, 0.88);
  backdrop-filter: blur(10px);
  z-index: 9000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.student-overlay.active { display: flex; }

/* ─── Modal Container ──────────────────────────────── */
.student-modal {
  background: linear-gradient(145deg, rgba(1,22,48,0.97) 0%, rgba(0,12,28,0.99) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0,0,0,0.7), 0 0 40px rgba(0,229,255,0.05);
  animation: slideUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.student-modal::-webkit-scrollbar { width: 4px; }
.student-modal::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

@keyframes slideUp {
  from { transform: translateY(30px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ─── Modal Header ─────────────────────────────────── */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.modal-logo span { color: var(--primary); }
.modal-close-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ─── Steps Indicator ──────────────────────────────── */
.steps-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 28px 0;
}
.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.3s;
}
.step-dot.active { background: var(--primary); box-shadow: 0 0 8px var(--primary-glow); transform: scale(1.3); }
.step-dot.done { background: var(--success); }

/* ─── Step Panel ───────────────────────────────────── */
.step-panel {
  display: none;
  padding: 28px;
  animation: fadeIn 0.25s ease;
}
.step-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-title {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.step-title span { color: var(--primary); }
.step-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ─── Form Inputs ──────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  appearance: none;
}
.form-group input::placeholder { color: rgba(179,212,255,0.4); }
.form-group input:focus,
.form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-group select { cursor: pointer; }
.form-group select option { background: #001627; color: #fff; }
.form-group select:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Buttons ──────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: #000c18;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 8px;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,229,255,0.35); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ─── Price Display ────────────────────────────────── */
.price-box {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}
.price-original {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 4px;
}
.price-current {
  font-family: 'Poppins', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(255,209,0,0.3);
  line-height: 1.1;
}
.price-badge {
  display: inline-block;
  background: rgba(0,210,106,0.15);
  border: 1px solid var(--success);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Book Option Selector ─────────────────────────── */
.book-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.book-option-btn {
  padding: 12px 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.book-option-btn:hover { border-color: var(--primary); color: var(--primary); }
.book-option-btn.selected { border-color: var(--primary); background: rgba(0,229,255,0.1); color: var(--primary); }
.book-option-btn.combo { grid-column: 1 / -1; border-color: var(--accent); color: var(--accent); }
.book-option-btn.combo.selected { background: rgba(255,209,0,0.1); }
.book-option-btn small { display: block; font-size: 11px; font-weight: 400; margin-top: 3px; opacity: 0.8; }

/* ─── Coupon Input ─────────────────────────────────── */
.coupon-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.coupon-row .form-group { margin: 0; flex: 1; }
.btn-coupon {
  padding: 12px 16px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: rgba(0,229,255,0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-coupon:hover { background: var(--primary); color: #000c18; }

/* ─── Bank Info ────────────────────────────────────── */
.bank-card {
  background: rgba(0,229,255,0.05);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
}
.bank-card h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.bank-row:last-child { border: none; padding-bottom: 0; }
.bank-row span:first-child { color: var(--text-muted); }
.bank-row .bank-value {
  font-weight: 700;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}
.bank-row .copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.bank-row .copy-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ─── File Upload ──────────────────────────────────── */
.file-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}
.file-drop-zone:hover,
.file-drop-zone.dragover { border-color: var(--primary); background: rgba(0,229,255,0.04); }
.file-drop-zone.has-file { border-color: var(--success); background: rgba(0,210,106,0.05); }
.file-drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop-icon { font-size: 32px; margin-bottom: 10px; }
.file-drop-text { font-size: 13px; color: var(--text-muted); }
.file-drop-text strong { color: var(--primary); }
.file-name-display {
  margin-top: 8px;
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
  word-break: break-all;
}

/* ─── Alert/Feedback ───────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.alert-success { background: rgba(0,210,106,0.12); border: 1px solid rgba(0,210,106,0.35); color: #6fffb0; }
.alert-danger  { background: rgba(255,69,58,0.12);  border: 1px solid rgba(255,69,58,0.35);  color: #ff9d98; }
.alert-info    { background: rgba(0,229,255,0.1);   border: 1px solid rgba(0,229,255,0.25);  color: var(--primary); }
.alert-warning { background: rgba(255,159,10,0.12); border: 1px solid rgba(255,159,10,0.35); color: #ffc96b; }
.alert i { margin-top: 2px; flex-shrink: 0; }

/* ─── Pending State ────────────────────────────────── */
.pending-container {
  text-align: center;
  padding: 20px 0;
}
.pending-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,159,10,0.15);
  border: 2px solid rgba(255,159,10,0.4);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,159,10,0.3); }
  50% { box-shadow: 0 0 0 15px rgba(255,159,10,0); }
}
.pending-title {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--warning);
  margin-bottom: 10px;
}
.pending-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto;
}

/* ─── Spinner ──────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Divider ──────────────────────────────────────── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Toast Notification ───────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #001627;
  border: 1px solid var(--primary);
  color: var(--text-main);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  z-index: 99999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 480px) {
  .student-modal { border-radius: 20px; }
  .book-options { grid-template-columns: 1fr; }
  .book-option-btn.combo { grid-column: auto; }
  .step-title { font-size: 18px; }
  .price-current { font-size: 28px; }
}
