/* إعادة تعيين الخطوط والألوان */
:root {
    /* Brand identity palette */
    --primary-color: #2FA9E0; /* 2985C */
    --primary-light: #1691D0; /* 299C */
    --accent-color: #3AC0C3; /* 7479C */
    --success-color: #48AD48; /* 802C */
    --warning-color: #F59E0B;
    --light-gray: #ecf0f1;
    --dark-gray: #95a5a6;
    --text-dark: #283A83; /* 072C for emphasis */
    --text-light: #7f8c8d;
    --white: #ffffff;
    --border-color: #e1e8ed;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    color: var(--text-dark);
    line-height: 1.6;
}

/* تحسينات الـ Header */
.enhanced-header {
    background: linear-gradient(135deg, #15508A 0%, var(--primary-color) 100%);
    box-shadow: var(--shadow-medium);
    border-bottom: 3px solid var(--primary-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}



.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    font-size: 0.85rem;
    color: #bdc3c7;
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-welcome {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.welcome-text {
    font-size: 0.8rem;
    color: #bdc3c7;
}

.user-name {
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--border-radius);
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.logout-form {
    margin: 0;
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background-color:red;
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* تحسينات الـ Sidebar */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

.enhanced-sidebar {
    width: 280px;
    background: var(--white);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    padding: 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.sidebar-title svg {
    color: var(--primary-light);
}

.nav-section {
    padding: 1.5rem 0;
}

.nav-section-title {
    padding: 0 1.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    font-weight: 500;
}

.nav-item:hover {
    background: #f0f9ff;
    color: var(--primary-light);
    transform: translateX(-2px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-light) 0%, #2FA9E0 100%);
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--white);
    border-radius: 2px;
}

.nav-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.nav-item-text {
    font-size: 0.95rem;
}

.main-content {
    flex: 1;
    padding: 2rem;
    background: #f8fafc;
    min-height: calc(100vh - 80px);
}

/* تحسينات عامة */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .header-brand {
        justify-content: center;
    }

    .header-actions {
        justify-content: center;
        width: 100%;
    }

    .user-welcome {
        order: -1;
        align-items: center;
    }

    .enhanced-sidebar {
        width: 100%;
        position: static;
        height: auto;
    }

    .admin-layout {
        flex-direction: column;
    }

    .main-content {
        padding: 1rem;
    }

    .action-btn .btn-text {
        display: none;
    }

    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 1.25rem;
    }

    .nav-item {
        padding: 0.75rem 1rem;
    }

    .sidebar-header {
        padding: 1rem;
    }

    .nav-section {
        padding: 1rem 0;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-card {
        padding: 1.5rem;
    }
}

/* Language Switcher Styles */
.language-switcher {
    display: flex;
    align-items: center;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    justify-content: center;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    color: var(--white);
    text-decoration: none;
}

.language-btn:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
    color: var(--white);
    text-decoration: none;
}

.language-btn:active {
    transform: translateY(0);
}
