:root {
    --primary-color: #1e293b;
    --primary-hover: #0f172a;
    --accent-color: #0284c7;
    --bg-light: #f8fafc;
    --card-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

body {
    direction: rtl;
    text-align: right;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Tahoma, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    font-size: 0.925rem;
}

.navbar {
    background-color: #0f172a !important;
    border-bottom: 1px solid #334155;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 1.15rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
}

.card {
    border: 1px solid var(--card-border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
    margin-bottom: 1.25rem;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
    padding: 0.85rem 1.25rem;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.825rem;
    text-transform: uppercase;
    background-color: #f1f5f9;
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

/* جایگاه دکمه‌های عملیاتی جدول در پایین جدول بر اساس قانون agent.md */
.table-actions-bottom {
    padding: 0.85rem 1.25rem;
    background-color: #f8fafc;
    border-top: 1px solid var(--card-border);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.metric-card {
    padding: 1.25rem;
    border-radius: 10px;
    background-color: #ffffff;
    border: 1px solid var(--card-border);
}

.metric-title {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.metric-currency {
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--text-muted);
    margin-right: 4px;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    border-radius: 6px;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-purchased {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.badge-shipped {
    background-color: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.badge-refunded {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border-radius: 6px;
    border-color: #cbd5e1;
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn {
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.95rem;
}

.btn-primary {
    background-color: #0284c7;
    border-color: #0284c7;
}

.btn-primary:hover {
    background-color: #0369a1;
    border-color: #0369a1;
}

@media (max-width: 768px) {
    .metric-value {
        font-size: 1.15rem;
    }
    .table th, .table td {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    .table-responsive {
        border-radius: 8px;
    }
}
