﻿/* ==========================================
   Admin Layout
========================================== */

.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 70px 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar content";
    height: 100vh;
    background: radial-gradient( circle at 20% 20%, rgba(0,255,255,.08), transparent 25% ), radial-gradient( circle at 80% 80%, rgba(124,58,237,.08), transparent 25% ), linear-gradient( 135deg, #020617, #0f172a, #111827 );
    color:#fff;
}

/* ==========================================
   Layout Areas
========================================== */

.sidebar-area {
    grid-area: sidebar;
    overflow-y: auto;
}

.header-area {
    grid-area: header;
}

.content-area {
    grid-area: content;
    overflow-y: auto;
    padding: 20px;
}

/* ==========================================
   Global Box Sizing
========================================== */

#admin-sidebar *,
#admin-header * {
    box-sizing: border-box;
}

/* ==========================================
   Header
========================================== */

#admin-header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
/*    background-color: #fff;*/
    border-bottom: 1px solid #dee2e6;
        background: linear-gradient( 180deg, #0b1120 0%, #111827 50%, #0b1120 100% );
        color:#fff;
}

    #admin-header .company-section {
        display: flex;
        align-items: center;
        flex: 1;
    }

        #admin-header .company-section h4 {
            margin: 0;
            font-size: 1.6rem;
            font-weight: 600;
        }

    /* ==========================================
   User Section
========================================== */

    #admin-header .user-section {
        position: relative;
        /*        display: flex;*/
        /*        align-items: center;*/
    }

    #admin-header summary {
        list-style: none;
    }

        #admin-header summary::-webkit-details-marker {
            display: none;
        }

    #admin-header .user-button {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        border-radius: 6px;
        cursor: pointer;
        user-select: none;
    }

    #admin-header .user-button {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        border: none;
        border-radius: 6px;
        background: transparent;
        cursor: pointer;
        transition: background-color .2s ease;
    }

        #admin-header .user-button:hover {
            background-color: #444;
        }

        #admin-header .user-button span {
/*            color: #343a40;*/
            font-size: 14px;
            font-weight: 500;
        }

    /* ==========================================
   Profile Dropdown
========================================== */

    #admin-header .dropdown-menu {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        min-width: 220px;
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,.05), 0 10px 20px rgba(0,0,0,.08);
        overflow: hidden;
        z-index: 1000;
    }

    #admin-header .user-section[open] .dropdown-menu {
        display: block;
    }

.dropdown-arrow {
    transition: transform .2s ease;
}

.user-section[open] .dropdown-arrow {
    transform: rotate(180deg);
}

#admin-header .user-section[open] .user-button {
    background-color: #;
    box-shadow: inset 0 0 0 1px #dee2e6;
}

    #admin-header .user-section[open] .user-button span,
    #admin-header .user-section[open] .dropdown-arrow {
/*        color: #0d6efd;*/
        color: #fff;
    }

#admin-header .dropdown-item {
    display: block;
    width: 100%;
    padding: 5px 0 5px 12px;
    color: #343a40;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

    #admin-header .dropdown-item:hover {
        background-color: #444;
        color: #fff;
        border-radius: 5px;
    }

    #admin-header .dropdown-item.text-danger:hover {
        background-color: #fff5f5;
        color: #dc3545 !important;
    }

#admin-header .dropdown-menu hr {
    margin: 0;
    border-color: #e9ecef;
}

/* ==========================================
   Sidebar
========================================== */

#admin-sidebar {
    height: 100%;
    background: #1f2937;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    height: 70px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-bottom: 1px solid #374151;
}

    .sidebar-logo img {
        width: 40px;
        height: 40px;
    }

    .sidebar-logo span {
        font-size: 1rem;
        font-weight: 600;
    }

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
}

/* ==========================================
   Menu Items
========================================== */

.menu-link,
.menu-parent,
.submenu-link {
    border-left: 3px solid transparent;
}

.menu-link,
.menu-parent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px 10px 0px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease;
}

.menu-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .menu-title i {
        width: 18px;
        text-align: center;
    }

.menu-link:hover,
.menu-parent:hover {
    background: #374151;
}

.menu-link.active {
    background: #374151;
    border-left-color: #60a5fa;
}

.menu-parent.expanded {
    background: #374151;
}

/* ==========================================
   Menu Chevron
========================================== */

.menu-chevron {
    font-size: 12px;
    transition: transform .25s ease;
}

/* ==========================================
   Sub Menu
========================================== */

.submenu {
    max-height: 0;
    overflow: hidden;
    background: #172133;
    border-left: 3px solid #374151;
    margin-left: 20px;
    transition: max-height .3s ease;
}

    .submenu.open {
        max-height: 500px;
    }

.submenu-link {
    display: block;
    padding: 10px 16px 10px 18px;
    color: #cbd5e1;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

    .submenu-link:hover {
        background: #374151;
        color: #fff;
    }

    .submenu-link.active {
        background: #4b5563;
        color: #fff;
        border-left-color: #60a5fa;
    }

.submenu-dot {
    /*    font-size: 6px;*/
    margin-right: 5px;
}

/* ==========================================
   Mobile Sidebar
========================================== */

.sidebar-toggle {
    display: none;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    margin-right: 15px;
}

.sidebar-overlay {
    display: none;
}

/* ==========================================
   Responsive
========================================== */

@media (max-width: 768px) {

    .admin-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "content";
    }

    .sidebar-area {
        overflow: visible;
    }

    .sidebar-toggle {
        display: block;
    }

    #admin-header .company-section h4 {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #admin-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100vh;
        z-index: 1050;
        transition: left .3s ease;
    }

        #admin-sidebar.open {
            left: 0;
        }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 1040;
    }
}

/*  Custom CSS for All pages */ 
.table-light {
    color: #444 !important;
}

.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.link-primary {
    cursor:pointer !important;
}

#modal-add {
    color: #000;
}

    #modal-add .form-control {
        width: 99% !important;
    }