:root {
    --lf-sidebar-width: 280px;
    --lf-topbar-height: 76px;
    --lf-color-primary: #2563eb;
    --lf-color-dark: #111827;
    --lf-color-muted: #64748b;
    --lf-color-border: #e5e7eb;
    --lf-color-bg: #f3f6fb;
    --lf-color-card: #ffffff;
}

body.lf-dashboard-page {
    background: var(--lf-color-bg);
}

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

.lf-dashboard-sidebar {
    width: var(--lf-sidebar-width);
    min-height: 100vh;
    background: #111827;
    color: #fff;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.lf-sidebar-brand {
    height: 86px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.lf-sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--lf-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

.lf-sidebar-brand strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
}

.lf-sidebar-brand span {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 3px;
}

.lf-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.lf-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    transition: all .2s ease;
}

.lf-sidebar-link:hover,
.lf-sidebar-link.is-active {
    background: rgba(37, 99, 235, 0.16);
    color: #fff;
}

.lf-sidebar-icon {
    width: 24px;
    text-align: center;
    font-size: 17px;
}

.lf-sidebar-footer {
    padding: 14px 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.lf-sidebar-logout {
    color: #fecaca;
}

.lf-main {
    flex: 1;
    min-width: 0;
}

.lf-dashboard-topbar {
    height: var(--lf-topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--lf-color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.lf-sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--lf-color-border);
    background: #fff;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
}

.lf-topbar-title strong {
    display: block;
    font-size: 20px;
    color: #111827;
}

.lf-topbar-title span {
    display: block;
    font-size: 13px;
    color: var(--lf-color-muted);
    margin-top: 3px;
}

.lf-topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lf-plan-badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.lf-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lf-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.lf-user-info strong {
    display: block;
    font-size: 14px;
    color: #111827;
}

.lf-user-info span {
    display: block;
    font-size: 12px;
    color: var(--lf-color-muted);
    margin-top: 2px;
}

.lf-content {
    padding: 28px;
    max-width: 1440px;
}

.lf-content .wrapper_content_page,
.lf-content .container {
    max-width: none;
    width: 100%;
    padding: 0;
    margin: 0;
}

.lf-sidebar-icon {
    width: 30px;
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
}

.lf-sidebar-icon i {
    font-size: 30px;
    line-height: 1;
    width: 30px;
    height: 30px;
}

.lf-sidebar-icon svg {
    width: 30px;
    height: 30px;
    display: block;
    fill: currentColor;
}

@media (max-width: 1024px) {
    .lf-dashboard-sidebar {
        position: fixed;
        top: 0;
        left: -290px;
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
        transition: left .25s ease;
    }

    body.lf-sidebar-open .lf-dashboard-sidebar {
        left: 0;
    }

    .lf-sidebar-nav {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 24px;
    }

    .lf-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lf-dashboard-topbar {
        padding: 0 18px;
    }

    .lf-content {
        padding: 20px;
    }

    .lf-topbar-title span,
    .lf-user-info,
    .lf-plan-badge {
        display: none;
    }
}

@media (max-width: 640px) {
    .lf-dashboard-topbar {
        height: 66px;
    }

    .lf-topbar-title strong {
        font-size: 16px;
    }

    .lf-content {
        padding: 16px;
    }
}

.lf-plan-badge {
    text-decoration: none;
}

.lf-user-dropdown {
    position: relative;
}

.lf-user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 6px 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: background .2s ease;
}

.lf-user-dropdown-toggle:hover {
    background: #f1f5f9;
}

.lf-user-caret {
    color: #64748b;
    font-size: 13px;
    margin-left: 2px;
}

.lf-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: #fff;
    border: 1px solid var(--lf-color-border);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    padding: 8px;
    z-index: 100;
    display: none;
}

.lf-user-dropdown.is-open .lf-user-dropdown-menu {
    display: block;
}

.lf-user-dropdown-header {
    padding: 10px 12px 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 6px;
}

.lf-user-dropdown-header strong {
    display: block;
    font-size: 14px;
    color: #111827;
}

.lf-user-dropdown-header span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

.lf-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease;
}

.lf-user-dropdown-item:hover {
    background: #f1f5f9;
    color: #1d4ed8;
}

.lf-user-dropdown-item .dashicons {
    width: 20px;
    height: 20px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lf-user-dropdown-upgrade {
    color: #1d4ed8;
}

.lf-user-dropdown-logout {
    color: #dc2626;
}

.lf-user-dropdown-logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 640px) {
    .lf-user-caret {
        display: inline-flex;
        font-size: 14px;
        color: #64748b;
    }

    .lf-user-dropdown-menu {
        right: -4px;
        width: 220px;
    }

    .lf-user-dropdown-toggle {
        background: #f8fafc;
        border: 1px solid #e5e7eb;
        padding: 6px 8px;
    }

    .lf-user-dropdown-toggle::after {
        content: "Cuenta";
        font-size: 12px;
        font-weight: 700;
        color: #111827;
        margin-left: 4px;
    }

    .lf-user-info {
        display: none;
    }
}

.lf-sidebar-overlay {
    display: none;
}

@media (max-width: 1024px) {
    .lf-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.48);
        z-index: 45;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
        display: block;
    }

    body.lf-sidebar-open .lf-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .lf-dashboard-sidebar {
        z-index: 50;
    }
}

.lf-plan-badge.is-premium {
    background: #ecfdf5;
    color: #047857;
}

.lf-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.lf-dashboard-kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.lf-dashboard-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lf-dashboard-kpi-content strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: #111827;
}

.lf-dashboard-kpi-content span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

@media (max-width: 1024px) {
    .lf-dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .lf-dashboard-kpis {
        grid-template-columns: 1fr;
    }
}

.lf-dashboard-widgets,
.lf-dashboard-widget-full{
    margin-bottom: 24px;
}

.lf-dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.lf-dashboard-widget-full {
    grid-column: 1 / -1;
}

.lf-dashboard-widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.lf-dashboard-widget-header {
    margin-bottom: 18px;
}

.lf-dashboard-widget-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #111827;
}

@media (max-width: 1024px) {
    .lf-dashboard-widgets {
        grid-template-columns: 1fr;
    }
}

.lf-table-group-row td {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
}