/* Panel de Shiba Hogar. Fuente del sistema (sin descargas). Azul profundo y celeste sobre blanco. Primero celular. */
:root {
  --azul: #123b82;
  --azul-osc: #0b2a63;
  --celeste: #2db4ec;
  --celeste-suave: #e7f5fd;
  --celeste-medio: #bfe5f8;
  --tinta: #10233f;
  --gris: #5a6b82;
  --linea: #d8e2ee;
  --fondo: #ffffff;
  --rojo: #c4271f;
  --rojo-suave: #fdeceb;
  --ambar: #8a5a00;
  --ambar-suave: #fff1cf;
  --verde: #14784a;
  --verde-suave: #e3f5ec;
  --f-cuerpo: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  --f-titulo: "Bahnschrift", "Segoe UI Semibold", "Arial Narrow", Arial, sans-serif;
  --radio: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
img { max-width: 100%; }
#raiz { height: 100%; }
body { margin: 0; font-family: var(--f-cuerpo); font-size: 16px; line-height: 1.45; color: var(--tinta); background: var(--fondo); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: var(--azul); }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 2px; }

.carga { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 100; background: transparent; overflow: hidden; pointer-events: none; }
.carga.activa::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--celeste); animation: corre 1s ease-in-out infinite; }
@keyframes corre { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .carga.activa::after { animation: none; width: 100%; } }
.arranque { padding: 40px 16px; text-align: center; color: var(--gris); }

/* Logo recortado del archivo oficial */
.logo { --k: 1; width: calc(150px * var(--k)); height: calc(74px * var(--k)); background: url(/img/logo-shiba-hogar.png) no-repeat; background-size: calc(182px * var(--k)) auto; background-position: calc(-16px * var(--k)) calc(-54px * var(--k)); flex: none; }
.logo-grande { --k: 1.5; }

/* Mensajes flotantes */
.flotantes { position: fixed; z-index: 90; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.flotante { pointer-events: auto; box-shadow: 0 4px 14px rgba(11, 42, 99, .35); display: flex; align-items: center; gap: 12px; max-width: 520px; width: 100%; padding: 12px 14px; border-radius: var(--radio); background: var(--azul-osc); color: #fff; font-weight: 600; }
.flotante.error { background: var(--rojo); }
.flotante-accion { margin-left: auto; background: none; border: 0; color: var(--celeste-medio); font-weight: 700; text-decoration: underline; padding: 4px; }
.flotante-cerrar { background: none; border: 0; color: inherit; padding: 4px; display: grid; place-items: center; opacity: .8; }
.flotante-accion + .flotante-cerrar { margin-left: 0; }
.flotante span:first-child { flex: 1; }
@media (min-width: 900px) { .flotantes { bottom: 20px; left: 262px; right: auto; width: 336px; justify-items: start; } }

/* Botones y campos */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 2px solid var(--azul); background: var(--azul); color: #fff; font-weight: 700; border-radius: var(--radio); text-decoration: none; }
.boton:hover:not(:disabled) { background: var(--azul-osc); border-color: var(--azul-osc); }
.boton.suave { background: #fff; color: var(--azul); }
.boton.suave:hover:not(:disabled) { background: var(--celeste-suave); }
.boton.grande { min-height: 52px; font-size: 1.1rem; padding: 10px 26px; }
.boton.icono { padding: 8px 12px; min-width: 44px; }
.boton.centrado { display: flex; margin: 8px auto; }
.boton:disabled { opacity: .45; cursor: not-allowed; }
.campo { width: 100%; min-height: 44px; padding: 9px 12px; border: 2px solid var(--linea); border-radius: var(--radio); background: #fff; }
.campo:focus { border-color: var(--celeste); outline: none; }
textarea.campo { resize: vertical; }
.campo.corto { width: 120px; }
select.campo.corto { width: 190px; }
.fila-campo { display: grid; gap: 6px; }
.etiqueta { font-weight: 700; font-size: .9rem; color: var(--azul); }
.error-form { color: var(--rojo); font-weight: 600; font-size: .95rem; }
.ayuda { color: var(--gris); font-size: .93rem; }
.ayuda.fuerte { color: var(--tinta); font-size: 1rem; }
.ayuda.centrado, .centrado { text-align: center; }
.enlace { font-weight: 700; }
.fila-botones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.linea-estado { margin-top: 10px; padding: 10px 12px; border-radius: var(--radio); font-weight: 600; }
.linea-estado.ok { background: var(--verde-suave); color: var(--verde); }
.linea-estado.error { background: var(--rojo-suave); color: var(--rojo); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 11px; white-space: nowrap; font-size: .78rem; font-weight: 700; background: var(--celeste-suave); color: var(--azul); }
.chip.espera { background: var(--ambar-suave); color: var(--ambar); }
.chip.vencido { background: var(--rojo-suave); color: var(--rojo); }
.chip.persona { background: var(--azul); color: #fff; }
.chip.bot { background: var(--celeste-suave); color: var(--azul); }
.insignia { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--celeste); color: var(--azul-osc); font-size: .72rem; font-weight: 800; }
.insignia.fija { margin-left: auto; }
.frena { color: var(--rojo); }

/* Ingreso */
.ingreso { min-height: 100%; display: grid; align-content: start; background: #fff; }
.ingreso-franja { height: 14px; background: linear-gradient(90deg, var(--azul) 0 70%, var(--celeste) 70%); }
.ingreso-caja { width: min(100%, 460px); margin: 0 auto; padding: 36px 20px 48px; display: grid; gap: 22px; }
.ingreso-marca { display: grid; gap: 4px; justify-items: start; }
.ingreso-sub { font-family: var(--f-titulo); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--azul); }
.ingreso-titulo { font-family: var(--f-titulo); font-weight: 700; font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.02; color: var(--azul-osc); font-variation-settings: "wdth" 85; }
.ingreso-form { display: grid; gap: 16px; }
@media (min-width: 900px) { .ingreso { background: var(--celeste-suave); } .ingreso-caja { margin-top: 6vh; padding: 48px; background: #fff; border-top: 6px solid var(--azul); } }

/* Marco */
.marco { height: 100%; display: flex; flex-direction: column; }
.franja-demo { background: var(--ambar-suave); color: var(--ambar); text-align: center; font-size: 13px; line-height: 20px; padding: 4px 12px; border-bottom: 2px solid #e8b53a; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuerpo { flex: 1; min-height: 0; display: flex; }
.columna { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.superior { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 48px; padding: 0 14px; background: var(--azul); border-bottom: 3px solid var(--celeste); }
.superior-marca { display: flex; align-items: center; gap: 10px; }
.superior-isotipo { height: 24px; width: auto; display: block; }
.superior-marca { font-family: var(--f-titulo); font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: .02em; font-variation-settings: "wdth" 90; }
.conexion { color: #fff; font-size: .82rem; background: var(--ambar); padding: 3px 10px; border-radius: 99px; }
.vista { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; outline: none; }
.inferior { flex: none; display: flex; background: var(--azul-osc); padding-bottom: env(safe-area-inset-bottom); }
.nav-mov { flex: 1; position: relative; display: grid; justify-items: center; gap: 2px; padding: 9px 2px 8px; color: #b9cdf0; text-decoration: none; font-size: .72rem; font-weight: 600; border-top: 4px solid transparent; }
.nav-mov.activo { color: #fff; border-top-color: var(--celeste); }
.nav-mov .insignia { position: absolute; top: 3px; left: 52%; }
.lateral { display: none; }
.pantalla { padding: 18px 16px 28px; max-width: 1180px; margin: 0 auto; }
.titulo-pantalla { font-family: var(--f-titulo); font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 700; line-height: 1; color: var(--azul-osc); font-variation-settings: "wdth" 85; }
.vacio, .vacio-simple { padding: 28px 16px; text-align: center; color: var(--gris); }
.vacio { display: grid; gap: 10px; justify-items: center; }

@media (min-width: 900px) {
  .lateral { display: flex; flex-direction: column; width: 250px; flex: none; background: var(--azul); color: #fff; }
  .lateral-logo { padding: 22px 24px 20px; border-bottom: 6px solid var(--celeste); background: var(--azul-osc); }
  .logo-claro { display: block; width: 160px; height: auto; }
  .lateral-nav { display: grid; padding: 16px 0; flex: 1; align-content: start; }
  .nav-lat { display: flex; align-items: center; gap: 12px; padding: 13px 22px; color: #cfe0fb; text-decoration: none; font-weight: 600; border-left: 6px solid transparent; }
  .nav-lat:hover { background: rgba(255, 255, 255, .08); }
  .nav-lat.activo { background: var(--azul-osc); color: #fff; border-left-color: var(--celeste); }
  .nav-lat .insignia { margin-left: auto; }
  .lateral-pie { padding: 16px 22px 22px; border-top: 1px solid rgba(255, 255, 255, .18); display: grid; gap: 2px; }
  .lateral-quien { font-weight: 700; }
  .lateral-rol { color: #b9cdf0; font-size: .85rem; margin-bottom: 8px; }
  .boton-lateral { display: inline-flex; align-items: center; gap: 8px; background: none; border: 2px solid rgba(255, 255, 255, .4); color: #fff; border-radius: var(--radio); padding: 8px 14px; font-weight: 600; justify-self: start; }
  .boton-lateral:hover { background: rgba(255, 255, 255, .12); }
  .superior, .inferior { display: none; }
  .superior .conexion { display: none; }
  .pantalla { padding: 28px 32px 40px; }
}

/* Más */
.mas-lista { display: grid; margin-top: 14px; border-top: 1px solid var(--linea); }
.mas-fila { display: flex; align-items: center; gap: 16px; padding: 18px 4px; border: 0; border-bottom: 1px solid var(--linea); background: none; text-align: left; text-decoration: none; color: var(--tinta); width: 100%; }
.mas-fila div { display: grid; }
.mas-fila span { color: var(--gris); font-size: .9rem; }
.mas-fila .ico { color: var(--azul); }

/* Íconos de cada tipo de aviso: el color dice qué clase de cosa es */
.tipo-icono { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--celeste-suave); color: var(--azul); }
.tipo-icono.c-rojo { background: var(--rojo-suave); color: var(--rojo); }
.tipo-icono.c-ambar { background: var(--ambar-suave); color: var(--ambar); }
.tipo-icono.c-verde { background: var(--verde-suave); color: var(--verde); }
.tipo-icono.c-azul { background: var(--celeste-suave); color: var(--azul); }
.tipo-icono.c-gris { background: #eef1f5; color: var(--gris); }

/* Estado vacío: dice qué va a aparecer y qué hacer mientras tanto */
.vacio-caja { display: grid; justify-items: start; gap: 10px; max-width: 520px; padding: 28px 0; }
.vacio-icono { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--celeste-suave); color: var(--azul); }
.vacio-titulo { font-family: var(--f-titulo); font-size: 1.5rem; line-height: 1.1; color: var(--azul-osc); font-variation-settings: "wdth" 88; }
.vacio-texto { color: var(--gris); }
.vacio-caja .boton { margin-top: 6px; }
.lista-vacia .vacio-caja { justify-items: center; text-align: center; padding: 36px 20px; }
.boton-secundario { min-height: 44px; padding: 6px 16px; border: 2px solid rgba(255, 255, 255, .6); background: transparent; color: #fff; font-weight: 700; border-radius: var(--radio); }
.boton-secundario:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
