/* =====================================================
   منصة وصل للشاحنات - الأنماط الرئيسية
   Wasl Trucks Platform - Main Styles
   ===================================================== */

/* استيراد خط تجوال */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

/* المتغيرات */
:root {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --secondary: #1e293b;
    --secondary-dark: #0f172a;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

/* إعادة تعيين */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* الحاويات */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 500px;
}

.container-md {
    max-width: 800px;
}

/* الأزرار */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* حقول الإدخال */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 16px;
    background: var(--gray-100);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.input-icon {
    position: relative;
}

.input-icon .form-control {
    padding-right: 48px;
}

.input-icon .icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 20px;
    padding-left: 48px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* البطاقات */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
}

/* التنبيهات */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* الشارات */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-accepted {
    background: #dbeafe;
    color: #1e40af;
}

.badge-delivering {
    background: #f3e8ff;
    color: #7c3aed;
}

.badge-delivered {
    background: #d1fae5;
    color: #065f46;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* الهيدر */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 900;
    color: var(--gray-800);
}

.logo-text span {
    font-size: 12px;
    color: var(--gray-500);
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: white;
}

/* القائمة الجانبية */
.sidebar {
    background: var(--secondary-dark);
    width: 280px;
    min-height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    padding: 24px;
    color: white;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(245, 158, 11, 0.2);
    color: var(--primary);
}

.main-content {
    margin-right: 280px;
    padding: 24px;
}

/* الجداول */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px;
    text-align: right;
}

.table th {
    background: var(--gray-100);
    font-weight: 700;
    color: var(--gray-600);
}

.table tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* بطاقات الإحصائيات */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.stat-card.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.stat-card.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.stat-card.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
}

.stat-label {
    opacity: 0.9;
}

/* تتبع الطلب */
.tracking-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 40px 0;
}

.tracking-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 40px;
    left: 40px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
}

.tracking-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.tracking-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.tracking-step.active .tracking-step-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.tracking-step.completed .tracking-step-icon {
    background: var(--success);
    color: white;
}

.tracking-step-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
}

.tracking-step.active .tracking-step-label,
.tracking-step.completed .tracking-step-label {
    color: var(--gray-800);
}

/* جدول الأسعار */
.pricing-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.pricing-table th {
    background: var(--secondary);
    color: white;
    padding: 16px;
    font-weight: 700;
}

.pricing-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

.pricing-table tbody tr:hover td {
    background: var(--gray-50);
}

.price-tag {
    font-weight: 700;
    color: var(--success);
}

/* صفحة تسجيل الدخول */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 16px;
}

.auth-header h2 {
    font-size: 24px;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray-500);
}

.auth-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* صفحة البداية */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.4);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 32px;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 50px;
}

/* متجاوب */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tracking-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .tracking-steps::before {
        display: none;
    }
}

/* أنيميشن */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* مخصص للطباعة */
@media print {
    .sidebar, .header, .btn {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
    }
}
