:root {
    --bg: #f8f9fa;
    --surface: #ffffff;
    --surface-soft: #f6f8fb;
    --surface-hover: #fbfcfe;
    --ink: #182230;
    --ink-soft: #344054;
    --muted: #667085;
    --muted-2: #98a2b3;
    --line: #e5e7eb;
    --line-strong: #d0d5dd;
    --brand: #184e8f;
    --brand-2: #2563a7;
    --brand-soft: #eaf2fb;
    --green: #177e63;
    --green-soft: #e8f6f0;
    --amber: #b7791f;
    --amber-soft: #fff7e6;
    --red: #b94743;
    --red-soft: #fff0f0;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-md: 0 14px 36px rgba(16, 24, 40, .08);
    --radius: 12px;
    --radius-sm: 10px;
    --sidebar-width: 284px;
    --sidebar-closed: 88px;
}

.nav-menu a {
    position: relative;
}

.nav-badge {
    min-width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    padding: 0 6px;
    font-size: .68rem;
    font-weight: 850;
    line-height: 1;
}

body.sidebar-collapsed .nav-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 9px;
    width: 9px;
    height: 9px;
    padding: 0;
    color: transparent;
}

.record-box-card.tone-final-approval,
.record-box-card.tone-final-approval-pending,
.record-box-card.tone-pending,
.record-box-card.tone-pending-director,
.record-box-card.tone-payment-pending {
    color: #b7791f;
    background: #fff6d7;
    border-color: #efd082;
}

.record-box-card.tone-paid,
.record-box-card.tone-approved,
.record-box-card.tone-completed {
    color: #177e63;
    background: #eaf8f0;
    border-color: #b8e3d0;
}

.record-box-card.tone-cancelled,
.record-box-card.tone-rejected,
.record-box-card.tone-terminated {
    color: #be4b62;
    background: #ffe9ef;
    border-color: #f4b6c5;
}

.record-box-card.tone-draft,
.record-box-card.tone-inactive,
.record-box-card.tone-returned {
    color: #667085;
    background: #f2f4f7;
    border-color: #d0d5dd;
}

.record-status-pill {
    background: rgba(255, 255, 255, .74);
    color: currentColor;
    box-shadow: inset 0 0 0 1px currentColor;
}

.expense-card-grid .record-status-pill {
    color: currentColor;
    background: rgba(255, 255, 255, .82);
}

.metric-card.employee-active {
    color: #8a7447;
    background: #ede8da;
}

.metric-card.employee-active span:first-child {
    color: #8a7447;
    background: #f7f3e9;
}

.metric-card.employee-terminated {
    color: #be4b62;
    background: #ffe9ef;
}

.metric-card.employee-terminated span:first-child {
    color: #be4b62;
    background: #ffd7e1;
}

.metric-card.employee-inactive {
    color: #667085;
    background: #f2f4f7;
}

.metric-card.employee-inactive span:first-child {
    color: #667085;
    background: #e4e7ec;
}

.employee-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .72rem;
    font-weight: 850;
    white-space: nowrap;
}

.employee-status-pill.employee-active {
    color: #7a6538;
    background: #ede8da;
}

.employee-status-pill.employee-terminated {
    color: #9f1239;
    background: #ffd7e1;
}

.employee-status-pill.employee-inactive {
    color: #475467;
    background: #e4e7ec;
}

.employee-photo-avatar {
    overflow: hidden;
    border-radius: 999px;
}

.employee-photo-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.employee-photo-avatar.xl {
    width: 76px;
    height: 76px;
    font-size: 1.4rem;
}

.employee-profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 16px;
}

.employee-profile-hero h2 {
    margin: 0;
    color: var(--ink);
    font-weight: 850;
}

.employee-profile-hero p {
    margin: 5px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.financial-centered-card {
    align-items: center;
    text-align: center;
}

.reconciliation-grid {
    display: grid;
    gap: 16px;
}

.reconciliation-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.reconciliation-card.has-alerts {
    border-color: #efd082;
    background: #fffaf0;
}

.reconciliation-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reconciliation-head h3 {
    margin: 0;
    color: var(--ink);
    font-weight: 850;
}

.reconciliation-alerts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.reconciliation-alerts span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: #fff6d7;
    color: #875314;
    padding: 6px 10px;
    font-size: .78rem;
    font-weight: 850;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover { color: var(--brand-2); }

::selection {
    background: var(--brand-soft);
    color: var(--brand);
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 167, .22);
    outline-offset: 2px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    transition: grid-template-columns .22s ease;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: var(--sidebar-closed) minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    background: #ffffff;
    border-right: 1px solid var(--line);
    padding: 18px;
    z-index: 30;
    box-shadow: 1px 0 0 rgba(16, 24, 40, .02);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
}

.brand:hover { color: var(--ink); }

.brand-mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(24, 78, 143, .22);
}

.brand-mark.large {
    width: 64px;
    height: 64px;
    font-size: 1.35rem;
}

.brand-mark.logo-mark {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(208, 213, 221, .84);
    padding: 4px;
}

.brand-mark.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    min-width: 0;
}

.brand strong {
    font-size: .98rem;
    font-weight: 750;
    line-height: 1.15;
}

.brand small {
    color: var(--muted);
    font-size: .78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-collapse {
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--surface-soft);
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.sidebar-collapse:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

body.sidebar-collapsed .sidebar-collapse i { transform: rotate(180deg); }

.nav-menu {
    display: grid;
    gap: 18px;
    overflow-y: auto;
    padding-right: 2px;
}

.nav-group {
    display: grid;
    gap: 4px;
}

.nav-group-label {
    padding: 0 12px 6px;
    color: var(--muted-2);
    font-size: .7rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0;
}

.nav-menu a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-weight: 600;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.nav-menu a i {
    width: 20px;
    text-align: center;
    color: var(--muted);
    transition: color .16s ease;
}

.nav-menu a:hover {
    background: var(--surface-soft);
    color: var(--ink);
    transform: translateX(2px);
}

.nav-menu a.active {
    background: var(--brand-soft);
    color: var(--brand);
}

.nav-menu a.active::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 11px;
    bottom: 11px;
    width: 3px;
    border-radius: 99px;
    background: var(--brand);
}

.nav-menu a.active i { color: var(--brand); }

.sidebar-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: .86rem;
    background: var(--surface-soft);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(23, 126, 99, .12);
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-group-label,
body.sidebar-collapsed .nav-menu a span,
body.sidebar-collapsed .sidebar-foot span:not(.status-dot) {
    display: none;
}

body.sidebar-collapsed .sidebar {
    align-items: center;
    padding-inline: 14px;
}

body.sidebar-collapsed .sidebar-head {
    flex-direction: column;
}

body.sidebar-collapsed .nav-menu a {
    justify-content: center;
    width: 50px;
}

body.sidebar-collapsed .nav-menu a:hover {
    transform: none;
}

.main-panel {
    min-width: 0;
    background: var(--bg);
}

.topbar {
    min-height: 88px;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 28px;
    background: rgba(248, 249, 250, .88);
    border-bottom: 1px solid rgba(229, 231, 235, .9);
    backdrop-filter: blur(14px);
}

.topbar-title {
    min-width: 180px;
}

.topbar h1,
.panel h2,
.month-hero h2,
.allocation-hero h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 750;
    line-height: 1.22;
}

.breadcrumb-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 600;
}

.breadcrumb-line i {
    color: var(--muted-2);
    font-size: .65rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.global-search {
    width: min(360px, 32vw);
    min-width: 220px;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .88);
    color: var(--muted);
    box-shadow: var(--shadow-sm);
}

.global-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.global-search input::placeholder {
    color: var(--muted-2);
}

.user-menu {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    padding: 5px 10px 5px 5px;
    box-shadow: var(--shadow-sm);
}

.avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    font-weight: 750;
}

.user-copy {
    display: grid;
    text-align: left;
    line-height: 1.1;
}

.user-copy strong {
    font-size: .88rem;
    font-weight: 700;
}

.user-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .72rem;
}

.content-wrap {
    width: min(1680px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--brand);
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.panel-subtitle,
.allocation-hero p:last-child,
.month-hero p:last-child {
    color: var(--muted);
    margin: 6px 0 0;
}

.alert {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.alert-success {
    color: #0f5f4a;
    background: var(--green-soft);
}

.alert-danger {
    color: #8b2f2b;
    background: var(--red-soft);
}

.btn {
    --bs-btn-border-radius: 10px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: 0;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

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

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-2);
    --bs-btn-hover-border-color: var(--brand-2);
    box-shadow: 0 10px 22px rgba(24, 78, 143, .18);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: #bfd0e5;
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    background: #fff;
}

.btn-outline-secondary {
    --bs-btn-color: var(--ink-soft);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-bg: var(--surface-soft);
    --bs-btn-hover-border-color: var(--line-strong);
    --bs-btn-hover-color: var(--ink);
    background: #fff;
}

.btn:disabled,
.btn.disabled {
    opacity: .52;
    transform: none;
    box-shadow: none;
}

.icon-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease;
}

.icon-btn:hover {
    color: var(--brand);
    border-color: #bdd0e8;
    background: var(--brand-soft);
    transform: translateY(-1px);
}

.icon-btn.success:hover {
    color: var(--green);
    border-color: #b7dfd1;
    background: var(--green-soft);
}

.icon-btn.danger:hover {
    color: var(--red);
    border-color: #e7b8b5;
    background: var(--red-soft);
}

.toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.toolbar.compact {
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.toolbar .form-control,
.toolbar .form-select {
    min-width: 210px;
}

.toolbar.compact .form-control,
.toolbar.compact .form-select {
    width: auto;
    flex: 1 1 190px;
}

.toolbar.compact .btn {
    flex: 0 0 auto;
}

.form-label {
    color: var(--ink-soft);
    font-size: .86rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    min-height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background-color: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.form-control::placeholder {
    color: var(--muted-2);
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: #8bb5df;
    box-shadow: 0 0 0 .22rem rgba(24, 78, 143, .12);
}

.checkbox-dropdown {
    position: relative;
}

.checkbox-dropdown summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 8px 12px;
    cursor: pointer;
    list-style: none;
}

.checkbox-dropdown summary::-webkit-details-marker {
    display: none;
}

.checkbox-dropdown summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkbox-dropdown[open] summary {
    border-color: #8bb5df;
    box-shadow: 0 0 0 .22rem rgba(24, 78, 143, .12);
}

.checkbox-dropdown-menu {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    width: min(320px, 92vw);
    max-height: 260px;
    overflow: auto;
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-md);
    padding: 8px;
}

.checkbox-dropdown-menu label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--ink-soft);
    font-weight: 650;
    cursor: pointer;
}

.checkbox-dropdown-menu label:hover {
    background: var(--surface-soft);
}

.checkbox-dropdown-menu .select-all-row {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--line);
    background: #fff;
    font-weight: 750;
}

.region-group-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    padding: 0 0 8px;
}

.region-group-shortcuts .btn {
    min-height: 30px;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: .76rem;
    font-weight: 800;
}

.checkbox-dropdown.compact summary {
    min-width: 230px;
}

textarea.form-control {
    min-height: 112px;
}

input[type="file"].form-control {
    padding-block: 8px;
}

.form-panel .row {
    row-gap: 18px;
}

.form-section {
    border: 1px solid var(--line);
    background: var(--surface-soft);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 750;
}

.form-section-title i {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 18px;
}

.month-hero,
.allocation-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.month-hero > div,
.allocation-hero > div {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.executive-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.executive-hero-main,
.executive-hero-side {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 24px;
}

.executive-hero-main {
    display: grid;
    gap: 18px;
}

.executive-hero-main h2 {
    max-width: 720px;
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.18;
}

.executive-hero-main p {
    margin: 0;
    color: var(--muted);
}

.hero-value-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hero-value-grid > div,
.executive-hero-side .finance-list > div {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    padding: 14px;
}

.hero-value-grid span,
.executive-hero-side span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.hero-value-grid strong,
.executive-hero-side strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.24rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric-card {
    position: relative;
    min-height: 150px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cfd8e6;
}

.metric-card span:first-child {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--brand);
    background: var(--brand-soft);
}

.metric-card small {
    color: var(--muted);
    font-weight: 700;
}

.metric-card strong {
    display: block;
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.18;
    word-break: break-word;
}

.metric-card::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 16px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: currentColor;
    opacity: .055;
}

.metric-card.green { color: var(--green); }
.metric-card.green span:first-child { color: var(--green); background: var(--green-soft); }
.metric-card.teal { color: #0f766e; }
.metric-card.teal span:first-child { color: #0f766e; background: #e6f5f3; }
.metric-card.gold { color: var(--amber); }
.metric-card.gold span:first-child { color: var(--amber); background: var(--amber-soft); }
.metric-card.red { color: var(--red); }
.metric-card.red span:first-child { color: var(--red); background: var(--red-soft); }
.metric-card.ink { color: var(--ink); }
.metric-card.ink span:first-child { color: var(--ink); background: #eef1f5; }
.metric-card.blue { color: var(--brand); }

.regional-command-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, .86fr);
    gap: 18px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid #d8e3ef;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #eef5f9);
    box-shadow: 0 18px 40px rgba(15, 48, 87, .08);
}

.regional-command-hero h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.78rem;
    font-weight: 800;
}

.regional-command-hero p:last-child {
    max-width: 780px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.regional-command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-self: center;
}

.regional-command-actions label {
    display: grid;
    gap: 5px;
}

.regional-command-actions label span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.regional-command-actions .btn {
    min-height: 42px;
    justify-content: center;
}

.regional-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.regional-kpi-card {
    position: relative;
    display: grid;
    gap: 9px;
    min-height: 132px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 48, 87, .07);
}

.regional-kpi-card::after {
    content: "";
    position: absolute;
    inset: auto 14px 14px auto;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: currentColor;
    opacity: .08;
}

.regional-kpi-card span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, currentColor 12%, white);
}

.regional-kpi-card small {
    color: var(--muted);
    font-weight: 800;
}

.regional-kpi-card strong {
    color: var(--ink);
    font-size: 1.24rem;
    font-weight: 850;
}

.regional-kpi-card.tone-blue { color: #245f93; }
.regional-kpi-card.tone-green { color: #25735a; }
.regional-kpi-card.tone-gold { color: #9a6a1d; }
.regional-kpi-card.tone-red { color: #a34552; }

.regional-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    gap: 18px;
}

.regional-amount-strip,
.regional-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.regional-amount-strip div,
.regional-status-grid div,
.regional-report-list div {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.regional-amount-strip span,
.regional-status-grid span,
.regional-report-list span {
    display: block;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.regional-amount-strip strong,
.regional-status-grid strong,
.regional-report-list strong {
    display: block;
    margin-top: 5px;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 850;
}

.regional-bars {
    display: grid;
    gap: 12px;
}

.regional-bar-row {
    display: grid;
    grid-template-columns: minmax(150px, .9fr) minmax(180px, 1fr) minmax(120px, auto);
    align-items: center;
    gap: 12px;
}

.regional-bar-row strong,
.regional-bar-row small {
    display: block;
}

.regional-bar-row strong {
    color: var(--ink);
}

.regional-bar-row small {
    color: var(--muted);
    font-weight: 700;
}

.regional-bar-row > span {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6edf5;
}

.regional-bar-row > span i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f8f66, #5aa987);
}

.regional-bar-row b {
    color: var(--ink);
    text-align: right;
}

.regional-task-list,
.regional-report-list {
    display: grid;
    gap: 10px;
}

.regional-task-list article {
    display: grid;
    gap: 7px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfcfe;
}

.regional-task-list h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 850;
}

.regional-task-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.regional-task-list article div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.regional-task-list article div strong {
    color: var(--ink);
    font-size: 1.28rem;
}

.regional-task-list article div small,
.regional-task-list article div em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
}

.regional-report-list small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 700;
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 18px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.panel + .panel,
.panel.mt-3,
section.mt-3 {
    margin-top: 18px !important;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.table-responsive {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: auto;
    box-shadow: var(--shadow-sm);
}

.table {
    table-layout: fixed;
    width: 100%;
    margin-bottom: 0;
    color: var(--ink);
}

.table > :not(caption) > * > * {
    min-width: 0;
    padding: 10px 12px;
    border-bottom-color: var(--line);
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f9fafb;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

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

.data-table tbody tr:hover > * {
    background: var(--surface-hover);
}

.data-table td strong,
.data-table td small {
    display: block;
}

.data-table td strong {
    max-width: 100%;
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.data-table td,
.data-table th {
    font-size: .86rem;
}

.data-table td small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.table-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.table-actions form {
    display: inline;
}

.table-actions .icon-btn {
    margin-left: 5px;
}

.bulk-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    border: 1px solid rgba(208, 213, 221, .86);
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .045);
}

.badge,
.pill {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: 0;
}

.pill {
    border: 1px solid var(--line);
    color: var(--ink-soft);
    background: var(--surface-soft);
}

.text-bg-success {
    color: #0f5f4a !important;
    background-color: var(--green-soft) !important;
}

.text-bg-warning {
    color: #875314 !important;
    background-color: var(--amber-soft) !important;
}

.text-bg-danger {
    color: #8b2f2b !important;
    background-color: var(--red-soft) !important;
}

.finance-list,
.calc-box {
    display: grid;
    gap: 10px;
}

.finance-list > div,
.calc-box > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    padding: 12px 14px;
}

.finance-list span,
.calc-box > div > span {
    color: var(--muted);
    font-weight: 650;
}

.finance-list strong,
.calc-box strong {
    color: var(--ink);
    font-weight: 800;
    text-align: right;
}

.calc-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}

.account-management-row {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface-soft);
    margin-bottom: 12px;
}

.allocation-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.allocation-account-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--green);
    padding: 16px;
    box-shadow: 0 14px 34px rgba(16, 24, 40, .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.allocation-account-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(16, 24, 40, .12);
}

.allocation-account-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .96));
}

.allocation-account-card::after {
    content: "";
    position: absolute;
    right: -54px;
    top: -58px;
    z-index: -1;
    width: 176px;
    height: 176px;
    border-radius: 999px;
    background: currentColor;
    opacity: .11;
}

.allocation-account-card.tone-positive {
    color: var(--green);
    background: #eaf8f0;
    border-color: #b8e3d0;
}

.allocation-account-card.tone-negative {
    color: var(--red);
    background: #fff0f0;
    border-color: #ecc0bd;
}

.allocation-account-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.allocation-account-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: currentColor;
    color: #fff;
}

.allocation-account-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.allocation-account-head p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: .8rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.allocation-account-balance {
    border: 1px solid rgba(208, 213, 221, .82);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    padding: 13px;
}

.allocation-account-balance span,
.allocation-account-stats span,
.allocation-account-form label > span {
    display: block;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.allocation-account-balance strong {
    display: block;
    margin-top: 5px;
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1.15;
}

.allocation-account-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.allocation-account-stats > div {
    border: 1px solid rgba(208, 213, 221, .82);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    padding: 10px;
}

.allocation-account-stats strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 850;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.allocation-account-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    border-top: 1px solid rgba(208, 213, 221, .84);
    padding-top: 13px;
}

.allocation-account-form label {
    display: grid;
    gap: 5px;
}

.allocation-account-form .form-control,
.allocation-account-form .form-select {
    min-height: 38px;
}

.allocation-account-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.allocation-account-actions form {
    display: inline-flex;
    margin: 0;
}

.allocation-account-actions .btn {
    min-height: 32px;
    border-radius: 8px;
    padding: 5px 9px;
    font-size: .78rem;
    font-weight: 800;
}

.accounts-manage-panel .finance-list,
.accounts-manage-panel .account-management-row form.row {
    width: 100%;
}

.sort-link {
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sort-link:hover {
    color: var(--brand);
}

.final-decision-form textarea,
.final-notes-field {
    width: 100%;
    min-width: min(360px, 100%);
}

.audit-log-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    color: var(--ink);
    font-weight: 800;
    list-style: none;
}

.audit-log-details summary::-webkit-details-marker {
    display: none;
}

.audit-log-details summary small {
    color: var(--muted);
    font-weight: 700;
}

.ledger-total-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.ledger-total-strip > div,
.allocation-summary-strip > div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--surface-soft);
}

.ledger-total-strip span,
.allocation-summary-strip span,
.allocation-summary-strip small {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

.ledger-total-strip strong,
.allocation-summary-strip strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.18rem;
}

.data-table tr.ledger-row-debit > * {
    background: #fff8f8;
}

.data-table tr.ledger-row-credit > * {
    background: #f7fcfa;
}

.expense-grid-wrap {
    resize: horizontal;
    overflow: auto;
    min-width: 100%;
    max-width: 100%;
}

.expense-grid-table {
    table-layout: fixed;
    min-width: 1320px;
}

.expense-grid-table th,
.expense-grid-table td {
    vertical-align: top;
}

.expense-grid-table th {
    white-space: nowrap;
}

.expense-grid-table td {
    overflow-wrap: anywhere;
}

.expense-col-main { width: 220px; }
.expense-col-account { width: 130px; }
.expense-col-category { width: 150px; }
.expense-col-region { width: 130px; }
.expense-col-detail { width: 120px; }
.expense-col-date { width: 96px; }
.expense-col-method { width: 120px; }
.expense-col-status { width: 150px; }
.expense-col-approver { width: 170px; }
.expense-col-bill { width: 88px; }
.expense-col-amount { width: 125px; }
.expense-col-actions { width: 84px; }

.compact-pill {
    max-width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    white-space: normal;
}

.tax-invoice-picker {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
}

.tax-check-row {
    display: grid;
    grid-template-columns: 24px minmax(180px, 1fr) minmax(120px, auto);
    gap: 12px;
    align-items: center;
    min-height: 62px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.tax-check-row small {
    display: block;
    color: var(--muted);
}

.tax-check-row > strong {
    text-align: right;
    white-space: nowrap;
}

.record-card-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    align-items: stretch;
    margin-top: 18px;
}

.invoice-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.expense-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}

.final-approval-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(295px, 1fr));
}

.approval-card-grid,
.employee-request-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}

.record-box-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 330px;
    display: flex !important;
    flex-direction: column;
    gap: 13px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
    color: var(--brand);
    box-shadow: 0 14px 34px rgba(16, 24, 40, .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.record-box-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(16, 24, 40, .12);
    border-color: rgba(24, 78, 143, .28);
}

.record-box-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .95));
}

.record-box-card::after {
    content: "";
    position: absolute;
    right: -46px;
    top: -50px;
    z-index: -1;
    width: 158px;
    height: 158px;
    border-radius: 999px;
    background: currentColor;
    opacity: .12;
}

.record-box-card.tone-paid,
.record-box-card.tone-approved {
    color: var(--green);
    background: #eaf8f0;
    border-color: #b8e3d0;
}

.record-box-card.tone-payment-pending,
.record-box-card.tone-pending {
    color: var(--amber);
    background: #fff3cf;
    border-color: #efd082;
}

.record-box-card.tone-final-approval,
.record-box-card.tone-final-approval-pending,
.record-box-card.tone-draft {
    color: var(--brand);
    background: #e9f3ff;
    border-color: #b7d5f4;
}

.record-box-card.tone-approval-queue {
    color: #0f766e;
    background: #e6f5f3;
    border-color: #acdcd6;
}

.record-box-card.tone-cancelled,
.record-box-card.tone-returned,
.record-box-card.tone-rejected {
    color: var(--red);
    background: #fff0f0;
    border-color: #ecc0bd;
}

.record-card-head,
.record-card-actions {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.record-status-pill {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    background: currentColor;
    color: #fff;
    padding: 5px 11px;
    font-size: .72rem;
    font-weight: 850;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.invoice-card-grid .tone-paid .record-status-pill {
    background: #d7f1e3;
    color: #0f5132;
    box-shadow: inset 0 0 0 1px #91d2b4;
}

.invoice-card-grid .tone-payment-pending .record-status-pill {
    background: #ffe7a3;
    color: #5f3b00;
    box-shadow: inset 0 0 0 1px #dfb84b;
}

.invoice-card-grid .tone-draft .record-status-pill {
    background: #dbeafe;
    color: #1e3a5f;
    box-shadow: inset 0 0 0 1px #93c5fd;
}

.invoice-card-grid .tone-cancelled .record-status-pill {
    background: #fee2e2;
    color: #7f1d1d;
    box-shadow: inset 0 0 0 1px #fca5a5;
}

.record-code {
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 850;
    line-height: 1.2;
}

.record-card-main h3 {
    display: -webkit-box;
    min-height: 2.55em;
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 850;
    line-height: 1.25;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.record-card-main p {
    margin: 7px 0 0;
    color: var(--ink-soft);
    font-size: .84rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.record-amount-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.record-amount-grid .wide {
    grid-column: 1 / -1;
}

.record-amount-grid > div {
    min-width: 0;
    border: 1px solid rgba(208, 213, 221, .82);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    padding: 9px 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.record-amount-grid span {
    display: block;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.record-amount-grid strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 850;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.record-amount-grid .wide strong {
    font-size: 1.24rem;
}

.record-detail-list {
    display: grid !important;
    gap: 7px;
    margin-top: auto;
}

.record-detail-list > div {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    gap: 7px;
}

.record-detail-list i {
    width: 22px;
    color: currentColor;
    text-align: center;
    font-size: .9rem;
}

.record-detail-list span {
    color: var(--ink-soft);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.record-card-actions {
    justify-content: flex-end;
    margin: 2px -4px -4px;
    border-top: 1px solid rgba(208, 213, 221, .84);
    padding-top: 12px;
}

.record-card-actions form {
    display: inline-flex;
    margin: 0;
}

.record-card-actions .btn {
    min-height: 32px;
    border-radius: 8px;
    padding: 5px 9px;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
}

.employee-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(315px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.employee-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 390px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--brand);
    padding: 16px;
    box-shadow: 0 14px 34px rgba(16, 24, 40, .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(16, 24, 40, .12);
}

.employee-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg, rgba(255, 255, 255, .68), rgba(255, 255, 255, .96));
}

.employee-card::after {
    content: "";
    position: absolute;
    right: -52px;
    top: -56px;
    z-index: -1;
    width: 170px;
    height: 170px;
    border-radius: 999px;
    background: currentColor;
    opacity: .12;
}

.employee-card.position-tone-field-officer {
    color: #0f766e;
    background: #e6f5f3;
    border-color: #acdcd6;
}

.employee-card.position-tone-qc-officer {
    color: #184e8f;
    background: #e9f3ff;
    border-color: #b7d5f4;
}

.employee-card.position-tone-position-1 {
    color: #177e63;
    background: #eaf8f0;
    border-color: #b8e3d0;
}

.employee-card.position-tone-position-2 {
    color: #b7791f;
    background: #fff3cf;
    border-color: #efd082;
}

.employee-card.position-tone-position-3 {
    color: #2563a7;
    background: #edf6ff;
    border-color: #bcd8f2;
}

.employee-card.position-tone-position-4 {
    color: #9a5b13;
    background: #fff7e6;
    border-color: #f0d79f;
}

.employee-card.position-tone-position-5 {
    color: #b94743;
    background: #fff0f0;
    border-color: #ecc0bd;
}

.employee-card.position-tone-position-6 {
    color: #475467;
    background: #f2f4f7;
    border-color: #d0d5dd;
}

.employee-card-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.employee-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: currentColor;
    color: #fff;
    font-weight: 850;
}

.employee-card-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.employee-card-head p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: .8rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.employee-card-money {
    border: 1px solid rgba(208, 213, 221, .82);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    padding: 12px;
}

.employee-card-money span,
.employee-card-money small {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.employee-card-money strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 850;
}

.employee-card-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.employee-card-details > div {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    min-width: 0;
}

.employee-card-details i {
    color: currentColor;
    text-align: center;
}

.employee-card-details span {
    color: var(--ink-soft);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.employee-doc-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.employee-doc-strip .btn {
    min-height: 32px;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 800;
}

.employee-card-actions {
    margin-top: 0;
}

.financial-status-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    gap: 18px;
    align-items: end;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.financial-status-hero h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.7rem;
    font-weight: 850;
}

.financial-status-hero p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
}

.financial-year-picker {
    min-width: 210px;
}

.financial-status-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.financial-status-panel {
    padding: 0;
    overflow: hidden;
    border: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    box-shadow: 0 18px 50px rgba(16, 24, 40, .08);
}

.financial-status-panel .panel-head {
    align-items: center;
    margin: 0;
    padding: 22px 22px 16px;
}

.matrix-scroll-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.matrix-scroll-actions .icon-btn {
    width: 38px;
    height: 38px;
    background: #fff;
    color: var(--brand);
}

.financial-status-scroll {
    overflow: auto;
    border-top: 1px solid rgba(229, 231, 235, .85);
    border-bottom: 1px solid rgba(229, 231, 235, .85);
    padding: 12px 14px 16px;
    background: #f8fafc;
}

.financial-status-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    table-layout: fixed;
    background: transparent;
}

.financial-status-table th,
.financial-status-table td {
    width: 132px;
    min-width: 132px;
    border: 0;
    padding: 0;
    vertical-align: middle;
}

.financial-status-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 38px;
    border-radius: 8px;
    background: #0f3057;
    color: #ffffff;
    font-size: .72rem;
    font-weight: 850;
    text-align: center;
    padding: 7px 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 18px rgba(15, 48, 87, .16);
}

.financial-status-table thead th strong,
.financial-status-table thead th small {
    display: block;
    color: inherit;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.financial-status-table thead th strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: .76rem;
}

.financial-status-table thead th small {
    margin-top: 3px;
    opacity: .78;
    font-size: .66rem;
}

.financial-status-table .client-col {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 132px;
}

.financial-status-table tbody .client-col {
    border: 1px solid rgba(208, 213, 221, .82);
    border-radius: 10px;
    background: rgba(255, 255, 255, .98);
    padding: 10px 11px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .05);
}

.financial-status-table tbody .client-col strong,
.financial-status-table tbody .client-col small {
    display: block;
}

.financial-status-table tbody .client-col strong {
    color: var(--ink);
    font-size: .92rem;
    font-weight: 850;
}

.financial-status-table tbody .client-col small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 750;
}

.invoice-status-cell {
    height: 58px;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 850;
    overflow: hidden;
    box-shadow: 0 5px 12px rgba(16, 24, 40, .045);
    transition: transform .16s ease, box-shadow .16s ease;
}

.invoice-status-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(16, 24, 40, .09);
}

.invoice-status-cell > span,
.invoice-status-cell > a {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    padding: 8px;
    color: inherit;
    text-align: center;
}

.invoice-status-cell span {
    display: block;
    font-size: .74rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.invoice-status-cell .missing-dash {
    font-size: 1.45rem;
    line-height: 1;
    text-transform: none;
}

.invoice-status-cell small {
    display: block;
    color: rgba(24, 34, 48, .72);
    font-size: .66rem;
    font-weight: 800;
    line-height: 1.15;
}

.invoice-status-cell.status-paid {
    background: #e9f7ef;
    color: #176b4d;
}

.invoice-status-cell.status-pending {
    background: linear-gradient(180deg, #fff6d7 0%, #ffe8a8 100%);
    color: #875314;
}

.invoice-status-cell.status-overdue {
    background: #fdecef;
    color: #a43b49;
}

.invoice-status-cell.status-cancelled {
    background: #f8e6e4;
    color: #9a3d39;
}

.invoice-status-cell.status-missing {
    background: #fff;
    color: #94a3b8;
    border: 1px dashed #cbd5e1;
}

.financial-status-table .executive-col {
    background: #164877;
    color: #ffffff;
}

.matrix-executive-cell {
    height: 58px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 12px rgba(16, 24, 40, .04);
    overflow: hidden;
}

.matrix-executive-cell > button,
.matrix-executive-cell > span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 7px;
}

.matrix-executive-cell strong {
    display: block;
    color: inherit;
    font-size: .74rem;
    font-weight: 900;
    line-height: 1.1;
}

.matrix-executive-cell small {
    color: rgba(52, 64, 84, .7);
    font-size: .62rem;
    font-weight: 800;
}

.matrix-executive-cell.income {
    background: linear-gradient(180deg, #f2faf6 0%, #e4f3eb 100%);
    color: #155c45;
    box-shadow: inset 0 0 0 1px rgba(21, 92, 69, .14), 0 6px 14px rgba(16, 24, 40, .045);
}

.matrix-executive-cell.expenses {
    background: linear-gradient(180deg, #fff7f2 0%, #f8e8df 100%);
    color: #8a4432;
    box-shadow: inset 0 0 0 1px rgba(138, 68, 50, .14), 0 6px 14px rgba(16, 24, 40, .045);
}

.matrix-executive-cell.ratio {
    background: linear-gradient(180deg, #f3f7fb 0%, #e6edf5 100%);
    color: #2f557b;
    box-shadow: inset 0 0 0 1px rgba(47, 85, 123, .14), 0 6px 14px rgba(16, 24, 40, .045);
}

.matrix-executive-cell.profit {
    background: linear-gradient(180deg, #fffaf0 0%, #f2ead7 100%);
    color: #6f5521;
    box-shadow: inset 0 0 0 1px rgba(111, 85, 33, .16), 0 6px 14px rgba(16, 24, 40, .045);
}

.matrix-executive-cell.loss {
    background: linear-gradient(180deg, #fff4f5 0%, #f7e3e6 100%);
    color: #8b3442;
    box-shadow: inset 0 0 0 1px rgba(139, 52, 66, .14), 0 6px 14px rgba(16, 24, 40, .045);
}

.matrix-executive-cell small {
    color: rgba(52, 64, 84, .68);
}

.invoice-status-cell a:hover {
    color: inherit;
    box-shadow: inset 0 0 0 2px currentColor;
}

.executive-divider-row td {
    height: 34px;
}

.executive-divider-row span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #184e8f, #37b37e, transparent);
}

.executive-summary-row .client-col {
    background: #12253f;
}

.executive-summary-row .client-col strong,
.executive-summary-row .client-col small {
    color: #fff;
}

.executive-summary-row td {
    height: 74px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .055);
}

.executive-summary-row.income-row td {
    background: linear-gradient(180deg, #e8f8ef 0%, #d7f1e3 100%);
}

.executive-summary-row.expense-row td {
    background: linear-gradient(180deg, #fff1e7 0%, #ffe0c2 100%);
}

.executive-summary-row.ratio-row td {
    background: linear-gradient(180deg, #eef4ff 0%, #dce8fb 100%);
}

.executive-summary-row.profit-row td {
    background: linear-gradient(180deg, #f4f7fb 0%, #e7edf5 100%);
}

.executive-summary-trigger {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-weight: 850;
    padding: 10px;
    cursor: pointer;
}

.executive-summary-trigger:hover {
    box-shadow: inset 0 0 0 2px rgba(24, 78, 143, .42);
}

.executive-summary-trigger span,
.executive-metric {
    display: block;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
    line-height: 1.1;
}

.executive-summary-trigger small {
    display: block;
    color: rgba(24, 34, 48, .66);
    font-size: .7rem;
    font-weight: 800;
}

.executive-metric {
    padding: 10px;
}

.executive-metric.positive {
    color: #0f5f4a;
}

.executive-metric.negative {
    color: #9f1239;
}

.financial-month-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    padding: 18px 22px 4px;
}

.financial-month-summary-card {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(208, 213, 221, .84);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .045);
}

.financial-month-summary-card > strong {
    color: var(--ink);
    font-size: .9rem;
    font-weight: 850;
}

.financial-month-summary-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.financial-month-summary-card button {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 850;
    padding: 0;
}

.financial-month-summary-card b {
    color: var(--ink);
    font-size: .78rem;
}

.financial-month-summary-card .positive {
    color: #0f5f4a;
}

.financial-month-summary-card .negative {
    color: #9f1239;
}

.financial-status-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 22px 22px;
}

.financial-status-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-soft);
    font-size: .82rem;
    font-weight: 750;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.legend-dot.paid { background: #37b37e; }
.legend-dot.pending { background: #f4c430; }
.legend-dot.overdue { background: #f48ba5; }
.legend-dot.cancelled { background: #ef6f6c; }
.legend-dot.missing { background: #cbd5e1; }

.executive-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: rgba(12, 18, 32, .58);
    padding: 22px;
}

.executive-modal-backdrop[hidden] {
    display: none;
}

.executive-modal {
    width: min(1120px, 96vw);
    max-height: min(760px, 92vh);
    overflow: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(12, 18, 32, .28);
    padding: 22px;
}

.executive-modal-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.executive-modal-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 900;
}

.executive-total-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.executive-total-strip > div {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 14px;
}

.executive-total-strip span,
.executive-total-strip strong {
    display: block;
}

.executive-total-strip span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.executive-total-strip strong {
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.executive-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.executive-modal-grid h3 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
}

.executive-breakdown-list {
    display: grid;
    gap: 8px;
}

.executive-breakdown-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 12px;
}

.executive-breakdown-list span,
.executive-breakdown-list small,
.executive-breakdown-list strong {
    display: block;
}

.executive-breakdown-list span {
    color: var(--ink);
    font-weight: 850;
}

.executive-breakdown-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.executive-breakdown-list strong {
    color: var(--ink);
    font-weight: 900;
    white-space: nowrap;
}

.task-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .72fr);
    gap: 20px;
    align-items: stretch;
    margin-bottom: 20px;
    border: 1px solid rgba(184, 199, 218, .72);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(247, 251, 255, .98));
    box-shadow: 0 22px 70px rgba(16, 24, 40, .09);
    padding: 24px;
}

.task-hero h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.85rem;
    font-weight: 950;
}

.task-hero p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
}

.task-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.task-stat-strip > div {
    border: 1px solid rgba(208, 213, 221, .86);
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .055);
    padding: 13px;
}

.task-stat-strip span,
.task-stat-strip strong {
    display: block;
}

.task-stat-strip span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
}

.task-stat-strip strong {
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.18rem;
    font-weight: 950;
}

.task-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.task-card {
    position: relative;
    isolation: isolate;
    display: grid;
    gap: 12px;
    border: 1px solid rgba(184, 199, 218, .78);
    border-radius: 8px;
    background: #cfc6b6;
    box-shadow: 0 18px 52px rgba(63, 55, 43, .16);
    padding: 16px;
    overflow: hidden;
}

.task-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg, rgba(255, 255, 255, .48), rgba(255, 255, 255, .74));
}

.task-card.tone-open {
    background: #c9d9e8;
    border-color: #9ab8d4;
}

.task-card.tone-completed {
    background: #c7e2d2;
    border-color: #92c4a8;
}

.task-card.tone-cancelled {
    background: #d3ccbf;
    border-color: #b6aa98;
}

.task-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    z-index: -1;
    width: 6px;
    background: var(--brand);
}

.task-card.tone-open::before { background: #2563a7; }
.task-card.tone-completed::before { background: #177e63; }
.task-card.tone-cancelled::before { background: #6b7280; }

.task-card-mainline {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.task-status-rail {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(246, 248, 251, .96));
    padding: 14px 10px;
}

.task-status-rail strong {
    color: var(--ink);
    font-size: 2rem;
    font-weight: 950;
    line-height: 1;
}

.task-status-rail small {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 850;
    text-transform: uppercase;
}

.task-body {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.task-card-head,
.task-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.task-status,
.task-priority,
.task-update-badge,
.task-closed-label {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .72rem;
    font-weight: 900;
}

.task-status {
    background: #fff;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
}

.task-priority.priority-normal { background: #eef2f7; color: #344054; }
.task-priority.priority-high { background: #fff1c6; color: #754600; }
.task-priority.priority-urgent { background: #fee2e2; color: #7f1d1d; }

.task-update-badge {
    background: #e0f2fe;
    color: #075985;
    box-shadow: inset 0 0 0 1px #7dd3fc;
}

.task-assignee-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #23507a;
    background: rgba(255, 255, 255, .68);
    border: 1px solid rgba(78, 115, 149, .22);
    font-size: .78rem;
    font-weight: 800;
}

.task-authority-note p {
    margin: 0 0 14px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.task-closed-label {
    background: #fff;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
}

.task-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.22rem;
    font-weight: 950;
    line-height: 1.18;
}

.task-card p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.45;
}

.task-latest-update {
    border: 1px solid rgba(125, 211, 252, .65);
    border-radius: 8px;
    background: #f0f9ff;
    padding: 10px 12px;
}

.task-latest-update span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #075985;
    font-size: .74rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.task-latest-update p {
    color: var(--ink);
}

.task-fold {
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    background: rgba(248, 250, 252, .72);
    overflow: hidden;
}

.task-fold summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
}

.task-fold summary::-webkit-details-marker {
    display: none;
}

.task-fold[open] summary {
    border-bottom: 1px solid rgba(208, 213, 221, .78);
    background: #fff;
}

.task-edit-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 10px;
    padding: 12px;
}

.task-edit-form label {
    display: grid;
    gap: 5px;
}

.task-edit-form label > span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.task-edit-form .wide,
.task-edit-form button {
    grid-column: 1 / -1;
}

.task-edit-form textarea.form-control {
    min-height: 82px;
}

.task-meta-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.task-meta-strip > div {
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    padding: 9px;
}

.task-meta-strip span,
.task-meta-strip strong {
    display: block;
}

.task-meta-strip span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.task-meta-strip strong {
    margin-top: 3px;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 850;
}

.task-actions {
    justify-content: flex-end;
    border-top: 1px solid rgba(208, 213, 221, .78);
    padding-top: 12px;
}

.task-update-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.task-update-panel form {
    display: grid;
    gap: 8px;
}

.task-update-panel textarea.form-control {
    min-height: 70px;
}

.task-update-panel form .btn {
    justify-self: end;
}

.task-update-list {
    display: grid;
    gap: 8px;
    max-height: 210px;
    overflow: auto;
}

.task-update-list > div {
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    background: rgba(255, 255, 255, .74);
    padding: 10px;
}

.task-update-list span {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.task-update-list p {
    margin: 0;
    color: var(--ink-soft);
}

.task-cancel-btn {
    border-color: #cbd5e1;
    color: #475467;
    background: #fff;
}

.task-cancel-btn:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #334155;
}

.task-delete-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #667085;
}

.task-delete-btn:hover {
    border-color: #fca5a5;
    background: #fff1f2;
    color: #991b1b;
}

.pulse-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .72fr);
    gap: 20px;
    align-items: stretch;
    margin-bottom: 20px;
    border: 1px solid rgba(184, 199, 218, .72);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f3057 0%, #184e8f 58%, #0f766e 100%);
    box-shadow: 0 22px 70px rgba(15, 48, 87, .18);
    padding: 24px;
    color: #fff;
}

.pulse-hero .eyebrow,
.pulse-hero h2,
.pulse-hero p {
    color: #fff;
}

.pulse-hero h2 {
    margin: 0;
    font-size: 1.95rem;
    font-weight: 950;
}

.pulse-hero p:last-child {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .8);
}

.pulse-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pulse-stat-strip > div {
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 12px 32px rgba(15, 48, 87, .18);
    padding: 13px;
}

.pulse-stat-strip span,
.pulse-stat-strip strong {
    display: block;
}

.pulse-stat-strip span {
    color: rgba(255, 255, 255, .78);
    font-size: .76rem;
    font-weight: 850;
}

.pulse-stat-strip strong {
    margin-top: 4px;
    color: #fff;
    font-size: 1.18rem;
    font-weight: 950;
}

.pulse-reader-panel p {
    margin: 0 0 14px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.pulse-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.pulse-card {
    position: relative;
    display: grid;
    gap: 14px;
    border: 1px solid rgba(184, 199, 218, .78);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f8fb 100%);
    box-shadow: 0 18px 52px rgba(16, 24, 40, .09);
    padding: 18px;
    overflow: hidden;
}

.pulse-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #184e8f;
}

.pulse-card.status-closed {
    background: linear-gradient(135deg, #f9fafb 0%, #eef2f6 100%);
    opacity: .92;
}

.pulse-card-head,
.pulse-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pulse-card-head {
    padding-left: 4px;
}

.pulse-tone,
.pulse-status,
.pulse-date {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .72rem;
    font-weight: 900;
}

.pulse-tone {
    background: #eaf2fb;
    color: #184e8f;
}

.pulse-status {
    background: #fff;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
}

.pulse-date {
    margin-left: auto;
    background: #f8fafc;
    color: var(--muted);
    box-shadow: inset 0 0 0 1px var(--line);
}

.pulse-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .38fr);
    gap: 16px;
    align-items: start;
}

.pulse-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 950;
}

.pulse-card p {
    margin: 8px 0 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.pulse-meta {
    display: grid;
    gap: 8px;
}

.pulse-meta > div {
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    padding: 10px;
}

.pulse-meta span,
.pulse-meta strong {
    display: block;
}

.pulse-meta span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.pulse-meta strong {
    margin-top: 3px;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
}

.pulse-input-panel {
    display: grid;
    gap: 10px;
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    background: rgba(248, 250, 252, .72);
    padding: 12px;
}

.pulse-input-panel form {
    display: grid;
    gap: 8px;
}

.pulse-input-panel textarea.form-control {
    min-height: 72px;
}

.pulse-input-panel form .btn {
    justify-self: end;
}

.pulse-thread-closed {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 850;
    padding: 10px 12px;
}

.pulse-thread-closed i {
    color: #667085;
}

.pulse-input-list {
    display: grid;
    gap: 8px;
    max-height: 240px;
    overflow: auto;
}

.pulse-input-list > div {
    border: 1px solid rgba(208, 213, 221, .78);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.pulse-input-list span {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.pulse-input-list p {
    margin: 0;
    color: var(--ink-soft);
}

.pulse-actions {
    justify-content: flex-end;
    border-top: 1px solid rgba(208, 213, 221, .78);
    padding-top: 12px;
}

.kanban-board-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 12px;
}

.kanban-board {
    min-width: max-content;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(370px, 410px);
    gap: 18px;
    align-items: start;
}

.kanban-column {
    min-height: 660px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
    border: 0;
    border-radius: 4px;
    background: #e7eef2;
    padding: 22px;
    box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .04);
}

.kanban-column-head {
    display: grid;
    justify-items: start;
    gap: 8px;
}

.kanban-lane-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    border-radius: 8px;
    background: #12aee4;
    color: #fff;
    padding: 6px 22px;
    font-size: 1.16rem;
    font-weight: 850;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.kanban-column-head small,
.kanban-card small,
.kanban-card-meta span {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 700;
}

.kanban-column-head small {
    padding-left: 2px;
    color: #64717c;
    font-size: .84rem;
}

.kanban-card-list {
    display: grid;
    align-content: start;
    gap: 22px;
}

.kanban-card {
    display: grid;
    gap: 14px;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    background: #fff;
    padding: 18px 20px 14px;
    box-shadow: 3px 4px 0 rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: #c7d6e8;
    box-shadow: 5px 7px 0 rgba(16, 24, 40, .09), var(--shadow-md);
}

.kanban-card-code {
    color: #5f6368;
    font-size: 1.05rem;
    font-weight: 720;
    letter-spacing: 0;
}

.kanban-card-title {
    margin: 0;
    color: #202124;
    font-size: 1.17rem;
    font-weight: 760;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.kanban-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5d6267;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.25;
}

.kanban-line i,
.kanban-footer-icons i {
    flex: 0 0 auto;
    width: 22px;
    color: #61666b;
    text-align: center;
}

.kanban-line.strong {
    color: #4f5256;
    font-weight: 800;
}

.kanban-divider {
    height: 1px;
    background: #e5e7eb;
    margin-top: 2px;
}

.kanban-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.kanban-footer-icons,
.kanban-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kanban-footer-icons i:first-child {
    color: #ff5d66;
}

.kanban-footer > strong {
    color: #2a2d31;
    font-size: .92rem;
    font-weight: 780;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kanban-footer > strong.danger-date {
    color: #ff2e38;
}

.kanban-card-actions {
    justify-content: flex-end;
    gap: 0;
}

.kanban-card-actions form {
    display: inline-flex;
}

.kanban-card-actions .icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin-left: -5px;
    border-radius: 999px;
    border-color: #e5e7eb;
    background: #fff;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .10);
}

.kanban-card-actions .icon-btn.success {
    color: var(--green);
    background: var(--green-soft);
}

.kanban-card-actions .icon-btn.danger {
    color: var(--red);
    background: var(--red-soft);
}

.kanban-empty {
    min-height: 138px;
    display: grid;
    place-items: center;
    border: 1px dashed #c8d5e4;
    border-radius: 10px;
    color: var(--muted);
    background: #fff;
    font-weight: 700;
    text-align: center;
    padding: 18px;
}

.kanban-column.tone-paid,
.kanban-column.tone-approved {
    --lane-color: #62bd7b;
}

.kanban-column.tone-payment-pending,
.kanban-column.tone-pending,
.kanban-column.tone-final-approval-pending {
    --lane-color: #aeb8c8;
}

.kanban-column.tone-cancelled,
.kanban-column.tone-returned {
    --lane-color: #ee7d84;
}

.kanban-column.tone-draft {
    --lane-color: #12aee4;
}

.kanban-column.tone-paid .kanban-lane-pill,
.kanban-column.tone-approved .kanban-lane-pill,
.kanban-column.tone-payment-pending .kanban-lane-pill,
.kanban-column.tone-pending .kanban-lane-pill,
.kanban-column.tone-final-approval-pending .kanban-lane-pill,
.kanban-column.tone-cancelled .kanban-lane-pill,
.kanban-column.tone-returned .kanban-lane-pill,
.kanban-column.tone-draft .kanban-lane-pill {
    background: var(--lane-color);
}

.allocation-toolbar {
    margin-bottom: 16px;
}

.allocation-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    align-items: stretch;
}

.allocation-summary-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.allocation-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.allocation-list {
    display: grid;
    gap: 10px;
}

.allocation-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, auto) 42px;
    gap: 12px;
    align-items: center;
    min-height: 74px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 12px;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.allocation-row.available {
    grid-template-columns: 24px minmax(0, 1fr) minmax(140px, auto);
    cursor: pointer;
}

.allocation-row.available:hover,
.allocation-row.tagged {
    border-color: #c9d8e8;
    background: var(--surface-hover);
}

.allocation-row.available:hover {
    transform: translateY(-1px);
}

.allocation-main strong,
.allocation-main small,
.allocation-meta span,
.allocation-meta strong {
    display: block;
}

.allocation-main small,
.allocation-meta span {
    color: var(--muted);
}

.allocation-meta {
    text-align: right;
}

.allocation-lock {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface-soft);
}

.allocation-empty,
.empty-state {
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
    gap: 8px;
    padding: 32px;
    border: 1px dashed #c8d5e4;
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--muted);
}

.empty-state {
    min-height: 420px;
    border-style: solid;
    box-shadow: var(--shadow-sm);
}

.allocation-empty i,
.empty-state i {
    color: var(--brand);
    font-size: 2rem;
}

.allocation-empty strong,
.empty-state strong {
    color: var(--ink);
}

.allocation-actions {
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.chart-list {
    display: grid;
    gap: 12px;
}

.chart-row {
    display: grid;
    gap: 8px;
}

.chart-row-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink-soft);
    font-weight: 700;
}

.chart-track {
    height: 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    min-width: 6px;
    border-radius: inherit;
    background: var(--brand);
}

.chart-bar.green { background: var(--green); }
.chart-bar.amber { background: var(--amber); }
.chart-bar.red { background: var(--red); }

.employee-profile-hero {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.employee-photo-card,
.employee-profile-summary,
.employee-profile-actions {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px;
}

.employee-photo-card {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 12px;
}

.employee-passport-photo,
.employee-photo-placeholder {
    width: 120px;
    height: 150px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.employee-passport-photo {
    object-fit: cover;
}

.employee-photo-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 2.4rem;
}

.employee-profile-summary {
    display: grid;
    align-content: center;
    gap: 12px;
}

.employee-profile-summary h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
}

.employee-profile-summary p {
    margin: 0;
    color: var(--muted);
}

.employee-profile-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.employee-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.detail-list {
    display: grid;
    gap: 10px;
}

.detail-list > div {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    padding: 12px 14px;
}

.detail-list span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.detail-list strong {
    color: var(--ink);
    font-weight: 750;
    word-break: break-word;
}

.document-link-grid {
    display: grid;
    gap: 10px;
}

.document-link {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--ink);
    padding: 12px 14px;
    font-weight: 700;
}

.document-link:hover {
    border-color: #bdd0e8;
    background: var(--brand-soft);
}

.document-link i {
    color: var(--brand);
}

.document-link.muted {
    color: var(--muted);
    pointer-events: none;
}

.confirmation-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(8px);
}

.confirmation-backdrop.show {
    display: grid;
}

.confirmation-dialog {
    width: min(420px, 100%);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    padding: 22px;
}

.confirmation-dialog h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 800;
}

.confirmation-dialog p {
    margin: 0;
    color: var(--muted);
}

.confirmation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(10px);
}

.app-modal-backdrop[hidden] {
    display: none;
}

.app-modal {
    width: min(1080px, 96vw);
    height: min(820px, 92vh);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}

.app-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #f7fafc);
    padding: 18px 20px;
}

.app-modal-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.38rem;
    font-weight: 900;
}

.app-modal-frame-wrap {
    position: relative;
    min-height: 0;
    background: #f7f9fc;
}

.app-modal-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #f7f9fc;
}

.app-modal-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    background: #f7f9fc;
    color: var(--brand);
    font-weight: 850;
}

.app-modal-loading[hidden] {
    display: none;
}

.quick-entry-modal .modal-dialog {
    width: min(1120px, calc(100vw - 32px));
    max-width: 1120px;
}

.quick-entry-modal .modal-content,
.ledger-bs-modal .modal-content,
.final-decision-modal .modal-content {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 14px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}

.quick-entry-modal .modal-content {
    height: min(860px, calc(100vh - 32px));
}

.ledger-bs-modal .modal-content {
    max-height: calc(100vh - 32px);
}

.quick-entry-modal .modal-header,
.ledger-modal-head,
.final-decision-modal .modal-header {
    background: linear-gradient(180deg, #ffffff, #f7fafc);
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
}

.quick-entry-modal .modal-title,
.ledger-modal-head h2,
.final-decision-modal .modal-title {
    margin: 0;
    color: var(--ink);
    font-size: 1.34rem;
    font-weight: 900;
}

.quick-entry-modal .modal-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #f7f9fc;
}

.quick-entry-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #f7f9fc;
}

.ledger-bs-modal .modal-dialog {
    width: min(1280px, calc(100vw - 32px));
    max-width: 1280px;
}

.ledger-bs-modal .modal-body {
    overflow: auto;
    background: #fff;
    padding: 20px;
}

.final-decision-summary {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 12px;
    margin-bottom: 12px;
}

.final-decision-summary i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
}

.final-decision-summary strong,
.final-decision-summary span {
    display: block;
}

.final-decision-summary strong {
    color: var(--ink);
    font-weight: 850;
}

.final-decision-summary span {
    margin-top: 3px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.modal-form-body {
    min-width: 320px;
    background: #f7f9fc;
}

.modal-form-shell {
    padding: 18px;
}

.modal-form-shell .panel {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.modal-form-shell .panel-head {
    display: none;
}

.modal-form-shell .form-section {
    margin-bottom: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.modal-form-shell .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: rgba(247, 249, 252, .94);
    backdrop-filter: blur(10px);
    margin-inline: -18px;
    padding-inline: 18px;
}

.ledger-modal {
    width: min(1260px, 96vw);
}

.login-body {
    min-height: 100vh;
    background-color: #0F3057;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 24px;
    align-items: stretch;
}

.login-copy {
    color: #fff;
    display: grid;
    align-content: center;
    gap: 14px;
    padding: 28px;
}

.login-copy h1 {
    margin: 0;
    font-size: 4rem;
    font-weight: 850;
}

.login-copy p:last-child {
    max-width: 560px;
    font-size: 1.1rem;
}

.login-card {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .24);
}

.login-card h2 { font-weight: 800; }

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

    .executive-hero,
    .split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .app-shell,
    body.sidebar-collapsed .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform .2s ease;
        width: var(--sidebar-width);
        box-shadow: 24px 0 70px rgba(16, 24, 40, .18);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .nav-group-label,
    body.sidebar-collapsed .nav-menu a span,
    body.sidebar-collapsed .sidebar-foot span:not(.status-dot) {
        display: initial;
    }

    body.sidebar-collapsed .sidebar {
        align-items: stretch;
        padding: 18px;
    }

    body.sidebar-collapsed .sidebar-head {
        flex-direction: row;
    }

    body.sidebar-collapsed .nav-menu a {
        justify-content: flex-start;
        width: auto;
    }

    .sidebar-collapse {
        display: none;
    }

    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .global-search {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
    }

    .month-hero,
    .regional-command-hero,
    .regional-dashboard-grid,
    .allocation-hero,
    .allocation-layout,
    .task-hero,
    .pulse-hero,
    .login-panel {
        grid-template-columns: 1fr;
    }

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

    .regional-command-actions,
    .regional-amount-strip,
    .regional-status-grid {
        grid-template-columns: 1fr;
    }

    .regional-bar-row {
        grid-template-columns: 1fr;
    }

    .regional-bar-row b {
        text-align: left;
    }

    .task-card-mainline {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .login-copy h1 { font-size: 3rem; }
}

@media (max-width: 700px) {
    .content-wrap,
    .topbar {
        padding: 18px;
    }

    .topbar h1 {
        font-size: 1.25rem;
    }

    .user-copy,
    .user-menu > i {
        display: none;
    }

    .metric-grid,
    .hero-value-grid,
    .allocation-summary-strip,
    .ledger-total-strip,
    .task-stat-strip,
    .pulse-stat-strip,
    .task-meta-strip {
        grid-template-columns: 1fr;
    }

    .task-hero,
    .pulse-hero {
        padding: 18px;
        border-radius: 8px;
    }

    .task-hero h2,
    .pulse-hero h2 {
        font-size: 1.45rem;
    }

    .task-card {
        padding: 14px;
    }

    .task-card-mainline,
    .task-edit-form,
    .pulse-body {
        grid-template-columns: 1fr;
    }

    .task-status-rail {
        grid-template-columns: auto auto auto;
        justify-content: start;
        justify-items: start;
        align-items: center;
        padding: 12px;
    }

    .task-status-rail strong {
        font-size: 1.35rem;
    }

    .task-card h3 {
        font-size: 1.08rem;
    }

    .task-actions,
    .pulse-actions,
    .task-update-panel form .btn,
    .task-edit-form button,
    .pulse-input-panel form .btn {
        justify-content: stretch;
        justify-self: stretch;
    }

    .task-actions form,
    .task-actions .btn,
    .task-actions .task-closed-label,
    .pulse-actions form,
    .pulse-actions .btn,
    .task-update-panel form .btn,
    .task-edit-form button,
    .pulse-input-panel form .btn {
        width: 100%;
    }

    .task-card-grid,
    .record-card-grid,
    .invoice-card-grid,
    .approval-card-grid,
    .final-approval-card-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 18px;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .toolbar,
    .toolbar.compact {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar .form-control,
    .toolbar .form-select,
    .toolbar .btn {
        width: 100%;
        min-width: 0;
    }

    .allocation-row,
    .allocation-row.available,
    .tax-check-row,
    .employee-profile-hero,
    .employee-detail-grid {
        grid-template-columns: 1fr;
    }

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

    .allocation-meta,
    .tax-check-row > strong {
        text-align: left;
    }

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

    .account-management-row {
        align-items: stretch;
        flex-direction: column;
    }

    .kanban-board {
        min-width: 0;
        grid-auto-flow: row;
        grid-auto-columns: auto;
        grid-template-columns: 1fr;
    }

    .kanban-column {
        min-height: auto;
    }

    .kanban-card-meta,
    .kanban-money-strip {
        grid-template-columns: 1fr;
    }

    .account-management-row form {
        width: 100%;
    }

    .finance-list > div,
    .calc-box > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .finance-list strong,
    .calc-box strong {
        text-align: left;
    }

    .login-card { padding: 22px; }
}

/* Final status standard overrides. Keep this block at EOF so older component rules cannot win. */
.record-box-card.tone-final-approval,
.record-box-card.tone-final-approval-pending,
.record-box-card.tone-pending,
.record-box-card.tone-payment-pending {
    color: #b7791f;
    background: #fff6d7;
    border-color: #efd082;
}

.record-box-card.tone-paid,
.record-box-card.tone-approved,
.record-box-card.tone-completed {
    color: #177e63;
    background: #eaf8f0;
    border-color: #b8e3d0;
}

.record-box-card.tone-cancelled,
.record-box-card.tone-rejected,
.record-box-card.tone-terminated {
    color: #be4b62;
    background: #ffe9ef;
    border-color: #f4b6c5;
}

.record-box-card.tone-draft,
.record-box-card.tone-inactive,
.record-box-card.tone-returned {
    color: #667085;
    background: #f2f4f7;
    border-color: #d0d5dd;
}

.record-status-pill,
.expense-card-grid .record-status-pill {
    background: rgba(255, 255, 255, .84);
    color: currentColor;
    box-shadow: inset 0 0 0 1px currentColor;
}

.login-body {
    background-color: #0F3057;
    background-image: none;
    background-blend-mode: normal;
}

.login-panel {
    width: min(460px, 100%);
    grid-template-columns: 1fr;
}

.login-copy {
    display: none;
}

.login-card-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.login-card-brand h1 {
    margin: 0;
    color: var(--ink);
    font-size: 1.9rem;
    font-weight: 850;
}

.ledger-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ledger-modal-head > .d-flex {
    margin-left: auto;
    justify-content: flex-end;
}

.reconciliation-clarity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.reconciliation-clarity-grid section {
    border: 1px solid rgba(208, 213, 221, .84);
    border-radius: 8px;
    background: rgba(255, 255, 255, .74);
    padding: 12px;
}

.reconciliation-clarity-grid h4 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 850;
}

.reconciliation-mini-list {
    display: grid;
    gap: 8px;
}

.reconciliation-mini-list a,
.reconciliation-mini-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 8px;
    background: #fff;
    padding: 9px 10px;
}

.reconciliation-mini-list span,
.reconciliation-mini-list small,
.reconciliation-mini-list strong {
    display: block;
}

.reconciliation-mini-list span {
    color: var(--ink);
    font-weight: 850;
}

.reconciliation-mini-list small {
    margin-top: 2px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 700;
}

.reconciliation-mini-list strong {
    color: var(--ink);
    white-space: nowrap;
}

@media (max-width: 700px) {
    .reconciliation-clarity-grid {
        grid-template-columns: 1fr;
    }

    .ledger-modal-head {
        align-items: stretch;
        flex-direction: column;
    }

    .ledger-modal-head > .d-flex {
        width: 100%;
        margin-left: 0;
    }
}

.table-responsive {
    max-height: min(72vh, 780px);
}

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, .12);
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.pagination-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.allocation-account-card.is-inactive {
    filter: grayscale(.72);
    background: #f1f5f9;
    border-color: rgba(100, 116, 139, .35);
    opacity: .82;
}

.ledger-breakdown {
    margin: 12px 0;
    border: 1px solid rgba(208, 213, 221, .84);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.ledger-breakdown h3 {
    margin: 0 0 10px;
    font-size: .95rem;
    font-weight: 850;
}

.ledger-breakdown-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid rgba(208, 213, 221, .55);
}

.ledger-breakdown-row:first-of-type {
    border-top: 0;
}

.ledger-breakdown-row small,
.ledger-breakdown-row span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.snapshot-pre {
    max-width: 360px;
    max-height: 240px;
    overflow: auto;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 10px;
    font-size: .76rem;
}

.app-toggle {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(208, 213, 221, .9);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    font-weight: 800;
}

.icon-btn.copied {
    color: #16a34a;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .42);
}

.director-chart-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(54px, 1fr));
    gap: 10px;
    min-height: 220px;
    align-items: end;
}

.director-chart-month {
    min-height: 190px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 4px;
    border: 1px solid rgba(208, 213, 221, .84);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.director-chart-month span,
.director-chart-month small {
    grid-column: 1 / -1;
    color: var(--ink);
    font-size: .72rem;
    font-weight: 850;
    text-align: center;
}

.director-chart-month b {
    align-self: end;
    border-radius: 6px 6px 2px 2px;
}

.income-bar {
    background: #2f8f66;
}

.expense-bar {
    background: #b85555;
}

.chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.chart-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
}

.income-dot {
    background: #16a34a;
}

.expense-dot {
    background: #b85555;
}

.finance-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.finance-action-card {
    display: grid;
    gap: 16px;
    border: 1px solid rgba(208, 213, 221, .88);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .07);
}

.finance-action-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.finance-action-head > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eaf2fb;
    color: var(--brand);
    font-size: 1.05rem;
}

.finance-action-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.03rem;
    font-weight: 850;
}

.finance-action-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 650;
}

.employee-finance-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.employee-finance-card-grid .record-box-card {
    min-height: 285px;
}

.finance-decision-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(82px, 1fr)) auto auto;
    align-items: center;
}

.record-view-toggle {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 10px 0;
}

.record-view-toggle .active {
    color: #fff;
    background: var(--primary);
}

.record-card-grid.record-view-table {
    grid-template-columns: 1fr !important;
    gap: 10px;
}

.record-card-grid.record-view-table .record-box-card,
.record-card-grid.record-view-table .employee-card {
    display: grid !important;
    grid-template-columns: minmax(150px, .8fr) minmax(190px, 1.15fr) minmax(230px, 1.2fr) minmax(210px, 1fr) minmax(128px, auto);
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 0;
    padding: 12px 14px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .06);
    transform: none;
}

.record-card-grid.record-view-table .record-box-card:hover,
.record-card-grid.record-view-table .employee-card:hover {
    transform: none;
}

.record-card-grid.record-view-table .record-box-card::after,
.record-card-grid.record-view-table .employee-card::after {
    display: none;
}

.record-card-grid.record-view-table .record-card-head,
.record-card-grid.record-view-table .employee-card-head {
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
}

.record-card-grid.record-view-table .employee-card-head {
    grid-template-columns: 38px minmax(0, 1fr);
}

.record-card-grid.record-view-table .employee-card-head .employee-status-pill {
    grid-column: 1 / -1;
    justify-self: start;
}

.record-card-grid.record-view-table .employee-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.record-card-grid.record-view-table .record-card-main h3,
.record-card-grid.record-view-table .employee-card h3 {
    min-height: 0;
    font-size: .98rem;
    -webkit-line-clamp: 1;
}

.record-card-grid.record-view-table .record-card-main p,
.record-card-grid.record-view-table .employee-card-head p {
    margin-top: 4px;
    font-size: .76rem;
}

.record-card-grid.record-view-table .record-amount-grid,
.record-card-grid.record-view-table .employee-card-money,
.record-card-grid.record-view-table .record-detail-list,
.record-card-grid.record-view-table .employee-card-details {
    margin: 0;
    min-width: 0;
}

.record-card-grid.record-view-table .record-amount-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.record-card-grid.record-view-table .expense-card-grid .record-amount-grid,
.record-card-grid.record-view-table.expense-card-grid .record-amount-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.record-card-grid.record-view-table .record-amount-grid .wide {
    grid-column: auto;
}

.record-card-grid.record-view-table .record-amount-grid > div,
.record-card-grid.record-view-table .employee-card-money {
    padding: 8px 9px;
}

.record-card-grid.record-view-table .record-amount-grid span,
.record-card-grid.record-view-table .employee-card-money span,
.record-card-grid.record-view-table .employee-card-money small {
    font-size: .64rem;
}

.record-card-grid.record-view-table .record-amount-grid strong,
.record-card-grid.record-view-table .record-amount-grid .wide strong,
.record-card-grid.record-view-table .employee-card-money strong {
    font-size: .86rem;
    line-height: 1.15;
}

.record-card-grid.record-view-table .record-detail-list,
.record-card-grid.record-view-table .employee-card-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
}

.record-card-grid.record-view-table .record-detail-list > div,
.record-card-grid.record-view-table .employee-card-details > div {
    grid-template-columns: 18px minmax(0, 1fr);
}

.record-card-grid.record-view-table .record-detail-list i,
.record-card-grid.record-view-table .employee-card-details i {
    width: 18px;
    font-size: .78rem;
}

.record-card-grid.record-view-table .record-detail-list span,
.record-card-grid.record-view-table .employee-card-details span {
    font-size: .74rem;
    line-height: 1.2;
}

.record-card-grid.record-view-table .employee-doc-strip {
    display: none;
}

.record-card-grid.record-view-table .record-card-actions,
.record-card-grid.record-view-table .employee-card-actions {
    justify-content: flex-end;
    border-top: 0;
    margin: 0;
    padding-top: 0;
    min-width: 0;
}

.record-card-grid.record-view-table .record-card-actions .btn,
.record-card-grid.record-view-table .employee-card-actions .btn {
    min-height: 30px;
    padding: 5px 8px;
    white-space: nowrap;
}

@media (max-width: 1280px) {
    .record-card-grid.record-view-table .record-box-card,
    .record-card-grid.record-view-table .employee-card {
        grid-template-columns: minmax(140px, .85fr) minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(180px, 1fr);
    }

    .record-card-grid.record-view-table .record-detail-list,
    .record-card-grid.record-view-table .employee-card-details {
        grid-column: auto;
    }

    .record-card-grid.record-view-table .record-card-actions,
    .record-card-grid.record-view-table .employee-card-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 980px) {
    .record-card-grid.record-view-table .record-box-card,
    .record-card-grid.record-view-table .employee-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }

    .record-card-grid.record-view-table .record-card-actions,
    .record-card-grid.record-view-table .employee-card-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

.record-view-cards {
    max-height: none;
    overflow: visible;
}

.record-view-table .table-actions {
    white-space: normal;
}

.record-view-table .table-actions form {
    display: inline-flex;
}

.record-view-table .table-actions .icon-btn {
    margin: 2px;
}

.record-view-cards table,
.record-view-cards tbody,
.record-view-cards tr,
.record-view-cards td {
    display: block;
}

.record-view-cards thead {
    display: none;
}

.record-view-cards tbody {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.record-view-cards tr {
    border: 1px solid rgba(208, 213, 221, .88);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .06);
}

.record-view-cards td {
    border: 0;
    padding: 5px 0;
}

.record-view-cards .table-actions {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 8px;
}

.record-view-cards .text-end {
    text-align: left !important;
}

.record-view-cards .data-table {
    min-width: 0;
}

.record-view-cards .data-table td small,
.record-view-cards .data-table td strong {
    display: block;
}

.financial-status-scroll {
    max-height: min(74vh, 820px);
}

.financial-status-table thead th {
    position: sticky;
    top: 0;
    z-index: 8;
}

.financial-status-table thead .client-col {
    z-index: 12;
}

.financial-status-table tbody .client-col {
    z-index: 6;
}

.import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 16px;
}

.import-card {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(208, 213, 221, .88);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.import-card h3 {
    margin: 4px 0 6px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 850;
}

.import-card p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 650;
}

@media (max-width: 760px) {
    .table-responsive {
        max-height: 70vh;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 760px;
    }

    .toolbar.compact,
    .panel-head,
    .ledger-breakdown-row,
    .pagination-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
    }

    .global-search {
        max-width: none;
        width: 100%;
    }

    .form-actions,
    .table-actions {
        flex-wrap: wrap;
    }

    .record-card-grid.record-view-table .record-box-card,
    .record-card-grid.record-view-table .employee-card {
        grid-template-columns: 1fr;
    }

    .financial-status-scroll {
        padding: 10px;
        background: #f8fafc;
    }

    .financial-status-table {
        min-width: 1120px;
        border-spacing: 5px;
    }

    .financial-status-table .client-col,
    .financial-status-table thead th {
        position: static;
    }

    .financial-status-table .client-col {
        width: 132px;
    }

    .financial-status-table tbody .client-col {
        padding: 10px;
    }

    .financial-status-table tbody .client-col strong {
        font-size: .8rem;
    }

    .invoice-status-cell {
        height: 66px;
    }

    .financial-month-summary-grid {
        grid-template-columns: 1fr;
        padding: 12px 14px 2px;
    }

    .finance-action-grid,
    .employee-finance-card-grid {
        grid-template-columns: 1fr;
    }

    .finance-decision-actions {
        grid-template-columns: 1fr;
    }

    .director-chart-grid {
        grid-template-columns: repeat(6, minmax(54px, 1fr));
        overflow-x: auto;
    }

    .modal-dialog {
        margin: .5rem;
    }
}
