﻿/*==========================================================
    OPEN PATH LAYOUT
==========================================================*/

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #eef2f7;
}

.page-container {
    padding: 24px 28px;
    min-height: 100%;
}

/*==========================================================
    TOP BAR
==========================================================*/

.topbar {
    height: 92px;
    background: linear-gradient(90deg,#0d8ba6,#157ea2);
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
    padding: 0 28px;
}

.topbar .container-fluid {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/*==========================================================
    DESKTOP / MOBILE HEADERS
==========================================================*/

.desktop-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-header {
    display: none;
}

.topbar-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

/*==========================================================
    HAMBURGER
==========================================================*/

.sidebar-toggle {
    color: white !important;
    font-size: 3.25rem;
    padding: 0;
    margin-right: 36px;
    line-height: 1;
    display: flex;
    align-items: center;
}

    .sidebar-toggle:hover {
        color: white;
    }

/*==========================================================
    BRAND
==========================================================*/

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

    .brand-link:hover {
        color: white;
        text-decoration: none;
    }

.top-logo {
    width: 64px;
    height: 64px;
    margin-right: 18px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    color: white;
    font-size: 2.15rem;
    font-weight: 600;
    line-height: 1;
}

.brand-subtitle {
    margin-top: 6px;
    color: rgba(255,255,255,.90);
    font-size: 1.05rem;
}

/*==========================================================
    DIVIDERS
==========================================================*/

.company-divider {
    width: 1px;
    height: 58px;
    background: rgba(255,255,255,.30);
}

.company-divider-left {
    margin: 0 48px;
}

/*==========================================================
    CUSTOMER
==========================================================*/

.customer-panel {
    display: flex;
    align-items: center;
    gap: 18px;
}

.company-icon {
    color: white;
    font-size: 2.6rem;
}

.customer-name {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    white-space: nowrap;
}

/*==========================================================
    USER
==========================================================*/

.user-panel {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-icon {
    color: white;
    font-size: 2.7rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 170px;
}

.user-name {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.user-role {
    margin-top: 4px;
    color: rgba(255,255,255,.85);
    font-size: .92rem;
}

/*==========================================================
    BUTTONS
==========================================================*/

.logout-btn,
.login-btn,
.signup-btn {
    min-width: 145px;
    height: 46px;
    border-radius: 10px;
    font-weight: 600;
    transition: .2s;
}

.logout-btn {
    background: #1677ff;
    border: none;
    color: white;
}

    .logout-btn:hover {
        background: #0d6efd;
        color: white;
    }

.login-btn {
    border: 2px solid white;
    color: white;
    background: transparent;
}

    .login-btn:hover {
        background: white;
        color: #0F4C75;
    }

.signup-btn {
    background: white;
    color: #0F4C75;
    border: none;
}

    .signup-btn:hover {
        background: #f3f3f3;
    }

.guest-buttons {
    gap: 18px;
}

/*==========================================================
    APPLICATION
==========================================================*/

.app-layout {
    display: flex;
    gap: 10px;
    height: calc(100vh - 92px);
    padding: 10px;
}

.app-content {
    flex: 1;
    overflow: auto;
    background: white;
    border-radius: 18px;
    padding: 35px;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

.app-content-full {
    flex: 1;
    overflow: auto;
    background: white;
    margin: 10px;
    border-radius: 18px;
    padding: 35px;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

/*==========================================================
    TABLET
==========================================================*/

@media (max-width:1200px) {

    .customer-name {
        font-size: 1.6rem;
    }

    .user-info {
        min-width: 140px;
    }

    .brand-name {
        font-size: 1.8rem;
    }

    .brand-subtitle {
        font-size: .95rem;
    }
}

/*==========================================================
    MOBILE HEADER
==========================================================*/

@media (max-width:768px) {

    .topbar {
        height: auto;
        padding: 14px;
    }

        .topbar .container-fluid {
            flex-direction: column;
            align-items: center;
            gap: 18px;
        }

    .topbar-left,
    .topbar-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .sidebar-toggle {
        margin-right: 18px;
        font-size: 2.5rem;
    }

    .top-logo {
        width: 48px;
        height: 48px;
    }

    .brand-name {
        font-size: 1.45rem;
    }

    .brand-subtitle {
        font-size: .85rem;
    }

    .company-divider {
        display: none;
    }

    .customer-panel,
    .user-panel {
        justify-content: center;
        width: 100%;
    }

    .logout-btn,
    .login-btn,
    .signup-btn {
        width: 100%;
    }

    .guest-buttons {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .app-layout {
        height: calc(100vh - 140px);
    }
}

/*==========================================================
    SIDEBAR
==========================================================*/

.sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #0F4C75;
    color: white;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .25s ease;
}


/*==========================================================
    SIDEBAR HEADER
==========================================================*/

.sidebar-header {
    height: 24px;
}


/* Hidden by default */
.sidebar-mobile-header {
    display: none;
}

/*==========================================================
    COLLAPSED SIDEBAR
==========================================================*/

.sidebar.collapsed {
    width: 88px;
}

    .sidebar.collapsed .sidebar-section,
    .sidebar.collapsed .menu-text {
        display: none;
    }

    .sidebar.collapsed .nav-link {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

        .sidebar.collapsed .nav-link i {
            margin: 0;
            width: auto;
        }

/*==========================================================
    SECTIONS
==========================================================*/

.sidebar-section {
    margin-top: 28px;
    padding: 0 28px 12px;
    color: rgba(255,255,255,.60);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/*==========================================================
    NAVIGATION
==========================================================*/

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 4px 16px;
    padding: 15px 18px;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: background-color .20s ease, color .20s ease, transform .20s ease, box-shadow .20s ease;
}

    .sidebar .nav-link:hover {
        background: #175989;
        color: white;
        transform: translateX(2px);
    }

    .sidebar .nav-link.active {
        background: #156FD4;
        color: white;
        box-shadow: 0 5px 15px rgba(0,0,0,.20);
    }

    .sidebar .nav-link i {
        width: 34px;
        min-width: 34px;
        text-align: center;
        font-size: 1.75rem;
    }

.menu-text {
    font-size: 1.08rem;
    white-space: nowrap;
}

/*==========================================================
    SCROLLBAR
==========================================================*/

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #2A79B8;
    border-radius: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

/*==========================================================
    CONTENT
==========================================================*/

.app-content,
.app-content-full {
    overflow: auto;
}

/*==========================================================
    TABLET
==========================================================*/

@media (max-width:1200px) {

    .customer-name {
        font-size: 1.55rem;
    }

    .company-divider-left {
        margin: 0 30px;
    }

    .brand-name {
        font-size: 1.85rem;
    }

    .brand-subtitle {
        font-size: .95rem;
    }

    .user-info {
        min-width: 140px;
    }

    .logout-btn,
    .login-btn,
    .signup-btn {
        min-width: 120px;
    }
}

/*==========================================================
    MOBILE HEADER
==========================================================*/

.mobile-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mobile-logo {
    width: 34px;
    height: 34px;
    margin-right: 8px;
}

.mobile-title {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    white-space: nowrap;
}

.mobile-logout {
    height: 38px;
    padding: 0 14px;
    font-size: .9rem;
}

.mobile-customer {
    margin-top: 8px;
    text-align: center;
    color: #fff;
    font-weight: 600;
}

.mobile-user {
    margin-top: 4px;
    text-align: center;
    color: rgba(255,255,255,.90);
    font-size: .9rem;
}

/*==========================================================
    MOBILE LAYOUT
==========================================================*/

@media (max-width:768px) {

    .desktop-header {
        display: none;
    }

    .mobile-header {
        display: block;
    }

    .topbar {
        height: auto;
        padding: 14px 16px;
    }

        .topbar .container-fluid {
            display: block;
        }

        .app-layout {
            padding: 0;
        }

        .sidebar {
            position: fixed;
            top: 92px; /* directly under top bar */

            left: -300px; /* hidden */

            bottom: 0;
            width: 285px;
            border-radius: 0;
            z-index: 2000;
            transition: left .25s ease;
        }

        .sidebar.mobile-open {
            left: 0;
        }

        .sidebar .nav-link {
            margin: 3px 10px;
            padding: 14px;
        }

            .sidebar .nav-link i {
                font-size: 1.6rem;
            }

    .menu-text {
        font-size: 1rem;
    }

    .sidebar-mobile-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 24px 20px;
    }

    .sidebar-mobile-logo {
        width: 44px;
        display: block;
        margin: 0 auto 14px;
    }

    .sidebar-mobile-company {
        font-size: 1.05rem;
        font-weight: 600;
        color: #fff;
        margin-top: 10px;
        text-align: center;
    }

    .sidebar-mobile-user {
        margin-top: 14px;
        font-size: .95rem;
        font-weight: 600;
        color: #fff;
        text-align: center;
    }

    .sidebar-mobile-role {
        display: inline-block;
        margin-top: 8px;
        padding: 4px 12px;
        border-radius: 16px;
        background: rgba(255,255,255,.12);
        color: #fff;
        font-size: .75rem;
        font-weight: 600;
        text-align: center;
    }

    .sidebar:not(.collapsed) .sidebar-mobile-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        opacity: 1;
        max-height: 180px;
        padding: 20px;
    }

    .sidebar.collapsed .sidebar-mobile-header {
        opacity: 0;
        max-height: 0;
        padding: 0 20px;
    }
}

.mobile-overlay {
    display: none;
}

@media(max-width:768px) {

    .mobile-overlay {
        position: fixed;
        inset: 92px 0 0 0;
        background: rgba(0,0,0,.45);
        z-index: 1990;
    }

        .mobile-overlay.show {
            display: block;
        }
}

/*==========================================================
    SMALL PHONES
==========================================================*/

@media (max-width:480px) {

    .mobile-title {
        font-size: 1.2rem;
    }

    .mobile-subtitle {
        font-size: .82rem;
    }

    .mobile-customer {
        font-size: .92rem;
    }

    .mobile-user {
        font-size: .82rem;
    }

    .app-content,
    .app-content-full {
        padding: 15px;
    }

    .sidebar {
        width: 260px;
    }

    .sidebar.collapsed {
        width: 68px;
    }
}

/*============================================
    MOBILE GUEST BUTTONS
============================================*/

.mobile-auth-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
}

.mobile-auth-btn {
    flex: 1;
    max-width: 170px;
    height: 46px;
}

.mobile-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,.35);
}
