

:root {
    --navbar-height: 68px;
    --sidebar-w-collapsed: 68px;
    --sidebar-w-expanded: 260px;
    

    --ubma-navy-dark: #070d19;      
    --ubma-navy: #0b172a;           
    --ubma-navy-light: #162a4a;     
    --ubma-gold: #c59b27;           
    --ubma-gold-light: #dfb74a;     
    
    --sidebar-bg: #091322;          
    --sidebar-icon-color: #94a3b8;  
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
    
    --body-bg: #f1f5f9;            
    --card-border: #e2e8f0;
}


html[dir="rtl"] body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    text-align: right;
}

html[dir="ltr"] body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    text-align: left;
}

body {
    background-color: var(--body-bg);
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--navbar-height);
}

main {
    flex: 1 0 auto;
}


body.has-sidebar {
    padding-inline-start: var(--sidebar-w-collapsed);
    transition: padding-inline-start 0.25s ease-in-out;
}

@media (min-width: 992px) {
    body.has-sidebar.sidebar-open {
        padding-inline-start: var(--sidebar-w-expanded);
    }
}



.navbar-ubma {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background-color: var(--ubma-navy);
    border-bottom: 2px solid var(--ubma-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1050; 
}

.navbar-ubma .nav-link {
    color: #cbd5e1;
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navbar-ubma .nav-link:hover,
.navbar-ubma .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.navbar-brand-badge {
    font-size: 0.7rem;
    background: linear-gradient(135deg, var(--ubma-gold), var(--ubma-gold-light));
    color: var(--ubma-navy-dark);
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   الواجهة الترحيبية الكحلية الفاخرة (Hero Section)
   ========================================================================== */
.hero-section {
    background: #0b172a linear-gradient(135deg, #070d19 0%, #0b172a 50%, #162a4a 100%) !important;
    color: #ffffff !important;
    padding: 4.5rem 0;
    border-bottom: 4px solid var(--ubma-gold);
    position: relative;
    overflow: hidden;
}

.hero-section h1,
.hero-section .display-4 {
    color: #ffffff !important;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-section p.lead {
    color: #e2e8f0 !important;
    opacity: 0.95 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.hero-section .btn-outline-light:hover {
    background-color: #ffffff !important;
    color: #070d19 !important;
    border-color: #ffffff !important;
}

.hero-section i.bi-buildings {
    color: var(--ubma-gold) !important;
    opacity: 0.8 !important;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.app-sidebar {
    position: fixed;
    top: var(--navbar-height); 
    bottom: 0;
    inset-inline-start: 0;
    width: var(--sidebar-w-collapsed);
    background-color: var(--sidebar-bg);
    border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
}

.app-sidebar.expanded {
    width: var(--sidebar-w-expanded);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}


.sidebar-toggle-row {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 0.5rem;
}

.app-sidebar.expanded .sidebar-toggle-row {
    justify-content: space-between;
    padding: 0 1rem;
}

.sidebar-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ubma-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: var(--ubma-gold);
    color: var(--ubma-navy-dark);
}


.sidebar-nav {
    list-style: none;
    padding: 0.75rem 0.5rem;
    margin: 0;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    color: var(--sidebar-icon-color);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.35rem;
    white-space: nowrap;
    position: relative;
    transition: all 0.2s ease;
}

.sidebar-link i.link-icon {
    font-size: 1.3rem;
    min-width: 38px;
    text-align: center;
    color: var(--sidebar-icon-color);
    transition: color 0.2s ease;
}

.sidebar-link .link-title {
    margin-inline-start: 0.75rem;
    opacity: 0;
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #e2e8f0;
}

.app-sidebar.expanded .sidebar-link .link-title {
    opacity: 1;
    display: inline-block;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: var(--sidebar-hover-bg);
    color: #ffffff;
}

.sidebar-link:hover i.link-icon,
.sidebar-link.active i.link-icon {
    color: var(--ubma-gold-light);
}


.sidebar-heading {
    display: none;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: #64748b;
    font-weight: 700;
    padding: 0.85rem 0.85rem 0.3rem;
    white-space: nowrap;
}

.app-sidebar.expanded .sidebar-heading {
    display: block;
}


.sidebar-badge {
    position: absolute;
    top: 6px;
    inset-inline-start: 26px;
    font-size: 0.65rem;
    padding: 0.2em 0.45em;
    background-color: #dc2626;
    color: #fff;
    border-radius: 10px;
}

.app-sidebar.expanded .sidebar-badge {
    position: static;
    margin-inline-start: auto;
}


.sidebar-profile-card {
    display: none;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-sidebar.expanded .sidebar-profile-card {
    display: flex;
    align-items: center;
}


.card-ubma {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-ubma:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.btn-ubma {
    background-color: var(--ubma-navy);
    color: #ffffff;
    border: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-ubma:hover {
    background-color: var(--ubma-navy-light);
    color: #ffffff;
}

.btn-gold {
    background-color: var(--ubma-gold);
    color: var(--ubma-navy-dark);
    border: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-gold:hover {
    background-color: var(--ubma-gold-light);
    color: var(--ubma-navy-dark);
}

.avatar-lg {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.avatar-nav {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--ubma-gold);
}

.footer-ubma {
    background-color: var(--ubma-navy-dark);
    color: #94a3b8;
    border-top: 2px solid var(--ubma-gold);
    padding: 2.5rem 0 1.5rem 0;
}

.footer-ubma a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-ubma a:hover {
    color: var(--ubma-gold);
}