/* ══════════════════════════════════════════════════════
   DOCENTE VETERINARIA — styles.css
   Autor: generado con Claude
   Descripción: Estilos para la página web de la docente
   ══════════════════════════════════════════════════════ */

/* ─── VARIABLES DE COLOR ─── */
:root {
  --green-deep:    #1a4a2e;
  --green-mid:     #2d7a4f;
  --green-bright:  #3daa6e;
  --green-light:   #a8e6c3;
  --green-pale:    #e8f7ef;
  --accent:        #f0b429;
  --accent-soft:   #fff3cc;
  --red-feriado:   #e05252;
  --bg:            #f4faf6;
  --bg-card:       #ffffff;
  --text:          #1a2e22;
  --text-muted:    #6b8a74;
  --border:        #d0ead8;
  --shadow:        0 4px 24px rgba(26,74,46,0.10);
  --shadow-hover:  0 8px 36px rgba(26,74,46,0.18);
  --now:           #ff6b35;
  --now-bg:        #fff3ee;
}

/* ─── MODO OSCURO ─── */
[data-theme="dark"] {
  --bg:          #0f1f15;
  --bg-card:     #162a1e;
  --text:        #e8f5ee;
  --text-muted:  #7daf8e;
  --border:      #2a4a35;
  --green-pale:  #1a3325;
  --accent-soft: #2a2210;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --now-bg:      #2a1a12;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* ══════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════ */
header {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-mid) 60%, var(--green-bright) 100%);
  color: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
header::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 30%;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 28px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.header-left { display: flex; align-items: center; gap: 20px; }
.avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.header-info h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.header-info p {
  font-size: 0.88rem;
  opacity: 0.8;
  margin-top: 3px;
}
.header-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.78rem;
  margin-top: 6px;
  display: inline-block;
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-icon {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.btn-icon:hover { background: rgba(255,255,255,0.28); }
.live-time {
  font-size: 0.82rem;
  opacity: 0.75;
  background: rgba(0,0,0,0.2);
  padding: 6px 12px;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════════════
   NAVEGACIÓN
   ══════════════════════════════════════════════════════ */
nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(26,74,46,0.07);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.nav-btn {
  padding: 14px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.nav-btn:hover { color: var(--green-mid); }
.nav-btn.active { color: var(--green-deep); border-bottom-color: var(--green-bright); font-weight: 600; }

/* ══════════════════════════════════════════════════════
   LAYOUT PRINCIPAL
   ══════════════════════════════════════════════════════ */
main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }

.section { display: none; animation: fadeIn 0.3s ease; }
.section.active { display: block; }

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

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--green-deep);
}
[data-theme="dark"] .section-title { color: var(--green-light); }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); }

/* ─── UTILIDADES ─── */
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }

/* ══════════════════════════════════════════════════════
   HORARIO — FILTROS Y TOGGLES
   ══════════════════════════════════════════════════════ */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }

.group-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.group-btn:hover,
.group-btn.active {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: #fff;
}

.view-toggle {
  display: flex; gap: 4px;
  background: var(--green-pale);
  border-radius: 10px;
  padding: 3px;
}
.view-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.view-btn.active {
  background: var(--bg-card);
  color: var(--green-deep);
  box-shadow: var(--shadow);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════
   HORARIO — GRID SEMANAL
   ══════════════════════════════════════════════════════ */
.schedule-grid-wrap { overflow-x: auto; }
.schedule-grid {
  display: grid;
  grid-template-columns: 90px repeat(6, 1fr);
  gap: 4px;
  min-width: 680px;
}
.sg-header {
  padding: 10px 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--green-pale);
  border-radius: 8px;
}
.sg-header.today-col { background: var(--green-mid); color: #fff; }
.sg-time {
  padding: 8px 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  display: flex; align-items: center; justify-content: flex-end;
}
.sg-cell {
  border-radius: 10px;
  padding: 8px;
  font-size: 0.75rem;
  min-height: 64px;
  display: flex; flex-direction: column; justify-content: center;
  border: 1px solid transparent;
  transition: transform 0.15s;
}
.sg-cell:hover { transform: scale(1.02); }
.sg-cell.empty { background: var(--green-pale); opacity: 0.4; }

/* Colores por materia */
.sg-cell.mat-epi { background: #d4edda; border-color: #82c99a; color: #1a4a2e; }
.sg-cell.mat-sem { background: #cce5ff; border-color: #7ab8e8; color: #0d3d6b; }
.sg-cell.mat-his { background: #fff3cd; border-color: #f0c050; color: #5a3a00; }

[data-theme="dark"] .sg-cell.mat-epi { background: #1a3a25; border-color: #3a7a50; color: #a8e6c3; }
[data-theme="dark"] .sg-cell.mat-sem { background: #1a2a3a; border-color: #3a6a9a; color: #a8d4f5; }
[data-theme="dark"] .sg-cell.mat-his { background: #2a2210; border-color: #7a6020; color: #f5d87a; }

/* Clase EN CURSO */
.sg-cell.NOW {
  background: var(--now-bg) !important;
  border-color: var(--now) !important;
  box-shadow: 0 0 0 2px var(--now);
  animation: pulse-now 2s infinite;
}
@keyframes pulse-now {
  0%,100% { box-shadow: 0 0 0 2px var(--now); }
  50%      { box-shadow: 0 0 0 5px rgba(255,107,53,0.3); }
}
.sg-cell .mat-name  { font-weight: 700; font-size: 0.75rem; }
.sg-cell .mat-group { font-size: 0.68rem; opacity: 0.7; }
.sg-cell .mat-aula  { font-size: 0.68rem; opacity: 0.7; }
.sg-cell .now-badge {
  background: var(--now); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  display: inline-block; margin-top: 3px;
  width: fit-content;
}

/* ══════════════════════════════════════════════════════
   HORARIO — VISTA AGENDA
   ══════════════════════════════════════════════════════ */
.agenda-list { display: flex; flex-direction: column; gap: 10px; }
.agenda-item {
  display: flex; align-items: stretch; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.agenda-item:hover { box-shadow: var(--shadow-hover); }
.agenda-item.NOW-agenda { border-color: var(--now); box-shadow: 0 0 0 2px rgba(255,107,53,0.2); }
.agenda-color-bar { width: 5px; flex-shrink: 0; }
.agenda-color-bar.mat-epi { background: var(--green-bright); }
.agenda-color-bar.mat-sem { background: #5ba3d9; }
.agenda-color-bar.mat-his { background: #f0b429; }
.agenda-body { padding: 12px 14px; flex: 1; }
.agenda-title { font-weight: 700; font-size: 0.9rem; }
.agenda-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.agenda-day-label {
  width: 70px; flex-shrink: 0;
  background: var(--green-pale);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: var(--green-mid);
}

/* ══════════════════════════════════════════════════════
   CALENDARIO
   ══════════════════════════════════════════════════════ */
.cal-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
@media(max-width: 700px) { .cal-wrap { grid-template-columns: 1fr; } }

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-nav-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--green-deep);
}
[data-theme="dark"] .cal-nav-title { color: var(--green-light); }
.cal-nav-btn {
  background: var(--green-pale);
  border: none; color: var(--green-mid);
  width: 34px; height: 34px; border-radius: 8px;
  cursor: pointer; font-size: 1.1rem; font-weight: 700;
  transition: all 0.2s;
}
.cal-nav-btn:hover { background: var(--green-mid); color: #fff; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-name {
  text-align: center;
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  padding: 6px 0;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  position: relative;
  background: var(--green-pale);
  color: var(--text);
}
.cal-day:hover   { background: var(--green-light); }
.cal-day.other-month { opacity: 0.3; }
.cal-day.today   { background: var(--green-mid); color: #fff; font-weight: 700; }
.cal-day.feriado { background: #fde8e8; color: var(--red-feriado); font-weight: 700; border-color: #f5b0b0; }
[data-theme="dark"] .cal-day.feriado { background: #3a1515; border-color: #7a3030; }
.cal-day.has-event::after {
  content: '';
  position: absolute; bottom: 4px;
  width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent);
}
.cal-day.selected { outline: 2px solid var(--green-bright); outline-offset: 1px; }
.feriado-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red-feriado); margin-top: 2px; }

.feriados-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.feriado-tag {
  background: #fde8e8; color: var(--red-feriado);
  border-radius: 20px; padding: 4px 12px;
  font-size: 0.75rem; font-weight: 600;
  border: 1px solid #f5b0b0;
}
[data-theme="dark"] .feriado-tag { background: #3a1515; }

/* ─── SIDEBAR DE EVENTOS ─── */
.events-sidebar .event-date-label {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; color: var(--green-deep);
  margin-bottom: 12px;
}
[data-theme="dark"] .events-sidebar .event-date-label { color: var(--green-light); }
.event-item {
  background: var(--green-pale);
  border-left: 4px solid var(--green-bright);
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.83rem;
}
.event-item.feriado-item { border-left-color: var(--red-feriado); background: #fde8e8; }
[data-theme="dark"] .event-item.feriado-item { background: #3a1515; }
.event-item-title { font-weight: 600; }
.event-item-type  { font-size: 0.72rem; color: var(--text-muted); }

.add-event-form input,
.add-event-form textarea,
.add-event-form select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  margin-bottom: 8px;
  transition: border 0.2s;
}
.add-event-form input:focus,
.add-event-form textarea:focus { outline: none; border-color: var(--green-bright); }

/* ══════════════════════════════════════════════════════
   BOTÓN PRIMARIO
   ══════════════════════════════════════════════════════ */
.btn-primary {
  background: var(--green-mid);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}
.btn-primary:hover { background: var(--green-deep); }

/* ══════════════════════════════════════════════════════
   NOTAS
   ══════════════════════════════════════════════════════ */
.notas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.nota-card {
  border-radius: 14px;
  padding: 16px;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 140px;
  display: flex; flex-direction: column;
}
.nota-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.nota-card .nota-title { font-weight: 700; font-size: 0.88rem; margin-bottom: 8px; }
.nota-card .nota-body  { font-size: 0.8rem; opacity: 0.8; flex: 1; line-height: 1.5; }
.nota-card .nota-meta  { font-size: 0.7rem; opacity: 0.55; margin-top: 8px; }
.nota-card .nota-del {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.5); border: none;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.7rem; opacity: 0;
  transition: opacity 0.2s;
}
.nota-card:hover .nota-del { opacity: 1; }

.nota-colors { display: flex; gap: 6px; }
.nota-color-opt {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: border 0.15s;
}
.nota-color-opt.selected { border-color: var(--green-deep); }

.nota-form input,
.nota-form textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.nota-form input:focus,
.nota-form textarea:focus { outline: none; border-color: var(--green-bright); }

/* ══════════════════════════════════════════════════════
   TAREAS
   ══════════════════════════════════════════════════════ */
.tareas-list { display: flex; flex-direction: column; gap: 10px; }

.tarea-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  transition: box-shadow 0.2s;
}
.tarea-item:hover { box-shadow: var(--shadow-hover); }
.tarea-item.done  { opacity: 0.5; }

.tarea-check {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--green-bright);
  cursor: pointer; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; background: transparent;
}
.tarea-check.checked { background: var(--green-bright); border-color: var(--green-bright); }
.tarea-check.checked::after { content: '✓'; color: #fff; font-size: 0.7rem; font-weight: 700; }

.tarea-body { flex: 1; }
.tarea-title { font-weight: 600; font-size: 0.88rem; }
.tarea-title.done-text { text-decoration: line-through; }
.tarea-meta {
  font-size: 0.75rem; color: var(--text-muted);
  margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap;
}
.tarea-badge {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 700;
}
.badge-epi { background: #d4edda; color: #1a4a2e; }
.badge-sem { background: #cce5ff; color: #0d3d6b; }
.badge-his { background: #fff3cd; color: #5a3a00; }
.deadline-soon { color: #e05252; font-weight: 600; }

.tarea-del {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 1rem; padding: 4px;
  opacity: 0; transition: opacity 0.2s;
}
.tarea-item:hover .tarea-del { opacity: 1; }

/* ══════════════════════════════════════════════════════
   PERFIL
   ══════════════════════════════════════════════════════ */
.perfil-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media(max-width: 640px) { .perfil-card { grid-template-columns: 1fr; } }

.perfil-stat {
  background: var(--green-pale);
  border-radius: 14px; padding: 18px;
  text-align: center;
}
.perfil-stat .stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem; font-weight: 900;
  color: var(--green-mid);
}
.perfil-stat .stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* ══════════════════════════════════════════════════════
   MODALES
   ══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 28px;
  max-width: 440px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; margin-bottom: 16px;
  color: var(--green-deep);
}
[data-theme="dark"] .modal h3 { color: var(--green-light); }
.modal-close {
  float: right; background: none; border: none;
  font-size: 1.3rem; cursor: pointer; color: var(--text-muted);
  margin-top: -4px;
}

/* ─── SELECT en modales ─── */
.nota-form select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* ══════════════════════════════════════════════════════
   LOCK / MODO EDICIÓN
   ══════════════════════════════════════════════════════ */
.lock-overlay {
  position: fixed; inset: 0;
  background: rgba(10,30,15,0.92);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.lock-box {
  background: var(--bg-card);
  border-radius: 20px; padding: 32px;
  max-width: 340px; width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lock-icon { font-size: 2.5rem; margin-bottom: 12px; }
.lock-box h2 { font-family: 'Playfair Display', serif; margin-bottom: 8px; }
.lock-box p  { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 18px; }
.lock-input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 1rem;
  text-align: center; letter-spacing: 4px;
  margin-bottom: 12px;
}
.lock-error { color: #e05252; font-size: 0.82rem; margin-bottom: 8px; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media(max-width: 600px) {
  .header-info h1 { font-size: 1.2rem; }
  main { padding: 16px 12px 40px; }
}

/* ══════════════════════════════════════════════════════
   SCROLLBAR PERSONALIZADO
   ══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--green-pale); }
::-webkit-scrollbar-thumb { background: var(--green-light); border-radius: 3px; }
