/* assets/css/style.css - نسخه نهایی */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #4a5568;
    --primary-dark: #2d3748;
    --accent: #667eea;
    --accent-dark: #5a67d8;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --text-dark: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --radius: 6px;
}

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

body {
    background-color: #edf2f7;
    min-height: 100vh;
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.6;
}

/* نویگیشن بار */
.navbar {
    background: var(--primary-dark) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 0;
    border-bottom: 3px solid var(--accent);
}

.navbar .container {
    padding-top: 8px;
    padding-bottom: 8px;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: white !important;
    letter-spacing: -0.5px;
}

.navbar-brand small {
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 1px;
}

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 10px 14px !important;
    margin: 0 2px;
    border-radius: var(--radius);
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white !important;
}

.nav-link.active {
    background: var(--accent);
    color: white !important;
    font-weight: 600;
}

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 5px 0;
    margin-top: 5px;
}

.dropdown-item {
    font-size: 0.85rem;
    padding: 8px 16px;
    color: var(--text-dark);
}

.dropdown-item:hover {
    background-color: #edf2f7;
    color: var(--accent);
}

/* کارت‌ها */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border);
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 16px;
}

/* ============================================
   استت کارت‌های کوچک - نسخه جمع‌وجور و شیک
   ============================================ */
.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    transition: box-shadow 0.2s;
}

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

.stat-card .icon-wrapper {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-card.primary .icon-wrapper { background: #ebf4ff; color: var(--accent); }
.stat-card.success .icon-wrapper { background: #f0fff4; color: var(--success); }
.stat-card.danger .icon-wrapper { background: #fff5f5; color: var(--danger); }
.stat-card.warning .icon-wrapper { background: #fffaf0; color: var(--warning); }
.stat-card.info .icon-wrapper { background: #ebf8ff; color: var(--info); }

.stat-card .stat-content {
    flex: 1;
    min-width: 0;
}

.stat-card .value {
    font-size: 1.3rem;
    font-weight: 750;
    color: var(--text-dark);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.5;
}

.stat-card .sub {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 1px;
    line-height: 1.3;
}

/* دکمه‌ها */
.btn {
    padding: 8px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

.btn-info {
    background: var(--info);
    border-color: var(--info);
    color: white;
}

.btn-secondary {
    background: #a0aec0;
    border-color: #a0aec0;
    color: white;
}

.btn-lg {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.75rem;
}

.btn-outline-primary {
    border-color: var(--accent);
    color: var(--accent);
}

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

/* فرم‌ها */
.form-control,
.form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 12px;
    font-size: 0.85rem;
    background: var(--bg-white);
    color: var(--text-dark);
    height: 38px;
    transition: border-color 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

.form-control-sm {
    height: 32px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

textarea.form-control {
    height: auto;
}

.input-group-text {
    background: #f7fafc;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    padding: 7px 12px;
}

/* جداول */
.table {
    background: var(--bg-white);
    font-size: 0.85rem;
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #f7fafc;
    border-bottom: 2px solid var(--border);
}

.table thead th {
    padding: 10px 8px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
}

.table tbody td {
    padding: 6px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

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

.table-dark {
    background: var(--primary-dark);
    color: white;
}

.table-dark th {
    color: white;
}

.table-primary {
    background: #ebf4ff;
}

.table-danger {
    background: #fff5f5;
}

.table-warning {
    background: #fffaf0;
}

.table-sm td,
.table-sm th {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* نشان‌ها */
.badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}

.bg-success { background: var(--success) !important; }
.bg-danger { background: var(--danger) !important; }
.bg-warning { background: var(--warning) !important; }
.bg-info { background: var(--info) !important; }
.bg-primary { background: var(--accent) !important; }
.bg-secondary { background: #a0aec0 !important; }

/* هشدارها */
.alert {
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.8rem;
    border: 1px solid transparent;
    margin-bottom: 12px;
}

.alert-info {
    background: #ebf8ff;
    border-color: #bee3f8;
    color: #2c5282;
}

.alert-success {
    background: #f0fff4;
    border-color: #c6f6d5;
    color: #276749;
}

.alert-danger {
    background: #fff5f5;
    border-color: #fed7d7;
    color: #9b2c2c;
}

.alert-warning {
    background: #fffaf0;
    border-color: #feebc8;
    color: #9c4221;
}

/* فوتر */
footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 16px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* اسکرول‌بار */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Utilities */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.fw-bold { font-weight: 700 !important; }
.small { font-size: 0.8rem !important; }

/* Responsive */
@media (max-width: 992px) {
    .stat-card {
        padding: 12px 14px;
        gap: 10px;
    }
    
    .stat-card .icon-wrapper {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1rem;
    }
    
    .stat-card .value {
        font-size: 1.5rem;
    }
    
    .stat-card .label {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 8px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    .table {
        font-size: 0.9rem;
    }
}

/* چاپ */
@media print {
    .navbar, .btn, footer, .alert, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}