* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0F172A;
    color: #F1F5F9;
    line-height: 1.6;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Sidebar - تصميم سطح المكتب (Desktop)
   ============================================ */

.sidebar {
    width: 280px;
    background: #1E293B;
    padding: 30px 20px;
    border-right: 1px solid #334155;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
}

.logo span:first-child {
    color: #3B82F6;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 4px 0;
    border-radius: 12px;
    color: #94A3B8;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover, .nav-item.active {
    background: #3B82F6;
    color: white;
}

.download-btn, .logout-btn {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.download-btn {
    background: #10B981;
    color: white;
}

.download-btn:hover {
    background: #059669;
}

.logout-btn {
    background: #EF4444;
    color: white;
}

.logout-btn:hover {
    background: #DC2626;
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Welcome Card */
.welcome-card {
    background: #1E293B;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
}

.user-greeting {
    margin-bottom: 30px;
}

.user-greeting h2 {
    font-size: 1.8rem;
}

.user-greeting p {
    color: #94A3B8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: #0F172A;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: #1E293B;
}

.stat-card i {
    font-size: 2rem;
    color: #3B82F6;
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 1.8rem;
    margin: 10px 0;
    color: #3B82F6;
}

/* Confirmation Images */
.confirmation-images {
    background: #1E293B;
    border-radius: 24px;
    padding: 30px;
}

.confirmation-images h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.image-card {
    background: #0F172A;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-card p {
    padding: 10px;
    font-size: 0.8rem;
    color: #94A3B8;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #64748B;
}

/* Progress Timeline */
.progress-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.timeline-day {
    background: #1E293B;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.timeline-day:hover {
    transform: translateY(-3px);
}

.timeline-day.completed {
    border: 1px solid #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.timeline-day .day-number {
    font-weight: 700;
    margin-bottom: 10px;
}

.timeline-day .day-status {
    font-size: 0.8rem;
    margin: 10px 0;
}

.timeline-day.completed .day-status {
    color: #10B981;
}

.view-report {
    color: #3B82F6;
    text-decoration: none;
    font-size: 0.8rem;
    cursor: pointer;
}

.view-report:hover {
    text-decoration: underline;
}

/* Reports List */
.reports-list {
    margin-top: 20px;
}

.report-card {
    background: #1E293B;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.report-card:hover {
    transform: translateX(5px);
}

.report-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.report-header h4 {
    color: #3B82F6;
}

.report-date {
    font-size: 0.8rem;
    color: #94A3B8;
}

.report-content {
    margin-bottom: 15px;
}

.report-content p {
    margin: 8px 0;
}

.download-report-btn {
    background: #3B82F6;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.download-report-btn:hover {
    background: #2563EB;
}

/* Support */
.support-card {
    background: #1E293B;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.support-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #334155;
}

.support-info:last-child {
    border-bottom: none;
}

.support-info i {
    font-size: 1.5rem;
    color: #3B82F6;
}

.support-info h4 {
    margin-bottom: 5px;
}

.support-info a {
    color: #3B82F6;
    text-decoration: none;
}

.support-info a:hover {
    text-decoration: underline;
}

.contact-form {
    background: #1E293B;
    border-radius: 16px;
    padding: 30px;
}

.contact-form h4 {
    margin-bottom: 15px;
}

.contact-form textarea {
    width: 100%;
    padding: 12px;
    background: #0F172A;
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    margin: 15px 0;
    resize: vertical;
}

.contact-form textarea:focus {
    outline: none;
    border-color: #3B82F6;
}

.send-btn {
    background: #3B82F6;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.send-btn:hover {
    background: #2563EB;
}

/* Report Modal */
.report-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.report-modal-content {
    background: #1E293B;
    border-radius: 24px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.report-modal-content .close-modal {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #94A3B8;
}

.report-modal-content .close-modal:hover {
    color: #EF4444;
}

.screenshots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.screenshots img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.download-pdf-btn {
    background: #10B981;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    margin-top: 20px;
    width: 100%;
}

/* ============================================
   تصميم متجاوب (Responsive) للهواتف والأجهزة اللوحية
   ============================================ */

/* للأجهزة اللوحية (عرض أقل من 992px) */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* للأجهزة اللوحية والهواتف الكبيرة (عرض أقل من 768px) */
@media (max-width: 768px) {
    /* تحويل الـ Sidebar إلى أعلى الصفحة */
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #334155;
        padding: 15px 20px;
        overflow-y: visible;
    }

    .sidebar .logo {
        margin-bottom: 15px;
        text-align: center;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav-item {
        padding: 8px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .nav-item i {
        margin-right: 5px;
    }

    /* أزرار التحميل والخروج */
    .download-btn, .logout-btn {
        width: auto;
        display: inline-block;
        margin: 10px 5px 0;
        padding: 8px 20px;
    }

    /* تجميع الأزرار في صف */
    .sidebar {
        display: flex;
        flex-direction: column;
    }

    .sidebar-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 10px;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .welcome-card {
        padding: 20px;
    }

    .user-greeting h2 {
        font-size: 1.4rem;
    }
}

/* للهواتف الصغيرة (عرض أقل من 480px) */
@media (max-width: 480px) {
    .sidebar {
        padding: 12px;
    }

    .sidebar nav {
        flex-direction: row;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 6px;
        padding-bottom: 5px;
    }

    .nav-item {
        padding: 6px 12px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .nav-item i {
        margin-right: 4px;
        font-size: 0.8rem;
    }

    .download-btn, .logout-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card h3 {
        font-size: 1.4rem;
    }

    .images-grid {
        grid-template-columns: 1fr;
    }

    .progress-timeline {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .main-content {
        padding: 15px;
    }
}

/* للهواتف الصغيرة جداً (عرض أقل من 360px) - إظهار أيقونات فقط لتوفير المساحة */
@media (max-width: 360px) {
    .nav-item span {
        display: none;
    }

    .nav-item i {
        margin-right: 0;
        font-size: 1.1rem;
    }

    .nav-item {
        padding: 8px;
    }
}

/* RTL Support for Dashboard */
[dir="rtl"] body {
    font-family: 'Tajawal', 'Inter', sans-serif;
}

[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid #334155;
}

@media (max-width: 768px) {
    [dir="rtl"] .sidebar {
        border-left: none;
    }
}

[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: 280px;
}

@media (max-width: 768px) {
    [dir="rtl"] .main-content {
        margin-right: 0;
    }
}

[dir="rtl"] .nav-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .report-header {
    flex-direction: row-reverse;
}

