:root {
    --sidebar-width: 270px;
    --ink: #162033;
    --muted: #667085;
    --line: #e4e9f2;
    --panel: #ffffff;
    --page: #f3f6fb;
    --brand: #2556a7;
    --brand-dark: #172033;
    --brand-soft: #e9f0fb;
    --success: #1f8a5b;
    --danger: #b42318;
    --warning: #b7791f;
    --shadow-sm: 0 8px 24px rgba(22, 32, 51, .06);
    --shadow-md: 0 18px 44px rgba(22, 32, 51, .10);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    letter-spacing: 0;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(37, 86, 167, .10), transparent 28rem),
        linear-gradient(180deg, #f7f9fc 0%, var(--page) 100%);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

.login-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(18, 28, 47, .96), rgba(37, 67, 111, .92)),
        url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=1600&q=80') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-shell {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: .85rem;
    overflow: hidden;
    box-shadow: 0 26px 80px rgba(0, 0, 0, .28);
}

.login-brand-panel {
    background: linear-gradient(160deg, #121c2f, #24385c);
    color: #fff;
    padding: 3rem;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-brand-mark,
.brand-mark {
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(145deg, #f8fbff, #d7e4f9);
    color: #172033;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.login-brand-mark {
    width: 64px;
    height: 64px;
    border-radius: .65rem;
    font-size: 1.35rem;
}

.login-eyebrow {
    text-transform: uppercase;
    color: #9fb8e8;
    letter-spacing: .08rem;
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.login-brand-panel h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.login-copy {
    max-width: 560px;
    color: #dbe5f5;
    font-size: 1.05rem;
}

.login-metrics {
    display: grid;
    gap: .75rem;
}

.login-metrics div {
    border-top: 1px solid rgba(255, 255, 255, .18);
    padding-top: .85rem;
}

.login-metrics span {
    display: block;
    color: #9fb8e8;
    font-size: .82rem;
}

.login-metrics strong {
    font-size: 1.05rem;
}

.login-card {
    padding: 3rem;
    align-self: center;
}

.demo-credentials {
    border: 1px solid var(--line);
    border-radius: .55rem;
    padding: 1rem;
    background: #f8fafd;
}

.credential-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .45rem 0;
    border-top: 1px solid #e8edf5;
    font-size: .92rem;
}

.credential-row code {
    color: var(--ink);
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #111a2b 0%, #18263e 58%, #101827 100%);
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 1.1rem;
    overflow-y: auto;
    box-shadow: 14px 0 34px rgba(17, 26, 43, .14);
}

.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    font-size: 1.18rem;
    font-weight: 800;
    padding: .55rem .5rem 1.25rem;
}

.brand small {
    display: block;
    color: #91a8ca;
    font-size: .72rem;
    font-weight: 600;
    margin-top: .05rem;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: .55rem;
    flex: 0 0 auto;
}

.sidebar .nav {
    gap: .16rem;
}

.sidebar .nav-link {
    color: #d6deeb;
    border-radius: .55rem;
    padding: .72rem .78rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 600;
    font-size: .94rem;
}

.sidebar .nav-link i {
    width: 1.2rem;
    color: #9fb8e8;
    font-size: 1rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(37, 86, 167, .95), rgba(37, 86, 167, .48));
    box-shadow: inset 3px 0 0 #d7e4f9;
}

.sidebar .nav-link.active i {
    color: #fff;
}

.sidebar .nav-section-toggle {
    border: 0;
    width: 100%;
    background: transparent;
    justify-content: space-between;
}

.sidebar .nav-section-toggle span {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}

.sidebar .nav-section-caret {
    margin-left: auto;
    transition: transform .2s ease;
}

.sidebar .nav-section-toggle:not(.collapsed) .nav-section-caret {
    transform: rotate(180deg);
}

.sidebar .nav-section {
    margin: .16rem 0 .3rem .45rem;
    padding-left: .45rem;
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.sidebar .nav-sub-link {
    padding-top: .58rem;
    padding-bottom: .58rem;
    font-size: .9rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
}

.topbar {
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 1rem;
    flex-wrap: wrap;
}

.topbar > div {
    min-width: 0;
}

.topbar-kicker {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.topbar-title {
    font-size: 1.38rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .35rem .85rem .35rem .35rem;
    box-shadow: var(--shadow-sm);
}

.user-chip strong,
.user-chip span {
    display: block;
    line-height: 1.15;
}

.user-chip strong {
    font-size: .88rem;
}

.user-chip span {
    color: var(--muted);
    font-size: .76rem;
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 800;
}

.container-fluid {
    max-width: 1600px;
    width: 100%;
}

.dashboard-hero {
    background:
        linear-gradient(135deg, rgba(18, 28, 47, .98), rgba(37, 86, 167, .90)),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, .12));
    color: #fff;
    border-radius: .75rem;
    padding: 1.45rem 1.55rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    box-shadow: var(--shadow-md);
    min-width: 0;
}

.dashboard-hero > div:first-child {
    min-width: 0;
}

.dashboard-hero span {
    color: #9fb8e8;
    text-transform: uppercase;
    font-size: .76rem;
    font-weight: 800;
}

.dashboard-hero h2 {
    font-size: 1.55rem;
    font-weight: 800;
    margin: .25rem 0;
}

.dashboard-hero p {
    color: #dbe5f5;
    margin: 0;
}

.hero-stat {
    min-width: 250px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: .6rem;
    padding: 1rem;
}

.hero-stat small,
.hero-stat strong {
    display: block;
}

.hero-stat small {
    color: #c6d6ee;
}

.hero-stat strong {
    font-size: 1.45rem;
}

.summary-card,
.table-card,
.form-card,
.card {
    border: 1px solid var(--line);
}

.summary-card {
    border-radius: .7rem;
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-card .card-body {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: 112px;
}

.summary-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: .6rem;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.summary-card .label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.summary-card .h4 {
    font-weight: 800;
}

.table-card,
.form-card {
    background: var(--panel);
    border-radius: .7rem;
    box-shadow: var(--shadow-sm);
    padding: 1.15rem;
}

.table-card.table-responsive {
    overflow-x: auto;
}

.table-responsive > .table {
    min-width: max-content;
}

.chart-card h3 {
    font-size: .95rem;
    color: var(--ink);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-title {
    font-size: .95rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.account-tabs {
    border-bottom-color: var(--line);
}

.account-tabs .nav-link {
    color: var(--muted);
    font-weight: 800;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
}

.account-tabs .nav-link.active {
    color: var(--brand);
    background: transparent;
    border-bottom-color: var(--brand);
}

.note-form {
    background: #f8fafd;
    border: 1px solid var(--line);
    border-radius: .65rem;
    padding: 1rem;
}

.note-timeline {
    display: grid;
    gap: .8rem;
}

.note-timeline.compact {
    max-height: 420px;
    overflow-y: auto;
}

.note-item {
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: .6rem;
    padding: .85rem 1rem;
    background: #fff;
}

.note-item strong,
.note-item span {
    display: block;
}

.note-item strong {
    font-size: .92rem;
}

.note-item span {
    color: var(--muted);
    font-size: .78rem;
    margin-top: .12rem;
}

.note-item p {
    margin: .55rem 0 0;
    color: #344054;
}

.logo-preview-box {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #c9d3e2;
    border-radius: .65rem;
    background: #f8fafc;
    padding: 1rem;
}

.logo-preview-box img {
    max-width: 220px;
    max-height: 72px;
    object-fit: contain;
}

.logo-preview-box span {
    color: var(--muted);
}

.receipt-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    max-width: 980px;
    margin-inline: auto;
}

.receipt-stage {
    max-width: 980px;
    margin: 0 auto 2rem;
    padding: 1.25rem;
    background: linear-gradient(180deg, #e9eef7, #f8fafc);
    border: 1px solid #d8e0ec;
    border-radius: 1rem;
}

.receipt-sheet {
    position: relative;
    overflow: hidden;
    max-width: 920px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #d6deeb;
    border-radius: .9rem;
    box-shadow: 0 26px 70px rgba(22, 32, 51, .16);
    padding: 1.65rem;
}

.receipt-topline {
    position: absolute;
    inset: 0 0 auto;
    height: 10px;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand), #1f8a5b);
}

.receipt-watermark {
    position: absolute;
    right: -1rem;
    top: 7.2rem;
    transform: rotate(-10deg);
    border: 3px solid rgba(31, 138, 91, .22);
    color: rgba(31, 138, 91, .20);
    border-radius: .65rem;
    padding: .25rem 1.5rem;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0;
    pointer-events: none;
    z-index: 0;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 1px solid #d8e0ec;
    padding: .65rem 0 1rem;
    position: relative;
    z-index: 1;
}

.receipt-brand {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.receipt-logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: .75rem;
    background: linear-gradient(145deg, var(--brand-dark), var(--brand));
    color: #fff;
    font-weight: 900;
    font-size: 1.1rem;
    flex: 0 0 auto;
    box-shadow: 0 12px 24px rgba(37, 86, 167, .22);
}

.receipt-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: .55rem;
    background: #fff;
    padding: .28rem;
}

.receipt-logo span {
    display: block;
}

.receipt-company-label {
    display: inline-flex;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 999px;
    padding: .22rem .65rem;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: .35rem;
}

.receipt-brand h2 {
    margin: 0;
    font-size: 1.42rem;
    font-weight: 900;
}

.receipt-brand p {
    color: var(--muted);
    margin: .25rem 0 0;
}

.receipt-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .65rem;
    color: #475467;
    font-size: .86rem;
    margin-top: .85rem;
}

.receipt-company-meta span {
    background: #f8fafc;
    border: 1px solid #e4e9f2;
    border-radius: 999px;
    padding: .28rem .65rem;
}

.receipt-number {
    min-width: 230px;
    text-align: right;
    background: #f8fafc;
    border: 1px solid #e4e9f2;
    border-radius: .75rem;
    padding: 1rem;
    align-self: flex-start;
}

.receipt-number span,
.receipt-number small {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

.receipt-number strong {
    display: block;
    font-size: 1.45rem;
    margin: .2rem 0;
}

.receipt-status-row {
    display: grid;
    grid-template-columns: 1.5fr repeat(2, minmax(150px, .65fr));
    gap: 1rem;
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}

.receipt-paid-banner {
    background: linear-gradient(135deg, #176344, #1f8a5b);
    border: 0;
    border-radius: .8rem;
    margin: 0;
    padding: .85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #fff;
    box-shadow: 0 16px 34px rgba(31, 138, 91, .18);
}

.receipt-paid-banner span {
    color: #d8f4e6;
    font-weight: 800;
    text-transform: uppercase;
    font-size: .8rem;
}

.receipt-paid-banner strong {
    color: #fff;
    font-size: 1.42rem;
}

.receipt-mini-card {
    background: #fff;
    border: 1px solid #d8e0ec;
    border-radius: .8rem;
    padding: .85rem;
}

.receipt-mini-card span,
.receipt-mini-card strong {
    display: block;
}

.receipt-mini-card span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.receipt-mini-card strong {
    margin-top: .2rem;
    font-size: 1rem;
}

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

.receipt-grid section {
    border: 1px solid #d8e0ec;
    border-radius: .8rem;
    padding: .85rem;
    background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.receipt-grid h3 {
    font-size: .88rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: .65rem;
}

.receipt-grid dl {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: .34rem .7rem;
    margin: 0;
}

.receipt-grid dt {
    color: var(--muted);
    font-weight: 700;
}

.receipt-grid dd {
    margin: 0;
    font-weight: 700;
}

.receipt-table-wrap {
    margin-bottom: 1rem;
}

.receipt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #d8e0ec;
    border-radius: .8rem;
}

.receipt-table th {
    background: var(--brand-dark);
    color: #fff;
    padding: .7rem .85rem;
}

.receipt-table td {
    border: 0;
    border-top: 1px solid #e4e9f2;
    padding: .68rem .85rem;
}

.receipt-total-row td {
    font-weight: 900;
    background: #f0f4fa;
}

.receipt-pill {
    display: inline-flex;
    background: #eef6f2;
    color: #176344;
    border: 1px solid #cce7d9;
    border-radius: 999px;
    padding: .22rem .65rem;
    font-size: .8rem;
    font-weight: 900;
}

.receipt-footer {
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: .8rem;
    margin: .8rem 0 0;
    font-size: .9rem;
}

.payslip-stage {
    max-width: 980px;
    margin: 0 auto 2rem;
    padding: 1rem;
    background: #eef3f8;
    border: 1px solid #d9e2ee;
    border-radius: .75rem;
}

.payslip-sheet {
    position: relative;
    overflow: hidden;
    max-width: 920px;
    margin: 0 auto;
    padding: 1.4rem;
    background: #fff;
    border: 1px solid #ccd6e3;
    border-radius: .55rem;
    box-shadow: 0 22px 58px rgba(23, 38, 61, .14);
}

.payslip-accent {
    position: absolute;
    inset: 0 0 auto;
    height: 8px;
    background: linear-gradient(90deg, #14213d, #2556a7, #1f8a5b);
}

.payslip-header {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: .6rem 0 1rem;
    border-bottom: 2px solid #e5eaf1;
}

.payslip-brand {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.payslip-logo {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    flex: 0 0 64px;
    background: #14213d;
    color: #fff;
    border-radius: .45rem;
    font-weight: 900;
    font-size: 1.2rem;
}

.payslip-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: .3rem;
    border-radius: .35rem;
}

.payslip-kicker {
    color: #2556a7;
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.payslip-brand h2 {
    margin: .15rem 0 .2rem;
    font-size: 1.45rem;
    font-weight: 900;
    color: #14213d;
}

.payslip-brand p {
    margin: 0;
    color: var(--muted);
}

.payslip-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .8rem;
    margin-top: .55rem;
    color: #475467;
    font-size: .82rem;
}

.payslip-reference {
    min-width: 210px;
    padding: .85rem 1rem;
    background: #f7f9fc;
    border: 1px solid #d9e2ee;
    border-radius: .45rem;
    text-align: right;
}

.payslip-reference span,
.payslip-reference small {
    display: block;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    font-size: .75rem;
}

.payslip-reference strong {
    display: block;
    margin: .18rem 0;
    color: #14213d;
    font-size: 1.35rem;
}

.payslip-summary {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, minmax(130px, .65fr));
    gap: .75rem;
    margin: 1rem 0;
}

.payslip-summary > div {
    padding: .85rem;
    background: #f8fafc;
    border: 1px solid #d9e2ee;
    border-radius: .45rem;
}

.payslip-summary span,
.payslip-employer-box span {
    display: block;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.payslip-summary strong,
.payslip-employer-box strong {
    display: block;
    margin-top: .16rem;
    color: #14213d;
    font-size: 1.02rem;
}

.payslip-summary .payslip-net {
    background: linear-gradient(135deg, #14213d, #2556a7);
    border-color: #14213d;
}

.payslip-summary .payslip-net span,
.payslip-summary .payslip-net strong {
    color: #fff;
}

.payslip-summary .payslip-net strong {
    font-size: 1.42rem;
}

.payslip-info-grid,
.payslip-table-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: .9rem;
}

.payslip-info-grid section {
    border: 1px solid #d9e2ee;
    border-radius: .45rem;
    padding: .85rem;
    background: #fff;
}

.payslip-info-grid h3 {
    margin-bottom: .65rem;
    color: #2556a7;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.payslip-info-grid dl {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: .32rem .7rem;
    margin: 0;
}

.payslip-info-grid dt {
    color: var(--muted);
    font-weight: 700;
}

.payslip-info-grid dd {
    margin: 0;
    font-weight: 700;
    color: #1f2937;
}

.payslip-table {
    width: 100%;
    border: 1px solid #d9e2ee;
    border-collapse: collapse;
    border-radius: .45rem;
    overflow: hidden;
}

.payslip-table th {
    padding: .68rem .8rem;
    background: #14213d;
    color: #fff;
    font-size: .82rem;
    text-transform: uppercase;
}

.payslip-table th:last-child,
.payslip-table td:last-child {
    text-align: right;
}

.payslip-table td {
    padding: .62rem .8rem;
    border-top: 1px solid #edf1f6;
}

.payslip-total-row td {
    background: #eef3f8;
    font-weight: 900;
    color: #14213d;
}

.payslip-employer-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: .9rem 0;
    padding: .85rem;
    background: #f8fafc;
    border: 1px solid #d9e2ee;
    border-radius: .45rem;
}

.payslip-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr)) 2fr;
    gap: .8rem;
    align-items: end;
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid #d9e2ee;
    color: var(--muted);
    font-size: .86rem;
}

.payslip-footer strong,
.payslip-footer span {
    display: block;
}

.payslip-footer strong {
    color: #14213d;
    text-transform: uppercase;
    font-size: .75rem;
}

.payslip-footer p {
    margin: 0;
    text-align: right;
}

.payslip-reference-stage {
    max-width: 980px;
    margin: 0 auto 2rem;
    padding: 1rem;
    background: #f3f4f6;
    border: 1px solid #d8dde5;
}

.payslip-reference-sheet {
    max-width: 920px;
    min-height: 1120px;
    margin: 0 auto;
    padding: 48px 54px;
    background: #fff;
    color: #000;
    border: 1px solid #d0d5dd;
    box-shadow: 0 18px 50px rgba(16, 24, 40, .12);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.28;
}

.payslip-reference-sheet h2 {
    margin: 0 0 8px;
    color: #000;
    font-size: 14px;
    font-weight: 700;
}

.payslip-reference-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1.05fr;
    gap: 28px;
    margin-bottom: 34px;
}

.payslip-reference-details.banking {
    margin-bottom: 24px;
}

.payslip-reference-details dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 4px 10px;
    margin: 0;
}

.payslip-reference-details dt {
    color: #000;
    font-weight: 700;
}

.payslip-reference-details dd {
    margin: 0;
    color: #000;
}

.payslip-reference-two-col {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.payslip-reference-table {
    width: 100%;
    border-collapse: collapse;
    color: #000;
    font-size: 12px;
}

.payslip-reference-table th {
    padding: 4px 3px;
    color: #000;
    background: transparent;
    font-weight: 700;
    text-align: left;
}

.payslip-reference-table thead tr:first-child th {
    background: #c9c9c9;
    text-align: center;
}

.payslip-reference-table th:nth-child(n+2),
.payslip-reference-table td:nth-child(n+2) {
    text-align: right;
}

.payslip-reference-table td {
    padding: 3px;
    border: 0;
}

.payslip-reference-table .total td {
    border-top: 2px solid #000;
    font-weight: 700;
}

.payslip-reference-net {
    display: grid;
    grid-template-columns: 1fr 220px;
    align-items: center;
    margin: 22px 0;
    padding: 5px 0;
    background: #c9c9c9;
    color: #000;
    font-weight: 700;
}

.payslip-reference-net span {
    text-align: center;
}

.payslip-reference-net strong {
    color: #000;
    text-align: center;
}

.payslip-reference-table.compact {
    margin-top: 8px;
}

.payslip-reference-note {
    margin: 70px 0 0;
    color: #000;
    font-size: 12px;
    font-weight: 700;
}

.chart-card canvas {
    max-height: 320px;
}

.table {
    margin-bottom: 0;
}

.table td,
.table th {
    white-space: nowrap;
}

.table td p,
.table td small,
.table td .text-muted {
    white-space: normal;
}

.table .d-inline {
    display: inline-flex !important;
    vertical-align: middle;
    margin-left: .25rem;
}

.table .text-end .btn,
.table .text-end form {
    margin-top: .1rem;
    margin-bottom: .1rem;
}

.table thead th {
    background: #f8fafd;
    color: #44546a;
    border-bottom: 1px solid var(--line);
    font-size: .75rem;
    text-transform: uppercase;
    font-weight: 800;
    white-space: nowrap;
}

.table tbody td {
    border-color: #edf1f7;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f9fbff;
}

.form-label {
    color: #43536a;
    font-size: .86rem;
    font-weight: 700;
}

.form-control,
.form-select {
    border-color: #d8e0ec;
    border-radius: .5rem;
    min-height: 2.55rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(37, 86, 167, .13);
}

.btn {
    border-radius: .5rem;
    font-weight: 700;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 8px 18px rgba(37, 86, 167, .16);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #1f4b91;
    border-color: #1f4b91;
}

.btn-outline-secondary {
    border-color: #c9d3e2;
    color: #46566d;
    background: #fff;
}

.badge {
    border-radius: 999px;
    font-weight: 800;
    padding: .42em .72em;
}

.bg-success {
    background-color: var(--success) !important;
}

.bg-danger {
    background-color: var(--danger) !important;
}

.bg-warning {
    background-color: #f7d070 !important;
}

.bg-primary {
    background-color: var(--brand) !important;
}

.alert {
    border-radius: .6rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 991px) {
    .login-page {
        padding: 1rem;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 2rem;
        gap: 2rem;
    }

    .login-brand-panel h1 {
        font-size: 2.25rem;
    }

    .login-card {
        padding: 2rem;
    }

    .sidebar {
        position: static;
        width: 100%;
        border-radius: 0;
    }

    .app-shell {
        display: block;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        min-width: 0;
    }

    .topbar,
    .topbar-actions,
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .hero-stat {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 575px) {
    .topbar {
        padding: .9rem 1rem;
    }

    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .user-chip {
        width: 100%;
    }

    .credential-row {
        display: block;
    }

    .receipt-stage {
        padding: .5rem;
    }

    .receipt-sheet {
        padding: 1rem;
    }

    .receipt-header,
    .receipt-status-row,
    .receipt-grid,
    .receipt-status-row {
        display: block;
    }

    .receipt-number {
        text-align: left;
        margin-top: 1rem;
    }

    .receipt-grid section {
        margin-bottom: 1rem;
    }

    .receipt-paid-banner,
    .receipt-mini-card {
        margin-bottom: 1rem;
    }

    .receipt-grid dl {
        grid-template-columns: 1fr;
    }

    .payslip-header,
    .payslip-summary,
    .payslip-info-grid,
    .payslip-table-grid,
    .payslip-employer-box,
    .payslip-footer {
        display: block;
    }

    .payslip-reference,
    .payslip-summary > div,
    .payslip-info-grid section,
    .payslip-table,
    .payslip-employer-box > div,
    .payslip-footer > div,
    .payslip-footer p {
        margin-top: .75rem;
    }

    .payslip-footer p {
        text-align: left;
    }

    .payslip-reference-sheet {
        padding: 24px 18px;
        min-height: auto;
    }

    .payslip-reference-details,
    .payslip-reference-two-col {
        display: block;
    }

    .payslip-reference-details dl,
    .payslip-reference-table {
        margin-bottom: 14px;
    }

    .payslip-reference-net {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    .sidebar,
    .topbar,
    .btn,
    form,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0;
        width: 100%;
    }

    body {
        background: #fff;
    }

    .receipt-sheet {
        max-width: none;
        border: 0;
        box-shadow: none;
        padding: 0;
        font-size: 11px;
    }

    .receipt-stage {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        background: #fff;
    }

    .receipt-header {
        break-inside: avoid;
    }

    .receipt-brand h2 {
        font-size: 18px;
    }

    .receipt-logo {
        width: 46px;
        height: 46px;
    }

    .receipt-number strong,
    .receipt-paid-banner strong {
        font-size: 16px;
    }

    .receipt-stage,
    .receipt-grid,
    .receipt-table-wrap,
    .receipt-footer {
        break-inside: avoid;
    }

    .receipt-grid {
        gap: 8px;
        margin-bottom: 8px;
    }

    .receipt-grid section,
    .receipt-mini-card,
    .receipt-paid-banner {
        padding: 8px;
    }

    .receipt-table th,
    .receipt-table td {
        padding: 6px 8px;
    }

    .receipt-topline {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .receipt-paid-banner,
    .receipt-table th {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .receipt-watermark {
        opacity: .55;
    }

    .payslip-stage {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        background: #fff;
    }

    .payslip-sheet {
        max-width: none;
        padding: 0;
        border: 0;
        box-shadow: none;
        font-size: 10.5px;
    }

    .payslip-header,
    .payslip-summary,
    .payslip-info-grid,
    .payslip-table-grid,
    .payslip-employer-box,
    .payslip-footer {
        break-inside: avoid;
    }

    .payslip-header {
        padding-top: 10px;
    }

    .payslip-logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .payslip-brand h2 {
        font-size: 17px;
    }

    .payslip-reference strong,
    .payslip-summary .payslip-net strong {
        font-size: 15px;
    }

    .payslip-summary,
    .payslip-info-grid,
    .payslip-table-grid,
    .payslip-employer-box {
        gap: 6px;
        margin-bottom: 7px;
    }

    .payslip-summary > div,
    .payslip-info-grid section,
    .payslip-employer-box,
    .payslip-reference {
        padding: 7px;
    }

    .payslip-table th,
    .payslip-table td {
        padding: 5px 7px;
    }

    .payslip-accent,
    .payslip-summary .payslip-net,
    .payslip-table th {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .payslip-reference-stage {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        background: #fff;
    }

    .payslip-reference-sheet {
        max-width: none;
        min-height: auto;
        padding: 0;
        border: 0;
        box-shadow: none;
        font-size: 10.5px;
    }

    .payslip-reference-sheet h2 {
        font-size: 12px;
    }

    .payslip-reference-details {
        gap: 18px;
        margin-bottom: 26px;
    }

    .payslip-reference-details.banking {
        margin-bottom: 18px;
    }

    .payslip-reference-details dl {
        grid-template-columns: 118px 1fr;
        gap: 3px 8px;
    }

    .payslip-reference-two-col {
        gap: 9px;
        margin-bottom: 14px;
    }

    .payslip-reference-table {
        font-size: 10.5px;
    }

    .payslip-reference-table th,
    .payslip-reference-table td {
        padding: 2px 3px;
    }

    .payslip-reference-net {
        margin: 16px 0;
        padding: 4px 0;
    }

    .payslip-reference-note {
        margin-top: 56px;
        font-size: 10.5px;
    }

    .payslip-reference-table thead tr:first-child th,
    .payslip-reference-net {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
