﻿/* ==========================================================================
   متغيرات الألوان والخطوط (Modern CSS Variables)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --success: #22c55e;
    --dark: #0f172a;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --font-family: 'Cairo', sans-serif;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

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

body {
    background: var(--gray-100);
    color: var(--gray-800);
    font-family: var(--font-family);
    line-height: 1.6;
    text-align: right;
    direction: rtl;
}

/* ==========================================================================
   الأزرار والنماذج (Buttons & Forms) - تعديل الوضوح هنا
   ========================================================================== */

/* إظهار المربعات بوضوح تام على كل الشاشات */
.form-control,
.form-select {
    border: 2px solid var(--gray-600) !important; /* بوردر غامق وصريح */
    background-color: #ffffff !important;
    color: var(--dark) !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    height: auto !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out;
}

    /* عند الضغط للكتابة */
    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
        background-color: #fff !important;
        outline: none !important;
    }

.input-group {
    border: 2px solid var(--gray-600) !important;
    border-radius: 8px !important;
    overflow: hidden;
    background-color: #fff !important;
}

    .input-group .form-control {
        border: none !important;
    }

.input-group-text {
    background-color: var(--gray-100) !important;
    border: none !important;
    color: var(--gray-800) !important;
    border-left: 1px solid var(--gray-600) !important;
    font-weight: 700;
}

.form-label {
    font-weight: 800 !important;
    color: var(--dark) !important;
    margin-bottom: 0.6rem !important;
    font-size: 0.95rem !important;
    display: block;
}

/* ==========================================================================
   الشريط العلوي والقائمة الجانبية (Topbar & Sidebar)
   ========================================================================== */
.topbar {
    height: 65px;
    background-color: var(--dark) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1030;
}

.sidebar {
    width: 260px;
    min-height: calc(100vh - 65px);
    background-color: var(--dark) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-top: 1rem;
    opacity: 1 !important;
    display: block !important;
}

    .sidebar .nav-link {
        color: rgba(255, 255, 255, 0.8) !important;
        font-weight: 600 !important;
        padding: 0.8rem 1.5rem !important;
        margin: 0.25rem 1rem !important;
        border-radius: 8px !important;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 12px;
    }

        .sidebar .nav-link:hover, .sidebar .nav-link.active {
            background-color: var(--primary) !important;
            color: white !important;
            transform: translateX(-5px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

/* ==========================================================================
   كروت السيارات والداش بورد
   ========================================================================== */
.dashboard-card, .car-card {
    border-radius: var(--border-radius) !important;
    background: white !important;
    border: 1px solid var(--gray-200) !important;
    box-shadow: var(--card-shadow) !important;
}

    .car-card.available {
        border-right: 5px solid var(--success) !important;
    }

    .car-card.sold {
        border-right: 5px solid var(--danger) !important;
    }

/* ==========================================================================
   الشاشات الصغيرة (Responsive)
   ========================================================================== */
@media (max-width: 991px) {
    .sidebar {
        width: 80px;
    }

        .sidebar .nav-link span {
            display: none;
        }

        .sidebar .nav-link {
            justify-content: center;
            margin: 0.25rem 0.5rem !important;
        }
}
