/* Car Maintenance System Styles */

/* Language-specific styles */
.lang-ar {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
}

.lang-en {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: ltr;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-switcher a {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s;
}

.language-switcher a:hover,
.language-switcher a.active {
    background-color: rgba(255,255,255,0.3);
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.12);
}

.card h2 {
    color: #667eea;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.text-muted {
    color: #6c757d !important;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    margin: 0.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-success { background-color: #28a745; color: white; }
.btn-warning { background-color: #ffc107; color: #333; }
.btn-danger { background-color: #dc3545; color: white; }
.btn-secondary { background-color: #6c757d; color: white; }
.btn-info { background-color: #17a2b8; color: white; }

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}
.table-wrapper {
    width: 100%;
    overflow-x: auto; /* يسمح بالتمرير أفقي للجدول */
}

.table {
    width: 100%;
    min-width: 600px; /* يضمن أن الجدول ما ينضغط مرة */
    border-collapse: collapse;
}
/* Tables */
.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    text-align: center;
    border-top: 4px solid #667eea;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success { background-color: #d4edda; border-left-color: #28a745; color: #155724; }
.alert-danger  { background-color: #f8d7da; border-left-color: #dc3545; color: #721c24; }
.alert-warning { background-color: #fff3cd; border-left-color: #ffc107; color: #856404; }
.alert-info    { background-color: #d7ecf7; border-left-color: #17a2b8; color: #0c5460; }

/* Login/Register Forms */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}

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

/* زر المنيو */
.menu-toggle {
    display: none; /* افتراضي على كل الشاشات */
    font-size: 1.8rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

/* Responsive */
/* Responsive adjustments already exist, نضيف تحسينات إضافية */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* بطاقات تصطف عمودياً */
    }
    .table-wrapper {
        overflow-x: auto; /* يسمح بالتمرير للجدول */
    }
    .form-control {
        font-size: 0.95rem;
    }
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
        .menu-toggle {
        display: block;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
    }
    .auth-card {
        padding: 1rem;
        max-width: 100%;
    }
    .nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.7rem;
    }
    .stat-number {
        font-size: 2rem;
    }
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Loading and animations */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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