@import url("https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap");
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --ink: #101114;
    --muted: #6b7280;
    --faint: #9ca3af;
    --line: #e7e8ed;
    --canvas: #f7f8fb;
    --surface: #fff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --heading: "Kanit", "Segoe UI", sans-serif;
    --body: "Kanit", "Segoe UI", sans-serif;
    --code: "Kanit", "Segoe UI", sans-serif;
}

.po-total-preview {
    display: grid;
    gap: .75rem;
    width: 100%;
    margin: .5rem 0 1rem;
}
.po-total-preview > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.po-total-preview .po-grand-total {
    padding: .85rem;
    border: 0;
    border-radius: .8rem;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}
.po-total-preview .po-grand-total strong { font-size: 1.1rem; }

.list-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .85rem 0 1.35rem;
    color: var(--muted);
    font-size: .875rem;
}
.list-pagination .pagination { gap: .25rem; }
.list-pagination .page-link {
    min-width: 36px;
    border-radius: .55rem !important;
    text-align: center;
    color: var(--primary-dark);
}
.list-pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination-buttons { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); }
@media(max-width:575.98px){.list-pagination{align-items:flex-start;flex-direction:column}.list-pagination .pagination{flex-wrap:wrap}}

/* High-contrast buttons and consistently sized status badges */
.btn{border-width:1px;box-shadow:0 1px 2px rgba(15,23,42,.06)}
.btn:hover{box-shadow:0 5px 14px rgba(15,23,42,.13)}
.btn:focus-visible{outline:3px solid rgba(79,70,229,.24);outline-offset:2px}
.btn:disabled,.btn.disabled{box-shadow:none;transform:none;opacity:.58}
.btn-primary{background:#4f46e5;border-color:#4338ca;color:#fff}
.btn-primary:hover,.btn-primary:focus{background:#4338ca;border-color:#3730a3;color:#fff}
.btn-success{background:#15803d;border-color:#166534;color:#fff}
.btn-success:hover,.btn-success:focus{background:#166534;border-color:#14532d;color:#fff}
.btn-danger{background:#dc2626;border-color:#b91c1c;color:#fff}
.btn-danger:hover,.btn-danger:focus{background:#b91c1c;border-color:#991b1b;color:#fff}
.btn-warning{background:#f59e0b;border-color:#d97706;color:#422006}
.btn-warning:hover,.btn-warning:focus{background:#d97706;border-color:#b45309;color:#fff}
.btn-outline-primary{background:#f0efff;border-color:#827cf3;color:#3730a3}
.btn-outline-primary:hover,.btn-outline-primary:focus{background:#4f46e5;border-color:#4338ca;color:#fff}
.btn-outline-danger{background:#fff1f2;border-color:#f87171;color:#b91c1c}
.btn-outline-danger:hover,.btn-outline-danger:focus{background:#dc2626;border-color:#b91c1c;color:#fff}
.btn-light{background:#e9eef5;border-color:#cbd5e1;color:#334155}
.btn-light:hover,.btn-light:focus{background:#dbe3ed;border-color:#94a3b8;color:#0f172a}
.btn-ghost{background:#f4f5f8;border:1px solid #d9dde5;color:#475569}
.btn-ghost:hover,.btn-ghost:focus{background:#e7eaf0;border-color:#b8c0cc;color:#1e293b}
.table .btn-sm{min-width:36px}
.table .btn-light:has(.bi-pencil){background:#eeedff;border-color:#c4bfff;color:#4338ca}
.table .btn-light:has(.bi-pencil):hover{background:#4f46e5;border-color:#4338ca;color:#fff}
.table .btn-light:has(.bi-journal-text),.table .btn-light:has(.bi-eye){background:#e8f3ff;border-color:#a8d2ff;color:#0369a1}
.table .btn-light:has(.bi-journal-text):hover,.table .btn-light:has(.bi-eye):hover{background:#0284c7;border-color:#0369a1;color:#fff}
.table .btn-light:has(.bi-key){background:#e6fffb;border-color:#99f6e4;color:#0f766e}
.table .btn-light:has(.bi-key):hover{background:#0f766e;border-color:#115e59;color:#fff}
.table .btn-light:has(.bi-power){background:#fff7e6;border-color:#f7c66b;color:#a84b08}
.table .btn-light:has(.bi-power):hover{background:#d97706;border-color:#b45309;color:#fff}
.table .btn-light:has(.bi-arrow-counterclockwise){background:#f1efff;border-color:#b9b4ff;color:#4f46e5}
.table .btn-light:has(.bi-arrow-counterclockwise):hover{background:#4f46e5;border-color:#4338ca;color:#fff}
.table .btn-light:has(.bi-trash),.table .btn-light:has(.bi-x-circle){background:#fff0f1;border-color:#fda4af;color:#be123c}
.table .btn-light:has(.bi-trash):hover,.table .btn-light:has(.bi-x-circle):hover{background:#dc2626;border-color:#b91c1c;color:#fff}
.status-badge,.table td>.badge:not(.priority-badge){display:inline-flex;align-items:center;justify-content:center;width:124px;max-width:100%;min-height:28px;padding:5px 9px;border-radius:7px;white-space:nowrap}
.priority-badge{display:inline-flex;align-items:center;justify-content:center;width:88px;max-width:100%;min-height:28px;padding:5px 9px;border-radius:7px;white-space:nowrap}
.status-badge.text-bg-secondary,.table td>.badge.text-bg-secondary:not(.priority-badge){background-color:#64748b!important;color:#fff!important}
.status-badge.text-bg-warning,.table td>.badge.text-bg-warning:not(.priority-badge){background-color:#f59e0b!important;color:#422006!important}
.status-badge.text-bg-success,.table td>.badge.text-bg-success:not(.priority-badge){background-color:#16a34a!important;color:#fff!important}
.status-badge.text-bg-danger,.table td>.badge.text-bg-danger:not(.priority-badge){background-color:#dc2626!important;color:#fff!important}
.status-badge.text-bg-primary,.table td>.badge.text-bg-primary:not(.priority-badge){background-color:#4f46e5!important;color:#fff!important}
.status-badge.text-bg-info,.table td>.badge.text-bg-info:not(.priority-badge){background-color:#0284c7!important;color:#fff!important}
.status-badge.text-bg-dark,.table td>.badge.text-bg-dark:not(.priority-badge){background-color:#334155!important;color:#fff!important}
@media(max-width:575.98px){.status-badge,.table td>.badge:not(.priority-badge){width:116px}.priority-badge{width:88px}}
* {
    box-sizing: border-box;
}
html {
    font-size: 16px;
}
body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--body);
    font-size: 0.9375rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body.nav-open {
    overflow: hidden;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading);
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--ink);
}
a {
    color: var(--primary);
}
code,
.doc-number {
    font-family: var(--code);
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}
.topbar-inner {
    height: 64px;
    display: flex;
    align-items: center;
    max-width: 1600px;
    margin: auto;
    padding: 0 28px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-family: var(--heading);
    font-size: 1.08rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.035em;
}
.brand-symbol {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--ink);
    color: #fff;
}
.brand-symbol i {
    font-size: 1rem;
}
.brand-symbol-logo {
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
}
.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.page-context {
    align-items: center;
    gap: 12px;
    margin-left: 28px;
    color: var(--muted);
    font-size: 0.875rem;
}
.page-context i {
    font-size: 0.7rem;
    color: #c4c6ce;
}
.top-actions,
.live-pill {
    display: flex;
    align-items: center;
}
.top-actions {
    gap: 12px;
}
.live-pill {
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid #dff5ec;
    border-radius: 999px;
    background: #f2fcf8;
    color: #087a57;
    font-size: 0.75rem;
}
.live-pill span,
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.user-block {
    text-align: right;
    line-height: 1.1;
}
.user-block strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
}
.user-block small {
    display: block;
    margin-top: 4px;
    color: var(--faint);
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
}
.user-avatar,
.mini-avatar {
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #eeefff;
    color: var(--primary-dark);
    font-family: var(--heading);
    font-weight: 700;
}
.user-avatar {
    width: 34px;
    height: 34px;
}
.mini-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
}
.icon-button,
.nav-trigger {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    transition: 0.18s;
}
.icon-button:hover,
.nav-trigger:hover {
    border-color: #cfd1d9;
    background: #f6f6f8;
    color: var(--ink);
}
.app-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    max-width: 1600px;
    min-height: calc(100vh - 64px);
    margin: auto;
}
.sidebar {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    padding: 28px 16px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    overflow: auto;
}
.nav-group + .nav-group {
    margin-top: 28px;
}
.sidebar-label {
    padding: 0 12px 8px;
    color: var(--faint);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: 8px;
    color: #595d69;
    font-size: 0.875rem;
    font-weight: 500;
    transition: 0.18s;
}
.sidebar .nav-link > i:first-child {
    width: 18px;
    color: #9296a3;
    text-align: center;
}
.sidebar .nav-link:hover {
    background: #f5f5f8;
    color: var(--ink);
}
.sidebar .nav-link.active {
    background: #eef0ff;
    color: var(--primary-dark);
}
.sidebar .nav-link.active > i:first-child {
    color: var(--primary);
}
.nav-arrow {
    margin-left: auto;
    font-size: 0.68rem;
}
.sidebar-foot {
    position: absolute;
    left: 28px;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.sidebar-foot .status-dot {
    margin-top: 6px;
    flex: none;
}
.sidebar-foot strong,
.sidebar-foot small {
    display: block;
}
.sidebar-foot strong {
    color: #555967;
    font-size: 0.75rem;
    font-weight: 500;
}
.sidebar-foot small {
    margin-top: 2px;
    color: var(--faint);
    font-size: 0.6875rem;
}
.sidebar-brand-mobile {
    display: none;
}
.sidebar-overlay {
    display: none;
}
.main-content {
    min-width: 0;
    width: 100%;
    max-width: 1280px;
    padding: 44px 36px 72px;
}
.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.page-heading h1 {
    margin: 4px 0 5px;
    font-size: 2.15rem;
    line-height: 1.15;
}
.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
}
.eyebrow {
    color: var(--faint);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
}
.page-action {
    flex: none;
}
.main-content > h1.h3,
.main-content > .d-flex:first-child h1 {
    font-size: 2rem;
}
.main-content > .d-flex:first-child {
    align-items: center !important;
    margin-bottom: 24px !important;
}
.btn {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition:
        transform 0.18s,
        box-shadow 0.18s;
}
.btn:hover {
    transform: translateY(-1px);
}
.btn-sm {
    min-height: 34px;
    padding: 6px 12px;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 5px 16px rgba(99, 102, 241, 0.28);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: #c9caff;
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-outline-danger {
    color: var(--danger);
    border-color: #fecaca;
}
.btn-success {
    background: var(--success);
    border-color: var(--success);
}
.btn-ghost {
    border: 0;
    background: transparent;
    color: var(--muted);
}
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.metric-card {
    display: block;
    min-width: 0;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    text-decoration: none;
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        border-color 0.2s;
}
.metric-card:hover {
    transform: translateY(-3px);
    border-color: #d8d9e2;
    box-shadow: 0 14px 35px rgba(20, 20, 32, 0.08);
    color: var(--ink);
}
.metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.metric-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}
.metric-link {
    color: #bec0c9;
}
.metric-card:hover .metric-link {
    color: var(--primary);
}
.tone-warning {
    background: #fff8e8;
    color: #b77905;
}
.tone-primary {
    background: #eef0ff;
    color: var(--primary-dark);
}
.tone-danger {
    background: #fff0f0;
    color: #d9363e;
}
.tone-success {
    background: #edfbf6;
    color: #07845d;
}
.metric-value {
    overflow: hidden;
    margin-bottom: 3px;
    font-family: var(--heading);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
}
.metric-label {
    font-size: 0.875rem;
    font-weight: 500;
}
.metric-meta {
    margin-top: 3px;
    color: var(--faint);
    font-size: 0.75rem;
}
.workflow-card,
.data-card,
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: none !important;
    overflow: hidden;
}
.workflow-card {
    padding: 22px 24px;
    margin-bottom: 20px;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.section-head h2 {
    margin: 3px 0 0;
    font-size: 1.15rem;
}
.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.75rem;
}
.workflow-steps {
    display: flex;
    align-items: center;
    margin-top: 22px;
}
.workflow-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}
.step-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dfe0e7;
    border-radius: 999px;
    background: #fafafd;
    color: var(--primary);
}
.workflow-step small,
.workflow-step strong {
    display: block;
}
.workflow-step small {
    color: var(--faint);
    font-size: 0.65rem;
}
.workflow-step strong {
    font-size: 0.8125rem;
    font-weight: 500;
}
.step-line {
    height: 1px;
    min-width: 18px;
    flex: 1;
    margin: 0 12px;
    background: linear-gradient(90deg, #d7d8e0 60%, transparent 60%);
    background-size: 7px 1px;
}
.data-card {
    margin-top: 20px;
}
.table-section-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}
.text-link {
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
}
.text-link i {
    margin-left: 4px;
}
.person-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}
.doc-number {
    font-size: 0.8125rem;
    color: #3730a3;
}
.card {
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}
.card:not(.auth-card):hover {
    box-shadow: 0 10px 30px rgba(20, 20, 32, 0.06) !important;
}
.card-body {
    padding: 24px;
}
.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #fafaff;
    margin: 0;
}
.table > :not(caption) > * > * {
    padding: 13px 16px;
    border-color: var(--line);
    vertical-align: middle;
}
.table thead th {
    padding-top: 11px;
    padding-bottom: 11px;
    background: #fafafd;
    color: #777b87;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}
.table tbody tr:last-child td {
    border-bottom: 0;
}
.table tbody tr {
    transition: background 0.15s;
}
.table tbody tr:hover {
    background: #fafaff;
}
.form-control,
.form-select {
    min-height: 42px;
    padding: 10px 13px;
    border: 1px solid #dcdee5;
    border-radius: 8px;
    background: #fff;
    font-family: var(--body);
    font-size: 0.875rem;
}
.form-control::placeholder {
    color: #a6a8b1;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.form-label {
    margin-bottom: 6px;
    color: #595d69;
    font-size: 0.8125rem;
    font-weight: 500;
}
.badge {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
}
.text-bg-primary {
    background: #eef0ff !important;
    color: #4f46e5 !important;
}
.text-bg-success {
    background: #eafaf4 !important;
    color: #087a57 !important;
}
.text-bg-warning {
    background: #fff7e6 !important;
    color: #a66500 !important;
}
.text-bg-danger {
    background: #fff0f0 !important;
    color: #d12e37 !important;
}
.text-bg-info {
    background: #edf6ff !important;
    color: #1671c5 !important;
}
.text-bg-secondary,
.text-bg-light {
    background: #f1f2f4 !important;
    color: #5f636e !important;
}
.alert {
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 0.875rem;
}
.alert-info {
    background: #f0f1ff;
    border-color: #dee0ff;
    color: #3730a3;
}
.modal-content {
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(16, 17, 20, 0.18);
}
.modal-header,
.modal-footer {
    border-color: var(--line);
}
.modal-header {
    padding: 20px 24px;
}
.modal-body {
    padding: 24px;
}
.modal-footer {
    padding: 16px 24px;
}
.empty-state {
    display: grid;
    place-items: center;
    padding: 44px 16px;
    text-align: center;
}
.empty-state > span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #f2f3f6;
    color: #8b8e98;
    font-size: 1.2rem;
}
.empty-state strong {
    font-family: var(--heading);
}
.empty-state p {
    margin: 4px 0 0;
    color: var(--faint);
    font-size: 0.8125rem;
}
.auth-bg {
    min-height: 100vh;
    background: var(--canvas);
    display: grid;
    align-items: center;
}
.auth-bg:before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(#d9dbe2 0.75px, transparent 0.75px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 72%);
    pointer-events: none;
}
.auth-bg main {
    position: relative;
}
.auth-card {
    max-width: 440px;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(20, 20, 32, 0.08) !important;
}
.auth-card .card-body {
    padding: 40px !important;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 24px !important;
    border-radius: 11px;
    background: var(--ink);
    color: #fff;
    font-family: var(--heading);
    font-weight: 700;
}
.brand-mark-logo {
    width: 56px;
    height: 56px;
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
}
.auth-card h1 {
    font-size: 2rem;
}
.auth-card .btn-primary {
    height: 44px;
}
@media (max-width: 1100px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .workflow-step div {
        display: none;
    }
    .step-line {
        margin: 0 8px;
    }
}
@media (max-width: 991.98px) {
    .topbar-inner {
        padding: 0 18px;
    }
    .nav-trigger {
        margin-right: 10px;
    }
    .app-shell {
        display: block;
    }
    .sidebar {
        position: fixed;
        z-index: 1060;
        top: 0;
        left: 0;
        width: 286px;
        height: 100vh;
        padding: 18px 16px 28px;
        transform: translateX(-102%);
        transition: transform 0.25s ease;
        box-shadow: 0 20px 60px rgba(10, 10, 15, 0.18);
    }
    .nav-open .sidebar {
        transform: translateX(0);
    }
    .sidebar-brand-mobile {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 4px 22px;
    }
    .sidebar-overlay {
        position: fixed;
        z-index: 1050;
        inset: 0;
        display: block;
        background: rgba(10, 10, 15, 0.35);
        opacity: 0;
        visibility: hidden;
        transition: 0.25s;
    }
    .nav-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }
    .main-content {
        max-width: none;
        padding: 36px 24px 56px;
    }
    .sidebar-foot {
        position: static;
        margin-top: 32px;
    }
    .workflow-card {
        overflow-x: auto;
    }
    .workflow-steps {
        min-width: 540px;
    }
}
@media (max-width: 575.98px) {
    .topbar-inner {
        padding: 0 14px;
    }
    .brand > span:last-child,
    .page-context {
        display: none !important;
    }
    .top-actions {
        gap: 8px;
    }
    .main-content {
        padding: 26px 14px 44px;
    }
    .page-heading {
        align-items: flex-start;
    }
    .page-heading h1 {
        font-size: 1.75rem;
    }
    .page-heading p {
        font-size: 0.85rem;
    }
    .page-action {
        width: 42px;
        height: 42px;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }
    .page-action i {
        font-size: 1rem;
    }
    .metric-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .metric-card {
        padding: 15px;
        border-radius: 12px;
    }
    .metric-top {
        margin-bottom: 12px;
    }
    .metric-icon {
        width: 34px;
        height: 34px;
    }
    .metric-value {
        font-size: 1.35rem;
    }
    .metric-meta {
        display: none;
    }
    .workflow-card {
        padding: 18px;
    }
    .data-card {
        border-radius: 12px;
    }
    .table-section-head {
        padding: 18px;
    }
    .auth-card .card-body {
        padding: 28px !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Colorful analytics dashboard refresh */
body {
    background: #fbf8f8;
}
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    height: 100vh;
    padding: 22px 14px;
    background: #f4f7fb;
    border-right: 0;
    box-shadow: none;
    overflow-y: auto;
    scrollbar-width: thin;
}
.sidebar-brand-mobile {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px 30px;
}
.sidebar-brand-mobile > div strong,
.sidebar-brand-mobile > div small {
    display: block;
}
.sidebar-brand-mobile > div strong {
    font-family: var(--heading);
    font-size: 1rem;
    letter-spacing: -0.03em;
}
.sidebar-brand-mobile > div small {
    margin-top: 1px;
    color: #94a3b8;
    font-size: 0.66rem;
}
.brand-symbol {
    background: #554fea;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(85, 79, 234, 0.22);
}
.nav-group + .nav-group {
    margin-top: 22px;
}
.sidebar-label {
    color: #9aa7bb;
}
.sidebar .nav-link {
    position: relative;
    min-height: 43px;
    color: #64748b;
    border-radius: 8px;
}
.sidebar .nav-link > i:first-child {
    color: #718096;
}
.sidebar .nav-link:hover {
    background: #eef1f7;
    color: #252a36;
}
.sidebar .nav-link.active {
    background: #fff;
    color: #514cf0;
    box-shadow: 0 3px 12px rgba(50, 60, 90, 0.05);
}
.sidebar .nav-link.active:after {
    content: "";
    position: absolute;
    right: -14px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 4px 0 0 4px;
    background: #554fea;
}
.sidebar .nav-link.active > i:first-child {
    color: #514cf0;
}
.sidebar-profile {
    position: sticky;
    left: auto;
    right: auto;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    margin: 24px 4px 0;
}
.sidebar-profile > div {
    min-width: 0;
}
.sidebar-profile strong,
.sidebar-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-profile strong {
    font-size: 0.78rem;
    font-weight: 500;
}
.sidebar-profile small {
    color: #94a3b8;
    font-size: 0.66rem;
}
.topbar {
    margin-left: 240px;
    height: 64px;
    background: rgba(255, 255, 255, 0.91);
    border-color: #eef0f4;
}
.topbar-inner {
    height: 64px;
    max-width: none;
    padding: 0 30px;
}
.top-search {
    display: flex;
    align-items: center;
    width: min(420px, 45vw);
    height: 38px;
    padding: 0 12px;
    background: #f7f5f5;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #9aa7bb;
    transition: 0.2s;
}
.top-search:focus-within {
    background: #fff;
    border-color: #c8c6ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.top-search input {
    width: 100%;
    margin: 0 10px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #20242e;
    font: inherit;
    font-size: 0.82rem;
}
.top-search input::placeholder {
    color: #a4acba;
}
.top-search kbd {
    padding: 3px 6px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 5px;
    color: #94a3b8;
    font: 500 0.65rem var(--body);
    box-shadow: none;
}
.current-page {
    text-align: right;
}
.current-page small,
.current-page strong {
    display: block;
}
.current-page small {
    color: #a0a8b5;
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.current-page strong {
    margin-top: 1px;
    color: #514cf0;
    font-size: 0.86rem;
    font-weight: 500;
}
.main-content {
    max-width: none;
    margin-left: 240px;
    padding: 38px 30px 64px;
}
.colorful-heading h1 {
    font-size: 2.25rem;
}
.colorful-heading p {
    font-size: 1rem;
}
.highlight-number {
    color: #159447;
    font-weight: 500;
}
.eyebrow {
    color: #5953e9;
}
.colorful-metrics {
    gap: 18px;
}
.colorful-metrics .metric-card {
    min-height: 168px;
    padding: 22px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(40, 40, 55, 0.045);
}
.colorful-metrics .metric-card:hover {
    box-shadow: 0 14px 34px rgba(40, 40, 55, 0.1);
}
.colorful-metrics .metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 1.08rem;
}
.metric-purple .metric-icon {
    background: #dedcff;
    color: #4f46e5;
}
.metric-green .metric-icon {
    background: #c9f7d4;
    color: #159447;
}
.metric-red .metric-icon {
    background: #ffd8d8;
    color: #e02e3a;
}
.metric-orange .metric-icon {
    background: #ffe0ca;
    color: #c65c13;
}
.metric-purple .metric-trend {
    color: #4f46e5;
}
.metric-green .metric-trend {
    color: #159447;
}
.metric-red .metric-trend {
    color: #e02e3a;
}
.metric-orange .metric-trend {
    color: #c65c13;
}
.colorful-metrics .metric-label {
    color: #6f7582;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.colorful-metrics .metric-value {
    margin-top: 3px;
    margin-bottom: 0;
    font-size: 1.65rem;
}
.colorful-metrics .metric-meta {
    font-size: 0.72rem;
}
.dashboard-split {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 0.9fr);
    gap: 24px;
    margin: 26px 0;
}
.dashboard-split .workflow-card {
    margin: 0;
    padding: 26px 28px;
    border: 0;
    box-shadow: 0 8px 30px rgba(40, 40, 55, 0.045) !important;
}
.section-head p {
    margin: 4px 0 0;
    color: #8b93a2;
    font-size: 0.8rem;
}
.dashboard-split .workflow-steps {
    margin-top: 28px;
}
.step-icon {
    border: 0;
}
.step-purple {
    background: #e0dfff;
    color: #524bed;
}
.step-blue {
    background: #d8efff;
    color: #1682cc;
}
.step-orange {
    background: #ffe4cf;
    color: #d16618;
}
.step-green {
    background: #d5f8dc;
    color: #168b44;
}
.step-pink {
    background: #ffe0ee;
    color: #d83c7d;
}
.flow-summary {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 116px;
    margin-top: 28px;
    padding: 14px 10px 0;
    border-top: 1px solid #eff0f4;
}
.flow-summary > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}
.flow-summary span {
    display: block;
    width: 20px;
    height: var(--bar);
    min-height: 12px;
    border-radius: 5px 5px 2px 2px;
    background: var(--bar-color);
    opacity: 0.88;
}
.flow-summary small {
    margin-top: 8px;
    color: #9299a7;
    font-size: 0.62rem;
}
.insight-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 310px;
    padding: 28px 26px;
    border-radius: 12px;
    background: linear-gradient(145deg, #4f49df, #6762ef);
    color: #fff;
    box-shadow: 0 16px 35px rgba(79, 73, 223, 0.22);
}
.insight-card h2 {
    max-width: 270px;
    margin: 18px 0 12px;
    color: #fff;
    font-size: 1.45rem;
    line-height: 1.15;
}
.insight-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}
.insight-eyebrow {
    font: 400 0.65rem var(--code);
    letter-spacing: 0.18em;
}
.insight-icon {
    float: right;
    color: #cfccff;
    font-size: 1.1rem;
}
.insight-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
    background: #fff;
    color: #514cf0;
}
.insight-button:hover {
    background: #f7f7ff;
    color: #3933ca;
}
.data-card {
    border: 0;
    box-shadow: 0 8px 30px rgba(40, 40, 55, 0.045);
}
.card {
    border-color: #edf0f4;
}
.main-content > .card {
    border: 0;
    box-shadow: 0 8px 30px rgba(40, 40, 55, 0.045) !important;
}
.table thead th {
    background: #f9fafc;
}
.btn-primary {
    background: #554fea;
    border-color: #554fea;
}
.btn-primary:hover {
    background: #4540d8;
    border-color: #4540d8;
}
.auth-bg {
    background: #f8f7fb;
}
.auth-bg:before {
    background-image: radial-gradient(#c9c7f5 0.85px, transparent 0.85px);
}
.auth-card {
    border: 0;
    box-shadow: 0 25px 70px rgba(68, 62, 170, 0.12) !important;
}
.auth-card .brand-mark {
    width: 56px;
    height: 56px;
    color: transparent;
    font-size: 0;
    background: transparent url("purseflow-logo.svg") center / contain no-repeat;
    box-shadow: none;
}
@media (max-width: 1100px) {
    .dashboard-split {
        grid-template-columns: 1fr;
    }
    .insight-card {
        min-height: 230px;
    }
    .flow-summary {
        height: 100px;
    }
}
@media (max-width: 991.98px) {
    .sidebar {
        z-index: 1060;
        transform: translateX(-102%);
        transition: transform 0.25s ease;
    }
    .nav-open .sidebar {
        transform: translateX(0);
    }
    .sidebar-overlay {
        z-index: 1050;
    }
    .topbar {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 32px 24px 56px;
    }
    .top-search {
        width: min(430px, 58vw);
    }
}
@media (max-width: 575.98px) {
    .topbar-inner {
        padding: 0 14px;
    }
    .top-search {
        width: auto;
        flex: 1;
    }
    .top-search kbd {
        display: none;
    }
    .current-page {
        display: none;
    }
    .main-content {
        padding: 25px 14px 44px;
    }
    .colorful-heading h1 {
        font-size: 1.8rem;
    }
    .colorful-metrics {
        gap: 10px;
    }
    .colorful-metrics .metric-card {
        min-height: 145px;
        padding: 16px;
    }
    .dashboard-split {
        gap: 14px;
    }
    .dashboard-split .workflow-card {
        padding: 20px;
    }
    .insight-card {
        min-height: 220px;
        padding: 24px;
    }
    .flow-summary {
        gap: 8px;
    }
    .flow-summary small {
        display: none;
    }
}

.insight-card {
    background: #5551df;
}
.flow-summary b {
    margin-bottom: 4px;
    color: #5f6673;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Viewport containment and simplified topbar */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.topbar-page {
    line-height: 1.15;
}
.topbar-page small,
.topbar-page strong {
    display: block;
}
.topbar-page small {
    color: #a0a8b5;
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.topbar-page strong {
    margin-top: 3px;
    color: #252a36;
    font-size: 0.92rem;
    font-weight: 500;
}
.main-content {
    width: calc(100% - 240px);
    min-width: 0;
    overflow-x: hidden;
}
.main-content > * {
    max-width: 100%;
}
.metric-grid,
.dashboard-split,
.workflow-card,
.data-card,
.table-responsive {
    min-width: 0;
}
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.workflow-card {
    max-width: 100%;
    overflow-x: auto;
}
.workflow-steps {
    max-width: 100%;
}
.modal {
    max-width: 100vw;
}
.modal-dialog {
    max-width: calc(100vw - 32px);
}
@media (max-width: 991.98px) {
    .main-content {
        width: 100%;
        margin-left: 0;
    }
    .topbar-page {
        margin-left: 4px;
    }
}
@media (max-width: 575.98px) {
    .topbar-page small {
        display: none;
    }
    .topbar-page strong {
        margin-top: 0;
        font-size: 0.86rem;
    }
    .top-actions .current-page {
        display: none;
    }
}

/* Operational pages */
.compact-heading {
    align-items: center;
    margin-bottom: 22px;
}
.compact-heading h1 {
    font-size: 2rem;
}
.summary-strip {
    display: flex;
    align-items: stretch;
    gap: 1px;
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid #e8eaf0;
    border-radius: 12px;
    background: #e8eaf0;
}
.summary-strip > div {
    flex: 1;
    min-width: 150px;
    padding: 16px 20px;
    background: #fff;
}
.summary-strip small,
.summary-strip strong {
    display: block;
}
.summary-strip small {
    margin-bottom: 5px;
    color: #9299a7;
    font-size: 0.72rem;
}
.summary-strip strong {
    font: 700 1.15rem var(--heading);
    letter-spacing: -0.03em;
}
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.filter-search {
    display: flex;
    align-items: center;
    min-width: 240px;
    max-width: 440px;
    flex: 1;
    height: 42px;
    padding: 0 13px;
    border: 1px solid #dcdee5;
    border-radius: 8px;
    background: #fff;
    color: #9aa0ad;
}
.filter-search:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.filter-search input {
    min-width: 0;
    flex: 1;
    margin-left: 9px;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
}
.filter-bar > .form-select {
    width: 180px;
}
.doc-link {
    color: #4f46e5;
    font: 400 0.8rem var(--code);
    text-decoration: none;
}
.doc-link:hover {
    text-decoration: underline;
}
.section-title {
    margin: 28px 0 12px;
    font-size: 1.12rem;
}
.receive-panel {
    border-left: 4px solid #22c55e;
}
.payment-form {
    display: flex;
    min-width: 230px;
    gap: 6px;
}
.payment-form .form-control {
    min-height: 34px;
}
.approval-list {
    display: grid;
    gap: 12px;
}
.approval-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(350px, 0.8fr);
    align-items: center;
    gap: 20px;
    padding: 20px 22px;
    border: 1px solid #e8eaf0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(40, 40, 55, 0.035);
}
.approval-main p {
    margin: 4px 0 10px;
    color: #6f7582;
}
.approval-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #8b93a2;
    font-size: 0.75rem;
}
.approval-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.approval-amount small,
.approval-amount strong {
    display: block;
}
.approval-amount small {
    color: #9299a7;
    font-size: 0.7rem;
}
.approval-amount strong {
    margin-top: 4px;
    font: 700 1.1rem var(--heading);
}
.approval-actions {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto auto;
    gap: 7px;
}
.document-card {
    overflow: hidden;
    border: 1px solid #e5e7ed;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(35, 35, 50, 0.06);
}
.document-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 28px;
    border-bottom: 1px solid #eceef2;
}
.document-head > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}
.document-head h2 {
    margin: 0;
    font-size: 1.25rem;
}
.document-head small {
    color: #9299a7;
    font-size: 0.7rem;
}
.document-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    background: #eceef2;
}
.document-meta > div {
    min-height: 82px;
    padding: 16px 20px;
    background: #fff;
}
.document-meta small,
.document-meta strong {
    display: block;
}
.document-meta small {
    margin-bottom: 6px;
    color: #9299a7;
    font-size: 0.7rem;
    text-transform: capitalize;
}
.document-meta strong {
    font-size: 0.86rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.document-card .table-responsive {
    border-top: 1px solid #eceef2;
    border-radius: 0;
}
.total-row td {
    background: #fafafd;
    font-weight: 700;
}
.amount-summary {
    display: flex;
    justify-content: flex-end;
    gap: 36px;
    padding: 24px 28px;
    border-top: 1px solid #eceef2;
}
.amount-summary small,
.amount-summary strong {
    display: block;
}
.amount-summary small {
    color: #9299a7;
    font-size: 0.72rem;
}
.amount-summary strong {
    margin-top: 5px;
    font: 700 1rem var(--heading);
}
.amount-summary .grand-total strong {
    color: #4f46e5;
    font-size: 1.3rem;
}
.related-docs {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-top: 1px solid #eceef2;
    background: #fafafd;
}
.related-docs small {
    margin-right: 4px;
    color: #9299a7;
}
.related-docs a {
    padding: 5px 9px;
    border: 1px solid #dedfff;
    border-radius: 6px;
    background: #fff;
    color: #4f46e5;
    font: 400 0.72rem var(--code);
    text-decoration: none;
}
@media (max-width: 1100px) {
    .approval-card {
        grid-template-columns: minmax(0, 1fr) 140px;
    }
    .approval-actions {
        grid-column: 1/-1;
    }
    .document-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 700px) {
    .summary-strip {
        overflow-x: auto;
    }
    .summary-strip > div {
        min-width: 145px;
    }
    .filter-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }
    .filter-search {
        min-width: 100%;
    }
    .filter-bar > .form-select {
        width: 100%;
        flex: 1;
    }
    .approval-card {
        grid-template-columns: 1fr;
    }
    .approval-actions {
        grid-template-columns: 1fr 1fr;
    }
    .approval-actions .form-control {
        grid-column: 1/-1;
    }
    .document-meta {
        grid-template-columns: 1fr 1fr;
    }
    .amount-summary {
        gap: 18px;
        justify-content: space-between;
        overflow-x: auto;
    }
    .related-docs {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}
@media (max-width: 440px) {
    .document-meta {
        grid-template-columns: 1fr;
    }
    .compact-heading {
        align-items: flex-start;
    }
    .compact-heading .btn {
        flex: none;
    }
    .payment-form {
        min-width: 210px;
    }
}
@media print {
    .sidebar,
    .topbar,
    .no-print {
        display: none !important;
    }
    .main-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .document-card {
        border: 0;
        box-shadow: none !important;
    }
}

/* Standard workflow extensions */
.table-note {
    max-width: 360px;
}
.empty-inline {
    padding: 1.25rem;
    border: 1px dashed #d8dbea;
    border-radius: 14px;
    color: #7a8298;
    text-align: center;
    background: #fafbff;
}
.document-context {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: #e7e9f2;
    border: 1px solid #e7e9f2;
    border-radius: 14px;
    overflow: hidden;
}
.document-context > div {
    background: #fff;
    padding: 14px 16px;
}
.document-context small,
.payment-balance small {
    display: block;
    color: #7a8298;
    margin-bottom: 3px;
}
.document-context strong {
    display: block;
    overflow-wrap: anywhere;
}
.payment-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}
.payment-balance strong {
    font-size: 1.25rem;
    color: #4338ca;
}
.audit-details {
    margin-top: 6px;
}
.audit-details summary {
    cursor: pointer;
    color: #6366f1;
    font-size: 0.82rem;
}
.audit-details code {
    display: block;
    max-width: 420px;
    margin-top: 6px;
    padding: 8px;
    border-radius: 8px;
    background: #f5f6fa;
    color: #5b6478;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.document-timeline {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e7e9f2;
}
.document-timeline h3 {
    font-size: 1rem;
    margin-bottom: 14px;
}
.timeline-item {
    display: flex;
    gap: 12px;
    position: relative;
    padding-bottom: 14px;
}
.timeline-item > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
}
.timeline-item strong,
.timeline-item small {
    display: block;
}
.timeline-item small {
    color: #7a8298;
    margin-top: 2px;
}
@media (max-width: 767.98px) {
    .document-context {
        grid-template-columns: 1fr;
    }
    .approval-card {
        gap: 14px;
    }
    .payment-form {
        min-width: 0;
    }
    .summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* table filtering and sorting */
.filter-bar {
    flex-wrap: wrap;
}
.filter-bar > .form-select {
    width: auto;
    min-width: 155px;
    max-width: 230px;
}
.filter-bar > .select2-container {
    width: auto !important;
    min-width: 180px;
    max-width: 260px;
    flex: 0 1 220px;
}
.select2-container { max-width: 100%; }
.select2-container .select2-selection--single {
    height: 42px;
    border: 1px solid #dcdee5;
    border-radius: 8px;
    background: #fff;
}
.select2-container .select2-selection--single .select2-selection__rendered {
    padding: 6px 38px 6px 12px;
    color: var(--ink);
    line-height: 28px;
}
.select2-container .select2-selection--single .select2-selection__arrow { width: 34px; height: 40px; }
.select2-container--focus .select2-selection--single,
.select2-container--open .select2-selection--single { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.select2-dropdown { overflow: hidden; border-color: #c7c9d2; border-radius: 9px; box-shadow: 0 12px 30px rgba(15,23,42,.14); }
.select2-search--dropdown { padding: 9px; }
.select2-search--dropdown .select2-search__field { min-height: 38px; padding: 7px 10px; border: 1px solid #d8dae2 !important; border-radius: 7px; outline: 0; }
.select2-results__option { padding: 8px 11px; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--primary); }
.permission-groups { display: grid; gap: 24px; }
.permission-group h3 { margin: 0 0 12px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.permission-option { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 11px 13px; border: 1px solid #e4e7ee; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s,background .15s,box-shadow .15s; }
.permission-option:hover { border-color: #b9b4ff; background: #fafaff; }
.permission-option:has(.form-check-input:checked) { border-color: #a5b4fc; background: #f5f5ff; box-shadow: 0 0 0 2px rgba(99,102,241,.06); }
.permission-option .form-check-input { flex: 0 0 auto; margin: 0; }
.permission-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: #ecebff; color: #4f46e5; }
.permission-option strong,.permission-option small { display: block; }
.permission-option strong { font-size: .92rem; }
.permission-option small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.form-select-lg + .select2-container .select2-selection--single { height: 48px; }
.form-select-lg + .select2-container .select2-selection--single .select2-selection__rendered { padding-top: 9px; padding-bottom: 9px; }
.form-select-lg + .select2-container .select2-selection--single .select2-selection__arrow { height: 46px; }
.filter-bar > .form-control.filter-date {
    width: 155px;
    min-height: 42px;
}
.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease;
}
.sort-link i {
    font-size: 0.78rem;
    color: #a0a5b1;
}
.sort-link:hover,
.sort-link.active {
    color: #4f46e5;
}
.sort-link.active i {
    color: #4f46e5;
}
th.text-end .sort-link {
    justify-content: flex-end;
    width: 100%;
}
@media (max-width: 900px) {
    .filter-bar > .form-select,
    .filter-bar > .select2-container,
    .filter-bar > .form-control.filter-date {
        flex: 1 1 160px;
        max-width: none;
    }
}
@media (max-width: 560px) {
    .filter-bar > .form-select,
    .filter-bar > .select2-container,
    .filter-bar > .form-control.filter-date {
        width: 100%;
        flex-basis: 100%;
    }
    .filter-bar > .btn {
        flex: 1;
    }
}

/* full-page editors */
.editor-form {
    margin-bottom: 24px;
}
.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 22px;
    align-items: start;
}
.editor-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}
.form-card {
    padding: 24px;
    background: #fff;
    border: 1px solid #e7e9f2;
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(43, 46, 74, 0.045);
}
.form-card-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 22px;
    padding-bottom: 17px;
    border-bottom: 1px solid #eef0f5;
}
.form-card-head-action {
    flex-wrap: wrap;
}
.form-card-head h2 {
    margin: 0 0 3px;
    font-size: 1.08rem;
    font-weight: 700;
    color: #22242b;
}
.form-card-head p {
    margin: 0;
    color: #7a8298;
    font-size: 0.84rem;
}
.form-card-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 11px;
    font-size: 1.05rem;
}
.form-card-icon.purple {
    background: #eeedff;
    color: #554be8;
}
.form-card-icon.green {
    background: #e7f9f1;
    color: #07815b;
}
.form-card-icon.blue {
    background: #eaf4ff;
    color: #1976d2;
}
.form-card-icon.orange {
    background: #fff1e7;
    color: #d76420;
}
.editor-form .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #414552;
}
.editor-form .form-control,
.editor-form .form-select {
    min-height: 46px;
    font-size: 0.9375rem;
}
.editor-form textarea.form-control {
    min-height: 86px;
    resize: vertical;
}
.editor-form .form-control-lg,
.editor-form .form-select-lg {
    min-height: 50px;
    font-size: 1rem;
}
.required {
    color: #dc3545;
}
.optional {
    margin-left: 5px;
    color: #8b91a1;
    font-size: 0.75rem;
    font-weight: 400;
}
.form-hint {
    margin-top: 6px;
    color: #8b91a1;
    font-size: 0.78rem;
}
.editor-aside {
    min-width: 0;
}
.action-card {
    position: sticky;
    top: 92px;
    padding: 23px;
    background: linear-gradient(155deg, #fff 0%, #f5f3ff 100%);
    border: 1px solid #deddf8;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.08);
}
.action-card-success {
    background: linear-gradient(155deg, #fff 0%, #effbf6 100%);
    border-color: #d3f2e4;
}
.action-card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 17px;
    border-radius: 13px;
    background: #5751e8;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 8px 18px rgba(87, 81, 232, 0.22);
}
.action-card-success .action-card-icon {
    background: #12946b;
}
.action-card h3 {
    margin: 0 0 7px;
    font-size: 1.08rem;
    font-weight: 700;
}
.action-card > p {
    margin: 0 0 19px;
    color: #72798c;
    font-size: 0.85rem;
    line-height: 1.6;
}
.action-card .btn {
    margin-top: 9px;
}
.check-list {
    display: grid;
    gap: 9px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    color: #606779;
    font-size: 0.82rem;
}
.check-list li {
    position: relative;
    padding-left: 21px;
}
.check-list li:before {
    position: absolute;
    left: 0;
    top: 1px;
    font-family: "bootstrap-icons";
    content: "\f26a";
    color: #16936b;
}
.editor-total {
    margin: 15px 0 19px;
    padding: 14px 15px;
    border-radius: 11px;
    background: #fff;
    border: 1px solid #e6e5f6;
}
.editor-total small,
.editor-total strong {
    display: block;
}
.editor-total small {
    margin-bottom: 3px;
    color: #7a8298;
}
.editor-total strong {
    font-size: 1.25rem;
    color: #4038c9;
}
.line-table-head,
.line-item {
    display: grid;
    grid-template-columns: minmax(180px, 1.15fr) minmax(180px, 1.15fr) 105px 90px 130px 42px;
    gap: 8px;
    align-items: start;
}
.line-table-head {
    padding: 0 10px 8px;
    color: #787f90;
    font-size: 0.77rem;
    font-weight: 600;
}
.line-item {
    margin-bottom: 9px;
    padding: 10px;
    background: #f9fafc;
    border: 1px solid #eceef3;
    border-radius: 11px;
}
.line-item .btn {
    height: 42px;
}
.form-empty {
    padding: 56px 24px;
    background: #fff;
    border: 1px solid #e7e9f2;
    border-radius: 16px;
}
.receive-launch {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    gap: 16px;
    align-items: center;
}
.receive-launch-copy {
    min-width: 0;
}
.receive-picker {
    grid-column: 2/-1;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 10px;
}
.payment-summary {
    margin-top: 20px;
}
.payment-summary > div {
    min-width: 150px;
}
.receipt-lines input {
    min-width: 130px;
}
@media (max-width: 1100px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
    .editor-aside {
        order: -1;
    }
    .action-card {
        position: static;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        gap: 10px 16px;
        align-items: center;
    }
    .action-card-icon {
        grid-row: 1/3;
        margin: 0;
    }
    .action-card h3,
    .action-card > p {
        margin: 0;
    }
    .action-card .check-list,
    .action-card .editor-total {
        grid-column: 2/-1;
        margin: 4px 0;
    }
    .action-card .btn {
        margin: 0;
    }
    .action-card > a.btn {
        grid-column: 4;
    }
    .line-table-head,
    .line-item {
        grid-template-columns: minmax(170px, 1.1fr) minmax(170px, 1.1fr) 95px 80px 120px 42px;
    }
}
@media (max-width: 767.98px) {
    .form-card {
        padding: 18px;
        border-radius: 13px;
    }
    .form-card-head {
        align-items: flex-start;
        margin-bottom: 18px;
    }
    .form-card-head-action .btn {
        width: 100%;
        margin-left: 0 !important;
    }
    .line-item {
        grid-template-columns: 1fr 1fr;
        padding: 14px;
    }
    .line-item > div:nth-child(1),
    .line-item > div:nth-child(2) {
        grid-column: 1/-1;
    }
    .line-item .remove-line {
        grid-column: 2;
        justify-self: end;
    }
    .action-card {
        display: block;
        padding: 18px;
    }
    .action-card-icon {
        margin-bottom: 12px;
    }
    .action-card h3 {
        margin-bottom: 6px;
    }
    .action-card > p {
        margin-bottom: 14px;
    }
    .action-card .btn {
        margin-top: 8px;
    }
    .receive-launch {
        grid-template-columns: auto 1fr;
    }
    .receive-launch > .badge {
        grid-column: 1/-1;
        justify-self: start;
    }
    .receive-picker {
        grid-column: 1/-1;
        grid-template-columns: 1fr;
    }
    .receive-picker .btn {
        width: 100%;
    }
}
@media (max-width: 480px) {
    .line-item {
        grid-template-columns: 1fr;
    }
    .line-item > div,
    .line-item > div:nth-child(1),
    .line-item > div:nth-child(2),
    .line-item .remove-line {
        grid-column: 1;
    }
    .line-item .remove-line {
        justify-self: end;
    }
    .form-card-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
    .editor-form .form-control-lg,
    .editor-form .form-select-lg {
        font-size: 0.9375rem;
    }
}
/* Balanced Kanit typography */
:root {
    --bs-body-font-family: var(--body);
    --bs-body-font-size: 1rem;
    --bs-body-line-height: 1.6;
}
html {
    font-size: 16px;
}
body {
    font-family: var(--body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
}
button,
input,
optgroup,
select,
textarea,
.btn,
.form-control,
.form-select {
    font-family: inherit;
}
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: var(--heading);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
}
p,
li,
td,
th,
label,
input,
select,
textarea,
button {
    line-height: 1.55;
}
.page-heading h1,
.colorful-heading h1 {
    font-size: clamp(1.75rem, 2vw, 2.125rem);
    font-weight: 600;
    line-height: 1.25;
}
.compact-heading h1,
.main-content > h1.h3,
.main-content > .d-flex:first-child h1 {
    font-size: clamp(1.625rem, 1.8vw, 2rem);
    font-weight: 600;
}
.page-heading p,
.colorful-heading p {
    font-size: 1rem;
    line-height: 1.6;
}
.eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.1em;
}
.brand {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}
.sidebar-brand-mobile > div strong {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.sidebar-label,
.sidebar-brand-mobile > div small,
.sidebar-profile small,
.sidebar-foot small {
    font-size: 0.75rem;
    line-height: 1.45;
}
.sidebar .nav-link {
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.4;
}
.sidebar-profile strong,
.sidebar-foot strong {
    font-size: 0.8125rem;
    line-height: 1.45;
}
.user-block strong {
    font-size: 0.875rem;
    line-height: 1.35;
}
.user-block small {
    font-size: 0.75rem;
    line-height: 1.4;
    letter-spacing: 0.03em;
}
.topbar-page small,
.current-page small {
    font-size: 0.75rem;
    line-height: 1.35;
}
.topbar-page strong,
.current-page strong {
    font-size: 0.9375rem;
    line-height: 1.4;
}
.live-pill {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Topbar workspace context and actions */
.topbar-inner {
    gap: 18px;
}
.topbar-page {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}
.topbar-page-icon {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid #e7e7fb;
    border-radius: 10px;
    background: #f4f3ff;
    color: var(--primary);
}
.topbar-page-copy {
    min-width: 0;
}
.topbar-page-copy small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8b93a3;
    text-transform: none;
    letter-spacing: 0;
}
.topbar-page-copy small i {
    color: #c3c8d2;
    font-size: 0.58rem;
}
.topbar-page-copy strong {
    overflow: hidden;
    max-width: min(440px, 36vw);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-date {
    align-items: center;
    gap: 7px;
    color: #697386;
    font-size: 0.78rem;
    white-space: nowrap;
}
.topbar-date i {
    color: #929aab;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}
.topbar-user .user-avatar {
    flex: 0 0 34px;
}
.topbar-user-copy {
    min-width: 0;
    line-height: 1.15;
}
.topbar-user-copy strong,
.topbar-user-copy small {
    display: block;
    overflow: hidden;
    max-width: 160px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-user-copy strong {
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 600;
}
.topbar-user-copy small {
    margin-top: 3px;
    color: var(--faint);
    font-size: 0.7rem;
}
.topbar-logout {
    margin: 0;
}
@media (max-width: 767.98px) {
    .topbar-inner {
        gap: 10px;
    }
    .topbar-page-icon {
        display: none;
    }
    .topbar-page-copy strong {
        max-width: 38vw;
    }
}
@media (max-width: 575.98px) {
    .topbar-page {
        flex: 1;
    }
    .topbar-page-copy {
        width: 100%;
    }
    .topbar-page-copy strong {
        max-width: 100%;
    }
    .topbar-user-copy {
        display: none;
    }
    .topbar-user {
        padding-left: 0;
        border-left: 0;
    }
    .topbar-user .user-avatar {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
}
.btn {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
}
.btn-sm {
    font-size: 0.875rem;
}
.btn-lg {
    font-size: 1rem;
}
.form-control,
.form-select {
    font-size: 0.9375rem;
    line-height: 1.5;
}
.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
}
.editor-form .form-label {
    font-size: 0.9375rem;
    font-weight: 500;
}
.editor-form .form-control,
.editor-form .form-select {
    font-size: 1rem;
}
.form-hint,
.optional,
.form-text {
    font-size: 0.8125rem;
    line-height: 1.5;
}
.table {
    font-size: 0.9375rem;
    line-height: 1.5;
}
.table thead th {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.025em;
}
.table small,
.table .small {
    font-size: 0.8125rem;
    line-height: 1.45;
}
.doc-number,
.doc-link {
    font-family: var(--code);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
}
.badge {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
}
.alert {
    font-size: 0.9375rem;
    line-height: 1.55;
}
.metric-value {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.metric-label,
.colorful-metrics .metric-label {
    font-size: 0.8125rem;
    line-height: 1.4;
    letter-spacing: 0.035em;
}
.metric-meta,
.colorful-metrics .metric-meta {
    font-size: 0.8125rem;
    line-height: 1.45;
}
.section-head h2,
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
}
.section-head p {
    font-size: 0.875rem;
    line-height: 1.55;
}
.workflow-step small {
    font-size: 0.75rem;
    line-height: 1.4;
}
.workflow-step strong {
    font-size: 0.875rem;
    line-height: 1.4;
}
.date-chip,
.text-link {
    font-size: 0.8125rem;
}
.flow-summary small {
    font-size: 0.75rem;
    line-height: 1.4;
}
.flow-summary b {
    font-size: 0.8125rem;
    font-weight: 500;
}
.insight-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
}
.insight-card p {
    font-size: 0.875rem;
    line-height: 1.6;
}
.insight-eyebrow {
    font-family: var(--body);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
}
.summary-strip small {
    font-size: 0.8125rem;
    line-height: 1.4;
}
.summary-strip strong {
    font-family: var(--heading);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}
.approval-main p {
    font-size: 0.9375rem;
    line-height: 1.55;
}
.approval-meta,
.approval-amount small {
    font-size: 0.8125rem;
    line-height: 1.45;
}
.approval-amount strong {
    font-family: var(--heading);
    font-size: 1.125rem;
    font-weight: 600;
}
.document-head h2 {
    font-size: 1.375rem;
    font-weight: 600;
}
.document-head small,
.document-meta small,
.amount-summary small,
.related-docs small {
    font-size: 0.8125rem;
    line-height: 1.45;
}
.document-meta strong {
    font-size: 0.9375rem;
    line-height: 1.5;
}
.amount-summary strong {
    font-family: var(--heading);
    font-size: 1.0625rem;
    font-weight: 600;
}
.amount-summary .grand-total strong {
    font-size: 1.375rem;
}
.related-docs a {
    font-family: var(--body);
    font-size: 0.8125rem;
    font-weight: 500;
}
.document-context small,
.payment-balance small {
    font-size: 0.8125rem;
    line-height: 1.45;
}
.document-context strong {
    font-size: 0.9375rem;
}
.payment-balance strong {
    font-size: 1.25rem;
    font-weight: 600;
}
.audit-details summary {
    font-size: 0.875rem;
}
.audit-details code {
    font-size: 0.8125rem;
    line-height: 1.5;
}
.document-timeline h3 {
    font-size: 1.125rem;
    font-weight: 600;
}
.timeline-item small {
    font-size: 0.8125rem;
    line-height: 1.45;
}
.form-card-head h2,
.action-card h3 {
    font-size: 1.1875rem;
    font-weight: 600;
}
.form-card-head p,
.action-card > p {
    font-size: 0.875rem;
    line-height: 1.6;
}
.check-list {
    font-size: 0.875rem;
    line-height: 1.5;
}
.editor-total small {
    font-size: 0.8125rem;
}
.editor-total strong {
    font-size: 1.25rem;
    font-weight: 600;
}
.line-table-head {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
}
.empty-state strong {
    font-size: 1rem;
    font-weight: 600;
}
.empty-state p,
.empty-inline {
    font-size: 0.875rem;
    line-height: 1.55;
}
.auth-card h1 {
    font-size: 2rem;
    font-weight: 600;
}
.auth-card p {
    line-height: 1.6;
}
.auth-card .small {
    font-size: 0.8125rem;
}
@media (max-width: 575.98px) {
    body {
        font-size: 0.9375rem;
    }
    .page-heading h1,
    .colorful-heading h1 {
        font-size: 1.75rem;
    }
    .page-heading p,
    .colorful-heading p {
        font-size: 0.9375rem;
    }
    .metric-value,
    .colorful-metrics .metric-value {
        font-size: 1.5rem;
    }
    .table {
        font-size: 0.875rem;
    }
    .form-control,
    .form-select,
    .editor-form .form-control,
    .editor-form .form-select {
        font-size: 0.9375rem;
    }
    .auth-card h1 {
        font-size: 1.75rem;
    }
}
/* Product categories and automatic SKU */
.category-id {
    color: #8b91a1;
    font-size: 0.8125rem;
}
.category-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 5px 9px;
    border-radius: 7px;
    background: #eeedff;
    color: #4f46e5;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.sku-preview-chip {
    display: inline-flex;
    padding: 6px 10px;
    border: 1px solid #deddff;
    border-radius: 8px;
    background: #fafaff;
    color: #4338ca;
    font-weight: 600;
    white-space: nowrap;
}
.sku-rule-preview {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 18px;
    border: 1px dashed #c9c7f7;
    border-radius: 12px;
    background: #fafaff;
}
.sku-rule-preview strong {
    font-size: 1.25rem;
    color: #4338ca;
    letter-spacing: 0.05em;
}
.sku-rule-preview small {
    grid-column: 1/-1;
    color: #7a8298;
}
.sku-auto-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 10px 13px;
    border: 1px solid #deddff;
    border-radius: 9px;
    background: #fafaff;
    color: #514cf0;
}
.sku-auto-field strong {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font-size: 1.0625rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-category-card {
    border-color: #deddff;
    background: linear-gradient(145deg, #fff, #fbfaff);
}
.editor-form fieldset {
    display: grid;
    gap: 18px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.editor-form fieldset:disabled {
    opacity: 0.55;
}
.editor-form fieldset:disabled .form-card {
    pointer-events: none;
}
.text-uppercase {
    text-transform: uppercase;
}
.table .category-prefix {
    font-size: 0.75rem;
}
@media (max-width: 767.98px) {
    .product-category-card .form-card-head > a {
        width: 100%;
        margin-left: 0 !important;
    }
    .sku-rule-preview {
        grid-template-columns: auto auto 1fr;
    }
    .sku-auto-field strong {
        font-size: 1rem;
    }
}
/* Inventory control and stock ledger */
.inventory-summary > div {
    min-width: 160px;
}
.inventory-ledger-head {
    margin: 32px 0 14px;
}
.ledger-filter > .form-select[name="movement_product_id"] {
    min-width: 240px;
    max-width: 340px;
}
.stock-balance-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #e3e5f2;
    border-radius: 12px;
    background: #fafbff;
}
.stock-balance-preview > div {
    min-width: 0;
}
.stock-balance-preview > div:last-child {
    text-align: right;
}
.stock-balance-preview small,
.stock-balance-preview strong {
    display: block;
}
.stock-balance-preview small {
    margin-bottom: 3px;
    color: #7a8298;
    font-size: 0.8125rem;
}
.stock-balance-preview strong {
    font-size: 1.125rem;
    font-weight: 600;
}
.stock-balance-preview > i {
    color: #8b91a1;
}
.readonly-value {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #e1e4eb;
    border-radius: 8px;
    background: #f7f8fa;
    color: #4b5263;
    font-weight: 500;
}
.stock-ledger-table {
    min-width: 1180px;
}
.stock-product-context {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stock-lines-heading {
    align-items: center;
}
.stock-entry-head,
.stock-entry-row {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(100px, .65fr) minmax(115px, .75fr) minmax(110px, .7fr) 42px;
    gap: 12px;
    align-items: end;
}
.stock-entry-head:has(+ .stock-entry-lines .stock-cost),
.stock-entry-row:has(.stock-cost) {
    grid-template-columns: minmax(240px, 2fr) minmax(95px, .6fr) minmax(105px, .7fr) minmax(130px, .8fr) minmax(105px, .7fr) 42px;
}
.stock-entry-head {
    padding: 0 10px 8px;
    color: #858c9b;
    font-size: .74rem;
    font-weight: 600;
}
.stock-entry-row {
    padding: 14px 10px;
    border-top: 1px solid #eceef3;
}
.stock-entry-row:first-child { border-top: 0; }
.stock-entry-row .form-label { display: none; }
.stock-current,
.stock-projected {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f8fb;
}
.stock-current small,
.stock-projected small { display: none; }
.stock-current strong,
.stock-projected strong { font-size: .95rem; }
.stock-current em,
.stock-projected em { margin-left: 4px; color: #858c9b; font-size: .76rem; font-style: normal; }
.stock-projected.is-negative { background: #fff0f0; color: #c62828; }
.stock-remove { height: 42px; color: #9b5960; }
.stock-form-alert { margin: 12px 10px 0; }
.stock-document-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
}
.stock-document-summary > div {
    padding: 11px;
    border: 1px solid #e4e7ef;
    border-radius: 9px;
    background: rgba(255,255,255,.72);
}
.stock-document-summary small,
.stock-document-summary strong { display: block; }
.stock-document-summary small { color: #858c9b; font-size: .72rem; }
.stock-document-summary strong { margin-top: 2px; color: #39358f; font-size: 1rem; }
.sales-summary > div { min-width: 180px; }
.sale-entry-head,
.sale-entry-row {
    display: grid;
    grid-template-columns: minmax(250px,2fr) minmax(95px,.65fr) minmax(105px,.7fr) minmax(135px,.85fr) minmax(110px,.75fr) 42px;
    gap: 12px;
    align-items: end;
}
.sale-entry-head { padding: 0 10px 8px; color: #858c9b; font-size: .74rem; font-weight: 600; }
.sale-entry-row { padding: 14px 10px; border-top: 1px solid #eceef3; }
.sale-entry-row:first-child { border-top: 0; }
.sale-entry-row .form-label { display: none; }
.sale-stock,
.sale-line-total { min-height: 42px; padding: 8px 10px; border-radius: 8px; background: #f7f8fb; }
.sale-stock small,
.sale-line-total small { display: none; }
.sale-stock em { margin-left: 4px; color: #858c9b; font-size: .76rem; font-style: normal; }
.sale-line-total strong { white-space: nowrap; }
.sale-remove { height: 42px; color: #9b5960; }
.sale-totals { display: grid; gap: 12px; margin: 16px 0; }
.sale-totals > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sale-totals label,
.sale-totals span { color: #747c8d; font-size: .82rem; }
.sale-totals .input-group { width: 150px; }
.sale-grand-total { padding-top: 13px; border-top: 1px solid #e4e7ef; }
.sale-grand-total strong { color: #16815e; font-size: 1.35rem; }
.sale-totals > small { color: #858c9b; text-align: right; }
.sale-return-section { background: #fffcf5; }
.sale-cancel-form {
    display: grid;
    grid-template-columns: minmax(220px,1fr) minmax(260px,1fr) auto;
    gap: 16px;
    align-items: end;
}
@media (max-width: 1100px) {
    .stock-entry-head { display: none; }
    .stock-entry-row,
    .stock-entry-row:has(.stock-cost) { grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(105px, 1fr)) 42px; }
    .stock-entry-row:has(.stock-cost) { grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(105px, 1fr)) 42px; }
    .stock-entry-row .form-label,
    .stock-current small,
    .stock-projected small { display: block; }
    .stock-current,
    .stock-projected { min-height: 67px; }
    .sale-entry-head { display: none; }
    .sale-entry-row { grid-template-columns: minmax(220px,2fr) repeat(4,minmax(105px,1fr)) 42px; }
    .sale-entry-row .form-label,
    .sale-stock small,
    .sale-line-total small { display: block; }
    .sale-stock,
    .sale-line-total { min-height: 67px; }
}
@media (max-width: 767.98px) {
    .ledger-filter > .form-select[name="movement_product_id"] {
        width: 100%;
        max-width: none;
    }
    .stock-balance-preview {
        gap: 10px;
        padding: 14px;
    }
    .stock-product-context {
        grid-template-columns: 1fr;
    }
    .stock-lines-heading { align-items: flex-start; flex-wrap: wrap; }
    .stock-lines-heading .btn { width: 100%; margin-left: 0 !important; }
    .stock-entry-row,
    .stock-entry-row:has(.stock-cost) { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0; }
    .stock-product-field { grid-column: 1 / -1; }
    .stock-remove { align-self: center; }
    .sale-entry-row { grid-template-columns: 1fr 1fr; padding: 16px 0; }
    .sale-product-field { grid-column: 1 / -1; }
    .sale-cancel-form { grid-template-columns: 1fr; }
}
/* Product images and approval worklist */
.product-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 190px;
}
.product-cell > div {
    min-width: 0;
}
.product-image-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: zoom-in;
}
.product-thumb {
    display: grid;
    place-items: center;
    object-fit: cover;
    border: 1px solid #e1e4ec;
    border-radius: 10px;
    background: #f5f6f9;
    color: #9aa1b1;
}
.product-thumb-sm {
    width: 50px;
    height: 50px;
}
.product-thumb-xs {
    width: 42px;
    height: 42px;
}
.product-thumb-lg {
    width: 120px;
    height: 120px;
}
.product-thumb-empty {
    font-size: 1.1rem;
}
.product-line-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.product-image-modal .modal-body {
    display: grid;
    place-items: center;
    min-height: 300px;
    padding: 18px;
    background: #f5f6fa;
}
.product-image-modal .modal-body img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
}
.product-upload-grid {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}
.product-upload-preview {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 1px dashed #cfd3df;
    border-radius: 14px;
    background: #f8f9fc;
    overflow: hidden;
}
.product-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-upload-preview .product-image-button {
    width: 100%;
    height: 100%;
}
.product-upload-placeholder {
    display: grid;
    place-items: center;
    gap: 7px;
    color: #9299a8;
}
.product-upload-placeholder i {
    font-size: 2rem;
}
.approval-summary {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
}
.approval-tabs {
    display: flex;
    gap: 7px;
    margin: 18px 0 12px;
    padding: 5px;
    border: 1px solid #e7e9f1;
    border-radius: 12px;
    background: #fff;
    overflow-x: auto;
}
.approval-tabs a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 8px;
    color: #646b7b;
    text-decoration: none;
    white-space: nowrap;
}
.approval-tabs a b {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: #f0f1f5;
    font-size: 0.75rem;
}
.approval-tabs a.active {
    background: #eeedff;
    color: #4f46e5;
    font-weight: 600;
}
.approval-tabs a.active b {
    background: #fff;
    color: #4f46e5;
}
.approval-filter {
    margin-bottom: 16px;
}
.approval-filter .filter-search {
    min-width: 310px;
}
.approval-worklist {
    display: grid;
    gap: 16px;
}
.approval-review-card {
    overflow: hidden;
    border: 1px solid #e4e7ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(36, 40, 62, 0.045);
}
.approval-review-card.is-pending {
    border-left: 4px solid #f59e0b;
}
.approval-review-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
}
.approval-review-card header h2 {
    margin: 8px 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: #4d5361;
}
.approval-total {
    text-align: right;
    white-space: nowrap;
}
.approval-total small,
.approval-total strong,
.approval-total span {
    display: block;
}
.approval-total small,
.approval-total span {
    color: #8991a0;
    font-size: 0.78rem;
}
.approval-total strong {
    margin: 2px 0;
    font-size: 1.25rem;
    color: #302b9b;
}
.approval-review-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    background: #eaecf2;
}
.approval-review-meta > div {
    padding: 12px 15px;
    background: #fafbfc;
}
.approval-review-meta small,
.approval-review-meta strong {
    display: block;
}
.approval-review-meta small {
    margin-bottom: 3px;
    color: #8b92a0;
    font-size: 0.76rem;
}
.approval-review-meta strong {
    font-size: 0.875rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.approval-details {
    border-top: 1px solid #eceef3;
}
.approval-details summary {
    padding: 13px 22px;
    color: #5452c7;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}
.approval-details summary::-webkit-details-marker {
    display: none;
}
.approval-details summary i {
    margin-right: 7px;
}
.approval-details .table-responsive {
    border-top: 1px solid #eceef3;
}
.approval-details .table {
    margin: 0;
}
.approval-decision {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 18px;
    align-items: end;
    padding: 18px 22px;
    border-top: 1px solid #e7e9f0;
    background: linear-gradient(135deg, #fafbff, #f8f7ff);
}
.approval-decision small {
    display: block;
    margin-top: 5px;
    color: #858d9d;
}
.approval-decision-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.approval-self-warning,
.approval-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-top: 1px solid #eceef3;
}
.approval-self-warning {
    background: #fff9e9;
    color: #8a6511;
}
.approval-self-warning > i,
.approval-result > i {
    font-size: 1.4rem;
}
.approval-self-warning strong,
.approval-self-warning small,
.approval-result strong,
.approval-result small {
    display: block;
}
.approval-self-warning small,
.approval-result small {
    opacity: 0.75;
}
.approval-result.approved {
    background: #effaf5;
    color: #0b7756;
}
.approval-result.rejected {
    background: #fff2f2;
    color: #a12d36;
}
.approval-result p {
    margin: 5px 0 0;
    color: #555d6d;
}
@media (max-width: 1000px) {
    .approval-review-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .approval-decision {
        grid-template-columns: 1fr;
    }
    .approval-decision-buttons {
        justify-content: flex-start;
    }
}
@media (max-width: 700px) {
    .product-upload-grid {
        grid-template-columns: 1fr;
    }
    .product-upload-preview {
        width: 160px;
    }
    .approval-summary {
        display: flex;
    }
    .approval-review-card > header {
        display: block;
    }
    .approval-total {
        margin-top: 12px;
        text-align: left;
    }
    .approval-review-meta {
        grid-template-columns: 1fr 1fr;
    }
    .approval-filter .filter-search {
        min-width: 100%;
    }
    .approval-decision-buttons .btn {
        flex: 1;
    }
    .approval-result {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .approval-result .btn {
        width: 100%;
        margin-left: 0 !important;
    }
}
@media (max-width: 460px) {
    .approval-review-meta {
        grid-template-columns: 1fr;
    }
    .product-thumb-sm {
        width: 44px;
        height: 44px;
    }
}

/* Document detail and print layout */
.document-wrap {
    width: 100%;
    /* max-width: 1120px; */
    margin: 0 auto;
}
.document-card {
    border-color: #e3e6ed;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(35, 39, 55, 0.07);
}
.document-head {
    align-items: flex-start;
    padding: 30px 36px;
    background: linear-gradient(135deg, #fff 0%, #fbfbff 100%);
}
.document-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}
.document-brand .brand-symbol {
    width: 42px;
    height: 42px;
}
.document-head h2 {
    font-size: 1.45rem;
}
.document-head small {
    font-size: 0.76rem;
    letter-spacing: 0.02em;
}
.document-identity {
    display: grid;
    justify-items: end;
    gap: 5px;
    text-align: right;
}
.document-identity > small {
    color: #777f8f;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.document-identity > strong {
    color: #302d87;
    font: 600 1.05rem var(--code);
    letter-spacing: 0.025em;
}
.document-identity .badge {
    margin-top: 3px;
}
.document-section {
    padding: 28px 36px;
    border-top: 1px solid #e9ebf1;
}
.document-info-section {
    border-top: 0;
}
.document-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.document-section-title > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 9px;
    background: #eeedff;
    color: #514cf0;
}
.document-section-title h3,
.document-section-title p {
    margin: 0;
}
.document-section-title h3 {
    font-size: 1rem;
    font-weight: 600;
}
.document-section-title p {
    margin-top: 2px;
    color: #8a92a1;
    font-size: 0.76rem;
}
.document-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    background: transparent;
}
.document-meta > div {
    min-height: 78px;
    padding: 14px 16px;
    border: 1px solid #eaecf1;
    border-radius: 10px;
    background: #fafbfc;
}
.document-meta > div.meta-wide {
    grid-column: span 2;
}
.document-meta dt {
    margin: 0 0 6px;
    color: #8b93a2;
    font-size: 0.72rem;
    font-weight: 500;
}
.document-meta dd {
    margin: 0;
    color: #343946;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.document-meta dd .badge {
    vertical-align: middle;
}
.reference-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: 100%;
    padding: .55rem .8rem;
    border: 1px solid #bfdbfe;
    border-radius: .65rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}
.reference-link:hover { background: #dbeafe; color: #1e40af; }
.document-card .document-table-wrap {
    overflow: hidden;
    border: 1px solid #e5e7ed;
    border-radius: 11px;
}
.document-table {
    min-width: 700px;
    margin: 0;
}
.document-table thead th {
    padding: 12px 15px;
    border-bottom: 1px solid #e4e7ed;
    background: #f6f7fa;
    color: #737b8a;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}
.document-table tbody td {
    padding: 14px 15px;
    border-color: #edf0f4;
    vertical-align: middle;
}
.document-table tbody tr:last-child td {
    border-bottom: 0;
}
.document-number-cell {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.document-table tfoot td {
    padding: 9px 15px;
    border: 0;
    background: #fafbfc;
    text-align: right;
    font-weight: 500;
}
.document-table tfoot tr:first-child td {
    padding-top: 14px;
    border-top: 1px solid #e3e6ed;
}
.document-table tfoot tr:last-child td {
    padding-bottom: 14px;
}
.document-table tfoot td:last-child {
    width: 170px;
    font-variant-numeric: tabular-nums;
}
.document-table tfoot .grand-total-row td {
    color: #3730a3;
    font-size: 1.02rem;
    font-weight: 700;
}
.document-amount-section {
    padding-top: 22px;
    padding-bottom: 22px;
    background: #fafbff;
}
.document-amount-section .amount-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
    padding: 0;
    border: 0;
}
.document-amount-section .amount-summary > div {
    padding: 13px 15px;
    border-right: 1px solid #e4e6ed;
}
.document-amount-section .amount-summary > div:last-child {
    border-right: 0;
}
.document-amount-section .amount-summary small {
    margin: 0;
}
.document-amount-section .amount-summary strong {
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.related-docs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 36px;
    border-top: 1px solid #e8eaf0;
    background: #fafbfc;
}
.related-docs > div {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6d7482;
}
.related-docs > div > i {
    color: #655ee7;
}
.related-docs small {
    margin: 0;
    color: inherit;
    font-weight: 500;
}
.related-docs nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.related-docs a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    width: 172px;
    min-height: 38px;
    padding: 7px 10px;
}
.related-docs a i {
    font-size: 0.68rem;
}
.document-timeline {
    margin: 0;
    padding-top: 28px;
}
.timeline-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.timeline-item {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    background: #fafbfc;
}
.timeline-item > span {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
}
.timeline-item strong {
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.4;
}
.timeline-item small {
    font-size: 0.72rem;
}
.document-back {
    margin-top: 14px;
}
@media (max-width: 800px) {
    .document-head,
    .document-section,
    .related-docs {
        padding-left: 24px;
        padding-right: 24px;
    }
    .document-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .document-meta > div.meta-wide {
        grid-column: span 2;
    }
    .timeline-list {
        grid-template-columns: 1fr;
    }
    .document-amount-section .amount-summary {
        grid-template-columns: 1fr 1fr;
    }
    .document-amount-section .amount-summary > div {
        border-right: 0;
        border-bottom: 1px solid #e4e6ed;
    }
    .document-amount-section .amount-summary > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }
}
@media (max-width: 575.98px) {
    .document-head {
        display: block;
        padding: 22px 18px;
    }
    .document-identity {
        justify-items: start;
        margin-top: 20px;
        padding-top: 16px;
        border-top: 1px solid #e8eaf0;
        text-align: left;
    }
    .document-section {
        padding: 22px 18px;
    }
    .document-meta {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .document-meta > div.meta-wide {
        grid-column: auto;
    }
    .document-meta > div {
        min-height: 0;
        padding: 12px 14px;
    }
    .document-section-title {
        margin-bottom: 14px;
    }
    .document-card .document-table-wrap {
        border-radius: 8px;
    }
    .related-docs {
        display: block;
        padding: 16px 18px;
    }
    .related-docs nav {
        justify-content: flex-start;
        margin-top: 10px;
    }
    .related-docs a { width: 100%; }
    .document-amount-section .amount-summary {
        grid-template-columns: 1fr;
    }
    .document-amount-section .amount-summary > div {
        padding: 10px 0;
        border-bottom: 1px solid #e4e6ed;
    }
    .document-amount-section .amount-summary > div:nth-last-child(2) {
        border-bottom: 1px solid #e4e6ed;
    }
    .document-amount-section .amount-summary > div:last-child {
        border-bottom: 0;
    }
    .timeline-item {
        padding: 11px 12px;
    }
}
@media print {
    @page {
        size: A4;
        margin: 12mm;
    }
    body {
        background: #fff !important;
        font-size: 10pt;
    }
    .document-wrap {
        max-width: none;
    }
    .document-card {
        overflow: visible;
        border: 0 !important;
        border-radius: 0;
        box-shadow: none !important;
    }
    .document-head {
        padding: 0 0 7mm;
        background: #fff !important;
    }
    .document-section {
        padding: 6mm 0;
        border-color: #d9dce3;
    }
    .document-section-title {
        margin-bottom: 4mm;
    }
    .document-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2.5mm;
    }
    .document-meta > div {
        min-height: 17mm;
        padding: 3mm;
        border-color: #d9dce3;
        background: #fff !important;
    }
    .document-meta > div.meta-wide {
        grid-column: span 2;
    }
    .document-card .document-table-wrap {
        overflow: visible;
        border-color: #d9dce3;
    }
    .document-table {
        min-width: 0;
        width: 100%;
        font-size: 8.5pt;
    }
    .document-table thead th,
    .document-table tbody td,
    .document-table tfoot td {
        padding: 2.5mm 3mm;
    }
    .document-table thead {
        display: table-header-group;
    }
    .document-table tr,
    .document-meta > div,
    .timeline-item {
        break-inside: avoid;
    }
    .document-table .product-image-button,
    .document-table .product-thumb {
        display: none !important;
    }
    .document-table .product-cell {
        min-width: 0;
    }
    .document-amount-section {
        background: #fff !important;
    }
    .related-docs {
        padding: 5mm 0;
        background: #fff !important;
    }
    .timeline-list {
        grid-template-columns: 1fr;
        gap: 2.5mm;
    }
    .timeline-item {
        padding: 3mm;
        background: #fff !important;
    }
    .document-back {
        display: none !important;
    }
}
