* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color:#006BAE;
  --secondary-color: #777676;
  --success-color: #008A44;
  --danger-color: #D13821;
  --warning-color: #EBB618;
  --info-color: #06b6d4;
  --light-bg: #f8fafc;
  --dark-text: #1e293b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
@font-face {
    font-family: 'BrandonGrotesqueBlack';
    src: url('../fonts/BRANDON-GROTESQUE-BLACK-58A8A3E824392.OTF') format('opentype');
    font-weight: 900;
    font-style: normal;
}

body {
  /*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 */
font-family: 'BrandonGrotesqueBlack', Arial, sans-serif;
 line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--light-bg);
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #008943 0%,#008943 100%);
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

.login-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 28px;
  text-align: center;
}

.login-card h2 {
  font-size: 20px;
  margin-bottom: 30px;
  text-align: center;
  color: var(--secondary-color);
}

.login-info {
  margin-top: 30px;
  padding: 20px;
  background: var(--light-bg);
  border-radius: 8px;
  font-size: 14px;
}

.login-info code {
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* Header */
.main-header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo h1 {
  font-size: 20px;
  color: var(--primary-color);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-info {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  color: var(--dark-text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-link:hover {
  background: var(--light-bg);
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.page-header h1 {
  font-size: 32px;
  color: var(--dark-text);
}

/* Cards */
.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--dark-text);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--dark-text);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card h3 {
  font-size: 16px;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.stat-number {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: #000000;
  color: white;
}

.btn-primary:hover {
  background:var(--primary-color);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: #475569;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #dc2626;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-pdf:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
}

.btn-pdf::before {
  content: "📄";
  font-size: 18px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--secondary-color);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.required {
  color: var(--danger-color);
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: var(--light-bg);
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  color: var(--dark-text);
}

.table tbody tr:hover {
  background: var(--light-bg);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-abierta,
.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-cerrada,
.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-en_evaluacion,
.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-finalizada,
.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge-root {
  background: #fce7f3;
  color: #9f1239;
}

.badge-juez {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-participante {
  background: #d1fae5;
  color: #065f46;
}

.badge-pendiente {
  background: #f3f4f6;
  color: #374151;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  cursor: pointer;
}

.close:hover {
  color: var(--dark-text);
}

/* Actions Bar */
.actions-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.info-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--secondary-color);
  font-size: 14px;
}

.info-item p {
  color: var(--dark-text);
}

/* Grid 2 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 25px;
}

/* List Group */
.list-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: var(--light-bg);
  border-radius: 8px;
}

.list-item strong {
  display: block;
  margin-bottom: 5px;
}

.list-item p {
  font-size: 14px;
  color: var(--secondary-color);
}

/* Convocatorias Grid */
.convocatorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.convocatoria-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.convocatoria-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--dark-text);
}

.convocatoria-card p {
  flex-grow: 1;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.convocatoria-info {
  margin-bottom: 15px;
}

/* Postulación */
.postulacion-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.postulacion-datos,
.postulacion-documentos {
  margin-bottom: 25px;
}

.postulacion-datos h4,
.postulacion-documentos h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--dark-text);
}

.documentos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-calificacion {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px solid var(--border-color);
}

/* Calificaciones */
.calificacion-final {
  text-align: center;
  padding: 30px;
    background: linear-gradient(135deg, #008943 0%,#008943 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 25px;
}

.calificacion-final h3 {
  font-size: 32px;
  margin-bottom: 10px;
}

.calificacion-badge {
  text-align: right;
}

.calificacion-badge span {
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
}

.calificaciones-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.calificacion-item {
  background: var(--light-bg);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.calificacion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.calificacion-nota {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.calificacion-comentarios {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* Utilities */
.text-muted {
  color: var(--secondary-color);
}

.text-center {
  text-align: center;
}

/* Estilos para reportes y gráficos */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.charts-grid .card {
  min-height: 350px;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.form-inline .form-group {
  margin-bottom: 0;
  flex: 1;
  min-width: 200px;
}

.form-inline .btn {
  margin-bottom: 0;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-warning {
  background: var(--warning-color);
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

/* Estilos adicionales para modales de edición */
.modal-content h2 {
  margin-bottom: 25px;
  color: var(--dark-text);
}

.modal-content .form-group:last-of-type {
  margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 15px;
  }

  .header-nav {
    flex-direction: column;
    width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .convocatorias-grid {
    grid-template-columns: 1fr;
  }

  .postulacion-header {
    flex-direction: column;
    gap: 15px;
  }

  .actions-bar {
    flex-direction: column;
  }

  .actions-bar .btn {
    width: 100%;
  }
  /* Responsive para reportes */
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .form-inline {
    flex-direction: column;
  }

  .form-inline .form-group {
    width: 100%;
  }

  .form-inline .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px 10px;
  }

  .card {
    padding: 15px;
  }

  .login-card {
    padding: 25px;
  }

  .table {
    font-size: 13px;
  }

  .table th,
  .table td {
    padding: 8px;
  }
}

/* Estilos para banner de convocatoria responsive */
/* Agregando estilos diferenciados para banner completo y compacto */
.convocatoria-banner {
  width: 100%;
  margin: 0 0 30px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: white;
}

/* Banner completo mejorado para usuarios sin sesión - más elegante y espacioso */
.convocatoria-banner-full {
  padding: 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.convocatoria-banner-full .banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 500px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.convocatoria-banner-full .banner-image:hover {
  transform: scale(1.02);
}

/* Banner compacto para usuarios con sesión */
.convocatoria-banner-compact {
  padding: 10px;
  height: 150px;
}

.convocatoria-banner-compact .banner-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Banner en tarjetas de convocatorias */
.convocatoria-card-banner {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 10px;
  background: var(--light-bg);
}

.convocatoria-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.convocatoria-card:hover .convocatoria-card-banner img {
  transform: scale(1.05);
}

/* Responsive para banners */
@media (max-width: 768px) {
  /* Ajustes responsive para tablet manteniendo elegancia */
  .convocatoria-banner-full {
    padding: 20px;
  }

  .convocatoria-banner-full .banner-image {
    max-height: 400px;
    border-radius: 10px;
  }

  .convocatoria-banner-compact {
    padding: 8px;
    height: 120px;
  }

  .convocatoria-card-banner {
    height: 150px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  /* Ajustes responsive para móvil manteniendo elegancia */
  .convocatoria-banner {
    margin: 0 0 20px 0;
    border-radius: 10px;
  }

  .convocatoria-banner-full {
    padding: 15px;
  }

  .convocatoria-banner-full .banner-image {
    max-height: 300px;
    border-radius: 8px;
  }

  .convocatoria-banner-compact {
    padding: 5px;
    height: 100px;
  }

  .convocatoria-card-banner {
    height: 120px;
    padding: 5px;
  }
}


/* Contenedor general del grupo */
.form-group {
  margin-bottom: 1rem;
  font-family: Arial, sans-serif;
}

/* Etiqueta del campo */
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Contenedor del input + icono */
.input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  background-color: #fff;
}

/* Input de contraseña */
.input-wrapper input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  outline: none;
  font-size: 1rem;
}

/* Botón con el icono 👁️ */
.input-wrapper .toggle-password {
  background: none;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Efecto hover */
.input-wrapper .toggle-password:hover {
  color: #008A44; /* verde ambiental de tu paleta */
}

/* Accesibilidad visual */
.input-wrapper:focus-within {
  border-color: #006BAE; /* azul ambiental */
  box-shadow: 0 0 0 2px rgba(0, 107, 174, 0.2);
}



/* Contenedor general del grupo */
.form-group {
  margin-bottom: 1rem;
  font-family: Arial, sans-serif;
}

/* Etiqueta del campo */
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Contenedor del input + icono */
.input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  background-color: #fff;
}

/* Input de contraseña */
.input-wrapper input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  outline: none;
  font-size: 1rem;
}

/* Botón con el icono 👁️ */
.input-wrapper .toggle-password {
  background: none;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Efecto hover */
.input-wrapper .toggle-password:hover {
  color: #008A44; /* verde ambiental de tu paleta */
}

/* Accesibilidad visual */
.input-wrapper:focus-within {
  border-color: #006BAE; /* azul ambiental */
  box-shadow: 0 0 0 2px rgba(0, 107, 174, 0.2);
}

.campos-juridica {
            display: none;
        }
        .campos-juridica.active {
            display: block;
        }

/* Paginación */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 25px 0 15px 0;
  flex-wrap: wrap;
}

.pagination-btn,
.pagination-number {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-decoration: none;
  color: var(--dark-text);
  background: white;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.pagination-btn:hover:not(.disabled),
.pagination-number:hover:not(.active) {
  background: var(--light-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.pagination-number.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  cursor: default;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--light-bg);
}

.pagination-dots {
  padding: 8px 4px;
  color: var(--secondary-color);
  font-weight: bold;
}

.pagination-info {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  color: var(--secondary-color);
}

/* Responsive para paginación */
@media (max-width: 768px) {
  .pagination {
    gap: 5px;
  }

  .pagination-btn,
  .pagination-number {
    padding: 6px 10px;
    font-size: 13px;
  }

  .pagination-info {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .pagination {
    gap: 4px;
  }

  .pagination-btn,
  .pagination-number {
    padding: 5px 8px;
    font-size: 12px;
  }

  .pagination-dots {
    padding: 5px 2px;
  }

  .pagination-info {
    font-size: 12px;
  }
}




/* Estilos para documentos oficiales de convocatoria */
.documentos-oficiales-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.documentos-oficiales-card h3 {
  color: var(--dark-text);
  font-size: 24px;
  margin-bottom: 10px;
}

.documentos-oficiales-grid {
  display: grid;
  gap: 15px;
  margin-top: 25px;
}

.documento-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.documento-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.documento-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.documento-item:hover .documento-icon {
  transform: scale(1.1);
}

.documento-info {
  flex-grow: 1;
}

.documento-info strong {
  display: block;
  font-size: 16px;
  color: var(--dark-text);
  margin-bottom: 4px;
}

.documento-info p {
  font-size: 14px;
  color: var(--secondary-color);
  margin: 0;
}

.documento-item .btn {
  flex-shrink: 0;
  min-width: 110px;
}

/* Responsive para documentos oficiales */
@media (max-width: 768px) {
  .documento-item {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .documento-icon {
    width: 50px;
    height: 50px;
  }

  .documento-item .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .documentos-oficiales-card h3 {
    font-size: 20px;
  }

  .documento-item {
    padding: 12px;
    gap: 10px;
  }

  .documento-icon {
    width: 45px;
    height: 45px;
  }

  .documento-icon svg {
    width: 24px;
    height: 24px;
  }

  .documento-info strong {
    font-size: 14px;
  }

  .documento-info p {
    font-size: 13px;
  }
}
