/* ==========================================================================
   PORTAL DE BECAS - SISTEMA DE DISEÑO INSTITUCIONAL
   Estética universitaria con tonos azul marino y dorados de prestigio
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Colores Principales Institucionales */
  --color-primary: #0f1e40;
  --color-primary-light: #1e3a8a;
  --color-primary-dark: #070d1e;
  --color-secondary: #0284c7;

  /* Tonos Dorados Institucionales de Prestigio */
  --color-gold: #d4af37;
  --color-gold-hover: #b89628;
  --color-gold-dark: #854d0e;
  --color-gold-light: #fef9c3;
  --color-gold-border: #eab308;
  --color-gold-subtle: rgba(212, 175, 55, 0.12);
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #ca8a04 60%, #996515 100%);
  --gold-glow: 0 4px 18px rgba(212, 175, 55, 0.35);

  /* Estados */
  --color-success: #059669;
  --color-success-bg: #ecfdf5;
  --color-success-border: #a7f3d0;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  --color-warning: #d97706;

  /* Neutros */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #d4af37;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 30px -5px rgba(15, 23, 42, 0.12), 0 8px 16px -6px rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(at 0% 0%, rgba(15, 30, 64, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(212, 175, 55, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(15, 30, 64, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  padding-bottom: 60px;
}

/* Decoraciones */
.bg-decor-circle {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
}

.bg-decor-1 {
  width: 450px;
  height: 450px;
  background: rgba(15, 30, 64, 0.12);
  top: -120px;
  left: -120px;
}

.bg-decor-2 {
  width: 400px;
  height: 400px;
  background: rgba(212, 175, 55, 0.14);
  bottom: 20px;
  right: -80px;
}

/* Layout General */
.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 20px;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 25px 20px;
}

/* ==========================================================================
   ENCABEZADO INSTITUCIONAL CON DETALLES DORADOS
   ========================================================================== */
.portal-header {
  background: linear-gradient(135deg, #070d1e 0%, #0f1e40 65%, #162a5a 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 36px 36px 32px 36px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  border-bottom: 3.5px solid var(--color-gold);
}

.portal-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4af37' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
  pointer-events: none;
}

.header-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.institution-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #f1f5f9;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.institution-pill svg {
  color: var(--color-gold);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 0 rgba(212, 175, 55, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.admin-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(212, 175, 55, 0.18);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.6);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.admin-badge-btn:hover {
  background: var(--gold-gradient);
  color: #070d1e;
  border-color: var(--color-gold);
  box-shadow: var(--gold-glow);
  transform: translateY(-1px);
}

.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-icon-wrap {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  flex-shrink: 0;
  box-shadow: var(--gold-glow);
}

.header-titles h1 {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
  color: #ffffff;
}

.header-titles p {
  color: #cbd5e1;
  font-size: 0.95rem;
  max-width: 620px;
}

/* ==========================================================================
   TARJETA PRINCIPAL DEL FORMULARIO
   ========================================================================== */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 38px;
  position: relative;
  border-top: 4px solid var(--color-gold);
}

.form-section {
  margin-bottom: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid #f1f5f9;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 20px;
  padding-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.section-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fef9c3;
  color: #854d0e;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fde047;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--color-primary);
}

.section-header p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Grillas */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.col-full {
  grid-column: 1 / -1;
}

/* Inputs & Labels */
.input-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.88rem;
  color: #334155;
  margin-bottom: 8px;
}

.label-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  pointer-events: none;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-control {
  width: 100%;
  height: 48px;
  padding: 10px 42px 10px 44px;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: all var(--transition-smooth);
  outline: none;
}

.input-control:hover {
  border-color: #cbd5e1;
  background-color: #ffffff;
}

.input-control:focus {
  border-color: var(--color-gold);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

.input-control:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--color-gold-dark);
}

select.input-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 42px;
}

.select-chevron {
  position: absolute;
  right: 14px;
  color: var(--text-subtle);
  pointer-events: none;
}

/* Iconos de Validación */
.input-status-icon {
  position: absolute;
  right: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.input-group.is-valid .input-control {
  border-color: var(--color-success);
  background-color: var(--color-success-bg);
}

.input-group.is-valid .input-status-icon.icon-valid {
  display: flex;
  color: var(--color-success);
}

.input-group.is-invalid .input-control {
  border-color: var(--color-danger);
  background-color: var(--color-danger-bg);
  animation: shake 0.4s ease-in-out;
}

.input-group.is-invalid .input-status-icon.icon-invalid {
  display: flex;
  color: var(--color-danger);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.feedback-msg {
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.feedback-msg.valid {
  color: var(--color-success);
}

.feedback-msg.error {
  color: var(--color-danger);
  font-weight: 500;
}

.feedback-msg.hint {
  color: var(--text-muted);
}

.format-guide-tag {
  display: inline-block;
  font-family: 'Courier New', monospace;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Términos */
.terms-checkbox-wrap {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.terms-checkbox-wrap input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-gold);
  cursor: pointer;
}

.terms-text {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.4;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: none;
  outline: none;
  text-decoration: none;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.btn-primary {
  background: linear-gradient(135deg, #0f1e40 0%, #1e3a8a 100%);
  color: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 14px rgba(15, 30, 64, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #070d1e 0%, #162a5a 100%);
  border-color: var(--color-gold);
  box-shadow: 0 6px 18px rgba(15, 30, 64, 0.45);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold-gradient);
  color: #070d1e;
  font-weight: 700;
  box-shadow: var(--gold-glow);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, #fef08a 0%, #d4af37 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.is-loading .spinner { display: inline-block; }

/* ==========================================================================
   MODAL DE COMPROBANTE
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  padding: 35px;
  position: relative;
  border-top: 5px solid var(--color-gold);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.receipt-header {
  text-align: center;
  margin-bottom: 22px;
}

.receipt-success-icon {
  width: 64px;
  height: 64px;
  background: #fef9c3;
  color: #854d0e;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 3px solid #fde047;
}

.receipt-header h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.folio-box {
  background: #fef9c3;
  border: 2px dashed #ca8a04;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  margin-bottom: 22px;
}

.folio-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #854d0e;
  letter-spacing: 1px;
}

.folio-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 2px;
}

.receipt-details-list {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 22px;
  border: 1px solid var(--border-color);
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 7px;
}

.receipt-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.receipt-row-label {
  color: #64748b;
  font-weight: 500;
}

.receipt-row-val {
  font-weight: 600;
  color: #0f172a;
  text-align: right;
}

.modal-actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS DE LOGIN
   ========================================================================== */
.login-page-wrapper {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  max-width: 440px;
  width: 100%;
  padding: 40px 36px;
  border-top: 5px solid var(--color-gold);
  position: relative;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-wrap {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #070d1e, #0f1e40);
  color: var(--color-gold);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 2px solid var(--color-gold);
  box-shadow: var(--gold-glow);
}

.login-header h1 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.login-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.login-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

/* ==========================================================================
   AVISOS Y NOTIFICACIONES DE ÉXITO (TOAST Y BANNER)
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 450px;
  width: calc(100% - 48px);
}

.toast-aviso {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px -8px rgba(15, 30, 64, 0.28), 0 0 0 1px rgba(5, 150, 105, 0.2);
  border-left: 5px solid #059669;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toast-aviso.toast-closing {
  animation: toastFadeOut 0.3s forwards ease;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
}

.toast-aviso-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
}

.toast-aviso-body {
  flex: 1;
  min-width: 0;
}

.toast-aviso-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toast-aviso-text {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.45;
}

.toast-aviso-folio {
  display: inline-block;
  font-family: monospace;
  font-weight: 800;
  color: #0f1e40;
  background: #fef9c3;
  border: 1px solid #ca8a04;
  border-radius: 4px;
  padding: 2px 7px;
  margin-top: 5px;
  font-size: 0.85rem;
}

.toast-aviso-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.2s;
  margin-left: 4px;
}

.toast-aviso-close:hover {
  color: #0f172a;
}

/* Banner de Aviso en el Formulario */
.aviso-banner-exito {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 2px solid #34d399;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.12);
  animation: bannerFadeIn 0.4s ease;
  flex-wrap: wrap;
}

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

.aviso-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 260px;
}

.aviso-banner-icon {
  width: 48px;
  height: 48px;
  background: #059669;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.2);
}

.aviso-banner-content h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 4px;
}

.aviso-banner-content p {
  font-size: 0.9rem;
  color: #1e293b;
  margin: 0;
  line-height: 1.4;
}

.aviso-banner-folio-tag {
  display: inline-block;
  font-family: monospace;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #6ee7b7;
  margin-top: 4px;
}

.aviso-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ==========================================================================
   ESTILOS DEL PANEL DE ADMINISTRACIÓN (ADMIN.PHP)
   ========================================================================== */
.admin-navbar {
  background: linear-gradient(135deg, #070d1e 0%, #0f1e40 100%);
  color: #ffffff;
  padding: 18px 28px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  box-shadow: var(--shadow-lg);
  border-bottom: 3px solid var(--color-gold);
  flex-wrap: wrap;
  gap: 15px;
}

.admin-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-nav-brand h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.admin-nav-brand span {
  font-size: 0.78rem;
  color: var(--color-gold);
  font-weight: 600;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* KPIs / Tarjetas de Resumen */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

/* ==========================================================================
   APARTADO DE CONSULTA DE SOLICITUD POR CURP
   ========================================================================== */
.consulta-pill-btn {
  background: rgba(212, 175, 55, 0.16);
  color: #854d0e;
  border: 1px solid rgba(212, 175, 55, 0.6);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.consulta-pill-btn:hover {
  background: var(--gold-gradient);
  color: #070d1e;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.consulta-card-section {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--color-gold);
  box-shadow: var(--shadow-lg);
  padding: 26px 30px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.consulta-card-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.consulta-header-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.consulta-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f1e40, #1e3a8a);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(15, 30, 64, 0.22);
}

.consulta-tag-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-gold-dark);
  background: #fef9c3;
  border: 1px solid #fde047;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.consulta-title-box h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 3px;
}

.consulta-title-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.consulta-search-bar {
  width: 100%;
}

.consulta-input-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 5px 6px 5px 16px;
  transition: all 0.25s ease;
}

.consulta-input-container:focus-within {
  border-color: var(--color-gold);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18);
}

.consulta-input-icon {
  color: var(--text-subtle);
  display: flex;
  align-items: center;
}

.consulta-text-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.96rem;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  padding: 8px 6px;
  letter-spacing: 1px;
}

.btn-consulta-submit {
  padding: 11px 22px;
  font-size: 0.92rem;
  white-space: nowrap;
  border-radius: var(--radius-md);
  cursor: pointer;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

/* Resultado de la Consulta */
.consulta-result-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);
  border: 2px solid #86efac;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  animation: bannerFadeIn 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consulta-res-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dcfce7;
}

.consulta-res-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid #a7f3d0;
}

.consulta-res-folio-box {
  background: #fef9c3;
  border: 2px dashed #ca8a04;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.consulta-res-folio-num {
  font-family: monospace;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 1px;
}

.consulta-res-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px;
}

.consulta-res-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.consulta-res-detail-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.consulta-res-detail-val {
  font-size: 0.92rem;
  color: var(--text-main);
  font-weight: 600;
}

.consulta-res-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 6px;
}

/* ==========================================================================
   PERSONALIZACIÓN DE SWEETALERT2
   ========================================================================== */
.swal2-popup {
  font-family: var(--font-body) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 20px 45px -10px rgba(15, 30, 64, 0.35) !important;
  padding: 24px 28px !important;
}

.swal2-title {
  font-family: var(--font-heading) !important;
  color: var(--color-primary) !important;
  font-weight: 700 !important;
  font-size: 1.45rem !important;
}

.swal2-html-container {
  font-family: var(--font-body) !important;
  color: #334155 !important;
  line-height: 1.5 !important;
}

.swal2-confirm {
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 22px !important;
}

.swal2-cancel {
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 22px !important;
}

/* ==========================================================================
   APARTADO DE BASE DE DATOS (ADMIN.PHP)
   ========================================================================== */
.db-management-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--color-primary-light);
  padding: 22px 26px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.db-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.db-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.db-icon-pill {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0f1e40, #1e3a8a);
  color: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(15, 30, 64, 0.2);
}

.db-card-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.db-card-title-wrap p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.db-status-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.db-status-online {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.db-status-offline {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.db-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.db-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--border-color);
}

.db-metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.db-metric-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.db-metric-val {
  font-size: 0.95rem;
  color: var(--text-main);
}

.db-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.db-config-dropdown {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 18px;
  animation: bannerFadeIn 0.3s ease;
}

.db-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.db-cfg-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.db-cfg-input {
  width: 100%;
  height: 38px;
  padding: 6px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}

.db-cfg-input:focus {
  border-color: var(--color-gold);
}

.db-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: bannerFadeIn 0.25s ease;
}

.db-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.db-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.db-alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.kpi-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-gold);
}

.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: #fef9c3;
  color: #854d0e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-info h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.kpi-info .kpi-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

/* Barra de Filtros y Búsqueda */
.admin-toolbar-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 18px 24px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.search-filter-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 8px 14px 8px 38px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input-wrap input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.filter-select {
  height: 42px;
  padding: 8px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--color-gold);
}

/* Tabla de Solicitudes */
.table-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-table th {
  background-color: #0f1e40;
  color: #ffffff;
  padding: 14px 18px;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.3px;
  border-bottom: 2px solid var(--color-gold);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: #f8fafc;
}

.table-folio-tag {
  font-family: monospace;
  font-weight: 700;
  color: #0f1e40;
  background: #fef9c3;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #fde047;
  font-size: 0.82rem;
  white-space: nowrap;
}

.table-carrera-tag {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e3a8a;
}

.gpa-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.82rem;
}

.gpa-high {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.gpa-mid {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.gpa-low {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* ==========================================================================
   PESTAÑAS DE NAVEGACIÓN Y NUEVO APARTADO DE DOCUMENTOS
   ========================================================================== */
.portal-nav-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  background: rgba(15, 30, 64, 0.05);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.portal-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.portal-tab-btn:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.6);
}

.portal-tab-btn.active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--color-gold);
}

.tab-badge-new {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #dc2626;
  color: #ffffff;
  animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

/* ==========================================================================
   TARJETAS Y CAMPOS DE CARGA DE DOCUMENTOS PDF
   ========================================================================== */
.docs-intro-banner {
  background: linear-gradient(135deg, rgba(15, 30, 64, 0.04) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1.5px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.docs-intro-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--gold-glow);
}

.docs-intro-text h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.docs-intro-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.docs-upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 15px;
}

.doc-upload-item {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--bg-card);
  transition: all var(--transition-normal);
  position: relative;
}

.doc-upload-item:hover,
.doc-upload-item.dragover {
  border-color: var(--color-gold);
  background: rgba(212, 175, 55, 0.03);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.12);
}

.doc-upload-item.has-file {
  border-style: solid;
  border-color: var(--color-success);
  background: #f0fdf4;
}

.doc-upload-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.doc-upload-title {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-upload-title .pdf-badge {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
}

.doc-upload-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.doc-dropzone-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  padding: 12px 16px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.doc-dropzone-inner:hover {
  background: #ffffff;
  border-color: var(--color-gold);
}

.doc-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.doc-file-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.doc-upload-item.has-file .doc-file-icon {
  background: #ecfdf5;
  color: #059669;
}

.doc-file-texts {
  flex: 1;
  min-width: 0;
}

.doc-file-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-file-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.btn-file-select {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--color-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-file-select:hover {
  border-color: var(--color-gold);
  color: var(--color-gold-dark);
  background: var(--color-gold-light);
}

.doc-status-badge {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.doc-upload-item.has-file .doc-status-badge {
  display: inline-flex;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* Badges de Estado de Expedientes y Botones de Aprobación */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.status-badge-aprobado {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-badge-pendiente {
  background: #fefce8;
  color: #ca8a04;
  border: 1px solid #fef08a;
}

.btn-success {
  background-color: #16a34a;
  color: #ffffff;
  border: 1px solid #15803d;
}

.btn-success:hover:not(:disabled) {
  background-color: #15803d;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-aprobado-disabled {
  background: #f1f5f9 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
  cursor: default !important;
  font-weight: 600;
}


/* ==========================================================================
   IMPRESIÓN
   ========================================================================== */
@media print {
  body { background: #fff !important; padding: 0 !important; }
  .portal-header, .form-card, .bg-decor-circle, .modal-close-btn, .modal-actions-bar, .admin-navbar, .admin-toolbar-card {
    display: none !important;
  }
  .modal-overlay { position: static !important; background: none !important; display: block !important; }
  .modal-card { box-shadow: none !important; border: 2px solid #000 !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .app-container, .admin-container { padding: 15px 12px; }
  .portal-header { padding: 25px 20px; border-radius: var(--radius-lg); }
  .header-content { flex-direction: column; align-items: flex-start; gap: 14px; }
  .header-icon-wrap { width: 54px; height: 54px; }
  .header-titles h1 { font-size: 1.5rem; }
  .form-card { padding: 24px 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-actions { flex-direction: column-reverse; }
  .btn { width: 100%; }
  .admin-navbar { flex-direction: column; align-items: stretch; }
  .admin-toolbar-card { flex-direction: column; align-items: stretch; }
}

/* ==========================================================================
   ESTILOS OFICIALES: CONVOCATORIA CERRADA Y FORMULARIO BLOQUEADO
   ========================================================================== */
.status-pill-closed {
  background: rgba(220, 38, 38, 0.14) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(220, 38, 38, 0.45) !important;
}

.closed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.convocatoria-bloqueada-banner {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(15, 30, 64, 0.05) 50%, rgba(212, 175, 55, 0.08) 100%);
  border: 2px solid #ef4444;
  border-radius: 16px;
  padding: 26px 28px;
  margin-bottom: 28px;
  box-shadow: 0 10px 25px -4px rgba(220, 38, 38, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.convocatoria-bloqueada-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #d4af37 100%);
}

.bloqueada-banner-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.bloqueada-lock-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #0f1e40 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
}

.bloqueada-text-col {
  flex: 1;
  min-width: 0;
}

.bloqueada-pill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.badge-bloqueo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.fecha-cierre-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
}

.bloqueada-text-col h2 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f1e40;
  margin-bottom: 6px;
  line-height: 1.25;
}

.bloqueada-desc {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 16px;
}

.bloqueada-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.bloqueada-subcard {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.bloqueada-subcard strong {
  font-size: 0.88rem;
  color: #0f1e40;
}

.bloqueada-subcard p {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0;
}

/* Formulario Bloqueado */
.form-locked {
  position: relative;
  opacity: 0.78;
}

.form-locked-alert {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: 10px;
  padding: 12px 18px;
  color: #991b1b;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.form-locked input[disabled],
.form-locked select[disabled] {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

.form-locked .doc-upload-item {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.75;
}

.form-locked .doc-dropzone-inner {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.form-locked .btn-file-select {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

.form-locked .terms-checkbox-wrap {
  opacity: 0.65;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.btn-disabled-locked {
  background: #94a3b8 !important;
  border-color: #64748b !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

@media (max-width: 640px) {
  .bloqueada-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .bloqueada-cards-grid {
    grid-template-columns: 1fr;
  }
}

