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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f7fa;
  color: #2d3748;
  line-height: 1.6;
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
}

.login-header h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.login-header p {
  opacity: 0.9;
  font-size: 14px;
}

.login-form {
  padding: 40px 30px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2d3748;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #e2e8f0;
  color: #2d3748;
}

.btn-secondary:hover {
  background: #cbd5e0;
}

.btn-logout {
  background: #fc8181;
  color: white;
}

.btn-logout:hover {
  background: #f56565;
}

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-success:hover {
  background: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(72, 187, 120, 0.3);
}

.btn-danger {
  background: #f56565;
  color: white;
}

.btn-danger:hover {
  background: #e53e3e;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(245, 101, 101, 0.3);
}

/* Agregando estilos para botón de información */
.btn-info {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
}

.btn-info:hover {
  background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(66, 153, 225, 0.3);
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-block {
  width: 100%;
  display: block;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.login-footer {
  padding: 20px 30px;
  background: #f7fafc;
  text-align: center;
  color: #718096;
  font-size: 14px;
}

.alert {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.alert-error {
  background: #fed7d7;
  color: #c53030;
  border: 1px solid #fc8181;
}

/* Admin Container */
.admin-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-nav {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-header h2 {
  color: #667eea;
  font-size: 24px;
}

.nav-header p {
  color: #718096;
  font-size: 14px;
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.admin-main {
  flex: 1;
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 32px;
  color: #2d3748;
  margin-bottom: 8px;
}

.page-header p {
  color: #718096;
  font-size: 16px;
}

.total-participantes {
  margin-top: 16px;
  font-size: 18px;
}

/* Courses Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.course-admin-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.course-admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.course-admin-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.course-admin-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.course-badge.matutino {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.course-badge.nocturno {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.course-admin-content {
  padding: 24px;
}

.course-admin-content h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #2d3748;
}

.course-date,
.course-time {
  color: #718096;
  font-size: 14px;
  margin-bottom: 8px;
}

.course-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.stat {
  background: #f7fafc;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #718096;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
}

.stat-pending .stat-value {
  color: #ed8936;
}

.stat-verified .stat-value {
  color: #48bb78;
}

/* Participants Table */
.participants-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.participants-table {
  width: 100%;
  border-collapse: collapse;
}

.participants-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.participants-table th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.participants-table td {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.participants-table tbody tr:hover {
  background: #f7fafc;
}

.badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge-estudiante {
  background: #bee3f8;
  color: #2c5282;
}

.badge-externo {
  background: #fbd38d;
  color: #7c2d12;
}

/* Agregando estilos para badge de docente */
.badge-docente {
  background: #9ae6b4;
  color: #22543d;
  border: 2px solid #48bb78;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
}

.status-verified {
  background: #c6f6d5;
  color: #22543d;
}

.status-pending {
  background: #feebc8;
  color: #7c2d12;
}

.status-rejected {
  background: #fed7d7;
  color: #742a2a;
}

.status-large {
  padding: 12px 24px;
  font-size: 16px;
}

/* Detail Page */
.detail-container {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  margin-bottom: 40px;
}

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

.detail-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #2d3748;
}

.course-info-card {
  background: #f7fafc;
  padding: 20px;
  border-radius: 12px;
}

.course-detail-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
}

.course-info-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #2d3748;
}

.course-info-card p {
  margin-bottom: 8px;
  color: #4a5568;
}

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

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 14px;
  color: #718096;
  font-weight: 600;
}

.info-value {
  font-size: 16px;
  color: #2d3748;
}

.info-value.price {
  font-size: 20px;
  font-weight: 700;
  color: #48bb78;
}

/* Comprobante */
.comprobante-container {
  text-align: center;
}

.comprobante-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  cursor: pointer;
  transition: transform 0.3s;
}

.comprobante-image:hover {
  transform: scale(1.02);
}

.comprobante-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.no-comprobante {
  padding: 40px;
  background: #f7fafc;
  border-radius: 12px;
  color: #718096;
}

/* Verification Actions */
.verification-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.verification-form {
  flex: 1;
  max-width: 300px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Agregando estilos para modal pequeño del total recaudado */
.modal-content-small {
  background: white;
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
  margin: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content-small .modal-close {
  color: #2d3748;
  top: 10px;
  right: 20px;
  font-size: 30px;
}

.modal-content-small h2 {
  text-align: center;
  color: #2d3748;
  margin-bottom: 30px;
  font-size: 28px;
}

.total-recaudado-display {
  text-align: center;
}

.total-label {
  font-size: 16px;
  color: #718096;
  margin-bottom: 20px;
}

.total-amount {
  font-size: 48px;
  font-weight: 700;
  color: #48bb78;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(72, 187, 120, 0.2);
}

.total-note {
  font-size: 14px;
  color: #a0aec0;
  font-style: italic;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.empty-state p {
  font-size: 18px;
  color: #718096;
}

/* QR Code Display Section */
.qr-section-verified {
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  border: 2px solid #667eea;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.qr-display-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.qr-image-wrapper {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-display-image {
  width: 300px;
  height: 300px;
  display: block;
  border-radius: 8px;
}

.qr-info {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.qr-code-text {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
  letter-spacing: 3px;
  margin-bottom: 16px;
  font-family: "Courier New", monospace;
}

.qr-description {
  color: #4a5568;
  margin-bottom: 20px;
  font-size: 16px;
}

/* QR Scanner Styles */
.scanner-container {
  max-width: 800px;
  margin: 0 auto;
}

.scanner-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

#qr-reader {
  border: 3px solid #667eea;
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}

#qr-reader video {
  width: 100%;
  height: auto;
  display: block;
}

.scanner-status {
  text-align: center;
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}

.scanner-status.waiting {
  background: #bee3f8;
  color: #2c5282;
}

.scanner-status.scanning {
  background: #fbd38d;
  color: #7c2d12;
}

.scanner-status.success {
  background: #c6f6d5;
  color: #22543d;
}

.scanner-status.error {
  background: #fed7d7;
  color: #742a2a;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-nav {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .admin-main {
    padding: 20px;
  }

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

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

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

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

  .verification-actions {
    flex-direction: column;
  }

  .verification-form {
    max-width: 100%;
  }

  .participants-table-container {
    overflow-x: auto;
  }

  .participants-table {
    min-width: 800px;
  }

  /* Responsive for QR display */
  .qr-display-container {
    flex-direction: column;
    gap: 20px;
  }

  .qr-display-image {
    width: 250px;
    height: 250px;
  }

  .qr-code-text {
    font-size: 18px;
  }

  /* Responsive para el modal pequeño */
  .modal-content-small {
    max-width: 90%;
    padding: 30px 20px;
  }

  .total-amount {
    font-size: 36px;
  }
}
