/**
 * R.E.M. - Rincón Exam Manager
 * Estilos Modernos y Claros (Light Theme)
 */

:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-hover: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-focus: #6366f1;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #eef2ff;
  
  --color-success: #10b981;
  --color-success-hover: #059669;
  --color-success-light: #ecfdf5;
  
  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;
  
  --color-danger: #ef4444;
  --color-danger-hover: #dc2626;
  --color-danger-light: #fef2f2;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Enlaces */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Layout General */
.app-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-link img {
  height: 38px;
  width: auto;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.nav-link {
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  background-color: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.deliv-file-link {
  max-width: 175px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.role-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.role-tag.admin { background-color: #fee2e2; color: #991b1b; }
.role-tag.docente { background-color: #e0e7ff; color: #3730a3; }
.role-tag.alumno { background-color: #d1fae5; color: #065f46; }

/* Contenedor Principal */
.app-main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Pie de Página */
.app-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.version-badge:hover {
  background-color: #e0e7ff;
}

/* Tarjetas y Paneles */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.25;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
}
.btn-success:hover:not(:disabled) {
  background-color: var(--color-success-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-danger {
  background-color: var(--color-danger);
  color: #ffffff;
}
.btn-danger:hover:not(:disabled) {
  background-color: var(--color-danger-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text-main);
}
.btn-outline:hover:not(:disabled) {
  background-color: var(--color-surface-hover);
  border-color: var(--color-text-muted);
  text-decoration: none;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-google {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #374151;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.btn-google:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  text-decoration: none;
}
.btn-google svg {
  width: 18px;
  height: 18px;
}

/* Formularios */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--color-text-main);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-help {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

/* Captcha Component */
.captcha-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.captcha-svg-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  display: inline-flex;
}
.btn-reload-captcha {
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text-muted);
  transition: var(--transition);
}
.btn-reload-captcha:hover {
  background: var(--color-surface-hover);
  color: var(--color-primary);
}

/* Tablas */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.table th {
  background-color: var(--color-surface-hover);
  color: var(--color-text-muted);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-main);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: none;
}
.table tr:hover td {
  background-color: #fcfcfd;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background-color: var(--color-success-light); color: var(--color-success-hover); }
.badge-warning { background-color: var(--color-warning-light); color: #b45309; }
.badge-danger { background-color: var(--color-danger-light); color: var(--color-danger-hover); }
.badge-neutral { background-color: #f1f5f9; color: #475569; }
.badge-primary { background-color: var(--color-primary-light); color: var(--color-primary); }

/* Avisos / Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid transparent;
}
.alert-success { background-color: var(--color-success-light); border-color: #a7f3d0; color: #065f46; }
.alert-danger { background-color: var(--color-danger-light); border-color: #fecaca; color: #991b1b; }
.alert-warning { background-color: var(--color-warning-light); border-color: #fde68a; color: #92400e; }
.alert-info { background-color: var(--color-primary-light); border-color: #c7d2fe; color: #3730a3; }

/* Grid de Estadísticas */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-icon.primary { background-color: var(--color-primary-light); color: var(--color-primary); }
.stat-icon.success { background-color: var(--color-success-light); color: var(--color-success); }
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text-main);
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Paginación */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 1rem;
  list-style: none;
}
.page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-main);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.page-item.active .page-link {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}
.page-item .page-link:hover:not(.active) {
  background-color: var(--color-surface-hover);
}

/* Pestañas (Tabs) */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}
.tab-btn {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.tab-btn:hover:not(.active) {
  color: var(--color-text-main);
}

/* Ventanas Modales Independientes (AppModal) */
.app-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.app-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.app-modal-dialog {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.app-modal-backdrop.active .app-modal-dialog {
  transform: scale(1);
}
.app-modal-dialog.modal-lg {
  max-width: 780px;
}

.app-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.app-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-main);
}
.app-modal-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.app-modal-close-btn:hover {
  color: var(--color-danger);
  background-color: var(--color-danger-light);
}

.app-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.95rem;
  color: var(--color-text-main);
  line-height: 1.6;
}

.app-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-surface-hover);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toggle Switch */
.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}
.switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: #cbd5e1;
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.switch-input:checked + .switch-slider {
  background-color: var(--color-primary);
}
.switch-input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* Indicador de Pulsación en Tiempo Real */
.pulse-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}
@keyframes pulse-ring {
  to {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
}

/* ==========================================================================
   Capa Superpuesta de Código de Examen a Pantalla Completa (Proyector Aula)
   ========================================================================== */
.exam-code-btn-active {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border: 2px dashed var(--color-primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 1.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  user-select: none;
}
.exam-code-btn-active:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}
.exam-code-btn-active:active {
  transform: translateY(0);
}
.exam-code-btn-active .code-fs-icon {
  font-size: 0.95rem;
  opacity: 0.9;
  transition: transform 0.2s ease;
}
.exam-code-btn-active:hover .code-fs-icon {
  transform: scale(1.2);
}

.fullscreen-code-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2.5rem;
  box-sizing: border-box;
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  user-select: none;
  cursor: pointer; /* Clic en fondo cierra la capa */
}

.fullscreen-code-overlay.active {
  opacity: 1;
  visibility: visible;
}

.fullscreen-code-topbar {
  width: 100%;
  max-width: 1300px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  cursor: default;
}

.fullscreen-code-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 750;
  color: #94a3b8;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.fullscreen-code-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-fs-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}
.btn-fs-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-fs-close {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 0.5rem 1.35rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}
.btn-fs-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.04);
}

.fullscreen-code-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 1100px;
  width: 100%;
  margin: auto 0;
  cursor: default;
}

.fullscreen-code-title {
  font-size: clamp(1.3rem, 3.2vw, 2.3rem);
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.fullscreen-code-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.3rem);
  color: #94a3b8;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2rem;
}

.fullscreen-code-card {
  background: rgba(30, 41, 59, 0.88);
  border: 3px solid #6366f1;
  border-radius: 2rem;
  padding: clamp(1.75rem, 4.5vw, 3.25rem) clamp(2.5rem, 7vw, 6.5rem);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 50px rgba(99, 102, 241, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.fullscreen-code-card:hover {
  border-color: #818cf8;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.95), 0 0 65px rgba(129, 140, 248, 0.55);
}

.fullscreen-code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: clamp(3.8rem, 12vw, 9.5rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #38bdf8;
  text-shadow: 0 0 45px rgba(56, 189, 248, 0.65), 0 0 15px rgba(255, 255, 255, 0.4);
  line-height: 1;
  display: block;
}

.fullscreen-code-copy-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.fullscreen-code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.fullscreen-code-footer-hint {
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  cursor: default;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .app-nav {
    justify-content: center;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .app-modal-dialog {
    max-width: 95vw;
  }
}
