﻿/*
    site pallete
    #1F2937
    #22344B
    #CC5F2B
    #E0BE8A
    #F1F1F1
*/

html {
    font-size: 14px;
    direction: rtl;
    text-align: right;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #3B82F6; /* Updated focus ring */
}

html {
    position: relative;
    min-height: 100%;
}

body {
    padding-top: 0; /* Default (for PC) */
    background-color: #F1F1F1; /* Updated background */
}

@media screen and (max-width: 768px) {
    body {
        padding-top: 50px; /* ✅ Push content down (mobile only) */
    }
}

/* ✅ Top Bar for Mobile */
.topbar {
    display: none; /* Hidden on desktop */
    width: 100%;
    height: 50px;
    background-color: #1F2937; /* Updated sidebar color */
    color: white;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

/* ✅ Centered Logo */
.topbar-logo {
    height: 40px;
    margin: 0 auto;
}

/* ✅ Sidebar Toggle Button */
.sidebar-toggler {
    display: none; /* Hide by default (only show on mobile) */
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1100;
}

/* ✅ Sidebar */
.sidebar {
    height: 100vh; /* ✅ Full viewport height */
    width: 250px;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #1F2937; /* Updated sidebar color */
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    overflow-y: auto; /* ✅ Enable scrolling for entire sidebar */
}

    .sidebar ul {
        flex-grow: 1;
        list-style: none;
        padding: 0;
        margin: 0;
        white-space: nowrap; /* ✅ Prevents text from wrapping */
    }

    /* ✅ Fix Logo Position in Sidebar */
    .sidebar .sidebar-logo {
        width: 80%;
        display: block;
        margin: 0 auto 20px; /* ✅ Add margin below the logo */
        border-radius: 10px;
    }

    .sidebar .nav-link {
        color: white;
        padding: 10px;
        text-align: right;
    }

        .sidebar .nav-link:hover {
            background-color: #3B82F6; /* Updated hover color */
        }

/* ✅ Content Adjustment */
.content {
    margin-right: 250px;
    padding: 20px;
    transition: all 0.3s;
    background-color: rgba(249, 250, 251, 0); /* #F9FAFB with 50% opacity */
}

/* ✅ Mobile View */
@media screen and (max-width: 768px) {
    .topbar {
        display: flex;
    }

    .sidebar {
        right: -250px;
        padding-top: 60px; /* Adjusted for topbar */
    }

    .content {
        margin-right: 0;
    }

    .sidebar-toggler {
        display: block;
    }
}

/* ✅ When Sidebar is Active */
@media screen and (min-width: 769px) {
    .sidebar {
        padding-top: 20px; /* ✅ Ensure logo has space */
    }

    .topbar {
        display: none !important;
    }
}

.sidebar.active {
    right: 0;
}

.content.active {
    margin-right: 250px;
}

/* ✅ Fix Sidebar Logo Placement */
.sidebar-logo-desktop {
    width: 80%;
    margin: 10px auto;
    border-radius: 10px;
    flex-shrink: 0; /* ✅ Prevents logo from shrinking when scrolling */
}

/* ✅ Hide Sidebar Logo on Mobile */
@media screen and (max-width: 768px) {
    .sidebar {
        right: -250px;
        padding-top: 60px;
    }

    .content {
        margin-right: 0;
    }

    .sidebar-logo-desktop {
        display: none;
    }
}

/* ✅ Style the Logout Button */
.logout-form {
    width: 100%;
}

.logout-button {
    width: 100%;
    background: none;
    border: none;
    color: white;
    text-align: right;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    display: block;
}

    .logout-button:hover {
        background-color: #3B82F6; /* Updated logout hover */
    }

.notification-circle {
    position: absolute;
    top: 5px;
    left: 10px; /* Adjust based on sidebar alignment (rtl) */
    width: 20px;
    height: 20px;
    background-color: #FBBF24; /* Updated notification circle */
    color: #1F2937; /* Updated notification text color */
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}
/* ✅ Table Styling */
table {
    width: 100%;
    border-collapse: collapse; /* ✅ Remove double borders */
}

    table th, table td {
        border: 1px solid #ccc; /* ✅ Light gray border for all cells */
        padding: 8px; /* ✅ Comfortable padding */
        text-align: right; /* ✅ RTL alignment */
    }

    /* ✅ Force Dark Header */
    table thead tr th {
        background-color: #1F2937 !important; /* ✅ Your sidebar dark color */
        color: white !important; /* ✅ Force white text */
    }


    /* ✅ Striped Rows */
    table tbody tr:nth-child(odd) {
        background-color: rgba(249, 250, 251, 1); /* ✅ Light stripe for odd rows */
    }
    table tbody tr:nth-child(even) {
        background-color: rgba(255, 255, 255, 1); /* ✅ Light stripe for odd rows */
    }