:root {
    --twz-olive-950: #1a230f;
    --twz-olive-900: #253018;
    --twz-olive-850: #2f3a1a;
    --twz-olive-800: #3f4a24;
    --twz-olive-700: #4d5a2b;
    --twz-olive-600: #6f783e;
    --twz-copper-700: #9f4500;
    --twz-copper-600: #b65300;
    --twz-copper-500: #c26a24;
    --twz-copper-400: #ff9a4a;
    --twz-copper-soft: #ffd9c2;
    --twz-cream-50: #fffdf7;
    --twz-cream-100: #faf8f2;
    --twz-cream-200: #f4eed8;
    --twz-cream-300: #e9dfc1;
    --twz-slate-950: #11161b;
    --twz-slate-900: #151b20;
    --twz-slate-800: #22282e;
    --twz-slate-700: #3a4047;
    --twz-slate-500: #6b7280;
    --twz-slate-300: #d8dde5;
    --twz-slate-200: #e8ecf2;
    --twz-slate-100: #f3f6fa;
    --twz-slate-50: #f7f9fc;
    --twz-success: #6f783e;
    --twz-warning: #c26a24;
    --twz-danger: #9b2c2c;
    --twz-info: #3a4047;
    --twz-sidebar-width: 284px;
    --twz-sidebar-collapsed: 94px;
    --twz-content-max: 1680px;
    --twz-shadow-sm: 0 8px 24px rgba(17, 22, 27, 0.06);
    --twz-shadow-md: 0 14px 34px rgba(17, 22, 27, 0.1);
    --twz-shadow-lg: 0 24px 60px rgba(17, 22, 27, 0.12);
    --twz-card-radius: 20px;
    --twz-surface-radius: 24px;
    --twz-input-radius: 12px;
    --twz-pill-radius: 999px;
    --twz-control-height: 48px;
    --twz-control-height-sm: 34px;
    --twz-surface-padding: clamp(1rem, 2.5vw, 1.6rem);
    --twz-space-xs: 0.35rem;
    --twz-space-sm: 0.65rem;
    --twz-space-md: 1rem;
    --twz-space-lg: 1.5rem;
}


/* OHDA operational data tables and SalesReps workspace */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 0.35rem 0 1rem;
    border-bottom: 1px solid rgba(63, 74, 36, 0.12);
}

.page-header__copy {
    min-width: 0;
}

.page-header__title {
    margin: 0.2rem 0 0.35rem;
    color: var(--twz-olive-950);
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    font-weight: 900;
    line-height: 1.35;
}

.page-header__description {
    max-width: 68ch;
    margin: 0;
    color: var(--twz-slate-600);
    line-height: 1.75;
}

.page-header__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding-inline: 1.15rem;
    flex: 0 0 auto;
}

.data-panel {
    overflow: hidden;
}

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

.table-toolbar__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.period-chip,
.result-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    border-radius: var(--twz-pill-radius);
    font-size: 0.82rem;
    font-weight: 800;
}

.period-chip {
    border: 1px solid rgba(194, 106, 36, 0.16);
    background: rgba(194, 106, 36, 0.08);
    color: var(--twz-copper-700);
}

.result-count {
    border: 1px solid rgba(63, 74, 36, 0.12);
    background: #fff;
    color: var(--twz-slate-700);
}

.sales-reps-filter-toolbar {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
}

.sales-reps-filter-toolbar .filter-field {
    grid-column: span 2;
    min-width: 0;
}

.sales-reps-filter-toolbar .filter-field--search {
    grid-column: span 4;
}

.sales-reps-filter-toolbar .filter-field--compact {
    grid-column: span 1;
}

.sales-reps-filter-toolbar__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.sales-reps-filter-toolbar__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    min-width: 138px;
}

.search-input-wrap {
    position: relative;
}

.search-input-wrap > i {
    position: absolute;
    inset-inline-start: 0.95rem;
    top: 50%;
    z-index: 1;
    color: var(--twz-slate-500);
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input-wrap .form-control {
    padding-inline-start: 2.65rem;
}

.selected-period-summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.85rem;
    color: var(--twz-slate-600);
    font-size: 0.84rem;
}

.selected-period-summary strong {
    color: var(--twz-slate-900);
}

.selected-period-summary small {
    direction: ltr;
    unicode-bidi: isolate;
    color: var(--twz-slate-500);
    font-variant-numeric: tabular-nums;
}

.data-table-shell {
    padding: 0 !important;
    border: 1px solid rgba(63, 74, 36, 0.12);
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
}

.data-table {
    min-width: 820px;
    table-layout: auto;
}

.data-table > :not(caption) > * > * {
    padding: 0.8rem 0.85rem;
}

.data-table thead th {
    border-bottom: 1px solid rgba(63, 74, 36, 0.14);
    background: #f5f7fa;
    color: var(--twz-slate-800);
    font-size: 0.82rem;
    letter-spacing: 0;
}

.data-table tbody td {
    height: 66px;
    border-top: 0;
    border-bottom: 1px solid rgba(63, 74, 36, 0.08);
    background: #fff;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr {
    transition: background-color 0.16s ease;
}

.data-table tbody tr:hover td {
    background: rgba(194, 106, 36, 0.035);
}

.data-table__sort {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: inherit;
    text-decoration: none;
}

.data-table__sort:hover,
.data-table__sort:focus-visible {
    color: var(--twz-copper-700);
}

.data-table__sort i {
    color: var(--twz-slate-400);
    font-size: 0.78rem;
}

.data-table__sort--center {
    justify-content: center;
    width: 100%;
}

.table-cell--status,
.table-cell--numeric,
.table-cell--actions {
    text-align: center !important;
}

.table-cell--phone {
    text-align: right !important;
}

.table-cell--phone bdi,
.money-value {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.money-value {
    color: var(--twz-slate-900);
    font-weight: 800;
}

.table-value-link {
    padding: 0.3rem 0.55rem;
    border-radius: 9px;
    background: rgba(63, 74, 36, 0.06);
    color: var(--twz-olive-900);
    text-decoration: none;
}

.table-value-link:hover,
.table-value-link:focus-visible {
    background: rgba(194, 106, 36, 0.12);
    color: var(--twz-copper-700);
}

.sales-rep-identity {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--twz-slate-900);
    text-decoration: none;
}

.sales-rep-identity:hover,
.sales-rep-identity:focus-visible {
    color: var(--twz-copper-700);
}

.sales-rep-identity__avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    flex: 0 0 auto;
    background: rgba(63, 74, 36, 0.1);
    color: var(--twz-olive-900);
    font-weight: 900;
}

.sales-rep-identity > span:last-child {
    display: grid;
    gap: 0.12rem;
}

.sales-rep-identity small {
    color: var(--twz-slate-500);
    font-size: 0.76rem;
    font-weight: 600;
}

.status-badge__dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.data-table__actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.data-table__actions .btn {
    min-height: 34px;
    padding: 0.35rem 0.65rem;
    border-radius: 10px;
    white-space: nowrap;
}

.table-empty-state {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    padding: 2.25rem 1rem;
    color: var(--twz-slate-500);
    text-align: center;
}

.table-empty-state strong {
    color: var(--twz-slate-900);
    font-size: 1rem;
}

.table-empty-state__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.2rem;
    border-radius: 14px;
    background: rgba(63, 74, 36, 0.08);
    color: var(--twz-olive-800);
    font-size: 1.05rem;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
}

.table-pagination__summary {
    color: var(--twz-slate-500);
    font-size: 0.84rem;
    font-weight: 700;
}

.table-pagination .page-link,
.dataTables_wrapper .pagination .page-link {
    display: grid;
    place-items: center;
    min-width: 38px;
    min-height: 38px;
    border-radius: 10px !important;
    border-color: rgba(63, 74, 36, 0.12);
    color: var(--twz-slate-700);
    font-weight: 800;
}

.table-pagination .page-item.active .page-link,
.dataTables_wrapper .page-item.active .page-link {
    border-color: var(--twz-copper-700);
    background: var(--twz-copper-700);
    color: #fff;
}

.table-responsive .table > :not(caption) > * > * {
    vertical-align: middle;
}

.table-responsive .table thead th {
    font-weight: 850;
}

.table-responsive .table tbody tr {
    transition: background-color 0.16s ease;
}

@media (max-width: 1199.98px) {
    .sales-reps-filter-toolbar .filter-field,
    .sales-reps-filter-toolbar .filter-field--compact {
        grid-column: span 3;
    }

    .sales-reps-filter-toolbar .filter-field--search {
        grid-column: span 6;
    }

    .data-table__actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 991.98px) {
    .sales-reps-filter-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-reps-filter-toolbar .filter-field,
    .sales-reps-filter-toolbar .filter-field--search,
    .sales-reps-filter-toolbar .filter-field--compact {
        grid-column: span 1;
    }

    .sales-reps-filter-toolbar__actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .page-header,
    .table-toolbar,
    .table-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .page-header__action,
    .sales-reps-filter-toolbar__actions .btn {
        width: 100%;
    }

    .table-toolbar__meta {
        justify-content: flex-start;
    }

    .sales-reps-filter-toolbar {
        grid-template-columns: 1fr;
    }

    .sales-reps-filter-toolbar .filter-field,
    .sales-reps-filter-toolbar .filter-field--search,
    .sales-reps-filter-toolbar .filter-field--compact,
    .sales-reps-filter-toolbar__actions {
        grid-column: 1;
    }

    .sales-reps-filter-toolbar__actions {
        flex-direction: column;
    }

    .selected-period-summary {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.7rem 0.8rem;
        border-radius: 12px;
        background: #f7f9fb;
    }

    .sales-reps-table-panel .data-table-shell {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .sales-reps-table-panel .data-table {
        min-width: 100%;
    }

    .sales-reps-table-panel .table-mobile-cards tbody {
        gap: 0.75rem;
    }

    .sales-reps-table-panel .table-mobile-cards tbody tr:not(.data-table__empty-row) {
        padding: 0.2rem 0.8rem;
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.055);
    }

    .sales-reps-table-panel .table-mobile-cards tbody td {
        min-height: auto;
        height: auto;
        padding: 0.7rem 0;
        background: transparent;
    }

    .sales-reps-table-panel .table-mobile-cards tbody tr:hover td {
        background: transparent;
    }

    .sales-reps-table-panel .data-table__empty-row td {
        display: block;
        padding: 0;
        border: 0;
    }

    .sales-reps-table-panel .data-table__empty-row td::before {
        display: none;
    }

    .data-table__actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .data-table__actions .btn {
        width: 100%;
        min-width: 0;
    }

    .table-pagination nav {
        align-self: center;
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 420px) {
    .data-table__actions {
        grid-template-columns: 1fr;
    }
}


[x-cloak] {
    display: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    transition-property: color, background-color, border-color, box-shadow, transform, opacity;
    transition-duration: 180ms;
    transition-timing-function: ease;
}

html,
body {
    min-height: 100%;
}

html {
    direction: rtl;
}

body {
    margin: 0;
    font-family: "Cairo", system-ui, sans-serif;
    font-variant-numeric: tabular-nums lining-nums;
    text-align: right;
    direction: rtl;
    color: var(--twz-slate-950);
    background:
        radial-gradient(circle at top, rgba(194, 106, 36, 0.05), transparent 32%),
        linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

body.ohda-body {
    overflow-x: hidden;
}

body.sidebar-mobile-open {
    overflow: hidden;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.text-secondary,
.text-muted {
    color: var(--twz-slate-700) !important;
}

.bg-light {
    background-color: var(--twz-slate-50) !important;
}

.btn {
    min-height: 44px;
    padding-inline: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 12px;
    font-weight: 700;
}

.btn-sm,
.btn-group-sm > .btn {
    min-height: var(--twz-control-height-sm);
    padding-inline: 0.75rem;
    border-radius: 10px;
    font-size: 0.82rem;
}

.btn-primary,
.btn.btn-primary {
    background: var(--twz-copper-500);
    border: 1px solid var(--twz-copper-700);
    color: #fff;
    box-shadow: 0 10px 22px rgba(194, 106, 36, 0.22);
}

.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:hover,
.btn.btn-primary:focus {
    background: var(--twz-copper-600);
    border-color: var(--twz-copper-700);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-primary,
.btn.btn-outline-primary {
    color: var(--twz-olive-900);
    border-color: rgba(63, 74, 36, 0.22);
    background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-dark:hover,
.btn-outline-dark:focus {
    color: var(--twz-olive-900);
    background: #fff;
    border-color: rgba(63, 74, 36, 0.4);
    transform: translateY(-1px);
}

.btn-outline-secondary,
.btn-outline-dark {
    color: var(--twz-slate-800);
    border-color: rgba(63, 74, 36, 0.18);
    background: #fff;
}

.btn-outline-danger,
.btn.btn-outline-danger {
    color: var(--twz-danger);
    border-color: rgba(155, 44, 44, 0.24);
    background: #fff;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    color: var(--twz-danger);
    background: rgba(155, 44, 44, 0.04);
    border-color: rgba(155, 44, 44, 0.38);
    transform: translateY(-1px);
}

.btn-danger,
.btn.btn-danger {
    box-shadow: none;
}

.btn-olive {
    background: var(--twz-olive-900);
    color: var(--twz-cream-200);
    border: 1px solid var(--twz-olive-950);
}

.btn-olive:hover,
.btn-olive:focus {
    background: var(--twz-olive-850);
    color: var(--twz-cream-100);
    transform: translateY(-1px);
}

.badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: var(--twz-pill-radius);
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 800;
}

.bg-success-subtle,
.status-success,
.status-badge--active,
.status-badge--complete,
.status-badge--paid,
.status-badge--credit {
    background: rgba(111, 120, 62, 0.14) !important;
    color: var(--twz-success) !important;
}

.bg-warning-subtle,
.status-warning,
.status-badge--pending,
.status-badge--partial,
.status-badge--warning {
    background: rgba(194, 106, 36, 0.14) !important;
    color: var(--twz-warning) !important;
}

.bg-danger-subtle,
.status-danger,
.status-badge--danger,
.status-badge--cancelled,
.status-badge--debit {
    background: rgba(155, 44, 44, 0.12) !important;
    color: var(--twz-danger) !important;
}

.bg-secondary-subtle,
.status-neutral,
.status-badge--inactive {
    background: rgba(58, 64, 71, 0.08) !important;
    color: var(--twz-slate-700) !important;
}

.form-label {
    font-weight: 700;
    color: var(--twz-slate-900);
}

.form-control,
.form-select,
.input-group-text,
.select2-container--bootstrap-5 .select2-selection,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: var(--twz-control-height);
    border-radius: var(--twz-input-radius);
    border: 1px solid var(--twz-slate-300);
    background: #eef2f7;
    color: var(--twz-slate-900);
}

.page-actions,
.action-cluster {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.operations-page {
    display: grid;
    gap: 1rem;
}

.form-control,
.form-select,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    padding-inline: 16px;
    text-align: right;
}

.form-control:focus,
.form-select:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--twz-copper-500);
    box-shadow: 0 0 0 4px rgba(194, 106, 36, 0.1);
    background: #fff;
}

.form-check-input:checked {
    background-color: var(--twz-copper-500);
    border-color: var(--twz-copper-500);
}

.modal-content {
    border-radius: 24px;
    border: 1px solid rgba(63, 74, 36, 0.14);
    box-shadow: var(--twz-shadow-lg);
}

.modal-header,
.modal-footer {
    border-color: rgba(63, 74, 36, 0.1);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    position: relative;
}

.mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 22, 27, 0.38);
    backdrop-filter: blur(4px);
    z-index: 1040;
}

.app-sidebar {
    width: var(--twz-sidebar-width);
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1rem 1rem;
    color: var(--twz-cream-100);
    background-color: #11161b;
    background-image:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.2), transparent 26%),
        linear-gradient(180deg, #171717 0%, #1f2937 48%, #334155 100%);
    opacity: 1;
    border-left: 1px solid rgba(249, 115, 22, 0.12);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.04), 0 24px 52px rgba(0, 0, 0, 0.22);
    overflow-y: auto;
    transition: transform 0.25s ease, width 0.25s ease;
}

.app-sidebar.collapsed {
    width: var(--twz-sidebar-collapsed);
    padding-inline: 0.75rem;
}

.app-sidebar.collapsed .sidebar-group-title,
.app-sidebar.collapsed .sidebar-link span,
.app-sidebar.collapsed .sidebar-section-btn .sidebar-section-label > span,
.app-sidebar.collapsed .sidebar-submenu,
.app-sidebar.collapsed .chevron,
.app-sidebar.collapsed .brand-copy,
.app-sidebar.collapsed .sidebar-user-panel,
.app-sidebar.collapsed .sidebar-sticky-cta a span {
    display: none;
}

.app-sidebar.collapsed .sidebar-brand,
.app-sidebar.collapsed .sidebar-link,
.app-sidebar.collapsed .sidebar-section-btn,
.app-sidebar.collapsed .sidebar-section-label,
.app-sidebar.collapsed .sidebar-sticky-cta a {
    justify-content: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem 0.45rem 1.15rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-badge {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    padding: 0.45rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96));
    border: 1px solid rgba(249, 115, 22, 0.22);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.brand-copy strong {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--twz-cream-50);
}

.brand-copy span {
    color: rgba(241, 245, 249, 0.72);
    font-size: 0.9rem;
}

.brand-copy--logo {
    gap: 0.42rem;
}

.brand-wordmark {
    width: min(160px, 100%);
    max-height: 48px;
    display: block;
    object-fit: contain;
    object-position: right center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
}

.sidebar-group,
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-group-title {
    padding-inline: 0.8rem;
    color: rgba(241, 245, 249, 0.68);
    font-size: 0.78rem;
    font-weight: 800;
}

.sidebar-link,
.sidebar-section-btn,
.sidebar-submenu a {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.86rem 0.95rem;
    color: rgba(241, 245, 249, 0.86);
    border-radius: 16px;
    border: 1px solid transparent;
    min-width: 0;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-link i,
.sidebar-section-btn i,
.sidebar-submenu a i {
    width: 22px;
    font-size: 1rem;
    flex: 0 0 auto;
}

.sidebar-link:hover,
.sidebar-section-btn:hover,
.sidebar-submenu a:hover {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.18), rgba(249, 115, 22, 0.08));
    border-color: rgba(249, 115, 22, 0.18);
    color: var(--twz-cream-50);
    transform: translateX(-1px);
}

.sidebar-link.active,
.sidebar-section-btn.active,
.sidebar-submenu a.active {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.24), rgba(249, 115, 22, 0.1));
    color: #fff;
    border-inline-end: 3px solid var(--twz-copper-500);
    border-color: rgba(249, 115, 22, 0.22);
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.14), 0 10px 20px rgba(0, 0, 0, 0.12);
}

.sidebar-section-btn {
    justify-content: space-between;
    border: 0;
    background: transparent;
    text-align: right;
}

.sidebar-section-label {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.sidebar-link span,
.sidebar-section-label > span,
.sidebar-submenu a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-submenu {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-inline-start: 0.55rem;
}

.chevron {
    font-size: 0.8rem;
}

.chevron.rotated {
    transform: rotate(180deg);
}

.sidebar-sticky-cta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-sticky-cta a {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--twz-copper-500), var(--twz-copper-700));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(249, 115, 22, 0.22);
}

.sidebar-sticky-cta a:hover {
    background: linear-gradient(135deg, var(--twz-copper-600), var(--twz-copper-700));
    color: #fff;
    transform: translateY(-1px);
}

.sidebar-user-panel {
    display: none;
    margin-top: 1rem;
}

.sidebar-user-card {
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.94));
    border: 1px solid rgba(249, 115, 22, 0.14);
    padding: 0.9rem;
    box-shadow: var(--twz-shadow-sm);
}

.app-main {
    flex: 1;
    min-width: 0;
    margin-right: var(--twz-sidebar-width);
    transition: margin-right 0.25s ease;
}

.app-sidebar.collapsed + .app-main {
    margin-right: var(--twz-sidebar-collapsed);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 76px;
    padding: 0.95rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(247, 249, 252, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(63, 74, 36, 0.08);
}

.app-topbar > .d-flex {
    min-width: 0;
}

.topbar-title {
    margin: 0;
    font-size: 1.58rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--twz-olive-950);
}

.topbar-search {
    width: min(100%, 360px);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.95rem;
    border-radius: var(--twz-pill-radius);
    background: #fff;
    border: 1px solid var(--twz-slate-300);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.topbar-search i {
    color: var(--twz-copper-500);
    font-size: 1rem;
}

.topbar-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    min-height: 48px;
    padding: 0;
    color: var(--twz-slate-950);
    font: inherit;
}

.topbar-search input::placeholder {
    color: var(--twz-slate-500);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.topbar-site-link,
.topbar-owner-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.68rem 0.95rem;
    border-radius: var(--twz-pill-radius);
    background: #fff;
    color: var(--twz-olive-900);
    border: 1px solid rgba(63, 74, 36, 0.14);
    font-weight: 800;
}

.topbar-owner-link {
    background: rgba(37, 48, 24, 0.06);
}

.topbar-site-link:hover,
.topbar-owner-link:hover {
    background: var(--twz-cream-50);
    color: var(--twz-copper-700);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--twz-pill-radius);
    background: #fff;
    border: 1px solid rgba(63, 74, 36, 0.12);
    box-shadow: var(--twz-shadow-sm);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1rem;
    color: var(--twz-cream-100);
    background: linear-gradient(135deg, var(--twz-olive-900), var(--twz-copper-500));
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(63, 74, 36, 0.12);
    background: #fff;
    color: var(--twz-slate-800);
    box-shadow: var(--twz-shadow-sm);
}

.icon-btn:hover {
    color: var(--twz-copper-700);
    border-color: rgba(194, 106, 36, 0.22);
}

.app-content {
    width: min(100%, var(--twz-content-max));
    margin: 0 auto;
    display: flex;
    padding: 1.15rem;
    gap: 1.5rem;
    flex-direction: column;
}

.hero-panel,
.surface-panel,
.module-hero,
.metric-card,
.table-wrapper,
.quick-link,
.alert-link-card,
.feature-row,
.permission-group-card,
.asset-preview,
.empty-state,
.table-responsive,
.filter-toolbar,
form[method="get"].row.g-3,
form[method="get"].row.g-4,
.owner-system-card,
.owner-dark-card,
.owner-note,
.owner-route-card,
.owner-highlight,
.owner-architecture {
    background: #fff;
    border: 1px solid rgba(63, 74, 36, 0.14);
    border-radius: var(--twz-card-radius);
    box-shadow: var(--twz-shadow-sm);
    background-clip: padding-box;
}

.hero-panel:hover,
.surface-panel:hover,
.module-hero:hover,
.metric-card:hover,
.quick-link:hover,
.alert-link-card:hover,
.feature-row:hover,
.owner-system-card:hover,
.owner-route-card:hover,
.owner-highlight:hover,
.owner-architecture:hover {
    transform: translateY(-2px);
    box-shadow: var(--twz-shadow-md);
    border-color: rgba(63, 74, 36, 0.28);
}

.surface-panel {
    overflow: hidden;
    position: relative;
}

.hero-panel,
.module-hero,
.surface-panel,
.metric-card,
.table-responsive,
.table-wrapper,
.filter-toolbar,
form[method="get"].row.g-3,
form[method="get"].row.g-4,
.owner-system-card,
.owner-dark-card,
.owner-note,
.owner-route-card,
.owner-highlight,
.owner-architecture {
    padding: 1.5rem;
}

.surface-panel.card-olive,
.owner-dark-card,
.dashboard-command-hero,
.owner-highlight {
    background: linear-gradient(155deg, var(--twz-olive-900), var(--twz-olive-850));
    color: var(--twz-cream-100);
    border-color: rgba(37, 48, 24, 0.24);
}

.surface-panel.card-olive .text-secondary,
.owner-dark-card .text-secondary,
.dashboard-command-hero .text-secondary,
.owner-highlight .text-secondary {
    color: rgba(244, 238, 216, 0.76) !important;
}

.card-cream,
.owner-note {
    background: var(--twz-cream-200);
    border-color: rgba(194, 106, 36, 0.16);
}

.hero-panel,
.module-hero {
    display: grid;
    gap: 1.2rem;
    align-items: center;
}

.hero-panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(220px, 320px);
}

.module-hero {
    grid-template-columns: auto minmax(0, 1fr);
}

.hero-panel h2,
.module-hero h2,
.owner-hero-copy h2,
.owner-architecture h3,
.dashboard-section-title,
.panel-title,
.section-title,
.login-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--twz-olive-950);
}
.panel-title{
    padding-bottom: 1rem;
}
.dashboard-command-hero h2,
.owner-highlight h2,
.owner-dark-card h3 {
    color: var(--twz-cream-50);
}

.hero-accent,
.feature-icon,
.metric-icon,
.owner-panel-icon {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, rgba(37, 48, 24, 0.96), rgba(194, 106, 36, 0.92));
    color: var(--twz-cream-100);
    font-size: 1.75rem;
    box-shadow: 0 16px 28px rgba(37, 48, 24, 0.18);
}

.hero-accent {
    width: 100%;
    min-height: 220px;
}

.mini-badge,
.code-pill,
.section-kicker,
.owner-route-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.8rem;
    border-radius: var(--twz-pill-radius);
    background: rgba(194, 106, 36, 0.1);
    color: var(--twz-copper-700);
    font-size: 0.84rem;
    font-weight: 800;
}

.table-text-truncate {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-table th,
.partner-table td {
    vertical-align: middle;
    padding-block: 0.95rem;
}

.dashboard-chart-heading {
    display: grid;
    gap: 0.25rem;
}

.product-lookup-result {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
}

.product-lookup-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.product-lookup-title,
.product-lookup-code {
    white-space: normal;
    word-break: break-word;
}

.product-lookup-code {
    margin-top: 0.15rem;
}

.product-lookup-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    min-width: 8.5rem;
}

.product-lookup-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    background: rgba(15, 23, 42, 0.06);
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
}

.product-lookup-highlight {
    padding: 0 0.1rem;
    border-radius: 0.25rem;
    background: rgba(245, 158, 11, 0.24);
    color: inherit;
}

.select2-container--bootstrap-5 .select2-dropdown.product-lookup-dropdown .select2-search {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.6rem;
    background: var(--bs-body-bg);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.select2-container--bootstrap-5 .select2-dropdown.product-lookup-dropdown .select2-results__options {
    max-height: 22rem;
}

@media (max-width: 576px) {
    .product-lookup-result {
        flex-direction: column;
    }

    .product-lookup-meta {
        width: 100%;
        min-width: 0;
        align-items: flex-start;
    }
}

.dashboard-chart-control {
    display: grid;
    gap: 0.3rem;
    min-width: min(220px, 100%);
    color: var(--twz-slate-700);
    font-size: 0.8rem;
    font-weight: 800;
}

.dashboard-chart-control .form-select {
    min-height: 42px;
    border-radius: 12px;
    border-color: rgba(63, 74, 36, 0.16);
    background-color: #fff;
}

.dashboard-chart-state,
.dashboard-chart-empty-state {
    min-height: 300px;
    display: grid;
    place-items: center;
    text-align: center;
}

.dashboard-chart-state {
    gap: 0.65rem;
    color: var(--twz-slate-700);
    font-weight: 700;
}

.dashboard-chart-canvas[hidden],
.dashboard-chart-state[hidden],
.dashboard-chart-empty-state[hidden] {
    display: none !important;
}

.dashboard-chart-empty-state {
    gap: 0.45rem;
    background: rgba(248, 250, 252, 0.72);
    border: 1px dashed rgba(63, 74, 36, 0.14);
    border-radius: 18px;
    padding: 1.25rem;
}

.dashboard-chart-empty-state strong {
    color: var(--twz-olive-950);
    font-size: 1rem;
}

.chart-card.is-loading .dashboard-chart-canvas {
    opacity: 0.42;
    transition: opacity 0.18s ease;
}

.product-summary-list .list-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.7rem;
}

.product-summary-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    color: var(--twz-copper-700);
}

.inline-empty-state {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--twz-slate-700);
}

.product-grade-badge {
    padding: 0.55rem 0.85rem;
}

.movement-table {
    table-layout: auto;
    width: 100%;
}

.movement-table th,
.movement-table td {
    vertical-align: middle;
    padding-block: 0.9rem;
}

.movement-table thead th {
    white-space: normal;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.warehouse-movements-results {
    display: grid;
    gap: 1rem;
}

.warehouse-movements-table-wrap {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.warehouse-movements-table .movement-date-col {
    width: 9.5rem;
}

.warehouse-movements-table .movement-type-col {
    width: 7rem;
}

.warehouse-movements-table .movement-code-col {
    width: 7.25rem;
}

.warehouse-movements-table .movement-qty-col {
    width: 6rem;
}

.warehouse-movements-table .movement-reference-col {
    width: 8.5rem;
}

.movement-date-cell,
.movement-qty-cell,
.movement-reference-text,
.movement-code-pill {
    white-space: nowrap;
}

.movement-reference-text,
.movement-reference-type,
.movement-note-text,
.movement-product-name,
.movement-warehouse-name {
    display: block;
}

.movement-cell-ellipsis {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warehouse-movements-empty-state {
    display: grid;
    gap: 1rem;
    align-items: center;
    justify-items: center;
    min-height: 280px;
    padding: 2rem 1.5rem;
    border: 1px dashed rgba(63, 74, 36, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(194, 106, 36, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.95));
    color: var(--twz-slate-700);
}

.warehouse-movements-empty-state__icon {
    width: 4.25rem;
    height: 4.25rem;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: rgba(111, 120, 62, 0.12);
    color: var(--twz-olive-800);
    font-size: 1.6rem;
}

.warehouse-movements-empty-state__body {
    display: grid;
    gap: 0.55rem;
    max-width: 54rem;
}

.warehouse-movements-empty-state__title {
    margin: 0;
    color: var(--twz-slate-900);
    font-size: 1.2rem;
    font-weight: 800;
}

.warehouse-movements-empty-state__text,
.warehouse-movements-empty-state__hint {
    margin: 0;
    line-height: 1.8;
}

.warehouse-movements-empty-state__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.movement-product-name,
.movement-warehouse-name,
.movement-reference-type,
.movement-note-text {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-badge.olive,
.code-pill.olive,
.section-kicker.olive,
.owner-route-pill.olive {
    background: rgba(111, 120, 62, 0.12);
    color: var(--twz-olive-800);
}

.section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.list-stack,
.alert-stack,
.owner-checklist,
.owner-link-list,
.owner-route-list,
.helper-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.list-row,
.helper-pill,
.owner-list-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--twz-slate-900);
}

.helper-pill,
.owner-route-card {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(63, 74, 36, 0.12);
}

.stats-grid,
.kpi-grid,
.content-grid,
.dashboard-command-grid,
.dashboard-chart-grid,
.dashboard-workspace-grid,
.dashboard-ops-grid,
.owner-kpi-grid,
.owner-main-grid,
.owner-system-grid,
.owner-journey-grid {
    display: grid;
    gap: 1rem;
}

.stats-grid,
.owner-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-bottom: 1.5rem;
}

.content-grid,
.dashboard-chart-grid,
.owner-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-command-grid {
    grid-template-columns: 1.2fr 0.8fr;
    margin-bottom: 1.5rem;
}

.dashboard-workspace-grid,
.owner-system-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.dashboard-ops-grid,
.owner-journey-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding-top: 1.2rem;
    min-height: 162px;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, rgba(77, 90, 43, 0.7), rgba(194, 106, 36, 0.7));
}

.metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.metric-label {
    color: var(--twz-slate-700);
    font-size: 0.92rem;
    font-weight: 700;
}

.metric-value {
    margin-top: 0.45rem;
    font-family: "Cairo", system-ui, sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--twz-olive-950);
    letter-spacing: -0.02em;
    word-break: break-word;
}

.metric-meta {
    margin-top: 0.45rem;
    color: var(--twz-slate-700);
    font-size: 0.86rem;
}

.metric-card.card-olive .metric-label,
.metric-card.card-olive .metric-value,
.metric-card.card-olive .metric-meta {
    color: var(--twz-cream-100);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    color: var(--twz-slate-900);
}

.quick-link i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(194, 106, 36, 0.08);
    color: var(--twz-copper-700);
}

.table-responsive,
.table-wrapper {
    overflow: auto;
    border-radius: 18px;
}

.table-responsive > .table:not(.table-mobile-cards),
.table-wrapper > .table:not(.table-mobile-cards) {
    min-width: 720px;
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    direction: rtl;
}

.table > :not(caption) > * > * {
    padding: 0.92rem 0.9rem;
    vertical-align: middle;
    border-color: var(--twz-slate-200);
    text-align: right;
}

.table thead th {
    background: linear-gradient(180deg, #eef2f7 0%, #e8edf5 100%);
    color: var(--twz-slate-950);
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
    border-top: 0;
}

.table tbody td {
    color: var(--twz-slate-800);
    border-top: 1px solid var(--twz-slate-200);
}

.table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.65);
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(194, 106, 36, 0.04);
}

.table .fw-bold,
.table strong {
    font-weight: 800 !important;
}

.mobile-title-cell {
    font-weight: 800;
    color: var(--twz-olive-950);
}

.filter-toolbar,
form[method="get"].row.g-3,
form[method="get"].row.g-4 {
    margin: 0 0 1rem !important;
    padding: 1.05rem 1.1rem;
    row-gap: 1rem !important;
    align-items: end;
    border-radius: 18px;
    border: 1px solid rgba(63, 74, 36, 0.14);
    background:
        radial-gradient(circle at top right, rgba(194, 106, 36, 0.05), transparent 32%),
        linear-gradient(180deg, #fdfefe 0%, #f6f9fd 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.filter-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    column-gap: 0.85rem;
}

.filter-toolbar > [class*="col-"],
form[method="get"].row.g-3 > [class*="col-"],
form[method="get"].row.g-4 > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
}

.filter-toolbar .form-label,
form[method="get"].row.g-3 .form-label,
form[method="get"].row.g-4 .form-label {
    margin-bottom: 0.4rem;
    color: var(--twz-slate-700);
    font-size: 0.84rem;
    font-weight: 800;
}

.filter-toolbar > *,
form[method="get"].row.g-3 > *,
form[method="get"].row.g-4 > * {
    min-width: 0;
}

.filter-toolbar .form-control,
.filter-toolbar .form-select,
form[method="get"].row.g-3 .form-control,
form[method="get"].row.g-3 .form-select,
form[method="get"].row.g-4 .form-control,
form[method="get"].row.g-4 .form-select {
    min-height: 48px;
    background: #fff;
    border-color: rgba(63, 74, 36, 0.16);
}

.filter-toolbar .btn,
form[method="get"].row.g-3 .btn,
form[method="get"].row.g-4 .btn {
    min-height: 48px;
    white-space: nowrap;
}

.filter-actions {
    display: flex;
    align-items: end;
    gap: 0.55rem;
}

.filter-actions .btn {
    flex: 1 1 0;
}

.customers-filter-toolbar .customers-filter-toolbar__actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: end;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.65rem;
    width: 100%;
}

.customers-filter-toolbar .customers-filter-toolbar__actions .btn {
    flex: 0 0 auto;
    min-width: 132px;
}

.sales-index-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sales-index-export-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.sales-index-summary-note {
    margin-bottom: 1rem;
}

.sales-filter-toolbar .sales-filter-toolbar__actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: end;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.65rem;
    width: 100%;
}

.sales-filter-toolbar .sales-filter-toolbar__actions .btn {
    flex: 0 0 auto;
    min-width: 132px;
}

.empty-state {
    text-align: center;
    color: var(--twz-slate-500);
}

.empty-state__icon {
    width: 3.5rem;
    height: 3.5rem;
    display: grid;
    place-items: center;
    margin-inline: auto;
    border-radius: 1rem;
    background: rgba(63, 74, 36, 0.08);
    color: var(--twz-olive-800);
    font-size: 1.35rem;
}

.empty-state__body {
    display: grid;
    gap: 0.5rem;
}

.empty-state__title {
    margin: 0;
    color: var(--twz-olive-950);
    font-size: 1rem;
}

.empty-state__description,
.empty-state__hint {
    margin: 0;
    line-height: 1.8;
}

.empty-state__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.alert-link-card,
.feature-row,
.permission-group-card,
.asset-preview,
.empty-state,
.owner-route-card,
.owner-system-card,
.owner-note,
.owner-architecture {
    padding: 1rem;
}

.alert-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--twz-slate-900);
}

.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.feature-copy {
    flex: 1;
}

.feature-copy strong,
.owner-system-card strong,
.owner-route-card strong,
.owner-journey-grid strong {
    display: block;
    font-weight: 800;
    color: var(--twz-olive-950);
}

.permission-group-card h4 {
    margin-bottom: 0.85rem;
    font-size: 1rem;
    font-weight: 800;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0;
}

.asset-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.asset-preview img {
    max-height: 180px;
    object-fit: contain;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-chip {
    width: 100%;
    justify-content: flex-start;
}

.chart-card canvas {
    width: 100% !important;
    min-height: 320px;
}

.dashboard-command-hero {
    grid-template-columns: minmax(0, 1fr) 260px;
}

.dashboard-command-hero .mini-badge {
    background: rgba(244, 238, 216, 0.14);
    color: var(--twz-cream-100);
}

.dashboard-command-hero h2,
.dashboard-command-hero p,
.dashboard-command-hero .metric-meta,
.dashboard-command-hero .text-secondary,
.owner-highlight h2,
.owner-highlight p {
    color: var(--twz-cream-100);
}

.dashboard-orbit,
.owner-mockup {
    position: relative;
    min-height: 230px;
    display: grid;
    place-items: center;
}

.dashboard-orbit img,
.owner-mockup img {
    width: min(100%, 240px);
    filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.26));
}

.orbit-chip {
    position: absolute;
    padding: 0.45rem 0.72rem;
    border-radius: 14px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--twz-slate-950);
    background: #fff;
    box-shadow: 0 12px 22px rgba(17, 22, 27, 0.14);
}

.chip-sales {
    top: 10px;
    right: 0;
    background: var(--twz-copper-soft);
}

.chip-stock {
    left: 0;
    top: 72px;
    background: var(--twz-cream-100);
}

.chip-cash {
    right: 28px;
    bottom: 8px;
    background: rgba(111, 120, 62, 0.16);
}

.owner-panel-dark,
.owner-dark-card {
    box-shadow: 0 18px 42px rgba(37, 48, 24, 0.18);
}

.owner-hero-grid {
    display: grid;
    grid-template-columns: 1.16fr 0.84fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.owner-highlight {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.2rem;
    align-items: center;
}

.owner-kpi-grid {
    margin-bottom: 1.5rem;
}

.owner-system-card i,
.owner-route-card i,
.owner-checklist i,
.owner-link-list i {
    color: var(--twz-copper-500);
}

.owner-route-list {
    margin-top: 1rem;
}

.owner-mockup-frame {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(244, 238, 216, 0.14);
    box-shadow: 0 20px 32px rgba(0, 0, 0, 0.24);
}

.owner-mockup-frame img {
    width: 100%;
    display: block;
}

.owner-journey-grid article {
    padding: 1.15rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(63, 74, 36, 0.12);
    box-shadow: var(--twz-shadow-sm);
}

.owner-journey-grid span {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--twz-olive-900);
    color: var(--twz-cream-100);
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.owner-architecture {
    display: grid;
    gap: 1rem;
}

.owner-architecture-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.owner-architecture-grid article {
    padding: 1rem;
    border-radius: 18px;
    background: var(--twz-slate-50);
    border: 1px solid rgba(63, 74, 36, 0.1);
}

.owner-architecture-grid strong {
    display: block;
    margin-bottom: 0.35rem;
}

.dashboard-process-card,
.inventory-alert-card,
.report-insight-card,
.settlement-flow-card {
    padding: 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(63, 74, 36, 0.12);
    background: #fff;
    box-shadow: var(--twz-shadow-sm);
}

.dashboard-clean-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 1.2rem;
    align-items: start;
    margin-bottom: 1.5rem;
    background:
        radial-gradient(circle at 92% 14%, rgba(194, 106, 36, 0.12), transparent 35%),
        radial-gradient(circle at 6% 90%, rgba(111, 120, 62, 0.12), transparent 35%),
        #fff;
    border: 1px solid rgba(63, 74, 36, 0.16);
}

.dashboard-hero-copy {
    display: grid;
    gap: 0.9rem;
}

.dashboard-top-actions {
    display: grid;
    gap: 0.8rem;
}

.dashboard-top-actions-head {
    display: grid;
    gap: 0.25rem;
}

.dashboard-top-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
}

.dashboard-top-action {
    --action-accent: var(--twz-copper-500);
    --action-accent-soft: rgba(194, 106, 36, 0.12);
    --action-accent-border: rgba(194, 106, 36, 0.26);
    --action-focus: rgba(194, 106, 36, 0.24);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 58px;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(63, 74, 36, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    color: var(--twz-slate-900);
    box-shadow: var(--twz-shadow-sm);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.dashboard-top-action:hover {
    transform: translateY(-1px);
    border-color: var(--action-accent-border);
}

.dashboard-top-action:focus-visible,
.dashboard-shortcut-card:focus-visible {
    outline: 3px solid var(--action-focus, rgba(194, 106, 36, 0.24));
    outline-offset: 2px;
}

.dashboard-top-action i {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--action-accent-soft);
    color: var(--action-accent);
    font-size: 1.05rem;
}

.dashboard-top-action span {
    font-weight: 800;
    line-height: 1.35;
}

.dashboard-top-action.action-products {
    --action-accent: #4d5a2b;
    --action-accent-soft: rgba(77, 90, 43, 0.12);
    --action-accent-border: rgba(77, 90, 43, 0.26);
    --action-focus: rgba(77, 90, 43, 0.22);
}

.dashboard-top-action.action-sales {
    --action-accent: #c26a24;
    --action-accent-soft: rgba(194, 106, 36, 0.12);
    --action-accent-border: rgba(194, 106, 36, 0.26);
    --action-focus: rgba(194, 106, 36, 0.24);
}

.dashboard-top-action.action-customers {
    --action-accent: #0f766e;
    --action-accent-soft: rgba(15, 118, 110, 0.12);
    --action-accent-border: rgba(15, 118, 110, 0.26);
    --action-focus: rgba(15, 118, 110, 0.22);
}

.dashboard-top-action.action-suppliers {
    --action-accent: #2563eb;
    --action-accent-soft: rgba(37, 99, 235, 0.12);
    --action-accent-border: rgba(37, 99, 235, 0.26);
    --action-focus: rgba(37, 99, 235, 0.22);
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-hero-aside {
    border-radius: 20px;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(37, 48, 24, 0.08), rgba(194, 106, 36, 0.08));
    border: 1px solid rgba(63, 74, 36, 0.14);
    min-height: 100%;
}

.dashboard-operations-aside {
    display: grid;
    gap: 1rem;
}

.dashboard-overview-head h3 {
    font-size: 1.2rem;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-overview-item,
.dashboard-pulse-panel,
.dashboard-shortcut-card,
.dashboard-mini-row {
    border-radius: 18px;
    border: 1px solid rgba(63, 74, 36, 0.12);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--twz-shadow-sm);
}

.dashboard-overview-item {
    padding: 0.95rem;
    display: grid;
    gap: 0.35rem;
}

.dashboard-overview-item span,
.dashboard-overview-item small {
    color: var(--twz-slate-700);
}

.dashboard-overview-item strong {
    color: var(--twz-olive-950);
    font-size: 1.15rem;
}

.dashboard-pulse-panel {
    padding: 0.95rem;
}

.dashboard-pulse-panel--compact {
    padding-bottom: 0.85rem;
}

.dashboard-pulse-list,
.dashboard-mini-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-pulse-row,
.dashboard-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    color: var(--twz-slate-900);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-pulse-row:hover,
.dashboard-mini-row:hover,
.dashboard-shortcut-card:hover {
    transform: translateY(-2px);
    border-color: rgba(194, 106, 36, 0.22);
}

.dashboard-pulse-main,
.dashboard-mini-main,
.dashboard-pulse-side,
.dashboard-mini-side {
    display: grid;
    gap: 0.22rem;
}

.dashboard-pulse-main strong,
.dashboard-mini-main strong,
.dashboard-pulse-side strong,
.dashboard-mini-side strong {
    color: var(--twz-olive-950);
    font-weight: 800;
}

.dashboard-pulse-main span,
.dashboard-mini-main span,
.dashboard-pulse-side span,
.dashboard-mini-side span {
    color: var(--twz-slate-700);
    font-size: 0.84rem;
}

.dashboard-pulse-side,
.dashboard-mini-side {
    text-align: left;
    align-items: flex-end;
}

.dashboard-pulse-helper {
    color: var(--twz-slate-700);
    font-size: 0.84rem;
    line-height: 1.65;
}

.dashboard-pulse-fallback {
    display: grid;
    gap: 0.8rem;
}

.dashboard-pulse-fallback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}

.dashboard-pulse-fallback-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(63, 74, 36, 0.12);
    background: rgba(252, 251, 248, 0.96);
    color: var(--twz-slate-900);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-pulse-fallback-card:hover {
    transform: translateY(-2px);
    border-color: rgba(194, 106, 36, 0.22);
    box-shadow: var(--twz-shadow-sm);
}

.dashboard-pulse-fallback-card i {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(194, 106, 36, 0.12);
    color: var(--twz-copper-700);
    font-size: 1.15rem;
}

.dashboard-pulse-fallback-main,
.dashboard-pulse-fallback-side {
    display: grid;
    gap: 0.2rem;
}

.dashboard-pulse-fallback-main strong,
.dashboard-pulse-fallback-side strong {
    color: var(--twz-olive-950);
    font-weight: 800;
}

.dashboard-pulse-fallback-main span,
.dashboard-pulse-fallback-side span {
    color: var(--twz-slate-700);
    font-size: 0.82rem;
}

.dashboard-pulse-fallback-side {
    text-align: left;
    align-items: flex-end;
}

.dashboard-pulse-collapsed {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    border: 1px dashed rgba(63, 74, 36, 0.2);
    background: rgba(255, 255, 255, 0.78);
}

.dashboard-pulse-collapsed i {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(63, 74, 36, 0.08);
    color: var(--twz-olive-900);
    font-size: 1.05rem;
}

.dashboard-pulse-collapsed strong {
    display: block;
    color: var(--twz-olive-950);
    font-size: 0.95rem;
}

.dashboard-pulse-collapsed span {
    display: block;
    color: var(--twz-slate-700);
    font-size: 0.82rem;
    line-height: 1.65;
}

.dashboard-shortcuts-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.dashboard-shortcut-card {
    --shortcut-accent: var(--twz-copper-500);
    --shortcut-tint: rgba(194, 106, 36, 0.08);
    --action-focus: rgba(194, 106, 36, 0.24);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    min-height: 126px;
    padding: 1.05rem;
    color: var(--twz-slate-900);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-shortcut-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--shortcut-accent) 90%, #fff), var(--shortcut-accent));
}

.dashboard-shortcut-card i {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--shortcut-tint);
    color: var(--shortcut-accent);
    font-size: 1.35rem;
}

.dashboard-shortcut-card strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--twz-olive-950);
    font-size: 1.02rem;
}

.dashboard-shortcut-card span {
    color: var(--twz-slate-700);
    font-size: 0.87rem;
    line-height: 1.55;
}

.dashboard-shortcut-card.shortcut-customers {
    --shortcut-accent: #0f766e;
    --shortcut-tint: rgba(15, 118, 110, 0.1);
    --action-focus: rgba(15, 118, 110, 0.22);
}

.dashboard-shortcut-card.shortcut-products {
    --shortcut-accent: #4d5a2b;
    --shortcut-tint: rgba(77, 90, 43, 0.1);
    --action-focus: rgba(77, 90, 43, 0.22);
}

.dashboard-shortcut-card.shortcut-sales {
    --shortcut-accent: #c26a24;
    --shortcut-tint: rgba(194, 106, 36, 0.1);
    --action-focus: rgba(194, 106, 36, 0.24);
}

.dashboard-shortcut-card.shortcut-finance {
    --shortcut-accent: #334155;
    --shortcut-tint: rgba(51, 65, 85, 0.1);
    --action-focus: rgba(51, 65, 85, 0.22);
}

.dashboard-kpi-grid-compact {
    margin-bottom: 1rem;
}

.dashboard-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-recent-sales-card {
    margin-top: 1rem;
}

.dashboard-compact-empty {
    padding: 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.dashboard-workspace-grid > article:first-child {
    grid-column: span 2;
}

.owner-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
    background:
        radial-gradient(circle at 8% 14%, rgba(111, 120, 62, 0.1), transparent 35%),
        radial-gradient(circle at 94% 85%, rgba(194, 106, 36, 0.1), transparent 35%),
        #fff;
}

.owner-dashboard-hero-copy h2 {
    margin: 0.35rem 0 0.75rem;
    font-size: 2rem;
    line-height: 1.3;
}

.owner-dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.owner-dashboard-hero-actions .btn {
    width: auto;
}

.owner-dashboard-hero-aside {
    border-radius: 18px;
    border: 1px solid rgba(63, 74, 36, 0.12);
    background: linear-gradient(155deg, rgba(37, 48, 24, 0.06), rgba(194, 106, 36, 0.06));
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
    align-content: center;
}

.owner-dashboard-quick-item {
    padding: 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(63, 74, 36, 0.12);
    background: rgba(255, 255, 255, 0.92);
}

.owner-dashboard-quick-item span {
    display: block;
    color: var(--twz-slate-700);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.owner-dashboard-quick-item strong {
    font-size: 1.15rem;
    color: var(--twz-olive-950);
    font-family: "Cairo", system-ui, sans-serif;
}

.owner-kpi-grid-refined {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.owner-main-grid-refined {
    margin-top: 1rem;
    align-items: start;
}

.owner-actions-panel .quick-link {
    border-radius: 14px;
}

.owner-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.owner-topbar-refined {
    gap: 1rem;
}

.owner-topbar-actions-refined {
    min-width: min(640px, 100%);
}

.owner-topbar-actions-refined .topbar-search {
    flex: 1;
}

.dashboard-hero-aside img {
    width: min(100%, 170px);
    display: block;
    margin: 0 auto 0.65rem;
}

.dashboard-hero-aside ul {
    margin: 0;
    padding-inline-start: 1rem;
    display: grid;
    gap: 0.4rem;
    color: var(--twz-slate-700);
    font-weight: 700;
}

.dashboard-focus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.chart-card {
    min-height: 360px;
}

.chart-card canvas {
    width: 100% !important;
    height: 300px !important;
    display: block;
}

.dashboard-quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.inventory-alert-card {
    background: var(--twz-cream-200);
    border-color: rgba(194, 106, 36, 0.16);
}

.dashboard-process-card ol,
.settlement-flow-card ol,
.report-insight-card ol {
    margin: 0;
    padding-inline-start: 1.15rem;
    display: grid;
    gap: 0.55rem;
    color: var(--twz-slate-700);
}

.table-mobile-cards tbody td::before,
.invoice-items-table tbody td::before {
    color: var(--twz-slate-500);
    font-weight: 700;
}

.table-mobile-cards thead th.mobile-secondary,
.table-mobile-cards tbody td.mobile-secondary {
    display: table-cell;
}

.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
.select2-container--bootstrap-5 .select2-results__options {
    text-align: right;
}

.dataTables_wrapper {
    display: grid;
    gap: 0.85rem;
}

.dataTables_wrapper .row {
    margin: 0;
    align-items: center;
    row-gap: 0.75rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--twz-slate-500);
    font-weight: 700;
}

.dataTables_wrapper .dataTables_filter input {
    min-height: 44px;
    border-radius: 12px;
}

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
}

.pagination {
    gap: 0.5rem;
}

.pagination .page-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px !important;
    border-color: var(--twz-slate-300);
    color: var(--twz-slate-800);
    background: #fff;
    font-weight: 700;
}

.pagination .page-link:hover {
    color: var(--twz-copper-600);
    border-color: rgba(249, 115, 22, 0.32);
    background: rgba(249, 115, 22, 0.06);
}

.pagination .page-item.active .page-link {
    background: var(--twz-copper-500);
    border-color: var(--twz-copper-500);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: var(--twz-slate-400);
    background: #f8fafc;
}

.dataTables_wrapper .pagination .page-link {
    border-radius: 12px !important;
    border-color: var(--twz-slate-300);
    color: var(--twz-slate-800);
}

.dataTables_wrapper .pagination .page-item.active .page-link {
    background: var(--twz-copper-500);
    border-color: var(--twz-copper-500);
    color: #fff;
}

.progress {
    background: rgba(111, 120, 62, 0.12);
    border-radius: var(--twz-pill-radius);
}

.progress-bar {
    background: linear-gradient(90deg, var(--twz-copper-500), var(--twz-olive-700));
}

.login-body,
.error-body {
    background:
        radial-gradient(circle at top, rgba(194, 106, 36, 0.05), transparent 32%),
        linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

.error-shell,
.login-card {
    background: #fff;
    border: 1px solid rgba(63, 74, 36, 0.14);
    border-radius: 24px;
    box-shadow: var(--twz-shadow-lg);
}

.error-code {
    color: var(--twz-copper-700);
}

.ohda-console .app-sidebar {
    background-color: #11161b;
    background-image:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 26%),
        linear-gradient(180deg, #171717 0%, #1f2937 48%, #334155 100%);
    opacity: 1;
}

.ohda-console .brand-badge {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border: 1px solid rgba(194, 106, 36, 0.22);
}

.ohda-console .sidebar-sticky-cta a {
    background: linear-gradient(135deg, var(--twz-copper-500), var(--twz-copper-700));
    color: #fff;
    border-color: var(--twz-copper-700);
}

.ohda-console .sidebar-sticky-cta a:hover {
    background: var(--twz-copper-600);
    color: #fff;
}

@media (max-width: 1199.98px) {
    .app-sidebar {
        transform: translateX(100%);
        width: min(88vw, 340px);
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
    }

    .app-main,
    .app-sidebar.collapsed + .app-main {
        margin-right: 0;
    }

    .topbar-user {
        display: none;
    }

    .sidebar-user-panel {
        display: block;
    }

    .stats-grid,
    .owner-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpi-grid,
    .dashboard-ops-grid,
    .dashboard-workspace-grid,
    .dashboard-shortcuts-strip,
    .dashboard-secondary-grid,
    .owner-journey-grid,
    .owner-architecture-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .owner-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-workspace-grid > article:first-child {
        grid-column: span 1;
    }
}

@media (max-width: 991.98px) {
    .movement-table {
        table-layout: auto;
    }

    .app-topbar {
        padding: 0.85rem 1rem;
        flex-wrap: wrap;
    }

    .app-topbar > .d-flex {
        width: 100%;
    }

    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .app-topbar > .d-flex .text-secondary {
        display: none;
    }

    .hero-panel,
    .dashboard-command-grid,
    .content-grid,
    .dashboard-chart-grid,
    .dashboard-workspace-grid,
    .dashboard-secondary-grid,
    .dashboard-ops-grid,
    .dashboard-focus-grid,
    .owner-hero-grid,
    .owner-main-grid,
    .owner-system-grid,
    .owner-journey-grid,
    .owner-architecture-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .dashboard-command-hero,
    .dashboard-clean-hero,
    .owner-highlight,
    .owner-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .hero-accent {
        min-height: 160px;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .dashboard-shortcuts-strip,
    .dashboard-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-chart-control {
        width: 100%;
        min-width: 0;
    }

    .filter-toolbar,
    form[method="get"].row.g-3,
    form[method="get"].row.g-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 0.8rem !important;
    }

    .surface-panel,
    .table-responsive,
    .table-wrapper,
    .filter-toolbar,
    form[method="get"].row.g-3,
    form[method="get"].row.g-4 {
        padding: 1rem;
    }

    .chart-card {
        min-height: 320px;
    }

    .chart-card canvas {
        height: 270px !important;
    }

    .table > :not(caption) > * > * {
        padding: 0.82rem 0.7rem;
    }
}

@media (max-width: 767.98px) {
    .app-content,
    .app-topbar {
        padding: 0.85rem 1rem;
    }

    .topbar-title,
    .hero-panel h2,
    .module-hero h2,
    .owner-hero-copy h2 {
        font-size: 1.45rem;
    }

    .app-topbar > .d-flex {
        align-items: flex-start !important;
    }

    .topbar-search {
        width: 100%;
    }

    .stats-grid,
    .kpi-grid,
    .quick-links,
    .dashboard-quick-links,
    .dashboard-shortcuts-strip,
    .dashboard-overview-grid,
    .dashboard-secondary-grid,
    .owner-kpi-grid {
        grid-template-columns: 1fr;
    }

    .owner-dashboard-hero-actions .btn,
    .owner-topbar-actions-refined .topbar-search,
    .owner-topbar-actions-refined .topbar-site-link,
    .owner-topbar-actions-refined .user-chip {
        width: 100%;
    }

    .module-hero {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .feature-row,
    .alert-link-card,
    .dashboard-pulse-row,
    .dashboard-mini-row,
    .topbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions {
        width: 100%;
        gap: 0.55rem;
    }

    .topbar-site-link,
    .topbar-owner-link,
    .topbar-actions form,
    .topbar-actions .btn,
    .topbar-actions .user-chip {
        width: 100%;
        justify-content: center;
    }

    .dashboard-pulse-fallback-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-pulse-fallback-side {
        grid-column: 2;
        text-align: right;
        align-items: flex-start;
    }

    .dashboard-hero-actions .btn,
    .dashboard-quick-links .quick-link,
    .dashboard-shortcut-card {
        width: 100%;
    }

    .dashboard-top-actions-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading {
        align-items: stretch;
    }

    .dashboard-chart-control {
        width: 100%;
    }

    .filter-toolbar,
    form[method="get"].row.g-3,
    form[method="get"].row.g-4 {
        grid-template-columns: 1fr;
        padding: 0.9rem;
    }

    .filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .filter-actions .btn {
        width: 100%;
    }

    .customers-filter-toolbar .customers-filter-toolbar__actions {
        justify-content: flex-start;
    }

    .customers-filter-toolbar .customers-filter-toolbar__actions .btn {
        min-width: 100%;
    }

    .sales-index-toolbar-actions,
    .sales-index-export-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .sales-filter-toolbar .sales-filter-toolbar__actions {
        justify-content: flex-start;
    }

    .sales-filter-toolbar .sales-filter-toolbar__actions .btn {
        min-width: 100%;
    }

    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tbody {
        display: grid;
        gap: 0.85rem;
    }

    .table-mobile-cards tbody tr {
        display: block;
        border: 1px solid rgba(63, 74, 36, 0.14);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--twz-shadow-sm);
        overflow: hidden;
    }

    .table-mobile-cards tbody td {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
        border-top: 1px solid var(--twz-slate-200);
    }

    .table-mobile-cards tbody td::before {
        content: attr(data-cell-label);
        white-space: nowrap;
        font-weight: 800;
        color: var(--twz-slate-700);
        margin-bottom: -0.55rem;
    }

    .table-mobile-cards tbody td:first-child {
        border-top: 0;
    }

    .table-responsive {
        padding: 0.9rem;
    }

    .warehouse-movements-table-wrap {
        padding: 0;
    }

    .table-responsive > .table:not(.table-mobile-cards),
    .table-wrapper > .table:not(.table-mobile-cards) {
        min-width: 100%;
    }

    .chart-card {
        min-height: 270px;
    }

    .chart-card canvas {
        height: 220px !important;
    }

    .dashboard-pulse-side,
    .dashboard-mini-side,
    .dashboard-pulse-fallback-side {
        text-align: right;
        align-items: flex-start;
    }
}

.workspace-banner {
    margin-bottom: 1.5rem;
    border-style: solid;
}

.workspace-banner-head,
.workspace-banner-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.workspace-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.workspace-usage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.workspace-usage-card {
    border: 1px solid rgba(63, 74, 36, 0.12);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.9);
}

.workspace-usage-value {
    margin-top: 0.45rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--twz-slate-950);
}

.workspace-banner-foot {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(63, 74, 36, 0.12);
}

.workspace-stage-grid,
.owner-report-grid,
.workspace-import-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.workspace-stage-card {
    position: relative;
}

.workspace-stage-card.is-active {
    border-color: rgba(194, 106, 36, 0.35);
    box-shadow: 0 14px 34px rgba(194, 106, 36, 0.12);
}

.workspace-stage-card.is-complete::after {
    content: "مكتمل";
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--twz-olive-700);
    background: rgba(111, 120, 62, 0.14);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.owner-report-metric {
    padding: 1.1rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(63, 74, 36, 0.14);
    background: #fff;
}

.owner-report-metric .value {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--twz-olive-950);
}

@media (max-width: 991.98px) {
    .workspace-usage-grid,
    .workspace-stage-grid,
    .owner-report-grid,
    .workspace-import-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767.98px) {
    .workspace-usage-grid,
    .workspace-stage-grid,
    .owner-report-grid,
    .workspace-import-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Dashboard UX refinement ===== */
.app-topbar {
    min-height: 66px;
    padding: 0.7rem 1rem;
}

.topbar-title {
    font-size: 1.28rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.app-content {
    padding: 1.15rem;
}

.app-topbar > .d-flex > div {
    min-width: 0;
}

.surface-panel,
.module-hero,
.metric-card,
.table-responsive,
.table-wrapper,
.filter-toolbar,
form[method="get"].row.g-3,
form[method="get"].row.g-4 {
    padding: 1.15rem;
}

.metric-card {
    min-height: 138px;
    padding-top: 1rem;
}

.metric-value {
    font-size: 1.55rem;
}

.metric-meta {
    margin-top: 0.3rem;
    font-size: 0.81rem;
}

.dashboard-clean-hero {
    margin-bottom: 1rem;
    gap: 0.9rem;
}

.dashboard-clean-hero p {
    max-width: 62ch;
}

.dashboard-hero-actions {
    margin-top: 0.9rem !important;
}

.dashboard-shortcuts-panel {
    margin-top: 1rem;
}

.dashboard-quick-links .quick-link {
    border-radius: 14px;
    border: 1px solid rgba(63, 74, 36, 0.1);
    background: linear-gradient(180deg, #fff, #fafcfd);
}

.panel-heading {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table > :not(caption) > * > * {
    padding: 0.72rem 0.68rem;
}

.filter-toolbar,
form[method="get"].row.g-3,
form[method="get"].row.g-4 {
    padding: 0.85rem 0.9rem;
    row-gap: 0.75rem !important;
    border-radius: 14px;
    background: #f9fbfd;
}

.filter-toolbar .form-control,
.filter-toolbar .form-select,
form[method="get"].row.g-3 .form-control,
form[method="get"].row.g-3 .form-select,
form[method="get"].row.g-4 .form-control,
form[method="get"].row.g-4 .form-select {
    min-height: 42px;
}

.filter-toolbar .btn,
form[method="get"].row.g-3 .btn,
form[method="get"].row.g-4 .btn {
    min-height: 42px;
}

@media (max-width: 991.98px) {
    .app-topbar {
        min-height: 56px;
        padding: 0.6rem 0.8rem;
        flex-wrap: nowrap;
        gap: 0.6rem;
    }

    .app-topbar > .d-flex {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        align-items: center !important;
    }

    .topbar-actions {
        width: auto;
        margin-inline-start: auto;
        flex-wrap: nowrap;
        gap: 0.45rem;
    }

    .topbar-search,
    .topbar-site-link,
    .topbar-owner-link {
        display: none !important;
    }

    .app-content {
        padding: 0.95rem;
    }

    .surface-panel,
    .module-hero,
    .metric-card,
    .table-responsive,
    .table-wrapper,
    .filter-toolbar,
    form[method="get"].row.g-3,
    form[method="get"].row.g-4 {
        padding: 0.95rem;
    }
}

@media (max-width: 767.98px) {
    .warehouse-movements-table-wrap {
        overflow: visible;
    }

    .movement-cell-ellipsis {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .warehouse-movements-empty-state {
        min-height: 0;
        padding: 1.4rem 1rem;
        justify-items: stretch;
        text-align: right;
    }

    .warehouse-movements-empty-state__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .warehouse-movements-empty-state__actions .btn {
        width: 100%;
    }

    .app-topbar {
        padding: 0.55rem 0.7rem;
        min-height: 52px;
    }

    .topbar-title {
        font-size: 1.03rem;
    }

    .topbar-actions {
        flex-direction: row;
        align-items: center;
    }

    .topbar-actions .icon-btn:first-child {
        display: none;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .app-content {
        padding: 0.8rem;
    }

    .metric-card {
        min-height: 118px;
    }

    .metric-value {
        font-size: 1.35rem;
    }

    .dashboard-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.sales-rep-actions-panel .panel-heading {
    margin-bottom: 1.25rem;
}

.sales-rep-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.sales-rep-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    color: inherit;
    text-align: start;
    text-decoration: none;
    appearance: none;
    font: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sales-rep-action-card:hover,
.sales-rep-action-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
    color: inherit;
}

.sales-rep-action-card.is-disabled {
    cursor: not-allowed;
    opacity: 0.84;
}

.sales-rep-action-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 18px;
    flex: 0 0 auto;
    font-size: 1.35rem;
}

.sales-rep-action-card__copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.sales-rep-action-card__copy strong {
    font-size: 1rem;
}

.sales-rep-action-card__copy span:last-child {
    color: var(--ohda-muted, #64748b);
    font-size: 0.88rem;
    line-height: 1.55;
}

.sales-rep-action-card--emerald .sales-rep-action-card__icon {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.sales-rep-action-card--blue .sales-rep-action-card__icon {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.sales-rep-action-card--amber .sales-rep-action-card__icon {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.sales-rep-action-card--rose .sales-rep-action-card__icon {
    background: rgba(244, 63, 94, 0.12);
    color: #be123c;
}

.sales-rep-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sales-rep-highlight-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.sales-rep-mini-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.sales-rep-mini-metric {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.sales-rep-mini-metric strong {
    font-size: 1.25rem;
    color: #0f172a;
}

.sales-rep-mini-metric__label {
    color: #475569;
    font-size: 0.92rem;
}

.sales-rep-mini-metric small {
    color: #64748b;
}

.sales-rep-name-cell {
    font-weight: 700;
}

.sales-rep-actions-cell .btn {
    min-width: 96px;
}

.sales-rep-details-modal .modal-header,
.sales-rep-details-modal .modal-footer {
    border-color: rgba(148, 163, 184, 0.16);
}

.sales-rep-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.sales-rep-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.sales-rep-detail-item__label {
    color: #64748b;
    font-size: 0.88rem;
}

.sales-rep-detail-item strong {
    color: #0f172a;
    line-height: 1.6;
}

.sales-rep-details-modal__footer {
    justify-content: flex-start;
    gap: 0.65rem;
}

@media (max-width: 1199.98px) {
    .sales-rep-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .sales-rep-actions-grid,
    .sales-rep-mini-metrics,
    .sales-rep-details-grid {
        grid-template-columns: 1fr;
    }

    .sales-rep-highlight-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sales-rep-actions-cell .btn {
        min-width: 100%;
    }

    .sales-rep-details-modal__footer {
        justify-content: stretch;
    }

    .sales-rep-details-modal__footer .btn {
        width: 100%;
    }
}

/* Final cascade layer for the reusable operational table primitives. */
.filter-toolbar.sales-reps-filter-toolbar {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.table.data-table > :not(caption) > * > * {
    padding: 0.8rem 0.85rem;
}

.table.data-table thead th {
    background: #f5f7fa;
}

@media (max-width: 991.98px) {
    .filter-toolbar.sales-reps-filter-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .filter-toolbar.sales-reps-filter-toolbar {
        grid-template-columns: 1fr;
    }
}


/* ===== Operational surfaces, forms and modal system ===== */
.surface-panel {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
}

.surface-panel:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.surface-panel.form-surface,
.surface-panel.filter-surface {
    padding: 0;
    overflow: visible;
}

.surface-panel__header,
.surface-panel__body,
.surface-panel__footer {
    padding-inline: clamp(1rem, 2.5vw, 1.6rem);
}

.surface-panel__header {
    min-height: 78px;
    padding-block: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.surface-panel__header--compact {
    min-height: 68px;
    padding-block: 0.9rem;
}

.surface-panel__body {
    padding-block: clamp(1rem, 2.5vw, 1.6rem);
}

.surface-panel__footer {
    padding-block: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: #f8fafc;
}

.surface-panel__title {
    margin: 0;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.45;
}

.surface-panel__description {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.6;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-heading h1 {
    margin: 0.25rem 0 0;
    color: #0f172a;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    font-weight: 850;
    line-height: 1.35;
}

.page-heading p {
    max-width: 68ch;
    margin: 0.35rem 0 0;
    color: #64748b;
    line-height: 1.65;
}

.page-heading__subject {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #475569 !important;
    font-weight: 700;
}

.page-heading .btn,
.form-actions .btn {
    min-height: 44px;
    padding-inline: 1.1rem;
    border-radius: 12px;
    white-space: nowrap;
}

.required-mark {
    color: #dc2626;
}

.form-validation-summary.validation-summary-valid {
    display: none;
}

.form-validation-summary ul {
    margin-bottom: 0;
}

.sales-rep-form-layout {
    display: grid;
    gap: 1rem;
}

.form-section {
    min-width: 0;
    margin: 0;
    padding: 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: #fbfcfe;
}

.form-section__heading {
    width: 100%;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #0f172a;
    font-size: 1rem;
}

.form-section__heading > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.form-section__heading strong {
    font-size: 1rem;
    font-weight: 800;
}

.form-section__heading small {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.5;
}

.form-section__icon {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(234, 88, 12, 0.1);
    color: #c2410c;
    font-size: 1.05rem;
}

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

.form-section__grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
    min-width: 0;
}

.form-field .form-label {
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

.form-field .form-control,
.form-field .form-select,
.form-field .select2-container--bootstrap-5 .select2-selection {
    min-height: 48px;
    border-radius: 12px;
    background: #fff;
}

.form-field .select2-container {
    width: 100% !important;
}

.form-field .form-hint {
    margin-top: 0.38rem;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.55;
}

.input-ltr {
    direction: ltr;
    text-align: left !important;
}

.input-group-unified .form-control {
    border-start-end-radius: 12px !important;
    border-end-end-radius: 12px !important;
}

.input-group-unified .input-group-text {
    min-height: 48px;
    border-start-start-radius: 12px !important;
    border-end-start-radius: 12px !important;
    background: #f1f5f9;
    color: #475569;
    font-weight: 800;
}

.compact-alert {
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    font-size: 0.78rem;
    line-height: 1.55;
}

.form-section--status {
    padding-block: 0.9rem;
    background: #fff;
}

.status-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.status-setting > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.status-setting strong {
    color: #0f172a;
    font-size: 0.92rem;
}

.status-setting small {
    color: #64748b;
    font-size: 0.78rem;
}

.status-switch {
    min-width: 86px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.status-switch .form-check-input {
    width: 2.65rem;
    height: 1.45rem;
    margin: 0;
}

.form-actions {
    justify-content: flex-start;
}

.form-actions .btn-primary {
    min-width: 150px;
}

/* Performance workspace */
.performance-filter-panel {
    margin-bottom: 1rem;
}

.compact-filter-toolbar {
    padding: 1rem clamp(1rem, 2.5vw, 1.6rem);
    display: grid;
    grid-template-columns: minmax(190px, 1.15fr) minmax(155px, 0.85fr) minmax(155px, 0.85fr) auto;
    align-items: end;
    gap: 0.75rem;
    background: #fbfcfe;
}

.compact-filter-toolbar .filter-field {
    min-width: 0;
}

.compact-filter-toolbar label {
    display: block;
    margin-bottom: 0.35rem;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.compact-filter-toolbar .form-control,
.compact-filter-toolbar .form-select,
.compact-filter-toolbar .btn {
    min-height: 44px;
    border-radius: 11px;
}

.compact-filter-toolbar .filter-actions {
    display: flex;
    gap: 0.55rem;
}

.compact-filter-toolbar:not(.is-custom-period) .custom-period-field {
    display: none;
}

.compact-filter-toolbar:not(.is-custom-period) {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.performance-kpi-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.performance-kpi {
    grid-column: span 2;
    min-height: 145px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(15, 23, 42, 0.04);
}

.performance-kpi--primary {
    grid-column: span 4;
    background: linear-gradient(145deg, #172033, #24324c);
    border-color: transparent;
    color: #fff;
}

.performance-kpi__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 13px;
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
    font-size: 1.1rem;
}

.performance-kpi--primary .performance-kpi__icon {
    background: rgba(255, 255, 255, 0.13);
    color: #fdba74;
}

.performance-kpi__icon--success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.performance-kpi__icon--violet {
    background: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
}

.performance-kpi__icon--amber {
    background: rgba(245, 158, 11, 0.13);
    color: #b45309;
}

.performance-kpi__icon--slate {
    background: rgba(71, 85, 105, 0.1);
    color: #475569;
}

.performance-kpi > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.performance-kpi__label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.performance-kpi strong {
    color: #0f172a;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.performance-kpi strong small {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
}

.performance-kpi > div > span:last-child {
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.5;
}

.performance-kpi--primary .performance-kpi__label,
.performance-kpi--primary > div > span:last-child,
.performance-kpi--primary strong small {
    color: rgba(255, 255, 255, 0.68);
}

.performance-kpi--primary strong {
    color: #fff;
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
}

.goal-progress-panel {
    padding: clamp(1rem, 2.5vw, 1.5rem);
}

.goal-progress-panel__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.goal-progress-panel__percentage {
    color: #c2410c;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-variant-numeric: tabular-nums;
}

.goal-progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf3;
}

.goal-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f97316, #ea580c);
    box-shadow: 0 0 14px rgba(234, 88, 12, 0.22);
}

.goal-progress-stats {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.goal-progress-stats div {
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    border-radius: 13px;
    background: #f8fafc;
}

.goal-progress-stats span {
    color: #64748b;
    font-size: 0.74rem;
}

.goal-progress-stats strong {
    color: #0f172a;
    font-size: 0.98rem;
    font-variant-numeric: tabular-nums;
}

/* Customers workspace */
.customers-page,
.customer-ledger-page {
    display: grid;
    gap: 1rem;
}

.customers-section-toolbar {
    margin-bottom: 0;
}

.customers-section-toolbar__title {
    margin: 0.25rem 0 0;
    color: #0f172a;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    font-weight: 850;
    line-height: 1.35;
}

.customers-section-toolbar__description {
    max-width: 68ch;
    margin: 0.35rem 0 0;
    color: #64748b;
    line-height: 1.65;
}

.customers-stats-grid,
.customer-ledger-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.customers-stats-grid .metric-card,
.customer-ledger-stats .metric-card {
    min-height: 150px;
}

.customers-filter-toolbar {
    padding: 1rem clamp(1rem, 2.5vw, 1.6rem);
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(135px, 0.9fr) minmax(260px, 1.3fr) auto;
    align-items: end;
    gap: 0.75rem;
    background: #fbfcfe;
}

.customers-filter-toolbar .filter-field {
    min-width: 0;
}

.customers-filter-toolbar .customers-filter-toolbar__actions {
    grid-column: auto;
    width: auto;
    margin: 0;
    justify-content: flex-start;
    align-self: end;
}

.customers-filter-toolbar .customers-filter-toolbar__actions .btn {
    min-width: 116px;
}

.customer-identity {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    color: #0f172a;
    text-decoration: none;
}

.customer-identity:hover,
.customer-identity:focus-visible {
    color: #c2410c;
}

.customer-identity__avatar,
.customer-ledger-identity__avatar {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 13px;
    background: rgba(234, 88, 12, 0.1);
    color: #c2410c;
    font-size: 1rem;
    font-weight: 900;
}

.customer-identity__name {
    max-width: 100%;
    font-weight: 800;
}

.customer-balance {
    min-width: 110px;
    padding: 0.42rem 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    color: #334155;
    direction: ltr;
    unicode-bidi: isolate;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.customer-balance--debit {
    background: rgba(220, 38, 38, 0.09);
    color: #b91c1c;
}

.customer-balance--credit {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
}

.customer-actions {
    flex-wrap: wrap;
}

.customer-actions .btn,
.customer-actions form .btn {
    min-width: 74px;
}

.customer-ledger-heading__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.customer-ledger-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.customer-ledger-identity {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.customer-ledger-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.customer-ledger-meta__item {
    padding: 0.85rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 15px;
    background: #fbfcfe;
}

.customer-ledger-meta__item span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
}

.customer-ledger-meta__item strong {
    color: #0f172a;
    font-size: 0.92rem;
}

.customer-ledger-meta__item strong[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

.customer-ledger-period-summary {
    padding-inline: clamp(1rem, 2.5vw, 1.6rem);
}

@media (max-width: 1199.98px) {
    .customers-filter-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customers-filter-toolbar .customers-filter-toolbar__actions {
        grid-column: span 2;
    }

    .customer-ledger-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .customers-stats-grid,
    .customer-ledger-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .customers-filter-toolbar {
        grid-template-columns: 1fr;
    }

    .customers-filter-toolbar .customers-filter-toolbar__actions {
        grid-column: auto;
        width: 100%;
        flex-direction: column;
    }

    .customers-filter-toolbar .customers-filter-toolbar__actions .btn {
        width: 100%;
    }

    .customer-actions {
        justify-content: stretch;
    }

    .customer-actions .btn,
    .customer-actions form,
    .customer-actions form .btn {
        width: 100%;
    }

    .customer-ledger-meta,
    .customers-stats-grid,
    .customer-ledger-stats {
        grid-template-columns: 1fr;
    }
}

/* Inventory return editor */
.inventory-destination-card {
    padding: 0.9rem 1rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(240px, 0.8fr);
    align-items: center;
    gap: 0.8rem;
    border: 1px solid rgba(234, 88, 12, 0.16);
    border-radius: 15px;
    background: rgba(255, 247, 237, 0.72);
}

.inventory-destination-card__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #fff;
    color: #c2410c;
    box-shadow: 0 4px 14px rgba(194, 65, 12, 0.08);
}

.inventory-destination-card h3,
.inventory-lines-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 0.96rem;
    font-weight: 800;
}

.inventory-destination-card p,
.inventory-lines-heading p {
    margin: 0.18rem 0 0;
    color: #64748b;
    font-size: 0.76rem;
}

.inventory-destination-card__control .form-select,
.inventory-destination-card__control .select2-container--bootstrap-5 .select2-selection {
    min-height: 46px;
    border-radius: 11px;
    background: #fff;
}

.inventory-destination-card__control .select2-container {
    width: 100% !important;
}

.inventory-lines-heading {
    margin: 1.25rem 0 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.inventory-lines-heading .btn {
    min-height: 42px;
    border-radius: 11px;
}

.inventory-lines-table-wrap {
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 15px;
    box-shadow: none;
}

.inventory-lines-table th {
    font-size: 0.76rem;
    white-space: nowrap;
}

.inventory-lines-table td {
    vertical-align: middle;
}

.inventory-lines-table td:first-child {
    min-width: 280px;
}

.inventory-lines-table .form-control,
.inventory-lines-table .form-select,
.inventory-lines-table .select2-container--bootstrap-5 .select2-selection {
    min-height: 44px;
    border-radius: 10px;
    background: #fff;
}

.inventory-lines-table .select2-container {
    width: 100% !important;
}

.inventory-available-cell strong,
.inventory-available-cell small {
    display: block;
}

.inventory-available-cell strong {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.inventory-available-cell small {
    margin-top: 0.12rem;
    color: #64748b;
    font-size: 0.7rem;
}

.inventory-quantity-cell {
    width: 170px;
}

.btn-icon-danger {
    min-height: 38px;
    padding: 0.42rem 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid rgba(220, 38, 38, 0.16);
    border-radius: 10px;
    background: rgba(254, 242, 242, 0.72);
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 700;
}

.btn-icon-danger:hover {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.inventory-empty-state {
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.42);
    border-radius: 16px;
    background: #f8fafc;
}

.inventory-empty-state > span {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff;
    color: #94a3b8;
    font-size: 1.25rem;
}

.inventory-empty-state strong {
    color: #0f172a;
}

.inventory-empty-state p {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
}

/* Unified Bootstrap modal layer */
.modal-backdrop.show {
    opacity: 0.44;
    backdrop-filter: blur(2px);
}

.modal-dialog {
    --bs-modal-width: 560px;
}

.modal-dialog.modal-sm {
    --bs-modal-width: 430px;
}

.modal-dialog.modal-lg {
    --bs-modal-width: 760px;
}

.modal-content.app-modal,
.modal-content {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.2);
}

.app-modal__header {
    padding: 1.05rem 1.15rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.app-modal__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(234, 88, 12, 0.11);
    color: #c2410c;
    font-size: 1.05rem;
}

.app-modal__icon--success {
    background: rgba(16, 185, 129, 0.11);
    color: #047857;
}

.app-modal__icon--danger {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.app-modal__icon--neutral {
    background: rgba(71, 85, 105, 0.1);
    color: #475569;
}

.app-modal__heading {
    min-width: 0;
}

.app-modal__heading .modal-title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
}

.app-modal__heading p {
    margin: 0.18rem 0 0;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.55;
}

.modal-body {
    padding: 1.15rem;
}

.modal-body .form-label {
    font-size: 0.84rem;
}

.modal-body .form-control,
.modal-body .form-select {
    min-height: 46px;
    border-radius: 11px;
    background: #fff;
}

.app-modal__footer,
.modal-footer {
    padding: 0.9rem 1.15rem;
    justify-content: flex-start;
    gap: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: #f8fafc;
}

.app-modal__footer .btn {
    min-height: 42px;
    min-width: 94px;
    margin: 0;
    border-radius: 11px;
}

.app-modal--danger {
    border-top: 3px solid #dc2626 !important;
}

@media (max-width: 1199.98px) {
    .performance-kpi-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .performance-kpi,
    .performance-kpi--primary {
        grid-column: span 2;
    }
}

@media (max-width: 991.98px) {
    .form-section__grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-filter-toolbar,
    .compact-filter-toolbar:not(.is-custom-period) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-filter-toolbar .filter-actions {
        grid-column: 1 / -1;
    }

    .performance-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .performance-kpi,
    .performance-kpi--primary {
        grid-column: span 1;
    }

    .performance-kpi--primary {
        grid-column: 1 / -1;
    }

    .inventory-destination-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .inventory-destination-card__control {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading .btn {
        align-self: flex-start;
    }

    .form-section {
        padding: 0.9rem;
    }

    .form-section__grid,
    .form-section__grid--three,
    .compact-filter-toolbar,
    .compact-filter-toolbar:not(.is-custom-period),
    .performance-kpi-grid,
    .goal-progress-stats {
        grid-template-columns: 1fr;
    }

    .compact-filter-toolbar .filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .performance-kpi,
    .performance-kpi--primary {
        grid-column: 1;
    }

    .status-setting {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .inventory-lines-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-lines-heading .btn {
        align-self: flex-start;
    }

    .inventory-lines-table-wrap {
        overflow: visible;
        border: 0;
    }

    .inventory-lines-table,
    .inventory-lines-table tbody,
    .inventory-lines-table tr,
    .inventory-lines-table td {
        display: block;
        width: 100%;
    }

    .inventory-lines-table thead {
        display: none;
    }

    .inventory-lines-table tbody {
        display: grid;
        gap: 0.75rem;
    }

    .inventory-lines-table tr {
        padding: 0.85rem;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 14px;
        background: #fff;
    }

    .inventory-lines-table td,
    .inventory-lines-table td:first-child {
        min-width: 0;
        padding: 0.45rem 0 !important;
        border: 0;
        text-align: right !important;
    }

    .inventory-lines-table td::before {
        content: attr(data-cell-label);
        display: block;
        margin-bottom: 0.3rem;
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 800;
    }

    .inventory-available-cell strong,
    .inventory-available-cell small {
        display: inline;
    }

    .inventory-quantity-cell {
        width: 100%;
    }

    .btn-icon-danger {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .surface-panel__header,
    .surface-panel__body,
    .surface-panel__footer {
        padding-inline: 0.9rem;
    }

    .form-section__heading {
        align-items: flex-start;
    }

    .inventory-destination-card {
        grid-template-columns: 1fr;
    }

    .inventory-destination-card__control {
        grid-column: auto;
    }

    .compact-filter-toolbar .filter-actions {
        grid-template-columns: 1fr;
    }

    .goal-progress-panel__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .modal-dialog,
    .modal-dialog.modal-sm,
    .modal-dialog.modal-lg {
        width: 100%;
        max-width: none;
        min-height: 100%;
        margin: 0;
    }

    .modal-content.app-modal,
    .modal-content {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .modal-content form {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex: 1 1 auto;
    }

    .app-modal__header {
        padding-top: max(1rem, env(safe-area-inset-top));
    }

    .app-modal__footer,
    .modal-footer {
        padding-bottom: max(0.9rem, env(safe-area-inset-bottom));
    }

.app-modal__footer .btn {
        flex: 1 1 0;
    }
}

/* Progressive Naive UI foundation + operational dashboard rebuild */
.dashboard-shell {
    display: grid;
    gap: 1.1rem;
}

.dashboard-shell__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.2rem;
    padding-bottom: 0.15rem;
}

.dashboard-shell__heading {
    min-width: 0;
}

.dashboard-shell__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    color: #7b8794;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.dashboard-shell__title {
    margin: 0;
    color: #17212b;
    font-size: clamp(1.45rem, 1.55vw, 1.7rem);
    font-weight: 600;
    line-height: 1.25;
}

.dashboard-shell__description {
    max-width: 66ch;
    margin: 0.55rem 0 0;
    color: #64748b;
    font-size: 0.94rem;
    line-height: 1.8;
}

.dashboard-shell__tools {
    display: grid;
    gap: 0.75rem;
    min-width: min(100%, 34rem);
    justify-items: end;
}

.dashboard-shell__quick-actions,
.dashboard-shell__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.dashboard-quick-link,
.dashboard-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 11px;
    background: #fff;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dashboard-quick-link:hover,
.dashboard-inline-link:hover,
.dashboard-quick-link:focus-visible,
.dashboard-inline-link:focus-visible {
    border-color: rgba(194, 106, 36, 0.3);
    background: #fffaf6;
    color: #9f4500;
    transform: translateY(-1px);
}

.dashboard-quick-link.is-accent {
    border-color: rgba(194, 106, 36, 0.18);
    background: linear-gradient(180deg, rgba(255, 250, 246, 0.95), rgba(255, 247, 240, 0.9));
    color: #9f4500;
}

.dashboard-period-select {
    width: 180px;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-kpi-card {
    grid-column: span 2;
    display: grid;
    gap: 0.35rem;
    min-height: 118px;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: #fff;
}

.dashboard-kpi-card.is-emphasis {
    background: linear-gradient(180deg, rgba(255, 250, 246, 0.96), rgba(255, 255, 255, 1));
    border-color: rgba(194, 106, 36, 0.22);
}

.dashboard-kpi-card.is-warning {
    border-inline-start: 3px solid rgba(194, 106, 36, 0.8);
}

.dashboard-kpi-card.is-danger {
    border-inline-start: 3px solid rgba(194, 65, 65, 0.76);
}

.dashboard-kpi-card.is-success {
    border-inline-start: 3px solid rgba(100, 116, 63, 0.82);
}

.dashboard-kpi-card__label {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
}

.dashboard-kpi-card__value {
    color: #17212b;
    font-size: clamp(1.25rem, 1.55vw, 1.75rem);
    font-weight: 600;
    line-height: 1.2;
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.dashboard-kpi-card__meta {
    color: #7b8794;
    font-size: 0.82rem;
    line-height: 1.6;
}

.dashboard-inline-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-inline-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    color: #516070;
    font-size: 0.85rem;
}

.dashboard-inline-stat strong {
    color: #17212b;
    font-size: 0.94rem;
    font-weight: 600;
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-grid--primary {
    grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr);
    align-items: start;
}

.dashboard-grid--secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.dashboard-stack {
    display: grid;
    gap: 1rem;
}

.dashboard-panel {
    overflow: hidden;
}

.dashboard-panel--span-2 {
    grid-column: span 2;
}

.dashboard-panel__header {
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.dashboard-panel__actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.dashboard-chart-panel {
    min-height: 320px;
}

.dashboard-chart-stage {
    position: relative;
    min-height: 280px;
}

.dashboard-empty {
    padding-block: 1.25rem;
}

.dashboard-attention-list,
.dashboard-ranked-list,
.dashboard-transaction-list {
    display: grid;
    gap: 0.7rem;
}

.dashboard-attention-item,
.dashboard-ranked-item--link,
.dashboard-transaction-row {
    text-decoration: none;
}

.dashboard-attention-item {
    display: grid;
    gap: 0.45rem;
    padding: 0.95rem 0;
    color: #334155;
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.dashboard-attention-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-attention-item strong,
.dashboard-ranked-item strong,
.dashboard-transaction-row strong {
    color: #17212b;
    font-size: 0.92rem;
    font-weight: 600;
}

.dashboard-attention-item p,
.dashboard-ranked-item span,
.dashboard-transaction-row span {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.7;
}

.dashboard-attention-item__meta {
    color: #9f4500;
    font-size: 0.82rem;
    font-weight: 600;
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.dashboard-ranked-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.dashboard-ranked-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-ranked-item--link {
    transition: transform 0.2s ease;
}

.dashboard-ranked-item--link:hover,
.dashboard-ranked-item--link:focus-visible,
.dashboard-transaction-row:hover,
.dashboard-transaction-row:focus-visible {
    transform: translateY(-1px);
}

.dashboard-ranked-item__copy {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
}

.dashboard-ranked-item__value {
    color: #17212b;
    font-size: 0.92rem;
    font-weight: 600;
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dashboard-ranked-item__progress {
    display: grid;
    gap: 0.35rem;
    min-width: 140px;
}

.dashboard-ranked-item__progress small {
    color: #7b8794;
    font-size: 0.74rem;
    direction: ltr;
    text-align: left;
}

.dashboard-transaction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.95rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.dashboard-transaction-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-transaction-row__main,
.dashboard-transaction-row__meta,
.dashboard-transaction-row__title {
    display: grid;
    gap: 0.35rem;
}

.dashboard-transaction-row__main {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-transaction-row__title {
    min-width: 0;
}

.dashboard-transaction-row__tags {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.dashboard-transaction-row__meta {
    flex: 0 0 auto;
    text-align: left;
}

.dashboard-transaction-row__meta strong {
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.dashboard-transaction-row__meta span {
    direction: rtl;
    text-align: left;
}

.n-base-selection,
.n-button,
.n-tag,
.n-progress {
    font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif !important;
}

@media (max-width: 1399.98px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dashboard-inline-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid--secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .dashboard-shell__header,
    .dashboard-grid--primary {
        grid-template-columns: 1fr;
        display: grid;
    }

    .dashboard-shell__tools {
        justify-items: stretch;
        min-width: 0;
    }

    .dashboard-shell__quick-actions,
    .dashboard-shell__controls,
    .dashboard-panel__actions {
        justify-content: flex-start;
    }

    .dashboard-panel--span-2 {
        grid-column: auto;
    }
}

@media (max-width: 991.98px) {
    .dashboard-kpi-grid,
    .dashboard-grid--secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-kpi-card {
        grid-column: span 1;
    }

    .dashboard-period-select {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .dashboard-inline-strip,
    .dashboard-kpi-grid,
    .dashboard-grid--secondary {
        grid-template-columns: 1fr;
    }

    .dashboard-shell__quick-actions,
    .dashboard-shell__controls {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-quick-link,
    .dashboard-inline-link {
        justify-content: center;
    }

    .dashboard-inline-stat,
    .dashboard-transaction-row,
    .dashboard-ranked-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-ranked-item__progress,
    .dashboard-transaction-row__meta {
        width: 100%;
    }
}
