/* Google Fonts Anek Devanagari v17; license: fonts/OFL-Anek.txt.
   Only Latin is preloaded; the browser fetches other subsets when needed. */
@font-face {
    font-family: "Anek Devanagari";
    font-style: normal;
    font-weight: 100 800;
    font-stretch: 100%;
    font-display: swap;
    src: url("fonts/anek-devanagari-devanagari.4bdaada43413.woff2") format("woff2");
    unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

@font-face {
    font-family: "Anek Devanagari";
    font-style: normal;
    font-weight: 100 800;
    font-stretch: 100%;
    font-display: swap;
    src: url("fonts/anek-devanagari-latin-ext.aca419244ff8.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Anek Devanagari";
    font-style: normal;
    font-weight: 100 800;
    font-stretch: 100%;
    font-display: swap;
    src: url("fonts/anek-devanagari-latin.54644643f5c3.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
    padding-top: 48px;
    font-family: "Anek Devanagari", Arial, sans-serif;
    /* Adjust this value based on your navbar height */
}

.navbar-custom {
    min-height: 48px;
    padding-top: 4px;
    padding-bottom: 4px;
    background-color: #00323C;
    color: white;
}

.navbar-custom .navbar-brand {
    font-size: 1.1875rem;
}

.portal-home {
    max-width: 1500px;
    margin: 0 auto;
    padding: 34px 38px 64px;
    color: #00323C;
}

.portal-hero {
    display: grid;
    grid-template-columns: minmax(360px, 40%) 1fr;
    min-height: 430px;
    overflow: hidden;
    background: #F2FAF9;
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(0, 50, 60, 0.08);
}

.portal-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 58px;
    background:
        radial-gradient(circle at 100% 100%, rgba(0, 180, 180, 0.10), transparent 40%),
        #F2FAF9;
}

.portal-label {
    margin-bottom: 24px;
    color: #008C95;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.portal-hero h1 {
    margin: 0 0 24px;
    color: #00323C;
    font-size: clamp(2.8rem, 4.5vw, 4.4rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.portal-hero p {
    max-width: 470px;
    margin: 0;
    color: #5A6B70;
    font-size: 1.3rem;
    line-height: 1.5;
}

.portal-hero-image {
    position: relative;
    min-height: 430px;
}

.portal-hero-image::before {
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    width: 80px;
    content: "";
    background: linear-gradient(90deg, rgba(242, 250, 249, 0.55), transparent);
}

.portal-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-tools {
    margin-top: 42px;
}

.portal-tools h2 {
    margin: 0 0 20px;
    color: #00323C;
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.portal-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.portal-card {
    display: flex;
    gap: 22px;
    min-height: 205px;
    padding: 30px;
    color: #00323C;
    text-decoration: none;
    background: #FFFFFF;
    border: 1px solid #DCE6E7;
    border-radius: 14px;
    box-shadow: 0 7px 22px rgba(0, 50, 60, 0.07);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.portal-card:hover,
.portal-card:focus {
    color: #00323C;
    text-decoration: none;
    border-color: rgba(0, 140, 149, 0.45);
    box-shadow: 0 12px 28px rgba(0, 50, 60, 0.12);
    transform: translateY(-3px);
}

.portal-card:focus-visible {
    outline: 3px solid rgba(0, 140, 149, 0.35);
    outline-offset: 3px;
}

.portal-card-icon {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    background: #DDF6F4;
    border-radius: 50%;
}

.portal-card-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: #00323C;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.portal-card-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.portal-card-content strong {
    margin: 4px 0 10px;
    font-size: 1.28rem;
    line-height: 1.25;
}

.portal-card-description {
    margin-bottom: 20px;
    color: #637479;
    font-size: 1rem;
    line-height: 1.45;
}

.portal-card-link {
    margin-top: auto;
    color: #008C95;
    font-weight: 700;
}

.portal-login {
    display: grid;
    min-height: calc(100vh - 48px);
    padding: 64px 38px;
    place-items: center;
    background: #FBFCFC;
}

.portal-login-panel {
    display: grid;
    width: min(1380px, 100%);
    min-height: 620px;
    grid-template-columns: minmax(420px, 39%) 1fr;
    overflow: hidden;
    background: #F2FAF9;
    border-radius: 20px;
    box-shadow: 0 14px 38px rgba(0, 50, 60, 0.10);
}

.portal-login-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px;
    background:
        radial-gradient(circle at 100% 100%, rgba(0, 180, 180, 0.10), transparent 42%),
        #F2FAF9;
}

.portal-login-content h1 {
    margin: 0 0 24px;
    color: #00323C;
    font-size: clamp(2.8rem, 4vw, 4.2rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.portal-login-message {
    max-width: 460px;
    margin: 0 0 32px;
    color: #53666C;
    font-size: 1.25rem;
    line-height: 1.5;
}

.portal-login-button {
    display: inline-flex;
    width: fit-content;
    min-width: 310px;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 14px 26px;
    color: #FFFFFF;
    font-size: 1.12rem;
    font-weight: 600;
    text-decoration: none;
    background: #00323C;
    border: 2px solid #00323C;
    border-radius: 10px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.portal-login-button:hover,
.portal-login-button:focus {
    color: #FFFFFF;
    text-decoration: none;
    background: #00505A;
    border-color: #00505A;
    box-shadow: 0 8px 20px rgba(0, 50, 60, 0.20);
    transform: translateY(-2px);
}

.portal-login-button:focus-visible {
    outline: 3px solid rgba(0, 140, 149, 0.35);
    outline-offset: 3px;
}

.microsoft-mark {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
}

.portal-login-image {
    position: relative;
    min-height: 620px;
}

.portal-login-image::before {
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    width: 95px;
    content: "";
    background: linear-gradient(90deg, rgba(242, 250, 249, 0.65), transparent);
}

.portal-login-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1050px) {
    .portal-hero {
        grid-template-columns: minmax(320px, 45%) 1fr;
    }

    .portal-hero-content {
        padding: 44px;
    }

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

    .portal-card {
        min-height: 160px;
    }
}

@media (max-width: 760px) {
    .portal-home {
        padding: 22px 16px 44px;
    }

    .portal-hero {
        grid-template-columns: 1fr;
    }

    .portal-hero-content {
        padding: 42px 30px;
    }

    .portal-hero-image {
        min-height: 260px;
    }

    .portal-hero-image::before {
        display: none;
    }

    .portal-card {
        padding: 25px;
    }

    .portal-login {
        padding: 22px 16px 44px;
        place-items: start center;
    }

    .portal-login-panel {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .portal-login-content {
        padding: 44px 30px;
    }

    .portal-login-content h1 {
        font-size: 2.75rem;
    }

    .portal-login-button {
        width: 100%;
        min-width: 0;
    }

    .portal-login-image {
        min-height: 270px;
    }

    .portal-login-image::before {
        display: none;
    }
}

.search-results {
    width: 100%;
    left: 0;
}

.form {
    width: 50%;
}

.table_input {
    border: none;
    outline: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.table-success,
.table-success>th,
.table-success>td {
    background-color: #D1FAE5 !important;

    /* optional */
}

/* Remove default hover from status buttons */
.btn-group[aria-label="Filter by status"] .btn:hover,
.btn-group[aria-label="Filter by status"] .btn:focus {
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

/* Remove hover/active background from status filter buttons */
.btn-group[aria-label="Filter by status"] .btn:hover,
.btn-group[aria-label="Filter by status"] .btn:focus {
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

/* Optional: also keep them neutral when active */
.btn-group[aria-label="Filter by status"] .btn.active {
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

/* XPM reconciliation report */
.recon-page {
    max-width: 1500px;
    margin: 0 auto;
    padding: 36px 38px 64px;
    color: #172033;
}

.recon-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.recon-heading h1 {
    margin: 0;
    color: #00323C;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.recon-source-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: #687A7F;
    font-size: 0.9rem;
}

.recon-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    color: #176B48;
    background: #E7F7EF;
    border-radius: 999px;
}

.recon-source-badge::before {
    width: 7px;
    height: 7px;
    content: "";
    background: currentColor;
    border-radius: 50%;
}

.recon-run-button,
.recon-xpm-link {
    color: #FFFFFF;
    background: #007C84;
    border-color: #007C84;
}

.recon-run-button:hover,
.recon-run-button:focus,
.recon-xpm-link:hover,
.recon-xpm-link:focus {
    color: #FFFFFF;
    background: #005F66;
    border-color: #005F66;
}

.recon-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.recon-metric {
    display: flex;
    min-height: 140px;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    color: #172033;
    text-align: left;
    background: #FFFFFF;
    border: 1px solid #DCE6E7;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 50, 60, 0.07);
    cursor: pointer;
}

.recon-metric:hover,
.recon-metric:focus,
.recon-metric.is-selected {
    border-color: #008C95;
    box-shadow: inset 0 0 0 1px #008C95, 0 5px 16px rgba(0, 50, 60, 0.10);
}

.recon-metric-label {
    color: #637479;
}

.recon-metric strong {
    margin-top: 7px;
    color: #00323C;
    font-size: 2rem;
    line-height: 1;
}

.recon-metric small {
    margin-top: 7px;
    color: #687A7F;
}

.recon-metric .recon-danger-text {
    color: #B42318;
}

.recon-metric .recon-warning-text {
    color: #9A5B13;
}

.recon-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 18px;
    align-items: start;
}

.recon-results-panel,
.recon-detail-panel {
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #DCE6E7;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 50, 60, 0.07);
}

.recon-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 20px 14px;
}

.recon-results-heading h2,
.recon-detail-panel h2 {
    margin: 0;
    color: #00323C;
    font-size: 1.2rem;
    font-weight: 700;
}

.recon-results-heading span {
    color: #687A7F;
    font-size: 0.88rem;
    text-align: right;
}

.recon-controls {
    display: flex;
    gap: 10px;
    padding: 0 20px 14px;
}

.recon-search-label {
    position: relative;
    flex: 1;
    margin: 0;
}

.recon-search-label .form-control {
    padding-left: 38px;
}

.recon-search-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 12px;
    color: #687A7F;
    font-size: 0.85rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.recon-table {
    min-width: 740px;
    margin: 0;
}

.recon-table thead th {
    color: #637479;
    font-size: 0.84rem;
    font-weight: 600;
    background: #F4F8F8;
    border-top: 0;
    border-bottom: 1px solid #DCE6E7;
}

.recon-table td {
    vertical-align: middle;
    border-color: #E5ECEC;
}

.recon-table tbody tr {
    cursor: pointer;
}

.recon-table tbody tr:hover,
.recon-table tbody tr.is-selected {
    background: #EAF6F6;
}

.recon-issue-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.recon-issue-dot {
    width: 10px;
    height: 10px;
    background: #C67A20;
    border-radius: 50%;
}

.recon-issue-duplicate .recon-issue-dot {
    background: #C43227;
}

.recon-record-name {
    display: block;
    color: #172033;
    font-weight: 600;
}

.recon-record-name+small {
    display: block;
    margin-top: 2px;
    color: #687A7F;
}

.recon-empty {
    padding: 44px 20px;
    color: #687A7F;
    text-align: center;
}

.recon-detail-panel {
    padding: 20px;
}

.recon-detail-kicker {
    display: block;
    margin-bottom: 5px;
    color: #687A7F;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recon-detail-panel>p {
    margin: 10px 0 0;
    color: #637479;
}

.recon-detail-panel dl {
    margin: 18px 0;
    padding: 14px;
    background: #F4F8F8;
    border-radius: 8px;
}

.recon-detail-panel dl>div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.recon-detail-panel dl>div:last-child {
    margin-bottom: 0;
}

.recon-detail-panel dt {
    color: #687A7F;
    font-weight: 400;
}

.recon-detail-panel dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.recon-detail-note {
    font-size: 0.88rem;
}

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

    .recon-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .recon-page {
        padding: 24px 16px 44px;
    }

    .recon-heading {
        display: block;
    }

    .recon-run-button {
        width: 100%;
        margin-top: 16px;
    }

    .recon-controls {
        flex-direction: column;
    }

    .recon-controls label,
    .recon-controls .form-control {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .recon-metrics {
        grid-template-columns: 1fr;
    }
}

/* Client Billing */

/* Fills the screen; side margins grow from 16px on laptops to 48px on large
   monitors, and only very wide screens stop at 2560px. */
.cb-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 2560px;
    margin: 0 auto;
    padding: 12px clamp(16px, 2vw, 48px) 20px;
    color: #00323C;
    font-size: 15px;
    line-height: 1.45;
}

.cb-page .alert {
    margin: 0;
}

.cb-controls,
.cb-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.cb-month {
    display: flex;
    align-items: center;
    height: 38px;
    background: #FFFFFF;
    border: 1px solid #D5E0E1;
    border-radius: 10px;
}

.cb-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #4B6268;
}

.cb-icon-button:hover {
    background: #E6EFEF;
    color: #00323C;
}

.cb-month-input {
    height: 36px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #00323C;
    font-size: 14px;
    font-weight: 600;
}

.cb-select {
    height: 38px;
    min-width: 150px;
    padding: 0 10px;
    background: #FFFFFF;
    border: 1px solid #D5E0E1;
    border-radius: 10px;
    color: #00323C;
    font-size: 14px;
}

.cb-search {
    position: relative;
    flex: 0 1 230px;
    min-width: 170px;
    color: #4B6268;
}

.cb-search svg {
    position: absolute;
    top: 11px;
    left: 11px;
}

.cb-search input {
    width: 100%;
    height: 38px;
    padding: 0 10px 0 34px;
    background: #FFFFFF;
    border: 1px solid #D5E0E1;
    border-radius: 10px;
    color: #00323C;
    font-size: 14px;
}

.cb-text-button {
    padding: 0 6px;
    background: none;
    border: 0;
    color: #007C84;
    font-size: 14px;
    text-decoration: underline;
    white-space: nowrap;
}

.cb-text-button:hover {
    color: #00505A;
}

.cb-as-at {
    margin-left: auto;
    color: #4B6268;
    font-size: 13.5px;
}

.cb-as-at strong {
    color: #00323C;
    font-weight: 600;
}

/* Staff page: information only, so no billing actions or notes. */
.cb-page.is-staff-view .cb-tick,
.cb-page.is-staff-view .cb-menu-button,
.cb-page.is-staff-view .cb-show,
.cb-page.is-staff-view .cb-status-button,
.cb-page.is-staff-view .cb-interim,
.cb-page.is-staff-view .cb-move-timesheets,
.cb-page.is-staff-view .cb-actions,
.cb-page.is-staff-view .cb-panel-links,
.cb-page.is-staff-view #cbStatusTodo,
.cb-page.is-staff-view #cbTabNotes {
    display: none;
}

/* No actions on the staff page, so drop that column and let the numbers reach the right-hand edge. */
.cb-page.is-staff-view .cb-row {
    grid-template-columns: minmax(170px, 1fr) 76px 76px 76px 76px 76px;
}

.cb-view-switch {
    display: inline-flex;
    padding: 3px;
    background: #EEF3F4;
    border-radius: 10px;
}

.cb-view-option {
    padding: 6px 12px;
    border-radius: 8px;
    color: #4B6268;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}

.cb-view-option:hover {
    color: #00323C;
}

.cb-view-option.is-on {
    background: #FFFFFF;
    color: #00323C;
    box-shadow: 0 1px 2px rgba(0, 50, 60, 0.12);
}

.cb-workspace {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.cb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: clamp(420px, calc(100vh - 132px), 1400px);
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #DCE5E6;
    border-radius: 14px;
}

.cb-overview {
    flex: 7 1 640px;
}

.cb-panel {
    flex: 5 1 520px;
}

.cb-card-heading {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-bottom: 1px solid #E3EAEB;
}

.cb-card-heading h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* An admin's overview heading doubles as a switch to My time. Edge and Chrome
   draw its list like the page's other menus; other browsers keep their own list. */
.cb-heading-select,
.cb-heading-select::picker(select) {
    appearance: base-select;
}

.cb-heading-select {
    padding: 0 4px 0 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* A thin chevron like the page's other arrows, turned up while the list is open. */
.cb-heading-select::picker-icon {
    content: "";
    width: 16px;
    height: 16px;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: rotate 0.15s;
}

.cb-heading-select:open::picker-icon {
    rotate: 180deg;
}

/* Same look as .cb-menu. */
.cb-heading-select::picker(select) {
    margin-top: 4px;
    padding: 6px;
    background: #FFFFFF;
    border: 1px solid #DCE5E6;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 50, 60, 0.16);
}

/* Same look as .cb-menu-item. */
.cb-heading-select option {
    padding: 9px 10px;
    border-radius: 8px;
    color: #00323C;
    font-size: 13.5px;
    font-weight: 500;
}

.cb-heading-select option:hover,
.cb-heading-select option:focus-visible {
    background: #EEF4F4;
    outline: none;
}

/* The current choice gets a small teal dot instead of the browser's tick. */
.cb-heading-select option::checkmark {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #007C84;
}

.cb-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.cb-card-actions[hidden] {
    display: none;
}

.cb-bulk-count {
    margin-right: 4px;
    font-size: 13.5px;
    font-weight: 600;
}

.cb-button {
    height: 32px;
    padding: 0 10px;
    background: #FFFFFF;
    border: 1px solid #D5E0E1;
    border-radius: 8px;
    color: #00323C;
    font-size: 13px;
}

.cb-button:hover {
    background: #F2F7F7;
}

.cb-search-banner {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
    padding: 5px 12px;
    background: #F7FAFA;
    border-bottom: 1px solid #E3EAEB;
    color: #4B6268;
    font-size: 13px;
}

.cb-search-banner[hidden] {
    display: none;
}

.cb-search-banner .cb-text-button {
    height: 24px;
    font-size: 13px;
}

.cb-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.cb-tree {
    min-width: 698px;
}

/* Number columns fit a sorted "Total WIP" heading and a whole-firm total. */
.cb-row {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) 76px 76px 76px 76px 76px 64px;
    column-gap: 10px;
    align-items: center;
    padding: 0 12px;
}

.cb-head-row {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 34px;
    background: #00323C;
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 600;
}

.cb-total-label {
    padding-left: 4px;
}

/* The overview's heading row is a little larger than the panel's table headings. */
.cb-row.cb-head-row {
    height: 36px;
    font-size: 14.5px;
}

.cb-sort {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    background: none;
    border: 0;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
}

/* The name heading sorts too, but stays on the left. */
.cb-sort.cb-sort-name {
    justify-self: start;
    padding-left: 4px;
}

.cb-sort:hover {
    text-decoration: underline;
}

.cb-sort[data-direction="desc"]::after {
    content: "↓";
}

.cb-sort[data-direction="asc"]::after {
    content: "↑";
}

.cb-group-row {
    min-height: 36px;
    background: #FFFFFF;
    border-top: 1px solid #DCE5E6;
    border-bottom: 1px solid #DCE5E6;
    font-size: 14px;
    font-weight: 600;
}

.cb-client-row {
    min-height: 34px;
    background: #FFFFFF;
    border-bottom: 1px solid #E3EAEB;
    font-size: 13.5px;
}

.cb-client-row .cb-name {
    padding-left: 36px;
}

.cb-job-row {
    min-height: 30px;
    background: #FFFFFF;
    border-bottom: 1px solid #EEF2F2;
    font-size: 13px;
}

.cb-name {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

/* Group tick boxes: rounded, and filled teal with a white tick (or dash) when chosen.
   They sit before the chevron; client and job rows move along by the same width so
   the tree still lines up. */
.cb-tick {
    appearance: none;
    display: inline-grid;
    flex: none;
    place-content: center;
    width: 14px;
    height: 14px;
    margin: 0;
    background: #FFFFFF;
    border: 1.5px solid #8FA4A8;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s;
}

.cb-tick:hover {
    border-color: #007C84;
}

.cb-tick:checked,
.cb-tick:indeterminate {
    background: #007C84;
    border-color: #007C84;
}

/* The tick is a turned "L" drawn with two borders; the dash is a single line. */
.cb-tick::before {
    content: "";
    width: 7px;
    height: 3px;
    border-bottom: 2px solid #FFFFFF;
    border-left: 2px solid #FFFFFF;
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg);
}

.cb-tick:checked::before {
    opacity: 1;
}

.cb-tick:indeterminate::before {
    height: 0;
    border-left: 0;
    opacity: 1;
    transform: none;
}

/* On the dark heading row the box is outlined in white and fills white when chosen. */
.cb-head-row .cb-tick {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.75);
}

.cb-head-row .cb-tick:hover,
.cb-head-row .cb-tick:checked,
.cb-head-row .cb-tick:indeterminate {
    border-color: #FFFFFF;
}

.cb-head-row .cb-tick:checked,
.cb-head-row .cb-tick:indeterminate {
    background: #FFFFFF;
}

.cb-head-row .cb-tick::before {
    border-color: #00323C;
}

.cb-chevron {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #4B6268;
}

.cb-chevron:hover {
    background: #E6EFEF;
    color: #00323C;
}

.cb-chevron svg {
    transition: transform 0.15s;
}

.cb-chevron.is-open svg {
    transform: rotate(90deg);
}

.cb-name-button {
    min-width: 0;
    overflow: hidden;
    padding: 0;
    background: none;
    border: 0;
    color: #00323C;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cb-name-button:hover {
    color: #007C84;
    text-decoration: underline;
}

.cb-name-button.is-selected {
    color: #007C84;
}

/* Job names get a fixed-width column so every job state starts at the same point. */
.cb-job-name {
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    min-width: 0;
    padding: 4px 0 4px 88px;
}

.cb-job-title {
    min-width: 0;
    overflow: hidden;
    padding: 0;
    text-overflow: ellipsis;
    background: none;
    border: 0;
    color: #00323C;
    font-size: 13.5px;
    text-align: left;
    white-space: nowrap;
}

.cb-job-title:hover {
    color: #007C84;
    text-decoration: underline;
}

.cb-job-title.is-current {
    color: #007C84;
    font-weight: 600;
}

.cb-job-state {
    min-width: 0;
    overflow: hidden;
    color: #4B6268;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cb-num {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.cb-strong {
    font-weight: 600;
}

.cb-actions {
    justify-self: end;
}

.cb-interim {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 4px;
    color: #007C84;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.cb-interim:hover,
.cb-move-timesheets:hover {
    color: #00505A;
}

/* Sits at the right-hand end of each job heading in WIP detail. */
.cb-move-timesheets {
    flex: none;
    margin-left: auto;
    color: #007C84;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.cb-empty {
    padding: 24px 16px;
    color: #4B6268;
    font-size: 14px;
    text-align: center;
}

.cb-total-row {
    position: sticky;
    bottom: 0;
    min-height: 36px;
    background: #00323C;
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 600;
}

.cb-panel-empty {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 64px 32px;
    color: #4B6268;
    font-size: 14px;
    text-align: center;
}

.cb-panel-empty svg {
    color: #7A9095;
}

.cb-panel-empty p {
    max-width: 340px;
    margin: 0;
}

.cb-panel-empty .cb-panel-empty-title {
    color: #00323C;
    font-size: 17px;
    font-weight: 600;
}

.cb-workspace.is-wide .cb-overview {
    display: none;
}

.cb-workspace.is-wide .cb-panel {
    flex: 1 1 100%;
}

.cb-panel-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.cb-panel-body[hidden],
.cb-panel-empty[hidden],
.cb-link-button[hidden],
.cb-tab-action[hidden],
.cb-loading[hidden],
.cb-load-error[hidden],
.cb-panes[hidden],
.cb-job-filter[hidden] {
    display: none;
}

.cb-panel-heading {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid #E3EAEB;
}

.cb-panel-title-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.cb-panel-title-row h2 {
    min-width: 0;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.cb-panel-title-actions {
    display: flex;
    flex: none;
    gap: 4px;
    align-items: center;
}

.cb-panel-title-actions .cb-button {
    height: 30px;
    border-radius: 10px;
}

.cb-panel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cb-link-button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    height: 30px;
    font-size: 13.5px;
    font-weight: 500;
}

.cb-link-button:hover {
    color: #00323C;
    text-decoration: none;
}

.cb-tab-row {
    display: flex;
    flex: none;
    gap: 4px;
    align-items: center;
    padding: 0 10px;
    overflow-x: auto;
    border-bottom: 1px solid #E3EAEB;
}

.cb-tablist {
    display: flex;
    gap: 4px;
    align-items: center;
}

.cb-tab {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    height: 38px;
    padding: 0 10px;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #4B6268;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.cb-tab:hover {
    color: #00323C;
}

.cb-tab.is-active {
    border-bottom-color: #00B9B9;
    color: #00323C;
    font-weight: 600;
}

.cb-count {
    padding: 0 7px;
    background: #EEF4F4;
    border-radius: 999px;
    color: #3D565C;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 18px;
}

.cb-tab.is-active .cb-count {
    background: #00323C;
    color: #FFFFFF;
}

.cb-tab-action {
    flex: none;
    height: 28px;
    margin-left: auto;
}

.cb-export {
    display: inline-flex;
    flex: none;
    gap: 6px;
    align-items: center;
}

.cb-tab-row .cb-export {
    height: 28px;
}

.cb-export[hidden] {
    display: none;
}

.cb-print-frame {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border: 0;
}

.cb-loading {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px;
    color: #4B6268;
    font-size: 13px;
}

.cb-skeleton {
    height: 14px;
    background: #E8EEEF;
    border-radius: 6px;
}

.cb-load-error {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 12px;
    color: #4B6268;
    font-size: 14px;
}

.cb-load-error p {
    margin: 0;
}

.cb-panes {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

.cb-pane {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

/* Hidden, not removed, so each tab keeps its scroll position. */
.cb-pane.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

.cb-job-filter {
    display: flex;
    flex: none;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #E3EAEB;
}

.cb-chip {
    display: inline-flex;
    gap: 2px;
    align-items: center;
    height: 30px;
    padding: 0 2px 0 12px;
    background: #CFEDEA;
    border-radius: 999px;
    color: #00323C;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.cb-chip .cb-chevron {
    width: 26px;
    height: 26px;
    border-radius: 999px;
}

.cb-wip-table {
    min-width: 480px;
}

.cb-wip-row {
    display: grid;
    grid-template-columns: 84px 104px minmax(160px, 1fr) 48px 88px;
    column-gap: 10px;
    align-items: start;
    padding: 0 12px;
}

.cb-wip-row.cb-head-row,
.cb-wip-row.cb-total-row {
    align-items: center;
}

.cb-span-3 {
    grid-column: 1 / 4;
}

.cb-wip-job-row {
    min-height: 32px;
    align-items: center;
    background: #E8F4F3;
    border-bottom: 1px solid #DCE5E6;
    font-size: 13.5px;
}

.cb-wip-job-row .cb-chevron,
.cb-invoice-job-row .cb-chevron {
    margin-left: -6px;
}

.cb-wip-job-row .cb-name-button,
.cb-invoice-job-row .cb-name-button {
    font-size: 13.5px;
}

.cb-entry-row {
    padding-top: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #EEF2F2;
    font-size: 13px;
    line-height: 1.4;
}

.cb-muted {
    color: #4B6268;
}

.cb-staff {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cb-note {
    min-width: 0;
    overflow-wrap: anywhere;
}

.cb-wip-empty {
    padding: 9px 12px 9px 36px;
    border-bottom: 1px solid #EEF2F2;
    color: #5A6B70;
    font-size: 13px;
}

.cb-invoice-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
}

.cb-invoice-section h3 {
    margin: 0 0 6px 2px;
    font-size: 15px;
    font-weight: 600;
}

.cb-invoice-table {
    overflow: hidden;
    border: 1px solid #DCE5E6;
    border-radius: 10px;
}

.cb-invoice-scroll {
    overflow-x: auto;
}

.cb-invoice-grid {
    min-width: 520px;
}

.cb-invoice-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 84px 84px 84px 64px;
    column-gap: 8px;
    align-items: center;
    padding: 0 12px;
}

.cb-invoice-row.cb-head-row {
    position: static;
    height: auto;
    min-height: 32px;
    line-height: 1.2;
}

.cb-invoice-job-row {
    min-height: 32px;
    background: #FFFFFF;
    border-bottom: 1px solid #EEF2F2;
    font-size: 13.5px;
}

.cb-invoice-line {
    min-height: 30px;
    background: #F7FAFA;
    border-bottom: 1px solid #EEF2F2;
    font-size: 13px;
}

.cb-invoice-name {
    flex-wrap: wrap;
    gap: 2px 6px;
    padding-left: 18px;
}

.cb-invoice-name .cb-chevron {
    width: 26px;
    height: 26px;
}

.cb-invoice-number {
    font-size: 13px;
    font-weight: 500;
}

.cb-narration {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px 12px 12px 52px;
    background: #F7FAFA;
    border-bottom: 1px solid #E3EAEB;
}

.cb-narration p {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: #3D565C;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-line;
}

.cb-copy {
    display: inline-flex;
    flex: none;
    gap: 6px;
    align-items: center;
    height: 30px;
    font-size: 12.5px;
}

.cb-invoice-total {
    min-height: 32px;
    background: #EEF4F4;
    font-size: 13.5px;
    font-weight: 700;
}

/* Only Drafted (green) and Carried forward (soft blue) rows are coloured. */
.cb-client-row.is-drafted {
    background: #E3F4E8;
}

.cb-job-row.is-drafted {
    background: #F2FAF4;
}

.cb-client-row.is-cf {
    background: #E6EEFB;
}

.cb-job-row.is-cf {
    background: #F3F7FD;
}

.cb-client-row.is-drafted .cb-status-text {
    color: #1B6B3A;
}

.cb-client-row.is-cf .cb-status-text {
    color: #2F5596;
}

.cb-status-text {
    flex: none;
    margin-left: 4px;
    color: #4B6268;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.cb-menu-button {
    justify-self: end;
}

.cb-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 4;
    background: transparent;
    border: 0;
    cursor: default;
}

.cb-menu-backdrop[hidden],
.cb-menu[hidden],
.cb-toast[hidden],
.cb-toast-undo[hidden] {
    display: none;
}

.cb-menu {
    position: absolute;
    right: 16px;
    z-index: 5;
    width: 240px;
    padding: 6px;
    background: #FFFFFF;
    border: 1px solid #DCE5E6;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 50, 60, 0.16);
}

.cb-menu-note {
    padding: 6px 10px;
    color: #5A6B70;
    font-size: 12px;
    font-weight: 500;
}

.cb-menu-item {
    display: block;
    width: 100%;
    padding: 9px 10px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #00323C;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
}

.cb-menu-item:hover,
.cb-menu-item:focus {
    background: #EEF4F4;
}

.cb-status-button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    height: 30px;
    font-weight: 500;
}

.cb-status-button.is-on[data-set-status="drafted"] {
    background: #E3F4E8;
    border-color: #1B6B3A;
    color: #1B6B3A;
    font-weight: 600;
}

.cb-status-button.is-on[data-set-status="cf"] {
    background: #E6EEFB;
    border-color: #2F5596;
    color: #2F5596;
    font-weight: 600;
}

.cb-panel-links .cb-text-button {
    height: 30px;
    font-size: 13px;
}

.cb-toast {
    position: absolute;
    bottom: 16px;
    left: 50%;
    z-index: 6;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 6px 6px 16px;
    background: #00323C;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 50, 60, 0.25);
    color: #FFFFFF;
    font-size: 14px;
    white-space: nowrap;
    transform: translateX(-50%);
}

.cb-toast-undo {
    height: 36px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 600;
}

.cb-toast-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #FFFFFF;
}

.cb-notes {
    padding: 14px 16px 18px;
}

.cb-note-label {
    margin: 0;
    color: #4B6268;
    font-size: 13px;
    font-weight: 500;
}

.cb-note-text {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    background: #FFFFFF;
    border: 1px solid #D5E0E1;
    border-radius: 10px;
    color: #00323C;
    resize: vertical;
}

.cb-note-actions {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 14px;
}

.cb-primary {
    background: #00323C;
    border-color: #00323C;
    color: #FFFFFF;
    font-weight: 600;
}

.cb-primary:hover {
    background: #00505A;
}

.cb-primary:disabled {
    background: #E3EAEB;
    border-color: #E3EAEB;
    color: #7A9095;
    cursor: not-allowed;
}

.cb-note-item {
    padding: 10px 0;
    border-top: 1px solid #E3EAEB;
}

.cb-note-meta {
    color: #5A6B70;
    font-size: 12.5px;
}

.cb-note-item p {
    margin: 4px 0 0;
    color: #00323C;
    font-size: 14px;
    white-space: pre-line;
}

.cb-no-notes {
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid #E3EAEB;
    color: #5A6B70;
    font-size: 13.5px;
}

.cb-page :focus-visible {
    outline: 2px solid #007C84;
    outline-offset: 2px;
}
