/* ═══════════════════════════════════════════════════════════
   SHELL v2 — barra superior unificada (sin sidebar)
   Perfiles de color: Azul Bohn (default) · Verde sepia
═══════════════════════════════════════════════════════════ */

/* ── Perfil Azul Bohn ── */
:root,
html[data-palette="bohn"] {
  --v2-bg: #F8FAFD;
  --v2-bg-soft: #F0F5FA;
  --v2-bg-muted: #E4ECF3;
  --v2-surface: #FFFFFF;
  --v2-surface-hover: #FFFFFF;
  --v2-input-bg: #FFFFFF;
  --v2-blue-900: #1A3347;
  --v2-blue-700: #2A4A66;
  --v2-blue-600: #3D6280;
  --v2-blue-500: #4A7394;
  --v2-blue-400: #5A8499;
  --v2-blue-200: #B4C9DC;
  --v2-blue-100: #D4E2ED;
  --v2-blue-soft: #E8EEF4;
  --v2-accent-solid: #1A3347;
  --v2-accent-solid-fg: #FFFFFF;
  --v2-stat-total: #1A3347;
  --v2-stat-completas: #4A7394;
  --v2-stat-canceladas: #5A8499;
  --v2-stat-articulos: #B4C9DC;
  --v2-stat-articulos-text: #1A3347;
  --v2-stat-articulos-sub: #2A4A66;
  --v2-badge-done-bg: #E8EEF4;
  --v2-badge-done-text: #2A4A66;
  --v2-badge-cancel-bg: #F5E0E0;
  --v2-badge-cancel-text: #8B3A3A;
  --v2-row-bg: var(--v2-surface);
  --v2-row-hover: var(--v2-surface-hover);
  --v2-row-folio: var(--v2-blue-900);
  --v2-row-muted: var(--muted);
  --v2-filter-active-bg: #E8EEF4;
  --v2-filter-active-border: #B4C9DC;
  --v2-filter-active-text: #1A3347;
  --v2-filter-inactive-bg: #FFFFFF;
  --v2-filter-inactive-border: #E4ECF3;
  --v2-filter-dot-idle: #D4E2ED;
  --v2-filter-dot-ring: #1A3347;
  --v2-filter-dot-fill: #1A3347;
}

/* ── Perfil Verde sepia (crema + verdes del portal original) ── */
html[data-palette="sepia"] {
  --v2-bg: #F5F2EA;
  --v2-bg-soft: #F0EBE0;
  --v2-bg-muted: #EBE4D6;
  --v2-surface: #FFFFFF;
  --v2-surface-hover: #FFFFFF;
  --v2-input-bg: #FFFFFF;
  --v2-blue-900: #1A3D35;
  --v2-blue-700: #2F5D50;
  --v2-blue-600: #457A68;
  --v2-blue-500: #5A8F7A;
  --v2-blue-400: #6B9685;
  --v2-blue-200: #B8D4C8;
  --v2-blue-100: #D4E8DE;
  --v2-blue-soft: #E6F0EB;
  --v2-accent-solid: #1A3D35;
  --v2-accent-solid-fg: #FFFFFF;
  --v2-stat-total: #1A3D35;
  --v2-stat-completas: #5A8F7A;
  --v2-stat-canceladas: #6B9685;
  --v2-stat-articulos: #B8D4C8;
  --v2-stat-articulos-text: #1A3D35;
  --v2-stat-articulos-sub: #2F5D50;
  --v2-badge-done-bg: #E6F0EB;
  --v2-badge-done-text: #2F5D50;
  --v2-badge-cancel-bg: #F5E0E0;
  --v2-badge-cancel-text: #8B3A3A;

  --blue: #2F6B55;
  --blue-dark: #1A3D35;
  --blue-soft: #E6F0EB;
  --hover-bg2: #EEF5F0;
  --focus-bg: #E8F2EC;
  --v2-row-bg: var(--v2-surface);
  --v2-row-hover: var(--v2-surface-hover);
  --v2-row-folio: var(--v2-blue-900);
  --v2-row-muted: var(--muted);
  --v2-filter-active-bg: #E6F0EB;
  --v2-filter-active-border: #B8D4C8;
  --v2-filter-active-text: #1A3D35;
  --v2-filter-inactive-bg: #FFFFFF;
  --v2-filter-inactive-border: #EBE4D6;
  --v2-filter-dot-idle: #D4E8DE;
  --v2-filter-dot-ring: #1A3D35;
  --v2-filter-dot-fill: #1A3D35;
}

/* ── Modo oscuro — base compartida (fallback Cursor-like) ── */
[data-theme="dark"] {
  --v2-bg: #1E1E1E;
  --v2-bg-soft: #252526;
  --v2-bg-muted: #2D2D2D;
  --v2-surface: #252526;
  --v2-surface-hover: #2A2D2E;
  --v2-input-bg: #3C3C3C;
  --v2-row-bg: #2D2D2D;
  --v2-row-hover: #37373D;
  --v2-row-folio: #CCCCCC;
  --v2-row-muted: #858585;
  --v2-badge-cancel-bg: #3B1212;
  --v2-badge-cancel-text: #F48771;
}

/* Azul Bohn + oscuro — estilo Cursor / VS Code dark */
html[data-palette="bohn"][data-theme="dark"] {
  --surface: #252526;
  --bg: #1E1E1E;
  --row-hover: #2A2D2E;
  --desc-zone-bg: #1E1E1E;
  --border: #3C3C3C;
  --border-strong: #454545;
  --border-soft: #333333;
  --text: #CCCCCC;
  --muted: #858585;
  --light: #6A6A6A;
  --disabled-text: #5A5A5A;
  --gray-soft: #2D2D2D;

  --v2-bg: #1E1E1E;
  --v2-bg-soft: #252526;
  --v2-bg-muted: #2D2D2D;
  --v2-surface: #252526;
  --v2-surface-hover: #2A2D2E;
  --v2-input-bg: #3C3C3C;
  --v2-row-bg: #2D2D2D;
  --v2-row-hover: #37373D;
  --v2-row-folio: #CCCCCC;
  --v2-row-muted: #858585;

  --v2-blue-900: #9CDCFE;
  --v2-blue-700: #4FC1FF;
  --v2-blue-600: #3794FF;
  --v2-blue-500: #007ACC;
  --v2-blue-400: #5A8499;
  --v2-blue-200: #264F78;
  --v2-blue-100: #1E3A5F;
  --v2-blue-soft: #094771;
  --v2-accent-solid: #007ACC;
  --v2-accent-solid-fg: #FFFFFF;

  --v2-stat-total: #1A3347;
  --v2-stat-completas: #2A4A66;
  --v2-stat-canceladas: #3D6280;
  --v2-stat-articulos: #4A7394;
  --v2-stat-articulos-text: #E8EEF4;
  --v2-stat-articulos-sub: #B4C9DC;

  --v2-badge-done-bg: #094771;
  --v2-badge-done-text: #9CDCFE;
  --v2-badge-cancel-bg: #3B1212;
  --v2-badge-cancel-text: #F48771;

  --blue: #3794FF;
  --blue-dark: #4FC1FF;
  --blue-soft: #094771;
  --hover-bg2: #2A2D2E;
  --focus-bg: #264F78;
  --accent-indigo: #3794FF;
  --apple-btn: #2D2D2D;
  --apple-btn-hover: #3C3C3C;

  --v2-filter-active-bg: #1E3A5F;
  --v2-filter-active-border: #264F78;
  --v2-filter-active-text: #C5DCF0;
  --v2-filter-inactive-bg: #252526;
  --v2-filter-inactive-border: #3C3C3C;
  --v2-filter-dot-idle: #454545;
  --v2-filter-dot-ring: #9CDCFE;
  --v2-filter-dot-fill: #9CDCFE;
}

/* Verde sepia + oscuro — misma base Cursor que Bohn, acentos en verde */
html[data-palette="sepia"][data-theme="dark"] {
  --surface: #252526;
  --bg: #1E1E1E;
  --row-hover: #2A2D2E;
  --desc-zone-bg: #1E1E1E;
  --border: #3C3C3C;
  --border-strong: #454545;
  --border-soft: #333333;
  --text: #CCCCCC;
  --muted: #858585;
  --light: #6A6A6A;
  --disabled-text: #5A5A5A;
  --gray-soft: #2D2D2D;

  --v2-bg: #1E1E1E;
  --v2-bg-soft: #252526;
  --v2-bg-muted: #2D2D2D;
  --v2-surface: #252526;
  --v2-surface-hover: #2A2D2E;
  --v2-input-bg: #3C3C3C;
  --v2-row-bg: #2D2D2D;
  --v2-row-hover: #37373D;
  --v2-row-folio: #CCCCCC;
  --v2-row-muted: #858585;

  --v2-blue-900: #9CDCB0;
  --v2-blue-700: #6BD99A;
  --v2-blue-600: #4EC9B0;
  --v2-blue-500: #2D9B6A;
  --v2-blue-400: #5A8F7A;
  --v2-blue-200: #1E4A38;
  --v2-blue-100: #163828;
  --v2-blue-soft: #0D3D2E;
  --v2-accent-solid: #2D9B6A;
  --v2-accent-solid-fg: #FFFFFF;

  --v2-stat-total: #1A3D35;
  --v2-stat-completas: #2F5D50;
  --v2-stat-canceladas: #457A68;
  --v2-stat-articulos: #5A8F7A;
  --v2-stat-articulos-text: #E8F0EB;
  --v2-stat-articulos-sub: #B8D4C8;

  --v2-badge-done-bg: #0D3D2E;
  --v2-badge-done-text: #9CDCB0;
  --v2-badge-cancel-bg: #3B1212;
  --v2-badge-cancel-text: #F48771;

  --blue: #4EC9B0;
  --blue-dark: #6BD99A;
  --blue-soft: #0D3D2E;
  --hover-bg2: #2A2D2E;
  --focus-bg: #1E4A38;
  --accent-indigo: #4EC9B0;
  --apple-btn: #2D2D2D;
  --apple-btn-hover: #3C3C3C;

  --v2-filter-active-bg: #1E4A38;
  --v2-filter-active-border: #2D6B50;
  --v2-filter-active-text: #A8D4BC;
  --v2-filter-inactive-bg: #252526;
  --v2-filter-inactive-border: #3C3C3C;
  --v2-filter-dot-idle: #454545;
  --v2-filter-dot-ring: #9CDCB0;
  --v2-filter-dot-fill: #9CDCB0;
}

.app-shell-v2 {
  flex-direction: column;
  min-height: 100vh;
}

.app-shell-v2 .app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-shell-v2 .app-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}
.app-shell-v2 .app-header-brand img,
.app-shell-v2 .app-header-logo-img { height: 26px; width: auto; display: block; }
.app-shell-v2 .app-v2-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--v2-blue-soft);
  color: var(--v2-blue-700);
}

.app-shell-v2 .app-header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-shell-v2 .app-header-nav::-webkit-scrollbar { display: none; }

.app-shell-v2 .topnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.app-shell-v2 .topnav-tab:hover {
  background: var(--v2-blue-soft);
  color: var(--v2-blue-700);
}
.app-shell-v2 .topnav-tab.active {
  background: var(--v2-accent-solid);
  color: var(--v2-accent-solid-fg);
}
.app-shell-v2 .topnav-tab svg { flex-shrink: 0; opacity: 0.85; }
.app-shell-v2 .topnav-tab.active svg { opacity: 1; }

.app-shell-v2 .topnav-tab-nuevo {
  background: var(--v2-blue-soft);
  color: var(--v2-blue-700);
  font-weight: 600;
}
.app-shell-v2 .topnav-tab-nuevo svg {
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.app-shell-v2 .topnav-tab-nuevo:hover { background: var(--v2-blue-200); }
.app-shell-v2 .topnav-tab-nuevo:hover svg { transform: rotate(90deg); }
.app-shell-v2 .topnav-tab-nuevo.active { background: var(--v2-accent-solid); color: var(--v2-accent-solid-fg); }

.app-shell-v2 .app-header-nuevo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.app-shell-v2 .topnav-tab-nuevo-actions {
  margin-right: 0;
}
.app-shell-v2 .app-header-actions-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.app-shell-v2 .topnav-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

.app-shell-v2 .nav-count {
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-shell-v2 .topnav-tab.active .nav-count { background: rgba(255,255,255,0.25); }

.app-shell-v2 .nav-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

/* Buzón de mensajes — panel desplegable anclado al nav (v2) */
.app-shell-v2 .buzon-wrap {
  position: relative;
  flex-shrink: 0;
}
.app-shell-v2 .buzon-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: min(380px, calc(100vw - 32px));
  min-height: 148px;
  max-height: min(440px, calc(100vh - 72px));
  flex-direction: column;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border-strong) 70%, transparent);
  border-radius: 14px;
  box-shadow: 0 18px 48px -14px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  z-index: 250;
}
.app-shell-v2 .buzon-panel.show {
  display: flex;
}
.app-shell-v2 .buzon-panel-head {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--v2-bg-soft, var(--bg));
}
.app-shell-v2 .buzon-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.app-shell-v2 .buzon-panel-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}
.app-shell-v2 .buzon-panel .buzon-lista {
  flex: 1;
  min-height: 0;
  max-height: min(360px, calc(100vh - 160px));
  overflow-y: auto;
  padding: 8px;
}
.app-shell-v2 .buzon-panel .buzon-item {
  border-radius: 10px;
  background: var(--v2-row-bg, var(--surface));
}
.app-shell-v2 .buzon-panel .buzon-item:hover {
  border-color: var(--v2-blue-500, var(--blue));
  background: var(--v2-blue-soft, var(--blue-soft));
}
.app-shell-v2 .buzon-panel .bitacora-vacio {
  padding: 28px 16px;
  line-height: 1.45;
}
.app-shell-v2 .buzon-vacio-sub {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--light);
  line-height: 1.4;
}
.app-shell-v2 .topnav-tab.buzon-activo {
  background: var(--v2-blue-soft);
  color: var(--v2-blue-700);
}
[data-theme="dark"] .app-shell-v2 .buzon-panel {
  box-shadow: 0 22px 56px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

@media (max-width: 720px) {
  .app-shell-v2 .buzon-panel {
    position: fixed;
    top: 56px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

.app-shell-v2 .app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.app-shell-v2 .app-header-folio {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.app-shell-v2 .app-header-folio-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--v2-blue-900, var(--text));
  white-space: nowrap;
}

.app-shell-v2 .app-header-folio-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.app-shell-v2 #screen-ing.active,
.app-shell-v2 #screen-compras.active,
.app-shell-v2 #screen-mesa.active {
  background: var(--v2-bg);
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.app-shell-v2 .app-main:has(#screen-ing.active),
.app-shell-v2 .app-main:has(#screen-compras.active),
.app-shell-v2 .app-main:has(#screen-mesa.active) {
  overflow: hidden;
  height: calc(100vh - 52px);
  max-height: calc(100vh - 52px);
}

.app-shell-v2 #screen-compras .shell-rol.shell-rol-compras {
  max-width: none;
  margin: 0;
  padding: 0 0 24px 24px;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}
.app-shell-v2 #screen-compras .shell-rol.shell-rol-compras.sidebar-colapsado {
  grid-template-columns: minmax(0, 1fr) 44px;
}
.app-shell-v2 #screen-ing .shell-rol.shell-rol-ing {
  max-width: none;
  margin: 0;
  padding: 0 0 24px 24px;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main sidebar";
  gap: 8px;
  align-items: stretch;
}
.app-shell-v2 #screen-ing .shell-rol.shell-rol-ing.sidebar-colapsado {
  grid-template-columns: minmax(0, 1fr) 44px;
}
.app-shell-v2 #screen-mesa .shell-rol.shell-rol-mesa {
  max-width: none;
  margin: 0;
  padding: 0 0 24px 24px;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main sidebar";
  gap: 8px;
  align-items: stretch;
}
.app-shell-v2 #screen-mesa .shell-rol.shell-rol-mesa.sidebar-colapsado {
  grid-template-columns: minmax(0, 1fr) 44px;
}
.app-shell-v2 #screen-mesa .shell-rol:not(.shell-rol-mesa) {
  max-width: none;
  margin: 0;
  padding: 0 24px 24px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-shell-v2 #screen-ing .rol-tracker-bar,
.app-shell-v2 #screen-compras .rol-tracker-bar,
.app-shell-v2 #screen-mesa .rol-tracker-bar {
  flex-shrink: 0;
  padding-top: 14px;
}

.app-shell-v2 .app-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}
.app-shell-v2 .app-main:has(#screen-registro.active) {
  overflow: hidden;
  height: calc(100vh - 52px);
  max-height: calc(100vh - 52px);
}

.app-shell-v2 #screen-registro.active {
  height: 100%;
  max-height: 100%;
}

/* Pantallas ocupan el área bajo el header */
.app-shell-v2 .screen {
  flex: 1;
  min-height: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.app-shell-v2 .screen.active { display: flex; }

/* Sub-barra contextual (reemplaza topbar en Historial y similares) */
.app-shell-v2 .page-context {
  padding: 14px 20px 0;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* Pantallas de listado v2 — fondo del perfil + contenido anclado a la izquierda */
.app-shell-v2 #screen-registro.active,
.app-shell-v2 #screen-pendientes.active,
.app-shell-v2 #screen-modelos.active {
  background: var(--v2-bg);
}
[data-theme="dark"] .app-shell-v2 #screen-registro.active,
[data-theme="dark"] .app-shell-v2 #screen-pendientes.active,
[data-theme="dark"] .app-shell-v2 #screen-modelos.active {
  background: var(--v2-bg);
}

.app-shell-v2 #screen-registro .shell,
.app-shell-v2 #screen-pendientes .shell,
.app-shell-v2 #screen-modelos .shell {
  max-width: none;
  margin: 0;
  padding: 0 24px 24px;
  flex: 1;
  min-height: 0;
}

.app-shell-v2 #screen-pendientes .shell,
.app-shell-v2 #screen-modelos .shell {
  overflow: auto;
}

.app-shell-v2 #screen-pendientes .pend-card,
.app-shell-v2 #screen-modelos .mod-busqueda-input-wrap,
.app-shell-v2 #screen-modelos .reg-table-wrap {
  background: var(--v2-surface, var(--surface));
}

[data-theme="dark"] .app-shell-v2 #screen-pendientes .pend-card:hover {
  border-color: var(--v2-blue-600);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.45);
}

/* Configuración — layout tipo ajustes: nav izquierda, contenido anclado */
.app-shell-v2 #screen-config.active {
  background: var(--v2-bg);
  overflow: hidden;
}
[data-theme="dark"] .app-shell-v2 #screen-config.active {
  background: var(--v2-bg);
}

.app-shell-v2 #screen-config .cfg-shell {
  max-width: none;
  margin: 0;
  padding: 0 24px 24px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.app-shell-v2 #screen-config .cfg-aviso-solo-lectura {
  margin: 0 24px 0;
  flex-shrink: 0;
}

.app-shell-v2 #screen-config .cfg-layout {
  width: 100%;
  max-width: 1280px;
  margin: 8px 0 0;
  gap: 0;
  align-items: stretch;
  min-height: min-content;
}

.app-shell-v2 #screen-config .cfg-nav {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 4px 20px 16px 0;
  margin-right: 28px;
  border-right: 1px solid var(--border);
}

.app-shell-v2 #screen-config .cfg-content {
  flex: 1;
  min-width: 0;
  max-width: none;
  padding-top: 2px;
}

.app-shell-v2 #screen-config .cfg-nav-item.active {
  background: var(--v2-blue-soft);
  color: var(--v2-blue-900);
  font-weight: 600;
}

.app-shell-v2 #screen-config .cfg-card {
  background: var(--v2-surface, var(--surface));
  box-shadow: 0 1px 2px rgba(26, 51, 71, 0.04);
}
[data-theme="dark"] .app-shell-v2 #screen-config .cfg-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

@media (max-width: 900px) {
  .app-shell-v2 #screen-config .cfg-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
  .app-shell-v2 #screen-config .cfg-aviso-solo-lectura {
    margin-left: 16px;
    margin-right: 16px;
  }
  .app-shell-v2 #screen-config .cfg-layout {
    max-width: none;
  }
  .app-shell-v2 #screen-config .cfg-nav {
    width: 100%;
    margin-right: 0;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 12px;
    max-height: none;
    position: static;
  }
}

/* Perfil en header */
.app-shell-v2 .app-header-actions .profile-wrap { position: relative; }
.app-shell-v2 .app-header-actions .profile-chip-avatar-only {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-shell-v2 .app-header-actions .profile-chip-avatar-only .profile-avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.app-shell-v2 .app-header-actions .profile-menu {
  right: 0;
  left: auto;
  top: calc(100% + 6px);
  min-width: 240px;
  padding: 8px;
}
.app-shell-v2 .profile-menu-head {
  padding: 10px 10px 8px;
}
.app-shell-v2 .profile-menu-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.app-shell-v2 .profile-menu-role {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}
.app-shell-v2 .profile-menu-head + .profile-menu-sep {
  margin: 4px 4px 6px;
}

/* Otras pantallas siguen usando topbar clásica por ahora */
.app-shell-v2 .screen .topbar { flex-shrink: 0; }

@media (max-width: 900px) {
  .app-shell-v2 .topnav-tab span:not(.nav-count):not(.nav-label) { display: none; }
  .app-shell-v2 .topnav-tab .nav-label > span:first-child { display: none; }
  .app-shell-v2 .app-v2-badge { display: none; }
}
