/* ===== FONT DECLARATION ===== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    line-height: 1.6;
    color: #333;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

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

.main-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    overflow: hidden;
    min-height: calc(100vh - 40px);
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* Standard Header Gradient */
.standard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.header h1 {
    color: white;
    margin-bottom: 0;
    font-size: 2rem;
}

/* ===== NAVIGATION ===== */
.nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-item a {
    color: #495057;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.nav-item a.active {
    background: #667eea;
    color: white;
}

/* ===== FORMS ===== */
.form-container {
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

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

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

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

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

/* ===== TABLES ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: right;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
}

/* ===== CARDS ===== */
.table-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.table-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    font-weight: 600;
}

.table-card .card-body {
    padding: 0;
}

/* ===== FILTERS ===== */
.table-filters {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

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

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.filter-btn,
.clear-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.filter-btn {
    background: #667eea;
    color: white;
}

.filter-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.clear-btn {
    background: #6c757d;
    color: white;
}

.clear-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* ===== TABLE CONTENT ===== */
.table-content {
    background: white;
}

.table-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-row {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.table-row:hover {
    background: #f8f9fa;
}

.table-row.unread {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.table-cell {
    flex: 1;
    padding: 0 10px;
    text-align: right;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-align: center;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    display: inline-block;
}

.status-badge.active,
.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive,
.status-badge.danger {
    background: #f8d7da;
    color: #721c24;
}

/* ===== BUTTON GROUPS ===== */
.btn-group {
    display: flex;
    gap: 5px;
}

.btn-group .btn {
    margin: 0;
}

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

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* ===== PAGINATION ===== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 5px;
    align-items: center;
}

.page-item {
    margin: 0 2px;
}

.page-link {
    display: block;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background: #f8f9fa;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .table-header,
    .table-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .table-cell {
        text-align: center;
        padding: 5px 0;
    }
    
    .table-cell:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #495057;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .table-responsive {
        font-size: 14px;
    }
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    font-weight: 600;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

/* ===== DASHBOARD ===== */
.dashboard {
    padding: 30px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #667eea;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.stat-details {
    font-size: 0.85rem;
    color: #888;
    margin-top: 8px;
    line-height: 1.3;
}

/* ===== FILTERS SECTION ===== */
.filters-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filters-form {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

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

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.filter-btn,
.clear-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.filter-btn {
    background: #667eea;
    color: white;
}

.filter-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.clear-btn {
    background: #6c757d;
    color: white;
}

.clear-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* ===== MARGINS ===== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ===== PADDING ===== */
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ===== FLEXBOX ===== */
.d-flex { display: flex; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* ===== WIDTH & HEIGHT ===== */
.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .filters-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .table-responsive {
        font-size: 14px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

/* ===== TOAST MESSAGES ===== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-right: 4px solid;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-color: #28a745;
}

.toast.error {
    border-color: #dc3545;
}

.toast.warning {
    border-color: #ffc107;
}

.toast.info {
    border-color: #17a2b8;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== PRINT STYLES ===== */
@media print {
    .nav, .btn, .toast-container {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .main-container {
        box-shadow: none;
        margin: 0;
    }
}

/* ===== FORM SECTIONS ===== */
.form-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    color: #495057;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
    font-size: 1.1rem;
}

/* ===== PAGINATION STYLES ===== */
.pagination-section {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.items-per-page-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.items-per-page-control .form-label {
    margin-bottom: 0;
    font-weight: 500;
    color: #495057;
}

.items-per-page-control .form-select {
    width: auto;
    min-width: 80px;
}

.pagination-stats {
    color: #6c757d;
    font-size: 0.9rem;
}

.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: #007bff;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .items-per-page-control {
        justify-content: center;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
} 

 