/* ===== LAYOUT + SIDEBAR (OPERADOR) ===== */

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background: #020617;
    color: #e5e7eb;
}

/* Contenedor general */
.op-layout {
    min-height: 100vh;
    background: #020617;
}

/* ---------- Sidebar: mobile = barra simple arriba ---------- */

.op-sidebar {
    width: 100%;
    background: #020617;
    border-bottom: 1px solid #1f2933;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
    gap: 10px;
    /* ya NO sticky en móvil, para que no se sienta pesado */
}

/* Logo / marca */
.op-sidebar-logo {
    flex-shrink: 0;
    padding-right: 8px;
    border-right: 1px solid #1f2933;
    margin-right: 8px;
}

.op-logo-text {
    font-weight: 700;
    font-size: 16px;
    color: #e5e7eb;
}

.op-logo-tag {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #111827;
    font-size: 10px;
    color: #93c5fd;
}

/* Navegación: tabs horizontales scrolleables en móvil */
.op-sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.op-sidebar-nav::-webkit-scrollbar {
    height: 3px;
}

.op-sidebar-nav::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 999px;
}

/* Items de nav */
.op-nav-item {
    padding: 6px 10px;
    border-radius: 999px;
    color: #9ca3af;
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
}

.op-nav-item svg {
    flex-shrink: 0;
}

.op-nav-item:hover {
    background: #111827;
    color: #e5e7eb;
}

.op-nav-item-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #e5e7eb;
}

.op-nav-label {
    flex: 1;
}

/* Footer del sidebar (solo móvil arriba) */
.op-sidebar .sidebar-footer {
    margin-left: auto;
}

.op-sidebar .sidebar-footer-content {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 10px;
    border-left: 1px solid #1f2933;
}

.op-sidebar .footer-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.8;
}

.op-sidebar .footer-text {
    margin: 0;
    font-size: 11px;
    color: #6b7280;
}

/* ---------- Contenedor principal ---------- */

.op-main {
    min-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
}

/* Contenido de cada página: centrado y con padding */
.op-content {
    padding: 12px 10px 40px;
    max-width: 960px;
    margin: 0 auto;
}

/* ---------- Desktop: sidebar fijo a la izquierda ---------- */

@media (min-width: 768px) {
    .op-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 220px;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 12px;
        border-right: 1px solid #1f2933;
        border-bottom: none;
        overflow: hidden;
    }

    .op-sidebar-logo {
        padding: 4px 8px 16px;
        border-bottom: 1px solid #1f2933;
        border-right: none;
        margin: 0 0 10px 0;
    }

    .op-sidebar-nav {
        margin-top: 12px;
        flex-direction: column;
        overflow-x: visible;
        gap: 4px;
    }

    .op-nav-item {
        border-radius: 8px;
        width: 100%;
        justify-content: flex-start;
    }

    .op-sidebar .sidebar-footer {
        margin-top: auto;
        margin-left: 0;
        padding-top: 12px;
        border-top: 1px solid #1f2933;
    }

    .op-sidebar .sidebar-footer-content {
        border-left: none;
        padding-left: 0;
        justify-content: flex-start;
    }

    .op-main {
        margin-left: 220px;
        min-height: 100vh;
    }

    .op-content {
        padding: 18px 24px 40px;
        max-width: 1040px;
    }
}
