/* ============================================================
   GERENPIX — APPLICATION UI
   Design System
   ============================================================ */

:root {
    --gp-primary: #635bff;
    --gp-primary-dark: #5149df;
    --gp-primary-soft: #f0efff;
    --gp-bg: #f7f8fa;
    --gp-surface: #ffffff;
    --gp-text: #18191f;
    --gp-text-secondary: #626775;
    --gp-text-muted: #9297a3;
    --gp-border: #e7e8ec;
    --gp-sidebar: #111318;
    --gp-sidebar-hover: #191c23;
    --gp-sidebar-active: #252833;
    --gp-success: #20b26b;
    --gp-warning: #e9a23b;
    --gp-danger: #e05252;
    --gp-sidebar-width: 248px;
    --gp-sidebar-collapsed: 76px;
    --gp-topbar-height: 72px;
    --gp-radius-sm: 8px;
    --gp-radius-md: 12px;
    --gp-radius-lg: 16px;
    --gp-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
    --gp-shadow-md: 0 4px 16px rgba(16, 24, 40, 0.06);
}


/* ============================================================
   RESET
   ============================================================ */

.gp-app,
.gp-app * {
    box-sizing: border-box;
}

.gp-app {
    min-height: 100vh;
    background: var(--gp-bg);
    color: var(--gp-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.gp-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--gp-sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--gp-sidebar);
    color: #ffffff;
    z-index: 1000;
    transition: width 0.22s ease, transform 0.22s ease;
    overflow: hidden;
}

    .gp-sidebar.collapsed {
        width: var(--gp-sidebar-collapsed);
    }


/* ============================================================
   LOGO
   ============================================================ */

.gp-sidebar-header {
    height: var(--gp-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.gp-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    color: white;
    text-decoration: none;
    min-width: 0;
}

.gp-logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--gp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-shrink: 0;
}

    .gp-logo-mark span {
        width: 5px;
        border-radius: 3px;
        background: white;
        display: block;
    }

        .gp-logo-mark span:first-child {
            height: 12px;
        }

        .gp-logo-mark span:last-child {
            height: 19px;
        }

.gp-logo-text {
    font-size: 18px;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

    .gp-logo-text strong {
        font-weight: 700;
    }

    .gp-logo-text span {
        color: #8d87ff;
        font-weight: 700;
    }


/* ============================================================
   SIDEBAR TOGGLE
   ============================================================ */

.gp-sidebar-toggle {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #858b98;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

    .gp-sidebar-toggle:hover {
        background: var(--gp-sidebar-hover);
        color: white;
    }

    .gp-sidebar-toggle svg {
        width: 17px;
        height: 17px;
    }


/* ============================================================
   NAVEGAÇÃO
   ============================================================ */

.gp-sidebar-nav {
    flex: 1;
    padding: 22px 12px;
    overflow-y: auto;
}

.gp-nav-section {
    margin-bottom: 24px;
}

.gp-nav-label {
    display: block;
    padding: 0 12px 9px;
    color: #666c78;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.9px;
}


/* ============================================================
   NAV ITEM
   ============================================================ */

.gp-nav-item {
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 3px;
    color: #969ca8;
    border-radius: 9px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

    .gp-nav-item svg {
        width: 19px;
        height: 19px;
        flex-shrink: 0;
    }

    .gp-nav-item:hover {
        color: #ffffff;
        background: var(--gp-sidebar-hover);
    }

    .gp-nav-item.active {
        color: #ffffff;
        background: var(--gp-sidebar-active);
    }

        .gp-nav-item.active::before {
            content: "";
            position: absolute;
            left: -12px;
            width: 3px;
            height: 22px;
            background: var(--gp-primary);
            border-radius: 0 4px 4px 0;
        }


/* ============================================================
   SIDEBAR COLLAPSED
   ============================================================ */

.gp-sidebar.collapsed .gp-sidebar-header {
    justify-content: center;
    padding: 0;
}

.gp-sidebar.collapsed .gp-sidebar-toggle {
    display: none;
}

.gp-sidebar.collapsed .gp-sidebar-nav {
    padding-left: 12px;
    padding-right: 12px;
}

.gp-sidebar.collapsed .gp-nav-item {
    justify-content: center;
    padding: 0;
}

    .gp-sidebar.collapsed .gp-nav-item.active::before {
        left: -12px;
    }


/* ============================================================
   FOOTER SIDEBAR
   ============================================================ */

.gp-sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.gp-nav-logout:hover {
    color: #ff8585;
}

.gp-sidebar-version {
    margin-top: 14px;
    padding: 0 12px 5px;
    color: #555b67;
    font-size: 10px;
}


/* ============================================================
   MAIN
   ============================================================ */

.gp-main {
    min-height: 100vh;
    margin-left: var(--gp-sidebar-width);
    transition: margin-left 0.22s ease;
}

    .gp-main.sidebar-collapsed {
        margin-left: var(--gp-sidebar-collapsed);
    }


/* ============================================================
   TOPBAR
   ============================================================ */

.gp-topbar {
    position: sticky;
    top: 0;
    height: var(--gp-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: rgba(255,255,255,0.94);
    border-bottom: 1px solid var(--gp-border);
    backdrop-filter: blur(12px);
    z-index: 900;
}

.gp-topbar-left,
.gp-topbar-right {
    display: flex;
    align-items: center;
}

.gp-topbar-right {
    gap: 6px;
}


/* ============================================================
   BREADCRUMB
   ============================================================ */

.gp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
}

    .gp-breadcrumb span:first-child {
        color: var(--gp-text-muted);
    }

    .gp-breadcrumb strong {
        color: var(--gp-text);
        font-weight: 600;
    }

.gp-breadcrumb-separator {
    color: #c4c7ce;
}


/* ============================================================
   ICON BUTTON
   ============================================================ */

.gp-icon-button {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #727784;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

    .gp-icon-button:hover {
        background: #f1f2f5;
        color: var(--gp-text);
    }

    .gp-icon-button svg {
        width: 19px;
        height: 19px;
    }

.gp-notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: var(--gp-primary);
    border: 1.5px solid white;
    border-radius: 50%;
}


/* ============================================================
   TOPBAR DIVIDER
   ============================================================ */

.gp-topbar-divider {
    width: 1px;
    height: 28px;
    background: var(--gp-border);
    margin: 0 10px;
}


/* ============================================================
   USER
   ============================================================ */

.gp-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 10px;
}

    .gp-user-menu:hover {
        background: #f5f6f8;
    }

.gp-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecebff;
    color: var(--gp-primary);
    font-size: 11px;
    font-weight: 700;
}

.gp-user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
}

    .gp-user-details strong {
        font-size: 12px;
        font-weight: 600;
        color: var(--gp-text);
    }

    .gp-user-details span {
        font-size: 10px;
        color: var(--gp-text-muted);
    }

.gp-user-chevron {
    width: 15px;
    height: 15px;
    color: #9a9faa;
    margin-left: 2px;
}


/* ============================================================
   CONTENT
   ============================================================ */

.gp-content {
    padding: 30px;
    min-height: calc(100vh - var(--gp-topbar-height));
}


/* ============================================================
   MOBILE MENU
   ============================================================ */

.gp-mobile-menu {
    display: none;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

    .gp-sidebar {
        transform: translateX(-100%);
    }

        .gp-sidebar:not(.collapsed) {
            transform: translateX(0);
        }

    .gp-main,
    .gp-main.sidebar-collapsed {
        margin-left: 0;
    }

    .gp-mobile-menu {
        display: flex;
        margin-right: 8px;
    }

    .gp-topbar {
        padding: 0 18px;
    }

    .gp-content {
        padding: 22px 18px;
    }

    .gp-user-details,
    .gp-user-chevron {
        display: none;
    }
}


@media (max-width: 600px) {

    .gp-topbar {
        height: 64px;
    }

    .gp-content {
        padding: 18px 14px;
    }

    .gp-breadcrumb span:first-child,
    .gp-breadcrumb-separator {
        display: none;
    }

    .gp-sidebar {
        width: 260px;
    }
}
