:root {
  --azul: #2f6fa8;
  --azul-oscuro: #1f4d76;
  --gris-claro: #f4f6f8;
  --borde: #d7dde3;
  --naranja: #e8890c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Segoe UI, Arial, sans-serif;
  background: var(--gris-claro);
  color: #222;
}

.cargando-inicial {
  padding: 3rem;
  text-align: center;
  font-size: 1.2rem;
  color: #666;
}

#blazor-error-ui {
  display: none;
  background: #fff3cd;
  border-top: 3px solid #e8b400;
  bottom: 0;
  box-shadow: 0 -1px 8px rgba(0,0,0,.2);
  left: 0;
  padding: 0.9rem 1.2rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

.app-shell { display: flex; min-height: 100vh; }

.barra-lateral {
    width: 220px;
    background: var(--azul-oscuro);
    color: white;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.btn-hamburguesa {
    display: none;
}

.overlay-menu {
    display: none;
}

/* Solo en pantallas chicas (celular/tablet) se activa el modo desplegable */
@media (max-width: 768px) {
    .btn-hamburguesa {
        display: block;
        position: fixed;
        top: 0.8rem;
        left: 0.8rem;
        z-index: 1100;
        background: var(--azul-oscuro);
        color: white;
        border: none;
        font-size: 1.3rem;
        width: 42px;
        height: 42px;
        border-radius: 6px;
        cursor: pointer;
    }

    .barra-lateral {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

        .barra-lateral.menu-abierto {
            transform: translateX(0);
        }

    .overlay-menu {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1040;
    }

    .contenido-principal {
        padding-top: 4.2rem;
    }
}
.barra-lateral h3 { margin-top: 0; font-size: 1.1rem; }
.barra-lateral nav a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 0.6rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.3rem;
}
.barra-lateral nav a:hover, .barra-lateral nav a.activo {
  background: var(--azul);
}
.barra-lateral .usuario-info {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.2);
  font-size: 0.85rem;
}
.btn-cerrar-sesion {
  margin-top: 0.8rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,.5);
  color: white;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.btn-cerrar-sesion:hover { background: rgba(255,255,255,.15); }

.contenido-principal { flex: 1; padding: 2rem; max-width: 1100px; }

.tarjeta-login {
  max-width: 380px;
  margin: 4rem auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.tarjeta-login h2 { margin-top: 0; color: var(--azul-oscuro); text-align: center; }

.campo { margin-bottom: 1rem; }
.campo label { display: block; margin-bottom: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.campo input, .campo select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--borde);
  border-radius: 6px;
  font-size: 1rem;
}

.btn-principal {
  background: var(--azul);
  color: white;
  border: none;
  padding: 0.65rem 1.3rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}
.btn-principal:hover { background: var(--azul-oscuro); }
.btn-principal:disabled { background: #a9b7c2; cursor: not-allowed; }

.mensaje-error { color: #b3261e; margin-top: 0.6rem; font-size: 0.9rem; }
.mensaje-exito { color: #1e7d34; margin-top: 0.6rem; font-size: 0.9rem; }

.cartel-aviso {
  background: #fff4e0;
  border: 1px solid var(--naranja);
  border-left: 6px solid var(--naranja);
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  margin-bottom: 1.3rem;
  font-size: 0.95rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.cartel-aviso .icono { font-size: 1.3rem; line-height: 1; }

table.tabla-app {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin-bottom: 1.5rem;
}
table.tabla-app th, table.tabla-app td {
  border: 1px solid var(--borde);
  padding: 0.6rem 0.7rem;
  text-align: left;
  font-size: 0.92rem;
}
table.tabla-app th { background: var(--azul); color: white; }
table.tabla-app tr:nth-child(even) td { background: #fafbfc; }

.fila-bloqueada td { background: #f0f0f0 !important; color: #888; }
.nota-bloqueado { font-size: 0.78rem; color: #b3261e; display: block; margin-top: 0.2rem; }

h2.titulo-seccion { color: var(--azul-oscuro); }
