/* SELECEN – estilos del panel de administración */
:root {
  --azul: #263766; --azul-oscuro: #141D40; --azul-medio: #34477F;
  --turquesa: #0E7C86; --turquesa-oscuro: #0A5D65; --turquesa-fondo: #E5F2F3;
  --texto: #0F1B2A; --texto-2: #3B4A5B; --texto-3: #4A5868;
  --borde: #DDE5EA; --fondo: #F2F6F8; --campo: #B9C7D2;
}
* , *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--texto); background: var(--fondo); line-height: 1.5; }
h1, h2 { font-family: Manrope, Inter, sans-serif; color: var(--azul); margin: 0; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
a { color: var(--turquesa); }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* Estructura */
.panel { display: flex; min-height: 100vh; flex-wrap: wrap; }
.lateral { width: 250px; flex: 0 0 250px; background: var(--azul); color: #CDD4E8; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.lateral-marca { display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
.lateral-marca img { height: 44px; width: auto; }
.lateral-marca span { font-size: 12px; color: #B4BEDB; }
.lateral nav { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.lateral nav a { color: #CDD4E8; text-decoration: none; padding: 12px; border-radius: 8px; }
.lateral nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.lateral nav a[aria-current="page"] { background: var(--azul-medio); color: #fff; font-weight: 600; }
.lateral-pie { margin-top: auto; padding: 12px; border-top: 1px solid #3A4B82; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.lateral-pie span { color: #fff; font-weight: 500; word-break: break-all; }
.lateral-pie a { color: #9FE0E2; }
.lateral-pie .enlace { color: #CDD4E8; }
.principal { flex: 1 1 600px; min-width: 0; padding: 32px 40px; }
@media (max-width: 760px) {
  .lateral { width: 100%; flex-basis: 100%; gap: 16px; }
  .lateral nav { flex-direction: row; flex-wrap: wrap; }
  .principal { padding: 24px 16px; }
}

.titulo-pagina { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.botones { display: flex; flex-wrap: wrap; gap: 10px; }
.caja { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 22px; margin: 0; }
fieldset.caja { display: flex; flex-direction: column; gap: 12px; }
legend { font-size: 13px; font-weight: 600; color: var(--texto-2); padding: 0 4px; }
.vacio { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--texto-3); }

/* Botones y campos */
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.boton-primario { background: var(--turquesa); color: #fff; }
.boton-primario:hover { background: var(--turquesa-oscuro); color: #fff; }
.boton-contorno { background: #fff; color: var(--texto); border-color: var(--campo); font-weight: 500; }
.boton-contorno:hover { border-color: var(--azul); }
.ancho { width: 100%; min-height: 50px; font-size: 16px; }
.enlace { background: none; border: 0; padding: 0; font: inherit; color: var(--turquesa); cursor: pointer; text-decoration: underline; }
.peligro { color: #B42318; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.campo input[type="text"], .campo input[type="email"], .campo input[type="password"], .campo input[type="date"], .campo input[type="time"], .campo textarea {
  font: inherit; font-size: 15px; min-height: 46px; padding: 10px 14px; border: 1px solid var(--campo); border-radius: 8px; color: var(--texto); background: #fff; width: 100%;
}
.campo textarea { line-height: 1.6; resize: vertical; min-height: 320px; }
.campo input:focus, .campo textarea:focus { outline: 2px solid var(--turquesa); outline-offset: 1px; border-color: var(--turquesa); }
.ayuda { font-size: 13px; color: var(--texto-3); }
.aviso { border-radius: 10px; padding: 12px 16px; font-size: 14px; margin: 0 0 16px; }
.aviso p { margin: 0; }
.aviso-ok { background: #E6F4EA; color: #1E5B2E; }
.aviso-error { background: #FDECEC; color: #8A1C1C; }

/* Editor */
.editor-columnas { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.editor-principal { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.editor-lateral { flex: 0 1 320px; min-width: 260px; display: flex; flex-direction: column; gap: 16px; }
.editor-columnas > form.caja { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
.editor-columnas > form.caja h2 { margin: 0; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion { flex: 1 1 90px; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1px solid var(--campo); border-radius: 8px; font-size: 14px; cursor: pointer; }
.opcion:has(input:checked) { border: 2px solid var(--turquesa); background: var(--turquesa-fondo); font-weight: 600; }
.opcion-simple { font-size: 14px; display: flex; gap: 8px; align-items: center; }
.miniatura { width: 100%; border-radius: 8px; max-height: 180px; object-fit: cover; }

/* Tablas */
.tabla-caja { padding: 0; overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--texto-3); padding: 12px 16px; border-bottom: 1px solid var(--borde); font-weight: 600; }
.tabla td { padding: 14px 16px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.titulo-fila { color: var(--azul); font-weight: 600; text-decoration: none; }
.acciones-fila { white-space: nowrap; text-align: right; }
.acciones-fila a, .acciones-fila form { display: inline-block; margin-left: 12px; }
.estado { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.estado-publicado { background: #E6F4EA; color: #1E5B2E; }
.estado-borrador { background: #EEF1F4; color: var(--texto-3); }

/* Login / instalación */
.acceso { display: flex; min-height: 100vh; flex-wrap: wrap; background: #fff; }
.acceso-imagen { position: relative; flex: 1 1 420px; min-height: 240px; background: var(--azul); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.acceso-imagen .fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.acceso-imagen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,43,88,.6), rgba(30,43,88,.95)); }
.acceso-imagen .logo, .acceso-imagen p { position: relative; z-index: 1; }
.acceso-imagen .logo { height: 58px; width: auto; }
.acceso-imagen p { margin: 0; font-family: Manrope, Inter, sans-serif; font-size: 32px; font-weight: 800; }
.acceso-formulario { flex: 1 1 460px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.tarjeta-acceso { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.volver { text-align: center; font-size: 14px; color: var(--texto-3); }

/* Contraseña temporal (se muestra una sola vez) */
.aviso-clave { background: #FFF8EA; color: #5A3E0C; border: 1.5px solid #E0A23A; display: flex; flex-direction: column; gap: 8px; }
.clave-temporal { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: 1px; color: var(--azul); background: #fff; border-radius: 8px; padding: 10px 14px; user-select: all; }
.campo select { font: inherit; font-size: 15px; min-height: 46px; padding: 0 12px; border: 1px solid var(--campo); border-radius: 8px; background: #fff; }
.olvido { font-size: 13px; color: var(--texto-3); text-align: center; }
