﻿:root {
    /* 🎨 Primary Palette */
    --primary-color: #2563eb; /* Main brand blue */
    --primary-light: #3b82f6; /* Lighter blue for hover or accents */
    --secondry-color: #2563eb; /* Lighter blue for hover or accents */
    --primary-dark: #1e40af; /* Darker blue for emphasis */
    --primary-hover: #3d7aff; /* Smooth hover transition color */
    /* ✅ Status Colors */
    --success-color: #10b981; /* Green for success */
    --danger-color: #ef4444; /* Red for errors */
    /* 🩶 Neutral & Background */
    --dark-color: #0e1b32; /* Text or strong dark background */
    --light-bg: #f8fafc; /* Page background */
    --border-color: #e2e8f0; /* Light borders */
    /* 🌫️ Shadow & Effects */
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.06); /* Soft card shadow */
}

@font-face {
    font-family: 'Cairo';
    src: url('../assets/fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Cairo';
    src: url('../assets/fonts/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

@font-face {
    font-family: 'Cairo';
    src: url('../assets/fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
}

/* Use it anywhere */
body {
    font-family: 'Cairo', sans-serif;
}


/* Force scrollbar to left */
html {
    direction: rtl;
}


body {
    background-color: #f7f9fc;
    font-family: 'Cairo', sans-serif;
}

.scroll-container {
    unicode-bidi: plaintext;
    overflow-y: scroll; /* always show vertical scrollbar */
    height: 100vh; /* make it full screen height */
    scrollbar-gutter: stable both-edges; /* reserve space for scrollbar */
}

    /* Restore RTL inside */
    .scroll-container > * {
        direction: rtl;
    }
    /* Chrome, Edge, Safari */
    .scroll-container::-webkit-scrollbar {
        width: 4px;
    }

    .scroll-container::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #1b2b46 0%, #0e1b32 100%);
        border-radius: 10px;
    }

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #0c1424 0%, #0e1b32 100%);
    color: #fff;
    position: fixed;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* content starts at top */
    padding: 15px;
    box-shadow: 0 0 15px rgba(0,0,0,0.25);
    transition: width 0.3s ease;
    z-index: 999;
    unicode-bidi: plaintext;
    overflow-y: scroll; /* always show vertical scrollbar */
    height: 100vh; /* make it full screen height */
    scrollbar-gutter: stable both-edges; /* reserve space for scrollbar */
}

    .sidebar.collapsed {
        width: 85px;
    }

/* Chrome, Edge, Safari */
    .sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #1b2b46 0%, #0e1b32 100%);
        border-radius: 10px;
    }

/* Toggle button */
.toggle-btn {
    position: absolute;
    top: 15px;
    left: 12px;
    padding: 5px 10px;
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.3s ease, transform 0.3s;
}

    .toggle-btn:hover {
        background-color: #1b2b46;
        color: #fff;
    }

.sidebar-logo {
    padding-top: 20px;
}

    .sidebar-logo .logo-icon {
        background-color: #1e40af;
        color: #fff;
        display: inline-block;
        padding: 10px 15px;
        border-radius: 50%;
        font-size: 20px;
        box-shadow: 0 0 10px rgba(59,130,246,0.4);
    }

    .sidebar-logo h5,
    .sidebar-logo small {
        transition: opacity 0.3s ease;
    }

.sidebar.collapsed .sidebar-logo h5,
.sidebar.collapsed .sidebar-logo small {
    opacity: 0;
    visibility: hidden;
}

/* Menu */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .menu li {
        margin: 4px 0;
    }

.sidebar.collapsed .menu li {
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
}

.menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #aed0ff;
    text-decoration: none;
    padding: 10px 25px;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .menu li a i {
        font-size: 18px;
        min-width: 25px;
        text-align: center;
        transition: transform 0.3s ease, color 0.3s ease; /* smooth icon scale */
    }

    /* Hover effect using transform */
    .menu li a:hover {
        background-color: #1b2b46;
        color: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        transform: scale(1.03); /* Slight enlarge, smooth and doesn't affect layout */
    }

        .menu li a:hover i {
            transform: scale(1.1); /* Slightly bigger icon */
            color: #fff;
        }

    .menu li a.active {
        background-color: #2563eb;
        color: #fff;
        font-weight: 600;
        box-shadow: 0 0 8px #2563eb;
    }
/* Submenu base styles */
.has-submenu {
    position: relative;
}

    .has-submenu .submenu {
        display: none;
        list-style: none;
        margin: 0;
        padding: 5px 0;
        border-radius: 8px;
        position: static; /* Because we want it to open below, not absolute */
    }

    .has-submenu.open .submenu {
        display: block;
    }
    .has-submenu > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-inline-start: 25px; /* keeps space for icon on right (gear) */
        padding-inline-end: 25px; /* leaves space for arrow on left */
        position: relative;
    }

/* Arrow icon smaller and positioned to far left */
.arrow-icon {
    font-size: 10px; /* smaller arrow */
    color: #aed0ff;
    transition: transform 0.3s ease;
    margin-right: auto; /* pushes it to the far left in RTL */
}

/* Rotate arrow when menu is open */
.has-submenu.open .arrow-icon {
    transform: rotate(180deg);
}

.submenu li a {
    padding: 10px 40px;
}

/* Optional: make submenu more compact when sidebar is collapsed */
.sidebar.collapsed .has-submenu .submenu {
    display: none !important;
}

/* For collapsed sidebar, hide submenu on hover (optional) */
.sidebar.collapsed .has-submenu .submenu {
    display: none !important;
}

/* Collapsed sidebar text hidden */

.sidebar.collapsed .menu a span {
    display: none;
}

.sidebar.collapsed .logo-content {
    display: none;
}

.sidebar.collapsed .menu li a {
    width: 20px;
    justify-content: center;
}

/* Footer */
.sidebar-footer {
    padding: 15px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-footer div {
    display: none;
}

.admin-box {
    background-color: #1e3a8a;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

    .admin-box .admin-icon {
        background-color: #3b82f6;
        border-radius: 50%;
        padding: 12px 15px;
        font-size: 18px;
    }

/* Page and main content */
.page-title {
    padding: 15px 30px;
    background-color: white;
    color: black;
    margin-right: 260px;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.3);
    transition: margin-right 0.3s ease;
    border-radius: 10px;
    display: flex; /* 🔹 Put title and user info side-by-side */
    align-items: center;
    justify-content: space-between;
}

.page-main-title {
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 5px;
    color: #0e1b32;
}

.page-sub-title {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-icon {
    font-size: 25px;
    color: white;
    background-color: var(--secondry-color); /* soft gray circle background */
    border-radius: 50%;
    padding: 3px 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .user-icon:hover {
        background-color: #1e3a8a; /* your global accent color */
        color: #fff;
        transform: scale(1.1);
        box-shadow: 0 4px 10px rgba(203,150,0,0.3);
    }


.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    font-size: 18px;
    color: #0e1b32;
}

.user-role {
    font-size: 13px;
    color: #6b7280;
}


.main-content {
    margin-right: 260px;
    padding: 25px;
    transition: margin-right 0.3s ease;
}

/* Collapse content movement */
.wrapper.collapsed .page-title,
.wrapper.collapsed .main-content {
    margin-right: 85px;
    transition: margin-right 0.3s ease;
}

/* Responsive */
@media(max-width: 992px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content,
    .page-title {
        margin-right: 0;
    }
}
