/* ===== LOGIN CSS ===== */

.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;

background:
  linear-gradient(120deg, rgba(89, 0, 31, 0.88), rgba(125, 0, 45, 0.72)),
  url("/img/escuela.jpg") center center / 520px auto no-repeat,
  linear-gradient(180deg, #fff7fa 0%, #ffffff 100%);
}

.login-shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 30px 80px rgba(89, 0, 31, 0.22);
}

.login-visual {
  position: relative;
  padding: 48px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;

  background: url("/img/escuela.jpg") center / cover no-repeat;

  filter: blur(2px);
  transform: scale(1.1); /* evita bordes feos del blur */

  z-index: 1;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    135deg,
    rgba(89, 0, 31, 0.85),
    rgba(125, 0, 45, 0.75)
  );

  z-index: 2;
}
.login-visual > * {
  position: relative;
  z-index: 3;
}

.login-visual h2 {
  font-size: 2.5rem;
  margin: 0 0 10px;
}

.login-visual p {
  color: rgba(255,255,255,0.8);
}

.login-card {
  padding: 40px;
  background: rgba(255,255,255,0.96);
  text-align: center;
}

.login-logo {
  width: 80px;
  margin-bottom: 10px;
}

.login-card h1 {
  color: #7a001f;
  margin: 10px 0;
}

.login-card p {
  color: #666;
  margin-bottom: 20px;
}

.login-card input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #f5f7fa;
}

.login-card button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 25px;
  background: #7a001f;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.login-card button:hover {
  background: #a0002a;
}

.alert.error {
  background: #ffdede;
  color: #900;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.login-footer {
  margin-top: 15px;
  font-size: 0.85rem;
  color: #777;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }
}

/* =====================================================
   SISTEMA INTERNO
   ===================================================== */

:root {
  --vino: #7d002d;
  --vino-oscuro: #59001f;
  --vino-claro: #9b1745;
  --fondo: #fbf7f9;
  --blanco: #ffffff;
  --texto: #1f2937;
  --gris: #6b7280;
  --borde: #eadde2;
  --sombra: 0 18px 45px rgba(89, 0, 31, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, var(--fondo), #ffffff);
  color: var(--texto);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(94%, 1240px);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

/* HEADER SISTEMA */
.app-header {
  background: var(--vino-oscuro);
  color: #fff;
  padding: 0.9rem min(4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 12px 30px rgba(89, 0, 31, 0.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand span {
  display: block;
  font-size: 0.86rem;
  opacity: 0.78;
}

.app-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-weight: 700;
}

.app-header nav a {
  opacity: 0.92;
}

.app-header nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* PANEL PRINCIPAL */
.hero-panel {
  background: linear-gradient(135deg, var(--vino), var(--vino-oscuro));
  color: #fff;
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: var(--sombra);
  margin-bottom: 1.5rem;
}

.hero-panel h1,
.page-title h1 {
  margin: 0 0 0.5rem;
}

.hero-panel p,
.page-title p {
  margin: 0;
  opacity: 0.78;
}

.page-title {
  margin-bottom: 1.4rem;
}

.page-title h1 {
  color: var(--vino-oscuro);
  font-size: clamp(1.8rem, 4vw, 3rem);
}

/* TARJETAS */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.card,
.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--borde);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--sombra);
}

.card span {
  color: var(--gris);
  font-weight: 700;
}

.card strong {
  display: block;
  margin-top: 0.5rem;
  color: var(--vino-oscuro);
  font-size: 2.4rem;
}

.panel {
  margin-bottom: 1.4rem;
}

.panel h2 {
  margin-top: 0;
  color: var(--vino-oscuro);
}

/* FORMULARIOS */
label {
  display: block;
  font-weight: 700;
  color: var(--vino-oscuro);
  margin: 0.7rem 0 0.35rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--borde);
  border-radius: 14px;
  font: inherit;
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(125, 0, 45, 0.55);
  box-shadow: 0 0 0 4px rgba(125, 0, 45, 0.08);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--vino);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background: var(--vino-oscuro);
  transform: translateY(-1px);
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}

.grid-form .full {
  grid-column: 1 / -1;
}

.grid-form button {
  width: auto;
  min-width: 220px;
}

/* TABLAS */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 0.9rem;
  border-bottom: 1px solid var(--borde);
  text-align: left;
}

th {
  color: var(--vino-oscuro);
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--vino-suave, #f6e9ee);
  color: var(--vino-oscuro);
  font-weight: 800;
  font-size: 0.82rem;
}

/* ALERTAS */
.alert {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  margin: 1rem 0;
  font-weight: 700;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    text-align: center;
  }

  .cards,
  .grid-form {
    grid-template-columns: 1fr;
  }

  .grid-form .full {
    grid-column: auto;
  }
}

/* BOTÓN SECUNDARIO */

.btn-secondary {
  display: block;
  margin-top: 12px;
  text-align: center;
  padding: 12px;
  border-radius: 25px;

  background: transparent;
  border: 2px solid #7a001f;
  color: #7a001f;

  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}

.btn-secondary:hover {
  background: #7a001f;
  color: #fff;
}

/* ===== RESERVA LABORATORIO - TABLA SEMANAL ===== */

.schedule-wrap {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.schedule-table th {
  background: #7d002d;
  color: #fff;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.schedule-table th span {
  display: block;
  font-size: 0.78rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}

.schedule-table td {
  border-bottom: 1px solid #eadde2;
  border-right: 1px solid #eadde2;
  padding: 0.65rem;
  vertical-align: middle;
  background: #fff;
}

.schedule-hour {
  font-weight: 800;
  color: #59001f;
  background: #f6e9ee !important;
  white-space: nowrap;
  text-align: center;
}

.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 82px;
  border-radius: 16px;
  text-align: center;
  padding: 0.7rem;
  font-weight: 800;
}

.slot-free {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
  transition: 0.2s ease;
}

.slot-free:hover {
  background: #166534;
  color: #fff;
  transform: translateY(-2px);
}

.slot-busy {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.slot-busy span {
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

.slot-busy small {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.85;
}
.delete-reserva-form {
  margin-top: 8px;
}

.btn-delete-small {
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0;
  background: #991b1b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-delete-small:hover {
  background: #7f1d1d;
}
.acciones-usuarios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-edit-small,
.btn-state-small,
.btn-delete-small,
.btn-secondary-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 0;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.btn-edit-small {
  background: #e0f2fe;
  color: #075985;
}

.btn-state-small {
  background: #fef3c7;
  color: #92400e;
}

.btn-delete-small {
  background: #fee2e2;
  color: #991b1b;
}

.btn-secondary-admin {
  width: fit-content;
  margin-top: 1rem;
  background: #f3f4f6;
  color: #374151;
}

.btn-edit-small:hover,
.btn-state-small:hover,
.btn-delete-small:hover,
.btn-secondary-admin:hover {
  filter: brightness(0.95);
}.grid-3{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap:20px;
  margin:20px 0;
}

.card{
  background:#fff;
  padding:20px;
  border-radius:16px;
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

.badge{
  display:inline-block;
  padding:6px 12px;
  border-radius:20px;
  font-size:0.8rem;
  font-weight:bold;
}

.badge.green{
  background:#d4f8e8;
  color:#0a7a4f;
}

.badge.red{
  background:#ffdede;
  color:#a0002a;
}
.badge-green {
  background: #dcfce7;
  color: #166534;
}

.badge-red {
  background: #fee2e2;
  color: #991b1b;
}