/* ============================================
   SOLICITUDES.CSS - Dashboard de Estudiante
   ============================================ */

/* Main Container */
.main-solicitudes {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
  background: #f9fafb;
}

/* Header Section */
.solicitudes-header {
  margin-bottom: 32px;
}

.header-title {
  text-align: center;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.header-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

/* Modal de Identificación */
.modal-identificacion {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-identificacion .modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-identificacion .modal-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.modal-identificacion .modal-header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.modal-identificacion .form-group {
  margin-bottom: 20px;
}

.modal-identificacion label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.modal-identificacion input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.modal-identificacion input:focus {
  outline: none;
    border-color: var(--color-primario);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-identificacion .btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--color-primario);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-identificacion .btn-primary:hover {
  background: var(--color-primario-profundo);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-identificacion .btn-primary svg {
  width: 20px;
  height: 20px;
}

/* Filters Section */
.filters-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 20px;
  color: #9ca3af;
}

.search-box input {
  width: 100%;
  padding: 10px 10px 10px 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
    border-color: var(--color-primario);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f3f4f6;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn svg {
  width: 16px;
  height: 16px;
}

.filter-btn:hover {
  background: #e5e7eb;
}

.filter-btn.active {
  background: #eff6ff;
  border-color: var(--color-primario);
  color: var(--color-primario);
}

/* Stats Section */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 28px;
  height: 28px;
}

.stat-icon.total {
  background-color: rgba(77, 134, 156, 0.2);
}

.stat-icon.total svg {
  color: var(--color-primario);
}

.stat-icon.pending {
  background-color: rgba(249, 158, 11, 0.2);
}

.stat-icon.pending svg {
  color: var(--color-warning);
}

.stat-icon.approved {
  background-color: rgba(16, 185, 129, 0.2);
}

.stat-icon.approved svg {
  color: var(--color-success);
}

.stat-icon.rejected {
  background-color: rgba(239, 68, 68, 0.2);
}

.stat-icon.rejected svg {
  color: var(--color-error);
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
}

/* Solicitudes Container */
.solicitudes-container {
  display: grid;
  gap: 16px;
}

/* Solicitud Card */
.solicitud-item {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.solicitud-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.solicitud-item.pendiente {
  border-left-color: #f59e0b;
}

.solicitud-item.aprobada {
  border-left-color: #10b981;
}

.solicitud-item.rechazada {
  border-left-color: #ef4444;
}

.solicitud-header-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.solicitud-info-card {
  flex: 1;
}

.solicitud-programa {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 4px 0;
}

.solicitud-tipo {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.solicitud-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.solicitud-badge.pendiente {
  background: #fef3c7;
  color: #92400e;
}

.solicitud-badge.aprobada {
  background: #d1fae5;
  color: #065f46;
}

.solicitud-badge.rechazada {
  background: #fee2e2;
  color: #991b1b;
}

.solicitud-details-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.detail-item-card {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
}

.detail-item-card svg {
  width: 18px;
  height: 18px;
  color: #9ca3af;
}

.solicitud-footer-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.solicitud-id {
  font-size: 12px;
  color: #9ca3af;
  font-family: 'Courier New', monospace;
}

.btn-ver-detalle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primario);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ver-detalle:hover {
  background: var(--color-primario-profundo);
}

.btn-ver-detalle svg {
  width: 16px;
  height: 16px;
}

/* SVG alignment inside buttons */
.empty-state .cta-primary svg,
.btn-retry svg,
.empty-state .cta-primary i {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  background: white;
  border-radius: 12px;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: #d1d5db;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px 0;
}

.empty-state .cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-primario);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.empty-state .cta-primary:hover {
  background: var(--color-primario-profundo);
  transform: translateY(-2px);
}

.empty-state .cta-primary svg {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 80px 24px;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 24px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--color-primario);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-state p {
  font-size: 16px;
  color: #6b7280;
}

/* Error State */
.error-state {
  text-align: center;
  padding: 80px 24px;
  background: white;
  border-radius: 12px;
}

.error-state svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: #ef4444;
}

.error-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.error-state p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px 0;
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-primario);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-retry:hover {
  background: var(--color-primario-profundo);
}

.btn-retry svg {
  width: 18px;
  height: 18px;
}

/* Modal Detalle */
.modal-detalle {
  background: white;
  border-radius: 12px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-detalle .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-detalle .modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.close-button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.close-button:hover {
  background: #e5e7eb;
}

.close-button svg {
  width: 18px;
  height: 18px;
  color: #374151;
}

.modal-detalle .modal-body {
  padding: 24px;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section h4 svg {
  width: 20px;
  height: 20px;
  color: var(--color-primario);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-field label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-field span {
  font-size: 14px;
  color: #111827;
}

.notas-box {
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid var(--color-primario);
}

.notas-box p {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  margin: 0;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111827;
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  z-index: 1000;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-notification.error {
  background: #dc2626;
}

.toast-notification.success {
  background: #10b981;
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

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

/* Responsive */
@media (max-width: 768px) {
  .filters-section {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: 100%;
  }

  .filter-buttons {
    width: 100%;
    justify-content: space-between;
  }

  .stats-section {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .solicitud-details-card {
    grid-template-columns: 1fr;
  }
}
