/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap');

* {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f1f5f9;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* اعداد در تمام المان‌ها به صورت فارسی نمایش داده می‌شوند */
input, select, textarea, button, label, td, th, div, span, p, h1, h2, h3, h4, h5, h6 {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* برای input هایی که عدد وارد می‌شوند */
input[type="number"],
input[type="text"],
input[type="tel"] {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* برای اعداد در جداول */
table td, table th {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* برای کارت‌های آماری */
.stat-card .number {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== نوار ناوبری ===== */
nav {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 12px 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

nav .brand {
    font-size: 20px;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

nav .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

nav .user-info .name {
    color: #374151;
}

nav .user-info .role-badge {
    background: #e5e7eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

nav .user-info .logout-btn {
    color: #ef4444;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

nav .user-info .logout-btn:hover {
    background: #fef2f2;
}

/* ===== صفحه اصلی ===== */
.page-title {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 24px;
}

.welcome-text {
    color: #6b7280;
    margin-bottom: 32px;
}

/* ===== کارت‌های داشبورد ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.dashboard-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.dashboard-card .icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.dashboard-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.dashboard-card p {
    color: #6b7280;
    font-size: 14px;
}

/* ===== فرم‌ها ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== دکمه‌ها ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #2563eb;
    color: white;
}
.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: #22c55e;
    color: white;
}
.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #ef4444;
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}
.btn-warning:hover {
    background: #d97706;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}
.btn-outline:hover {
    background: #f3f4f6;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ===== جدول‌ها ===== */
.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: right;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

table tr:hover {
    background: #f8fafc;
}

/* ===== کارت‌ها ===== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

/* ===== پیام‌ها ===== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

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

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

/* ===== بج‌ها ===== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

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

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

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

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

.badge-purple {
    background: #e9d5ff;
    color: #6b21a8;
}

/* ===== مدال‌ها ===== */
.medal-gold { color: #f59e0b; font-weight: bold; }
.medal-silver { color: #9ca3af; font-weight: bold; }
.medal-bronze { color: #d97706; font-weight: bold; }

/* ===== صفحه ورود ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.login-box .subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 32px;
}

.login-box .test-info {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 16px;
}

/* ===== ایمپورت ===== */
.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.upload-zone input[type="file"] {
    display: none;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    nav .container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    nav .user-info {
        justify-content: space-between;
    }
    
    .login-box {
        padding: 24px;
        margin: 16px;
    }
    
    table {
        font-size: 13px;
    }
    
    table th, table td {
        padding: 8px 10px;
    }
}