:root {
    --navy-950: #0d1b2a;
    --navy-900: #132238;
    --navy-800: #1b304d;
    --blue-700: #0f4c81;
    --blue-600: #1769aa;
    --blue-500: #2b7bbb;
    --blue-100: #dceaf6;
    --blue-50: #f2f7fb;
    --ink-950: #152033;
    --ink-900: #202a3a;
    --ink-800: #344054;
    --ink-700: #475467;
    --ink-600: #5d697a;
    --ink-500: #788495;
    --ink-400: #98a2b3;
    --line-strong: #cfd7e3;
    --line: #dfe5ec;
    --line-soft: #edf1f5;
    --canvas: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #f2f4f7;
    --green-700: #157347;
    --green-50: #eef8f2;
    --amber-700: #9a6700;
    --amber-50: #fff8e7;
    --red-700: #b42318;
    --red-50: #fff4f3;
    --sidebar-w: 238px;
    --radius: 6px;
    --radius-lg: 8px;
    --shadow-card: 0 1px 2px rgba(16, 24, 40, .035);
    --shadow-dialog: 0 24px 60px rgba(15, 23, 42, .24);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: var(--canvas); }
body {
    margin: 0;
    color: var(--ink-900);
    background: var(--canvas);
    font-family: Calibri, Candara, "Segoe UI", Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.38;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-600); }
button, input, select, textarea { font-family: inherit; }
::selection { background: #d8e8f5; }
.text-mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 9pt; }
.amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ========================= Application shell ========================= */
.app-shell { display: flex; min-height: 100vh; }
.app-main {
    margin-left: var(--sidebar-w);
    min-width: 0;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.app-content {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 18px 22px 26px;
    flex: 1;
}

/* ========================= Sidebar ========================= */
.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    color: #fff;
    background: var(--navy-900);
    border-right: 1px solid #0d1a2b;
}
.app-sidebar::-webkit-scrollbar { width: 5px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); }
.brand-panel {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: #101f33;
}
.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 4px;
    color: #fff;
    background: transparent;
    font-size: 9pt;
    font-weight: 700;
    letter-spacing: .7px;
}
.brand-copy { min-width: 0; }
.brand-copy strong {
    display: block;
    color: #fff;
    font-size: 11pt;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: .05px;
}
.brand-copy span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.48);
    font-size: 7.8pt;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.side-nav { padding: 9px 0 14px; }
.side-group-label {
    padding: 16px 16px 6px;
    color: rgba(255,255,255,.37);
    font-size: 7.2pt;
    font-weight: 700;
    letter-spacing: .75px;
    text-transform: uppercase;
}
.side-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    margin: 0;
    padding: 8px 16px;
    border-left: 3px solid transparent;
    color: rgba(255,255,255,.69);
    font-size: 9.4pt;
    font-weight: 500;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.side-link:hover { color: #fff; background: rgba(255,255,255,.045); }
.side-link.active {
    color: #fff;
    background: rgba(255,255,255,.075);
    border-left-color: #6fb3e7;
    font-weight: 600;
}
.side-link.active::before { display: none; }
.side-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: grid;
    place-items: center;
    border-radius: 0;
    color: rgba(255,255,255,.62);
    background: transparent;
    font-size: 10pt;
}
.side-link.active .side-icon { color: #9ac9ec; background: transparent; }
.side-link-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-footer {
    margin-top: auto;
    padding: 13px 16px 16px;
    border-top: 1px solid rgba(255,255,255,.07);
    color: rgba(255,255,255,.42);
    font-size: 7.6pt;
}
.sidebar-system-row { display: flex; align-items: center; gap: 7px; }
.sidebar-system-sub { display: block; margin: 4px 0 0 13px; color: rgba(255,255,255,.27); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #56b887; }
.sidebar-backdrop { display: none; }

/* ========================= Topbar ========================= */
.app-topbar {
    min-height: 58px;
    position: sticky;
    top: 0;
    z-index: 1015;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 22px;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.page-heading { min-width: 0; }
.topbar-kicker {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-500);
    font-size: 7.5pt;
    line-height: 1;
    letter-spacing: .15px;
}
.topbar-kicker .bi { color: var(--blue-600); }
.topbar-title {
    margin: 4px 0 0;
    color: var(--ink-950);
    font-size: 14pt;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -.08px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: #fff;
    color: var(--ink-700);
}
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.topbar-role {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid #d7e3ee;
    border-radius: 4px;
    background: #f7fafc;
    color: var(--blue-700);
    font-size: 8.2pt;
    font-weight: 600;
}
.user-chip {
    min-width: 190px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 7px 4px 5px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    color: var(--ink-800);
    text-align: left;
}
.user-chip:hover { border-color: #c6d0dc; background: #fbfcfd; }
.user-avatar {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--navy-800);
    color: #fff;
    font-size: 9pt;
    font-weight: 700;
}
.user-chip-text { min-width: 0; flex: 1; }
.user-chip-text strong { display: block; font-size: 9pt; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-text span { display: block; margin-top: 3px; color: var(--ink-500); font-size: 7.5pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-caret { color: var(--ink-400); font-size: 7.5pt; }
.user-dropdown { min-width: 205px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px rgba(15,23,42,.12); }
.user-dropdown .dropdown-header { color: var(--ink-500); font-size: 7.8pt; }
.user-dropdown .dropdown-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 4px; font-size: 9pt; }

/* ========================= Footer ========================= */
.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 22px;
    border-top: 1px solid var(--line);
    color: var(--ink-500);
    background: #fff;
    font-size: 7.7pt;
}

/* ========================= Alerts ========================= */
.app-alert {
    border: 1px solid var(--line);
    border-left-width: 3px;
    border-radius: 5px;
    box-shadow: none;
    font-size: 9.2pt;
}

/* ========================= Buttons ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 4px;
    font-size: 9.2pt;
    font-weight: 600;
    line-height: 1.1;
    box-shadow: none !important;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { transform: none; }
.btn-primary { border-color: var(--blue-700); background: var(--blue-700); color: #fff; }
.btn-primary:hover, .btn-primary:focus { border-color: #0c416f; background: #0c416f; color: #fff; }
.btn-outline-primary { color: var(--blue-700); border-color: #a9c4dc; background: #fff; }
.btn-outline-primary:hover { color: #fff; border-color: var(--blue-700); background: var(--blue-700); }
.btn-outline-secondary { color: var(--ink-700); border-color: var(--line-strong); background: #fff; }
.btn-outline-secondary:hover { color: var(--ink-900); background: var(--surface-muted); border-color: #bdc8d5; }
.btn-outline-danger { color: var(--red-700); border-color: #e3b7b2; background: #fff; }
.btn-outline-danger:hover { color: #fff; background: var(--red-700); border-color: var(--red-700); }
.btn-soft-primary { color: var(--blue-700); background: var(--blue-50); border: 1px solid #c5d9e9; }
.btn-soft-primary:hover { color: var(--blue-700); background: #e6f0f8; border-color: #afcbe1; }
.btn-sm { min-height: 28px; padding: 4px 7px; font-size: 8.5pt; border-radius: 4px; }
.btn-lg { min-height: 40px; padding: 8px 14px; font-size: 9.8pt; }

/* ========================= Cards / data workspaces ========================= */
.content-card {
    position: relative;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.content-card.table-card, .table-workspace { overflow: visible; }
.card-head {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.card-head > div { min-width: 0; }
.card-head h2 { margin: 0; color: var(--ink-950); font-size: 12pt; line-height: 1.15; font-weight: 700; }
.card-head p { margin: 4px 0 0; color: var(--ink-500); font-size: 8.6pt; line-height: 1.3; }
.card-kicker { margin-bottom: 3px; color: var(--blue-700); font-size: 7.1pt; font-weight: 700; letter-spacing: .55px; text-transform: uppercase; }
.readonly-badge, .count-pill, .movement-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    background: #f8fafc;
    color: var(--ink-700);
    font-size: 7.8pt;
    font-weight: 600;
    white-space: nowrap;
}

/* ========================= Forms ========================= */
.form-label { margin-bottom: 5px; color: var(--ink-700); font-size: 8.8pt; font-weight: 600; }
.form-label.required::after, [data-district-assignment-label].required::after { content: " *"; color: var(--red-700); }
.form-control, .form-select, .input-group-text {
    min-height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: var(--ink-900);
    background-color: #fff;
    font-size: 9.4pt;
    line-height: 1.2;
}
.form-control, .form-select { padding: 6px 9px; }
.form-select { padding-right: 31px; }
.form-control::placeholder { color: #a0aaba; }
.form-control:focus, .form-select:focus { border-color: #6a9fc8; box-shadow: 0 0 0 2px rgba(23,105,170,.10); }
.form-control[readonly], .form-control:disabled, .form-select:disabled { color: var(--ink-600); background: #f3f5f7; border-color: #d9e0e8; opacity: 1; }
.form-text { margin-top: 4px; color: var(--ink-500); font-size: 7.6pt; }
textarea.form-control { min-height: 72px; resize: vertical; }
.input-group-text { color: var(--ink-500); background: #f7f9fb; border-right: 0; }
.input-group .input-group-text + .form-control { border-left: 0; }
.form-section-title { margin: 18px 0 9px; color: var(--ink-800); font-size: 9.2pt; font-weight: 700; }
.field-with-icon { position: relative; }
.field-with-icon > i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 2; color: var(--ink-500); }
.field-with-icon > .form-control { padding-left: 30px; }
.form-section {
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.form-section + .form-section { margin-top: 13px; }
.form-section-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 13px; }
.form-section-head.compact { margin-bottom: 12px; }
.section-title-wrap { display: flex; align-items: center; gap: 9px; min-width: 0; }
.section-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    border: 1px solid #d4dee8;
    border-radius: 4px;
    color: var(--blue-700);
    background: #f7fafc;
    font-size: 9.5pt;
}
.form-section-head h3 { margin: 0; color: var(--ink-900); font-size: 10pt; font-weight: 700; }
.form-section-head p { margin: 2px 0 0; color: var(--ink-500); font-size: 8pt; }

/* ========================= Modal form workspaces ========================= */
body.record-form-open { overflow: hidden; }
.record-form-backdrop { position: fixed; inset: 0; z-index: 1060; background: rgba(13, 27, 42, .48); }
.record-form-card {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1065;
    width: min(860px, calc(100vw - 40px));
    max-height: 88vh;
    margin: 0;
    transform: translate(-50%, -50%);
    border: 1px solid #cdd6e1;
    border-radius: 8px;
    box-shadow: var(--shadow-dialog);
    overflow: hidden;
    background: #fff;
}
.record-form-card.stock-document-dialog { width: min(1260px, calc(100vw - 36px)); max-height: 94vh; }
.record-form-card > .card-head {
    position: relative;
    min-height: 66px;
    padding: 13px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.record-form-card > .card-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--blue-700);
}
.record-form-card > .card-head h2 { color: var(--ink-950); font-size: 12.5pt; }
.record-form-card > .card-head p { color: var(--ink-500); }
.record-form-card > form:not(.stock-document-form) {
    max-height: calc(88vh - 66px);
    overflow: auto;
    padding: 17px 18px 0;
    background: #fff;
}
.modal-card-head { min-height: 68px !important; }
.modal-title-block { display: flex; align-items: center; gap: 10px; }
.modal-title-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid #c9d8e5;
    border-radius: 4px;
    color: var(--blue-700);
    background: var(--blue-50);
    font-size: 10.5pt;
}
.modal-kicker { margin-bottom: 2px; color: var(--blue-700); font-size: 7pt; font-weight: 700; letter-spacing: .55px; text-transform: uppercase; }
.record-dialog-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: #fff;
    color: var(--ink-600);
}
.record-dialog-close:hover { background: #f4f6f8; color: var(--ink-900); }
.stock-document-form { display: flex; flex-direction: column; min-height: 0; max-height: calc(94vh - 68px); background: #f7f8fa; }
.modal-form-body { padding: 14px; overflow-y: auto; overscroll-behavior: contain; }
.record-form-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    margin: 18px -18px 0;
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid var(--line);
}
.record-form-footer .btn:first-child { margin-right: auto; }
.record-form-footer .btn:last-child { margin-left: auto; }
.stock-document-form > .record-form-footer { margin: 0; flex: 0 0 auto; }
.record-form-footer .btn { min-width: 106px; }

/* ========================= Multi-product document lines ========================= */
.product-lines-section { padding: 0; overflow: hidden; }
.product-lines-section > .form-section-head { margin: 0; padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.line-items-wrap { overflow-x: auto; background: #fff; }
.line-items-table { width: 100%; min-width: 790px; border-collapse: collapse; }
.line-items-table thead th {
    padding: 8px 9px;
    color: #eaf0f6;
    background: #2a3e57;
    border-right: 1px solid rgba(255,255,255,.07);
    border-bottom: 1px solid #203248;
    font-size: 7.8pt;
    font-weight: 600;
    letter-spacing: .2px;
    text-transform: uppercase;
    white-space: nowrap;
}
.line-items-table tbody td { padding: 7px 7px; vertical-align: middle; border-bottom: 1px solid var(--line-soft); background: #fff; }
.line-items-table tbody tr:nth-child(even) td { background: #fbfcfd; }
.line-items-table tbody tr:hover td { background: #f5f9fc; }
.line-items-table .form-control, .line-items-table .form-select { min-height: 34px; font-size: 9pt; border-radius: 3px; }
.line-items-table .line-no-col { width: 42px; text-align: center; }
.line-items-table .qty-col { width: 130px; }
.line-items-table .money-col { width: 145px; }
.line-items-table .line-action-col { width: 46px; }
.line-no { text-align: center; color: var(--ink-500); font-weight: 600; }
.line-remove-btn {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border: 1px solid #e0c3c0;
    border-radius: 3px;
    color: var(--red-700);
    background: #fff;
}
.line-remove-btn:hover { color: #fff; background: var(--red-700); border-color: var(--red-700); }
.product-line-select.is-duplicate { border-color: var(--red-700) !important; box-shadow: 0 0 0 2px rgba(180,35,24,.08) !important; }
.line-items-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    padding: 9px 12px;
    border-top: 1px solid var(--line);
    background: #f7f9fb;
}
.add-line-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 2px;
    border: 0;
    background: transparent;
    color: var(--blue-700);
    font-size: 8.8pt;
    font-weight: 600;
}
.add-line-link:hover { color: var(--blue-600); }
.summary-metrics { display: flex; align-items: stretch; gap: 0; border: 1px solid #d8e0e8; border-radius: 4px; overflow: hidden; background: #fff; }
.summary-metrics > div { min-width: 108px; padding: 7px 11px; border-left: 1px solid #e2e7ed; text-align: right; }
.summary-metrics > div:first-child { border-left: 0; }
.summary-metrics span { display: block; color: var(--ink-500); font-size: 7.2pt; text-transform: uppercase; letter-spacing: .3px; }
.summary-metrics strong { display: block; margin-top: 2px; color: var(--ink-900); font-size: 10pt; font-variant-numeric: tabular-nums; }
.summary-metrics .grand-total { min-width: 135px; background: var(--navy-900); }
.summary-metrics .grand-total span { color: rgba(255,255,255,.58); }
.summary-metrics .grand-total strong { color: #fff; }
.product-summary { display: block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========================= DataTables ========================= */
.table-responsive { overflow-x: auto; overflow-y: visible; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.table-card .table-responsive { border-top: 0; }
.table { margin: 0; color: var(--ink-800); font-size: 8.9pt; }
.table > :not(caption) > * > * { padding: 8px 9px; box-shadow: none; }
.app-datatable thead tr:first-child th {
    color: #334155;
    background: #eef2f6;
    border-top: 0;
    border-bottom: 1px solid #cfd7e3;
    font-size: 7.8pt;
    font-weight: 700;
    letter-spacing: .2px;
    /* text-transform: uppercase; */
    white-space: nowrap;
}
.app-datatable thead tr.filters th { padding: 5px 6px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.column-filter {
    width: 100%;
    min-width: 70px;
    height: 28px;
    padding: 4px 6px;
    border: 1px solid #d6dee8;
    border-radius: 3px;
    background: #fff;
    color: var(--ink-700);
    font-size: 8pt;
    outline: 0;
}
.column-filter:focus { border-color: #86add0; box-shadow: 0 0 0 2px rgba(23,105,170,.08); }
.app-datatable tbody td { border-bottom: 1px solid #edf0f3; vertical-align: middle; }
.app-datatable tbody tr:nth-child(even) td { background: #fcfdfe; }
.app-datatable tbody tr:hover td { background: #f3f7fa; }
.app-datatable tbody tr:last-child td { border-bottom: 0; }
.action-cell { white-space: nowrap; text-align: right; }
.inline-delete { display: inline-flex; margin-left: 3px; }
.dataTables_wrapper { padding: 0; }
.dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.dt-toolbar-left, .dt-toolbar-right { display: flex; align-items: center; gap: 7px; }
.dt-toolbar-right { margin-left: auto; }
.dt-buttons { display: inline-flex; gap: 4px; }
.dt-buttons .btn-export {
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid var(--line-strong) !important;
    border-radius: 3px !important;
    background: #fff !important;
    color: var(--ink-700) !important;
    font-size: 8.2pt !important;
    font-weight: 600 !important;
}
.dt-buttons .btn-export:hover { background: #f3f5f7 !important; border-color: #bdc7d4 !important; }
.dataTables_filter { margin: 0 !important; }
.dataTables_filter label { margin: 0; position: relative; }
.dataTables_filter label::before { content: "\F52A"; font-family: "bootstrap-icons"; position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--ink-400); pointer-events: none; }
.dataTables_filter input {
    width: 205px !important;
    min-height: 30px;
    margin: 0 !important;
    padding: 4px 8px 4px 28px !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: 3px !important;
    font-size: 8.4pt !important;
}
.dataTables_length { margin: 0; }
.dataTables_length label { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--ink-500); font-size: 8pt; }
.dataTables_length select { min-height: 30px; padding: 3px 25px 3px 7px; border: 1px solid var(--line-strong); border-radius: 3px; font-size: 8.2pt; }
.dt-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 9px 12px; border-top: 1px solid var(--line); background: #fff; }
.dataTables_info { padding: 0 !important; color: var(--ink-500); font-size: 8pt; }
.dataTables_paginate { padding: 0 !important; }
.dataTables_paginate .pagination { gap: 2px; margin: 0; }
.dataTables_paginate .page-link { min-width: 29px; height: 29px; display: grid; place-items: center; padding: 3px 6px; border: 1px solid var(--line-strong); color: var(--ink-700); background: #fff; font-size: 8pt; }
.dataTables_paginate .page-item.active .page-link { border-color: var(--blue-700); background: var(--blue-700); color: #fff; }
.dataTables_paginate .page-item.disabled .page-link { color: #adb5bf; background: #f7f8fa; }

/* ========================= Dashboard ========================= */
.dashboard-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
    padding: 4px 0 15px;
    color: var(--ink-900);
    background: transparent;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
.dashboard-hero::after { display: none; }
.dashboard-hero-copy, .dashboard-quick { position: static; z-index: auto; }
.dashboard-hero-eyebrow { margin-bottom: 5px; color: var(--blue-700); font-size: 7.3pt; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.dashboard-hero h2 { max-width: 760px; margin: 0; color: var(--ink-950); font-size: 16pt; line-height: 1.1; font-weight: 700; letter-spacing: -.1px; }
.dashboard-hero p { max-width: 760px; margin: 6px 0 0; color: var(--ink-500); font-size: 8.8pt; }
.hero-meta-row { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 9px; }
.hero-meta { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-600); font-size: 8pt; }
.hero-meta .bi { color: var(--blue-600); }
.dashboard-quick { align-self: auto; padding-left: 0; border-left: 0; }
.dashboard-quick-title { margin-bottom: 6px; color: var(--ink-500); font-size: 7.2pt; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; text-align: right; }
.quick-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.quick-action {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    color: var(--ink-700);
    background: #fff;
    font-size: 8.5pt;
    font-weight: 600;
}
.quick-action:hover { color: var(--blue-700); border-color: #a9bfd4; background: #f8fbfd; }
.quick-action i { color: var(--blue-700); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi-card {
    position: relative;
    min-height: 104px;
    padding: 13px 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow-card);
}
.kpi-card:hover { transform: none; box-shadow: var(--shadow-card); }
.kpi-card::after { display: none; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { color: var(--ink-500); font-size: 7.6pt; font-weight: 700; letter-spacing: .35px; }
.kpi-icon {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 1px solid #d8e2eb;
    border-radius: 4px;
    color: var(--blue-700);
    background: #f7fafc;
    font-size: 9pt;
}
.kpi-value { margin-top: 8px; color: var(--ink-950); font-size: 18pt; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-meta { margin-top: 6px; color: var(--ink-500); font-size: 7.8pt; }
.kpi-meta strong { color: var(--ink-700); font-weight: 600; }

/* ========================= Login ========================= */
.login-page { min-height: 100vh; background: #eef2f6; }
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 42%) 1fr;
}
.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: 40px 44px;
    color: #fff;
    background: var(--navy-900);
    overflow: hidden;
}
.login-visual::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 5px;
    background: var(--blue-500);
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.login-brand .brand-mark { border-color: rgba(255,255,255,.28); }
.login-brand strong { display: block; font-size: 11pt; }
.login-brand span { display: block; margin-top: 4px; color: rgba(255,255,255,.48); font-size: 8pt; }
.login-copy { position: relative; z-index: 1; max-width: 560px; margin: auto 0; padding: 50px 0; }
.login-copy .eyebrow, .eyebrow { margin-bottom: 8px; color: #8ebee3; font-size: 7.5pt; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.login-copy h1 { max-width: 530px; margin: 0; font-size: 26pt; line-height: 1.08; font-weight: 700; letter-spacing: -.35px; }
.login-copy p { max-width: 525px; margin: 14px 0 0; color: rgba(255,255,255,.62); font-size: 10pt; line-height: 1.55; }
.login-stat-row { position: relative; z-index: 1; display: flex; gap: 24px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.11); }
.login-stat { min-width: 90px; }
.login-stat strong { display: block; color: #fff; font-size: 10pt; font-weight: 700; }
.login-stat span { display: block; margin-top: 3px; color: rgba(255,255,255,.40); font-size: 7.5pt; }
.login-form-panel {
    width: min(390px, calc(100vw - 40px));
    margin: auto;
    padding: 30px 32px;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15,23,42,.07);
}
.login-form-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--blue-700); font-size: 8pt; font-weight: 600; }
.login-form-panel h2 { margin: 0; color: var(--ink-950); font-size: 16pt; font-weight: 700; }
.login-form-panel > p { margin: 6px 0 20px; color: var(--ink-500); font-size: 9pt; }
.login-submit { margin-top: 6px; }
.login-footer-note { margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--line-soft); color: var(--ink-500); font-size: 7.8pt; text-align: center; }

/* ========================= Setup / upgrade ========================= */
.upgrade-page { min-height: 100vh; background: var(--canvas); }
.upgrade-shell { width: min(720px, calc(100vw - 36px)); margin: 56px auto; }
.upgrade-card { padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-card); }
.upgrade-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #c9d8e5; border-radius: 5px; color: var(--blue-700); background: var(--blue-50); font-size: 15pt; }
.upgrade-kicker { margin-top: 15px; color: var(--blue-700); font-size: 7.3pt; font-weight: 700; letter-spacing: .65px; text-transform: uppercase; }
.upgrade-card h1 { margin: 5px 0 7px; color: var(--ink-950); font-size: 18pt; }
.upgrade-lead { color: var(--ink-500); }
.upgrade-checks { padding: 13px 15px; border: 1px solid var(--line); border-radius: 5px; background: #f8fafc; }

/* ========================= Responsive ========================= */
@media (max-width: 1300px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    :root { --sidebar-w: 238px; }
    .app-main { margin-left: 0; }
    .app-sidebar { transform: translateX(-100%); transition: transform .18s ease; box-shadow: 12px 0 28px rgba(15,23,42,.18); }
    .app-sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; display: block; visibility: hidden; opacity: 0; background: rgba(13,27,42,.45); transition: opacity .18s; }
    .sidebar-backdrop.open { visibility: visible; opacity: 1; }
    .app-content { padding: 15px; }
    .app-topbar { padding: 8px 15px; }
    .dashboard-hero { align-items: flex-start; flex-direction: column; }
    .dashboard-quick-title { text-align: left; }
    .quick-actions { justify-content: flex-start; }
    .record-form-card { width: min(920px, calc(100vw - 22px)); max-height: 94vh; }
    .record-form-card.stock-document-dialog { width: calc(100vw - 18px); max-height: 96vh; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { min-height: 330px; padding: 28px; }
    .login-copy { padding: 42px 0 30px; }
    .login-copy h1 { font-size: 21pt; }
    .login-form-panel { margin: 34px auto; }
}
@media (max-width: 700px) {
    .topbar-role { display: none; }
    .user-chip { min-width: 0; }
    .user-chip-text { display: none; }
    .kpi-grid { grid-template-columns: 1fr; }
    .quick-actions { width: 100%; }
    .quick-action { flex: 1 1 calc(50% - 6px); }
    .dt-toolbar, .dt-footer { align-items: stretch; flex-direction: column; }
    .dt-toolbar-left, .dt-toolbar-right { width: 100%; flex-wrap: wrap; }
    .dataTables_filter { flex: 1; }
    .dataTables_filter label, .dataTables_filter input { width: 100% !important; }
    .summary-metrics { width: 100%; }
    .line-items-summary { align-items: stretch; flex-direction: column; }
    .record-form-footer { padding: 9px 12px; }
    .app-footer { align-items: flex-start; flex-direction: column; }
    .login-stat-row { gap: 14px; }
}

/* Dashboard two-column operating view */
.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: start;
}
.dashboard-layout .content-card { margin-bottom: 0; }
.dashboard-stock-card { min-width: 0; }
.ops-panel { overflow: hidden; }
.ops-list { padding: 0; }
.ops-row {
    display: grid;
    grid-template-columns: 30px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 10px 13px;
    color: var(--ink-800);
    border-bottom: 1px solid var(--line-soft);
    background: #fff;
}
.ops-row:last-child { border-bottom: 0; }
.ops-row:hover { color: var(--ink-900); background: #f8fafc; }
.ops-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #d7e0e8;
    border-radius: 4px;
    color: var(--blue-700);
    background: #f7fafc;
    font-size: 9pt;
}
.ops-copy { min-width: 0; }
.ops-copy strong { display: block; color: var(--ink-800); font-size: 8.8pt; font-weight: 600; }
.ops-copy small { display: block; margin-top: 2px; color: var(--ink-500); font-size: 7.5pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-value { min-width: 36px; color: var(--ink-950); font-size: 12pt; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1180px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .ops-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .ops-row:nth-child(odd) { border-right: 1px solid var(--line-soft); }
}
@media (max-width: 700px) {
    .ops-list { grid-template-columns: 1fr; }
    .ops-row:nth-child(odd) { border-right: 0; }
}

/* ========================= v6 top-navigation refinement ========================= */
.app-shell { display: block; min-height: 100vh; }
.app-main { margin-left: 0; width: 100%; min-height: 100vh; }

.app-topbar {
    min-height: 60px;
    padding: 8px 22px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}
.topbar-left { gap: 10px; }
.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-900);
}
.topbar-brand:hover { color: var(--ink-900); }
.topbar-brand-mark {
    width: 38px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--navy-900);
    color: #fff;
    font-size: 9pt;
    font-weight: 700;
    letter-spacing: .55px;
}
.topbar-brand-copy { min-width: 0; }
.topbar-brand-copy strong {
    display: block;
    color: var(--ink-950);
    font-size: 10.5pt;
    line-height: 1.05;
    font-weight: 700;
}
.topbar-brand-copy span {
    display: block;
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 7.5pt;
    line-height: 1;
}
.nav-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: #fff;
    color: var(--ink-700);
    font-size: 12pt;
}
.user-chip { min-width: 230px; }
.user-chip-text span { font-size: 7.7pt; }
.profile-summary { padding: 8px 9px 7px; }
.profile-summary-name { display: block; color: var(--ink-900); font-size: 9pt; font-weight: 700; }
.profile-summary-meta { display: block; margin-top: 2px; color: var(--ink-500); font-size: 7.8pt; }

.app-navigation {
    position: sticky;
    top: 60px;
    z-index: 1010;
    min-height: 44px;
    background: var(--navy-900);
    border-bottom: 1px solid #0b1725;
}
.navigation-inner {
    width: 100%;
    max-width: 1720px;
    min-height: 44px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: stretch;
    gap: 1px;
}
.top-nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,.72);
    font-size: 9pt;
    font-weight: 600;
    white-space: nowrap;
}
button.top-nav-link { appearance: none; }
.top-nav-link:hover,
.top-nav-link:focus,
.top-nav-link.show {
    color: #fff;
    background: rgba(255,255,255,.055);
}
.top-nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.075);
    border-bottom-color: #78b9e7;
}
.top-nav-link .bi { color: #9dc8e7; font-size: 9.5pt; }
.top-nav-link.dropdown-toggle::after { margin-left: 2px; opacity: .65; }
.nav-dropdown { display: flex; }
.nav-dropdown-menu {
    min-width: 235px;
    margin-top: 0 !important;
    padding: 5px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 12px 26px rgba(15,23,42,.14);
}
.nav-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 3px;
    color: var(--ink-700);
    font-size: 8.8pt;
}
.nav-dropdown-menu .dropdown-item .bi { width: 17px; color: var(--ink-500); text-align: center; }
.nav-dropdown-menu .dropdown-item:hover { color: var(--blue-700); background: var(--blue-50); }
.nav-dropdown-menu .dropdown-item.active { color: var(--blue-700); background: #eaf3fa; font-weight: 600; }

/* Cleaner screen headers after removing descriptive notes. */
.card-head { min-height: 54px; padding: 11px 14px; }
.record-form-card > .card-head { min-height: 56px; }
.modal-card-head { min-height: 56px !important; }
.stock-document-form { max-height: calc(94vh - 56px); }

/* DataTable heading and filter alignment. */
.app-datatable thead th { text-align: center !important; vertical-align: middle !important; }
.app-datatable thead tr.filters th { padding: 3px 5px; }
.column-filter {
    height: 23px;
    min-height: 23px;
    padding: 1px 5px;
    font-size: 7.5pt;
    line-height: 1.05;
    text-align: center;
}
.column-filter::placeholder { color: #9aa5b3; }

/* Native calendar fields; posted values remain ISO YYYY-MM-DD. */
input[type="date"].form-control { cursor: pointer; }
input[type="date"].form-control::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .68; }

/* Stock transfer line availability is display-only. */
.line-items-table.with-availability { min-width: 940px; }
.line-items-table .available-col { width: 125px; text-align: right; }
.line-available-qty {
    color: #17603a !important;
    background: #f0f8f4 !important;
    border-color: #cfe5d8 !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.form-control.is-stock-short {
    border-color: var(--red-700) !important;
    box-shadow: 0 0 0 2px rgba(180,35,24,.08) !important;
    background: var(--red-50) !important;
}

@media (max-width: 991.98px) {
    .app-topbar { padding: 8px 14px; }
    .app-navigation { display: none; top: 60px; }
    .app-navigation.open { display: block; }
    .navigation-inner {
        padding: 6px 12px 8px;
        flex-direction: column;
        align-items: stretch;
    }
    .nav-dropdown { display: block; }
    .top-nav-link { width: 100%; min-height: 38px; justify-content: flex-start; border-bottom-width: 0; border-left: 3px solid transparent; }
    .top-nav-link.active { border-left-color: #78b9e7; }
    .nav-dropdown-menu { position: static !important; transform: none !important; width: 100%; border: 0; border-radius: 3px; box-shadow: none; }
}
@media (max-width: 700px) {
    .user-chip { min-width: 0; }
    .topbar-brand-copy span { display: none; }
}


/* ========================= v7 branding + fixed system footer ========================= */
.topbar-brand-mark {
    width: 48px;
    height: 38px;
    padding: 2px 4px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d8e1ea;
    border-radius: 4px;
    background: #ffffff;
    color: inherit;
    letter-spacing: normal;
}
.topbar-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.topbar-brand-copy strong {
    max-width: min(48vw, 420px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-brand-copy span {
    font-size: 8pt;
    font-weight: 600;
    letter-spacing: .08px;
}

/* Fixed bottom system bar; content clearance prevents overlap. */
.app-content {
    padding-bottom: 66px;
}
.app-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1015;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 22px;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.98);
    color: var(--ink-500);
    box-shadow: 0 -2px 10px rgba(15,23,42,.04);
    font-size: 8pt;
    line-height: 1.15;
}
.app-footer span:last-child {
    margin-left: auto;
    color: var(--ink-600);
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .topbar-brand-copy strong { max-width: 46vw; }
    .app-content { padding-bottom: 70px; }
}
@media (max-width: 700px) {
    .topbar-brand-mark { width: 42px; height: 34px; }
    .topbar-brand-copy strong { max-width: 42vw; font-size: 9pt; }
    .topbar-brand-copy span { display: none; }
    .app-footer { padding: 7px 12px; gap: 8px; font-size: 7.2pt; }
    .app-footer span:first-child { min-width: 0; }
}

/* ========================= v7.1 professional RSPN logo lockup ========================= */
.topbar-brand {
    gap: 12px;
}
.topbar-brand-mark {
    flex: 0 0 auto;
    width: 66px;
    height: 42px;
    padding: 5px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #d7dee7;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), inset 0 0 0 1px rgba(255,255,255,.65);
}
.topbar-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 52px;
    max-height: 30px;
    object-fit: contain;
    object-position: center;
    transform: none;
    filter: none;
}
@media (max-width: 700px) {
    .topbar-brand { gap: 9px; }
    .topbar-brand-mark {
        width: 56px;
        height: 36px;
        padding: 4px 6px;
        border-radius: 5px;
    }
    .topbar-brand-mark img {
        max-width: 44px;
        max-height: 26px;
    }
}

/* ========================= v7.2 logo containment + guaranteed fixed footer ========================= */
/* Critical branding geometry. The logo is always contained inside the tile and can never escape it. */
.topbar-brand {
    gap: 11px;
}
.topbar-brand-mark {
    position: relative !important;
    flex: 0 0 58px !important;
    width: 58px !important;
    height: 42px !important;
    min-width: 58px !important;
    min-height: 42px !important;
    max-width: 58px !important;
    max-height: 42px !important;
    padding: 6px 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border: 1px solid #d6dee8 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06) !important;
    line-height: 0 !important;
}
.topbar-brand-mark img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 44px !important;
    height: 25px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 44px !important;
    max-height: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    filter: none !important;
}

/* The footer is a viewport-level system bar, not part of document flow. */
.app-footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 1045 !important;
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 22px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    overflow: hidden !important;
    border-top: 1px solid #dfe5ec !important;
    background: #ffffff !important;
    color: #5d697a !important;
    box-shadow: 0 -2px 8px rgba(15, 23, 42, .055) !important;
    font-size: 8pt !important;
    line-height: 1 !important;
    transform: none !important;
}
.app-footer span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-footer span:last-child {
    flex: 0 0 auto;
    margin-left: auto !important;
    color: #475467 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}
.app-content {
    padding-bottom: 58px !important;
}

@media (max-width: 700px) {
    .topbar-brand-mark {
        flex-basis: 50px !important;
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding: 5px 6px !important;
    }
    .topbar-brand-mark img {
        width: 38px !important;
        height: 22px !important;
        max-width: 38px !important;
        max-height: 22px !important;
    }
    .app-footer {
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 12px !important;
        gap: 8px !important;
        font-size: 7.2pt !important;
    }
    .app-content { padding-bottom: 56px !important; }
}


/* ========================= Compact application chrome =========================
   Scope intentionally limited to Topbar, Navigation Bar and Bottom Bar heights.
   No form, table, font, business logic or content styling is changed.
============================================================================= */
.app-topbar {
    min-height: 54px;
    padding: 5px 20px;
}

.topbar-brand-mark {
    flex-basis: 52px !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 5px 6px !important;
}

.topbar-brand-mark img {
    width: 40px !important;
    height: 23px !important;
    max-width: 40px !important;
    max-height: 23px !important;
}

.app-navigation {
    top: 54px;
    min-height: 40px;
}

.navigation-inner {
    min-height: 40px;
    padding-left: 20px;
    padding-right: 20px;
}

.top-nav-link {
    min-height: 40px;
    padding-left: 14px;
    padding-right: 14px;
}

.app-footer {
    height: 34px !important;
    min-height: 34px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.app-content {
    padding-bottom: 52px !important;
}

@media (max-width: 991.98px) {
    .app-topbar {
        min-height: 54px;
        padding: 5px 14px;
    }

    .app-navigation {
        top: 54px;
    }
}

@media (max-width: 700px) {
    .topbar-brand-mark {
        flex-basis: 48px !important;
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 4px 5px !important;
    }

    .topbar-brand-mark img {
        width: 37px !important;
        height: 21px !important;
        max-width: 37px !important;
        max-height: 21px !important;
    }

    .app-footer {
        height: 34px !important;
        min-height: 34px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .app-content {
        padding-bottom: 50px !important;
    }
}


/* ========================= Compact DataTable body rows =========================
   Scope intentionally limited to DataTable body rows and row action buttons.
   Headings, filters, forms and all other application controls remain unchanged.
============================================================================= */
.app-datatable tbody td {
    padding: 4px 8px !important;
    line-height: 1.15;
}

.app-datatable tbody .action-cell {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

.app-datatable tbody .btn-sm {
    min-height: 22px;
    height: 22px;
    padding: 2px 6px;
    gap: 3px;
    border-radius: 3px;
    font-size: 7.8pt;
    line-height: 1;
}

.app-datatable tbody .inline-delete {
    margin-left: 2px;
}

.app-datatable tbody .count-pill,
.app-datatable tbody .movement-badge,
.app-datatable tbody .readonly-badge {
    padding: 2px 6px;
    gap: 4px;
    font-size: 7.5pt;
    line-height: 1.05;
}

/* ========================= Compact primary/form/export buttons =========================
   Scope intentionally limited to DataTable export controls, record-list Add/New buttons,
   and modal/form Save/Cancel actions. Other buttons and application components unchanged.
======================================================================================== */
.dt-buttons .btn-export {
    min-height: 24px !important;
    height: 24px !important;
    padding: 2px 6px !important;
    gap: 3px !important;
    font-size: 7.8pt !important;
    line-height: 1 !important;
}

.content-card > .card-head > .btn.btn-primary {
    min-height: 26px !important;
    height: 26px !important;
    padding: 3px 8px !important;
    gap: 4px !important;
    font-size: 8.2pt !important;
    line-height: 1 !important;
}

.record-form-footer .btn {
    min-height: 26px !important;
    height: 26px !important;
    min-width: 88px !important;
    padding: 3px 9px !important;
    gap: 4px !important;
    font-size: 8.2pt !important;
    line-height: 1 !important;
}

/* ========================= Compact DataTable toolbar inputs =========================
   Scope intentionally limited to the DataTable toolbar search field and page-length
   selector so they match the already-compact export controls.
==================================================================================== */
.dataTables_filter label::before {
    left: 7px !important;
}

.dataTables_filter input {
    min-height: 24px !important;
    height: 24px !important;
    padding: 2px 6px 2px 24px !important;
    font-size: 7.8pt !important;
    line-height: 1 !important;
}

.dataTables_length label {
    gap: 0 !important;
    font-size: 7.8pt !important;
    line-height: 1 !important;
}

.dataTables_length select {
    min-height: 24px !important;
    height: 24px !important;
    padding: 2px 23px 2px 6px !important;
    font-size: 7.8pt !important;
    line-height: 1 !important;
}

/* ========================= Compact entry-form header and footer =========================
   Scope intentionally limited to modal entry-form chrome. Form body/fields and behavior
   remain unchanged.
========================================================================================= */
.record-form-card > .card-head,
.modal-card-head {
    min-height: 46px !important;
    padding: 7px 12px !important;
}

.modal-title-block {
    gap: 8px !important;
}

.modal-title-icon {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    font-size: 9pt !important;
}

.modal-kicker {
    margin-bottom: 0 !important;
}

.record-dialog-close {
    top: 9px !important;
    right: 10px !important;
    width: 26px !important;
    height: 26px !important;
}

.stock-document-form {
    max-height: calc(94vh - 46px) !important;
}

.record-form-footer {
    min-height: 42px !important;
    margin-top: 12px !important;
    padding: 6px 12px !important;
    gap: 8px !important;
}

.stock-document-form > .record-form-footer {
    margin: 0 !important;
}


/* ========================= Stock document refinements v8 ========================= */
.product-lines-section > .form-section-head {
    position: relative;
    justify-content: center;
}
.product-lines-section > .form-section-head .section-title-wrap {
    justify-content: center;
    text-align: center;
}
.product-lines-section > .form-section-head > [data-add-line] {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}
.line-items-table tfoot td {
    height: 38px;
    padding: 6px 9px;
    background: #f7f9fb;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}
.line-items-table tfoot .line-grand-total-cell {
    color: var(--ink-900);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-size: 8.5pt;
    font-weight: 600;
}
.line-items-table tfoot .line-grand-total-cell strong {
    font-size: 9.2pt;
    font-weight: 700;
}

@media (max-width: 700px) {
    .product-lines-section > .form-section-head {
        justify-content: flex-start;
        padding-right: 120px;
    }
    .product-lines-section > .form-section-head .section-title-wrap { text-align: left; }
}

/* ========================= Stock product header alignment v8.1 =========================
   Applies to Stock Receiving, Store-to-Store and Store-to-CRP via shared line editor.
============================================================================= */
.product-lines-section > .form-section-head {
    justify-content: space-between !important;
}

.product-lines-section > .form-section-head .section-title-wrap {
    justify-content: flex-start !important;
    text-align: left !important;
}

.product-lines-section > .form-section-head > [data-add-line] {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    margin-left: auto;
}

.line-items-table thead th {
    text-align: center !important;
    vertical-align: middle !important;
}

@media (max-width: 700px) {
    .product-lines-section > .form-section-head {
        justify-content: space-between !important;
        padding-right: 14px !important;
    }
}

/* ========================= v8.8 clean operational dashboard ========================= */
.dashboard-filter-card {
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: var(--shadow-card);
}

.dashboard-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.dashboard-filter-field {
    min-width: 0;
}

.dashboard-filter-field label {
    display: block;
    margin-bottom: 4px;
    color: var(--ink-600);
    font-size: 8pt;
    font-weight: 600;
}

.dashboard-filter-field .form-control,
.dashboard-filter-field .form-select {
    min-height: 30px;
    height: 30px;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 8.5pt;
}

.dashboard-filter-alert {
    margin-bottom: 10px;
    padding: 7px 10px;
    font-size: 8.3pt;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-kpi-card {
    min-height: 96px;
    padding: 12px 13px;
}

.dashboard-kpi-card .kpi-label {
    white-space: normal;
    line-height: 1.2;
}

.dashboard-kpi-card .kpi-value {
    margin-top: 10px;
    font-size: 17pt;
}

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

@media (max-width: 760px) {
    .dashboard-filter-grid,
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================= v8.9.1 dashboard single-row layout fix ========================= */
.dashboard-filter-grid {
    display: grid;
    grid-template-columns: minmax(200px, 1.35fr) minmax(145px, .8fr) minmax(145px, .8fr) auto auto;
    gap: 8px;
    align-items: end;
}

.dashboard-filter-actions {
    display: contents;
}

.dashboard-filter-button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 10px !important;
    font-size: 8.2pt !important;
    line-height: 1 !important;
    white-space: nowrap;
    align-self: end;
}

.dashboard-filter-button i {
    font-size: 8pt;
}

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

.dashboard-kpi-card {
    min-width: 0;
}

@media (max-width: 760px) {
    .dashboard-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-filter-field:first-child {
        grid-column: 1 / -1;
    }

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

@media (max-width: 480px) {
    .dashboard-filter-grid,
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filter-field:first-child {
        grid-column: auto;
    }
}

/* ========================= v8.9.2 dashboard KPI number alignment ========================= */
.dashboard-kpi-card .kpi-value {
    width: 100%;
    text-align: center;
}


/* ========================= Simple login card ========================= */
.login-page {
    min-height: 100vh;
    margin: 0;
    background: #eef2f6;
}
.login-simple-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-card-simple {
    width: min(390px, calc(100vw - 32px));
    margin: 0;
    padding: 26px 28px 28px;
}
.login-card-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}
.login-card-brand img {
    display: block;
    width: 48px;
    height: 34px;
    object-fit: contain;
    flex: 0 0 48px;
}
.login-card-brand strong {
    display: block;
    color: var(--ink-950);
    font-size: 9.5pt;
    line-height: 1.25;
    font-weight: 700;
}
.login-card-brand span {
    display: block;
    margin-top: 2px;
    color: var(--ink-500);
    font-size: 8pt;
}
.login-card-simple h2 {
    font-size: 14pt;
}
.login-card-simple > p {
    margin-bottom: 18px;
}
@media (max-width: 480px) {
    .login-simple-shell { padding: 16px; }
    .login-card-simple { padding: 22px 20px 24px; }
}

/* ========================= v8.9.4 hover navigation =========================
   Desktop grouped navigation opens on pointer hover/focus without dropdown
   buttons or chevrons. Mobile keeps grouped items visibly expanded.
============================================================================= */
.nav-hover-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-section-label {
    cursor: default;
    user-select: none;
}

.nav-section-label::after {
    display: none !important;
    content: none !important;
}

.nav-hover-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1035;
    display: none;
    min-width: 235px;
    margin: 0;
    padding: 5px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 12px 26px rgba(15,23,42,.14);
}

.nav-hover-group:hover > .nav-hover-menu {
    display: block;
}

.nav-hover-group:hover > .nav-section-label {
    color: #fff;
    background: rgba(255,255,255,.055);
}

.nav-hover-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 3px;
    color: var(--ink-700);
    font-size: 8.8pt;
    white-space: nowrap;
}

.nav-hover-menu .dropdown-item .bi {
    width: 17px;
    color: var(--ink-500);
    text-align: center;
}

.nav-hover-menu .dropdown-item:hover,
.nav-hover-menu .dropdown-item:focus {
    color: var(--blue-700);
    background: var(--blue-50);
}

.nav-hover-menu .dropdown-item.active {
    color: var(--blue-700);
    background: #eaf3fa;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .nav-hover-group {
        display: block;
        width: 100%;
    }

    .nav-section-label {
        width: 100%;
        min-height: 38px;
        justify-content: flex-start;
        border-bottom-width: 0;
        border-left: 3px solid transparent;
    }

    .nav-section-label.active {
        border-left-color: #78b9e7;
    }

    .nav-hover-menu,
    .nav-hover-group:hover > .nav-hover-menu {
        position: static;
        display: block;
        width: 100%;
        min-width: 0;
        padding: 2px 0 5px 18px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .nav-hover-menu .dropdown-item {
        color: rgba(255,255,255,.72);
        min-height: 32px;
    }

    .nav-hover-menu .dropdown-item .bi {
        color: #9dc8e7;
    }

    .nav-hover-menu .dropdown-item:hover,
    .nav-hover-menu .dropdown-item:focus,
    .nav-hover-menu .dropdown-item.active {
        color: #fff;
        background: rgba(255,255,255,.07);
    }
}

/* ========================= Compact entry fields v9.2 =========================
   Applies only inside record-entry dialogs. Keeps table filters/dashboard controls unchanged.
=============================================================================== */
.record-form-card input.form-control,
.record-form-card select.form-select,
.record-form-card .input-group-text {
    min-height: 30px !important;
    height: 30px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    font-size: 8.8pt !important;
    line-height: 1.1 !important;
}

.record-form-card input.form-control {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.record-form-card select.form-select {
    padding-left: 8px !important;
    padding-right: 29px !important;
}

.record-form-card .field-with-icon > input.form-control {
    padding-left: 29px !important;
}

.record-form-card textarea.form-control {
    min-height: 58px !important;
    height: auto !important;
    padding: 6px 8px !important;
    font-size: 8.8pt !important;
}

.record-form-card .line-items-table input.form-control,
.record-form-card .line-items-table select.form-select {
    min-height: 30px !important;
    height: 30px !important;
    font-size: 8.6pt !important;
}

/* ========================= v9.3 store reports ========================= */
.report-filter-card {
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: var(--shadow-card);
}

.report-filter-grid {
    display: grid;
    gap: 8px;
    align-items: end;
}

.report-filter-grid-ledger {
    grid-template-columns: minmax(220px, 1.35fr) minmax(145px, .8fr) minmax(145px, .8fr) auto auto;
}

.report-filter-grid-register {
    grid-template-columns: minmax(190px, 1.1fr) minmax(210px, 1.2fr) minmax(140px, .75fr) minmax(140px, .75fr) auto auto;
}

.report-filter-field { min-width: 0; }
.report-filter-field label {
    display: block;
    margin-bottom: 4px;
    color: var(--ink-600);
    font-size: 8pt;
    font-weight: 600;
}
.report-filter-field .form-control,
.report-filter-field .form-select {
    min-height: 30px;
    height: 30px;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 8.5pt;
}
.report-filter-actions { display: contents; }
.report-filter-button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 10px !important;
    font-size: 8.2pt !important;
    line-height: 1 !important;
    white-space: nowrap;
    align-self: end;
}
.report-filter-alert { margin-bottom: 10px; padding: 7px 10px; font-size: 8.3pt; }
.report-card > .card-head { min-height: 48px; }
.report-card > .card-head h2 { margin: 0; }
.report-export-buttons .dt-buttons { display: flex; gap: 4px; }

.stock-register-sections { padding: 0 12px 12px; }
.stock-register-section {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.stock-register-product-head {
    min-height: 34px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--slate-50, #f8fafc);
    border-bottom: 1px solid var(--line);
    color: var(--ink-800);
    font-size: 8.8pt;
}
.stock-register-product-head strong { font-size: 9pt; }
.stock-register-product-head span { color: var(--ink-500); font-size: 8pt; font-weight: 600; }
.report-register-table { margin-bottom: 0; font-size: 8.3pt; }
.report-register-table thead th {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}
.report-register-table tbody td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.report-register-table td:nth-child(4) { min-width: 250px; text-align: left; }
.report-register-table td:nth-child(9) { min-width: 160px; text-align: left; }
.report-card .app-datatable thead th,
.report-register-table thead th { text-align: center !important; vertical-align: middle !important; }
.report-empty { padding: 24px; color: var(--ink-500); text-align: center; }
.report-export-datatable { display: none !important; }

@media (max-width: 1100px) {
    .report-filter-grid-register { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-filter-grid-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .report-filter-grid-register,
    .report-filter-grid-ledger { grid-template-columns: 1fr; }
    .stock-register-product-head { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* ========================= v9.3.4 CRP stock ledger ========================= */
.report-crp-ledger-table { margin-bottom: 0; font-size: 8.3pt; }
.report-crp-ledger-table thead th {
    white-space: nowrap;
    text-align: center !important;
    vertical-align: middle !important;
}
.report-crp-ledger-table tbody td {
    padding-top: 5px;
    padding-bottom: 5px;
    vertical-align: middle;
}
.report-crp-ledger-table td:nth-child(2) { min-width: 300px; text-align: left; }

/* ========================= v9.4 Analytical Dashboard =========================
   Separate management analytics page. Existing dashboard styles are untouched.
=============================================================================== */
.analytical-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytical-hero {
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    overflow: hidden;
    border: 1px solid #173a5d;
    border-radius: 7px;
    background: linear-gradient(115deg, #132238 0%, #17395c 68%, #245a82 100%);
    box-shadow: 0 5px 18px rgba(19, 34, 56, .12);
    color: #fff;
}
.analytical-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    color: #b9d4e8;
    font-size: 7.8pt;
    font-weight: 700;
    letter-spacing: .55px;
    text-transform: uppercase;
}
.analytical-hero h1 {
    margin: 0;
    color: #fff;
    font-size: 19pt;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -.18px;
}
.analytical-hero p {
    max-width: 720px;
    margin: 7px 0 0;
    color: rgba(255,255,255,.67);
    font-size: 9pt;
}
.analytical-hero-scope {
    max-width: 560px;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}
.analytical-hero-scope span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 27px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 4px;
    background: rgba(255,255,255,.065);
    color: rgba(255,255,255,.84);
    font-size: 7.8pt;
    white-space: nowrap;
}
.analytical-hero-scope .bi { color: #a9cde7; font-size: 8pt; }

.analytical-filter-card {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    box-shadow: var(--shadow-card);
}
.analytical-filter-grid {
    display: grid;
    grid-template-columns: minmax(170px, 1.05fr) minmax(235px, 1.45fr) minmax(185px, 1.15fr) minmax(128px, .7fr) minmax(128px, .7fr) auto auto;
    gap: 8px;
    align-items: end;
}
.analytical-filter-grid .report-filter-button { align-self: end; }
.analytical-scope-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: -4px;
    padding: 5px 8px;
    border-left: 2px solid #8fb2ca;
    color: var(--ink-500);
    font-size: 7.4pt;
    line-height: 1.25;
}
.analytical-scope-note .bi { color: #4f7d9e; }

.analytical-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}
.analytical-kpi-card {
    position: relative;
    min-width: 0;
    min-height: 106px;
    padding: 12px 13px 11px;
    border: 1px solid var(--line);
    border-top: 2px solid #9fb5c7;
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow-card);
}
.analytical-kpi-card.analytical-kpi-emphasis { border-top-color: #2f6f9f; }
.analytical-kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    color: var(--ink-500);
}
.analytical-kpi-head span {
    font-size: 7.6pt;
    font-weight: 700;
    letter-spacing: .32px;
    text-transform: uppercase;
}
.analytical-kpi-head .bi {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #f2f6f9;
    color: #315d7c;
    font-size: 10pt;
}
.analytical-kpi-card strong {
    display: block;
    margin-top: 8px;
    color: var(--ink-950);
    font-size: 18pt;
    line-height: 1;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.analytical-kpi-card small {
    display: block;
    margin-top: 7px;
    color: var(--ink-500);
    font-size: 7.6pt;
    line-height: 1.25;
    text-align: center;
}

.analytical-grid {
    display: grid;
    gap: 12px;
    align-items: stretch;
}
.analytical-grid-primary { grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr); }
.analytical-grid-equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytical-grid-bottom { grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); }
.analytical-panel {
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
}
.analytical-panel-head {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--line-soft);
}
.analytical-panel-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--blue-700);
    font-size: 7.2pt;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .45px;
    text-transform: uppercase;
}
.analytical-panel-head h2 {
    margin: 0;
    color: var(--ink-950);
    font-size: 11.2pt;
    line-height: 1.2;
    font-weight: 700;
}
.analytical-panel-meta {
    color: var(--ink-500);
    font-size: 7.6pt;
    white-space: nowrap;
}
.analytical-chart-wrap {
    position: relative;
    height: 270px;
    padding: 12px 13px 10px;
}
.analytical-chart-large { height: 294px; }
.analytical-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.analytical-empty {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--ink-400);
    font-size: 8.5pt;
    text-align: center;
}
.analytical-empty .bi { font-size: 18pt; color: #aeb9c5; }
.analytical-empty-compact { min-height: 210px; }

.analytical-engagement-panel { display: flex; flex-direction: column; }
.analytical-engagement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
}
.analytical-engagement-grid > div {
    min-height: 72px;
    padding: 9px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    background: var(--surface-soft);
}
.analytical-engagement-grid span,
.analytical-napkin-summary span {
    display: block;
    color: var(--ink-500);
    font-size: 7.5pt;
    line-height: 1.2;
    font-weight: 600;
}
.analytical-engagement-grid strong,
.analytical-napkin-summary strong {
    display: block;
    margin-top: 5px;
    color: var(--ink-950);
    font-size: 15pt;
    line-height: 1;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.analytical-napkin-summary {
    margin: 0 12px 12px;
    min-height: 68px;
    display: grid;
    grid-template-columns: 36px 1fr 1fr;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #d6e4ee;
    border-radius: 5px;
    background: #f5f9fc;
}
.analytical-napkin-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: #e5eff6;
    color: #2f6f9f;
    font-size: 13pt;
}
.analytical-context-note {
    margin: auto 12px 11px;
    color: var(--ink-500);
    font-size: 7.3pt;
}

.analytical-product-table-panel .dataTables_wrapper { padding-bottom: 8px; }
.analytical-product-table { font-size: 8.2pt; }
.analytical-product-table thead th {
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap;
}
.analytical-product-table tbody td { padding-top: 5px; padding-bottom: 5px; }
.analytical-product-table tbody td:first-child { min-width: 180px; text-align: left; }

.analytical-ranking-list { padding: 6px 12px 10px; }
.analytical-ranking-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
}
.analytical-ranking-item:last-child { border-bottom: 0; }
.analytical-rank {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink-600);
    font-size: 7.4pt;
    font-weight: 700;
}
.analytical-ranking-main { min-width: 0; }
.analytical-ranking-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}
.analytical-ranking-title strong { color: var(--ink-900); font-size: 8.2pt; white-space: nowrap; }
.analytical-ranking-title span { min-width: 0; color: var(--ink-600); font-size: 7.8pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytical-ranking-bar {
    height: 3px;
    margin-top: 5px;
    overflow: hidden;
    border-radius: 4px;
    background: #edf1f5;
}
.analytical-ranking-bar span { display: block; height: 100%; border-radius: inherit; background: #4f7d9e; }
.analytical-ranking-main small { display: block; margin-top: 4px; color: var(--ink-400); font-size: 7.1pt; line-height: 1.2; }
.analytical-ranking-value { color: var(--ink-800); font-size: 8.2pt; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 1320px) {
    .analytical-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .analytical-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
    .analytical-hero { align-items: flex-start; flex-direction: column; gap: 12px; }
    .analytical-hero-scope { max-width: none; justify-content: flex-start; }
    .analytical-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytical-grid-primary,
    .analytical-grid-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .analytical-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytical-grid-equal { grid-template-columns: 1fr; }
    .analytical-chart-wrap { height: 250px; }
}
@media (max-width: 520px) {
    .analytical-hero { padding: 17px 15px; }
    .analytical-hero h1 { font-size: 17pt; }
    .analytical-filter-grid,
    .analytical-kpi-grid { grid-template-columns: 1fr; }
    .analytical-engagement-grid { grid-template-columns: 1fr; }
    .analytical-napkin-summary { grid-template-columns: 34px 1fr; }
    .analytical-napkin-summary > div:last-child { grid-column: 2; }
}


/* ================= v9.4.1 Analytical Dashboard polish =================
   Premium executive motion + single-line desktop filter. Existing dashboard untouched.
============================================================================ */
.analytical-dashboard {
    --analytical-navy: #142a43;
    --analytical-blue: #2f6f9f;
    --analytical-cyan: #5e9abf;
    --analytical-teal: #3f8581;
    gap: 13px;
}

.analytical-hero {
    position: relative;
    isolation: isolate;
    min-height: 122px;
    border-color: rgba(35, 83, 121, .82);
    border-radius: 9px;
    background:
        radial-gradient(circle at 78% 28%, rgba(104, 173, 215, .22), transparent 31%),
        linear-gradient(118deg, #111f32 0%, #17395c 57%, #245f88 100%);
    box-shadow: 0 10px 28px rgba(19, 34, 56, .16);
    animation: analyticalHeroIn .58s cubic-bezier(.2,.7,.2,1) both;
}
.analytical-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .17;
    background-image:
        linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(90deg, transparent 5%, #000 52%, #000 100%);
}
.analytical-hero::after {
    content: "";
    position: absolute;
    top: -70%;
    bottom: -70%;
    left: -24%;
    width: 18%;
    z-index: 0;
    pointer-events: none;
    transform: rotate(12deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent);
    animation: analyticalHeroSheen 7s ease-in-out 1.1s infinite;
}
.analytical-hero > * { position: relative; z-index: 1; }
.analytical-eyebrow { color: #c1ddef; }
.analytical-hero h1 { font-size: 20pt; letter-spacing: -.28px; }
.analytical-hero p { color: rgba(255,255,255,.73); }
.analytical-hero-scope span {
    border-color: rgba(255,255,255,.17);
    border-radius: 5px;
    background: rgba(255,255,255,.075);
    backdrop-filter: blur(3px);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.analytical-hero-scope span:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.11);
}

.analytical-filter-card {
    position: relative;
    padding: 10px 11px 11px;
    border-color: #d8e0e8;
    border-radius: 7px;
    box-shadow: 0 4px 14px rgba(23, 57, 92, .06);
    animation: analyticalRiseIn .52s .07s cubic-bezier(.2,.7,.2,1) both;
}
.analytical-filter-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 18px;
    right: 18px;
    height: 2px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(47,111,159,.15), #2f6f9f 48%, rgba(63,133,129,.22));
}
.analytical-filter-grid {
    grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.5fr) minmax(145px, 1.12fr) minmax(108px, .72fr) minmax(108px, .72fr) 82px 82px;
    gap: 7px;
    align-items: end;
}
.analytical-filter-grid > * { min-width: 0; }
.analytical-filter-grid .report-filter-field label {
    margin-bottom: 4px;
    color: #607082;
    font-size: 7.15pt;
    font-weight: 700;
    letter-spacing: .24px;
}
.analytical-filter-grid .form-control,
.analytical-filter-grid .form-select,
.analytical-filter-grid .report-filter-button {
    min-height: 30px;
    height: 30px;
}
.analytical-filter-grid .form-control,
.analytical-filter-grid .form-select {
    border-color: #ced8e2;
    background-color: #fbfcfd;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.analytical-filter-grid .form-control:focus,
.analytical-filter-grid .form-select:focus {
    border-color: #6c9aba;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(47,111,159,.09);
}
.analytical-filter-grid .report-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-inline: 9px;
    border-radius: 5px;
    font-size: 7.6pt;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}
.analytical-filter-grid .btn-primary {
    border-color: #245f88;
    background: linear-gradient(180deg, #367eae, #286993);
    box-shadow: 0 3px 8px rgba(47,111,159,.16);
}
.analytical-filter-grid .report-filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(23,57,92,.13);
}

.analytical-scope-note { animation: analyticalFadeIn .45s .15s both; }

.analytical-kpi-grid { gap: 10px; }
.analytical-kpi-card {
    overflow: hidden;
    min-height: 112px;
    border-color: #dbe3eb;
    border-top: 0;
    border-radius: 8px;
    box-shadow: 0 4px 13px rgba(31, 54, 77, .055);
    transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s ease, border-color .22s ease;
    animation: analyticalKpiIn .54s cubic-bezier(.2,.7,.2,1) both;
}
.analytical-kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #86a9c0, #3b789f);
}
.analytical-kpi-card::after {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    top: -38px;
    right: -28px;
    border-radius: 50%;
    background: rgba(47,111,159,.045);
    pointer-events: none;
}
.analytical-kpi-card:nth-child(1) { animation-delay: .10s; }
.analytical-kpi-card:nth-child(2) { animation-delay: .14s; }
.analytical-kpi-card:nth-child(3) { animation-delay: .18s; }
.analytical-kpi-card:nth-child(4) { animation-delay: .22s; }
.analytical-kpi-card:nth-child(5) { animation-delay: .26s; }
.analytical-kpi-card:nth-child(6) { animation-delay: .30s; }
.analytical-kpi-card:nth-child(7) { animation-delay: .34s; }
.analytical-kpi-card:nth-child(8) { animation-delay: .38s; }
.analytical-kpi-card:hover {
    transform: translateY(-3px);
    border-color: #cbd8e3;
    box-shadow: 0 10px 23px rgba(31,54,77,.11);
}
.analytical-kpi-card.analytical-kpi-emphasis {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
}
.analytical-kpi-card.analytical-kpi-emphasis::before { background: linear-gradient(90deg, #1f5f8e, #4a94bd); }
.analytical-kpi-head .bi {
    border: 1px solid #e1e9ef;
    background: linear-gradient(180deg, #f8fbfd, #edf4f8);
    transition: transform .2s ease, background .2s ease;
}
.analytical-kpi-card:hover .analytical-kpi-head .bi {
    transform: translateY(-1px) scale(1.06);
    background: #e8f2f8;
}
.analytical-kpi-card strong {
    margin-top: 9px;
    font-size: 19.5pt;
    letter-spacing: -.35px;
}

.analytical-panel {
    border-color: #dce4eb !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(31,54,77,.05) !important;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    animation: analyticalRiseIn .56s .31s cubic-bezier(.2,.7,.2,1) both;
}
.analytical-panel:hover {
    transform: translateY(-2px);
    border-color: #ccd9e4 !important;
    box-shadow: 0 10px 24px rgba(31,54,77,.09) !important;
}
.analytical-panel-head {
    position: relative;
    min-height: 54px;
    background: linear-gradient(180deg, #fff, #fbfcfd);
}
.analytical-panel-head::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, rgba(47,111,159,.2), rgba(47,111,159,0));
}
.analytical-panel-kicker { color: #35759e; }
.analytical-chart-wrap { padding: 14px 14px 11px; }

.analytical-engagement-grid > div,
.analytical-napkin-summary {
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.analytical-engagement-grid > div:hover,
.analytical-napkin-summary:hover {
    transform: translateY(-2px);
    border-color: #ccdbe6;
    box-shadow: 0 6px 14px rgba(31,54,77,.065);
}
.analytical-ranking-item { transition: background .18s ease, transform .18s ease; }
.analytical-ranking-item:hover {
    transform: translateX(2px);
    background: linear-gradient(90deg, rgba(47,111,159,.035), transparent 75%);
}
.analytical-ranking-bar span {
    transform-origin: left center;
    animation: analyticalBarGrow .8s .42s cubic-bezier(.2,.7,.2,1) both;
}
.analytical-product-table tbody tr { transition: background-color .16s ease; }
.analytical-product-table tbody tr:hover { background-color: #f5f9fc; }

@keyframes analyticalHeroIn {
    from { opacity: 0; transform: translateY(-8px) scale(.994); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes analyticalHeroSheen {
    0%, 58% { left: -24%; opacity: 0; }
    64% { opacity: .85; }
    82% { left: 112%; opacity: 0; }
    100% { left: 112%; opacity: 0; }
}
@keyframes analyticalRiseIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes analyticalKpiIn {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes analyticalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes analyticalBarGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Keep the full analytical filter bar on one line on normal desktop widths. */
@media (min-width: 981px) {
    .analytical-filter-grid {
        grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.5fr) minmax(145px, 1.12fr) minmax(108px, .72fr) minmax(108px, .72fr) 82px 82px !important;
    }
}
@media (max-width: 980px) {
    .analytical-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
    .analytical-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
    .analytical-filter-grid { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) {
    .analytical-hero,
    .analytical-hero::after,
    .analytical-filter-card,
    .analytical-scope-note,
    .analytical-kpi-card,
    .analytical-panel,
    .analytical-ranking-bar span {
        animation: none !important;
    }
    .analytical-kpi-card,
    .analytical-panel,
    .analytical-ranking-item,
    .analytical-filter-grid .report-filter-button,
    .analytical-engagement-grid > div,
    .analytical-napkin-summary {
        transition: none !important;
    }
}

/* ================= v9.4.2 Analytical Dashboard - Executive Redesign =================
   A stronger management-information hierarchy. Scoped only to Analytical Dashboard.
====================================================================================== */
.analytical-dashboard {
    --ad-ink: #152536;
    --ad-ink-soft: #607183;
    --ad-navy: #10263d;
    --ad-navy-2: #173b5d;
    --ad-blue: #2d6f9d;
    --ad-sky: #6da5c5;
    --ad-teal: #3f8581;
    --ad-gold: #b28a4b;
    --ad-gold-soft: #f5efe4;
    --ad-line: #dce5ec;
    --ad-soft: #f6f9fb;
    --ad-shadow: 0 10px 28px rgba(18, 43, 66, .08);
    --ad-shadow-hover: 0 16px 38px rgba(18, 43, 66, .13);
    gap: 14px;
}

/* Reveal system: subtle, scroll-aware, and safe for reduced motion. */
.analytical-dashboard [data-analytical-reveal] {
    opacity: 0;
    transform: translateY(13px) scale(.992);
    transition:
        opacity .58s cubic-bezier(.2,.72,.2,1) var(--reveal-delay, 0ms),
        transform .58s cubic-bezier(.2,.72,.2,1) var(--reveal-delay, 0ms),
        box-shadow .22s ease,
        border-color .22s ease;
    animation: none !important;
}
.analytical-dashboard [data-analytical-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Executive hero */
.analytical-hero.analytical-hero-executive {
    min-height: 162px;
    align-items: stretch;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 15%, rgba(120, 185, 215, .18), transparent 28%),
        linear-gradient(118deg, #0d1f32 0%, #143452 51%, #1d5577 100%);
    box-shadow: 0 16px 38px rgba(13, 31, 50, .20);
}
.analytical-hero-executive::before {
    opacity: .15;
    background-image:
        linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, rgba(0,0,0,.18), #000 58%, #000 100%);
}
.analytical-hero-executive::after {
    width: 240px;
    height: 240px;
    top: -110px;
    left: auto;
    right: -75px;
    bottom: auto;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    background: transparent;
    transform: none;
    animation: analyticalOrbit 12s linear infinite;
}
.analytical-hero-copy {
    flex: 1 1 auto;
    min-width: 0;
    padding: 24px 27px 21px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.analytical-hero-executive .analytical-eyebrow {
    margin-bottom: 7px;
    color: #bcd9e9;
    font-size: 7.4pt;
    letter-spacing: .85px;
}
.analytical-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #77c3ad;
    box-shadow: 0 0 0 0 rgba(119,195,173,.5);
    animation: analyticalLivePulse 2.2s ease-out infinite;
}
.analytical-hero-executive h1 {
    font-size: 23pt;
    line-height: 1.02;
    letter-spacing: -.55px;
}
.analytical-hero-executive p {
    max-width: 700px;
    margin-top: 8px;
    color: rgba(255,255,255,.72);
    font-size: 8.8pt;
    line-height: 1.45;
}
.analytical-hero-context {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
}
.analytical-hero-context span {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.065);
    color: rgba(255,255,255,.84);
    font-size: 7.45pt;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.analytical-hero-context .bi { color: #9fc9df; }
.analytical-hero-performance {
    position: relative;
    isolation: isolate;
    width: min(365px, 34%);
    min-width: 315px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 21px 25px 19px;
    border-left: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
    overflow: hidden;
}
.analytical-hero-orb {
    position: absolute;
    right: -24px;
    top: -30px;
    z-index: -1;
    width: 135px;
    height: 135px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.10), rgba(255,255,255,.015) 62%, transparent 64%);
    color: rgba(255,255,255,.12);
    font-size: 54pt;
    animation: analyticalFloat 5.8s ease-in-out infinite;
}
.analytical-hero-performance-label {
    color: #bcd3e1;
    font-size: 7.2pt;
    font-weight: 700;
    letter-spacing: .65px;
    text-transform: uppercase;
}
.analytical-hero-performance > strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 21pt;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.55px;
    font-variant-numeric: tabular-nums;
}
.analytical-hero-performance > strong small {
    color: #dfc391;
    font-size: 7.8pt;
    font-weight: 700;
    letter-spacing: .6px;
}
.analytical-hero-performance-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}
.analytical-hero-performance-row div {
    padding: 8px 9px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    background: rgba(10, 28, 45, .18);
}
.analytical-hero-performance-row span {
    display: block;
    color: rgba(255,255,255,.58);
    font-size: 7.1pt;
}
.analytical-hero-performance-row b {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 12.5pt;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Filter bar - deliberately one line on desktop. */
.analytical-filter-card.analytical-filter-executive {
    padding: 9px 10px 10px;
    border: 1px solid #d7e1e8;
    border-radius: 9px;
    background: linear-gradient(180deg, #fff, #fbfcfd);
    box-shadow: 0 6px 20px rgba(19,55,82,.065);
}
.analytical-filter-card.analytical-filter-executive::before {
    left: 12px;
    right: auto;
    width: 58px;
    height: 2px;
    background: linear-gradient(90deg, var(--ad-blue), var(--ad-gold));
}
.analytical-filter-executive .analytical-filter-grid {
    display: grid;
    grid-template-columns: minmax(115px,.9fr) minmax(190px,1.45fr) minmax(145px,1.05fr) minmax(105px,.72fr) minmax(105px,.72fr) 82px 82px !important;
    gap: 7px;
    align-items: end;
}
.analytical-filter-executive .report-filter-field label {
    margin-bottom: 3px;
    color: #627386;
    font-size: 6.95pt;
    letter-spacing: .30px;
}
.analytical-filter-executive .form-control,
.analytical-filter-executive .form-select,
.analytical-filter-executive .report-filter-button {
    height: 31px;
    min-height: 31px;
    border-radius: 5px;
    font-size: 7.65pt;
}
.analytical-filter-executive .form-control,
.analytical-filter-executive .form-select {
    border-color: #d2dce4;
    background-color: #fff;
}
.analytical-filter-executive .btn-primary {
    border-color: #265f87;
    background: linear-gradient(180deg, #337aa6, #285f87);
    box-shadow: 0 4px 10px rgba(40,95,135,.17);
}
.analytical-filter-executive .btn-outline-secondary {
    color: #596a79;
    border-color: #cfd9e1;
    background: #fff;
}

/* Primary outcome cards */
.analytical-outcomes-grid {
    display: grid;
    grid-template-columns: 1.18fr repeat(3, 1fr);
    gap: 10px;
}
.analytical-outcome-card {
    position: relative;
    min-width: 0;
    min-height: 145px;
    padding: 15px 16px 13px;
    overflow: hidden;
    border: 1px solid var(--ad-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(20,45,68,.055);
}
.analytical-outcome-card::after {
    content: "";
    position: absolute;
    width: 88px;
    height: 88px;
    right: -44px;
    top: -46px;
    border-radius: 50%;
    background: rgba(45,111,157,.045);
    transition: transform .28s ease, background .28s ease;
}
.analytical-outcome-card:hover {
    transform: translateY(-4px) !important;
    border-color: #cad9e4;
    box-shadow: var(--ad-shadow-hover);
}
.analytical-outcome-card:hover::after { transform: scale(1.28); background: rgba(45,111,157,.075); }
.analytical-outcome-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.analytical-outcome-top > span {
    color: #617284;
    font-size: 7.25pt;
    font-weight: 700;
    letter-spacing: .55px;
    text-transform: uppercase;
}
.analytical-outcome-top .bi {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #e0e8ee;
    border-radius: 8px;
    background: #f5f8fa;
    color: var(--ad-blue);
    font-size: 11pt;
}
.analytical-outcome-card > strong {
    display: block;
    margin-top: 11px;
    color: var(--ad-ink);
    font-size: 24pt;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.55px;
    font-variant-numeric: tabular-nums;
}
.analytical-outcome-card > strong small { font-size: 7.7pt; color: #728293; letter-spacing: .35px; }
.analytical-outcome-card > p {
    min-height: 28px;
    margin: 8px 0 0;
    color: #7a8996;
    font-size: 7.35pt;
    line-height: 1.3;
}
.analytical-outcome-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 10px -16px -13px;
    padding: 7px 16px;
    border-top: 1px solid #eef2f5;
    background: #fafcfd;
    color: #728191;
    font-size: 6.95pt;
}
.analytical-outcome-foot b { color: #334c62; font-size: 7.2pt; font-weight: 700; }
.analytical-outcome-primary {
    border-color: #173d5d;
    background:
        radial-gradient(circle at 92% 18%, rgba(113,174,205,.20), transparent 30%),
        linear-gradient(132deg, #10283f 0%, #174a6c 100%);
    box-shadow: 0 12px 27px rgba(16,40,63,.16);
}
.analytical-outcome-primary::after { background: rgba(255,255,255,.055); }
.analytical-outcome-primary .analytical-outcome-top > span { color: #bdd2df; }
.analytical-outcome-primary .analytical-outcome-top .bi {
    border-color: rgba(255,255,255,.13);
    background: rgba(255,255,255,.08);
    color: #e3c892;
}
.analytical-outcome-primary > strong { color: #fff; }
.analytical-outcome-primary > strong small { color: #e3c892; }
.analytical-outcome-primary > p { color: rgba(255,255,255,.62); }
.analytical-outcome-accent {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
}
.analytical-outcome-accent span {
    display: block;
    width: 63%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #e0bd78, #72b0c9);
    animation: analyticalAccentSweep 3.6s ease-in-out infinite alternate;
}

/* Stock pipeline */
.analytical-flow-section {
    overflow: hidden;
    border: 1px solid #d9e3ea;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, #f9fbfc);
    box-shadow: 0 6px 18px rgba(20,45,68,.045);
}
.analytical-flow-heading {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 14px;
    border-bottom: 1px solid #e8eef2;
    background: linear-gradient(90deg, #f8fbfd, #fff 50%);
}
.analytical-flow-heading span {
    display: block;
    color: var(--ad-blue);
    font-size: 6.9pt;
    font-weight: 700;
    letter-spacing: .55px;
    text-transform: uppercase;
}
.analytical-flow-heading strong { display: block; margin-top: 2px; color: var(--ad-ink); font-size: 9.7pt; }
.analytical-flow-heading small { color: #7a8996; font-size: 7.1pt; }
.analytical-flow-grid {
    display: grid;
    grid-template-columns: 1fr 28px 1fr 28px 1fr 28px 1fr;
    align-items: center;
    padding: 11px 14px 13px;
}
.analytical-flow-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 39px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid #e3eaef;
    border-radius: 8px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.analytical-flow-card:hover { transform: translateY(-2px); border-color: #cad9e4; box-shadow: 0 7px 17px rgba(20,45,68,.075); }
.analytical-flow-icon {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(145deg, #edf5f9, #f8fbfd);
    color: var(--ad-blue);
    font-size: 12pt;
}
.analytical-flow-card div > span { display:block; color:#718191; font-size:6.9pt; font-weight:700; text-transform:uppercase; letter-spacing:.34px; }
.analytical-flow-card strong { display:block; margin-top:2px; color:var(--ad-ink); font-size:14.5pt; line-height:1; font-variant-numeric:tabular-nums; }
.analytical-flow-card small { display:block; margin-top:4px; color:#94a0aa; font-size:6.8pt; line-height:1.2; }
.analytical-flow-arrow {
    position: relative;
    display: grid;
    place-items: center;
    color: #81a3b9;
    font-size: 9pt;
}
.analytical-flow-arrow::before {
    content:"";
    position:absolute;
    width:18px;
    height:1px;
    background:linear-gradient(90deg, transparent, #b4c9d7, transparent);
    animation: analyticalFlowPulse 2.4s ease-in-out infinite;
}
.analytical-flow-arrow i { position:relative; z-index:1; background:#fafcfd; }
.analytical-flow-arrow-muted { color:#b7a580; }

/* Management signal strip */
.analytical-signal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 8px;
}
.analytical-signal-grid > article {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid #e0e7ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(20,45,68,.035);
}
.analytical-signal-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f2f7fa;
    color: #477c9e;
    font-size: 10.5pt;
}
.analytical-signal-grid span:not(.analytical-signal-icon) { display:block; color:#7a8996; font-size:6.9pt; }
.analytical-signal-grid strong { display:block; margin-top:2px; color:#243b4f; font-size:10pt; line-height:1.1; font-variant-numeric:tabular-nums; }

/* Analytical panels */
.analytical-panel {
    border: 1px solid #dbe4eb !important;
    border-radius: 10px !important;
    background: #fff;
    box-shadow: 0 6px 19px rgba(20,45,68,.05) !important;
}
.analytical-panel.is-visible:hover {
    transform: translateY(-3px) scale(1) !important;
    border-color: #cad8e3 !important;
    box-shadow: var(--ad-shadow-hover) !important;
}
.analytical-panel-head {
    min-height: 57px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #fff, #fbfcfd);
}
.analytical-panel-head::before {
    content:"";
    width:3px;
    align-self:stretch;
    margin-right:2px;
    border-radius:99px;
    background:linear-gradient(180deg, var(--ad-blue), #7aa7c2);
}
.analytical-panel-head > div:first-child { flex:1; }
.analytical-panel-kicker { color:#5d89a6; font-size:6.8pt; letter-spacing:.65px; }
.analytical-panel-head h2 { font-size:11.6pt; color:#1d3245; }
.analytical-panel-meta {
    padding: 4px 7px;
    border: 1px solid #e1e8ed;
    border-radius: 999px;
    background: #f8fafb;
    color: #778694;
    font-size: 6.8pt;
}
.analytical-chart-wrap { padding: 16px 15px 12px; }
.analytical-chart-large { height: 315px; }

/* Outreach scoreboard */
.analytical-engagement-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    padding: 12px 12px 9px;
}
.analytical-engagement-stat {
    min-height: 82px !important;
    display: grid;
    grid-template-columns: 37px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    padding: 10px !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, #fbfcfd, #f7fafb) !important;
}
.analytical-engagement-wide { grid-column: 1 / -1; min-height: 72px !important; }
.analytical-engagement-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #eaf3f7;
    color: var(--ad-blue);
    font-size: 12pt;
}
.analytical-engagement-stat > div > span { font-size:7pt; }
.analytical-engagement-stat strong { margin-top:3px; font-size:16pt; }
.analytical-engagement-stat small { display:block; margin-top:3px; color:#8996a2; font-size:6.8pt; }
.analytical-napkin-summary.analytical-napkin-focus {
    position: relative;
    overflow: hidden;
    min-height: 82px;
    margin: 0 12px 12px;
    padding: 10px 11px;
    border-color: #dacaa8;
    border-radius: 9px;
    background: linear-gradient(112deg, #fffaf1, #f6f9fb 65%);
}
.analytical-napkin-focus::after {
    content:"";
    position:absolute;
    right:-35px;
    top:-45px;
    width:110px;
    height:110px;
    border-radius:50%;
    background:rgba(178,138,75,.08);
}
.analytical-napkin-focus .analytical-napkin-icon {
    border:1px solid #e3d5b8;
    background:#f4ead7;
    color:#9a733b;
}
.analytical-napkin-focus strong { font-size:16pt; }
.analytical-napkin-focus small { display:block; margin-top:3px; color:#9a8f7d; font-size:6.55pt; }

/* Rankings and table polish */
.analytical-ranking-list { padding: 7px 13px 11px; }
.analytical-ranking-item { padding: 9px 2px; border-radius: 6px; }
.analytical-ranking-item:hover { transform: translateX(3px); background: linear-gradient(90deg, rgba(45,111,157,.05), transparent 78%); }
.analytical-ranking-item:nth-child(1) .analytical-rank { border-color:#d4b36f; background:#f8efd9; color:#8b692f; box-shadow:0 0 0 3px rgba(178,138,75,.08); }
.analytical-ranking-item:nth-child(2) .analytical-rank { background:#f0f3f5; color:#61717f; }
.analytical-ranking-item:nth-child(3) .analytical-rank { background:#f4ede8; color:#8a6b54; }
.analytical-ranking-bar { height:4px; }
.analytical-ranking-bar span { background:linear-gradient(90deg, #2e739e, #63a09d); }
.analytical-ranking-item:nth-child(1) .analytical-ranking-bar span { background:linear-gradient(90deg, #b28a4b, #d4b66f); }
.analytical-product-table thead th {
    padding-top:7px !important;
    padding-bottom:7px !important;
    background:#f6f9fb !important;
    color:#506274 !important;
    font-size:7pt !important;
    letter-spacing:.24px;
    text-transform:uppercase;
}
.analytical-product-table tbody tr:hover { background:#f6fafc; }
.analytical-product-table tbody td:first-child { font-weight:600; color:#263f54; }

@keyframes analyticalLivePulse {
    0% { box-shadow:0 0 0 0 rgba(119,195,173,.44); }
    70% { box-shadow:0 0 0 7px rgba(119,195,173,0); }
    100% { box-shadow:0 0 0 0 rgba(119,195,173,0); }
}
@keyframes analyticalFloat {
    0%,100% { transform:translate3d(0,0,0) rotate(-4deg); }
    50% { transform:translate3d(-4px,7px,0) rotate(3deg); }
}
@keyframes analyticalOrbit {
    from { transform:rotate(0deg); }
    to { transform:rotate(360deg); }
}
@keyframes analyticalAccentSweep {
    from { width:38%; opacity:.65; }
    to { width:86%; opacity:1; }
}
@keyframes analyticalFlowPulse {
    0%,100% { opacity:.28; transform:scaleX(.65); }
    50% { opacity:1; transform:scaleX(1); }
}

@media (min-width: 1101px) {
    .analytical-filter-executive .analytical-filter-grid {
        grid-template-columns: minmax(115px,.9fr) minmax(190px,1.45fr) minmax(145px,1.05fr) minmax(105px,.72fr) minmax(105px,.72fr) 82px 82px !important;
    }
}
@media (max-width: 1100px) {
    .analytical-hero.analytical-hero-executive { flex-direction:column; }
    .analytical-hero-performance { width:100%; min-width:0; border-left:0; border-top:1px solid rgba(255,255,255,.11); }
    .analytical-filter-executive .analytical-filter-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
    .analytical-outcomes-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .analytical-flow-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .analytical-flow-arrow { display:none; }
    .analytical-signal-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .analytical-filter-executive .analytical-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
    .analytical-outcomes-grid,
    .analytical-signal-grid { grid-template-columns:1fr; }
    .analytical-flow-grid { grid-template-columns:1fr; gap:7px; }
    .analytical-flow-arrow { transform:rotate(90deg); min-height:14px; }
    .analytical-hero-copy { padding:20px 18px 17px; }
    .analytical-hero-executive h1 { font-size:20pt; }
}
@media (max-width: 520px) {
    .analytical-filter-executive .analytical-filter-grid { grid-template-columns:1fr !important; }
    .analytical-hero-performance-row { grid-template-columns:1fr; }
    .analytical-engagement-grid { grid-template-columns:1fr; }
    .analytical-engagement-wide { grid-column:auto; }
    .analytical-napkin-summary.analytical-napkin-focus { grid-template-columns:34px 1fr; }
    .analytical-napkin-focus > div:last-child { grid-column:2; }
}
@media (prefers-reduced-motion: reduce) {
    .analytical-dashboard [data-analytical-reveal] { opacity:1; transform:none; transition:none !important; }
    .analytical-live-dot,
    .analytical-hero-orb,
    .analytical-hero-executive::after,
    .analytical-outcome-accent span,
    .analytical-flow-arrow::before { animation:none !important; }
}

/* ========================= v9.4.6 main dashboard programme cards + ledgers ========================= */
.dashboard-program-kpi-grid {
    margin-top: 10px;
}

.dashboard-ledger-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    align-items: start;
}

.dashboard-ledger-card {
    margin: 0;
    overflow: hidden;
    min-width: 0;
}

.dashboard-ledger-card > .card-head {
    min-height: 42px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
}

.dashboard-ledger-card > .card-head h2 {
    font-size: 10.5pt;
    font-weight: 700;
}

.dashboard-ledger-card .table-responsive {
    max-height: 320px;
    overflow: auto;
}

.dashboard-ledger-table {
    width: 100%;
    margin: 0;
    font-size: 8.1pt;
}

.dashboard-ledger-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 6px 7px;
    text-align: center !important;
    vertical-align: middle;
    white-space: nowrap;
    background: #f7f9fc;
    border-bottom: 1px solid var(--line);
}

.dashboard-ledger-table tbody td {
    padding: 5px 7px;
    vertical-align: middle;
}

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

.dashboard-ledger-sr {
    width: 48px;
    text-align: center;
}

@media (max-width: 980px) {
    .dashboard-ledger-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================= v9.4.7 main dashboard motion polish ========================= */
.dashboard-filter-card {
    animation: dashboardFilterDrop .52s cubic-bezier(.2,.82,.22,1) both;
}

.dashboard-kpi-card {
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform-origin: center bottom;
    animation: dashboardCardPop .68s cubic-bezier(.18,.86,.23,1.16) both;
    transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease;
    will-change: transform, opacity;
}

.dashboard-kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -78%;
    width: 46%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.08) 25%, rgba(55,126,178,.16) 50%, rgba(255,255,255,.08) 75%, transparent 100%);
    transform: skewX(-18deg);
    animation: dashboardCardSweep 1.05s ease-out both;
}

.dashboard-kpi-card::after {
    display: block;
    content: "";
    position: absolute;
    inset: auto 10px 0;
    height: 2px;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    transform: scaleX(.18);
    transform-origin: center;
    background: linear-gradient(90deg, transparent, rgba(47,111,159,.62), transparent);
    transition: opacity .24s ease, transform .28s ease;
}

.dashboard-kpi-card:hover {
    transform: translateY(-5px) scale(1.018);
    box-shadow: 0 12px 24px rgba(26, 58, 86, .13);
    border-color: #c3d5e4;
}

.dashboard-kpi-card:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.dashboard-kpi-card .kpi-icon {
    animation: dashboardIconPop .56s cubic-bezier(.2,.9,.25,1.25) both;
    transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease;
}

.dashboard-kpi-card:hover .kpi-icon {
    transform: translateY(-2px) rotate(-6deg) scale(1.12);
    box-shadow: 0 5px 12px rgba(47,111,159,.14);
}

.dashboard-kpi-card .kpi-value {
    transform-origin: center;
}

.dashboard-kpi-card .kpi-value.dashboard-value-settled {
    animation: dashboardValueSettle .42s cubic-bezier(.17,.89,.32,1.35) both;
}

.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(1) { animation-delay: .08s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(2) { animation-delay: .14s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(3) { animation-delay: .20s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(4) { animation-delay: .26s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(5) { animation-delay: .32s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(6) { animation-delay: .38s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(1)::before { animation-delay: .26s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(2)::before { animation-delay: .32s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(3)::before { animation-delay: .38s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(4)::before { animation-delay: .44s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(5)::before { animation-delay: .50s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(6)::before { animation-delay: .56s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(1) .kpi-icon { animation-delay: .22s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(2) .kpi-icon { animation-delay: .28s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(3) .kpi-icon { animation-delay: .34s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(4) .kpi-icon { animation-delay: .40s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(5) .kpi-icon { animation-delay: .46s; }
.dashboard-kpi-grid:not(.dashboard-program-kpi-grid) .dashboard-kpi-card:nth-child(6) .kpi-icon { animation-delay: .52s; }

.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(1) { animation-delay: .46s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(2) { animation-delay: .52s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(3) { animation-delay: .58s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(4) { animation-delay: .64s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(5) { animation-delay: .70s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(6) { animation-delay: .76s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(1)::before { animation-delay: .64s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(2)::before { animation-delay: .70s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(3)::before { animation-delay: .76s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(4)::before { animation-delay: .82s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(5)::before { animation-delay: .88s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(6)::before { animation-delay: .94s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(1) .kpi-icon { animation-delay: .60s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(2) .kpi-icon { animation-delay: .66s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(3) .kpi-icon { animation-delay: .72s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(4) .kpi-icon { animation-delay: .78s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(5) .kpi-icon { animation-delay: .84s; }
.dashboard-program-kpi-grid .dashboard-kpi-card:nth-child(6) .kpi-icon { animation-delay: .90s; }

.dashboard-ledger-card {
    opacity: 0;
    animation: dashboardLedgerRise .68s cubic-bezier(.2,.82,.22,1) both;
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.dashboard-ledger-card:nth-child(1) { animation-delay: .86s; }
.dashboard-ledger-card:nth-child(2) { animation-delay: .96s; }

.dashboard-ledger-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 11px 23px rgba(26, 58, 86, .10);
    border-color: #c8d8e5;
}

.dashboard-ledger-card > .card-head h2 {
    position: relative;
    overflow: hidden;
}

.dashboard-ledger-card > .card-head h2::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 7px;
    border-radius: 50%;
    vertical-align: 1px;
    background: #4b8db8;
    box-shadow: 0 0 0 0 rgba(75,141,184,.28);
    animation: dashboardTitlePulse 1.65s ease-out 1.15s 2;
}

.dashboard-ledger-table tbody tr {
    opacity: 0;
    transform: translateY(7px);
    animation: dashboardRowReveal .42s ease-out both;
}

.dashboard-ledger-table tbody tr:nth-child(1) { animation-delay: 1.02s; }
.dashboard-ledger-table tbody tr:nth-child(2) { animation-delay: 1.06s; }
.dashboard-ledger-table tbody tr:nth-child(3) { animation-delay: 1.10s; }
.dashboard-ledger-table tbody tr:nth-child(4) { animation-delay: 1.14s; }
.dashboard-ledger-table tbody tr:nth-child(5) { animation-delay: 1.18s; }
.dashboard-ledger-table tbody tr:nth-child(6) { animation-delay: 1.22s; }
.dashboard-ledger-table tbody tr:nth-child(7) { animation-delay: 1.26s; }
.dashboard-ledger-table tbody tr:nth-child(8) { animation-delay: 1.30s; }
.dashboard-ledger-table tbody tr:nth-child(9) { animation-delay: 1.34s; }
.dashboard-ledger-table tbody tr:nth-child(10) { animation-delay: 1.38s; }
.dashboard-ledger-table tbody tr:nth-child(n+11) { animation-delay: 1.42s; }

.dashboard-filter-button {
    transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(31, 77, 115, .10);
}

.dashboard-filter-button:active {
    transform: translateY(0) scale(.97);
}

.dashboard-filter-card.dashboard-is-filtering .dashboard-filter-button[type="submit"] i {
    animation: dashboardSearchSpin .55s ease-in-out both;
}

@keyframes dashboardFilterDrop {
    0% { opacity: 0; transform: translateY(-12px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes dashboardCardPop {
    0% { opacity: 0; transform: translateY(20px) scale(.92); filter: blur(2px); }
    58% { opacity: 1; transform: translateY(-4px) scale(1.018); filter: blur(0); }
    78% { transform: translateY(2px) scale(.995); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes dashboardCardSweep {
    0%, 20% { left: -78%; opacity: 0; }
    35% { opacity: 1; }
    100% { left: 138%; opacity: 0; }
}

@keyframes dashboardIconPop {
    0% { opacity: 0; transform: scale(.45) rotate(-14deg); }
    64% { opacity: 1; transform: scale(1.15) rotate(6deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes dashboardValueSettle {
    0% { transform: scale(.88); opacity: .72; }
    62% { transform: scale(1.07); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes dashboardLedgerRise {
    0% { opacity: 0; transform: translateY(24px) scale(.975); }
    70% { opacity: 1; transform: translateY(-3px) scale(1.004); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dashboardRowReveal {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dashboardTitlePulse {
    0% { box-shadow: 0 0 0 0 rgba(75,141,184,.34); transform: scale(.82); }
    55% { box-shadow: 0 0 0 6px rgba(75,141,184,0); transform: scale(1.18); }
    100% { box-shadow: 0 0 0 0 rgba(75,141,184,0); transform: scale(1); }
}

@keyframes dashboardSearchSpin {
    0% { transform: rotate(0) scale(1); }
    55% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-filter-card,
    .dashboard-kpi-card,
    .dashboard-kpi-card::before,
    .dashboard-kpi-card .kpi-icon,
    .dashboard-kpi-card .kpi-value,
    .dashboard-ledger-card,
    .dashboard-ledger-card > .card-head h2::after,
    .dashboard-ledger-table tbody tr,
    .dashboard-filter-button,
    .dashboard-filter-button i {
        animation: none !important;
        transition: none !important;
    }
    .dashboard-kpi-card,
    .dashboard-ledger-card,
    .dashboard-ledger-table tbody tr {
        opacity: 1;
        transform: none;
    }
}


/* ========================= v9.4.8 main dashboard motion refinement ========================= */
.dashboard-kpi-card {
    animation-delay: var(--dashboard-card-delay, .08s) !important;
}

.dashboard-kpi-card::before {
    animation-delay: var(--dashboard-sweep-delay, .26s) !important;
}

.dashboard-kpi-card .kpi-icon {
    animation-delay: var(--dashboard-icon-delay, .22s) !important;
}

.dashboard-card-spotlight {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    border-radius: inherit;
    background: radial-gradient(
        150px circle at var(--dashboard-spot-x, 50%) var(--dashboard-spot-y, 50%),
        rgba(55, 126, 178, .18),
        rgba(55, 126, 178, .07) 34%,
        transparent 70%
    );
    transition: opacity .18s ease;
}

.dashboard-kpi-card.dashboard-spotlight-active .dashboard-card-spotlight {
    opacity: 1;
}

.dashboard-kpi-card > *:not(.dashboard-card-spotlight) {
    position: relative;
    z-index: 1;
}

.dashboard-kpi-card .kpi-value.dashboard-value-updated {
    animation: dashboardSmartValueFlash .96s cubic-bezier(.2,.8,.2,1) both !important;
}

.dashboard-ledger-card {
    animation-delay: var(--dashboard-ledger-delay, .86s) !important;
}

.dashboard-ledger-table thead th {
    opacity: 0;
    animation: dashboardLedgerHeadReveal .38s cubic-bezier(.2,.82,.22,1) both;
    animation-delay: var(--dashboard-head-delay, 1.02s);
}

.dashboard-ledger-table tbody tr {
    animation-name: dashboardRowRevealEnhanced !important;
    animation-duration: .5s !important;
    animation-timing-function: cubic-bezier(.2,.82,.22,1) !important;
    animation-delay: var(--dashboard-row-delay, 1.08s) !important;
}

.dashboard-ledger-table td.dashboard-ledger-value-updated {
    animation: dashboardLedgerValueFlash .92s ease-out both !important;
}

body.dashboard-page-leaving .dashboard-kpi-grid,
body.dashboard-page-leaving .dashboard-ledger-grid {
    opacity: .32;
    transform: translateY(5px) scale(.994);
    filter: blur(1.4px);
    transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

body.dashboard-page-leaving .dashboard-filter-card {
    transform: translateY(-1px) scale(.998);
    box-shadow: 0 7px 18px rgba(31, 77, 115, .12);
    transition: transform .2s ease, box-shadow .2s ease;
}

body.dashboard-page-leaving .dashboard-filter-card .dashboard-filter-field,
body.dashboard-page-leaving .dashboard-filter-card .dashboard-filter-button:not([type="submit"]) {
    opacity: .66;
    transition: opacity .18s ease;
}

body.dashboard-page-leaving .dashboard-filter-card .dashboard-filter-button[type="submit"] {
    transform: translateY(-1px) scale(1.025);
    box-shadow: 0 6px 14px rgba(31, 77, 115, .16);
}

@keyframes dashboardSmartValueFlash {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(47,111,159,0);
    }
    34% {
        transform: scale(1.095);
        text-shadow: 0 0 13px rgba(47,111,159,.30);
    }
    70% {
        transform: scale(.992);
        text-shadow: 0 0 6px rgba(47,111,159,.12);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(47,111,159,0);
    }
}

@keyframes dashboardLedgerHeadReveal {
    0% { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes dashboardRowRevealEnhanced {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(.992);
        background-color: rgba(55,126,178,.08);
    }
    62% {
        opacity: 1;
        transform: translateY(-1px) scale(1.002);
        background-color: rgba(55,126,178,.035);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        background-color: transparent;
    }
}

@keyframes dashboardLedgerValueFlash {
    0% { background-color: transparent; box-shadow: inset 0 0 0 rgba(55,126,178,0); }
    34% { background-color: rgba(55,126,178,.10); box-shadow: inset 0 0 0 1px rgba(55,126,178,.08); }
    100% { background-color: transparent; box-shadow: inset 0 0 0 rgba(55,126,178,0); }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-card-spotlight {
        display: none !important;
    }
    .dashboard-ledger-table thead th,
    .dashboard-kpi-card .kpi-value.dashboard-value-updated,
    .dashboard-ledger-table td.dashboard-ledger-value-updated,
    body.dashboard-page-leaving .dashboard-kpi-grid,
    body.dashboard-page-leaving .dashboard-ledger-grid,
    body.dashboard-page-leaving .dashboard-filter-card,
    body.dashboard-page-leaving .dashboard-filter-card .dashboard-filter-field,
    body.dashboard-page-leaving .dashboard-filter-card .dashboard-filter-button {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ========================= v9.4.9 dashboard title accent bars ========================= */
.dashboard-kpi-card .kpi-label {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 30px;
    padding-left: 12px;
}

.dashboard-kpi-card .kpi-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2f78aa 0%, #75add1 100%);
    box-shadow: 0 1px 4px rgba(47, 120, 170, .18);
    transform: translateY(-50%);
}

.dashboard-ledger-card > .card-head h2 {
    position: relative;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding-left: 13px;
}

.dashboard-ledger-card > .card-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2f78aa 0%, #75add1 100%);
    box-shadow: 0 1px 4px rgba(47, 120, 170, .18);
    transform: translateY(-50%);
}

/* ========================= v9.5.1 dashboard monthly sales charts ========================= */
.dashboard-sales-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    align-items: stretch;
}

.dashboard-chart-card {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    animation: dashboardLedgerRise .72s cubic-bezier(.2,.82,.22,1) both;
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.dashboard-chart-card:nth-child(1) { animation-delay: 1.08s; }
.dashboard-chart-card:nth-child(2) { animation-delay: 1.18s; }

.dashboard-chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 11px 23px rgba(26, 58, 86, .10);
    border-color: #c8d8e5;
}

.dashboard-chart-card > .card-head {
    min-height: 44px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--line);
}

.dashboard-chart-card > .card-head h2 {
    position: relative;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding-left: 13px;
    margin: 0;
    font-size: 10.5pt;
    font-weight: 700;
    overflow: hidden;
}

.dashboard-chart-card > .card-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2f78aa 0%, #75add1 100%);
    box-shadow: 0 1px 4px rgba(47, 120, 170, .18);
    transform: translateY(-50%);
}

.dashboard-chart-card > .card-head h2::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 7px;
    border-radius: 50%;
    vertical-align: 1px;
    background: #4b8db8;
    box-shadow: 0 0 0 0 rgba(75,141,184,.28);
    animation: dashboardTitlePulse 1.65s ease-out 1.36s 2;
}

.dashboard-chart-wrap {
    position: relative;
    height: 285px;
    padding: 12px 13px 10px;
}

.dashboard-highchart {
    width: 100%;
    height: 100%;
    min-width: 0;
}

.dashboard-highchart .highcharts-container,
.dashboard-highchart .highcharts-root {
    font-family: Calibri, Candara, "Segoe UI", Arial, sans-serif !important;
}

body.dashboard-page-leaving .dashboard-sales-chart-grid {
    opacity: .32;
    transform: translateY(5px) scale(.994);
    filter: blur(1.4px);
    transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

@media (max-width: 980px) {
    .dashboard-sales-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-chart-card,
    .dashboard-chart-card > .card-head h2::after,
    body.dashboard-page-leaving .dashboard-sales-chart-grid {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}



/* ========================= Sales report presentation ========================= */
.report-datatable + .dataTables_wrapper,
.report-card .dataTables_wrapper { min-width: 0; }
.report-card .dt-toolbar-left:empty { display: none; }
.report-card .dt-footer { min-height: 40px; padding-top: 7px; padding-bottom: 7px; }

.report-fit-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}
.report-fit-wrapper .dataTables_wrapper,
.report-fit-wrapper .dt-table-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
}
.sales-analysis-fit-table,
.sales-analysis-fit-table.dataTable {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed;
    margin: 0 !important;
    font-size: 7.45pt;
}
.sales-analysis-fit-table thead th {
    padding: 6px 3px !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.12;
    text-align: center !important;
    vertical-align: middle !important;
    font-size: 7.1pt;
}
.sales-analysis-fit-table tbody td {
    padding: 5px 3px !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.15;
    vertical-align: middle !important;
}
.sales-analysis-fit-table tbody td.amount { white-space: nowrap !important; }
.sales-analysis-fit-table .text-mono { white-space: nowrap !important; }

.sales-analysis-district-table th:nth-child(1) { width: 5%; }
.sales-analysis-district-table th:nth-child(2) { width: 11%; }
.sales-analysis-district-table th:nth-child(3) { width: 7%; }
.sales-analysis-district-table th:nth-child(4) { width: 11%; }
.sales-analysis-district-table th:nth-child(5) { width: 12%; }
.sales-analysis-district-table th:nth-child(6) { width: 13%; }
.sales-analysis-district-table th:nth-child(7) { width: 13%; }
.sales-analysis-district-table th:nth-child(8) { width: 9%; }
.sales-analysis-district-table th:nth-child(9) { width: 11%; }
.sales-analysis-district-table th:nth-child(10) { width: 8%; }

.sales-analysis-clusters-table th:nth-child(1) { width: 4%; }
.sales-analysis-clusters-table th:nth-child(2) { width: 7%; }
.sales-analysis-clusters-table th:nth-child(3) { width: 7%; }
.sales-analysis-clusters-table th:nth-child(4) { width: 8%; }
.sales-analysis-clusters-table th:nth-child(5) { width: 8%; }
.sales-analysis-clusters-table th:nth-child(6) { width: 9%; }
.sales-analysis-clusters-table th:nth-child(7) { width: 9%; }
.sales-analysis-clusters-table th:nth-child(8) { width: 12%; }
.sales-analysis-clusters-table th:nth-child(9) { width: 11%; }
.sales-analysis-clusters-table th:nth-child(10) { width: 8%; }
.sales-analysis-clusters-table th:nth-child(11) { width: 10%; }
.sales-analysis-clusters-table th:nth-child(12) { width: 7%; }

/* ========================= Main Dashboard Consumption & Conversion ========================= */
.dashboard-consumption-card {
    margin: 10px 0 0;
    overflow: hidden;
    opacity: 0;
    animation: dashboardLedgerRise .70s cubic-bezier(.2,.82,.22,1) .84s both;
    border-color: #d7e1e9;
    background: #fff;
    box-shadow: 0 5px 16px rgba(26, 58, 86, .055);
    transition: border-color .24s ease, box-shadow .24s ease, transform .24s ease;
}

.dashboard-consumption-card:hover {
    border-color: #c4d5e2;
    box-shadow: 0 10px 24px rgba(26, 58, 86, .085);
}

.dashboard-consumption-card > .card-head {
    min-height: 46px;
    padding: 7px 13px;
    border-bottom: 1px solid #dbe4eb;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.dashboard-consumption-card > .card-head h2 {
    position: relative;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding-left: 13px;
    color: var(--ink-950);
    font-size: 10.5pt;
    font-weight: 700;
}

.dashboard-consumption-card > .card-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2f78aa 0%, #75add1 100%);
    box-shadow: 0 1px 4px rgba(47, 120, 170, .18);
    transform: translateY(-50%);
}

.dashboard-consumption-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    background: #f6f8fa;
}


.dashboard-consumption-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    background: transparent;
}

.dashboard-consumption-kpi-card {
    min-width: 0;
    min-height: 102px;
    margin: 0;
    padding: 12px 13px 11px;
    border-color: #dce5ec;
    border-radius: 7px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    box-shadow: 0 2px 7px rgba(22, 53, 79, .045);
}

.dashboard-consumption-kpi-card:hover {
    border-color: #bfd3e1;
    box-shadow: 0 10px 20px rgba(26, 58, 86, .105);
}

.dashboard-consumption-kpi-card .kpi-top {
    align-items: flex-start;
}

.dashboard-consumption-kpi-card .kpi-label {
    min-height: 29px;
    display: flex;
    align-items: center;
    white-space: normal;
    line-height: 1.18;
    color: #5c6c79;
    font-size: 7.25pt;
    letter-spacing: .3px;
}

.dashboard-consumption-kpi-card .kpi-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-color: #d3e0e9;
    border-radius: 7px;
    color: #3478a8;
    background: linear-gradient(180deg, #f8fbfd 0%, #eef5f9 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
}

.dashboard-consumption-kpi-card .kpi-value {
    margin-top: 10px;
    color: #18324a;
    font-size: 18pt;
    font-weight: 700;
    letter-spacing: -.2px;
}

.dashboard-consumption-percent-card {
    border-color: #cbdce8;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
}

.dashboard-consumption-percent-card .kpi-value {
    color: #2f709c;
}

.dashboard-consumption-progress {
    width: 100%;
    height: 3px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eff4;
}

.dashboard-consumption-progress > span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, #5b97bf 0%, #2f78aa 100%);
    transform-origin: left center;
    animation: dashboardConsumptionProgress 1.05s cubic-bezier(.2,.82,.22,1) 1.25s both;
}

.dashboard-consumption-kpi-card:nth-child(1) { animation-delay: .90s !important; }
.dashboard-consumption-kpi-card:nth-child(2) { animation-delay: .96s !important; }
.dashboard-consumption-kpi-card:nth-child(3) { animation-delay: 1.02s !important; }
.dashboard-consumption-kpi-card:nth-child(4) { animation-delay: 1.08s !important; }
.dashboard-consumption-kpi-card:nth-child(5) { animation-delay: 1.14s !important; }
.dashboard-consumption-kpi-card:nth-child(6) { animation-delay: 1.20s !important; }
.dashboard-consumption-kpi-card:nth-child(7) { animation-delay: 1.26s !important; }
.dashboard-consumption-kpi-card:nth-child(8) { animation-delay: 1.32s !important; }

.dashboard-consumption-kpi-card:nth-child(1)::before { animation-delay: 1.08s !important; }
.dashboard-consumption-kpi-card:nth-child(2)::before { animation-delay: 1.14s !important; }
.dashboard-consumption-kpi-card:nth-child(3)::before { animation-delay: 1.20s !important; }
.dashboard-consumption-kpi-card:nth-child(4)::before { animation-delay: 1.26s !important; }
.dashboard-consumption-kpi-card:nth-child(5)::before { animation-delay: 1.32s !important; }
.dashboard-consumption-kpi-card:nth-child(6)::before { animation-delay: 1.38s !important; }
.dashboard-consumption-kpi-card:nth-child(7)::before { animation-delay: 1.44s !important; }
.dashboard-consumption-kpi-card:nth-child(8)::before { animation-delay: 1.50s !important; }

.dashboard-consumption-kpi-card:nth-child(1) .kpi-icon { animation-delay: 1.04s !important; }
.dashboard-consumption-kpi-card:nth-child(2) .kpi-icon { animation-delay: 1.10s !important; }
.dashboard-consumption-kpi-card:nth-child(3) .kpi-icon { animation-delay: 1.16s !important; }
.dashboard-consumption-kpi-card:nth-child(4) .kpi-icon { animation-delay: 1.22s !important; }
.dashboard-consumption-kpi-card:nth-child(5) .kpi-icon { animation-delay: 1.28s !important; }
.dashboard-consumption-kpi-card:nth-child(6) .kpi-icon { animation-delay: 1.34s !important; }
.dashboard-consumption-kpi-card:nth-child(7) .kpi-icon { animation-delay: 1.40s !important; }
.dashboard-consumption-kpi-card:nth-child(8) .kpi-icon { animation-delay: 1.46s !important; }

@keyframes dashboardConsumptionProgress {
    from { transform: scaleX(0); opacity: .25; }
    to { transform: scaleX(1); opacity: 1; }
}

body.dashboard-page-leaving .dashboard-consumption-card {
    opacity: .32;
    transform: translateY(5px) scale(.994);
    filter: blur(1.4px);
    transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

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

@media (max-width: 700px) {
    .dashboard-consumption-body {
        padding: 8px;
    }

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

@media (max-width: 460px) {
    .dashboard-consumption-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-consumption-card,
    .dashboard-consumption-progress > span,
    body.dashboard-page-leaving .dashboard-consumption-card {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}


/* ========================= Main Dashboard Inventory Flow ========================= */
.dashboard-inventory-flow-card {
    margin: 10px 0 0;
    overflow: hidden;
    opacity: 0;
    border-color: #d7e1e9;
    background: #fff;
    box-shadow: 0 5px 16px rgba(26, 58, 86, .055);
    animation: dashboardLedgerRise .70s cubic-bezier(.2,.82,.22,1) .84s both;
    transition: border-color .24s ease, box-shadow .24s ease, transform .24s ease;
}

.dashboard-inventory-flow-card:hover {
    border-color: #c4d5e2;
    box-shadow: 0 10px 24px rgba(26, 58, 86, .085);
}

.dashboard-inventory-flow-card > .card-head {
    min-height: 46px;
    padding: 7px 13px;
    border-bottom: 1px solid #dbe4eb;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.dashboard-inventory-flow-card > .card-head h2 {
    position: relative;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding-left: 13px;
    color: var(--ink-950);
    font-size: 10.5pt;
    font-weight: 700;
}

.dashboard-inventory-flow-card > .card-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2f78aa 0%, #75add1 100%);
    box-shadow: 0 1px 4px rgba(47, 120, 170, .18);
    transform: translateY(-50%);
}

.dashboard-inventory-flow-body {
    padding: 10px;
    background: #f6f8fa;
}

.dashboard-inventory-flow-body .dashboard-ledger-grid {
    margin-top: 0;
    align-items: stretch;
}

.dashboard-inventory-flow-body .dashboard-ledger-card {
    border-color: #dde6ed;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(22, 53, 79, .045), inset 0 1px 0 rgba(255,255,255,.85);
}

.dashboard-inventory-flow-body .dashboard-ledger-card:hover {
    border-color: #bfd3e1;
    box-shadow: 0 10px 20px rgba(26, 58, 86, .095);
}

.dashboard-inventory-flow-body .dashboard-ledger-card > .card-head {
    min-height: 42px;
    padding: 7px 11px;
    border-bottom-color: #e2e9ee;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.dashboard-inventory-flow-body .dashboard-ledger-card > .card-head h2 {
    color: #344f64;
    font-size: 9.5pt;
}

.dashboard-inventory-flow-body .dashboard-ledger-table thead th {
    background: #f5f8fa;
}

body.dashboard-page-leaving .dashboard-inventory-flow-card {
    opacity: .32;
    transform: translateY(5px) scale(.994);
    filter: blur(1.4px);
    transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

@media (max-width: 980px) {
    .dashboard-inventory-flow-body {
        padding: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-inventory-flow-card,
    body.dashboard-page-leaving .dashboard-inventory-flow-card {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ========================= Documents Library ========================= */
.documents-library-card {
    overflow: hidden;
    border-color: #d8e2ea;
    background: #fff;
    box-shadow: 0 5px 18px rgba(25, 56, 82, .055);
    animation: documentsLibraryEnter .56s cubic-bezier(.2,.82,.22,1) both;
}

.documents-library-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #2f78aa 0%, #6ba6cd 44%, #3f8581 100%);
}

.documents-library-head {
    min-height: 72px;
    padding: 13px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.documents-title-wrap {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.documents-title-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 1px solid #cfe0eb;
    border-radius: 10px;
    color: #2f78aa;
    background: linear-gradient(145deg, #f7fbfd 0%, #eaf3f8 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 4px 10px rgba(47,120,170,.08);
    font-size: 15pt;
}

.documents-library-head h2 {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding-left: 13px;
    font-size: 13pt;
}

.documents-library-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2f78aa 0%, #75add1 100%);
    box-shadow: 0 1px 4px rgba(47,120,170,.18);
    transform: translateY(-50%);
}

.documents-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid #d6e2eb;
    border-radius: 999px;
    color: #496277;
    background: #f8fafc;
    font-size: 8pt;
    font-weight: 700;
    white-space: nowrap;
}

.documents-count-pill .bi { color: #c54848; }

.documents-library-body {
    padding: 16px;
    background:
        radial-gradient(circle at 8% 5%, rgba(73,132,171,.055), transparent 25%),
        radial-gradient(circle at 94% 14%, rgba(63,133,129,.045), transparent 24%),
        #f6f8fa;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.document-card {
    --doc-accent: #2f78aa;
    --doc-accent-soft: rgba(47,120,170,.11);
    position: relative;
    min-width: 0;
    min-height: 272px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 15px;
    border: 1px solid #dce4eb;
    border-radius: 11px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    box-shadow: 0 2px 8px rgba(24, 52, 75, .045), inset 0 1px 0 rgba(255,255,255,.95);
    opacity: 0;
    transform: translateY(12px) scale(.988);
    animation: documentCardEnter .58s cubic-bezier(.2,.82,.22,1) calc(.12s + (var(--document-order) * .08s)) forwards;
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
    isolation: isolate;
}

.document-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    height: 3px;
    background: linear-gradient(90deg, var(--doc-accent) 0%, color-mix(in srgb, var(--doc-accent) 58%, white) 100%);
}

.document-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -52%;
    z-index: 1;
    width: 34%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.72) 48%, transparent 100%);
    opacity: 0;
    transform: skewX(-18deg);
}

.document-card:hover,
.document-card:focus-within {
    border-color: color-mix(in srgb, var(--doc-accent) 32%, #dce4eb);
    box-shadow: 0 14px 28px rgba(24, 52, 75, .11), 0 2px 5px rgba(24, 52, 75, .04);
    transform: translateY(-4px);
}

.document-card:hover::after,
.document-card:focus-within::after {
    animation: documentCardShimmer .78s ease-out;
}

.document-card-blue {
    --doc-accent: #2f78aa;
    --doc-accent-soft: rgba(47,120,170,.11);
}
.document-card-teal {
    --doc-accent: #3f8581;
    --doc-accent-soft: rgba(63,133,129,.11);
}
.document-card-indigo {
    --doc-accent: #6575a9;
    --doc-accent-soft: rgba(101,117,169,.11);
}
.document-card-navy {
    --doc-accent: #36566f;
    --doc-accent-soft: rgba(54,86,111,.11);
}

.document-card-glow {
    position: absolute;
    top: -54px;
    right: -45px;
    z-index: 0;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, var(--doc-accent-soft) 0%, rgba(255,255,255,0) 70%);
    transition: transform .35s ease, opacity .35s ease;
}

.document-card:hover .document-card-glow {
    transform: scale(1.16) translate(-4px, 4px);
}

.document-card-number {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 0;
    color: rgba(61,82,99,.055);
    font-size: 34pt;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -2px;
    user-select: none;
}

.document-card-top,
.document-card-copy,
.document-card-footer {
    position: relative;
    z-index: 3;
}

.document-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.document-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--doc-accent) 24%, #d9e3ea);
    border-radius: 12px;
    color: var(--doc-accent);
    background: linear-gradient(145deg, #ffffff 0%, color-mix(in srgb, var(--doc-accent-soft) 70%, #f7fafc) 100%);
    box-shadow: 0 5px 12px rgba(23,52,75,.07), inset 0 1px 0 rgba(255,255,255,.95);
    font-size: 18pt;
    transition: transform .26s cubic-bezier(.2,.82,.22,1), box-shadow .26s ease;
}

.document-card:hover .document-icon {
    transform: translateY(-2px) rotate(-2deg) scale(1.045);
    box-shadow: 0 8px 16px rgba(23,52,75,.10), inset 0 1px 0 rgba(255,255,255,.95);
}

.document-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    border: 1px solid #e0e5ea;
    border-radius: 999px;
    color: #687787;
    background: rgba(255,255,255,.84);
    font-size: 7.2pt;
    font-weight: 700;
    letter-spacing: .25px;
}

.document-type .bi { color: #c54848; }

.document-card-copy {
    flex: 1;
    padding-top: 18px;
}

.document-card-copy h3 {
    margin: 0;
    color: #183047;
    font-size: 12.2pt;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -.1px;
}

.document-card-copy p {
    margin: 8px 0 0;
    color: #687787;
    font-size: 8.5pt;
    line-height: 1.45;
}

.document-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #edf1f4;
}

.document-file-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #7a8794;
    font-size: 7.6pt;
    font-weight: 600;
    white-space: nowrap;
}

.document-file-meta .bi { color: var(--doc-accent); }

.document-download-btn {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 9px 6px 11px;
    border: 1px solid color-mix(in srgb, var(--doc-accent) 78%, #0e2a40);
    border-radius: 6px;
    color: #fff;
    background: var(--doc-accent);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--doc-accent) 18%, transparent);
    font-size: 8.2pt;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.document-download-btn:hover,
.document-download-btn:focus {
    color: #fff;
    filter: brightness(.94);
    box-shadow: 0 7px 14px color-mix(in srgb, var(--doc-accent) 24%, transparent);
    transform: translateY(-1px);
}

.document-download-btn .bi {
    font-size: 10pt;
    transition: transform .18s ease;
}

.document-download-btn:hover .bi,
.document-download-btn:focus .bi {
    transform: translateY(2px);
}

.document-download-btn.disabled {
    pointer-events: none;
    border-color: #c8d0d7;
    color: #7d8791;
    background: #eef1f4;
    box-shadow: none;
}

.document-card-unavailable {
    filter: grayscale(.25);
}

.documents-maintenance-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid #d7e4ec;
    border-radius: 8px;
    color: #526878;
    background: linear-gradient(180deg, #fbfdfe 0%, #f5f9fb 100%);
    font-size: 8.2pt;
    animation: documentsNoteEnter .55s ease .48s both;
}

.documents-note-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #2f78aa;
    background: #eaf3f8;
    font-size: 11pt;
}

.documents-maintenance-note strong {
    display: block;
    margin-bottom: 2px;
    color: #29475d;
    font-size: 8.6pt;
}

.documents-maintenance-note span { display: block; }
.documents-maintenance-note code {
    padding: 1px 4px;
    border-radius: 3px;
    color: #2b6288;
    background: #eaf2f7;
    font-size: 7.8pt;
}

@keyframes documentsLibraryEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes documentCardEnter {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes documentCardShimmer {
    0% { left: -52%; opacity: 0; }
    18% { opacity: .52; }
    100% { left: 122%; opacity: 0; }
}

@keyframes documentsNoteEnter {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
    .documents-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .documents-library-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
    .documents-library-body { padding: 11px; }
    .documents-grid { grid-template-columns: 1fr; }
    .document-card { min-height: 242px; }
    .documents-maintenance-note { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .documents-library-card,
    .document-card,
    .documents-maintenance-note,
    .document-card:hover::after,
    .document-card:focus-within::after {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .document-card,
    .document-icon,
    .document-download-btn,
    .document-download-btn .bi,
    .document-card-glow {
        transition: none !important;
    }
}

/* ================================================================
   Period Lock - professional administration screen
   ================================================================ */
.period-lock-page {
    --pl-blue: #1769aa;
    --pl-blue-soft: #edf5fb;
    --pl-ink: #102a43;
    --pl-muted: #667085;
    --pl-border: #dbe4ec;
}
.period-lock-control-card,
.period-lock-history-card {
    overflow: hidden;
    border: 1px solid var(--pl-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(20,48,74,.06);
}
.period-lock-control-card { animation: periodLockEnter .42s ease both; }
.period-lock-history-card { margin-top: 14px; animation: periodLockEnter .46s ease .06s both; }
.period-lock-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 14px 16px 14px 20px;
    border-bottom: 1px solid #e5ebf0;
    background: linear-gradient(180deg,#fff 0%,#fbfdff 100%);
}
.period-lock-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15px;
    bottom: 15px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg,#2f78aa 0%,#75add1 100%);
}
.period-lock-title-wrap { display:flex; align-items:center; gap:11px; min-width:0; }
.period-lock-title-icon {
    width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center;
    border:1px solid #cddfea; border-radius:9px; color:var(--pl-blue);
    background:linear-gradient(145deg,#fff 0%,#edf5fb 100%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.92); font-size:15px;
}
.period-lock-head h2 { margin:0; color:var(--pl-ink); font-size:13pt; line-height:1.18; font-weight:700; }
.period-lock-head p { margin:3px 0 0; color:var(--pl-muted); font-size:8.3pt; line-height:1.35; }
.period-lock-status {
    min-width:122px; display:inline-flex; align-items:center; justify-content:center; gap:7px;
    padding:7px 10px; border:1px solid; border-radius:999px; font-size:8pt; line-height:1;
    font-weight:700; white-space:nowrap;
}
.period-lock-status.is-open { border-color:#b9dbc7; color:#267247; background:#f1fbf5; }
.period-lock-status.is-locked { border-color:#efc4c4; color:#a53c3c; background:#fff5f5; }
.period-lock-body {
    display:grid; grid-template-columns:minmax(0,1.55fr) minmax(250px,.85fr);
    gap:14px; padding:14px; background:#f8fafc;
}
.period-lock-form-panel,
.period-lock-info-panel { border:1px solid #e1e8ee; border-radius:9px; background:#fff; }
.period-lock-form-panel { padding:14px; }
.period-lock-section-label {
    display:flex; align-items:center; gap:7px; margin-bottom:12px;
    color:#29475d; font-size:8.5pt; font-weight:700;
}
.period-lock-section-label i { color:var(--pl-blue); }
.period-lock-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.period-lock-field-wide { grid-column:1 / -1; }
.period-lock-form-panel .form-label { margin-bottom:5px; color:#344054; font-size:8.5pt; font-weight:650; }
.period-lock-form-panel .form-control {
    min-height:38px; border-color:#cbd7e2; border-radius:6px; background:#fff; font-size:9pt;
}
.period-lock-form-panel .form-control:focus {
    border-color:#6c9fc5; box-shadow:0 0 0 3px rgba(23,105,170,.09);
}
.period-lock-form-actions {
    display:flex; align-items:center; justify-content:flex-end; gap:10px;
    margin-top:13px; padding-top:12px; border-top:1px solid #edf1f4;
}
.period-lock-submit {
    min-width:145px; min-height:36px; border-radius:6px;
    box-shadow:0 5px 12px rgba(23,105,170,.14);
}
.period-lock-info-panel { overflow:hidden; }
.period-lock-info-head {
    padding:11px 12px; border-bottom:1px solid #e8edf2; color:#29475d;
    background:#fbfdff; font-size:8.5pt; font-weight:700;
}
.period-lock-info-list { display:grid; }
.period-lock-info-item {
    display:grid; grid-template-columns:31px minmax(0,1fr); gap:9px; align-items:center;
    padding:10px 12px; border-bottom:1px solid #eef2f5;
}
.period-lock-info-item:last-child { border-bottom:0; }
.period-lock-info-icon {
    width:31px; height:31px; display:grid; place-items:center; border-radius:8px;
    color:var(--pl-blue); background:var(--pl-blue-soft); font-size:11px;
}
.period-lock-info-item strong { display:block; margin-bottom:2px; color:#344054; font-size:8.2pt; line-height:1.2; }
.period-lock-info-item span { display:block; color:#748091; font-size:7.6pt; line-height:1.32; }
.period-lock-admin-note {
    display:flex; gap:8px; align-items:flex-start; margin:0 12px 12px; padding:9px 10px;
    border:1px solid #efd7b9; border-radius:7px; color:#71512d; background:#fffaf2;
    font-size:7.7pt; line-height:1.35;
}
.period-lock-admin-note i { margin-top:1px; color:#b46c18; }
.period-lock-history-head {
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    min-height:58px; padding:11px 14px 11px 18px; border-bottom:1px solid #e4eaf0; background:#fff;
}
.period-lock-history-title { position:relative; padding-left:12px; }
.period-lock-history-title::before {
    content:""; position:absolute; left:0; top:50%; width:4px; height:28px;
    border-radius:999px; transform:translateY(-50%);
    background:linear-gradient(180deg,#2f78aa 0%,#75add1 100%);
}
.period-lock-history-title h2 { margin:0; color:var(--pl-ink); font-size:11.8pt; font-weight:700; }
.period-lock-history-title p { margin:3px 0 0; color:#7a8696; font-size:7.8pt; }
.period-lock-count {
    display:inline-flex; align-items:center; gap:6px; padding:6px 9px;
    border:1px solid #d9e4ec; border-radius:999px; color:#4b6477;
    background:#f7fafc; font-size:7.8pt; font-weight:700; white-space:nowrap;
}
.period-lock-history-card .table-responsive { padding:0 12px 12px; }
.period-lock-history-card .app-datatable { margin-bottom:0; }
.period-lock-history-card .app-datatable thead th { white-space:nowrap; }
.period-lock-history-card .inline-delete .btn { min-width:82px; border-radius:5px; }
.period-lock-empty { padding:22px 14px !important; color:#7b8794 !important; text-align:center; }
.period-lock-empty i { display:block; margin-bottom:6px; color:#93a8b8; font-size:18px; }
@keyframes periodLockEnter {
    from { opacity:0; transform:translateY(7px); }
    to { opacity:1; transform:translateY(0); }
}
@media (max-width:940px) {
    .period-lock-body { grid-template-columns:1fr; }
}
@media (max-width:640px) {
    .period-lock-head,
    .period-lock-history-head { align-items:flex-start; flex-direction:column; }
    .period-lock-status { align-self:flex-start; }
    .period-lock-form-grid { grid-template-columns:1fr; }
    .period-lock-field-wide { grid-column:auto; }
    .period-lock-form-actions { justify-content:stretch; }
    .period-lock-submit { width:100%; }
}
@media (prefers-reduced-motion:reduce) {
    .period-lock-control-card,
    .period-lock-history-card { animation:none !important; }
}

/* ========================= Main Dashboard Consumption & Conversion - top accent ========================= */
.dashboard-consumption-kpi-card {
    border-top: 3px solid #4b8db8;
}

.dashboard-consumption-kpi-card .kpi-label {
    padding-left: 0;
}

.dashboard-consumption-kpi-card .kpi-label::before {
    display: none;
}

/* ========================= Main Dashboard Inventory Flow - ledger top accent ========================= */
.dashboard-inventory-flow-body .dashboard-ledger-card {
    border-top: 3px solid #4b8db8;
}

.dashboard-inventory-flow-body .dashboard-ledger-card > .card-head h2 {
    padding-left: 0;
}

.dashboard-inventory-flow-body .dashboard-ledger-card > .card-head h2::before {
    display: none;
}
