/* ===== فونت‌های IRANSansX (لوکال) ===== */
@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-UltraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-DemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}


h1, h2, h3, h4, h5, h6 {
    font-family: 'IRANSansX', Tahoma, sans-serif;
    font-weight: 700;
}



/* ===== متغیرهای رنگی ===== */
:root {
    --primary: #016f59;
    --primary-light: #028a6f;
    --primary-dark: #015544;
    --primary-bg: #e9f6f4;
    --primary-bg-hover: #d4f0eb;
    --text-dark: #1a1a2e;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --white: #ffffff;
    --card-shadow: 0 1px 3px rgba(1, 111, 89, 0.06), 0 1px 2px rgba(1, 111, 89, 0.04);
    --card-shadow-hover: 0 4px 12px rgba(1, 111, 89, 0.08), 0 2px 4px rgba(1, 111, 89, 0.04);
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.2s ease;
}

/* ===== استایل‌های پایه ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'IRANSansX', Tahoma, sans-serif;
    font-weight: 400;
    background: #f8fafb;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'IRANSansX', Tahoma, sans-serif;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* ===== Footer ===== */
.footer {
    margin-top: auto;
    background: var(--white) !important;
    border-top: 1px solid var(--border-color);
    padding: 1rem 0 !important;
}

/* ===== Card ===== */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
    box-shadow: none;
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: none;
    border-color: #d1d5db;
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* ===== Badge‌های وضعیت ===== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.status-new {
    background: #fef3c7;
    color: #92400e;
}

.status-inprogress {
    background: #dbeafe;
    color: #1e40af;
}

.status-successful {
    background: #d1fae5;
    color: #065f46;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== دکمه‌ها ===== */
.btn {
    font-family: 'IRANSansX', Tahoma, sans-serif;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
    border: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    color: white;
}

.btn-primary:active,
.btn-primary:focus {
    background: var(--primary-dark) !important;
    box-shadow: 0 0 0 3px rgba(1, 111, 89, 0.15) !important;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
    color: white;
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: var(--text-dark);
}

.btn-light {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.btn-light:hover {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.btn-lg {
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* ===== Form Controls ===== */
.form-control,
.form-select {
    font-family: 'IRANSansX', Tahoma, sans-serif;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.6rem 0.85rem;
    transition: var(--transition);
    background: var(--white);
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(1, 111, 89, 0.08);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* ===== Table ===== */
.table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.table thead th {
    background: #f9fafb;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:hover {
    background: #fafdfc;
}

/* ===== Alert ===== */
.alert {
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ===== Progress Bar ===== */
.progress {
    background: #f3f4f6;
    border-radius: 50px;
    height: 0.6rem;
}

.progress-bar {
    background: var(--primary);
    border-radius: 50px;
}

.progress-bar.bg-success {
    background: var(--primary) !important;
}

/* ===== Modal ===== */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: var(--primary);
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1rem 1.5rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* ===== Navbar ===== */
.navbar {
    background: var(--white) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    box-shadow: none;
}

.navbar-brand {
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.navbar .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}

.navbar .nav-link:hover {
    color: var(--primary) !important;
    background: var(--primary-bg);
}

/* ===== Pagination (صفحه‌بندی) ===== */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.4rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.pagination .active .page-link {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== Dashboard Cards ===== */
.stat-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
    padding: 1.5rem;
    transition: var(--transition);
    text-align: center;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-bg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #016f59 0%, #028a6f 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section * {
    position: relative;
    z-index: 1;
}

/* ===== Accordion ===== */
.accordion-button {
    font-weight: 600;
    font-size: 0.95rem;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(1, 111, 89, 0.1);
    border-color: var(--primary);
}

/* ===== Copy Button ===== */
.copy-btn {
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.copy-btn:hover {
    color: var(--primary);
    transform: none;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== Utility ===== */
.text-primary-custom {
    color: var(--primary) !important;
}

.bg-primary-custom {
    background: var(--primary) !important;
    color: white;
}

.bg-primary-light {
    background: var(--primary-bg) !important;
}

hr {
    border-color: var(--border-color);
    opacity: 1;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}