/* ============================================================================
   tptk-shell.css · Shell del rediseño Booker (figuras de Sebas, ago 2026)
   ----------------------------------------------------------------------------
   Port literal del kit compartido de las 10 figuras (design/booker-redesign/):
   rail de iconos 64px + topbar (layout "opción 2") + Avisos + drawer.
   Los valores ad-hoc de las figuras viven aquí como tokens (tptk-brand.css)
   o, donde la figura clava un hex puntual, como el hex de la figura.

   El menú completo de la app (nav#sidebar, con TODOS los destinos: manual,
   changelog, tipos de cambio, etc.) se conserva como drawer off-canvas que
   abre el ☰ del rail — regla aditiva del rediseño.
   ========================================================================== */

body { background: var(--ds-bg); }

.app { display: grid; grid-template-columns: 64px 1fr; min-height: 100vh; }
@media (max-width: 767.98px) { .app { grid-template-columns: 1fr; } }

/* ── Rail de iconos (64px) ─────────────────────────────────────────────── */
.side {
  background: var(--ds-rail);
  flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 0; position: sticky; top: 0; height: 100vh; z-index: 30;
}
.ni {
  position: relative; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; color: var(--ds-rail-ink);
  cursor: pointer; border: 0; background: transparent; padding: 0;
  text-decoration: none;
}
/* tooltip: nombre completo al hover (attr(title), como en la figura) */
.ni::after {
  content: attr(title); position: absolute; left: calc(100% + 14px); top: 50%;
  transform: translateY(-50%); background: var(--ds-accent); color: #fff;
  font: 700 14px/1 var(--ds-font-sans); letter-spacing: -.01em;
  padding: 11px 15px; border-radius: 10px; white-space: nowrap; opacity: 0;
  pointer-events: none; transition: opacity .12s ease;
  box-shadow: 0 8px 20px -4px rgba(247, 52, 99, .45); z-index: 60;
}
.ni::before {
  content: ""; position: absolute; left: calc(100% + 6px); top: 50%;
  transform: translateY(-50%); border: 7px solid transparent;
  border-right-color: var(--ds-accent); opacity: 0; pointer-events: none;
  transition: opacity .12s ease; z-index: 60;
}
.ni:hover::after, .ni:hover::before { opacity: 1; }
.ni svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ni.active { background: rgba(255, 255, 255, .09); color: #fff; }
.ni:hover { color: #fff; background: var(--ds-accent); }
.ndiv { width: 26px; height: 1px; background: rgba(255, 255, 255, .08); margin: 8px 0; }
.menu-toggle { margin-bottom: 8px; }

/* ── Main + topbar ─────────────────────────────────────────────────────── */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  align-items: center; gap: 14px; padding: 12px 26px;
  background: var(--ds-topbar); border-bottom: 1px solid var(--ds-rule);
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 6px 16px -4px rgba(16, 16, 22, .18);
}
.brand { display: flex; align-items: center; padding-right: 2px; }
.brand .brand-word {
  font-family: Helvetica, Arial, sans-serif; font-size: 21px; font-weight: 800;
  letter-spacing: 1.5px; line-height: 1; color: #12161d; text-transform: uppercase;
}
.btn-red {
  background: var(--ds-accent); color: #fff; border: 0; border-radius: 9px;
  font: 600 13px/1 var(--ds-font-sans); padding: 11px 17px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(247, 52, 99, .35); white-space: nowrap;
}
.btn-red:hover { background: var(--ds-accent-2); color: #fff; }
.search {
  width: 280px; display: flex; align-items: center; gap: 8px;
  background: var(--ds-search-bg); border: 1px solid var(--ds-search-border);
  border-radius: 9px; padding: 9px 12px; color: var(--ds-ink-3);
  font-size: 12.5px; font-family: var(--ds-font-sans); cursor: pointer; text-align: left;
}
.search kbd {
  margin-left: auto; font: 600 10.5px/1 var(--ds-font-sans); background: #fff;
  border: 1px solid var(--ds-rule-2); border-radius: 4px; padding: 2px 5px;
  color: var(--ds-ink-3);
}
.tb-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar .breadcrumbs { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ds-ink-4); }
.topbar .breadcrumbs .mono { font-family: var(--ds-font-mono); font-size: 11.5px; }
.theme-btn {
  font: 600 12.5px/1 var(--ds-font-sans); background: #fff;
  border: 1px solid var(--ds-rule); color: var(--ds-ink-3); border-radius: 9px;
  padding: 9px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.userchip { display: flex; align-items: center; gap: 9px; cursor: pointer; text-decoration: none; color: inherit; }
.userchip .av { width: 32px; height: 32px; border-radius: 50%; background: #2b2b33; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.userchip .nm { font-size: 13px; font-weight: 600; color: var(--ds-ink); }
.userchip .role { font-size: 11px; color: var(--ds-ink-4); }

/* ── Avisos (fijo en el header) ────────────────────────────────────────── */
.av-wrap { position: relative; display: flex; align-items: center; padding-left: 14px; margin-left: 2px; border-left: 1px solid var(--ds-rule-2); }
.av-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid #dfe1e7; border-radius: 999px; background: #fff; cursor: pointer; font-family: var(--ds-font-sans); }
.av-btn__label { font-size: 12px; font-weight: 600; line-height: 1.2; color: #12161d; white-space: nowrap; }
.av-btn svg { stroke: #5b6273; fill: none; }
.av-btn:hover, .av-btn[aria-expanded="true"] { background: #eceef2; border-color: #c9ccd4; }
.av-btn:hover svg, .av-btn[aria-expanded="true"] svg { stroke: #12161d; }
.av-count { min-width: 22px; height: 19px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--ds-alert-2); font-size: 11px; font-weight: 700; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.av-count[hidden] { display: none; }
.av-pop { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 340px; display: none; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #dfe1e7; border-radius: 14px; box-shadow: 0 18px 34px -14px rgba(16, 16, 18, .38); font-family: var(--ds-font-sans); }
.av-wrap.open .av-pop { display: flex; }
.av-pop__head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #eceef2; }
.av-pop__badge { min-width: 38px; height: 26px; padding: 0 9px; display: grid; place-items: center; flex: none; border-radius: 999px; background: var(--ds-alert-2); font-size: 13px; font-weight: 700; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.av-pop__title { flex: 1; font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; color: #12161d; }
.av-pop__action { flex: none; white-space: nowrap; font-size: 11px; font-weight: 600; color: #5b6273; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; }
.av-list { max-height: 440px; overflow: auto; padding-bottom: 6px; }
.av-day { padding: 12px 16px 5px; font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--ds-alert); }
.av-row { display: flex; align-items: baseline; gap: 12px; padding: 5px 16px; text-decoration: none; }
.av-row:hover { background: #f4f5f8; }
.av-row__time { width: 34px; flex: none; text-align: right; font-size: 11.5px; font-weight: 500; line-height: 1.35; color: #8b92a1; font-variant-numeric: tabular-nums; }
.av-row__text { flex: 1; min-width: 0; font-size: 12px; line-height: 1.35; color: #5b6273; }
.av-row__who { font-weight: 700; color: #12161d; }
.av-pop__foot { text-align: center; padding: 8px 0 12px; border-top: 1px solid var(--ds-rule); margin-top: 6px; }
.av-pop__foot a { font-size: 12px; font-weight: 600; color: #5b6273; text-decoration: none; }
.av-pop__foot a:hover { color: #12161d; }
.av-empty { padding: 18px 16px; font-size: 12px; color: #8b92a1; text-align: center; }

/* ── Contenido ─────────────────────────────────────────────────────────── */
.content { padding: 24px 26px 40px; max-width: 1500px; width: 100%; min-width: 0; }
.pagehead .t { font-size: 29px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.pagehead .sub { font-size: 13.5px; color: var(--ds-ink-3); margin: 4px 0 0; }

/* ── Drawer: el menú completo (nav#sidebar) off-canvas en TODOS los anchos.
   Reutiliza la mecánica mobile existente (.mobile-open + overlay). ───────── */
#sidebar {
  position: fixed; top: 0; left: -260px; bottom: 0; z-index: 1050;
  height: 100vh; overflow-y: auto; transition: left .25s ease;
}
#sidebar.mobile-open { left: 0; }
#sidebarOverlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 1045; }
#sidebarOverlay.active { display: block; }
