/* ==========================================================================
   EUREKA 2026 - SISTEMA DE COMPETENCIA MATEMÁTICA
   UNAMIS • Licenciatura en Ciencias Matemáticas • Sede Santa Rosa de Lima
   Estilos Principales y Sistema de Diseño
   ========================================================================== */

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

:root {
  /* Paleta Institucional UNAMIS y Matemáticas */
  --bg-main: #070d18;
  --bg-card: #0e1726;
  --bg-card-hover: #152238;
  --bg-header: rgba(11, 20, 36, 0.92);
  --bg-overlay: rgba(4, 8, 16, 0.85);

  /* Acentos y Metales */
  --primary-burgundy: #801217;
  --primary-burgundy-light: #9e181e;
  --accent-blue: #2563eb;
  --accent-cyan: #06b6d4;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.4);
  --silver: #cbd5e1;
  --silver-glow: rgba(203, 213, 225, 0.35);
  --bronze: #d97706;
  --bronze-glow: rgba(217, 119, 6, 0.35);
  --honor-purple: #a855f7;

  /* Textos y Bordes */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  /* Sombras y Efectos */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Fondo decorativo con gradientes sutiles */
body::before {
  content: '';
  position: fixed;
  top: -20vh;
  left: 20vw;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, rgba(128, 18, 23, 0.08) 50%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
}

/* ==========================================================================
   APP HEADER & INSTITUTIONAL BRANDING
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-img {
  height: 52px;
  width: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  transition: transform 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.05);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-institution {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fbbf24;
  text-transform: uppercase;
}

.brand-campus-pill {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.brand-main-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-center-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.live-text {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fca5a5;
}

.clock-display {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.header-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Botones con estilo moderno */
.btn-action-header {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.btn-action-header:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-action-header.highlight {
  background: linear-gradient(135deg, var(--gold) 0%, #d97706 100%);
  color: #000;
  border: none;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.btn-action-header.highlight:hover {
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   NAVIGATION BAR TABS
   ========================================================================== */
.main-nav-bar {
  background: rgba(14, 23, 38, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow-x: auto;
}

.nav-tabs-group {
  display: flex;
  gap: 4px;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: var(--font-main);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   STATS TICKER BAR
   ========================================================================== */
.stats-ticker-bar {
  background: rgba(9, 15, 27, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ticker-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

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

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.grading-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #34d399;
  font-family: var(--font-mono);
}

.badge-mini {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  margin-left: 4px;
}
.badge-mini.gold { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-mini.silver { background: rgba(203, 213, 225, 0.2); color: #e2e8f0; border: 1px solid rgba(203, 213, 225, 0.4); }
.badge-mini.bronze { background: rgba(217, 119, 6, 0.2); color: #f59e0b; border: 1px solid rgba(217, 119, 6, 0.4); }

/* ==========================================================================
   MAIN CONTENT VIEWS & LAYOUT
   ========================================================================== */
.main-content-container {
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

.tab-view-content {
  display: none;
}

.tab-view-content.active {
  display: block;
  animation: fadeInView 0.3s ease-out;
}

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

/* ==========================================================================
   FILTER CONTROLS BAR
   ========================================================================== */
.view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.search-box-wrap {
  position: relative;
  min-width: 280px;
}

.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--border-focus);
}

.search-icon-inside {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.select-filter {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-main);
  outline: none;
  cursor: pointer;
}

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

.select-filter option {
  background: #0f172a;
  color: #ffffff;
}

/* ==========================================================================
   MÓDULO DE CALIFICACIÓN DOCENTE RÁPIDA (TEACHER SPEED GRADING)
   ========================================================================== */
.teacher-grading-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1000px) {
  .teacher-grading-container {
    grid-template-columns: 1fr;
  }
}

.student-search-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 580px;
}

.panel-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title-bar h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-results-list {
  flex: 1;
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.student-search-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.student-search-item:hover, .student-search-item.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.5);
  transform: translateX(4px);
}

.student-search-item.active {
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
}

.search-item-id {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-dim);
  width: 28px;
}

.search-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #1e293b;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-score-pill {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
}
.search-item-score-pill.graded { background: rgba(16, 185, 129, 0.2); color: #34d399; }

/* Ficha de Calificación Activa */
.grading-eval-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 580px;
  position: relative;
}

.eval-student-header {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.eval-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}

.eval-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #38bdf8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.eval-student-meta h2 {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 4px;
}

.eval-student-inst {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.eval-tags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.eval-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #93c5fd;
}

/* Sección de Ingreso de Puntaje Gigante */
.eval-score-input-section {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}

.eval-score-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fbbf24;
  margin-bottom: 12px;
}

.eval-big-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.btn-score-adjust {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-score-adjust:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.eval-big-score-input {
  width: 140px;
  background: #020617;
  border: 3px solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 900;
  text-align: center;
  border-radius: var(--radius-md);
  padding: 8px;
  outline: none;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.eval-max-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.quick-score-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.eval-actions-footer {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.btn-save-grade-big {
  flex: 1;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.btn-save-grade-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* ==========================================================================
   SPEED GRADING TABLE (CARGA RÁPIDA EN TABLA)
   ========================================================================== */
.table-responsive-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
}

.custom-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-data-table th {
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.grading-row:hover {
  background: var(--bg-card-hover);
}

.grading-row.has-medal-gold {
  background: rgba(245, 158, 11, 0.05);
}

.grading-student-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #1e293b;
  border: 1px solid var(--border-subtle);
}

.student-name-text {
  font-weight: 700;
  color: #ffffff;
}

.student-grade-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.score-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.speed-score-input {
  width: 72px;
  background: #020617;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.speed-score-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  background: #0b192c;
}

.score-unit {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.grading-medal-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.grading-medal-select.gold { color: #fbbf24; border-color: rgba(245, 158, 11, 0.5); }
.grading-medal-select.silver { color: #e2e8f0; border-color: rgba(203, 213, 225, 0.5); }
.grading-medal-select.bronze { color: #f59e0b; border-color: rgba(217, 119, 6, 0.5); }

.grading-notes-input {
  width: 100%;
  min-width: 180px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.grading-notes-input:focus {
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--border-subtle);
}

.btn-icon-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
  transition: all 0.2s ease;
}

.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* ==========================================================================
   PANEL CALIFICADOR DOCENTE (EVALUACIÓN RÁPIDA & BÚSQUEDA)
   ========================================================================== */
.teacher-grading-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  min-height: 600px;
}

@media (max-width: 950px) {
  .teacher-grading-container {
    grid-template-columns: 1fr;
  }
}

.student-search-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  min-height: 520px;
}

.panel-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.panel-title-bar h3 {
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.student-results-list {
  flex: 1;
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.student-search-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.student-search-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(3px);
}

.student-search-item.active {
  background: rgba(37, 99, 235, 0.18);
  border-color: #3b82f6;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.3);
}

.search-item-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-dim);
  min-width: 32px;
}

.search-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-subtle);
  background: #1e293b;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-score-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.search-item-score-pill.graded {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Ficha Gigante de Evaluación Docente */
.grading-eval-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.eval-student-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.eval-avatar-wrap {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.eval-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
  background: #1e293b;
}

.eval-student-meta {
  flex: 1;
}

.eval-student-meta h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.eval-student-inst {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.eval-tags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.eval-tag {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: #cbd5e1;
}

/* Sección de Ingreso de Calificación */
.eval-score-input-section {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}

.eval-score-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.eval-big-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.btn-score-adjust {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-score-adjust:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.06);
}

.eval-big-score-input {
  width: 140px;
  height: 70px;
  background: #020617;
  border: 3px solid #38bdf8;
  border-radius: var(--radius-md);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 900;
  text-align: center;
  outline: none;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
  transition: all 0.2s ease;
}

.eval-big-score-input:focus {
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
}

.eval-max-label {
  font-size: 1.2rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-dim);
}

.quick-score-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.eval-actions-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
}

.btn-save-grade-big {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.btn-save-grade-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

/* ==========================================================================
   PHOTOS GALLERY
   ========================================================================== */
.photos-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

.photo-card-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}

.card-photo-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
}
.card-photo-tag.tag-real { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.card-photo-tag.tag-auto { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

.photo-card-img-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 14px;
}

.gallery-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.card-medal-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 1.3rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.photo-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.photo-card-inst {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.2;
}

.photo-card-grade {
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 12px;
}

.btn-change-photo {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

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

.modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-photo-editor-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.modal-photo-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
}

.modal-footer {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-center-meta {
    width: 100%;
    justify-content: space-between;
  }
  .header-quick-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .form-group-row {
    grid-template-columns: 1fr;
  }
}
