/* =====================================================================
   Tema institucional UNISCJSA para Sneat (override sobre core.css)
   Paleta oficial (tema uniscjsa del SIGAU): verde selva #004418,
   rojo ladrillo #801e0e, acento verde #3f9706.
   ===================================================================== */

:root,
[data-bs-theme=light] {
  --bs-primary: #004418;
  --bs-primary-rgb: 0, 68, 24;
  --bs-primary-bg-subtle: #e0e9e3;
  --bs-primary-border-subtle: #ccdad1;
  --bs-primary-text-emphasis: #001b0a;
  --bs-link-color: #004418;
  --bs-link-color-rgb: 0, 68, 24;
  --bs-link-hover-color: #00561e;
  --bs-link-hover-color-rgb: 0, 86, 30;
}

[data-bs-theme=dark] {
  --bs-primary-text-emphasis: #6cbf94;
  --bs-primary-bg-subtle: #00160a;
  --bs-primary-border-subtle: #0b3d24;
  --bs-link-color: #6cbf94;
  --bs-link-color-rgb: 108, 191, 148;
}

.btn-primary {
  --bs-btn-bg: #004418;
  --bs-btn-border-color: #004418;
  --bs-btn-hover-bg: #00561e;
  --bs-btn-hover-border-color: #003814;
  --bs-btn-active-bg: #003814;
  --bs-btn-active-border-color: #003011;
  --bs-btn-disabled-bg: #004418;
  --bs-btn-disabled-border-color: #004418;
  --bs-btn-focus-shadow-rgb: 38, 105, 66;
}

.btn-outline-primary {
  --bs-btn-color: #004418;
  --bs-btn-border-color: #004418;
  --bs-btn-hover-bg: #004418;
  --bs-btn-hover-border-color: #004418;
  --bs-btn-active-bg: #004418;
  --bs-btn-active-border-color: #004418;
  --bs-btn-disabled-color: #004418;
  --bs-btn-disabled-border-color: #004418;
  --bs-btn-focus-shadow-rgb: 0, 68, 24;
}

.progress-bar { --bs-progress-bar-bg: var(--bs-primary); }

/* Acento institucional secundario (rojo ladrillo) */
.text-institucional { color: #801e0e !important; }
.bg-label-institucional {
  background-color: #f4e4e1 !important;
  color: #801e0e !important;
}

.app-brand-logo img { display: block; }

/* ============================ Login ============================ */
.auth-uniscjsa { background-color: #f2e9e7; min-height: 100vh; }
.auth-uniscjsa .card { border-top: 4px solid #004418; }

/* ===================== Lista de cursos hábiles ===================== */
.curso-item { cursor: pointer; border-left: 3px solid transparent; transition: background .15s; }
.curso-item:hover { background: var(--bs-primary-bg-subtle); }
.curso-item.seleccionado { border-left-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.curso-item.jalado { border-left-color: #b02a1a; }
.curso-item.jalado .curso-nombre { color: #801e0e; font-weight: 600; }
.curso-item .curso-nombre { font-size: .8125rem; }

/* ======================= Horario semanal ======================= */
.horario-wrap { overflow-x: auto; }
.horario { display: grid; min-width: 720px; border: 1px solid var(--bs-border-color); border-radius: .5rem; overflow: hidden; }
.horario-esquina, .horario-dia {
  background: #004418; color: #fff; font-weight: 600; font-size: .8125rem;
  text-align: center; padding: .5rem .25rem;
}
.horario-dia + .horario-dia { border-left: 1px solid rgba(255, 255, 255, .15); }
.horario-horas { position: relative; background: var(--bs-body-bg); border-right: 1px solid var(--bs-border-color); }
.horario-hora {
  box-sizing: border-box; border-top: 1px solid var(--bs-border-color);
  font-size: .6875rem; color: var(--bs-secondary-color); text-align: right; padding: 1px .375rem 0 0;
}
.horario-col { position: relative; background: var(--bs-body-bg); border-left: 1px solid var(--bs-border-color); }
.horario-linea { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--bs-border-color); }
.horario-evento {
  position: absolute; left: 3px; right: 3px; border-radius: .375rem; color: #fff;
  padding: .25rem .375rem; font-size: .6875rem; line-height: 1.25; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25); z-index: 2;
}

/* Cruce de horario aceptado: los eventos comparten la columna y se marcan */
.horario-evento-cruce { outline: 2px dashed #ffab00; outline-offset: -2px; }

/* ======================= Pipeline de estados ======================= */
.pipeline { display: flex; flex-wrap: wrap; gap: 0; align-items: center; }
.pipeline-paso { display: flex; align-items: center; gap: .5rem; }
.pipeline-punto {
  width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--bs-secondary-bg); color: var(--bs-secondary-color);
  font-weight: 700; font-size: .8125rem; border: 2px solid var(--bs-border-color);
}
.pipeline-paso.hecho .pipeline-punto { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.pipeline-paso.actual .pipeline-punto { border-color: var(--bs-primary); color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.pipeline-sep { flex: 1 1 2rem; min-width: 1.5rem; height: 2px; background: var(--bs-border-color); margin: 0 .5rem; }
.pipeline-paso.hecho + .pipeline-sep { background: var(--bs-primary); }
.pipeline-label { font-size: .75rem; }

/* ======================= Impresión (constancia) ======================= */
@media print {
  .no-print { display: none !important; }
  .layout-menu, .layout-navbar, .content-footer { display: none !important; }
  .layout-page { padding: 0 !important; }
  body { background: #fff !important; }
}
