@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --sidebar-width: 280px;
    --primary: #1e3a5f;
    --primary-light: #2d5a8e;
    --accent: #0ea5e9;
    --transit-stage-current: #1e3a8a;
    --transit-stage-current-bg: #eff6ff;
    --transit-stage-current-border: #2563eb;
    --transit-stage-done: #15803d;
    --transit-stage-done-bg: #f0fdf4;
    --transit-stage-done-border: #22c55e;
    --transit-stage-pending-bg: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f0f4f8;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar-bg: linear-gradient(180deg, #1e3a5f 0%, #0f2744 100%);
    --modal-edge-inset: 0.3cm;
}

* { box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    direction: rtl;
    font-size: 14px;
    line-height: 1.7;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Right side in RTL */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1050;
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand i {
    font-size: 2rem;
    color: var(--accent);
}

.brand strong {
    display: block;
    font-size: 1.1rem;
}

.brand small {
    display: block;
    opacity: 0.7;
    font-size: 0.75rem;
}

.nav-section {
    padding: 1rem 1.25rem 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    font-weight: 600;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.25rem;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.2s;
    border-right: 3px solid transparent;
    font-size: 0.875rem;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-nav .nav-item.active {
    background: rgba(14,165,233,0.2);
    color: #fff;
    border-right-color: var(--accent);
}

.sidebar-nav .nav-item i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.sidebar-nav-badge {
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-nav .nav-item.active .sidebar-nav-badge {
    background: #dc3545;
    color: #fff;
}

/* Toast + confirm modal (crm-ui) */
.crm-alert-icon-ring {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    border: 2px solid currentColor;
    position: relative;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.crm-alert-icon-ring::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 0.2;
}

.crm-alert-icon-ring::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    opacity: 0.35;
    pointer-events: none;
}

.crm-alert-icon-ring--md {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.15rem;
}

.crm-alert-icon-ring--lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.45rem;
    border-width: 2.5px;
}

.crm-alert-icon-ring--lg::after {
    inset: -8px;
    border-width: 1.5px;
    opacity: 0.18;
}

.crm-alert-icon-ring--success {
    color: #16a34a;
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.22), rgba(34, 197, 94, 0.08));
}

.crm-alert-icon-ring--error {
    color: #dc2626;
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08));
}

.crm-alert-icon-ring--info {
    color: #0284c7;
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.22), rgba(14, 165, 233, 0.08));
}

.crm-alert-icon-ring--warning {
    color: #d97706;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.24), rgba(245, 158, 11, 0.08));
}

.crm-alert-icon-ring--edit {
    color: #2563eb;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0.08));
}

.crm-alert-icon-ring--primary {
    color: #2563eb;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0.08));
}

.crm-alert-icon-ring--danger {
    color: #dc2626;
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.08));
}

.crm-toast-stack {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.crm-toast {
    pointer-events: auto;
    position: relative;
    padding: 1.1rem 1rem 1rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    animation: crmToastIn 0.35s ease;
    text-align: center;
}

.crm-toast.is-leaving {
    animation: crmToastOut 0.32s ease forwards;
}

.crm-toast__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.crm-toast__body {
    font-size: 0.875rem;
    line-height: 1.65;
    color: #1e293b;
    text-align: center;
    padding: 0 0.25rem;
}

.crm-toast__close {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 0.2rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 0.35rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.crm-toast__close:hover {
    color: #475569;
    background: rgba(15, 23, 42, 0.06);
}

.crm-toast--success {
    border-top: 3px solid #22c55e;
}

.crm-toast--error {
    border-top: 3px solid #ef4444;
}

.crm-toast--info {
    border-top: 3px solid #0ea5e9;
}

.crm-toast--warning {
    border-top: 3px solid #f59e0b;
}

.crm-toast--undo {
    min-width: min(320px, calc(100vw - 2rem));
}

.crm-toast__title {
    display: block;
    font-size: 0.925rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.crm-toast__subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0 0 0.65rem;
    line-height: 1.55;
}

.crm-toast__countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #16a34a;
}

.crm-toast__progress {
    height: 5px;
    width: 100%;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.crm-toast__progress-bar {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    animation: crmUndoProgress linear forwards;
}

.crm-toast__undo {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.crm-alert-icon-ring--loading {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.25);
    animation: crmRingPulse 1.4s ease infinite;
}

.crm-alert-icon-ring--loading i {
    animation: crmSpin 0.85s linear infinite;
}

.crm-row-pending-delete {
    display: none !important;
}

@keyframes crmUndoProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes crmSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes crmRingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.22); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.crm-page-alert {
    position: relative;
    border: none;
    border-radius: 0.85rem;
    padding: 1.15rem 1.25rem 1rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    text-align: center;
}

.crm-page-alert .btn-close {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
}

.crm-page-alert__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.crm-page-alert__content {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.65;
}

.crm-page-alert__content ul {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
}

.crm-page-alert--success {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.04));
    color: #14532d;
}

.crm-page-alert--error {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.04));
    color: #7f1d1d;
}

.crm-page-alert--warning {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.04));
    color: #78350f;
}

.crm-page-alert--info {
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.1), rgba(14, 165, 233, 0.04));
    color: #0c4a6e;
}

.crm-confirm-modal-dialog {
    min-width: min(500px, calc(100vw - 2rem));
    max-width: min(560px, calc(100vw - 2rem));
    width: min(500px, calc(100vw - 2rem));
}

.crm-confirm-modal {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.crm-confirm-modal__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.crm-confirm-modal__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.crm-confirm-modal__message {
    font-size: 0.925rem;
    color: #475569;
    line-height: 1.65;
    margin: 0;
    max-width: 26rem;
}

.crm-confirm-warnings {
    margin-top: 1.1rem;
    padding: 1rem 1.1rem 0.85rem;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fffbeb, #fff7ed);
    border: 1px solid #fde68a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-align: center;
}

.crm-confirm-warnings--danger {
    background: linear-gradient(180deg, #fef2f2, #fff1f2);
    border-color: #fecaca;
}

.crm-confirm-warnings--warning {
    background: linear-gradient(180deg, #fffbeb, #fff7ed);
    border-color: #fde68a;
}

.crm-confirm-warnings__list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: #92400e;
    width: 100%;
}

.crm-confirm-warnings--danger .crm-confirm-warnings__list {
    color: #991b1b;
}

.crm-confirm-warnings__list li {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
    line-height: 1.55;
    text-align: center;
}

.crm-confirm-warnings__list li i.bi-dot {
    font-size: 1.35rem;
    line-height: 1.1;
    flex-shrink: 0;
}

.crm-confirm-warnings__list li span {
    flex: 0 1 auto;
}

.crm-confirm-warnings__list li:last-child {
    margin-bottom: 0;
}

@keyframes crmToastIn {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes crmToastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}

.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-user__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px !important;
    padding: 0.35rem 0.75rem 0.35rem 0.45rem !important;
    border: 1px solid var(--border) !important;
}

.topbar-user__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.topbar-user__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user__menu {
    min-width: 200px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(15, 39, 68, 0.12);
}

.topbar-title h1 {
    font-size: 1.15rem;
    margin: 0;
    font-weight: 700;
}

.breadcrumb-nav {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topbar-actions {
    margin-right: auto;
}

.content-area {
    padding: 1.5rem;
    flex: 1;
}

/* Cards & Stats */
.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.card-panel {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-panel.transit-containers-panel {
    overflow: visible;
}

.card-panel .card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    display: flex;
    align-items: center;
}

.card-header-table {
    justify-content: flex-start;
}

.card-table-title {
    font-size: 0.95rem;
}

/* نوار ابزار بالای جدول: افزودن راست، جستجو چپ (RTL) */
.table-toolbar {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: 'actions search';
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.table-toolbar-actions,
.table-toolbar-start {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-self: start;
}

.table-toolbar--auto {
    margin-bottom: 0.75rem;
}

.table-search-bar {
    grid-area: search;
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 420px;
    min-width: 200px;
}

.table-toolbar:not(:has(.table-toolbar-actions)) {
    grid-template-columns: 1fr;
    grid-template-areas: 'search';
}

.table-toolbar:not(:has(.table-toolbar-actions)) .table-search-bar {
    justify-self: end;
    max-width: 420px;
}

.table-filters {
    padding: 0.75rem 1rem;
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.table-search-bar i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.table-search-bar .form-control {
    padding-right: 2.25rem;
}

.card-panel .card-body {
    padding: 1.25rem;
}

/* Workflow Timeline */
.workflow-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.workflow-step {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 0;
    position: relative;
}

.workflow-step:not(:last-child)::before {
    content: '';
    position: absolute;
    right: 19px;
    top: 42px;
    bottom: -8px;
    width: 2px;
    background: var(--border);
}

.workflow-step.completed:not(:last-child)::before {
    background: var(--transit-stage-done-border);
}

.workflow-step.current:not(:last-child)::before {
    background: linear-gradient(to bottom, var(--transit-stage-done-border), var(--transit-stage-current-border));
}

.workflow-step.pending:not(:last-child)::before {
    background: #cbd5e1;
}

.workflow-step__card {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.55rem 0.65rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.workflow-step.completed .workflow-step__card {
    border-color: rgba(34, 197, 94, 0.45);
    background: var(--transit-stage-done-bg);
    box-shadow: inset 3px 0 0 var(--transit-stage-done-border);
}

.workflow-step.current .workflow-step__card {
    border-color: rgba(37, 99, 235, 0.45);
    background: var(--transit-stage-current-bg);
    box-shadow: inset 3px 0 0 var(--transit-stage-current-border), 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.workflow-step.pending .workflow-step__card {
    border-color: #e2e8f0;
    background: var(--transit-stage-pending-bg);
    opacity: 0.88;
}

.workflow-step__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.15rem;
}

.workflow-step__head h6 {
    margin: 0;
}

.workflow-step__status {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    white-space: nowrap;
}

.workflow-step__status--done {
    background: rgba(34, 197, 94, 0.15);
    color: var(--transit-stage-done);
}

.workflow-step__status--current {
    background: rgba(37, 99, 235, 0.14);
    color: var(--transit-stage-current);
}

.workflow-step__status--pending {
    background: #f1f5f9;
    color: #64748b;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f1f5f9;
    color: var(--text-muted);
    border: 2px solid var(--border);
    z-index: 1;
}

.workflow-step.completed .step-icon {
    background: var(--transit-stage-done);
    color: #fff;
    border-color: var(--transit-stage-done-border);
}

.workflow-step.current .step-icon {
    background: linear-gradient(135deg, var(--transit-stage-current), var(--primary));
    color: #fff;
    border-color: var(--transit-stage-current-border);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
    animation: transit-stage-pulse 2s ease-in-out infinite;
}

.workflow-step.pending .step-icon {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #cbd5e1;
}

@keyframes transit-stage-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18); }
    50% { box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.1); }
}

.step-content h6 {
    margin: 0 0 0.15rem;
    font-size: 0.9rem;
}

.stage-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.stage-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.45;
}

.stage-meta-label {
    color: var(--text-muted);
    white-space: nowrap;
}

.stage-meta-label i {
    margin-left: 0.15rem;
}

.stage-meta-value {
    color: var(--text);
}

.stage-meta-row--done .stage-meta-value {
    color: var(--transit-stage-done);
    font-weight: 600;
}

.stage-meta-row--current .stage-meta-value {
    color: var(--transit-stage-current);
    font-weight: 600;
}

.stage-meta-row--transfer .stage-meta-value {
    color: #7c3aed;
}

.stage-meta-row--pending .stage-meta-value {
    color: var(--text-muted);
}

.transit-current-assignee {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.25);
    color: var(--transit-stage-current);
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-weight: 600;
}

.transit-overdue-alert {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 0.9rem;
    box-shadow: 0 10px 26px rgba(127, 29, 29, 0.12);
}

.transit-overdue-alert__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    flex-shrink: 0;
}

.transit-overdue-alert__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.75);
    color: inherit;
    text-decoration: none;
}

.transit-overdue-alert__item:hover {
    background: #fff;
    color: inherit;
}

/* ——— مودال جزئیات پرونده ترانزیت ——— */
.transit-details-modal__dialog {
    max-width: 58rem;
}

.transit-details-modal {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.transit-details-modal__hero {
    position: relative;
    padding: 1.45rem 1.5rem 1.15rem;
    background:#ddeeffb0;
    color: var(--text);
    border-bottom: 1px solid rgba(14, 165, 233, 0.16);
}

.transit-details-modal__close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    filter: none;
    opacity: 0.65;
    z-index: 2;
}

.transit-details-modal__close:hover {
    opacity: 1;
}

.transit-details-modal__hero-top {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: 0 2.5rem;
}

.transit-details-modal__hero-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: #0284c7;
    flex-shrink: 0;
}

.transit-details-modal__eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.transit-details-modal__title {
    margin: 0 0 0.55rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
}

.transit-details-modal__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}

.transit-details-modal__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid rgba(14, 165, 233, 0.16);
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.transit-details-modal__chip--type {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.22);
    color: #0369a1;
}

.transit-details-modal__hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr);
    gap: 0.75rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(14, 165, 233, 0.14);
    align-items: end;
    text-align: center;
}

.transit-details-modal__stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.transit-details-modal__stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}

.transit-details-modal__stat strong {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

.transit-details-modal__progress-wrap {
    display: flex;
    align-items: center;
    min-height: 100%;
}

.transit-details-modal__progress {
    width: 100%;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.16);
    overflow: hidden;
}

.transit-details-modal__progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8 0%, #22d3ee 100%);
    transition: width 0.35s ease;
}

.transit-details-modal__body {
    padding: 1.15rem 1.25rem 1.25rem;
    background: #f1f5f9;
}

.transit-details-modal__footer {
    padding: 0.85rem 1.25rem;
    background: #fff;
    border-top: 1px solid var(--border);
    gap: 0.5rem;
}

.transit-case-details__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 767.98px) {
    .transit-details-modal__hero-top {
        padding: 1.75rem 0 0;
        flex-direction: column;
    }

    .transit-details-modal__hero-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .transit-details-modal__progress-wrap {
        grid-column: 1 / -1;
    }

    .transit-case-details__grid {
        grid-template-columns: 1fr;
    }
}

.tdm-panel {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.tdm-panel__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.tdm-panel__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.tdm-panel__title {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text);
}

.tdm-panel--sky { border-top: 3px solid #0ea5e9; }
.tdm-panel--violet { border-top: 3px solid #8b5cf6; }
.tdm-panel--amber { border-top: 3px solid #f59e0b; }
.tdm-panel--emerald { border-top: 3px solid #10b981; }

.tdm-panel--sky .tdm-panel__icon { background: rgba(14, 165, 233, 0.14); color: #0284c7; }
.tdm-panel--violet .tdm-panel__icon { background: rgba(139, 92, 246, 0.14); color: #7c3aed; }
.tdm-panel--amber .tdm-panel__icon { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.tdm-panel--emerald .tdm-panel__icon { background: rgba(16, 185, 129, 0.14); color: #059669; }

.tdm-panel__body {
    padding: 0.35rem 0;
}

.tdm-field {
    display: grid;
    grid-template-columns: 1.6rem 5.5rem 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.tdm-field:last-child {
    border-bottom: none;
}

.tdm-field__icon {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: #64748b;
    background: rgba(148, 163, 184, 0.12);
}

.tdm-field__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.tdm-field__value {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.45;
    word-break: break-word;
    text-align: left;
}

.tdm-field__value.is-empty {
    color: #94a3b8;
    font-weight: 500;
}

.tdm-field--highlight {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.06) 0%, transparent 100%);
}

.tdm-field--highlight .tdm-field__value {
    color: #0369a1;
}

.tdm-field--money {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.07) 0%, transparent 100%);
}

.tdm-field--money .tdm-field__value {
    color: #047857;
}

@media (max-width: 575.98px) {
    .tdm-field {
        grid-template-columns: 1.4rem 1fr;
        grid-template-rows: auto auto;
    }

    .tdm-field__icon {
        grid-row: 1 / 3;
    }

    .tdm-field__label {
        grid-column: 2;
    }

    .tdm-field__value {
        grid-column: 2;
        text-align: right;
    }
}

.case-details-heading {
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.case-details-heading i {
    color: var(--accent);
}

.case-details-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 991.98px) {
    .case-details-cards {
        grid-template-columns: 1fr;
    }
}

.case-section-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s ease;
}

.case-section-card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.case-section-card__header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

.case-section-card__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.case-section-card--bl .case-section-card__icon { background: rgba(14, 165, 233, 0.12); color: #0284c7; }
.case-section-card--customs .case-section-card__icon { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.case-section-card--fleet .case-section-card__icon { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.case-section-card--finance .case-section-card__icon { background: rgba(34, 197, 94, 0.12); color: #16a34a; }

.case-section-card__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}

.case-section-card__body {
    padding: 0.85rem;
}

.case-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

@media (max-width: 575.98px) {
    .case-field-grid {
        grid-template-columns: 1fr;
    }
}

.case-field-card {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.6rem;
    padding: 0.55rem 0.7rem;
    min-height: 3.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
}

.case-field-card--highlight {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.06) 0%, rgba(14, 165, 233, 0.02) 100%);
    border-color: rgba(14, 165, 233, 0.2);
}

.case-field-card--money {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06) 0%, rgba(34, 197, 94, 0.02) 100%);
    border-color: rgba(34, 197, 94, 0.18);
}

.case-field-card--plate .case-field-card__value {
    padding-top: 0.1rem;
}

.case-field-card__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.01em;
}

.case-field-card__value {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    word-break: break-word;
}

.case-field-card__value.is-empty {
    color: #94a3b8;
    font-weight: 500;
}

.transit-staff-list dt {
    color: var(--text-muted);
}

/* ——— هدر و کارت‌های خلاصه پرونده ترانزیت ——— */
.transit-case-hero {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
    border: 1px solid rgba(14, 165, 233, 0.18);
}

.transit-case-hero__label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.transit-case-hero__value {
    display: block;
    font-size: 1.35rem;
    color: #0f172a;
}

.transit-case-hero__bl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(3, 105, 161, 0.2);
}

.transit-case-hero__bl-number {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0369a1;
    letter-spacing: 0.02em;
}

.transit-copy-bl {
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    color: #0369a1;
    border: 1px solid rgba(3, 105, 161, 0.25);
    background: #fff;
    line-height: 1;
}

.transit-copy-bl:hover {
    background: #e0f2fe;
    color: #0c4a6e;
}

.transit-copy-bl.is-copied {
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.35);
    background: #f0fdf4;
}

.transit-summary-cards {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 0.45rem;
}

.transit-summary-cards__item {
    min-width: 0;
}

.transit-summary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.08rem;
    min-height: 2.65rem;
    height: 100%;
    padding: 0.22rem 0.18rem;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    box-shadow: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.transit-summary-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.transit-summary-card__icon {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.28rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    background: rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
}

.transit-summary-card__label {
    font-size: 0.5rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.78);
    line-height: 1.15;
}

.transit-summary-card__value {
    font-size: 0.58rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.transit-summary-card__value.is-empty {
    color: rgba(15, 23, 42, 0.45);
    font-weight: 600;
}

a.transit-summary-card__value {
    text-decoration: none;
    color: #0f172a;
}

a.transit-summary-card__value:hover {
    text-decoration: underline;
}

.transit-summary-card__action {
    font-size: 0.58rem;
    font-weight: 700;
    color: #312e81;
    line-height: 1;
}

.transit-summary-card--sky { background: rgba(14, 165, 233, 0.4); border-color: #0ea5e9; }
.transit-summary-card--coral { background: rgba(251, 146, 60, 0.4); border-color: #fb923c; }
.transit-summary-card--violet { background: rgba(167, 139, 250, 0.4); border-color: #a78bfa; }
.transit-summary-card--mint { background: rgba(94, 234, 212, 0.4); border-color: #5eead4; }
.transit-summary-card--rose { background: rgba(251, 113, 133, 0.4); border-color: #fb7185; }
.transit-summary-card--amber { background: rgba(251, 191, 36, 0.4); border-color: #fbbf24; }
.transit-summary-card--lime { background: rgba(132, 204, 22, 0.4); border-color: #84cc16; }

.transit-summary-card--owner {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.35) 0%, rgba(139, 92, 246, 0.28) 100%);
    border-color: rgba(14, 165, 233, 0.45);
}

.transit-summary-card__bl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.15rem;
    max-width: 100%;
    margin-top: 0.05rem;
    padding: 0.05rem 0.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(3, 105, 161, 0.18);
}

.transit-summary-card__bl-label {
    font-size: 0.46rem;
    font-weight: 700;
    color: rgba(3, 105, 161, 0.85);
    line-height: 1;
}

.transit-summary-card__bl-number {
    font-size: 0.5rem;
    font-weight: 700;
    color: #0369a1;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 5rem;
}

.transit-summary-card__bl .transit-copy-bl {
    padding: 0.05rem 0.25rem;
    font-size: 0.52rem;
}

.transit-summary-card--details {
    cursor: pointer;
    background: rgba(99, 102, 241, 0.4);
    border-color: #6366f1;
    color: #312e81;
}

.transit-summary-card--details .transit-summary-card__label {
    color: rgba(49, 46, 129, 0.88);
}

.transit-summary-card--details .transit-summary-card__icon {
    color: #4338ca;
}

.transit-summary-card--details .transit-summary-card__action {
    color: #312e81;
}

@media (max-width: 1399.98px) {
    .transit-summary-cards {
        grid-template-columns: repeat(9, minmax(5.75rem, 1fr));
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: thin;
    }
}

.transit-desk-toolbar .progress-transit {
    max-width: none;
}

.transit-desk-current-stage__badge {
    display: inline-block;
    margin-right: 0.25rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--transit-stage-current), var(--primary));
    color: #fff;
    font-weight: 700;
}


@media (min-width: 992px) {
    .transit-desk-split {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .transit-desk-sidebar {
        flex: 0 0 20%;
        max-width: 20%;
    }

    .transit-desk-containers {
        flex: 0 0 80%;
        max-width: 80%;
    }
}

.transit-desk-sidebar {
    min-width: 0;
}

.transit-desk-containers {
    min-width: 0;
}

.transit-desk-sidebar .workflow-step {
    gap: 0.4rem;
    padding: 0.5rem 0;
}

.transit-desk-sidebar .workflow-step:not(:last-child)::before {
    right: 13px;
    top: 34px;
}

.transit-desk-sidebar .step-icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.transit-desk-sidebar .step-content h6 {
    font-size: 0.72rem;
    line-height: 1.35;
}

.transit-desk-sidebar .stage-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
    font-size: 0.65rem;
}

.transit-desk-sidebar .stage-meta-label {
    white-space: normal;
}

.transit-desk-sidebar .stage-meta-value {
    font-size: 0.68rem;
}

.transit-desk-sidebar .workflow-step .btn-sm {
    padding: 0.08rem 0.3rem;
    font-size: 0.7rem;
}

.workflow-step__action--done {
    border-color: var(--transit-stage-done-border) !important;
    color: #fff !important;
    background: var(--transit-stage-done) !important;
}

.workflow-step__action--done:hover,
.workflow-step__action--done:focus {
    background: #166534 !important;
    border-color: #166534 !important;
    color: #fff !important;
}

.workflow-step__action--current {
    border-color: var(--transit-stage-current-border) !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--transit-stage-current), var(--primary)) !important;
}

.workflow-step__action--current:hover,
.workflow-step__action--current:focus {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.workflow-step__action--locked {
    cursor: pointer;
}

.dual-date-field .form-text {
    margin-top: 0.35rem;
}

.dual-date-field .jalali-date-field {
    width: 100%;
}

.transit-desk-sidebar .workflow-step .d-flex.justify-content-between {
    gap: 0.35rem;
}

.transit-desk-containers .transit-containers-panel {
    height: 100%;
}

.transit-stage-history th {
    white-space: nowrap;
    font-size: 0.78rem;
}

.transit-stage-history td {
    font-size: 0.82rem;
    vertical-align: middle;
}

.step-content small {
    color: var(--text-muted);
}

/* Tables — تراز وسط */
.table thead th,
.table tbody td,
.table tfoot td {
    text-align: center !important;
    vertical-align: middle !important;
}

.table-custom {
    margin: 0;
    font-size: 0.875rem;
}

.table-custom thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    white-space: nowrap;
    padding: 0.75rem 1rem;
    text-align: center;
    vertical-align: middle;
}

.table-custom tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    text-align: center;
}

.table-custom .table-actions {
    white-space: nowrap;
}

/* عملیات جدول — آیکون + tooltip */
.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.tbl-action-form {
    display: inline-flex;
    margin: 0;
}

.tbl-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #64748b;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
}

.tbl-action:hover {
    transform: translateY(-1px);
}

.tbl-action[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.38rem 0.7rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
    z-index: 20;
}

.tbl-action[data-tip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    border: 5px solid transparent;
    border-top-color: #334155;
    transition: opacity 0.22s ease;
    pointer-events: none;
    z-index: 20;
}

.tbl-action:hover[data-tip]::after,
.tbl-action:focus-visible[data-tip]::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.tbl-action:hover[data-tip]::before,
.tbl-action:focus-visible[data-tip]::before {
    opacity: 1;
}

.tbl-action-view:hover {
    color: #0284c7;
    background: #e0f2fe;
    border-color: #bae6fd;
}

.tbl-action-edit:hover {
    color: #b45309;
    background: #fef3c7;
    border-color: #fde68a;
}

.tbl-action-delete:hover {
    color: #dc2626;
    background: #fee2e2;
    border-color: #fecaca;
}

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

.transit-stage-badge {
    font-size: 0.72rem;
    padding: 0.35em 0.55em;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.transit-stage-badge--bl_introduced { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.transit-stage-badge--entry_announced { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; }
.transit-stage-badge--declaration_registered { background: #e0e7ff; color: #4338ca; border-color: #a5b4fc; }
.transit-stage-badge--cargo_announced { background: #ffedd5; color: #c2410c; border-color: #fdba74; }
.transit-stage-badge--waybill_issued { background: #ccfbf1; color: #0f766e; border-color: #5eead4; }
.transit-stage-badge--loading_departure { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.transit-stage-badge--origin_customs_exit { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.transit-stage-badge--border_arrival { background: #ffe4e6; color: #be123c; border-color: #fda4af; }
.transit-stage-badge--border_delivery { background: #ecfccb; color: #4d7c0f; border-color: #bef264; }
.transit-stage-badge--container_return { background: #cffafe; color: #0e7490; border-color: #67e8f9; }
.transit-stage-badge--completed { background: #dcfce7; color: #15803d; border-color: #86efac; }

.bl-smart-import-callout {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px dashed rgba(14, 165, 233, 0.45);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.06));
}

.bl-smart-import-callout.js-entry-smart-import-callout {
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.bl-smart-import-callout.js-entry-smart-import-callout:hover:not(.is-disabled),
.bl-smart-import-callout.js-entry-smart-import-callout:focus-visible:not(.is-disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    outline: none;
}

.bl-smart-import-callout.js-entry-smart-import-callout.is-disabled {
    opacity: 0.65;
    cursor: wait;
    pointer-events: none;
}

.bl-smart-import-callout.js-entry-smart-import-callout .js-entry-smart-import-trigger {
    pointer-events: none;
}

.bl-smart-import-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.bl-smart-import-grid--entry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bl-smart-import-grid--declaration {
    grid-template-columns: minmax(0, 1fr);
}

.bl-smart-import-callout--declaration {
    border-color: rgba(22, 163, 74, 0.45);
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(16, 185, 129, 0.05));
}

.bl-smart-import-callout--declaration .bl-smart-import-callout__icon {
    color: #15803d;
}

.bl-smart-import-callout.js-declaration-smart-import-callout {
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.bl-smart-import-callout.js-declaration-smart-import-callout:hover:not(.is-disabled),
.bl-smart-import-callout.js-declaration-smart-import-callout:focus-visible:not(.is-disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    outline: none;
}

.bl-smart-import-callout.js-declaration-smart-import-callout.is-disabled {
    opacity: 0.65;
    cursor: wait;
    pointer-events: none;
}

#stage-entry_announced .entry-announcement-section-title {
    letter-spacing: 0.02em;
}

#stage-entry_announced .entry-announcement-fields .form-label {
    font-weight: 600;
}

.bl-smart-import-callout--hoopad {
    border-color: rgba(14, 165, 233, 0.45);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.06));
}

.bl-smart-import-callout--espad {
    border-color: rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.05));
}

.bl-smart-import-callout--espad .bl-smart-import-callout__icon {
    color: #1d4ed8;
}

.bl-smart-import-callout--other {
    border-color: rgba(100, 116, 139, 0.45);
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(226, 232, 240, 0.35));
}

.bl-smart-import-callout--other .bl-smart-import-callout__icon {
    color: #475569;
}

@media (max-width: 1199.98px) {
    .bl-smart-import-grid {
        grid-template-columns: 1fr;
    }
}

.bl-smart-import-callout__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    color: #0369a1;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.bl-smart-import-callout__body {
    flex: 1;
    min-width: 0;
}

.bl-smart-import-callout__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

/* Forms */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.875rem;
    border-radius: 8px;
    border-color: var(--border);
    text-align: center;
    text-align-last: center;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}

/* تمام فیلدهای ورودی/انتخابی وسط‌چین */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="image"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
textarea,
select,
.form-control,
.form-select,
.entity-combobox__input,
.auth-input,
.jalali-date-field input,
.table-search-bar .form-control {
    text-align: center !important;
    text-align-last: center;
}

textarea {
    text-align: center !important;
}

select option {
    text-align: center;
}

.form-control::placeholder,
.form-select::placeholder,
.entity-combobox__input::placeholder,
.auth-input::placeholder,
input::placeholder,
textarea::placeholder {
    text-align: center;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

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

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

/* Progress bar for transit */
.progress-transit {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

.progress-transit .bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--transit-stage-done-border), var(--transit-stage-current-border));
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.25);
}

.transit-stage-rail {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.transit-stage-rail__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 3.2rem;
    flex: 0 0 auto;
}

.transit-stage-rail__dot {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #94a3b8;
}

.transit-stage-rail__item.is-done .transit-stage-rail__dot {
    background: var(--transit-stage-done);
    border-color: var(--transit-stage-done-border);
    color: #fff;
}

.transit-stage-rail__item.is-current .transit-stage-rail__dot {
    background: linear-gradient(135deg, var(--transit-stage-current), var(--primary));
    border-color: var(--transit-stage-current-border);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.transit-stage-rail__item.is-pending .transit-stage-rail__dot {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #94a3b8;
}

.transit-stage-rail__label {
    font-size: 0.58rem;
    line-height: 1.25;
    text-align: center;
    color: #64748b;
    max-width: 4.5rem;
}

.transit-stage-rail__item.is-done .transit-stage-rail__label {
    color: var(--transit-stage-done);
    font-weight: 600;
}

.transit-stage-rail__item.is-current .transit-stage-rail__label {
    color: var(--transit-stage-current);
    font-weight: 700;
}

.transit-stage-rail__connector {
    flex: 1 0 0.75rem;
    height: 2px;
    background: #cbd5e1;
    margin-top: 0.82rem;
    min-width: 0.5rem;
}

.transit-stage-rail__connector.is-done {
    background: var(--transit-stage-done-border);
}

.transit-stage-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.transit-stage-summary__done {
    color: var(--transit-stage-done);
    font-weight: 600;
}

.transit-stage-summary__current {
    color: var(--transit-stage-current);
    font-weight: 600;
}

.transit-stage-summary__sep {
    opacity: 0.45;
}

/* پلاک ایران — چیدمان واقعی: IR | ۴۵ ع ۱۲۳ | ایران ۱۱ */
.plate-iran {
    display: inline-flex;
    align-items: stretch;
    background: #f5d020;
    border: 2px solid #111;
    border-radius: 4px;
    overflow: hidden;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: 800;
    direction: ltr;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}

.plate-iran-flag {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: #003da5;
    color: #fff;
    width: 28px;
    padding: 0.3rem 0.15rem 0.35rem;
    border-right: 2px solid #111;
    flex-shrink: 0;
}

.plate-flag-icon {
    display: block;
    width: 17px;
    height: 11px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(
        to bottom,
        #239f40 0%,
        #239f40 33.33%,
        #fff 33.33%,
        #fff 66.66%,
        #da0000 66.66%,
        #da0000 100%
    );
    position: relative;
}

.plate-flag-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c8102e;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.plate-flag-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.42rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 0.2rem;
    font-family: Arial, Helvetica, sans-serif;
}

.plate-iran-lg {
    transform: scale(1.08);
    transform-origin: center center;
}

.plate-iran-card {
    transform: scale(0.95);
    transform-origin: center center;
}

.plate-iran-card .plate-cell-sm { font-size: 1.1rem; min-width: 1.5rem; }
.plate-iran-card .plate-cell-lg { font-size: 1.1rem; min-width: 2.2rem; }
.plate-iran-card .plate-cell-letter { font-size: 1.15rem; }
.plate-iran-card .plate-iran-flag { width: 24px; padding: 0.25rem 0.12rem; }
.plate-iran-card .plate-iran-side { min-width: 46px; }
.plate-iran-card .plate-side-title { font-size: 0.58rem; }
.plate-iran-card .plate-iran-body { padding: 0.5rem 0.7rem; }

.plate-iran-xs .plate-iran-flag { width: 20px; padding: 0.18rem 0.1rem; }
.plate-iran-xs .plate-iran-body { padding: 0.22rem 0.38rem; gap: 0.2rem; }
.plate-iran-xs .plate-iran-side { min-width: 36px; padding: 0.12rem 0.22rem; }
.plate-iran-xs .plate-cell-sm { font-size: 0.78rem; min-width: 1rem; }
.plate-iran-xs .plate-cell-lg { font-size: 0.78rem; min-width: 1.55rem; }
.plate-iran-xs .plate-cell-letter { font-size: 0.8rem; min-width: 0.85rem; }
.plate-iran-xs .plate-side-title { font-size: 0.46rem; margin-bottom: 0.08rem; }
.plate-iran-xs .plate-flag-icon { width: 12px; height: 8px; }
.plate-iran-xs .plate-flag-label { font-size: 0.34rem; margin-top: 0.12rem; }

.plate-iran-xxs .plate-iran-flag { width: 16px; padding: 0.12rem 0.06rem; }
.plate-iran-xxs .plate-iran-body { padding: 0.14rem 0.26rem; gap: 0.12rem; }
.plate-iran-xxs .plate-iran-side { min-width: 28px; padding: 0.08rem 0.14rem; }
.plate-iran-xxs .plate-cell-sm { font-size: 0.66rem; min-width: 0.8rem;padding-top: 3px; }
.plate-iran-xxs .plate-cell-lg { font-size: 0.66rem; min-width: 1.25rem; }
.plate-iran-xxs .plate-cell-letter { font-size: 0.68rem; min-width: 0.7rem; }
.plate-iran-xxs .plate-side-title { font-size: 0.4rem; margin-bottom: 0.04rem; }
.plate-iran-xxs .plate-flag-icon { width: 10px; height: 7px; }
.plate-iran-xxs .plate-flag-label { font-size: 0.28rem; margin-top: 0.08rem; }

.plate-iran-body {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
    color: #111;
}

.plate-iran-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 0.25rem 0.4rem;
    border-left: 2px solid #111;
    background: #f5d020;
    color: #111;
    border-right: 2px solid;
}

.plate-side-title {
    font-size: 0.62rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    letter-spacing: 0;
}

.plate-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.plate-cell-sm {
    font-size: 1.15rem;
    min-width: 1.6rem;
}

.plate-cell-lg {
    font-size: 1.15rem;
    min-width: 2.4rem;
    letter-spacing: 0.04em;
}

.plate-cell-letter {
    font-size: 1.2rem;
    min-width: 1.2rem;
    font-weight: 900;
}

.plate-iran-empty .plate-cell,
.plate-iran-empty .plate-side-title {
    opacity: 0.35;
}

.plate-iran-preview {
    margin-top: 0.25rem;
}

/* ورودی پلاک — ترتیب مطابق پلاک فیزیکی */
.plate-input-group {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
    direction: ltr;
    justify-content: flex-start;
    padding: 0.75rem;
    background: #fafafa;
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.plate-input-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    text-align: center;
}

.plate-field {
    flex: 0 0 auto;
    min-width: 68px;
}

.plate-field-letter {
    min-width: 80px;
}

.plate-field-city {
    min-width: 68px;
    border-right: 2px solid #ccc;
    padding-right: 0.65rem;
    margin-right: 0.15rem;
}

.plate-sep {
    font-size: 1.4rem;
    font-weight: 700;
    padding-bottom: 0.45rem;
    color: #999;
    user-select: none;
}

.plate-check-result {
    font-size: 0.875rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
}

.plate-create-visual {
    padding: 0.5rem 0;
}

.plate-create-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    overflow: hidden;
}

.plate-create-preview-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

#modal-create-vehicle .plate-create-preview-wrap .plate-iran {
    transform: scale(0.95);
    transform-origin: center center;
}

.plate-input-group-create {
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.plate-input-group-single-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    direction: ltr;
    overflow: hidden;
}

.plate-input-group-single-row .plate-field {
    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
}

.plate-field-suffix .form-control {
    width: 2.65rem;
    max-width: 2.65rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.plate-field-letter .form-select {
    width: 2.75rem;
    max-width: 2.75rem;
    padding-left: 0.1rem;
    padding-right: 1.2rem;
    background-position: left 0.15rem center;
}

.plate-field-series .form-control {
    width: 3.65rem;
    max-width: 3.65rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
    letter-spacing: 0.06em;
}

.plate-field-city .form-control {
    width: 2.65rem;
    max-width: 2.65rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.plate-input-group-single-row .plate-field-city {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

.plate-input-group-create .form-control,
.plate-input-group-create .form-select {
    font-weight: 700;
    font-size: 1rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    text-align: center;
    min-height: 38px;
    font-variant-numeric: tabular-nums;
}

.plate-input-group-single-row .plate-sep {
    padding-bottom: 0;
    font-size: 1.15rem;
    flex: 0 0 auto;
    line-height: 1;
}

.fake-report-plate-cell {
    min-width: 11.5rem;
    vertical-align: middle;
}

.plate-inline-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.plate-inline-preview .plate-iran {
    margin-inline: auto;
}

.plate-input-group-inline {
    transform: scale(0.9);
    transform-origin: center top;
    margin-bottom: 0.15rem;
}

.plate-input-group-inline .form-control-sm,
.plate-input-group-inline .form-select-sm {
    min-height: 1.75rem;
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
    font-size: 0.78rem;
}

#modal-create-vehicle .modal-body {
    padding-top: var(--modal-edge-inset);
    padding-bottom: var(--modal-edge-inset);
    overflow-x: hidden;
}

.vehicle-found-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.vehicle-found-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #ecfdf5;
    border-bottom: 1px solid #a7f3d0;
    font-weight: 600;
    font-size: 0.9rem;
    color: #065f46;
}

.vehicle-found-body {
    padding: 1rem 1.25rem;
}

.vehicle-found-body dl dt {
    color: var(--text-muted);
}

/* Rating stars */
.rating-stars {
    color: #f59e0b;
}

/* Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    body.sidebar-open .sidebar-overlay {
        display: block;
    }
    .main-content {
        margin-right: 0;
    }
}

@media (max-width: 575.98px) {
    .content-area {
        padding: 1rem;
    }
    .topbar {
        padding: 0.75rem 1rem;
    }
}

/* Modals RTL */
.modal-header {
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    padding: 1rem var(--modal-edge-inset);
}
.modal-footer {
    border-top: 1px solid var(--border);
    gap: 0.5rem;
    padding: 1rem var(--modal-edge-inset);
}
.modal-footer-save {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 1rem var(--modal-edge-inset);
    background: #f8fafc;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
}

.modal-footer-save .modal-btn-save {
    order: 1;
}

.modal-footer-save .modal-btn-cancel {
    order: 2;
}

.form-validation-summary {
    display: none;
    align-items: center;
    gap: 0.4rem;
    color: #b91c1c;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
    padding: 0.45rem 0.7rem;
    border-radius: 0.55rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    max-width: min(520px, 100%);
}

.form-validation-summary.is-visible {
    display: inline-flex;
}

.modal-footer-save .form-validation-summary,
.fleet-assign-shell__footer-actions .form-validation-summary {
    order: 0;
}

.form-control.is-invalid,
.form-select.is-invalid,
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.12);
}

.entity-combobox.is-invalid .entity-combobox__input,
.entity-combobox__input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.12);
}

.jalali-date-field .form-control.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.12);
}

.role-multiselect__toggle.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.12);
}

.modal-dialog-scrollable .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 1rem);
}
.modal-dialog-scrollable .modal-content > .modal-form {
    flex: 1 1 auto;
    min-height: 0;
}
.modal-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}
.modal-form .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
}
.modal-btn-save {
    min-width: 160px;
    padding: 0.7rem 1.75rem;
    font-weight: 700;
    font-size: 1rem;
    margin-inline-start: auto;
}
.modal-kbd-hint {
    display: inline-block;
    margin-inline-start: 0.5rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    line-height: 1.2;
}

.btn-kbd-hint {
    display: inline-block;
    margin-inline-start: 0.4rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    line-height: 1.2;
    vertical-align: middle;
}

.btn-light .btn-kbd-hint,
.btn-outline-primary .btn-kbd-hint,
.btn-outline-secondary .btn-kbd-hint {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
    color: inherit;
}
.modal-form-section {
    margin-bottom: 1.25rem;
}
.modal-form-section:last-child {
    margin-bottom: 0;
}
.modal-form-section .section-title {
    display: block;
    margin-bottom: 0.75rem;
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-content { border-radius: 12px; border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.modal-body { padding: var(--modal-edge-inset); }
.workflow-step .btn-sm { flex-shrink: 0; padding: 0.15rem 0.4rem; }

.topbar-actions kbd {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1em 0.45em;
    font-size: 0.75rem;
    font-family: inherit;
    box-shadow: 0 1px 0 var(--border);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* پروفایل خودرو */
/* پروفایل خودرو / راننده — مشترک */
.driver-profile .vehicle-profile-topbar-name {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    margin-inline-start: auto;
}
.driver-profile .vehicle-profile-topbar-name strong {
    font-size: 1rem;
}
.driver-profile .vehicle-profile-topbar-name span {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: ui-monospace, monospace;
}
.ir-vcard-photo {
    width: 96px;
    height: 112px;
    border: 2px solid rgba(26, 58, 46, 0.25);
    border-radius: 8px;
    background: linear-gradient(180deg, #eef4f0 0%, #dce8df 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a3a2e;
    font-size: 3rem;
    opacity: 0.85;
}
.ir-vcard-red-note.ir-vcard-red-note-driver {
    max-width: 92px;
}

/* ——— گواهینامه رانندگی (کارت رسمی) ——— */
.ir-driver-license-wrap {
    justify-content: center;
}

.ir-dlicense {
    position: relative;
    width: 520px;
    min-width: 520px;
    height: 328px;
    border-radius: 16px;
    border: 2px solid #7eb8c4;
    overflow: hidden;
    background: linear-gradient(160deg, #e8f6f8 0%, #dff0f2 25%, #e6f4f0 55%, #d4ece8 100%);
    box-shadow: 0 8px 28px rgba(30, 90, 110, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    display: flex;
    flex-direction: column;
}

.ir-dlicense-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background:
        repeating-linear-gradient(72deg, transparent, transparent 14px, rgba(46, 120, 130, 0.035) 14px, rgba(46, 120, 130, 0.035) 15px),
        repeating-linear-gradient(-18deg, transparent, transparent 20px, rgba(46, 120, 130, 0.025) 20px, rgba(46, 120, 130, 0.025) 21px);
    pointer-events: none;
}

.ir-dlicense-map-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
    color: rgba(72, 145, 165, 0.22);
}

.ir-dlicense-map {
    width: 210px;
    height: auto;
    opacity: 0.85;
}

.ir-dlicense-icon-strip {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.35rem 4rem 0.2rem;
    font-size: 0.72rem;
    color: #3a8f6a;
    opacity: 0.75;
}

.ir-dlicense-header {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 72px 1fr 72px;
    align-items: start;
    padding: 0 0.85rem 0.35rem;
    gap: 0.35rem;
}

.ir-dlicense-flag {
    width: 58px;
    height: 38px;
    margin-top: 0.15rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 3px;
    background: linear-gradient(to bottom, #239f40 33.33%, #fff 33.33% 66.66%, #da0000 66.66%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ir-dlicense-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
}

.ir-dlicense-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1a5a8a;
    letter-spacing: -0.01em;
}

.ir-dlicense-class-badge {
    display: inline-block;
    padding: 0.12rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #b8e6c8 0%, #8fd4a8 100%);
    border: 1px solid rgba(46, 120, 80, 0.25);
    font-size: 0.72rem;
    font-weight: 700;
    color: #1a4a32;
}

.ir-dlicense-logo {
    display: flex;
    justify-content: flex-end;
}

.ir-naja-logo.ir-dlicense-logo-img {
    width: 58px;
    height: auto;
    max-height: 72px;
}

.ir-dlicense-body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    grid-template-columns: 88px 1fr 108px;
    align-items: stretch;
    padding: 0 0.65rem 0.65rem;
    gap: 0.35rem;
    min-height: 0;
}

.ir-dlicense-aside-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding-top: 0.15rem;
}

.ir-dlicense-serial-strip {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: linear-gradient(180deg, #1a3a5a 0%, #0f2840 100%);
    border-radius: 6px;
    padding: 0.45rem 0.3rem;
    max-height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ir-dlicense-serial-num {
    font-size: 0.58rem;
    font-weight: 700;
    font-family: 'Courier New', Consolas, monospace;
    color: #fff;
    letter-spacing: 0.14em;
    line-height: 1.2;
}

.ir-dlicense-emv-chip {
    width: 48px;
    height: 50px;
    border-radius: 6px;
    background: linear-gradient(145deg, #e8c547 0%, #c9a020 30%, #f0d060 50%, #a67c00 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.ir-dlicense-validity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.05rem;
    margin-top: 0.1rem;
}

.ir-dlicense-validity-lbl,
.ir-dlicense-validity-val {
    font-size: 0.58rem;
    font-weight: 700;
    color: #1a5a8a;
    line-height: 1.35;
}

.ir-dlicense-signature {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    padding-bottom: 0.15rem;
    max-width: 82px;
    text-align: center;
}

.ir-dlicense-sig-line {
    display: block;
    width: 100%;
    height: 18px;
    border-bottom: 1px solid rgba(26, 90, 138, 0.35);
    background: linear-gradient(135deg, transparent 40%, rgba(26, 90, 138, 0.08) 60%, transparent 80%);
}

.ir-dlicense-sig-title {
    font-size: 0.48rem;
    font-weight: 700;
    color: #1a5a8a;
    line-height: 1.35;
}

.ir-dlicense-sig-org {
    font-size: 0.44rem;
    color: #3a7a9a;
    line-height: 1.3;
}

.ir-dlicense-fields {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.42rem;
    padding: 0.25rem 0.35rem 0.25rem 0.15rem;
}

.ir-dlicense-field {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.ir-dlicense-field-lbl {
    font-weight: 700;
    color: #1a5a8a;
    min-width: 6.5rem;
    white-space: nowrap;
}

.ir-dlicense-field-val {
    font-weight: 600;
    color: #111;
    flex: 1;
}

.ir-dlicense-mono {
    font-family: 'Courier New', Consolas, monospace;
    letter-spacing: 0.04em;
    direction: ltr;
    display: inline-block;
}

.ir-dlicense-num {
    font-family: Arial, 'Courier New', sans-serif;
    font-variant-numeric: lining-nums;
    font-feature-settings: 'lnum' 1;
}

.ir-dlicense-photo-col {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.1rem;
}

.ir-dlicense-photo {
    width: 88px;
    height: 108px;
    border: 2px solid rgba(26, 90, 138, 0.28);
    border-radius: 6px;
    background: linear-gradient(180deg, #eef6f8 0%, #dce8ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a8aa0;
    font-size: 2.75rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.ir-dlicense-hologram {
    position: absolute;
    bottom: 0.35rem;
    right: 0.15rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9) 0%, transparent 45%),
        conic-gradient(from 45deg, #3a9a6a, #6ec4a0, #2a7a8a, #8fd4b0, #3a9a6a);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    opacity: 0.92;
}

@media (max-width: 560px) {
    .ir-dlicense {
        width: min(520px, 100%);
        min-width: 300px;
        height: auto;
        min-height: 328px;
    }

    .ir-dlicense-body {
        grid-template-columns: 72px 1fr 92px;
    }

    .ir-dlicense-field-lbl {
        min-width: 5.5rem;
        font-size: 0.72rem;
    }

    .ir-dlicense-photo {
        width: 76px;
        height: 94px;
        font-size: 2.25rem;
    }
}

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

.vehicle-profile-topbar-plate {
    margin-inline-start: auto;
}

.vehicle-profile-shell {
    overflow: hidden;
}

.vehicle-profile-tabs-area {
    padding: 0.75rem 1rem 0;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.vehicle-tabs-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.35rem;
    min-width: max-content;
    padding-bottom: 0.75rem;
}

.vehicle-tab-card {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px 10px 0 0;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: start;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 500;
}

.vehicle-tab-card:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(37, 99, 235, 0.25);
}

.vehicle-tab-card.active {
    color: var(--primary);
    background: #fff;
    border-color: var(--border);
    box-shadow: 0 -2px 0 var(--primary) inset;
    font-weight: 600;
}

.vehicle-tab-card.active .vehicle-tab-card-icon {
    background: var(--primary);
    color: #fff;
}

.vehicle-tab-card-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.vehicle-tab-card-label {
    font-size: 0.8rem;
    font-weight: inherit;
}

.vehicle-tab-card-short {
    display: none;
    font-size: 0.75rem;
    font-weight: inherit;
}

.vehicle-tab-card-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-inline-start: 0.15rem;
}

.vehicle-profile-tab-content {
    background: #fff;
    min-height: 360px;
    padding: 1.5rem;
}

@media (max-width: 991px) {
    .vehicle-tab-card-label {
        display: none;
    }

    .vehicle-tab-card-short {
        display: inline;
    }
}

/* کارت پرسنلی خودرو */
.vehicle-specs-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.vehicle-specs-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 992px) {
    .vehicle-specs-body {
        grid-template-columns: minmax(320px, 420px) 1fr;
    }
}

.vehicle-specs-stat-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.65rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.vehicle-spec-stat {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    flex: 1 1 0;
    min-width: 0;
}

.vehicle-spec-stat-body {
    min-width: 0;
}

.vehicle-spec-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.vehicle-spec-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-spec-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 575px) {
    .vehicle-spec-stat {
        flex: 0 0 auto;
        min-width: 130px;
    }
}

.vehicle-ir-cards-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0;
}

.vehicle-specs-toolbar {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ir-vehicle-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    justify-content: center;
    min-width: min-content;
    padding: 0.5rem;
}

/* کارت شناسایی وسیله نقلیه — روی و پشت */
.ir-vcard {
    position: relative;
    width: 480px;
    min-width: 480px;
    height: 302px;
    border-radius: 14px;
    border: 2px solid #2d4a3e;
    overflow: hidden;
    background: linear-gradient(145deg, #e8f0ea 0%, #dce8df 35%, #e4ece6 70%, #d8e4da 100%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.ir-vcard-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background:
        repeating-linear-gradient(105deg, transparent, transparent 18px, rgba(45, 74, 62, 0.04) 18px, rgba(45, 74, 62, 0.04) 19px),
        repeating-linear-gradient(-15deg, transparent, transparent 24px, rgba(45, 74, 62, 0.03) 24px, rgba(45, 74, 62, 0.03) 25px);
    pointer-events: none;
}

.ir-vcard-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

.ir-vcard-watermark-back {
    opacity: 0.55;
}

.ir-naja-img {
    object-fit: contain;
    display: block;
}

.ir-naja-logo.ir-vcard-logo-img {
    width: 68px;
    height: auto;
    max-height: 86px;
}

.ir-naja-watermark.ir-vcard-watermark-img {
    width: 200px;
    height: auto;
    opacity: 0.12;
    filter: grayscale(30%);
}

.ir-vcard-flag-corner {
    position: absolute;
    top: 0;
    left: 0;
    width: 72px;
    height: 72px;
    z-index: 2;
    background: linear-gradient(135deg,
        #239f40 0%, #239f40 63%,
        #fff 33%, #fff 66%,
        #da0000 66%, #da0000 100%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    border-bottom-right-radius: 4px;
}

.ir-vcard-flag-corner::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 14px;
    height: 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: linear-gradient(to bottom, #239f40 33%, #fff 33% 66%, #da0000 66%);
}

/* ——— روی کارت ——— */
.ir-vcard-front-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.85rem 1rem 0.35rem 3.5rem;
    gap: 0.5rem;
}

.ir-vcard-front-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: center;
    flex: 1;
}

.ir-vcard-org {
    font-size: 0.62rem;
    font-weight: 600;
    color: #1a3a2e;
    letter-spacing: 0.01em;
}

.ir-vcard-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f2922;
}

.ir-vcard-logo {
    flex-shrink: 0;
}

.ir-vcard-front-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 1rem 0.85rem 3.5rem;
    height: calc(100% - 72px);
}

.ir-vcard-front-fields {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-inline-start: 90px;
    padding-inline-end: 0.5rem;
}

.ir-vcard-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.4;
}

.ir-vcard-plate-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem 0;
}

.ir-vcard-plate-center .ir-vcard-lbl {
    font-size: 0.78rem;
}

.ir-vcard-lbl {
    font-weight: 700;
    color: #1a3a2e;
    white-space: nowrap;
}

.ir-vcard-val {
    font-weight: 600;
    color: #111;
}

.ir-vcard-mono {
    font-family: 'Courier New', Consolas, monospace;
    letter-spacing: 0.05em;
    direction: ltr;
    display: inline-block;
}

.ir-vcard-plate-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.ir-vcard-vin {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 82px;
    font-size: 0.62rem;
    font-weight: 700;
    font-family: Arial, sans-serif;
    color: #1a3a2e;
    direction: ltr;
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
    z-index: 2;
}

.ir-vcard-smart-no {
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* ——— پشت کارت ——— */
.ir-vcard-back {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr;
    padding: 0.75rem 0.5rem 0.75rem 0;
}

.ir-vcard-back-serial {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    z-index: 2;
    width: 26px;
    padding: 0.75rem 0;
    background: linear-gradient(180deg, #1a3a2e 0%, #0f2922 100%);
    border-radius: 0 6px 6px 0;
}

.ir-vcard-serial-label {
    writing-mode: vertical-rl;
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
}

.ir-vcard-serial-num {
    writing-mode: vertical-rl;
    font-size: 0.58rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #fff;
    letter-spacing: 0.12em;
}

.ir-vcard-back-left {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 0.35rem 0.5rem 1.75rem;
    gap: 0.5rem;
    min-width: 100px;
}

.ir-vcard-usage {
    font-size: 0.72rem;
    font-weight: 800;
    color: #1a3a2e;
}

.ir-vcard-emv-chip {
    width: 52px;
    height: 54px;
    border-radius: 6px;
    background: linear-gradient(145deg, #e8c547 0%, #c9a020 30%, #f0d060 50%, #a67c00 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.ir-vcard-chip-lines {
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.15) 1px, transparent 1px) 0 0 / 6px 100%,
        linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px) 0 0 / 100% 5px;
}

.ir-vcard-red-note {
    background: #c0392b;
    color: #fff;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 0.35rem 0.4rem;
    border-radius: 3px;
    text-align: center;
    line-height: 1.35;
    max-width: 88px;
    position: relative;
    margin-top: auto;
}

.ir-vcard-red-arrow {
    display: block;
    font-size: 0.65rem;
    margin-top: 0.15rem;
    opacity: 0.9;
}

.ir-vcard-back-specs {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.18rem;
    padding: 0.5rem 0.35rem;
}

.ir-vcard-spec {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: 0.72rem;
    line-height: 1.35;
}

.ir-vcard-spec .ir-vcard-lbl {
    min-width: 3.2rem;
}

.ir-vcard-spec .ir-vcard-val {
    font-weight: 600;
    flex: 1;
}

.ir-vcard-back-barcode-col {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding-inline-end: 0.35rem;
}

.ir-vcard-barcode-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.ir-vcard-barcode {
    width: 230px;
    height: 48px;
    flex-shrink: 0;
    transform: rotate(90deg);
    background: repeating-linear-gradient(
        90deg,
        #111 0px, #111 2px,
        #fff 2px, #fff 3px,
        #111 3px, #111 4px,
        #fff 5px, #fff 7px,
        #111 7px, #111 9px,
        #fff 9px, #fff 10px,
        #111 10px, #111 11px,
        #fff 12px, #fff 14px
    );
    border: 1px solid #ccc;
}

.ir-vcard-red-strip {
    width: 22px;
    background: #c0392b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem 0;
    border-radius: 0 4px 4px 0;
}

.ir-vcard-strip-num {
    writing-mode: vertical-rl;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.15em;
    transform: rotate(180deg);
}

.ir-vcard-notes {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #92400e;
    margin-top: 0.75rem;
}

.vehicle-specs-panels-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.vehicle-specs-panels-row .vehicle-specs-panel {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .vehicle-specs-panels-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1020px) {
    .ir-vehicle-cards {
        justify-content: flex-start;
    }
}

/* پنل کناری مشخصات */
.vehicle-specs-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    background: #fff;
}

.vehicle-specs-panel:last-child {
    margin-bottom: 0;
}

.vehicle-specs-panel-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.vehicle-specs-drivers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vehicle-specs-driver-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 0.82rem;
    color: inherit;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.vehicle-specs-driver-chip:hover {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
}

.vehicle-specs-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vehicle-specs-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.4rem 0;
}

.vehicle-specs-checklist li.is-ok {
    color: #059669;
}

.vehicle-specs-checklist li.is-missing {
    color: var(--text-muted);
}

.vehicle-specs-checklist li.is-danger {
    color: #dc2626;
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
}

.profile-dl dt {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
}

.profile-dl dd {
    font-size: 0.9rem;
}

.correspondence-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.correspondence-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    background: #fafbfc;
}

.correspondence-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.correspondence-meta .table-actions {
    margin-right: auto;
}

.breadcrumb-nav {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.breadcrumb-nav a {
    color: var(--accent);
    text-decoration: none;
}

/* ─── مدیریت کاربران ─── */
.user-table-identity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    text-align: center;
    margin-inline: auto;
}

.user-table-identity > div {
    text-align: center;
}

.user-table-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-profile-topbar-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-profile-topbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.user-access-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    height: 100%;
}

.user-access-card__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.user-access-card__label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.user-access-card__value {
    font-size: 0.95rem;
    color: var(--text);
}

.user-access-perms-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.user-access-perms-list li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: #fafbfc;
}

.user-access-perms-list li.is-active {
    color: var(--primary);
    border-color: rgba(14, 165, 233, 0.35);
    background: rgba(14, 165, 233, 0.08);
    font-weight: 600;
}

.user-access-perms-list li.is-active i {
    color: var(--accent);
}

/* کارت پرسنلی */
.ir-employee-cards {
    display: flex;
    justify-content: center;
}

.ir-ecard {
    position: relative;
    width: 100%;
    max-width: 520px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #1e3a5f 0%, #0f2744 55%, #1a3352 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(15, 39, 68, 0.25);
}

.ir-ecard-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: radial-gradient(circle at 20% 30%, #fff 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
}

.ir-ecard-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #38bdf8, var(--accent));
}

.ir-ecard--admin .ir-ecard-stripe { background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b); }
.ir-ecard--manager .ir-ecard-stripe { background: linear-gradient(90deg, #8b5cf6, #a78bfa, #8b5cf6); }
.ir-ecard--expert .ir-ecard-stripe { background: linear-gradient(90deg, #0ea5e9, #38bdf8, #0ea5e9); }
.ir-ecard--clearance .ir-ecard-stripe { background: linear-gradient(90deg, #10b981, #34d399, #10b981); }
.ir-ecard--sales .ir-ecard-stripe { background: linear-gradient(90deg, #ec4899, #f472b6, #ec4899); }

.ir-ecard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 0.75rem;
    position: relative;
    z-index: 1;
}

.ir-ecard-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ir-ecard-brand i {
    font-size: 1.5rem;
    color: var(--accent);
}

.ir-ecard-brand strong {
    display: block;
    font-size: 0.95rem;
}

.ir-ecard-brand small {
    font-size: 0.68rem;
    opacity: 0.7;
}

.ir-ecard-chip {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: 2.5rem;
    height: 1.85rem;
    border-radius: 6px;
    background: linear-gradient(135deg, #d4a853 0%, #f0d78c 50%, #c9a227 100%);
    padding: 0.25rem;
    pointer-events: none;
}

.ir-ecard-chip-lines {
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.15) 1px, transparent 1px) 0 0 / 6px 100%,
        linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px) 0 0 / 100% 5px;
    pointer-events: none;
}

.ir-ecard-bg-pattern,
.ir-ecard-stripe {
    pointer-events: none;
}

.ir-ecard-body {
    display: flex;
    gap: 1.25rem;
    padding: 0.5rem 1.25rem 1rem;
    position: relative;
    z-index: 1;
}

.ir-ecard-photo {
    position: relative;
    flex-shrink: 0;
}

.ir-ecard-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5.5rem;
    height: 6.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.ir-ecard-status {
    position: absolute;
    bottom: -4px;
    left: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #1e3a5f;
}

.ir-ecard-status--active { background: #10b981; }
.ir-ecard-status--inactive { background: #ef4444; }

.ir-ecard-fields {
    flex: 1;
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.ir-ecard-field-lbl {
    display: block;
    font-size: 0.65rem;
    opacity: 0.65;
    margin-bottom: 0.1rem;
}

.ir-ecard-field-val {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
}

.ir-ecard-mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

.ir-ecard-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.ir-ecard-footer-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

@media (max-width: 575.98px) {
    .ir-ecard-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ir-ecard-fields {
        width: 100%;
    }
}

/* طرف‌های تجاری — badge و کارت پروفایل */
.partner-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.partner-type-badge--cargo_owner {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.25);
}

.partner-type-badge--domestic_freight {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
}

.partner-type-badge--shipping_line {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.25);
}

.partner-type-badge--international_freight {
    color: #7c3aed;
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.25);
}

.partner-profile .vehicle-profile-topbar-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.partner-cards-wrap {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 1rem;
}

.partner-card {
    position: relative;
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #1e3a5f 0%, #0f2744 55%, #1a3352 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(15, 39, 68, 0.22);
}

.partner-card__stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.partner-card--cargo .partner-card__stripe {
    background: linear-gradient(90deg, #14b8a6, #2dd4bf, #14b8a6);
}

.partner-card--domestic .partner-card__stripe {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
}

.partner-card--shipping .partner-card__stripe {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8, #0ea5e9);
}

.partner-card--international .partner-card__stripe {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa, #8b5cf6);
}

.partner-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.5rem;
}

.partner-card__type {
    font-size: 0.78rem;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.partner-card__body {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1.25rem 1.25rem;
    align-items: flex-start;
}

.partner-card__logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.partner-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.65rem;
}

.partner-card__dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 1rem;
    margin: 0;
}

.partner-card__dl div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.partner-card__dl dt {
    font-size: 0.72rem;
    opacity: 0.65;
    margin: 0;
}

.partner-card__dl dd {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
}

.partner-routes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.partner-routes-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafbfc;
}

.partner-reports-summary .user-access-card {
    height: 100%;
}

.customs-border-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.customs-border-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.customs-border-badge--customs {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.25);
}

.customs-border-badge--border {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

.agent-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.agent-role-badge--origin {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.25);
}

.agent-role-badge--destination {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
}

.agent-role-badge--border {
    color: #7c3aed;
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.25);
}

.agent-summary-row .user-access-card {
    height: 100%;
}

.agent-case-desk .vehicle-profile-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
}

.transit-containers-panel > .card-body {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 0 0 12px 12px;
}

.transit-containers-panel .card-header {
    background: #fafbfc;
    overflow: visible;
    position: relative;
    z-index: 40;
}

.transit-containers-header {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
}

.transit-containers-header__title {
    flex: 1 1 auto;
    min-width: 10rem;
}

.transit-stage-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    flex: 2 1 22rem;
    justify-content: flex-end;
    overflow: visible;
}

.transit-stage-nav__picker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 12rem;
    flex: 1 1 14rem;
    max-width: 22rem;
}

.transit-stage-nav__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin: 0;
}

.transit-stage-nav__picker .form-select {
    font-size: 0.78rem;
}

.transit-stage-nav__icon-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    overflow: visible;
}

.transit-stage-nav__bulk-sep {
    display: inline-block;
    width: 1px;
    height: 1.6rem;
    background: var(--border);
    margin-inline: 0.15rem;
}

.tbl-action--primary {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.tbl-action--nav-prev {
    background: rgba(99, 102, 241, 0.16);
    color: #4338ca;
}

.tbl-action--nav-prev:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.26);
    border-color: rgba(99, 102, 241, 0.35);
    color: #3730a3;
}

.tbl-action--nav-next {
    background: rgba(14, 165, 233, 0.16);
    color: #0369a1;
}

.tbl-action--nav-next:hover:not(:disabled) {
    background: rgba(14, 165, 233, 0.26);
    border-color: rgba(14, 165, 233, 0.35);
    color: #075985;
}

.tbl-action--fleet {
    background: rgba(168, 85, 247, 0.14);
    color: #7e22ce;
}

.tbl-action--fleet:hover:not(:disabled) {
    background: rgba(168, 85, 247, 0.24);
    border-color: rgba(168, 85, 247, 0.35);
    color: #6b21a8;
}

.tbl-action--contract {
    background: rgba(20, 184, 166, 0.14);
    color: #0f766e;
}

.tbl-action--contract:hover {
    background: rgba(20, 184, 166, 0.24);
    border-color: rgba(20, 184, 166, 0.35);
    color: #115e59;
}

.tbl-action--depart {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.tbl-action--depart:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.24);
    border-color: rgba(245, 158, 11, 0.35);
    color: #92400e;
}

.tbl-action--info {
    background: rgba(6, 182, 212, 0.14);
    color: #0e7490;
}

.tbl-action--info:hover:not(:disabled) {
    background: rgba(6, 182, 212, 0.24);
    border-color: rgba(6, 182, 212, 0.35);
    color: #155e75;
}

.tbl-action--primary:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.24);
    border-color: rgba(59, 130, 246, 0.35);
    color: #1e40af;
}

.tbl-action--play {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.tbl-action--play:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.24);
    border-color: rgba(34, 197, 94, 0.35);
    color: #166534;
}

.tbl-action--warn {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.tbl-action--warn:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.24);
    border-color: rgba(245, 158, 11, 0.35);
    color: #92400e;
}

.tbl-action--success {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.tbl-action--success:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.24);
    border-color: rgba(34, 197, 94, 0.35);
    color: #166534;
}

.tbl-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.transit-containers-header .tbl-action[data-tip]::after,
.transit-containers-header .tbl-action[data-tip]::before,
.transit-containers-header .tbl-action-tip[data-tip]::after,
.transit-containers-header .tbl-action-tip[data-tip]::before {
    z-index: 300;
}

.transit-containers-header .tbl-action[data-tip]::after,
.transit-containers-header .tbl-action-tip[data-tip]::after {
    bottom: calc(100% + 12px);
}

.transit-containers-header .tbl-action[data-tip]::before,
.transit-containers-header .tbl-action-tip[data-tip]::before {
    bottom: calc(100% + 6px);
}

.transit-containers-header .tbl-action-tip {
    position: relative;
    display: inline-flex;
    overflow: visible;
}

.transit-containers-header .tbl-action-tip[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.38rem 0.7rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
    z-index: 300;
}

.transit-containers-header .tbl-action-tip[data-tip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    border: 5px solid transparent;
    border-top-color: #334155;
    transition: opacity 0.22s ease;
    pointer-events: none;
    z-index: 300;
}

.transit-containers-header .tbl-action-tip:hover[data-tip]::after,
.transit-containers-header .tbl-action-tip:focus-within[data-tip]::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.transit-containers-header .tbl-action-tip:hover[data-tip]::before,
.transit-containers-header .tbl-action-tip:focus-within[data-tip]::before {
    opacity: 1;
}

.transit-containers-header .tbl-action-tip > .tbl-action:disabled {
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .transit-stage-nav {
        width: 100%;
        justify-content: stretch;
    }

    .transit-stage-nav__picker {
        max-width: none;
    }
}

.transit-container-status {
    font-size: 0.72rem;
    font-weight: 600;
}

.transit-container-status--pending { background: rgba(100, 116, 139, 0.15); color: #475569; }
.transit-container-status--assigned { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.transit-container-status--departed { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.transit-container-status--delivered { background: rgba(34, 197, 94, 0.15); color: #15803d; }

.transit-containers-table-wrap {
    overflow: visible;
}

.transit-containers-table.table-custom {
    table-layout: auto;
    width: 100%;
    font-size: 0.8125rem;
}

.transit-containers-table.table-custom tbody td {
    vertical-align: middle;
    text-align: center;
    padding: 0.4rem 0.35rem;
}

.transit-containers-table .transit-col-customs,
.transit-containers-table .transit-col-product {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transit-containers-table .transit-col-container {
    white-space: nowrap;
    min-width: 7rem;
}

.transit-containers-table .transit-col-product {
    max-width: 9rem;
}

.transit-containers-table .transit-col-driver {
    white-space: normal;
    overflow: visible;
    line-height: 1.3;
    font-size: 0.78rem;
    min-width: 6.75rem;
}

.transit-driver-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.transit-driver-cell__name {
    font-weight: 600;
    line-height: 1.2;
}

.transit-driver-cell__mobile {
    font-size: 0.72rem;
    color: var(--bs-secondary-color);
    line-height: 1.1;
}

.transit-driver-cell__plate {
    display: flex;
    justify-content: center;
    margin-top: 0.15rem;
}

.transit-containers-table .transit-col-driver .plate-iran {
    margin: 0 auto;
}

.transit-containers-table.table-custom thead th {
    text-align: center;
    vertical-align: middle;
    padding: 0.45rem 0.35rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.transit-containers-table .transit-col-check { width: 2rem; }
.transit-containers-table .transit-col-num { width: 2rem; }
.transit-containers-table .transit-col-type { width: 3rem; }
.transit-containers-table .transit-col-customs { max-width: 9rem; }
.transit-containers-table .transit-col-freight { width: 5.5rem; }
.transit-containers-table .transit-col-deadline { width: 4.5rem; }
.transit-containers-table .transit-col-status { width: 4.5rem; }
.transit-containers-table .transit-col-actions {
    width: 1%;
    min-width: 11rem;
    overflow: visible;
    white-space: normal;
    padding-inline: 0.35rem;
    vertical-align: middle;
}

.transit-row-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 0.2rem;
    max-width: 10.75rem;
    position: relative;
    z-index: 2;
}

.transit-containers-table tbody tr {
    position: relative;
}

.transit-containers-table .transit-col-actions .tbl-action {
    flex-shrink: 0;
}

.demurrage-badge { font-size: 0.7rem; font-weight: 600; }
.demurrage-badge--muted { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.demurrage-badge--success { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.demurrage-badge--warning { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.demurrage-badge--danger { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

.agent-portal-sidebar .agent-portal-user-card {
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Accounting */
.accounting-shell .accounting-stat-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    height: 100%;
}
.accounting-stat-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}
.accounting-stat-card--pending .accounting-stat-card__icon { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.accounting-stat-card--approved .accounting-stat-card__icon { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.accounting-stat-card--posted .accounting-stat-card__icon { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.accounting-stat-card__value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.accounting-stat-card__label { font-size: 0.85rem; color: #64748b; }
.accounting-stat-card__sub { font-size: 0.78rem; color: #94a3b8; margin-top: 0.15rem; }
.accounting-batch .card-header { background: linear-gradient(90deg, rgba(248,250,252,.95), #fff); }
.accounting-source-badge { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; font-weight: 600; }
.accounting-status { font-size: 0.75rem; font-weight: 600; }
.accounting-status--pending { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.accounting-status--approved { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.accounting-status--rejected { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.accounting-status--posted { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.accounting-table td, .accounting-table th { vertical-align: middle; text-align: center; }

.js-money-input {
    direction: ltr;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
    .partner-card__body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .partner-card__dl {
        width: 100%;
    }
}

/* entity-select: دکمه + چسبیده به فیلد (RTL) */
.entity-select-group__control {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
}

.entity-select-group__control .entity-select-add-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.entity-select-add-btn__glyph {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
}

.entity-select-add-btn__main {
    font-size: 1.45rem;
    line-height: 1;
    color: #1d4f86;
}

.entity-select-add-btn__plus {
    position: absolute;
    inset-inline-end: -0.05rem;
    bottom: 0;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    line-height: 1;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.entity-select-add-btn--cargo_product .entity-select-add-btn__main {
    color: #0f766e;
}

.entity-select-add-btn--cargo_owner .entity-select-add-btn__main,
.entity-select-add-btn--driver .entity-select-add-btn__main {
    color: #1d4f86;
}

.entity-select-add-btn--customs_office .entity-select-add-btn__main,
.entity-select-add-btn--freight_company .entity-select-add-btn__main {
    color: #7c3aed;
}

.entity-select-add-btn--vehicle .entity-select-add-btn__main {
    color: #b45309;
}

.entity-select-add-btn--shipping_line .entity-select-add-btn__main {
    color: #0369a1;
}

.entity-select-group__control .entity-select-add-btn:hover,
.fleet-assign-field__add-round.entity-select-add-btn:hover {
    transform: scale(1.08);
    opacity: 0.92;
}

.entity-select-group__control .entity-select-add-btn:focus-visible {
    outline: 2px solid rgba(14, 165, 233, 0.55);
    outline-offset: 2px;
    border-radius: 0.35rem;
}

.entity-select-field-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    position: relative;
}

.entity-select-group__control .entity-select-field,
.entity-select-group__control .form-select {
    flex: 1 1 auto;
    min-width: 0;
}

/* مودال تو در تو — فریز والد */
.modal.modal-frozen {
    pointer-events: none;
}

.modal.modal-frozen .modal-dialog {
    opacity: 0.55;
    filter: grayscale(0.15);
    transition: opacity 0.15s ease;
}

.modal.modal-nested {
    pointer-events: auto;
}

.modal.modal-nested .modal-dialog {
    opacity: 1;
    filter: none;
}

.modal-backdrop.modal-backdrop-nested {
    opacity: 0.35;
}

.entity-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.entity-combobox {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.entity-combobox__input {
    width: 100%;
    text-align: center;
}

.entity-combobox__list {
    position: absolute;
    top: calc(100% + 0.2rem);
    right: 0;
    left: 0;
    z-index: 30;
    display: none;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    max-height: 12rem;
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.65rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.entity-combobox.is-open .entity-combobox__list,
.entity-combobox__list.is-open {
    display: block;
}

.entity-combobox__list--floating {
    z-index: 12000 !important;
}

.entity-combobox__item,
.entity-combobox__empty,
.entity-combobox__more {
    padding: 0.45rem 0.7rem;
    font-size: 0.84rem;
}

.entity-combobox__item {
    cursor: pointer;
}

.entity-combobox__item:hover,
.entity-combobox__item.is-active,
.entity-combobox__item.is-selected {
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
}

.entity-combobox__empty,
.entity-combobox__more {
    color: #64748b;
}

.transit-bl-form-section {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.85rem;
    padding: 1rem;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.transit-bl-form-section--containers {
    background: #fff;
}

.transit-bl-form-section__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

.transit-bl-form-section__title span {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    font-size: 0.78rem;
}

/* نقش چندانتخابی نماینده */
.role-multiselect {
    position: relative;
}

.role-multiselect__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    text-align: right;
    cursor: pointer;
    background-color: #fff;
}

.role-multiselect__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-multiselect__caret {
    flex-shrink: 0;
    opacity: 0.55;
    font-size: 0.75rem;
}

.role-multiselect__panel {
    display: none;
    position: absolute;
    top: calc(100% + 0.2rem);
    right: 0;
    left: 0;
    z-index: 40;
    margin: 0;
    padding: 0.35rem 0;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.65rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    max-height: 14rem;
    overflow: auto;
}

.role-multiselect:not(.is-open) .role-multiselect__panel {
    display: none !important;
}

.role-multiselect.is-open .role-multiselect__panel {
    display: block;
}

.role-multiselect--drop-up:not(.is-open) .role-multiselect__panel:not(.role-multiselect__panel--fixed) {
    top: auto;
    bottom: calc(100% + 0.2rem);
}

.role-multiselect__panel.role-multiselect__panel--fixed {
    right: auto;
    left: auto;
    z-index: 12000 !important;
}

.modal-form .modal-body:has(.role-multiselect.is-open),
.modal-form .modal-body:has(.entity-combobox.is-open),
.modal-dialog-scrollable .modal-content:has(.role-multiselect.is-open),
.modal-dialog-scrollable .modal-content:has(.entity-combobox.is-open) {
    overflow: visible;
}


.role-multiselect__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    font-size: 0.88rem;
}

.role-multiselect__option:hover {
    background: rgba(14, 165, 233, 0.08);
}

.role-multiselect__option .form-check-input {
    flex-shrink: 0;
    margin: 0;
}

.role-multiselect__validator {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ——— مودال تخصیص ناوگان (ERP) ——— */
.fleet-assign-modal__dialog {
    max-width: min(96vw, 92rem);
    width: calc(100% - 1.25rem);
    max-height: calc(100vh - 0.75rem);
    margin: 0.375rem auto;
}

.fleet-assign-modal__content {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22);
    background: #eef2f7;
    height: min(94vh, 68rem);
    max-height: calc(100vh - 0.75rem);
    padding: var(--modal-edge-inset);
    box-sizing: border-box;
}

.fleet-assign-modal__form .fleet-assign-shell {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.fleet-assign-modal__form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.fleet-assign-shell {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
}

.fleet-assign-shell__banner {
    position: relative;
    padding: 1.15rem 1.35rem 1.1rem;
    background: linear-gradient(135deg, #0f2744 0%, #163a63 48%, #1d4f86 100%);
    color: #e8f1fb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fleet-assign-shell__banner-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.95rem;
    padding-inline: 1rem;
}

.bl-smart-import {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.85rem 1rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    text-align: right;
}

.bl-smart-import__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.bl-smart-import__body {
    flex: 1 1 220px;
    min-width: 0;
}

.bl-smart-import__title {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.15rem;
}

.bl-smart-import__desc {
    font-size: 0.74rem;
    color: rgba(232, 241, 251, 0.82);
}

.bl-smart-import__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.bl-smart-import__status {
    font-size: 0.72rem;
    color: #bae6fd;
}

.bl-smart-import__alert {
    margin-top: 0.55rem;
    font-size: 0.78rem;
}

.fleet-assign-shell__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    min-width: 0;
}

.fleet-assign-shell__brand-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 1.35rem;
    flex-shrink: 0;
}

.fleet-assign-shell__eyebrow {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(226, 236, 248, 0.72);
    margin-bottom: 0.15rem;
}

.fleet-assign-shell__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
}

.fleet-assign-shell__subtitle {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: rgba(226, 236, 248, 0.78);
}

.fleet-assign-shell__context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
    width: 100%;
    max-width: 56rem;
    margin-inline: auto;
}

.fleet-assign-shell__context-item {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 6.5rem;
    text-align: right;
}

.fleet-assign-shell__context-item--primary {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(125, 211, 252, 0.35);
}

.fleet-assign-shell__context-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.95rem;
    color: #dbeafe;
    flex-shrink: 0;
}

.fleet-assign-shell__context-item--primary .fleet-assign-shell__context-icon {
    background: rgba(125, 211, 252, 0.2);
    color: #e0f2fe;
}

.fleet-assign-shell__context-text {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
}

.fleet-assign-shell__context-label {
    font-size: 0.68rem;
    color: rgba(226, 236, 248, 0.7);
}

.fleet-assign-shell__context-item strong {
    font-size: 0.84rem;
    color: #fff;
    font-weight: 700;
    line-height: 1.25;
}

.fleet-assign-shell__context-item .badge {
    align-self: flex-start;
    font-size: 0.72rem;
}

.fleet-assign-shell__workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 12.5rem minmax(0, 1fr) 19rem;
    gap: 0;
    min-height: 0;
    background: #eef2f7;
}

.fleet-assign-shell__steps {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 0.65rem;
    background: #e4eaf2;
    border-left: 1px solid #d5dde8;
    overflow-y: auto;
}

.fleet-assign-shell__step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.55rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    background: transparent;
    text-align: right;
    color: #475569;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fleet-assign-shell__step:hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: #d5dde8;
}

.fleet-assign-shell__step.is-active {
    background: #fff;
    border-color: #bfd3ea;
    color: #0f2744;
    box-shadow: 0 4px 14px rgba(15, 39, 68, 0.08);
}

.fleet-assign-shell__step-num {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    background: #cbd5e1;
    color: #334155;
    flex-shrink: 0;
}

.fleet-assign-shell__step.is-active .fleet-assign-shell__step-num {
    background: #1d4f86;
    color: #fff;
}

.fleet-assign-shell__step-body {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.fleet-assign-shell__step-body strong {
    font-size: 0.8rem;
    line-height: 1.2;
}

.fleet-assign-shell__step-body small {
    font-size: 0.68rem;
    color: #64748b;
}

.fleet-assign-shell__main {
    overflow-y: auto;
    padding: 0.85rem;
    scroll-behavior: smooth;
}

.fleet-assign-shell__aside {
    padding: 0.85rem 0.85rem 0.85rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: linear-gradient(180deg, #e8edf4 0%, #eef2f7 100%);
    border-right: 1px solid #d5dde8;
    min-width: 0;
}

.fleet-assign-panel {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 0.85rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    scroll-margin-top: 0.5rem;
}

.fleet-assign-panel:last-child {
    margin-bottom: 0;
}

.fleet-assign-panel__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e8edf3;
    background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 100%);
    border-radius: 0.85rem 0.85rem 0 0;
}

.fleet-assign-panel__icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 79, 134, 0.1);
    color: #1d4f86;
    font-size: 1rem;
    flex-shrink: 0;
}

.fleet-assign-panel__icon--route { background: rgba(14, 165, 233, 0.12); color: #0284c7; }
.fleet-assign-panel__icon--waybill { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.fleet-assign-panel__icon--contract { background: rgba(34, 197, 94, 0.12); color: #16a34a; }

.fleet-assign-panel__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

.fleet-assign-panel__desc {
    margin: 0.15rem 0 0;
    font-size: 0.76rem;
    color: #64748b;
}

.fleet-assign-panel__body {
    padding: 0.95rem 1rem 1rem;
}

.fleet-assign-panel__options {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

.fleet-assign-field__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
}

.fleet-assign-field__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 1.5rem;
    margin-bottom: 0.35rem;
}

.fleet-assign-field__control {
    flex-wrap: nowrap;
}

.fleet-assign-field__row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-direction: row;
}

.fleet-assign-field__row > .form-select,
.fleet-assign-field__row > .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.fleet-assign-field__add-round {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: none;
}

.fleet-assign-field__add-round:not(.entity-select-add-btn) .bi {
    display: none;
}

.fleet-assign-field__add {
    flex: 0 0 auto;
    min-width: 2.45rem;
    padding-inline: 0.5rem;
    z-index: 2;
}

.fleet-assign-draft-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.65rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #92400e;
    font-size: 0.8rem;
}

.fleet-assign-draft-banner i {
    color: #d97706;
}

.fleet-assign-draft-banner .btn-link {
    color: #b45309;
    text-decoration: none;
    padding: 0;
    font-size: 0.78rem;
}

.fleet-assign-draft-banner .btn-link:hover {
    color: #92400e;
    text-decoration: underline;
}

.fleet-assign-field__hint {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.fleet-assign-readonly {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.45rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.55rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.86rem;
}

.fleet-assign-readonly i {
    color: #64748b;
}

.fleet-assign-aside__card {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    min-width: 0;
    flex-shrink: 0;
}

.fleet-assign-aside__card-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    background: #f8fafc;
    border-bottom: 1px solid #e8edf3;
    font-size: 0.74rem;
    color: #0f2744;
}

.fleet-assign-aside__metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.5rem;
    min-width: 0;
}

.fleet-assign-metric {
    padding: 0.38rem 0.42rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    min-width: 0;
    overflow: hidden;
}

.fleet-assign-metric:has(.js-info-plate) {
    grid-column: 1 / -1;
}

.fleet-assign-metric__label {
    display: block;
    font-size: 0.6rem;
    color: #64748b;
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

.fleet-assign-metric__value {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fleet-assign-metric__value.js-info-plate {
    font-size: 0.62rem;
    letter-spacing: -0.01em;
}

.fleet-assign-aside__amounts {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem;
    min-width: 0;
}

.fleet-assign-amount {
    padding: 0.42rem 0.48rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    min-width: 0;
    overflow: hidden;
}

.fleet-assign-amount--pre {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.22);
}

.fleet-assign-amount--post {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.22);
}

.fleet-assign-amount__label {
    display: block;
    font-size: 0.6rem;
    color: #64748b;
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

.fleet-assign-amount__value {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0f172a;
    text-align: end;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.fleet-assign-aside__notice {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    padding: 0.5rem 0.55rem;
    border-radius: 0.65rem;
    background: rgba(29, 79, 134, 0.08);
    border: 1px solid rgba(29, 79, 134, 0.14);
    color: #334155;
    font-size: 0.64rem;
    line-height: 1.4;
    min-width: 0;
    overflow: hidden;
}

.fleet-assign-aside__notice i {
    color: #1d4f86;
    margin-top: 0.1rem;
}

.fleet-assign-shell__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-top: 1px solid #d8e0ea;
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.05);
}

.fleet-assign-shell__footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.76rem;
    color: #64748b;
}

.fleet-assign-shell__footer-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.fleet-assign-shell__footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-inline-start: auto;
    flex-direction: row;
}

.fleet-assign-shell__footer-actions .fleet-assign-shell__submit {
    order: 1;
}

.fleet-assign-shell__footer-actions .modal-btn-cancel {
    order: 2;
}

.fleet-assign-shell__submit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding-inline: 1.15rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(29, 79, 134, 0.28);
}

.fleet-assign-modal .form-select,
.fleet-assign-modal .form-control {
    border-color: #cfd8e3;
    font-size: 0.86rem;
}

.fleet-assign-modal .form-select:focus,
.fleet-assign-modal .form-control:focus {
    border-color: #7cb3e8;
    box-shadow: 0 0 0 0.2rem rgba(29, 79, 134, 0.12);
}

/* ——— مودال ثبت BL (همان پوسته ERP تخصیص) ——— */
.fleet-assign-field__control.entity-select-group .form-label {
    display: none;
}

.fleet-assign-field__control.entity-select-group .entity-select-group__control {
    width: 100%;
}

.fleet-assign-field__control.entity-select-group .entity-select-add-btn {
    width: auto;
    height: auto;
}

.bl-create-product-field .entity-select-add-btn__glyph {
    width: 2.25rem;
    height: 2.25rem;
}

/* ——— مودال ثبت BL: آپلود مدارک ——— */
.bl-create-documents-panel {
    margin-top: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px solid #dbe3ee;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    outline: none;
}

.bl-create-documents-panel.is-dragover {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.fleet-assign-field__section-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #475569;
    margin: 0 0 0.55rem;
    letter-spacing: 0.01em;
}

.fleet-assign-domestic-preview {
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.85rem 0.9rem 1rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.fleet-assign-domestic-preview__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.35rem;
    border-bottom: 2px solid #1e293b;
}

.fleet-assign-domestic-preview__brand {
    text-align: center;
    flex: 1;
}

.fleet-assign-domestic-preview__doc-title {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 0.55rem;
    color: #0f172a;
}

.fleet-assign-domestic-preview__grid--context th,
.fleet-assign-domestic-preview__grid--context td {
    font-size: 0.7rem;
}

.fleet-assign-domestic-preview__col-trip {
    width: 3.25rem;
}

.fleet-assign-domestic-preview__grid--freight .js-domestic-return-row td {
    background: #f0f9ff;
}

.fleet-assign-domestic-preview__grid--freight .js-domestic-return-row td:first-child {
    background: #e0f2fe;
}

.fleet-assign-domestic-preview__grid--total th {
    background: #dbeafe;
}

.fleet-assign-domestic-preview__grand-total {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
}

.fleet-assign-domestic-preview__grand-total strong {
    font-variant-numeric: tabular-nums;
}

.fleet-assign-domestic-preview__head strong {
    display: block;
    font-size: 0.88rem;
    color: #0f172a;
}

.fleet-assign-domestic-preview__head span {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.fleet-assign-domestic-preview__title {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 800;
    margin: 0.75rem 0 0.45rem;
    color: #0f172a;
}

.fleet-assign-domestic-preview__title--return {
    color: #0369a1;
}

.fleet-assign-domestic-preview__grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.72rem;
    margin-bottom: 0.35rem;
}

.fleet-assign-domestic-preview__grid th,
.fleet-assign-domestic-preview__grid td {
    border: 1px solid #111;
    padding: 0.35rem 0.3rem;
    text-align: center;
    vertical-align: middle;
}

.fleet-assign-domestic-preview__grid th {
    background: #ececec;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
}

.fleet-assign-domestic-preview__grid td {
    background: #fff;
}

.fleet-assign-domestic-preview__grid .form-control,
.fleet-assign-domestic-preview__grid .form-select {
    font-size: 0.75rem;
    min-height: 2rem;
    text-align: center;
}

.fleet-assign-domestic-preview__grid .fleet-assign-field__row {
    flex-wrap: nowrap;
}

.fleet-assign-domestic-preview__grid .fleet-assign-field__add-round {
    flex-shrink: 0;
}

.bl-route-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bl-route-grid__block + .bl-route-grid__block {
    padding-top: 0.15rem;
}

.bl-route-grid__title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #475569;
    margin: 0 0 0.55rem;
    letter-spacing: 0.01em;
}

.bl-route-grid__row {
    align-items: end;
}

.bl-route-grid__row .entity-select-group,
.bl-route-grid__row .js-transit-agent-field {
    margin-bottom: 0;
}

.bl-create-documents-panel__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.bl-create-documents-panel__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.bl-create-documents-panel__title {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 0.15rem;
    color: #0f172a;
}

.bl-create-documents-panel__desc {
    font-size: 0.78rem;
    color: #64748b;
}

.bl-doc-upload-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.bl-doc-slot {
    position: relative;
    min-height: 7.5rem;
}

.bl-doc-slot__pick,
.bl-doc-slot__preview {
    width: 100%;
    height: 100%;
    min-height: 7.5rem;
    border-radius: 0.75rem;
    border: 1.5px dashed #c5d3e3;
    background: #fff;
}

.bl-doc-slot__pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.55rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.bl-doc-slot__pick:hover {
    border-color: #7cb3e8;
    background: #f8fbff;
    transform: translateY(-1px);
}

.bl-doc-slot__type-badge {
    position: absolute;
    top: 0.45rem;
    inset-inline-start: 0.45rem;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 0.95rem;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

.bl-doc-slot__pick .bl-doc-slot__type-badge {
    position: static;
    margin-bottom: 0.15rem;
    background: #1d4f86;
}

.bl-doc-slot__type-badge--overlay {
    top: 0.4rem;
    inset-inline-start: 0.4rem;
}

.bl-doc-slot__pick-icon {
    font-size: 1.35rem;
    color: #0ea5e9;
    line-height: 1;
}

.bl-doc-slot__pick-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0f172a;
}

.bl-doc-slot__pick-hint {
    font-size: 0.68rem;
    color: #94a3b8;
}

.bl-doc-slot__preview {
    position: relative;
    overflow: hidden;
    border-style: solid;
    border-color: #b9d4f2;
    padding: 0;
}

.bl-doc-slot__thumb {
    width: 100%;
    height: 100%;
    min-height: 7.5rem;
    object-fit: cover;
    display: block;
}

.bl-doc-slot__pdf-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 7.5rem;
    background: linear-gradient(180deg, #fee2e2 0%, #fff 100%);
    color: #b91c1c;
    font-weight: 800;
}

.bl-doc-slot__pdf-badge i {
    font-size: 2rem;
}

.fleet-assign-aside__card--summary .fleet-assign-aside__metrics {
    gap: 0.55rem;
}

.fleet-assign-shell__footer-meta .js-bl-smart-import-trigger {
    margin-inline-start: 0.35rem;
}

.bl-doc-slot__progress {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.55);
    z-index: 3;
}

.bl-doc-slot__progress.is-visible {
    display: flex;
}

.bl-doc-slot__progress-bar {
    width: 70%;
    height: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
    position: relative;
}

.bl-doc-slot__progress-bar::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
    border-radius: inherit;
    transition: width 0.1s linear;
}

.bl-doc-slot__progress-text {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.bl-doc-slot__remove {
    position: absolute;
    top: 0.35rem;
    inset-inline-end: 0.35rem;
    width: 1.65rem;
    height: 1.65rem;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    z-index: 4;
    cursor: pointer;
}

.bl-doc-slot__remove:hover {
    background: #dc2626;
}

.bl-doc-slot.is-dragover .bl-doc-slot__pick,
.bl-doc-slot.is-dragover .bl-doc-slot__preview {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.bl-doc-slot__status {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    z-index: 3;
    font-size: 0.78rem;
    font-weight: 700;
}

.bl-doc-slot__status.is-visible {
    display: flex;
}

.bl-doc-slot__status-spin {
    animation: bl-doc-spin 0.9s linear infinite;
    font-size: 1.1rem;
}

@keyframes bl-doc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bl-doc-context-menu {
    position: fixed;
    z-index: 1080;
    min-width: 9rem;
    padding: 0.3rem;
    border-radius: 0.55rem;
    background: #fff;
    border: 1px solid #dbe3ee;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.bl-doc-context-menu__item {
    width: 100%;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.82rem;
    color: #0f172a;
    cursor: pointer;
}

.bl-doc-context-menu__item:hover {
    background: #f1f5f9;
}

.bl-doc-slot.is-done .bl-doc-slot__preview {
    border-color: #86efac;
}

@media (max-width: 991.98px) {
    .bl-doc-upload-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .bl-doc-upload-grid {
        grid-template-columns: 1fr;
    }
}

/* ——— مودال ثبت BL: گرید کانتینر ——— */
.bl-create-container-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 2.5rem;
    gap: 0.5rem;
    align-items: end;
    padding: 0.55rem 0.65rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.65rem;
    background: #fff;
    margin-bottom: 0.5rem;
}

.bl-create-container-grid--head {
    display: none;
    padding: 0.45rem 0.65rem;
    background: #f1f5f9;
    border-style: dashed;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.35rem;
}

@media (min-width: 992px) {
    .bl-create-container-grid--head {
        display: grid;
    }
}

.bl-create-container-grid__actions {
    display: flex;
    align-items: end;
    padding-bottom: 0.1rem;
}

.bl-create-container-rows {
    max-height: 16rem;
    overflow: auto;
    padding-inline-end: 0.15rem;
}

.bl-create-aside-containers {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 9rem;
    overflow: auto;
}

.bl-create-aside-container-item {
    padding: 0.35rem 0.55rem;
    border-radius: 0.45rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
}

.bl-create-docs {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border: 1px solid #dbe3ee;
}

@media (max-width: 991.98px) {
    .bl-create-container-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bl-create-container-grid__actions {
        grid-column: 1 / -1;
    }

    .bl-create-product-cell {
        grid-column: 1 / -1;
    }
}

/* ——— نمودار محصولات ——— */
.product-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.product-bar-chart__row {
    display: grid;
    grid-template-columns: minmax(5rem, 7rem) minmax(0, 1fr) 2.5rem;
    gap: 0.5rem;
    align-items: center;
}

.product-bar-chart__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-bar-chart__track {
    height: 0.55rem;
    background: #e8eef5;
    border-radius: 999px;
    overflow: hidden;
}

.product-bar-chart__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d4f86, #38bdf8);
    min-width: 4px;
}

.product-bar-chart__value {
    font-size: 0.8rem;
    text-align: left;
    color: #0f172a;
}

.product-daily-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    min-height: 10rem;
    padding-top: 0.5rem;
    overflow-x: auto;
}

.product-daily-chart__col {
    flex: 1 0 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 1.4rem;
}

.product-daily-chart__bar {
    width: 100%;
    max-width: 1.25rem;
    border-radius: 0.35rem 0.35rem 0.1rem 0.1rem;
    background: linear-gradient(180deg, #38bdf8, #1d4f86);
    min-height: 8px;
}

.product-daily-chart__label {
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
}

.bl-create-product-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bl-create-product-field .form-select {
    flex: 1;
    min-width: 0;
}

@media (max-width: 1199.98px) {
    .fleet-assign-shell__workspace {
        grid-template-columns: 11rem minmax(0, 1fr) 17rem;
    }
}

@media (max-width: 991.98px) {
    .fleet-assign-shell__workspace {
        grid-template-columns: 1fr;
    }

    .fleet-assign-shell__steps {
        flex-direction: row;
        overflow-x: auto;
        border-left: none;
        border-bottom: 1px solid #d5dde8;
        padding: 0.55rem;
    }

    .fleet-assign-shell__step {
        flex: 0 0 auto;
        min-width: 8.5rem;
    }

    .fleet-assign-shell__aside {
        padding: 0 0.85rem 0.85rem;
        border-right: none;
    }

    .fleet-assign-aside__metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .fleet-assign-modal__dialog {
        width: calc(100% - 0.5rem);
        margin: 0.25rem auto;
        max-height: calc(100vh - 0.5rem);
    }

    .fleet-assign-modal__content {
        height: calc(100vh - 0.5rem);
        max-height: calc(100vh - 0.5rem);
        border-radius: 0.75rem;
    }

    .fleet-assign-shell {
        min-height: 100%;
    }

    .fleet-assign-shell__banner {
        padding: 1rem 0.85rem 0.85rem;
    }

    .fleet-assign-shell__context-item {
        min-width: calc(50% - 0.35rem);
        flex: 1 1 calc(50% - 0.35rem);
    }

    .fleet-assign-aside__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fleet-assign-shell__footer {
        padding: 0.65rem 0.75rem;
    }

    .fleet-assign-shell__footer-actions {
        width: 100%;
    }

    .fleet-assign-shell__footer-actions .btn {
        flex: 1 1 auto;
    }
}

/* ——— چت آنلاین ——— */
.chat-page {
    display: grid;
    grid-template-columns: 15% minmax(0, 85%);
    gap: 0.75rem;
    height: calc(100vh - 8.5rem);
    min-height: 520px;
}

.chat-page__staff,
.chat-page__room {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    overflow: hidden;
}

.chat-page__staff-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    flex-shrink: 0;
}

.chat-page__title {
    font-size: 0.82rem;
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
}

.chat-page__staff-search {
    margin-bottom: 0.55rem;
    flex-shrink: 0;
}

.chat-page__staff-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-bottom: 0.35rem;
}

.chat-page__staff-footer {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    padding-top: 0.55rem;
    margin-top: 0.35rem;
    border-top: 1px solid #e2e8f0;
}

.chat-page__footer-btn {
    border: none;
    background: #f8fafc;
    border-radius: 0.65rem;
    padding: 0.55rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.chat-page__footer-btn:hover {
    background: #e0f2fe;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.chat-page__footer-btn-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.chat-page__footer-btn-icon--group {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.chat-page__footer-btn-icon--contact {
    background: linear-gradient(135deg, #10b981, #059669);
}

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.6rem;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.2rem;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-conv-item:hover,
.chat-conv-item.is-active {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.chat-conv-item__avatar {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4f86;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-conv-item__avatar--group {
    background: #dcfce7;
    color: #15803d;
}

.chat-conv-item__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-conv-item__body strong {
    font-size: 0.78rem;
    line-height: 1.2;
}

.chat-conv-item__body small {
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conv-item__badge {
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-page__staff-group-title {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
    padding-inline: 0.15rem;
}

.chat-page__staff-empty {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0 0 0.35rem;
    padding-inline: 0.15rem;
}

.chat-staff-item {
    margin: 0 0 0.25rem;
}

.chat-staff-item__btn {
    width: 100%;
    border: 1px solid transparent;
    background: #f8fafc;
    border-radius: 0.6rem;
    padding: 0.45rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-align: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-staff-item__btn:hover,
.chat-staff-item.is-active .chat-staff-item__btn {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.chat-staff-item__avatar {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4f86;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.chat-staff-item__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chat-staff-item__body strong {
    font-size: 0.78rem;
    line-height: 1.2;
}

.chat-staff-item__body small {
    font-size: 0.62rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.chat-staff-item__badge {
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-room {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    --chat-room-side-gap: 0.5cm;
}

.chat-room--empty {
    flex: 1;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-align: center;
    gap: 0.5rem;
}

.chat-room--empty i {
    font-size: 2.75rem;
    opacity: 0.4;
}

.chat-room--empty h2 {
    font-size: 1.05rem;
    margin: 0;
    color: #334155;
}

.chat-room__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding-inline: var(--chat-room-side-gap, 0.5cm);
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.55rem;
    flex-shrink: 0;
}

.chat-room__head-tools {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.chat-room__peer-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: none;
    background: transparent;
    padding: 0;
    text-align: inherit;
    cursor: pointer;
}

.chat-room__peer-btn:hover strong {
    color: #0284c7;
}

.chat-room__search-wrap {
    position: relative;
    width: min(240px, 34vw);
}

.chat-room__search {
    font-size: 0.78rem;
    border-radius: 999px;
    padding-inline: 0.85rem;
}

.chat-room__search-results {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 0.35rem);
    z-index: 30;
    max-height: 280px;
    overflow: auto;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 0.65rem;
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.12);
}

.chat-room__search-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
    border: none;
    border-bottom: 1px solid #fee2e2;
    background: #fff5f5;
    text-align: inherit;
    padding: 0.55rem 0.65rem;
    cursor: pointer;
}

.chat-room__search-item:hover {
    background: #ffe4e6;
}

.chat-room__search-item-meta {
    font-size: 0.68rem;
    color: #dc2626;
    font-weight: 700;
}

.chat-room__search-item-text {
    font-size: 0.78rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-room__search-item-file {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
}

.chat-room__search-item-file--pdf { color: #b91c1c; }
.chat-room__search-item-file--word { color: #1d4ed8; }
.chat-room__search-item-file--excel { color: #15803d; }

.chat-room__search-item-badge {
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 800;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    padding: 0.05rem 0.35rem;
}

.chat-room__search-item-open {
    font-size: 0.68rem;
    font-weight: 700;
    color: #0284c7;
    text-decoration: none;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.chat-room__search-item-open:hover {
    text-decoration: underline;
}

.chat-file-preview-modal .modal-body {
    min-height: 200px;
    padding: 0;
    background: #f8fafc;
}

.chat-file-preview__iframe {
    display: block;
    width: 100%;
    height: min(75vh, 720px);
    border: none;
    background: #fff;
}

.chat-file-preview__image {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    margin: 0 auto;
    padding: 1rem;
}

.chat-file-preview__video {
    display: block;
    width: 100%;
    max-height: 75vh;
    background: #000;
}

.chat-file-preview__audio-wrap,
.chat-file-preview__fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.chat-file-preview__fallback-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.chat-file-preview__fallback-icon--pdf { background: #fee2e2; color: #dc2626; }
.chat-file-preview__fallback-icon--word { background: #dbeafe; color: #2563eb; }
.chat-file-preview__fallback-icon--excel { background: #dcfce7; color: #16a34a; }
.chat-file-preview__fallback-icon--ppt { background: #ffedd5; color: #ea580c; }
.chat-file-preview__fallback-icon--default { background: #f1f5f9; color: #475569; }

.chat-file-preview__fallback-name {
    margin: 0;
    font-weight: 700;
    color: #334155;
    word-break: break-word;
}

.chat-file-preview__audio {
    width: min(100%, 420px);
}

.chat-room__search-empty {
    padding: 0.65rem;
    font-size: 0.78rem;
    color: #64748b;
}

.chat-room__head-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-room__head-btn.is-active,
.chat-room__head-btn:hover {
    background: #eff6ff;
    color: #0284c7;
    border-color: #bae6fd;
}

.chat-room__select-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.45rem 0.65rem;
    margin-inline: var(--chat-room-side-gap, 0.5cm);
    margin-bottom: 0.45rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.55rem;
    font-size: 0.82rem;
    color: #b91c1c;
}

.chat-room__select-actions {
    display: flex;
    gap: 0.35rem;
}

.chat-message__select {
    display: none;
    align-items: center;
    margin-inline-end: 0.25rem;
}

.chat-room.is-select-mode .chat-message__select {
    display: inline-flex;
}

.chat-room.is-select-mode .chat-message {
    flex-direction: row;
    align-items: flex-start;
}

.chat-message.is-search-hit {
    animation: chat-search-flash 1.2s ease 2;
}

@keyframes chat-search-flash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.45); border-radius: 0.65rem; }
}

.chat-room__peer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.chat-room__peer-avatar {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4f86, #0ea5e9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-room__peer-avatar--group {
    background: linear-gradient(135deg, #059669, #10b981);
}

.chat-room__peer strong {
    display: block;
    font-size: 0.92rem;
}

.chat-room__peer small {
    color: #64748b;
    font-size: 0.72rem;
}

.chat-room__live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #059669;
    font-weight: 700;
}

.chat-room__live-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #10b981;
    animation: chat-live-pulse 1.4s ease-in-out infinite;
}

@keyframes chat-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.chat-room__peer-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.chat-room__messages {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.35rem var(--chat-room-side-gap, 0.5cm) 0.65rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-radius: 0.65rem;
    border: 1px solid #eef2f7;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: min(78%, 520px);
}

.chat-message--mine {
    align-self: flex-end;
}

.chat-message--other {
    align-self: flex-start;
}

.chat-message__meta {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
}

.chat-message--mine .chat-message__meta {
    flex-direction: row;
}

.chat-message--other .chat-message__meta {
    flex-direction: row-reverse;
}

.chat-message__meta-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.chat-message--mine .chat-message__meta-text {
    align-items: flex-start;
    text-align: start;
}

.chat-message--other .chat-message__meta-text {
    align-items: flex-end;
    text-align: end;
}

.chat-message__avatar {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    overflow: hidden;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    flex-shrink: 0;
}

.chat-message__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-message__time {
    font-size: 0.68rem;
    line-height: 1.3;
    color: #64748b;
    white-space: nowrap;
}

.chat-message__time-row {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.chat-message__ticks {
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    line-height: 1;
}

.chat-message--mine .chat-message__ticks--sent {
    color: #ffffff;
    background: #16a34a;
    border-radius: 999px;
    padding: 0 0.12rem;
    font-size: 0.72rem;
}

.chat-message__ticks--sent {
    color: #cbd5e1;
    text-shadow: none;
}

.chat-message__ticks--delivered {
    color: #94a3b8;
}

.chat-message__ticks--read {
    color: #0ea5e9;
}

.chat-date-separator {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    margin: 0.15rem 0;
}

.chat-date-separator span {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    box-shadow: none;
}

.chat-wallpaper--teal .chat-date-separator span,
.chat-wallpaper--midnight .chat-date-separator span {
    background: #334155;
    color: #e2e8f0;
}

.chat-message__sender-inline {
    font-size: 0.68rem;
    font-weight: 700;
    color: #0ea5e9;
}

.chat-message__content {
    width: 100%;
}

.chat-message--mine .chat-message__content {
    padding-inline-end: 1.85rem;
}

.chat-message--other .chat-message__content {
    padding-inline-start: 1.85rem;
}

.chat-bubble {
    max-width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    position: relative;
    background-image: none;
}

.chat-bubble--mine {
    background-color: #dcf8c6;
    border-color: #b8e994;
    border-end-start-radius: 0.28rem;
}

.chat-bubble--other {
    background-color: #ffffff;
    border-end-end-radius: 0.28rem;
}

.chat-room[class*="chat-wallpaper--plain"] .chat-bubble {
    background-image: none;
}

.chat-bubble--mine::after,
.chat-bubble--other::after {
    content: '';
    position: absolute;
    bottom: 0.4rem;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

.chat-bubble--mine::after {
    inset-inline-end: -4px;
    border-inline-start-color: #dcf8c6;
}

.chat-bubble--other::after {
    inset-inline-start: -4px;
    border-inline-end-color: #fff;
}

.chat-bubble__sender {
    font-size: 0.72rem;
    font-weight: 800;
    color: #0ea5e9;
    margin-bottom: 0.25rem;
}

.chat-bubble__body {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.88rem;
}

.chat-bubble--has-media {
    padding: 0.35rem;
    overflow: hidden;
}

.chat-bubble__media-wrap {
    display: block;
    margin-bottom: 0.15rem;
    line-height: 0;
}

.chat-bubble__media {
    display: block;
    width: auto;
    max-width: min(100%, 300px);
    height: auto;
    max-height: 340px;
    border-radius: 0.55rem;
    object-fit: contain;
    background: #f1f5f9;
}

.chat-bubble__media--video {
    width: min(100%, 320px);
    height: auto;
    max-height: 280px;
}

.chat-bubble__pdf-wrap {
    width: min(100%, 300px);
    margin-bottom: 0.15rem;
}

.chat-bubble__pdf {
    display: block;
    width: 100%;
    height: 220px;
    border: none;
    border-radius: 0.55rem;
    background: #fff;
}

.chat-bubble__pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0369a1;
    text-decoration: none;
}

.chat-bubble__pdf-link:hover {
    text-decoration: underline;
}

.chat-bubble__audio {
    width: 100%;
    margin-bottom: 0.35rem;
}

.chat-bubble__file-card {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.35rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    min-width: 220px;
    max-width: 100%;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.chat-bubble__file-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.chat-bubble__file-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chat-bubble__file-card--pdf .chat-bubble__file-icon { background: #fee2e2; color: #dc2626; }
.chat-bubble__file-card--word .chat-bubble__file-icon { background: #dbeafe; color: #2563eb; }
.chat-bubble__file-card--excel .chat-bubble__file-icon { background: #dcfce7; color: #16a34a; }
.chat-bubble__file-card--ppt .chat-bubble__file-icon { background: #ffedd5; color: #ea580c; }
.chat-bubble__file-card--zip .chat-bubble__file-icon { background: #f3e8ff; color: #9333ea; }
.chat-bubble__file-card--text .chat-bubble__file-icon { background: #f1f5f9; color: #475569; }
.chat-bubble__file-card--video .chat-bubble__file-icon { background: #fce7f3; color: #db2777; }
.chat-bubble__file-card--audio .chat-bubble__file-icon { background: #e0e7ff; color: #4f46e5; }
.chat-bubble__file-card--default .chat-bubble__file-icon { background: #f8fafc; color: #64748b; }

.chat-bubble__file-info {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-bubble__file-info strong {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-bubble__file-info small {
    font-size: 0.65rem;
    color: #64748b;
}

.chat-bubble__file-dl {
    color: #94a3b8;
    flex-shrink: 0;
}

.chat-room__toolbar {
    flex-shrink: 0;
    margin-top: 0.55rem;
    position: relative;
    padding-inline: var(--chat-room-side-gap, 0.5cm);
}

.chat-room__emoji-panel {
    position: absolute;
    bottom: calc(100% + 0.35rem);
    inset-inline: 0;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 0.85rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    padding: 0.5rem;
    z-index: 6;
    animation: chat-panel-rise 0.18s ease-out;
}

@keyframes chat-panel-rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-room__emoji-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #eef2f7;
}

.chat-room__emoji-tab {
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
}

.chat-room__emoji-tab.is-active {
    background: #0ea5e9;
    color: #fff;
}

.chat-room__emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.2rem;
    max-height: 210px;
    overflow-y: auto;
    padding-inline-end: 0.15rem;
}

.chat-room__emoji-item {
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1.2;
    padding: 0.35rem 0.2rem;
    border-radius: 0.45rem;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}

.chat-room__emoji-item:hover {
    background: #f1f5f9;
    transform: scale(1.12);
}

.chat-room__attach-menu {
    position: absolute;
    bottom: calc(100% + 0.35rem);
    inset-inline-start: 0;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 0.85rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    padding: 0.45rem;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 11rem;
    animation: chat-panel-rise 0.18s ease-out;
}

.chat-room__attach-item {
    border: none;
    background: #f8fafc;
    border-radius: 0.55rem;
    padding: 0.55rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
}

.chat-room__attach-item i {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
}

.chat-room__attach-item:nth-child(1) i { background: #8b5cf6; }
.chat-room__attach-item:nth-child(2) i { background: #ef4444; }
.chat-room__attach-item:nth-child(3) i { background: #0ea5e9; }

.chat-room__attach-item:hover {
    background: #e0f2fe;
    transform: translateX(-2px);
}

.chat-room__composer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.45rem;
    align-items: end;
    padding: 0.45rem 0.55rem;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.chat-room__toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.chat-room__tool-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.chat-room__tool-btn:hover {
    background: #f1f5f9;
    color: #0ea5e9;
    transform: scale(1.08);
}

.chat-room__tool-btn.is-active {
    background: #e0f2fe;
    color: #0284c7;
}

.chat-room__tool-btn.is-open {
    background: #0ea5e9;
    color: #fff;
    transform: rotate(45deg);
}

.chat-room__tool-btn.is-open:hover {
    background: #0284c7;
    color: #fff;
}

.chat-room__input {
    resize: none;
    min-height: 2.35rem;
    max-height: 7rem;
    border: none;
    box-shadow: none !important;
    padding-top: 0.45rem;
    font-size: 0.88rem;
}

.chat-room__send-btn {
    width: 2.45rem;
    height: 2.45rem;
    padding: 0;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.chat-room__send-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45);
}

.chat-room__send-btn.is-sending {
    opacity: 0.65;
    transform: scale(0.95);
}

.chat-group-member-list {
    min-height: 220px;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#modal-chat-new-group .modal-form .modal-body,
#modal-chat-new-contact .modal-body {
    min-height: 280px;
}

.chat-group-member {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid #eef2f7;
    cursor: pointer;
    margin: 0;
}

.chat-group-member:hover {
    background: #f8fafc;
}

.chat-group-member input {
    flex-shrink: 0;
}

.chat-group-member__avatar {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4f86;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-group-member__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-group-member__info strong {
    font-size: 0.82rem;
}

.chat-group-member__info small {
    font-size: 0.68rem;
    color: #64748b;
}

.chat-contact-item {
    margin: 0 0 0.25rem;
}

.chat-contact-item__btn {
    width: 100%;
    border: 1px solid #eef2f7;
    background: #fff;
    border-radius: 0.6rem;
    padding: 0.5rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-align: inherit;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.chat-contact-item__btn:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.chat-contact-item__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-contact-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chat-contact-item__go {
    color: #0ea5e9;
    font-size: 1.1rem;
}

.chat-contact-results {
    max-height: 360px;
    overflow-y: auto;
}

.chat-page__footer-btn--wide {
    grid-column: 1 / -1;
}

.chat-context-menu {
    position: fixed;
    z-index: 1080;
    min-width: 11rem;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 0.65rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    padding: 0.35rem;
}

.chat-context-menu__item {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.45rem;
    font-size: 0.82rem;
    cursor: pointer;
    color: #334155;
}

.chat-context-menu__item:hover {
    background: #f1f5f9;
}

.chat-room__reply-bar {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.35rem;
    border: 1px solid var(--chat-reply-border);
    border-inline-start: 4px solid var(--chat-reply-accent);
    background: var(--chat-reply-bg);
    border-radius: 0.65rem;
    box-shadow: none;
}

.chat-room__reply-bar.is-active {
    animation: chat-reply-pulse 0.35s ease;
}

@keyframes chat-reply-pulse {
    from { transform: scale(0.985); }
    to { transform: scale(1); }
}

.chat-room__reply-preview {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    border: none;
    background: var(--chat-reply-bg);
    text-align: inherit;
    padding: 0;
    cursor: pointer;
}

.chat-room__reply-preview:hover .js-chat-reply-text {
    color: var(--chat-reply-accent);
    text-decoration: underline;
}

.chat-room__reply-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--chat-reply-label);
}

.chat-room__reply-preview strong {
    font-size: 0.72rem;
    color: var(--chat-reply-title);
}

.chat-room__reply-preview span {
    font-size: 0.78rem;
    color: var(--chat-reply-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-room__reply-cancel {
    border: none;
    background: var(--chat-reply-bg);
    color: var(--chat-reply-text);
    cursor: pointer;
}

.chat-room__edit-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.35rem;
    border-inline-start: 3px solid #f59e0b;
    background: #fffbeb;
    border-radius: 0.55rem;
}

.chat-room__edit-preview {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #b45309;
    font-weight: 600;
}

.chat-room__edit-cancel {
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.chat-room__send-btn.is-editing {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.chat-delete-modal__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
    font-size: 1.35rem;
}

.chat-widget-dock {
    position: fixed;
    inset-inline-start: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 0.65rem;
    pointer-events: none;
}

.chat-widget-popup {
    width: min(92vw, 340px);
    height: 420px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    transform: translateY(calc(var(--chat-widget-offset, 0) * -8px));
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.chat-widget-popup.has-unread-flash {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35), 0 16px 40px rgba(15, 23, 42, 0.22);
}

.chat-widget-popup.is-minimized {
    height: auto;
}

.chat-widget-popup.is-minimized .chat-widget-popup__body {
    display: none;
}

.chat-widget-popup.is-dragged {
    transform: none;
    z-index: 1090;
}

.chat-widget-popup__head.is-draggable {
    cursor: grab;
    user-select: none;
}

.chat-widget-popup__head.is-draggable:active {
    cursor: grabbing;
}

.chat-widget-popup__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
}

.chat-widget-popup__peer {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.chat-widget-popup__peer strong {
    display: block;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-widget-popup__peer small {
    display: block;
    font-size: 0.65rem;
    opacity: 0.9;
}

.chat-widget-popup__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-widget-popup__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-widget-popup__actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.chat-widget-popup__action {
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.chat-widget-popup__action:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.chat-widget-popup__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chat-room--widget {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: none;
    box-shadow: none;
    background: transparent;
}

.chat-room--widget .chat-room__messages {
    flex: 1;
    min-height: 0;
    max-height: none;
    border: none;
    border-radius: 0;
    margin: 0;
}

.chat-room--widget .chat-room__toolbar {
    border-top: 1px solid #eef2f7;
    padding: 0.45rem var(--chat-room-side-gap, 0.5cm);
}

.chat-room--widget .chat-room__composer {
    gap: 0.35rem;
}

.chat-bubble__reply {
    display: block;
    width: 100%;
    text-align: inherit;
    border: none;
    border-inline-start: 3px solid #0284c7;
    padding: 0.25rem 0.45rem;
    margin-bottom: 0.35rem;
    background: #ffffff;
    border-radius: 0.45rem;
    font-size: 0.72rem;
}

.chat-bubble--mine .chat-bubble__reply {
    background: #ffffff;
    border-inline-start-color: #16a34a;
}

.chat-bubble__reply.is-clickable {
    cursor: pointer;
}

.chat-bubble__reply.is-clickable:hover {
    background: #f1f5f9;
}

.chat-bubble__reply strong {
    display: block;
    color: #0284c7;
}

.chat-bubble__deleted {
    font-style: italic;
    color: #94a3b8;
    font-size: 0.82rem;
}

.chat-bubble__edited {
    font-size: 0.62rem;
    color: #94a3b8;
    text-align: end;
    margin-top: 0.15rem;
}

.chat-group-member__avatar img,
.chat-contact-item__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.chat-group-member__avatar,
.chat-contact-item__avatar {
    overflow: hidden;
}

.chat-transfer-case-item {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.55rem;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.35rem;
    text-align: inherit;
    cursor: pointer;
}

.chat-transfer-case-item.is-selected,
.chat-transfer-case-item:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

/* ——— فرم embed موبایل ——— */
.embed-layout-body {
    background: #f1f5f9;
    min-height: 100vh;
}

.mobile-embed-shell {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem;
}

.mobile-embed-shell__head {
    margin-bottom: 1rem;
}

.mobile-embed-shell__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #1d4f86, #0ea5e9);
    color: #fff;
}

.mobile-embed-shell__brand i {
    font-size: 1.5rem;
}

.mobile-embed-shell__brand small {
    display: block;
    opacity: 0.85;
}

.mobile-embed-form .form-control,
.mobile-embed-form .btn {
    border-radius: 0.65rem;
}

.mobile-embed-submit {
    padding-block: 0.7rem;
    font-weight: 700;
}

.mobile-embed-alert {
    border-radius: 0.75rem;
}

.chat-room {
    --chat-pattern-scale: 1;
    --chat-reply-bg: #1e293b;
    --chat-reply-border: #475569;
    --chat-reply-accent: #38bdf8;
    --chat-reply-title: #7dd3fc;
    --chat-reply-text: #e2e8f0;
    --chat-reply-label: #bae6fd;
}

.chat-wallpaper--teal,
.chat-wallpaper--midnight {
    --chat-reply-bg: #ffffff;
    --chat-reply-border: #94a3b8;
    --chat-reply-accent: #0284c7;
    --chat-reply-title: #0369a1;
    --chat-reply-text: #334155;
    --chat-reply-label: #0ea5e9;
}

.chat-room__messages {
    background-color: #eef6fb;
    background-size: calc(64px * var(--chat-pattern-scale, 1)) calc(64px * var(--chat-pattern-scale, 1));
}

.chat-wallpaper--sea .chat-room__messages {
    background-color: #e8f4fa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%230f172a' stroke-width='.95' opacity='.21'%3E%3Cg transform='translate(2 8) rotate(-8) scale(1.12)'%3E%3Cpath d='M0 5h10l2 4H-1z'/%3E%3C/g%3E%3Cg transform='translate(24 4) rotate(11) scale(1.1)'%3E%3Cpath d='M0 0v8M-2 4h4'/%3E%3C/g%3E%3Cg transform='translate(38 22) rotate(-5) scale(1.08)'%3E%3Cpath d='M0 5h12v2H0z'/%3E%3C/g%3E%3Cg transform='translate(8 36) rotate(9) scale(1.1)'%3E%3Cpath d='M0 4h9l2 3H-1z'/%3E%3C/g%3E%3Cg transform='translate(28 38) rotate(-10) scale(1.08)'%3E%3Cpath d='M0 0h8v6H0z'/%3E%3C/g%3E%3Cg transform='translate(44 44) rotate(7) scale(1.1)'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3C/g%3E%3Cg transform='translate(14 20) rotate(-12) scale(1.06)'%3E%3Cpath d='M0 4h10v3H0z'/%3E%3C/g%3E%3Cg transform='translate(48 8) rotate(14) scale(1.08)'%3E%3Cpath d='M0 3h9M2 3v4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-wallpaper--air .chat-room__messages {
    background-color: #eaf2fb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%230f172a' stroke-width='.95' opacity='.21'%3E%3Cg transform='translate(3 10) rotate(10) scale(1.12)'%3E%3Cpath d='M0 5h14l2-2h6v2l-2 2H3z'/%3E%3C/g%3E%3Cg transform='translate(30 6) rotate(-7) scale(1.1)'%3E%3Cpath d='M0 3h11v3H0z'/%3E%3C/g%3E%3Cg transform='translate(42 26) rotate(12) scale(1.08)'%3E%3Cpath d='M0 2h10M3 2v4'/%3E%3C/g%3E%3Cg transform='translate(8 34) rotate(-9) scale(1.1)'%3E%3Cpath d='M0 0h10v6H0z'/%3E%3C/g%3E%3Cg transform='translate(22 22) rotate(6) scale(1.08)'%3E%3Cpath d='M0 6h8M2 4v5'/%3E%3C/g%3E%3Cg transform='translate(46 42) rotate(-11) scale(1.1)'%3E%3Cpath d='M0 4h9v2H0z'/%3E%3C/g%3E%3Cg transform='translate(14 48) rotate(8) scale(1.06)'%3E%3Cpath d='M0 5h10l2 3H-1z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-wallpaper--rail .chat-room__messages {
    background-color: #ececec;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%230f172a' stroke-width='.95' opacity='.21'%3E%3Cg transform='translate(2 28) rotate(-6) scale(1.1)'%3E%3Cpath d='M0 6h16v4H0zM2 10v3M12 10v3'/%3E%3C/g%3E%3Cg transform='translate(6 10) rotate(9) scale(1.08)'%3E%3Cpath d='M0 5h14v4H0z'/%3E%3C/g%3E%3Cg transform='translate(34 18) rotate(-10) scale(1.1)'%3E%3Cpath d='M0 0h12v8H0z'/%3E%3C/g%3E%3Cg transform='translate(26 40) rotate(7) scale(1.08)'%3E%3Cpath d='M0 5h11v2H0zM1 7v2M8 7v2'/%3E%3C/g%3E%3Cg transform='translate(44 6) rotate(-5) scale(1.06)'%3E%3Cpath d='M0 0h14v2H0z'/%3E%3C/g%3E%3Cg transform='translate(48 38) rotate(11) scale(1.08)'%3E%3Cpath d='M0 4h10v3H0z'/%3E%3C/g%3E%3Cg transform='translate(18 46) rotate(-8) scale(1.06)'%3E%3Cpath d='M0 3h9M2 3v4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-wallpaper--road .chat-room__messages {
    background-color: #faf3e3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%230f172a' stroke-width='.95' opacity='.21'%3E%3Cg transform='translate(3 24) rotate(8) scale(1.1)'%3E%3Cpath d='M0 6h12v5H0zM1 11v2M9 11v2'/%3E%3C/g%3E%3Cg transform='translate(28 8) rotate(-9) scale(1.1)'%3E%3Cpath d='M0 5h14v6H0z'/%3E%3C/g%3E%3Cg transform='translate(42 34) rotate(11) scale(1.08)'%3E%3Cpath d='M0 4h11v3H0z'/%3E%3C/g%3E%3Cg transform='translate(10 8) rotate(-6) scale(1.08)'%3E%3Cpath d='M0 0h10v7H0z'/%3E%3C/g%3E%3Cg transform='translate(20 42) rotate(9) scale(1.08)'%3E%3Cpath d='M0 3h8l2 3H-1z'/%3E%3C/g%3E%3Cg transform='translate(46 48) rotate(-7) scale(1.06)'%3E%3Cpath d='M0 5h10v2H0z'/%3E%3C/g%3E%3Cg transform='translate(34 44) rotate(12) scale(1.06)'%3E%3Cpath d='M0 2h10M2 2v4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-wallpaper--global .chat-room__messages {
    background-color: #eeeaf8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%230f172a' stroke-width='.95' opacity='.21'%3E%3Cg transform='translate(4 12) rotate(-7) scale(1.1)'%3E%3Ccircle cx='5' cy='5' r='5'/%3E%3C/g%3E%3Cg transform='translate(26 6) rotate(10) scale(1.1)'%3E%3Cpath d='M0 4h11l2 3H-1z'/%3E%3C/g%3E%3Cg transform='translate(40 24) rotate(-12) scale(1.08)'%3E%3Cpath d='M0 3h12M3 3v4'/%3E%3C/g%3E%3Cg transform='translate(8 34) rotate(6) scale(1.1)'%3E%3Cpath d='M0 6h14v3H0z'/%3E%3C/g%3E%3Cg transform='translate(22 22) rotate(-8) scale(1.08)'%3E%3Cpath d='M0 5h10v4H0zM1 9v2M7 9v2'/%3E%3C/g%3E%3Cg transform='translate(44 40) rotate(11) scale(1.08)'%3E%3Cpath d='M0 0h8v6H0z'/%3E%3C/g%3E%3Cg transform='translate(48 8) rotate(-9) scale(1.06)'%3E%3Cpath d='M0 4h10v3H0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-wallpaper--teal .chat-room__messages {
    background-color: #1a3a38;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23cbd5e1' stroke-width='.95' opacity='.26'%3E%3Cg transform='translate(2 8) rotate(-8) scale(1.12)'%3E%3Cpath d='M0 5h10l2 4H-1z'/%3E%3C/g%3E%3Cg transform='translate(24 4) rotate(11) scale(1.1)'%3E%3Cpath d='M0 5h14l2-2h6v2l-2 2H3z'/%3E%3C/g%3E%3Cg transform='translate(38 22) rotate(-5) scale(1.08)'%3E%3Cpath d='M0 6h12v4H0zM2 10v3M9 10v3'/%3E%3C/g%3E%3Cg transform='translate(8 36) rotate(9) scale(1.1)'%3E%3Cpath d='M0 6h12v5H0z'/%3E%3C/g%3E%3Cg transform='translate(28 38) rotate(-10) scale(1.08)'%3E%3Cpath d='M0 2h10M3 2v4'/%3E%3C/g%3E%3Cg transform='translate(44 44) rotate(7) scale(1.1)'%3E%3Cpath d='M0 4h10v2H0z'/%3E%3C/g%3E%3Cg transform='translate(14 20) rotate(-12) scale(1.06)'%3E%3Cpath d='M0 0h8v6H0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-wallpaper--plain-simple .chat-room__messages {
    background-color: #f8fafc;
    background-image: none;
}

.chat-wallpaper--plain-warm .chat-room__messages {
    background-color: #fff7ed;
    background-image: none;
}

.chat-wallpaper--plain-cool .chat-room__messages {
    background-color: #f0f9ff;
    background-image: none;
}

.chat-wallpaper--sunset .chat-room__messages {
    background-color: #fff1e6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c2410c' stroke-width='.9' opacity='.18'%3E%3Cg transform='translate(4 10) rotate(-6) scale(1.1)'%3E%3Cpath d='M0 5h12l2 4H-1z'/%3E%3C/g%3E%3Cg transform='translate(26 6) rotate(8) scale(1.08)'%3E%3Ccircle cx='4' cy='4' r='4'/%3E%3C/g%3E%3Cg transform='translate(40 24) rotate(-10) scale(1.08)'%3E%3Cpath d='M0 6h14v3H0z'/%3E%3C/g%3E%3Cg transform='translate(10 34) rotate(7) scale(1.1)'%3E%3Cpath d='M0 4h10v3H0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-wallpaper--midnight .chat-room__messages {
    background-color: #0f172a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%2394a3b8' stroke-width='.85' opacity='.22'%3E%3Cg transform='translate(4 12) rotate(-8) scale(1.1)'%3E%3Cpath d='M0 5h10l2 4H-1z'/%3E%3C/g%3E%3Cg transform='translate(24 8) rotate(10) scale(1.08)'%3E%3Cpath d='M0 3h11M3 3v4'/%3E%3C/g%3E%3Cg transform='translate(38 28) rotate(-6) scale(1.08)'%3E%3Cpath d='M0 6h12v4H0z'/%3E%3C/g%3E%3Cg transform='translate(12 40) rotate(9) scale(1.08)'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-group-info-member {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.chat-group-info-member__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-wallpaper-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.chat-wallpaper-option {
    border: 2px solid #e2e8f0;
    border-radius: 0.65rem;
    min-height: 3.5rem;
    padding: 0.45rem;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: flex-end;
}

.chat-wallpaper-option.is-active {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.chat-wallpaper-preview--sea { background: linear-gradient(135deg, #cfe8f7, #93c5fd); }
.chat-wallpaper-preview--air { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.chat-wallpaper-preview--rail { background: linear-gradient(135deg, #e7e5e4, #d6d3d1); }
.chat-wallpaper-preview--road { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.chat-wallpaper-preview--global { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.chat-wallpaper-preview--teal { background: linear-gradient(135deg, #134e4a, #115e59); color: #ecfdf5; }
.chat-wallpaper-preview--plain-simple { background: #f8fafc; border: 1px solid #e2e8f0; }
.chat-wallpaper-preview--plain-warm { background: #fff7ed; border: 1px solid #fed7aa; }
.chat-wallpaper-preview--plain-cool { background: #f0f9ff; border: 1px solid #bae6fd; }
.chat-wallpaper-preview--sunset { background: linear-gradient(135deg, #ffedd5, #fdba74); }
.chat-wallpaper-preview--midnight { background: linear-gradient(135deg, #1e293b, #0f172a); color: #e2e8f0; }

.chat-message.is-flash-highlight {
    animation: chat-message-flash 2.2s ease;
}

@keyframes chat-message-flash {
    0%, 100% { background: transparent; }
    15%, 45% { background: rgba(14, 165, 233, 0.14); border-radius: 0.75rem; }
}

.chat-room__case-link a {
    color: #0369a1;
    text-decoration: none;
}

.chat-room__case-link a:hover {
    text-decoration: underline;
}

.chat-group-case-card {
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    border-radius: 0.65rem;
    padding: 0.55rem 0.7rem;
}

.chat-group-case-card__link {
    color: #0369a1;
    font-weight: 700;
    text-decoration: none;
}

.chat-group-case-card__link:hover {
    text-decoration: underline;
}

@media (max-width: 1199.98px) {
    .chat-page {
        grid-template-columns: 22% minmax(0, 78%);
    }
}

@media (max-width: 991.98px) {
    .chat-page {
        grid-template-columns: 1fr;
        height: auto;
        min-height: calc(100vh - 8rem);
    }

    .chat-page__staff {
        max-height: 220px;
    }

    .chat-page__room {
        min-height: 60vh;
    }
}

/* سازگاری با نام کلاس‌های قدیمی */
.container-fleet-assign { display: contents; }

.tbl-action-follow {
    color: #b45309;
    background: #fff7ed;
    border-color: #fed7aa;
}

.tbl-action-follow:hover {
    color: #9a3412;
    background: #ffedd5;
    border-color: #fdba74;
}

.tbl-action-badge {
    position: absolute;
    top: -0.3rem;
    left: -0.3rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ea580c;
    color: #fff;
    font-size: 0.62rem;
    line-height: 1.05rem;
    text-align: center;
}

.follow-up-reminders {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    border: 1px solid rgba(217, 119, 6, 0.28);
    border-radius: 0.9rem;
    box-shadow: 0 10px 26px rgba(146, 64, 14, 0.1);
}
.follow-up-reminders__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.16);
    color: #d97706;
    flex-shrink: 0;
}
.follow-up-reminders__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 0;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.8);
    color: inherit;
    text-align: right;
    text-decoration: none;
    cursor: pointer;
}

.follow-up-reminders__item:hover {
    background: #fff;
    color: inherit;
}

#modal-transit-follow-ups .modal-dialog-scrollable .modal-body {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.follow-up-modal {
    display: flex;
    flex-direction: column;
    min-height: 22rem;
    max-height: 62vh;
    gap: 0.75rem;
}

.follow-up-modal__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #0f172a;
}

.follow-up-thread {
    flex: 1 1 auto;
    min-height: 10rem;
    overflow: auto;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.follow-up-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.6rem;
}

.follow-up-item:last-child {
    margin-bottom: 0;
}

.follow-up-item.is-due {
    border-color: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.follow-up-item.is-done {
    opacity: 0.72;
}

.follow-up-item__head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.follow-up-item__body {
    margin: 0 0 0.45rem;
    white-space: pre-wrap;
}

.follow-up-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.78rem;
    color: #475569;
}

.follow-up-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
    align-items: center;
}

.follow-up-transfer {
    display: flex;
    gap: 0.35rem;
    flex: 1 1 14rem;
}

.follow-up-composer {
    flex-shrink: 0;
    padding-top: 0.25rem;
    border-top: 1px solid #e2e8f0;
}

.follow-up-composer__actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.75rem;
}


