﻿/* ----------------------------------------------------
   VARIABLES GLOBALES (THEME OSCURO - WB CONNECT)
   ---------------------------------------------------- */
:root {
    /* Paleta Principal (Dark) */
    --wb-bg-desktop: #222736;
    --wb-bg-sidebar: #2a3042;
    --wb-bg-panel: #2a3042;
    --wb-bg-chat: #1f2430;
    --wb-bg-hover: #32394e;
    --wb-bg-input: #2e3548;

    /* Textos */
    --wb-text-main: #a6b0cf;
    --wb-text-light: #eff2f7;
    --wb-text-muted: #74788d;

    /* Acentos */
    --wb-accent-blue: #556ee6;
    --wb-accent-blue-hover: #485ec4;
    --wb-status-green: #34c38f;
    --wb-status-red: #f46a6a;

    /* Bordes y Sombras */
    --wb-border: #32394e;
    --wb-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, .03);

    /* Dimensiones */
    --wb-sidebar-width: 250px;
    --wb-sidebar-collapsed: 70px;
}

/* ----------------------------------------------------
   RESET PARA WORDPRESS (AnulaciÃ³n del admin core)
   ---------------------------------------------------- */
#wpcontent {
    padding-left: 0 !important;
}

.wb-connect-wrapper {
    margin-left: -20px;
    margin-top: -10px;
    display: flex;
    height: calc(100vh - 32px);
    /* Descontando la barra superior de WP */
    background-color: var(--wb-bg-desktop);
    color: var(--wb-text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    overflow: hidden;
}

/* ----------------------------------------------------
   CORRECCIONES FRONTEND (UNIVERSE ECOSISTEMA)
   ---------------------------------------------------- */
.universe-frontend-container .wb-connect-wrapper {
    margin: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
}

/* ----------------------------------------------------
   SIDEBAR LATERAL
   ---------------------------------------------------- */
.wb-sidebar {
    width: var(--wb-sidebar-width);
    background-color: var(--wb-bg-sidebar);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    border-right: 1px solid var(--wb-border);
    position: relative;
    z-index: 100;
}

.wb-sidebar.collapsed {
    width: var(--wb-sidebar-collapsed);
}

.wb-sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    border-bottom: 1px solid var(--wb-border);
}

.wb-brand-icon {
    font-size: 24px;
    color: var(--wb-accent-blue);
}

.wb-brand-title h2 {
    color: var(--wb-text-light);
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.wb-toggle-btn {
    background: none;
    border: none;
    color: var(--wb-text-main);
    font-size: 18px;
    cursor: pointer;
}

.wb-sidebar.collapsed .wb-brand-title {
    display: none;
}

.wb-sidebar.collapsed .wb-toggle-btn {
    margin: 0 auto;
}

.wb-sidebar.collapsed .wb-brand-icon {
    display: none;
}

/* MenÃº Items */
.wb-nav-menu {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.wb-nav-menu::-webkit-scrollbar {
    width: 5px;
}

.wb-nav-menu::-webkit-scrollbar-thumb {
    background: var(--wb-bg-hover);
}

.wb-nav-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wb-nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    color: var(--wb-text-main);
    transition: all 0.2s;
    font-size: 14.5px;
}

.wb-nav-item i {
    font-size: 18px;
    width: 30px;
    text-align: center;
}

.wb-nav-item:hover,
.wb-nav-item.active {
    color: var(--wb-text-light);
    background-color: var(--wb-bg-hover);
}

.wb-nav-item.active {
    border-left: 3px solid var(--wb-accent-blue);
}

.wb-sidebar.collapsed .wb-nav-text {
    display: none;
}

.wb-sidebar-footer {
    border-top: 1px solid var(--wb-border);
    padding-bottom: 20px;
}

.wb-sidebar-footer .wb-nav-item.disable-hover:hover {
    background: transparent;
    cursor: default;
}

/* Switch Theme */
.wb-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    margin-left: auto;
}

.wb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wb-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.wb-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.wb-slider {
    background-color: var(--wb-accent-blue);
}

input:focus+.wb-slider {
    box-shadow: 0 0 1px var(--wb-accent-blue);
}

input:checked+.wb-slider:before {
    transform: translateX(14px);
}

.wb-slider.round {
    border-radius: 34px;
}

.wb-slider.round:before {
    border-radius: 50%;
}

.wb-sidebar.collapsed .wb-switch {
    display: none;
}

/* ----------------------------------------------------
   ÃREA PRINCIPAL (SPA CONTAINER)
   ---------------------------------------------------- */
.wb-main-content {
    flex: 1;
    position: relative;
    background: var(--wb-bg-desktop);
    overflow: hidden;
}

.wb-view {
    display: none;
    height: 100%;
    width: 100%;
    padding: 0;
    overflow-y: auto;
    animation: fadeIn 0.3s;
}

.wb-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------------------
   BOTONES
   ---------------------------------------------------- */
.btn-secondary {
    background-color: #32394e;
    color: var(--wb-text-light);
    border: 1px solid var(--wb-border);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background-color: var(--wb-bg-hover);
}

/* Header General de Vistas Internas */
.wb-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--wb-bg-panel);
    border-bottom: 1px solid var(--wb-border);
}

.wb-header-bar h2 {
    color: var(--wb-text-light);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.actions-right {
    display: flex;
    gap: 15px;
    align-items: center;
}