/* style.css - Xlance Express - نسخة متجاوبة بالكامل */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
    min-height: 100vh;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    margin: 20px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    color: #333;
    font-size: 36px;
    margin-bottom: 10px;
}

.tagline {
    font-size: 20px;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 15px 25px;
    background: #f8f9fa;
    border-radius: 15px;
    min-width: 120px;
    transition: transform 0.3s;
    flex: 1;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Buttons */
.buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 16px;
    cursor: pointer;
    border: none;
    font-family: 'Tajawal', sans-serif;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ff4757;
    color: white;
}

.btn-danger:hover {
    background: #ff3838;
}

.btn-success {
    background: #2ed573;
    color: white;
}

.btn-success:hover {
    background: #26c065;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Alert Messages */
.alert {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: right;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

/* Order Status Badges */
.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending {
    background: #ffeaa7;
    color: #d63031;
}

.status-processing {
    background: #b2bec3;
    color: #2d3436;
}

.status-delivering {
    background: #74b9ff;
    color: #0984e3;
}

.status-delivered {
    background: #55efc4;
    color: #00b894;
}

.status-cancelled {
    background: #ff7675;
    color: #d63031;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    padding: 20px;
    transition: all 0.3s;
}

.sidebar .logo-small {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar .logo-small img {
    width: 80px;
    border-radius: 50%;
}

.sidebar .user-info {
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
}

.sidebar .user-name {
    font-weight: bold;
    font-size: 18px;
}

.sidebar .user-role {
    font-size: 12px;
    color: #bdc3c7;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 10px;
}

.sidebar nav ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background: #34495e;
}

.main-content {
    flex: 1;
    background: #f5f6fa;
    padding: 20px;
    transition: all 0.3s;
}

.main-header {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.main-header h2 {
    color: #333;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: white;
    width: 100%;
}

/* ============================================ */
/* RESPONSIVE DESIGN - تحسينات التجاوب */
/* ============================================ */

/* الأجهزة الكبيرة (ديسكتوب) */
@media (min-width: 1200px) {
    .container {
        max-width: 700px;
        padding: 60px;
    }
    
    h1 {
        font-size: 42px;
    }
    
    .btn {
        padding: 14px 35px;
        font-size: 18px;
    }
}

/* الأجهزة المتوسطة (تابلت - لاندسكيب) */
@media (max-width: 1024px) {
    .container {
        max-width: 550px;
        padding: 40px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 12px 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
}

/* الأجهزة المتوسطة (تابلت - بورتريه) */
@media (max-width: 768px) {
    .container {
        margin: 15px;
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .tagline {
        font-size: 18px;
    }
    
    .description {
        font-size: 14px;
    }
    
    .logo {
        width: 100px;
        height: 100px;
    }
    
    .stats-section {
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .stat-item {
        min-width: 90px;
        padding: 10px 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .buttons {
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    /* Dashboard Sidebar */
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
    }
    
    .main-content {
        margin-right: 0;
    }
    
    /* Cards Grid */
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    /* Tables */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table table {
        min-width: 600px;
    }
    
    /* Charts */
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px;
    }
    
    /* Forms */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .btn-sm {
        padding: 8px 15px;
    }
}

/* الأجهزة الصغيرة (موبايل) */
@media (max-width: 480px) {
    body {
        padding: 0;
    }
    
    .hero {
        padding: 20px 10px;
    }
    
    .container {
        padding: 25px 15px;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .tagline {
        font-size: 16px;
    }
    
    .description {
        font-size: 13px;
        margin-bottom: 25px;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .stats-section {
        gap: 10px;
        margin-bottom: 25px;
    }
    
    .stat-item {
        min-width: 70px;
        padding: 8px 12px;
        border-radius: 12px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .features {
        gap: 15px;
        margin-top: 20px;
    }
    
    .feature i {
        font-size: 24px;
    }
    
    .feature h4 {
        font-size: 12px;
    }
    
    .feature p {
        font-size: 10px;
    }
    
    /* Stats Grid for Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: right;
        gap: 15px;
        padding: 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .stat-info h3 {
        font-size: 20px;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* Cards */
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header h3 {
        font-size: 16px;
    }
    
    /* Order Cards */
    .order-card {
        padding: 15px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-detail {
        flex-direction: column;
    }
    
    .detail-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-actions .btn,
    .order-actions form {
        width: 100%;
    }
    
    /* WhatsApp Button */
    .whatsapp-float {
        bottom: 15px;
        left: 15px;
    }
    
    .whatsapp-btn {
        padding: 10px;
        border-radius: 50px;
    }
    
    .whatsapp-btn span {
        display: none;
    }
    
    .whatsapp-btn i {
        font-size: 24px;
        margin: 0;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 20px;
        padding: 20px;
    }
    
    /* Tabs */
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: center;
        padding: 10px;
    }
    
    footer {
        font-size: 12px;
        padding: 15px;
    }
}

/* الأجهزة الصغيرة جداً (iPhone SE 320px) */
@media (max-width: 360px) {
    .container {
        padding: 20px 12px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .stat-item {
        min-width: 60px;
        padding: 6px 10px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* تحسينات للشاشات العالية (لابتوب) */
@media (min-width: 1400px) {
    .container {
        max-width: 800px;
        padding: 70px;
    }
    
    h1 {
        font-size: 48px;
    }
    
    .tagline {
        font-size: 24px;
    }
    
    .description {
        font-size: 18px;
    }
}

/* تحسينات للطباعة */
@media print {
    .sidebar,
    .whatsapp-float,
    .btn,
    .logout-btn,
    .filter-section {
        display: none;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}

/* تحسينات للوضع الداكن (اختياري) */
@media (prefers-color-scheme: dark) {
    /* يمكن إضافة تنسيقات للوضع الداكن إذا رغبت */
}

/* تحسينات للشاشات التي تعمل باللمس */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .stat-card:hover,
    .order-card:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}