/* App shell — dark sidebar + light workspace */

.holos-app {
    display: flex;
    min-height: 100vh;
    background: var(--holos-bg);
    color: var(--holos-text);
}

.holos-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    width: var(--holos-sidebar-width);
    min-width: var(--holos-sidebar-width);
    height: 100vh;
    max-height: 100vh;
    background: var(--holos-sidebar-bg);
    border-right: 1px solid var(--holos-sidebar-border);
    z-index: var(--holos-z-topnav-menu);
    overflow: hidden;
}

.holos-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem 0.45rem;
    flex-shrink: 0;
}

.holos-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--holos-on-accent);
    min-width: 0;
    line-height: 1;
}

.holos-sidebar-brand .holos-sidebar-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    background: var(--holos-surface);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

.holos-sidebar-brand span {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    padding-top: 1px;
}

.holos-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--holos-radius-sm);
    border: 1px solid var(--holos-sidebar-border);
    color: var(--holos-sidebar-text);
    cursor: pointer;
    background: transparent;
}

.holos-sidebar-property {
    padding: 0 0.85rem 0.5rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--holos-sidebar-border);
}

.holos-sidebar-property .property-selector,
.holos-sidebar-property .property-selector-single-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
    color: var(--holos-sidebar-text-muted);
    font-size: 0.75rem;
}

.holos-sidebar-property .property-selector label,
.holos-sidebar-property .property-selector-single-wrap > span:first-child {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.68rem;
}

.holos-sidebar-property .property-selector select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--holos-sidebar-border);
    color: var(--holos-on-accent);
    border-radius: var(--holos-radius-sm);
    padding: 0.45rem 0.55rem;
    font-size: 0.85rem;
}

.holos-sidebar-property .property-selector-single {
    color: var(--holos-on-accent);
    font-size: 0.85rem;
    font-weight: 500;
}

.holos-sidebar-nav-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.25rem 0.55rem 0.85rem;
}

.holos-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.holos-sidebar-nav .topnav-groups {
    flex-direction: column;
    align-items: stretch;
    gap: 0.05rem;
}

.holos-sidebar-nav .topnav-groups > .topnav-link-direct {
    align-self: stretch;
}

.holos-sidebar-nav .topnav-group {
    flex-direction: column;
    align-items: stretch;
}

.holos-sidebar-nav .topnav-trigger,
.holos-sidebar-nav .topnav-link-direct,
.holos-sidebar-nav a.topnav-link-direct {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.125rem;
    justify-content: flex-start;
    padding: 0.4rem 0.7rem;
    border-radius: var(--holos-radius-sm);
    color: var(--holos-sidebar-text);
    font-size: 0.875rem;
    line-height: 1.2;
    box-sizing: border-box;
    box-shadow: none;
}

.holos-sidebar-nav .topnav-trigger::after {
    margin-left: auto;
}

.holos-sidebar-nav .topnav-trigger:hover,
.holos-sidebar-nav .topnav-link-direct:hover {
    background: var(--holos-sidebar-bg-hover);
    color: var(--holos-on-accent);
}

.holos-sidebar-nav .topnav-link-direct.active,
.holos-sidebar-nav .topnav-trigger.active {
    background: var(--holos-sidebar-active);
    color: var(--holos-on-accent);
    font-weight: 600;
    box-shadow: none;
    border: none;
}

.holos-sidebar-nav .topnav-dropdown {
    position: static;
    display: none;
    min-width: 0;
    margin: 0.15rem 0 0.35rem;
    padding: 0.2rem 0 0.2rem 0.5rem;
    background: transparent;
    border: none;
    box-shadow: none;
    border-left: 2px solid rgba(255, 255, 255, 0.12);
}

.holos-sidebar-nav .topnav-group.is-open > .topnav-dropdown {
    display: flex;
}

.holos-sidebar-nav .topnav-dropdown a {
    padding: 0.4rem 0.65rem;
    font-size: 0.82rem;
    color: var(--holos-sidebar-text-muted);
    border-radius: 6px;
}

.holos-sidebar-nav .topnav-dropdown a:hover {
    color: var(--holos-on-accent);
    background: var(--holos-sidebar-bg-hover);
}

.holos-sidebar-nav .topnav-dropdown a.active {
    color: var(--holos-on-accent);
    background: color-mix(in srgb, var(--holos-brand-primary) 25%, transparent);
    font-weight: 600;
}

.holos-sidebar-nav .topnav-dropdown-divider {
    border-top-color: var(--holos-sidebar-border);
}

.nav-badge {
    margin-left: auto;
    padding: 0.1rem 0.45rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.35);
    color: var(--holos-brand-primary-soft);
}

.holos-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.holos-topbar {
    position: sticky;
    top: 0;
    z-index: var(--holos-z-topbar);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-height: var(--holos-topbar-height);
    padding: 0.2rem 1rem;
    background: var(--holos-header-bg);
    border-bottom: 1px solid var(--holos-border);
    box-shadow: var(--holos-shadow-sm);
}

.holos-topbar-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.25rem;
}

.holos-topbar .property-clock-badge {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    margin-right: 0;
    padding: 0.2rem 0.55rem;
}

.holos-topbar .bccr-rate-badge {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
}

.holos-topbar .property-clock-label {
    font-size: 0.62rem;
    max-width: 8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holos-topbar .property-clock-date {
    font-size: 0.72rem;
}

.holos-topbar .property-clock-time {
    font-size: 0.85rem;
}

.holos-topbar .bar-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--holos-radius-sm);
    border: 1px solid var(--holos-border);
    background: var(--holos-bg);
    color: var(--holos-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.holos-topbar .bar-search-btn:hover {
    border-color: var(--holos-border-strong);
    background: var(--holos-surface);
    color: var(--holos-text);
}

.holos-topbar .user-label {
    margin: 0;
    color: var(--holos-muted);
    font-size: 0.8rem;
    max-width: 12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holos-topbar .link-btn {
    color: var(--holos-brand-primary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.4rem;
}

.holos-topbar .link-btn:hover {
    color: var(--holos-brand-primary-hover);
}

.holos-app .holos-content {
    flex: 1;
    padding: 0.65rem 1rem 1.5rem;
    background: var(--holos-bg);
}

.holos-app .holos-content:has(.fd-folio-enterprise-page) {
    padding-top: 0.45rem;
}

.holos-app .page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--holos-text);
    letter-spacing: -0.02em;
}

.holos-app h1, .holos-app h2, .holos-app h3 {
    color: var(--holos-text);
}

.sidebar-open-input {
    display: none;
}

.holos-sidebar-backdrop {
    display: none;
}

@media (max-width: 1024px) {
    .holos-sidebar-toggle {
        display: inline-flex;
    }

    .holos-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: var(--holos-shadow-md);
    }

    .sidebar-open-input:checked ~ .holos-sidebar {
        transform: translateX(0);
    }

    .holos-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: var(--holos-z-sidebar-backdrop);
        background: color-mix(in srgb, var(--holos-shadow-ink) 45%, transparent);
        cursor: pointer;
    }

    .sidebar-open-input:checked ~ .holos-sidebar-backdrop {
        display: block;
    }
}

/* Legacy shell — hide if still referenced */
.holos-shell.holos-shell--legacy {
    display: none;
}

/* Encabezados de sección dentro de los submenús (taxonomía del hub: Gente / Tiempo / Nómina). */
.topnav-dropdown .topnav-section {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: color-mix(in srgb, var(--holos-muted-2) 90%, transparent);
    padding: .7rem .9rem .2rem;
    user-select: none;
}
.topnav-dropdown .topnav-section:first-of-type { padding-top: .45rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   Shell de menú SUPERIOR (mockup aprobado por Joseph 29-jul-2026)
   El TopNav conserva su clase histórica (.holos-sidebar-nav — los smokes la
   pinnean) pero dentro de .holos-menubar TODA la verticalidad del sidebar se
   contrarresta: barra blanca horizontal + dropdowns flotantes. El sidebar CSS
   de arriba queda muerto en desktop (el aside ya no se renderiza) y el móvil
   ≤1024 lo cubre MobileShell.
   ═══════════════════════════════════════════════════════════════════════════ */

.holos-menubar {
    /* Barra CLARA sobre la barra 1 oscura (contraste del mockup): el menú se lee como pestañas. */
    background: var(--holos-surface);
    border-bottom: 1px solid var(--holos-border);
    padding: 0 0.75rem;
    position: relative;
    z-index: var(--holos-z-topnav-menu);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--holos-shadow-ink) 5%, transparent);
}

.holos-menubar .holos-sidebar-nav {
    flex-direction: row;
    gap: 0.1rem;
}

.holos-menubar .holos-sidebar-nav .topnav-groups {
    flex-direction: row;
    align-items: stretch;
    gap: 0.1rem;
    flex-wrap: nowrap;
}

.holos-menubar .holos-sidebar-nav .topnav-groups > .topnav-link-direct {
    align-self: center;
    width: auto;
}

.holos-menubar .holos-sidebar-nav .topnav-group {
    flex-direction: row;
    align-items: center;
    position: relative;
}

.holos-menubar .holos-sidebar-nav .topnav-trigger,
.holos-menubar .holos-sidebar-nav .topnav-link-direct,
.holos-menubar .holos-sidebar-nav a.topnav-link-direct {
    display: inline-flex;
    width: auto;
    min-height: 2.6rem;
    padding: 0.5rem 0.8rem;
    color: var(--holos-text);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 0;
}

.holos-menubar .holos-sidebar-nav .topnav-trigger::after {
    margin-left: 0.35rem;
}

.holos-menubar .holos-sidebar-nav .topnav-trigger:hover,
.holos-menubar .holos-sidebar-nav .topnav-link-direct:hover {
    background: var(--holos-page);
    color: var(--holos-text);
}

.holos-menubar .holos-sidebar-nav .topnav-link-direct.active,
.holos-menubar .holos-sidebar-nav .topnav-trigger.active {
    background: var(--holos-brand-primary-soft);
    color: var(--holos-text);
    box-shadow: inset 0 -3px 0 0 var(--holos-brand-cyan);
}

.holos-menubar .holos-sidebar-nav .topnav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 15rem;
    max-height: calc(100vh - 7.5rem);
    overflow-y: auto;
    margin: 0;
    padding: 0.45rem;
    /* Superficie del tema (blanca en claro, oscura en oscuro). Antes era un blanco fijo que el
       barrido no vio porque el comentario de esta línea traía dos puntos (5-sep, hotfix). */
    background: var(--holos-surface);
    border: 1px solid var(--holos-border);
    border-top: 3px solid var(--holos-brand-cyan);
    border-radius: 0 0 10px 10px;
    box-shadow: var(--holos-dropdown-shadow);
    z-index: var(--holos-z-search);
}

.holos-menubar .holos-sidebar-nav .topnav-group.is-open > .topnav-dropdown {
    display: flex;
    flex-direction: column;
}

/* Menús anchos (Recepción/Experiencias): columnas EXPLÍCITAS por sección (feedback Joseph
   29-jul: las columnas CSS automáticas partían una sección — título abajo, items en la otra). */
.holos-menubar .holos-sidebar-nav .topnav-group.is-open > .topnav-dropdown.topnav-dropdown-wide {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 0.45rem 0.9rem 0.7rem;
}

.holos-menubar .topnav-dropdown-wide .topnav-col {
    display: flex;
    flex-direction: column;
    min-width: 10.5rem;
}

.holos-menubar .holos-sidebar-nav .topnav-dropdown .topnav-section {
    color: var(--holos-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    padding: 0.55rem 0.65rem 0.2rem;
}

.holos-menubar .holos-sidebar-nav .topnav-dropdown a {
    padding: 0.42rem 0.65rem;
    font-size: 0.86rem;
    color: var(--holos-text);
    border-radius: 6px;
}

.holos-menubar .holos-sidebar-nav .topnav-dropdown a:hover {
    background: var(--holos-page);
    color: var(--holos-text);
}

.holos-menubar .holos-sidebar-nav .topnav-dropdown a.active {
    background: var(--holos-brand-primary-soft);
    color: var(--holos-text);
    font-weight: 600;
}

.holos-menubar .holos-sidebar-nav .topnav-dropdown-divider {
    border-top-color: var(--holos-border);
}

/* Barra 1: marca + propiedad a la izquierda; contexto y usuario a la derecha. */
.holos-shell-topmenu .holos-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.holos-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
    color: var(--holos-text);
    text-decoration: none;
    white-space: nowrap;
}

.holos-topbar-property {
    margin-right: auto;
    min-width: 0;
}

.holos-topbar-property .property-selector {
    flex-direction: row;
    align-items: center;
}

/* ≤1024: el shell móvil (barra de pulgar + hoja Más) es la navegación — la
   barra de menú desktop y la marca duplicada se esconden. */
@media (max-width: 1024px) {
    .holos-menubar,
    .holos-topbar-brand {
        display: none;
    }
}
