/* Navbar base styles extracted from navigation.php */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', 'Inter', sans-serif;
    margin: 0;
    padding-top: 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.navbar-pro {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    height: 80px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 0 0 24px 24px;
    width: 100%;
    max-width: 100vw;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(147, 51, 234, 0.03) 100%);
    border-radius: 0 0 24px 24px;
    pointer-events: none;
}

.navbar-pro:hover {
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.navbar-pro .nav-section {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    position: relative;
    flex: 1;
}

.navbar-pro .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    width: 200px;
    margin: 0 !important;
    position: relative;
    order: -1;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
}

.navbar-pro .logo:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: none;
    border-color: transparent;
}

.navbar-pro .logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.navbar-pro .logo img {
    height: 170px;
    width: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none !important;
    box-shadow: none !important;
    background: none !important;
}

.navbar-pro .logo:hover img {
    transform: scale(1.1) rotate(2deg);
}

.logo-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 1px;
    border-radius: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


.navbar-pro .nav-link {
    background: transparent;
    color: #0f243d;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    height: 48px;
    position: relative;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
}

.navbar-pro .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f75c0 0%, #0b3059 100%);
    border-radius: 14px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}


.navbar-pro .nav-link:hover::before,
.navbar-pro .nav-link.active::before {
    opacity: 1;
    transform: scale(1);
}

.navbar-pro .nav-link:hover,
.navbar-pro .nav-link.active {
    color: #f8fbff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(9, 54, 123, 0.3), 0 2px 6px rgba(0, 0, 0, 0.18);
}


.navbar-pro .nav-link i {
    color: #0f243d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.navbar-pro .nav-link:hover i,
.navbar-pro .nav-link.active i {
    color: #ffffff;
    transform: scale(1.15) rotate(-3deg);
}

.navbar-pro .actions {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    justify-content: center;
}


.actions .circle-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid rgba(156, 216, 255, 0.18);
    color: #e6edf5;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(9, 54, 123, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.actions .circle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f75c0 0%, #0b3059 100%);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.actions .circle-btn:hover::before {
    opacity: 1;
    transform: scale(1);
}

.actions .circle-btn:hover {
    color: #ffffff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(9, 54, 123, 0.3), 0 2px 6px rgba(0, 0, 0, 0.18);
    border-color: rgba(156, 216, 255, 0.3);
}

.actions .circle-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.actions .notif-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}


.user-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 2px solid rgba(156, 216, 255, 0.2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 8px 16px;
    min-width: 140px;
    box-shadow: 0 4px 16px rgba(9, 54, 123, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 56px;
    overflow: visible;
}

.user-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(156, 216, 255, 0.06) 0%, rgba(15, 36, 61, 0.18) 100%);
    border-radius: 22px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-box:hover::before,
.user-box.open::before {
    opacity: 1;
}

.user-box:hover,
.user-box.open {
    box-shadow: 0 8px 24px rgba(9, 54, 123, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    border-color: rgba(156, 216, 255, 0.32);
    transform: translateY(-2px);
}


.user-avatar {
    background: linear-gradient(135deg, #0f75c0 0%, #0b3059 100%);
    color: #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(9, 54, 123, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: transform 0.6s ease;
    transform: translateX(-100%);
}

.user-box:hover .user-avatar::before {
    transform: translateX(100%);
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}


.user-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    color: #0f243d;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}


.user-role {
    font-size: 0.85rem;
    font-weight: 500;
    color: #a0b4cf;
    line-height: 1.2;
    text-transform: capitalize;
}

.user-box .fa-chevron-down {
    color: #64748b;
    font-size: 0.9rem;
    margin-inline-start: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-box.open .fa-chevron-down {
    transform: rotate(180deg);
    color: #3b82f6;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    min-width: 270px;
    max-width: 380px;
    border: 2px solid rgba(59, 130, 246, 0.1);
    z-index: 3000;
    padding: 8px 0;
    overflow: visible;
    animation: dropdownSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlide {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-box.open .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1e293b;
    text-decoration: none;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    white-space: nowrap;
    word-break: normal;
}

.user-dropdown a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 51, 234, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.user-dropdown a:hover::before {
    opacity: 1;
}

.user-dropdown a:hover {
    color: #3b82f6;
    padding-inline-start: 24px;
}

.user-dropdown a i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.user-dropdown a:hover i {
    transform: scale(1.1);
}

.navbar-pro.rtl {
    direction: rtl;
}

.navbar-pro.ltr {
    direction: ltr;
}

.navbar-pro.rtl .user-info {
    align-items: flex-end;
}

.navbar-pro.ltr .user-info {
    align-items: flex-start;
}

.navbar-pro.rtl .user-dropdown {
    right: 0;
    left: auto;
    direction: rtl;
}

.navbar-pro.ltr .user-dropdown {
    left: 0;
    right: auto;
    direction: ltr;
}

@media (max-width: 1024px) {
    .navbar-pro {
        padding: 0 1.5rem;
    }
    .navbar-pro .nav-link {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
}

@media (max-width: 900px) {
    body { padding-top: 72px; }
    .navbar-pro {
        height: 72px;
        min-height: 72px;
        padding: 0 1rem;
        border-radius: 0 0 18px 18px;
    }
    .navbar-pro .nav-section { gap: 10px; }
    .navbar-pro .logo {
        height: 140px;
        width: 140px;
    }
    .navbar-pro .logo img { height: 120px; }
    .navbar-pro .nav-link {
        padding: 10px 12px;
        font-size: 0.93rem;
        height: 44px;
    }
    .navbar-pro .actions .circle-btn { width: 42px; height: 42px; }
    .user-box { padding: 6px 14px; height: 48px; }
    .user-avatar { width: 34px; height: 34px; font-size: 1rem; }
}

@media (max-width: 640px) {
    body { padding-top: 68px; }
    .navbar-pro {
        height: 68px;
        min-height: 68px;
        padding: 0 12px;
        gap: 10px;
    }
    .navbar-pro .nav-section {
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
    }
    .navbar-pro .logo {
        height: 110px;
        width: 110px;
    }
    .navbar-pro .logo img { height: 100px; }
    .navbar-pro .nav-link {
        padding: 8px 10px;
        font-size: 0.9rem;
        border-radius: 12px;
        height: 42px;
    }
    .navbar-pro .actions { gap: 8px; }
    .navbar-pro .actions .circle-btn { width: 38px; height: 38px; font-size: 1rem; }
    .user-box { padding: 6px 12px; gap: 8px; min-width: 0; }
    .user-name { font-size: 0.95rem; }
    .user-role { font-size: 0.8rem; }
    .user-dropdown { min-width: 240px; }
}

@media (max-width: 900px) {
    body {
        padding-top: 70px;
    }
    .navbar-pro {
        height: 70px;
        padding: 0 1rem;
        border-radius: 0 0 20px 20px;
    }
    .navbar-pro .nav-section {
        gap: 8px;
    }
    .navbar-pro .logo {
        margin: 0 !important;
        height: 50px;
        width: 50px;
    }
    .navbar-pro .logo img {
        height: 35px;
    }
    .navbar-pro .nav-link {
        padding: 8px 14px;
        font-size: 0.9rem;
        height: 40px;
    }
    .actions .circle-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    .user-box {
        padding: 6px 16px 6px 12px;
        min-width: 120px;
        height: 44px;
    }
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    .user-name {
        font-size: 0.9rem;
    }
    .user-role {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    body {
        padding-top: 60px;
    }
    .navbar-pro {
        height: 60px;
        padding: 0 0.5rem;
        border-radius: 0 0 16px 16px;
    }
    .navbar-pro .nav-section {
        gap: 4px;
    }
    .navbar-pro .logo {
        height: 40px;
        width: 40px;
        margin: 0 !important;
    }
    .navbar-pro .logo img {
        height: 28px;
    }
    .navbar-pro .nav-link {
        padding: 6px 10px;
        font-size: 0.85rem;
        height: 36px;
        max-width: 100px;
    }
    .navbar-pro .nav-link span {
        display: none;
    }
    .actions {
        gap: 8px;
    }
    .actions .circle-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .user-box {
        padding: 4px 8px;
        min-width: 80px;
        height: 36px;
        gap: 8px;
    }
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    .user-info .user-name {
        font-size: 0.8rem;
    }
    .user-info .user-role {
        display: none;
    }
    .navbar-pro.rtl .user-dropdown {
        right: -20px;
        left: auto;
    }
    .navbar-pro.ltr .user-dropdown {
        left: -20px;
        right: auto;
    }
}

@media (max-width: 480px) {
    .navbar-pro {
        padding: 0 0.25rem;
    }
    .navbar-pro .nav-link {
        padding: 4px 8px;
        max-width: 80px;
    }
    .user-box {
        min-width: 60px;
    }
    .user-info {
        display: none;
    }
    .user-box .fa-chevron-down {
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.navbar-pro .nav-link:focus,
.actions .circle-btn:focus,
.user-box:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .navbar-pro {
        border-bottom: 2px solid #000;
    }
    .navbar-pro .nav-link,
    .actions .circle-btn {
        border: 2px solid #000;
    }
}

@media (prefers-color-scheme: dark) {
    /* Placeholder for future dark mode */
}

@media print {
    .navbar-pro {
        display: none;
    }
    body {
        padding-top: 0;
    }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

.navbar-pro.scrolled {
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}
