/* AFASON - Navegación: menú lateral en computadora, barra superior e inferior en celular.
   Rukan - Orden y desarrollo a medida. Usa los tokens de app.css. */
:root { --sb: 236px; --tb: 58px; --bb: 62px; }

.sb { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sb); background: var(--bg); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 35; overflow-y: auto; }
.sb-head { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.sb-head .logo { width: 150px; }
.sb-head small { display: block; margin-top: 10px; font-size: 13px; color: var(--mute); }
.sb nav { padding: 12px 0; }
.sb a.sb-item { display: flex; align-items: center; gap: 12px; padding: 11px 22px 11px 19px; border-left: 3px solid transparent;
  color: var(--mute); text-decoration: none; font-size: 15px; }
.sb a.sb-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.sb a.sb-item:hover { color: var(--marino); background: var(--panel2); }
.sb a.sb-item.on { color: var(--primario); border-left-color: var(--acento); background: var(--acc-suave); font-weight: 700; }
.sb-pie { margin-top: auto; padding: 18px 22px 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sb-pie button { padding: 7px 12px; font-size: 13px; }
.prueba { font-size: 11px; font-weight: 700; padding: 3px 8px; border: 1px solid var(--line2); border-radius: var(--r); color: var(--mute); background: var(--panel2); }

body.con-sb { padding-left: var(--sb); }
.tb, .bb { display: none; }

@media (max-width: 900px) {
  body.con-sb { padding-left: 0; padding-top: var(--tb); padding-bottom: calc(var(--bb) + env(safe-area-inset-bottom, 0px)); }
  .sb { display: none; }
  .tb { display: flex; align-items: center; gap: 12px; position: fixed; top: 0; left: 0; right: 0; height: var(--tb); padding: 0 12px 0 14px;
    background: var(--bg); border-bottom: 1px solid var(--line); z-index: 34; }
  .tb .logo { height: 40px; width: auto; }
  .tb-sec { flex: 1; min-width: 0; color: var(--marino); font-family: var(--f-display); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tb .prueba { flex: none; }
  .tb button { padding: 6px 10px; font-size: 12px; }
  .bb { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0;
    height: calc(var(--bb) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bg); border-top: 1px solid var(--line); z-index: 34; }
  .bb a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none;
    color: var(--mute); font-size: 12px; border-top: 3px solid transparent; }
  .bb a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
  .bb a.on { color: var(--primario); border-top-color: var(--acento); font-weight: 700; }
  .wrap { padding: 18px 14px 8px; }
  .pie { padding: 16px 14px; margin-top: 24px; }
  h1 { font-size: 24px; }
  .toast { bottom: calc(var(--bb) + 16px); }
}
