/* assets/css/dashboard.css */

/* ----------------------------------------------------------- */
/* Dashboard General Styling */
/* This file should be linked AFTER style.css in header.php for dashboard pages */
/* ----------------------------------------------------------- */

/* Body styling specific to dashboard pages */
:root {
            /* الألوان الأساسية */
            --primary-color: #1a73e8;
            --primary-hover: #0d62c9;
            --accent-color: #34a853;
            --danger-color: #ea4335;
            --danger-hover: #d93025;
            --warning-color: #fbbc05;
            --success-color: #34a853;
            
            /* ألوان النص */
            --dark-text: #202124;
            --light-text: #f8f9fa;
            --medium-text: #5f6368;
            
            /* ألوان الخلفية والحدود */
            --light-bg: #f8f9fa;
            --border-color: #dadce0;
            
            /* تأثيرات التصميم */
            --border-radius: 8px;
            --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: var(--light-bg);
            color: var(--dark-text);
            line-height: 1.6;
        }
        
        /* ----------------------------------------------------------- */
        /* Dashboard General Styling */
        /* ----------------------------------------------------------- */
        
        /* Body styling specific to dashboard pages */
        body.dashboard-body {
            background-color: var(--light-bg);
            display: flex;
            min-height: 100vh;
            flex-direction: column;
        }
        
        header {
            background-color: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 1000;
            padding: 0 20px;
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1400px;
            margin: 0 auto;
            height: 70px;
        }
        
        .logo {
            font-size: 1.8rem;
            font-weight: bold;
            color: var(--primary-color);
        }
        
        .user-actions {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .notification-icon {
            position: relative;
            font-size: 1.2rem;
            cursor: pointer;
        }
        
        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background-color: var(--danger-color);
            color: white;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            font-size: 0.7rem;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .user-menu {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--primary-color);
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
        }
        
        main {
            flex: 1;
            display: flex;
            padding-top: 70px; /* ارتفاع الهيدر */
        }
        
        .dashboard-container {
            display: flex;
            width: 100%;
            max-width: 1400px;
            margin: 20px auto;
            background-color: #fff;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            overflow: hidden;
            flex-direction: row;
        }
        
        /* ----------------------------------------------------------- */
        /* Dashboard Sidebar Styling */
        /* ----------------------------------------------------------- */
        .dashboard-sidebar {
            width: 250px;
            background-color: #f8f9fa;
            padding: 20px;
            border-inline-end: 1px solid var(--border-color);
            flex-shrink: 0;
            transition: width 0.3s ease, transform 0.3s ease;
        }
        
        .user-profile-summary {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .user-profile-summary .profile-image {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            object-fit: cover;
            margin-bottom: 10px;
            border: 3px solid var(--primary-color);
            box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.3);
            background-color: #e8f0fe;
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--primary-color);
            font-size: 2rem;
            font-weight: bold;
        }
        
        .user-profile-summary .user-name {
            font-size: 1.3em;
            font-weight: bold;
            color: var(--dark-text);
            margin-bottom: 5px;
        }
        
        .user-profile-summary .user-profession {
            font-size: 0.9em;
            color: #5a6268; /* تحسين التباين */
        }
        
        .dashboard-nav ul {
            list-style: none;
            padding: 0;
        }
        
        .dashboard-nav ul li {
            margin-bottom: 10px;
        }
        
        .dashboard-nav ul li a {
            display: block;
            padding: 10px 15px;
            color: var(--dark-text);
            text-decoration: none;
            border-radius: 5px;
            transition: var(--transition);
            display: flex;
            align-items: center;
            white-space: nowrap;
        }
        
        .dashboard-nav ul li a i {
            margin-inline-end: 10px;
            color: var(--primary-color);
            width: 20px;
            text-align: center;
        }
        
        .dashboard-nav ul li a:hover,
        .dashboard-nav ul li a.active {
            background-color: var(--primary-color);
            color: #fff;
        }
        
        .dashboard-nav ul li a:hover i,
        .dashboard-nav ul li a.active i {
            color: #fff;
        }
        
        /* ----------------------------------------------------------- */
        /* Dashboard Main Content Styling */
        /* ----------------------------------------------------------- */
        .dashboard-main-content {
            flex-grow: 1;
            padding: 20px 30px;
            background-color: #fff;
        }
        
        .dashboard-main-content h1 {
            font-size: 2.2em;
            color: var(--primary-color);
            margin-bottom: 25px;
            border-bottom: 2px solid var(--border-color);
            padding-bottom: 15px;
        }
        
        .dashboard-section {
            background-color: #fbfdff;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .dashboard-section h2 {
            font-size: 1.6em;
            color: var(--dark-text);
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px dashed var(--border-color);
        }
        
        /* Quick Links & Info Boxes */
        .quick-links-box ul,
        .dashboard-info-boxes ul {
            list-style: none;
            padding: 0;
        }
        
        .quick-links-box ul li {
            margin-bottom: 10px;
        }
        
        .quick-links-box ul li a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: bold;
            transition: var(--transition);
            display: flex;
            align-items: center;
        }
        
        .quick-links-box ul li a i {
            margin-inline-end: 8px;
            color: var(--accent-color);
        }
        
        .quick-links-box ul li a:hover {
            color: var(--primary-hover);
        }
        
        .dashboard-info-boxes {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* تحسين الأداء */
            gap: 20px;
            margin-top: 20px;
        }
        
        .info-box {
            background-color: #fff;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: transform 0.2s ease;
        }
        
        .info-box:hover {
            transform: translateY(-5px);
        }
        
        .info-box h3 {
            font-size: 1.3em;
            color: var(--dark-text);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .info-box h3 i {
            margin-inline-end: 10px;
            color: var(--primary-color);
        }
        
        .info-box ul li {
            margin-bottom: 8px;
            font-size: 0.95em;
            color: #555;
        }
        
        .info-box ul li strong {
            color: var(--dark-text);
        }
        
        .info-box .small-text {
            font-size: 0.85em;
            color: #888;
        }
        
        /* ----------------------------------------------------------- */
        /* Notifications Styling */
        /* ----------------------------------------------------------- */
        .notifications-list {
            padding-right: 10px;
            max-height: 400px;
            overflow-y: auto;
        }
        
        .notification-item {
            background-color: #f7f9fc;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        
        .notification-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        
        .notification-header .notification-title {
            font-weight: bold;
            color: var(--dark-text);
            font-size: 1.1em;
            flex-grow: 1;
        }
        
        .notification-header .notification-date {
            font-size: 0.85em;
            color: #888;
            margin-inline-start: 10px;
        }
        
        .notification-message {
            font-size: 0.95em;
            color: #555;
            line-height: 1.6;
            margin-bottom: 10px;
        }
        
        .notification-actions {
            text-align: end;
            margin-top: 10px;
        }
        
        .view-notification-btn,
        .delete-notification-btn {
            background-color: var(--primary-color);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.9em;
            transition: var(--transition);
            margin-inline-end: 10px;
        }
        
        .delete-notification-btn {
            background-color: var(--danger-color);
            margin-inline-end: 0;
        }
        
        .view-notification-btn:hover {
            background-color: var(--primary-hover);
            transform: translateY(-2px); /* إضافة تأثير تحويل */
        }
        
        .delete-notification-btn:hover {
            background-color: var(--danger-hover);
            transform: translateY(-2px); /* إضافة تأثير تحويل */
        }
        
        /* ----------------------------------------------------------- */
        /* Focus States for Accessibility */
        /* ----------------------------------------------------------- */
        a:focus,
        button:focus,
        input:focus,
        select:focus,
        textarea:focus {
            outline: 2px solid var(--primary-color);
            outline-offset: 3px;
        }
        
        /* ----------------------------------------------------------- */
        /* Responsive Design for Dashboard */
        /* ----------------------------------------------------------- */
        
        /* شاشات الأجهزة اللوحية واللابتوب الصغيرة (أقل من 992px) */
        @media (max-width: 992px) {
            .dashboard-container {
                flex-direction: column;
                margin: 15px auto;
                max-width: 95%;
                box-shadow: none;
            }
        
            .dashboard-sidebar {
                width: 100%;
                border-inline-end: none;
                border-bottom: 1px solid var(--border-color);
                padding-bottom: 20px;
            }
        
            .user-profile-summary {
                display: flex;
                align-items: center;
                text-align: start;
                justify-content: center;
                flex-wrap: wrap;
            }
        
            .user-profile-summary .profile-image {
                margin-inline-end: 15px;
                margin-bottom: 0;
            }
        
            .dashboard-nav ul {
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                margin-top: 20px;
            }
        
            .dashboard-nav ul li {
                margin: 5px 8px;
            }
        
            .dashboard-nav ul li a {
                padding: 8px 12px;
                font-size: 0.9em;
            }
        
            .dashboard-main-content {
                padding: 20px;
            }
        
            .dashboard-info-boxes {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
        }
        
        /* شاشات الهواتف الصغيرة (أقل من 768px) */
        @media (max-width: 768px) {
            main {
                padding-top: 70px;
            }
        
            .dashboard-container {
                margin: 10px auto;
                border-radius: 0;
                box-shadow: none;
            }
        
            .dashboard-sidebar {
                padding: 15px;
            }
        
            .user-profile-summary {
                flex-direction: column;
                text-align: center;
            }
        
            .user-profile-summary .profile-image {
                margin-inline-end: 0;
                margin-bottom: 10px;
            }
        
            .user-profile-summary .user-name,
            .user-profile-summary .user-profession {
                white-space: normal;
            }
        
            .dashboard-nav ul {
                flex-direction: column;
                align-items: center;
                overflow-x: auto; /* إضافة تمرير أفقي للقائمة */
                flex-wrap: nowrap;
                padding-bottom: 10px;
            }
        
            .dashboard-nav ul li {
                margin-bottom: 8px;
                width: 100%;
                text-align: center;
            }
        
            .dashboard-nav ul li a {
                justify-content: center;
                padding: 10px;
                font-size: 1em;
            }
        
            .dashboard-main-content {
                padding: 15px;
            }
        
            .dashboard-main-content h1 {
                font-size: 1.8em;
                margin-bottom: 20px;
                padding-bottom: 10px;
            }
        
            .dashboard-section h2 {
                font-size: 1.4em;
                margin-bottom: 15px;
                padding-bottom: 8px;
            }
        
            .dashboard-info-boxes {
                grid-template-columns: 1fr;
                gap: 15px;
            }
        
            .info-box h3 {
                font-size: 1.2em;
            }
        
            .notification-header {
                flex-direction: column;
                align-items: flex-start;
            }
        
            .notification-header .notification-date {
                margin-inline-start: 0;
                margin-top: 5px;
            }
        
            .notification-actions {
                flex-direction: column;
                align-items: center;
            }
        
            .view-notification-btn,
            .delete-notification-btn {
                width: 100%;
                margin-inline-end: 0;
                margin-bottom: 10px;
            }
        }
        
        /* ----------------------------------------------------------- */
        /* Utility Classes */
        /* ----------------------------------------------------------- */
        .text-center { text-align: center; }
        .mb-20 { margin-bottom: 20px; }
        .mt-20 { margin-top: 20px; }
        .flex { display: flex; }
        .flex-column { flex-direction: column; }
        .justify-center { justify-content: center; }
        .align-center { align-items: center; }
        .gap-10 { gap: 10px; }
        .gap-20 { gap: 20px; }
        .p-20 { padding: 20px; }
        .w-100 { width: 100%; }