#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

body {
    background: #f7f9fc;
    color: #0f1f3d;
    font-family: Arial, Helvetica, sans-serif;
}

.dcf-top-strip,
.dcf-ext-template-edgesection {
    background-color: #115ba4;
    min-height: 8px;
}

.app-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #d9e2ef;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(190px, 280px) 1fr minmax(160px, 280px);
    min-height: 72px;
    padding: 0.75rem 1rem;
}

.dcf-logo {
    height: auto;
    max-height: 58px;
    max-width: 260px;
    width: auto;
}

.dcf-logo-mobile {
    max-height: 54px;
}

.app-header-title {
    align-items: center;
    color: #06366d;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.app-header-title h1 {
    font-size: clamp(1.65rem, 1.85vw, 2.05rem);
    font-weight: 900;
    line-height: 1.05;
    margin: 0;
    text-align: center;
}

.app-title-icon {
    display: block;
    filter: drop-shadow(0 8px 16px rgba(13, 54, 109, 0.2));
    height: 2.85rem;
    object-fit: contain;
    width: 2.85rem;
}

.app-header-user {
    display: flex;
    justify-content: flex-end;
}

.user-summary {
    align-items: center;
    color: #0e477f;
    display: grid;
    gap: 0.1rem 0.5rem;
    grid-template-columns: auto 1fr;
}

.user-avatar {
    align-items: center;
    background: #15588e;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    grid-row: span 2;
    height: 2.2rem;
    justify-content: center;
    width: 2.2rem;
}

.user-name {
    font-weight: 700;
}

.user-role {
    background: #e9f5ee;
    border: 1px solid #b6e2c5;
    border-radius: 999px;
    color: #176b34;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.08rem 0.55rem;
    width: fit-content;
}

.app-shell {
    display: grid;
    min-height: 60vh;
}

.app-shell.is-signed-in.nav-expanded {
    grid-template-columns: 250px minmax(0, 1fr);
}

.app-shell.is-signed-in.nav-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
}

.app-shell.is-public {
    grid-template-columns: 202px minmax(0, 1fr);
}

.side-nav {
    background: #155f95;
    color: #fff;
    min-height: 100%;
    padding: 0.65rem 0.5rem;
}

.nav-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #fff;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    margin-bottom: 0.5rem;
    width: 2.5rem;
}

.side-nav-list {
    display: grid;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-nav-item {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #fff;
    display: flex;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.65rem 0.75rem;
    text-align: left;
    width: 100%;
}

.side-nav-item:hover,
.side-nav-item:focus,
.side-nav-item.selected {
    background: #1f77b7;
    border-color: #5eb2f2;
    outline: none;
}

.side-nav-item:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.side-nav-item.is-planned {
    justify-content: flex-start;
}

.nav-planned-label {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    margin-left: auto;
    padding: 0.05rem 0.45rem;
}

.side-nav-icon {
    text-align: center;
    width: 1.1rem;
}

.app-main {
    background: #f7f9fc;
    min-width: 0;
    padding: 1rem;
}

.app-shell.is-public .app-main {
    background: #fff;
    overflow: hidden;
    padding: 0;
}

.app-shell.is-public .side-nav {
    background: #155f95;
    min-height: calc(100vh - 88px);
}

.dcf-ext-template-footer {
    background: #003467;
    min-height: 70px;
    margin: 0 !important;
}

.dcf-ext-template-link {
    color: inherit;
    text-decoration: none;
}

.dcf-ext-template-link:hover {
    text-decoration: underline;
}

.emergency-card {
    background: #fff;
    border-radius: 0.25rem;
    color: #0f1f3d;
    overflow: hidden;
    padding: 0;
}

.emergency-card-header {
    align-items: center;
    background: #951c1a;
    color: #fff;
    display: flex;
    gap: 0.5rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
}

.emergency-card .list-group-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.role-modal-backdrop {
    align-items: center;
    background: rgba(15, 31, 61, 0.55);
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 1100;
}

.role-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    max-width: 420px;
    overflow: hidden;
    width: min(92vw, 420px);
}

.role-modal-header {
    background: #20628f;
    color: #fff;
    padding: 1rem 1.25rem;
}

.role-modal-header h2 {
    font-size: 1.15rem;
    margin: 0;
}

.role-modal-body {
    display: grid;
    gap: 0.5rem;
    padding: 1.25rem;
}

.role-selection-message {
    color: #b91c1c;
    font-weight: 700;
    margin: 0;
}

.role-modal-actions {
    border-top: 1px solid #e3e8ef;
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
}

.session-timeout-backdrop {
    z-index: 1240;
}

.session-timeout-layer {
    z-index: 1250;
}

.session-timeout-dialog {
    max-width: 540px;
}

.session-timeout-card {
    overflow: hidden;
}

.session-timeout-header {
    background: linear-gradient(135deg, #f4f9ff 0%, #ffffff 100%);
}

.session-timeout-icon {
    background: #e8f1ff;
    color: #0868df;
}

.session-timeout-body {
    gap: 0.75rem;
}

.session-timeout-body p {
    color: #21344c;
    font-size: 1rem;
    line-height: 1.55;
    margin: 0;
}

.session-timeout-body strong {
    color: #0868df;
}

.session-timeout-countdown-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.session-timeout-countdown {
    background: #062f5f;
    border-radius: 0.45rem;
    color: #ffffff;
    display: inline-flex;
    font-family: "Courier New", monospace;
    font-size: 1.15rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.04em;
    min-width: 4.75rem;
    padding: 0.2rem 0.55rem;
}

.session-timeout-actions {
    gap: 0.75rem;
}

.public-landing {
    background: #f8f9ff;
    box-sizing: border-box;
    display: block;
    line-height: 0;
    margin: 0;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.app-main > .public-access-denied {
    align-items: center;
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 6px;
    color: #b91c1c;
    display: flex;
    font-weight: 700;
    gap: 0.65rem;
    line-height: 1.4;
    margin: 0.75rem 1rem;
    padding: 0.8rem 1rem;
}

.app-main > .public-access-denied i {
    color: #dc2626;
    flex-shrink: 0;
}

.public-home-image {
    aspect-ratio: 1.6632 / 1;
    display: block;
    height: auto;
    margin-inline: auto;
    max-width: 100%;
    min-height: 0;
    width: 100%;
}

.app-shell:has(.public-landing) {
    max-width: none;
    min-height: 0;
    width: 100%;
}

.app-shell:has(.public-landing) .side-nav {
    min-height: 0;
}

.app-shell:has(.public-landing) .app-main {
    background: #f8f9ff;
    box-sizing: border-box;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.app-shell.is-signed-in.nav-expanded .public-landing,
.app-shell.is-signed-in.nav-collapsed .public-landing,
.app-shell.is-public .public-landing {
    width: 100%;
}

.eyebrow {
    color: #0f5b8f;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
}

.rtts-home-shell {
    background:
        radial-gradient(circle at 82% 12%, rgba(65, 132, 255, 0.22), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f5f9ff 42%, #e8f2ff 100%);
    border: 1px solid #d4e4fb;
    border-radius: 8px;
    box-shadow: 0 22px 52px rgba(25, 82, 157, 0.12);
    color: #061b45;
    margin: 0 auto;
    max-width: 1180px;
    min-height: 705px;
    overflow: hidden;
    position: relative;
}

.rtts-home-hero {
    min-height: 555px;
    position: relative;
}

.rtts-home-hero::before {
    background:
        radial-gradient(circle at 8% 24%, rgba(0, 96, 255, 0.07), transparent 28%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 32%, rgba(255, 255, 255, 0.12) 60%, transparent 100%);
    content: "";
    inset: 0;
    position: absolute;
    z-index: 1;
}

.rtts-home-copy {
    padding: 3.5rem 0 0 2.15rem;
    position: relative;
    width: min(43%, 460px);
    z-index: 2;
}

.rtts-home-copy h1 {
    color: #071a4d;
    font-size: clamp(2.05rem, 3.2vw, 3.25rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0 0 1rem;
}

.rtts-home-copy h1 span {
    color: #075dff;
}

.rtts-home-subtitle {
    color: #183665;
    font-size: clamp(0.95rem, 1.15vw, 1.12rem);
    font-weight: 600;
    line-height: 1.55;
    margin: 0 0 1.7rem;
    max-width: 360px;
}

.rtts-home-features {
    display: grid;
    gap: 1.05rem;
}

.rtts-home-feature {
    align-items: center;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 3rem 1fr;
}

.rtts-home-feature i,
.rtts-home-action i {
    align-items: center;
    background: #eaf2ff;
    border-radius: 16px;
    color: #075dff;
    display: inline-flex;
    font-size: 1.25rem;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.rtts-home-feature strong,
.rtts-home-action strong {
    color: #09214f;
    display: block;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.15;
}

.rtts-home-feature p,
.rtts-home-action p {
    color: #29446e;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0.2rem 0 0;
}

.rtts-home-visual {
    background-image: url("../Image/rtts-home-hero.png?v=20260716-blue-visual");
    background-position: right top;
    background-repeat: no-repeat;
    background-size: auto 100%;
    inset: 0 0 105px 34%;
    position: absolute;
    z-index: 0;
}

.rtts-home-visual::before {
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.75) 12%, rgba(255, 255, 255, 0) 33%);
    content: "";
    inset: 0;
    position: absolute;
}

.rtts-home-actions {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 1.4rem 1.55rem;
    position: relative;
    z-index: 2;
}

.rtts-home-action {
    align-items: center;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid #d7e4f7;
    border-radius: 10px;
    box-shadow: 0 16px 34px rgba(27, 92, 184, 0.09);
    display: grid;
    gap: 0.9rem;
    grid-template-columns: 3.4rem 1fr;
    min-height: 112px;
    padding: 1rem 1.15rem;
}

.rtts-home-action i {
    border-radius: 14px;
    font-size: 1.5rem;
    height: 3.4rem;
    width: 3.4rem;
}

@media (max-width: 900px) {
    .rtts-home-shell {
        min-height: auto;
    }

    .rtts-home-hero {
        min-height: 500px;
    }

    .rtts-home-copy {
        padding: 2rem 1.25rem 0;
        width: min(62%, 440px);
    }

    .rtts-home-visual {
        left: 26%;
    }

    .rtts-home-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .rtts-home-hero {
        min-height: auto;
        padding-bottom: 1rem;
    }

    .rtts-home-copy {
        width: 100%;
    }

    .rtts-home-visual {
        display: none;
    }

    .rtts-home-actions {
        grid-template-columns: 1fr;
    }
}

.app-command,
.app-command-secondary {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-weight: 800;
    gap: 0.5rem;
    justify-content: center;
    min-height: 2.55rem;
    white-space: nowrap;
}

.app-command {
    background: #155f95;
    border-color: #155f95;
    color: #fff;
}

.app-command:hover,
.app-command:focus {
    background: #0f4d7d;
    border-color: #0f4d7d;
    color: #fff;
}

.app-command-secondary {
    background: #fff;
    border-color: #9bb6cf;
    color: #155f95;
}

.public-value-section,
.app-page,
.auth-required-page {
    margin: 0 auto;
    max-width: 1180px;
}

.permission-state-page {
    align-items: center;
    background: linear-gradient(135deg, #eef7ff 0%, #ffffff 52%, #f5fbff 100%);
    display: flex;
    min-height: 100vh;
    padding: 2rem;
}

.permission-state-card {
    background: #fff;
    border: 1px solid #cfe0f2;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(21, 95, 149, 0.12);
    margin: 0 auto;
    max-width: 520px;
    padding: 2rem;
    text-align: center;
}

.permission-state-icon {
    align-items: center;
    background: #e5f1ff;
    border: 1px solid #b9d7f0;
    border-radius: 8px;
    color: #155f95;
    display: inline-flex;
    height: 3rem;
    justify-content: center;
    margin-bottom: 1rem;
    width: 3rem;
}

.permission-state-card h1 {
    color: #102c49;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 0.5rem;
}

.permission-state-card p {
    color: #52657d;
    margin: 0 0 1.25rem;
}

.public-value-section {
    padding: 1.5rem 0 2rem;
}

.section-heading {
    margin-bottom: 1rem;
}

.section-heading h2,
.page-header h1,
.panel-heading h2 {
    color: #102c49;
    letter-spacing: 0;
    margin: 0;
}

.section-heading h2 {
    font-size: 1.8rem;
    font-weight: 850;
}

.value-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.value-card,
.metric-card,
.panel-card,
.quick-action {
    background: #fff;
    border: 1px solid #dce6f0;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 31, 61, 0.06);
}

.value-card {
    padding: 1.25rem;
}

.value-card i {
    color: #0e7c61;
    font-size: 1.4rem;
}

.value-card h3 {
    color: #102c49;
    font-size: 1.05rem;
    font-weight: 850;
    margin: 0.8rem 0 0.45rem;
}

.value-card p,
.page-header p,
.quick-action p,
.activity-row p {
    color: #52657d;
    line-height: 1.5;
    margin: 0;
}

.app-page {
    display: grid;
    gap: 1.25rem;
}

.page-header {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 850;
}

.page-header p {
    margin-top: 0.35rem;
}

.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
    align-items: center;
    display: flex;
    gap: 1rem;
    min-height: 116px;
    padding: 1rem;
}

.metric-card p {
    color: #52657d;
    font-size: 0.84rem;
    font-weight: 800;
    margin: 0 0 0.15rem;
}

.metric-card strong {
    color: #102c49;
    display: block;
    font-size: 1.75rem;
    line-height: 1.1;
}

.metric-card span:last-child {
    color: #60758e;
    display: block;
    font-size: 0.84rem;
    margin-top: 0.2rem;
}

.metric-icon,
.activity-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.7rem;
    justify-content: center;
    width: 2.7rem;
}

.tone-blue {
    background: #e5f1ff;
    color: #115ba4;
}

.tone-green {
    background: #e7f6ed;
    color: #176b34;
}

.tone-indigo {
    background: #e9edff;
    color: #3046b6;
}

.tone-gold {
    background: #fff4d2;
    color: #8a5a00;
}

.tone-red {
    background: #fde8e8;
    color: #a82020;
}

.dashboard-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
}

.dashboard-role-page {
    display: grid;
    gap: 1rem;
}

.dashboard-page-heading {
    display: grid;
    gap: 0.25rem;
}

.dashboard-page-heading h1 {
    color: #102c49;
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1.15;
    margin: 0;
}

.dashboard-page-heading p {
    color: #52657d;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.35;
    margin: 0;
}

.dashboard-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-metric-card {
    min-height: 5.8rem;
}

.dashboard-metric-card strong {
    font-size: 1.8rem;
}

.dashboard-metric-card p {
    margin-bottom: 0.25rem;
}

.dashboard-main-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.85fr);
}

.dashboard-admin-grid {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
}

.dashboard-admin-grid .dashboard-chart-panel,
.dashboard-admin-grid .dashboard-queue-panel {
    min-width: 0;
}

.dashboard-admin-grid .dashboard-chart-panel,
.dashboard-admin-grid .dashboard-queue-panel {
    min-height: 30rem;
}

.dashboard-admin-grid .dashboard-chart-panel,
.dashboard-admin-grid .dashboard-queue-panel {
    align-content: start;
    grid-template-rows: minmax(3.35rem, auto) minmax(0, 1fr);
}

.dashboard-admin-grid .compact-panel-heading,
.dashboard-admin-grid .dashboard-queue-heading {
    align-items: flex-start;
    min-height: 3.35rem;
}

.dashboard-admin-grid .compact-panel-heading {
    margin-bottom: 0;
}

.dashboard-admin-grid .dashboard-queue-heading .compact-panel-icon {
    margin-top: 0.08rem;
}

.contractor-dashboard-grid {
    align-items: stretch;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
}

.dashboard-loading-panel {
    align-items: center;
    display: flex;
    min-height: 8rem;
}

.dashboard-chart-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 30rem;
}

.compact-panel-heading {
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.compact-panel-heading h2,
.dashboard-queue-heading h2,
.dashboard-donut-panel h2 {
    color: #102c49;
    font-size: 1rem;
    font-weight: 900;
    margin: 0;
}

.dashboard-panel-subtitle,
.dashboard-contract-year {
    color: #52657d;
    font-size: 0.82rem;
    font-weight: 750;
}

.dashboard-contract-year {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
    white-space: nowrap;
}

.dashboard-bar-chart {
    align-items: stretch;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 251, 255, 0.36)),
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent calc((100% / var(--dashboard-grid-steps, 5)) - 1px),
            rgba(16, 44, 73, 0.09) calc(100% / var(--dashboard-grid-steps, 5))
        );
    border-radius: 8px;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    height: 100%;
    min-height: 0;
    padding: 1rem 0.65rem 0 2.25rem;
    position: relative;
}

.dashboard-bar-group {
    align-items: center;
    display: grid;
    gap: 0.4rem;
    grid-template-rows: auto minmax(13rem, 1fr) auto;
    min-width: 0;
}

.dashboard-bar-value {
    color: #52657d;
    font-size: 0.74rem;
    font-weight: 750;
    text-align: center;
}

.dashboard-bar-track {
    align-items: end;
    border-bottom: 1px solid #cddbea;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.dashboard-bar {
    background: linear-gradient(180deg, rgba(120, 164, 255, 0.38) 0%, rgba(52, 118, 235, 0.28) 100%);
    border: 1px solid rgba(82, 132, 255, 0.6);
    border-radius: 5px 5px 0 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 8px 18px rgba(31, 110, 184, 0.11);
    display: block;
    min-height: 0.35rem;
    width: clamp(1.1rem, 45%, 2.1rem);
}

.dashboard-admin-grid .dashboard-bar-group,
.contractor-dashboard-grid .dashboard-bar-group {
    grid-template-rows: minmax(0, 1fr) auto;
}

.dashboard-admin-grid .dashboard-bar-value,
.contractor-dashboard-grid .dashboard-bar-value {
    display: none;
}

.dashboard-bar-label {
    color: #52657d;
    font-size: 0.72rem;
    font-weight: 750;
    text-align: center;
    white-space: nowrap;
}

.dashboard-bar-month-hours {
    display: none;
}

.dashboard-admin-grid .dashboard-bar-chart {
    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent calc((100% / var(--dashboard-grid-steps, 5)) - 1px),
            rgba(82, 101, 125, 0.16) calc((100% / var(--dashboard-grid-steps, 5)) - 1px),
            rgba(82, 101, 125, 0.16) calc(100% / var(--dashboard-grid-steps, 5))
        );
    gap: 0.72rem;
    padding: 1.5rem 0.7rem 0 2.25rem;
}

.dashboard-admin-grid .dashboard-bar-group {
    --month-bar: #2f66d8;
    --month-bar-dark: #2049a9;
    gap: 0.32rem;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-1 {
    --month-bar: #45a6e9;
    --month-bar-dark: #2d83c5;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-2 {
    --month-bar: #3aa5a8;
    --month-bar-dark: #267f82;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-3 {
    --month-bar: #4b9c2c;
    --month-bar-dark: #36751f;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-4 {
    --month-bar: #f2bd27;
    --month-bar-dark: #c89112;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-5 {
    --month-bar: #ef951c;
    --month-bar-dark: #c46d12;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-6 {
    --month-bar: #db4039;
    --month-bar-dark: #aa2f2b;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-7 {
    --month-bar: #7350ac;
    --month-bar-dark: #533784;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-8 {
    --month-bar: #1f56a8;
    --month-bar-dark: #153d7b;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-9 {
    --month-bar: #d95097;
    --month-bar-dark: #a93470;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-10 {
    --month-bar: #48aaa8;
    --month-bar-dark: #2e7f7e;
}

.dashboard-admin-grid .dashboard-bar-group.month-color-11 {
    --month-bar: #78818c;
    --month-bar-dark: #545d68;
}

.dashboard-admin-grid .dashboard-bar {
    background: linear-gradient(180deg, var(--month-bar), var(--month-bar-dark));
    border-color: color-mix(in srgb, var(--month-bar-dark) 78%, #ffffff 22%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 8px 18px color-mix(in srgb, var(--month-bar) 20%, transparent);
    width: clamp(1.45rem, 58%, 2.45rem);
}

.dashboard-admin-grid .dashboard-bar-group.is-empty .dashboard-bar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), color-mix(in srgb, var(--month-bar) 22%, transparent));
    border-color: color-mix(in srgb, var(--month-bar) 64%, #ffffff 36%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 8px 18px rgba(65, 111, 204, 0.08);
}

.supervisor-dashboard-grid .dashboard-bar-chart {
    gap: 0.94rem;
    padding-right: 1.1rem;
    padding-top: 1.65rem;
}

.supervisor-dashboard-grid .dashboard-bar-track {
    padding-right: 0;
    overflow: visible;
}

.supervisor-dashboard-grid .dashboard-bar {
    background: var(--month-bar);
    border-color: var(--month-bar-dark);
    border-radius: 0;
    box-shadow: none;
    width: clamp(1.45rem, 58%, 2.45rem);
}

.supervisor-dashboard-grid .dashboard-bar::before,
.supervisor-dashboard-grid .dashboard-bar::after {
    content: none;
    display: none;
}

.supervisor-dashboard-grid .dashboard-bar-group.is-empty .dashboard-bar {
    background: color-mix(in srgb, var(--month-bar) 16%, #ffffff 84%);
    border-color: color-mix(in srgb, var(--month-bar) 64%, #ffffff 36%);
    box-shadow: none;
}

.dashboard-side-stack {
    display: grid;
    gap: 1rem;
    grid-template-rows: minmax(0, 1fr) minmax(0, 3fr);
    min-height: 30rem;
}

.contractor-dashboard-grid .dashboard-chart-panel {
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
}

.contractor-dashboard-grid .dashboard-bar-chart,
.consultant-hours-chart {
    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent calc((100% / var(--dashboard-grid-steps, 5)) - 1px),
            rgba(82, 101, 125, 0.18) calc((100% / var(--dashboard-grid-steps, 5)) - 1px),
            rgba(82, 101, 125, 0.18) calc(100% / var(--dashboard-grid-steps, 5))
        );
    gap: 0.65rem;
    height: 100%;
    min-height: 19rem;
    padding: 1.45rem 0.55rem 0 2.25rem;
}

.contractor-dashboard-grid .dashboard-bar-group,
.consultant-hours-chart .dashboard-bar-group {
    gap: 0.28rem;
    grid-template-rows: minmax(0, 1fr) auto 2.2rem;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-0,
.consultant-hours-chart .dashboard-bar-group.month-color-0 {
    --month-bar: #2f66d8;
    --month-bar-dark: #2049a9;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-1,
.consultant-hours-chart .dashboard-bar-group.month-color-1 {
    --month-bar: #45a6e9;
    --month-bar-dark: #2d83c5;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-2,
.consultant-hours-chart .dashboard-bar-group.month-color-2 {
    --month-bar: #3aa5a8;
    --month-bar-dark: #267f82;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-3,
.consultant-hours-chart .dashboard-bar-group.month-color-3 {
    --month-bar: #4b9c2c;
    --month-bar-dark: #36751f;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-4,
.consultant-hours-chart .dashboard-bar-group.month-color-4 {
    --month-bar: #f2bd27;
    --month-bar-dark: #c89112;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-5,
.consultant-hours-chart .dashboard-bar-group.month-color-5 {
    --month-bar: #ef951c;
    --month-bar-dark: #c46d12;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-6,
.consultant-hours-chart .dashboard-bar-group.month-color-6 {
    --month-bar: #db4039;
    --month-bar-dark: #aa2f2b;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-7,
.consultant-hours-chart .dashboard-bar-group.month-color-7 {
    --month-bar: #7350ac;
    --month-bar-dark: #533784;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-8,
.consultant-hours-chart .dashboard-bar-group.month-color-8 {
    --month-bar: #1f56a8;
    --month-bar-dark: #153d7b;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-9,
.consultant-hours-chart .dashboard-bar-group.month-color-9 {
    --month-bar: #d95097;
    --month-bar-dark: #a93470;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-10,
.consultant-hours-chart .dashboard-bar-group.month-color-10 {
    --month-bar: #48aaa8;
    --month-bar-dark: #2e7f7e;
}

.contractor-dashboard-grid .dashboard-bar-group.month-color-11,
.consultant-hours-chart .dashboard-bar-group.month-color-11 {
    --month-bar: #78818c;
    --month-bar-dark: #545d68;
}

.contractor-dashboard-grid .dashboard-bar-track,
.consultant-hours-chart .dashboard-bar-track {
    border-bottom-color: #c8d4e2;
    order: 1;
}

.contractor-dashboard-grid .dashboard-bar-label,
.consultant-hours-chart .dashboard-bar-label {
    order: 2;
}

.contractor-dashboard-grid .dashboard-bar,
.consultant-hours-chart .dashboard-bar {
    background: linear-gradient(180deg, var(--month-bar), var(--month-bar-dark));
    border-color: color-mix(in srgb, var(--month-bar-dark) 78%, #ffffff 22%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 8px 18px color-mix(in srgb, var(--month-bar) 24%, transparent);
    width: clamp(2rem, 78%, 3.6rem);
}

.contractor-dashboard-grid .dashboard-bar-group.is-empty .dashboard-bar,
.consultant-hours-chart .dashboard-bar-group.is-empty .dashboard-bar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(96, 141, 255, 0.18));
    border-color: color-mix(in srgb, var(--month-bar) 70%, #ffffff 30%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 7px 16px rgba(67, 101, 164, 0.08);
}

.contractor-dashboard-grid .dashboard-bar-group.has-hours .dashboard-bar,
.consultant-hours-chart .dashboard-bar-group.has-hours .dashboard-bar {
    background: linear-gradient(180deg, var(--month-bar), var(--month-bar-dark));
}

.contractor-dashboard-grid .dashboard-bar-value,
.consultant-hours-chart .dashboard-bar-value {
    align-items: center;
    background: transparent;
    border: 0;
    color: #102c49;
    display: none;
    font-size: 0.78rem;
    font-weight: 850;
    justify-content: center;
    min-height: 1rem;
    text-align: center;
    width: 100%;
}

.contractor-dashboard-grid .dashboard-bar-month-hours,
.consultant-hours-chart .dashboard-bar-month-hours {
    align-items: center;
    background: linear-gradient(180deg, var(--month-bar), var(--month-bar-dark));
    border: 1px solid color-mix(in srgb, var(--month-bar-dark) 78%, #ffffff 22%);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 5px 12px color-mix(in srgb, var(--month-bar) 22%, transparent);
    color: #ffffff;
    display: flex;
    font-size: 0.9rem;
    font-weight: 900;
    justify-content: center;
    min-height: 2.2rem;
    order: 3;
    width: 100%;
}

.dashboard-chart-y-axis {
    bottom: 1.35rem;
    color: #314a65;
    display: grid;
    font-size: 0.72rem;
    font-weight: 800;
    grid-template-rows: repeat(var(--dashboard-y-axis-count, 6), minmax(0, 1fr));
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0.2rem;
    width: 1.7rem;
}

.contractor-dashboard-grid .dashboard-chart-y-axis,
.consultant-hours-chart .dashboard-chart-y-axis {
    bottom: 4.4rem;
}

.dashboard-chart-y-axis span {
    align-self: center;
}

.contractor-dashboard-grid .dashboard-side-stack {
    align-content: start;
    grid-template-rows: auto auto;
    min-height: 0;
}

.dashboard-side-stack .dashboard-donut-panel,
.dashboard-side-stack .dashboard-project-panel {
    min-height: 0;
}

.dashboard-queue-panel {
    display: grid;
    gap: 1rem;
}

.dashboard-queue-heading {
    align-items: center;
    display: flex;
    gap: 0.85rem;
}

.dashboard-queue-heading span:not(.metric-icon) {
    color: #52657d;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
}

.compact-panel-icon {
    height: 2.25rem;
    width: 2.25rem;
}

.dashboard-empty-message {
    align-items: center;
    background: #eef6ff;
    border: 1px solid #d8e9f9;
    border-radius: 8px;
    color: #52657d;
    display: flex;
    gap: 0.75rem;
    line-height: 1.35;
    padding: 1rem;
}

.dashboard-empty-message i {
    color: #2c78c2;
}

.dashboard-empty-state {
    align-items: center;
    color: #52657d;
    display: flex;
    font-weight: 750;
    justify-content: center;
    min-height: 8rem;
    text-align: center;
}

.dashboard-queue-table,
.dashboard-project-table {
    border: 1px solid #e0e9f2;
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-project-list {
    align-content: start;
    border: 1px solid #e0e9f2;
    border-radius: 8px;
    display: grid;
    grid-auto-rows: max-content;
    overflow: hidden;
}

.dashboard-project-list-item {
    align-items: center;
    border-bottom: 1px solid #e0e9f2;
    color: #102c49;
    display: flex;
    min-height: 2.65rem;
    padding: 0.62rem 0.8rem;
}

.dashboard-project-list-item:last-child {
    border-bottom: 0;
}

.dashboard-project-list-item i {
    align-items: center;
    background: #eaf2fb;
    border-radius: 7px;
    color: #155f95;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.95rem;
    justify-content: center;
    width: 1.95rem;
}

.dashboard-project-list-item strong {
    color: #102c49;
    font-weight: 900;
    min-width: 0;
}

.dashboard-queue-row,
.dashboard-project-row {
    align-items: center;
    border-bottom: 1px solid #e0e9f2;
    display: grid;
    gap: 0.75rem;
    padding: 0.72rem 0.8rem;
}

.dashboard-queue-row {
    grid-template-columns: minmax(0, 8.4rem) minmax(0, 1fr);
}

.dashboard-project-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr) minmax(6rem, 0.55fr);
}

.dashboard-queue-row:last-child,
.dashboard-project-row:last-child {
    border-bottom: 0;
}

.dashboard-queue-header,
.dashboard-project-header {
    background: #f3f7fb;
    color: #52657d;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-queue-row span:first-child,
.dashboard-project-row span:first-child {
    color: #102c49;
    font-weight: 800;
}

.dashboard-project-row span {
    min-width: 0;
}

.dashboard-panel-link {
    align-items: center;
    color: #155f95;
    display: inline-flex;
    font-weight: 850;
    gap: 0.45rem;
    text-decoration: none;
}

.dashboard-panel-link:hover,
.dashboard-panel-link:focus {
    color: #0f4d7d;
    text-decoration: underline;
}

.dashboard-donut-layout {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 1rem;
}

.dashboard-donut {
    align-items: center;
    background:
        radial-gradient(circle at center, #fff 0 56%, transparent 57%),
        conic-gradient(#16864b 0 calc(var(--hours-used-percent) * 1%), #e1e7ed 0 100%);
    border-radius: 50%;
    display: inline-flex;
    height: 7.25rem;
    justify-content: center;
    width: 7.25rem;
}

.dashboard-donut strong {
    color: #102c49;
    font-size: 1.35rem;
    font-weight: 900;
}

.dashboard-donut-summary {
    color: #52657d;
    display: grid;
    gap: 0.15rem;
    font-weight: 750;
}

.dashboard-donut-summary strong {
    color: #155f95;
    font-size: 1rem;
}

.dashboard-project-panel {
    align-content: start;
    display: grid;
    gap: 0.85rem;
    grid-template-rows: auto auto;
}

.panel-card {
    padding: 1rem;
}

.panel-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-heading h2 {
    font-size: 1.25rem;
    font-weight: 850;
}

.activity-list {
    display: grid;
    gap: 0.8rem;
}

.activity-row {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #e1ebf4;
    border-radius: 8px;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.85rem;
}

.activity-row strong,
.quick-action strong,
.entity-cell strong {
    color: #102c49;
}

.activity-row > span:last-child {
    color: #155f95;
    font-size: 1.3rem;
    font-weight: 850;
}

.snapshot-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.snapshot-list div {
    align-items: center;
    border-bottom: 1px solid #e4ecf4;
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.7rem;
}

.snapshot-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.snapshot-list dt {
    color: #52657d;
    font-weight: 750;
}

.snapshot-list dd {
    color: #102c49;
    font-size: 1.2rem;
    font-weight: 850;
    margin: 0;
}

.quick-action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-action {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 1rem;
}

.quick-action i {
    color: #0e7c61;
    font-size: 1.2rem;
    margin-top: 0.15rem;
}

.auth-required-page {
    background: #fff;
    border: 1px solid #dce6f0;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 31, 61, 0.06);
    padding: 2rem;
}

.auth-required-page h1 {
    color: #102c49;
    font-size: 1.8rem;
    font-weight: 850;
}

.auth-required-page p {
    color: #52657d;
}

.vendor-directory,
.project-directory {
    overflow: hidden;
    padding: 0;
}

.directory-heading {
    border-bottom: 1px solid #e1ebf4;
    margin: 0;
    padding: 1rem;
}

.inline-notice {
    background: #eef6e9;
    border: 1px solid #cfe2d2;
    border-radius: 999px;
    color: #176b34;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.35rem 0.7rem;
}

.inline-alert {
    background: #fff4d2;
    border: 1px solid #e8c35a;
    border-radius: 6px;
    color: #6f4d00;
    font-weight: 800;
    padding: 0.75rem 1rem;
}

.panel-note {
    color: #52657d;
    line-height: 1.55;
    margin: 0;
}

.table-toolbar {
    align-items: end;
    border-bottom: 1px solid #e1ebf4;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
    padding: 1rem;
}

.search-control,
.select-control {
    display: grid;
    gap: 0.3rem;
}

.search-control {
    position: relative;
}

.search-control i {
    color: #6a7d91;
    left: 0.85rem;
    position: absolute;
    top: 0.85rem;
}

.search-control input {
    padding-left: 2.45rem;
}

.search-control input,
.select-control select,
.table-footer select {
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 6px;
    color: #102c49;
    min-height: 2.55rem;
    padding: 0.45rem 0.7rem;
}

.select-control span,
.table-footer label {
    color: #52657d;
    font-size: 0.78rem;
    font-weight: 800;
}

.export-control {
    align-items: end;
    display: flex;
    gap: 0.5rem;
}

.view-toggle {
    align-items: center;
    background: #eef5fb;
    border: 1px solid #b9c8d8;
    border-radius: 6px;
    display: inline-flex;
    gap: 0.2rem;
    min-height: 2.55rem;
    padding: 0.2rem;
}

.view-mode-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #52657d;
    display: inline-flex;
    height: 2.05rem;
    justify-content: center;
    width: 2.15rem;
}

.view-mode-button:hover,
.view-mode-button:focus,
.view-mode-button.selected {
    background: #155f95;
    color: #fff;
    outline: none;
}

.filter-panel {
    align-items: end;
    border-bottom: 1px solid #e1ebf4;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
    padding: 1rem;
}

.project-filter-panel {
    grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
}

.loading-state,
.empty-data-state {
    align-items: center;
    color: #52657d;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.loading-state {
    font-weight: 800;
}

.empty-data-state h3 {
    color: #102c49;
    font-size: 1.2rem;
    font-weight: 850;
    margin: 0;
}

.empty-data-state p {
    margin: 0;
    max-width: 640px;
}

.project-card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem;
}

.project-card {
    background: #f8fbff;
    border: 1px solid #e1ebf4;
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.project-card-header {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.project-card-header div {
    display: grid;
    gap: 0.15rem;
}

.project-card-header strong {
    color: #102c49;
    font-size: 1rem;
}

.project-card-header span:not(.status-pill) {
    color: #60758e;
    font-size: 0.82rem;
}

.project-card-meta {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.project-card-description {
    color: #52657d;
    line-height: 1.45;
    margin: 0;
}

.project-card-meta div {
    border-top: 1px solid #dce6f0;
    padding-top: 0.55rem;
}

.project-card-meta dt {
    color: #52657d;
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.project-card-meta dd {
    color: #102c49;
    font-weight: 800;
    margin: 0.15rem 0 0;
}

.project-card-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.project-card-grid .empty-table-message {
    grid-column: 1 / -1;
    margin: 0;
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    border-collapse: collapse;
    min-width: 980px;
    width: 100%;
}

.data-table th {
    background: #f3f7fb;
    color: #31455f;
    font-size: 0.76rem;
    font-weight: 850;
    padding: 0.75rem;
    text-align: left;
    text-transform: uppercase;
}

.data-table td {
    border-top: 1px solid #e1ebf4;
    color: #31455f;
    padding: 0.8rem 0.75rem;
    vertical-align: middle;
}

.entity-cell {
    display: grid;
    gap: 0.15rem;
}

.entity-cell span {
    color: #60758e;
    font-size: 0.82rem;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 850;
    padding: 0.3rem 0.6rem;
}

.status-pill.success {
    background: #e7f6ed;
    color: #176b34;
}

.status-pill.warning {
    background: #fff4d2;
    color: #8a5a00;
}

.status-pill.danger {
    background: #fde8e8;
    color: #a82020;
}

.status-pill.info {
    background: #e9f4ff;
    color: #155f95;
}

.status-pill.neutral {
    background: #edf1f6;
    color: #40536b;
}

.status-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 999px;
    color: #31455f;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 850;
    gap: 0.45rem;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
}

.status-toggle span {
    border-radius: 50%;
    height: 0.65rem;
    width: 0.65rem;
}

.status-toggle.is-active span {
    background: #176b34;
}

.status-toggle.is-inactive span {
    background: #a82020;
}

.row-actions {
    display: flex;
    gap: 0.35rem;
}

.actions-column {
    width: 128px;
}

.icon-button {
    align-items: center;
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 50%;
    color: #155f95;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.2rem;
    justify-content: center;
    width: 2.2rem;
}

.icon-button:hover,
.icon-button:focus {
    background: #e5f1ff;
    border-color: #155f95;
    outline: none;
}

.icon-button:disabled {
    color: #8797a8;
    cursor: not-allowed;
    opacity: 0.65;
}

.icon-button.danger-action {
    border-color: #efb5b5;
    color: #a82020;
}

.icon-button.danger-action:hover,
.icon-button.danger-action:focus {
    background: #fde8e8;
    border-color: #a82020;
}

.icon-button.success-action {
    border-color: #a9d8ba;
    color: #176b34;
}

.icon-button.success-action:hover,
.icon-button.success-action:focus {
    background: #e7f6ed;
    border-color: #176b34;
}

.entity-modal-backdrop {
    align-items: flex-start;
    background: rgba(9, 30, 55, 0.48);
    display: flex;
    inset: 0;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem 1rem;
    position: fixed;
    z-index: 1000;
}

.entity-modal {
    background: #fff;
    border: 1px solid #d4e0ec;
    border-radius: 8px;
    box-shadow: 0 22px 48px rgba(15, 31, 61, 0.24);
    display: grid;
    gap: 1rem;
    max-width: 920px;
    padding: 1.25rem;
    width: min(920px, 100%);
}

.entity-modal-header,
.entity-modal-actions {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.entity-modal-header h2 {
    color: #102c49;
    font-size: 1.45rem;
    font-weight: 850;
    margin: 0;
}

.entity-detail-grid,
.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entity-detail-grid {
    margin: 0;
}

.entity-detail-grid div,
.form-field,
.check-control {
    background: #f8fbff;
    border: 1px solid #e1ebf4;
    border-radius: 8px;
    padding: 0.8rem;
}

.entity-detail-grid dt,
.form-field span,
.check-control span {
    color: #52657d;
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.entity-detail-grid dd {
    color: #102c49;
    font-weight: 800;
    margin: 0.25rem 0 0;
    overflow-wrap: anywhere;
}

.entity-form {
    display: grid;
    gap: 1rem;
}

.form-field {
    display: grid;
    gap: 0.45rem;
}

.wide-field {
    grid-column: 1 / -1;
}

.form-input {
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 6px;
    color: #102c49;
    min-height: 2.45rem;
    padding: 0.55rem 0.65rem;
    width: 100%;
}

textarea.form-input {
    min-height: 6rem;
    resize: vertical;
}

.form-input:focus {
    border-color: #155f95;
    box-shadow: 0 0 0 0.2rem rgba(21, 95, 149, 0.15);
    outline: none;
}

.check-control {
    align-items: center;
    display: flex;
    gap: 0.65rem;
}

.check-control input {
    height: 1.1rem;
    width: 1.1rem;
}

.validation-summary {
    background: #fff4d2;
    border: 1px solid #f3c65d;
    border-radius: 8px;
    color: #6f4800;
    font-weight: 800;
    margin: 0;
    padding: 0.85rem 1rem;
}

.rtts-modal-backdrop {
    background: rgba(4, 19, 36, 0.68);
    opacity: 1;
    z-index: 1050;
}

@supports (backdrop-filter: blur(6px)) {
    .rtts-modal-backdrop {
        backdrop-filter: blur(6px);
    }
}

.rtts-modal-layer {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.5rem;
    z-index: 1060;
}

.modal-dialog.rtts-modal-dialog {
    max-width: min(900px, calc(100vw - 2rem));
}

.modal-xl.rtts-modal-dialog {
    max-width: min(1080px, calc(100vw - 2rem));
}

.modal-dialog-scrollable .rtts-modal-card {
    max-height: calc(100vh - 3rem);
}

.modal-dialog-scrollable .rtts-modal-body {
    overflow-y: auto;
}

.rtts-modal-card {
    background:
        linear-gradient(180deg, rgba(247, 251, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 48%, rgba(246, 251, 250, 0.98) 100%);
    border: 1px solid rgba(122, 166, 205, 0.55);
    border-radius: 16px;
    box-shadow:
        0 26px 70px rgba(9, 30, 55, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.72) inset;
    overflow: hidden;
    position: relative;
}

.rtts-modal-card::before {
    background: linear-gradient(90deg, #155f95 0%, #13a386 52%, #7eb8ff 100%);
    content: "";
    height: 4px;
    inset: 0 0 auto;
    position: absolute;
}

.rtts-modal-header {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(234, 245, 255, 0.9), rgba(244, 252, 249, 0.92));
    border-bottom: 1px solid rgba(202, 219, 235, 0.85);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.25rem 1.35rem 1.1rem;
}

.rtts-modal-title-row {
    align-items: center;
    display: flex;
    gap: 0.9rem;
    min-width: 0;
}

.rtts-modal-icon {
    align-items: center;
    background: #155f95;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(21, 95, 149, 0.24);
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.rtts-modal-header .eyebrow {
    color: #0f6f8f;
    margin-bottom: 0.25rem;
}

.rtts-modal-header h2 {
    color: #0b2744;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0;
}

.rtts-close-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(143, 169, 195, 0.8);
    border-radius: 50%;
    color: #31455f;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.45rem;
    justify-content: center;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    width: 2.45rem;
}

.rtts-close-button:hover,
.rtts-close-button:focus {
    background: #e5f1ff;
    border-color: #155f95;
    color: #155f95;
    outline: none;
}

.rtts-modal-body {
    display: grid;
    gap: 1rem;
    padding: 1.15rem 1.35rem 1.25rem;
}

.rtts-modal-card .entity-form {
    gap: 1rem;
}

.rtts-modal-card .form-grid,
.rtts-modal-card .entity-detail-grid {
    gap: 0.85rem;
}

.rtts-modal-card .form-field,
.rtts-modal-card .check-control,
.rtts-modal-card .entity-detail-grid div {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(196, 214, 231, 0.92);
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    padding: 0.72rem 0.78rem;
}

.rtts-modal-card .form-field:focus-within {
    border-color: #28a6c8;
    box-shadow:
        0 0 0 0.18rem rgba(40, 166, 200, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.rtts-modal-card .form-field span,
.rtts-modal-card .check-control span,
.rtts-modal-card .entity-detail-grid dt {
    color: #465b74;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.rtts-modal-card .form-field > .required-label::after {
    color: #d21f3c;
    content: " *";
    font-weight: 950;
}

.required-header::after {
    color: #d21f3c;
    content: " *";
    font-weight: 950;
}

.rtts-modal-card .form-input {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #0b2744;
    font-size: 0.98rem;
    font-weight: 750;
    min-height: 1.95rem;
    padding: 0;
}

.rtts-modal-card .form-field input:not([type="checkbox"]),
.rtts-modal-card .form-field select,
.rtts-modal-card .form-field textarea {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #0b2744;
    font-size: 0.98rem;
    font-weight: 750;
    min-height: 1.95rem;
    padding: 0;
    width: 100%;
}

.rtts-modal-card .form-input:focus {
    border: 0;
    box-shadow: none;
}

.rtts-modal-card .form-field input:not([type="checkbox"]):focus,
.rtts-modal-card .form-field select:focus,
.rtts-modal-card .form-field textarea:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}

.rtts-modal-card textarea.form-input {
    min-height: 5.5rem;
}

.rtts-modal-card .form-field textarea {
    min-height: 5.5rem;
}

.rtts-modal-card .entity-detail-grid dd {
    color: #0b2744;
    font-weight: 800;
    margin-top: 0.3rem;
}

.rtts-modal-card .check-control {
    min-height: 4.4rem;
}

.rtts-modal-card .check-control input {
    accent-color: #0e7c61;
}

.contractor-modal-card .rtts-modal-body {
    gap: 0.7rem;
    padding: 0.85rem 1rem 1rem;
}

.contractor-modal-card .form-grid,
.contractor-modal-card .entity-detail-grid {
    gap: 0.55rem;
}

.contractor-modal-card .form-field,
.contractor-modal-card .check-control,
.contractor-modal-card .entity-detail-grid div {
    border-radius: 8px;
    padding: 0.48rem 0.62rem;
}

.contractor-modal-card .form-field {
    gap: 0.2rem;
}

.contractor-modal-card .form-field input:not([type="checkbox"]),
.contractor-modal-card .form-field select,
.contractor-modal-card .form-field textarea {
    font-size: 0.92rem;
    min-height: 1.55rem;
}

.contractor-modal-card .check-control {
    min-height: 2.6rem;
}

.contractor-form-layout {
    display: grid;
    gap: 0.75rem;
}

.contractor-form-section {
    background: rgba(247, 251, 255, 0.74);
    border: 1px solid rgba(184, 205, 226, 0.82);
    border-radius: 8px;
    display: grid;
    gap: 0.58rem;
    padding: 0.72rem;
}

.contractor-form-section h3 {
    color: #0b5f95;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
}

.contractor-modal-card .contractor-profile-grid {
    grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 1fr) minmax(8rem, 0.62fr);
}

.contractor-modal-card .contractor-contract-grid {
    grid-template-columns: repeat(3, minmax(10rem, 1fr));
}

.contractor-modal-card .contractor-active-field,
.contractor-modal-card .contract-active-field {
    align-self: stretch;
}

.contractor-form-layout.is-readonly .form-field,
.contractor-form-layout.is-readonly .check-control {
    background: rgba(255, 255, 255, 0.72);
}

.contractor-form-layout.is-readonly input,
.contractor-form-layout.is-readonly select {
    color: #0b2744;
    opacity: 1;
}

@media (max-width: 900px) {
    .contractors-directory .table-toolbar,
    .contractor-modal-card .contractor-profile-grid,
    .contractor-modal-card .contractor-contract-grid {
        grid-template-columns: 1fr;
    }
}

.rtts-modal-actions {
    align-items: center;
    border-top: 1px solid rgba(202, 219, 235, 0.85);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.15rem;
    padding-top: 1rem;
}

.rtts-modal-card > .rtts-modal-actions {
    margin: 0;
    padding: 1rem 1.35rem 1.25rem;
}

.rtts-modal-card .app-command {
    background: #155f95;
    border-color: #155f95;
    box-shadow: 0 14px 28px rgba(21, 95, 149, 0.22);
    min-width: 9rem;
}

.rtts-modal-card .app-command:hover,
.rtts-modal-card .app-command:focus {
    background: #0f4d7d;
    border-color: #0f4d7d;
    color: #fff;
}

.rtts-modal-card .app-command-secondary {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(142, 167, 193, 0.9);
    color: #31455f;
    min-width: 7rem;
}

.rtts-modal-card .validation-summary {
    background: #fff7dc;
    border-color: #f0ca69;
    color: #6f4800;
}

.empty-table-message {
    color: #52657d;
    font-weight: 800;
    padding: 2rem !important;
    text-align: center;
}

.table-footer {
    align-items: center;
    border-top: 1px solid #e1ebf4;
    color: #52657d;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.table-footer label,
.pager {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.pager span {
    color: #31455f;
    font-weight: 800;
}

@media (max-width: 767px) {
    .app-header {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .app-header-user {
        justify-content: center;
    }

    .app-shell.is-signed-in.nav-expanded,
    .app-shell.is-signed-in.nav-collapsed,
    .app-shell.is-public {
        grid-template-columns: 1fr;
    }

    .side-nav {
        min-height: auto;
    }

    .side-nav-list {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .app-shell.is-public .side-nav {
        min-height: auto;
    }
}

@media (max-width: 1100px) {
    .dashboard-layout,
    .dashboard-main-grid,
    .contractor-dashboard-grid,
    .metric-grid,
    .quick-action-grid,
    .value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-chart-panel {
        grid-column: 1 / -1;
    }

    .dashboard-admin-grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    }

    .dashboard-admin-grid .dashboard-chart-panel {
        grid-column: auto;
    }

    .table-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .export-control {
        align-items: stretch;
    }
}

@media (max-width: 760px) {
    .dashboard-layout,
    .dashboard-main-grid,
    .dashboard-admin-grid,
    .contractor-dashboard-grid,
    .metric-grid,
    .quick-action-grid,
    .value-grid,
    .table-toolbar,
    .filter-panel,
    .project-card-grid,
    .project-card-meta,
    .entity-detail-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-header,
    .panel-heading,
    .directory-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-header .app-command,
    .landing-actions .app-command,
    .export-control,
    .export-control .app-command-secondary,
    .filter-panel .app-command-secondary,
    .view-toggle {
        width: 100%;
    }

    .view-mode-button {
        flex: 1;
        width: auto;
    }

    .dashboard-page-heading h1 {
        font-size: 1.45rem;
    }

    .dashboard-bar-chart {
        gap: 0.55rem;
        min-height: 18rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .dashboard-bar-group {
        min-width: 3.5rem;
    }

    .dashboard-donut-layout,
    .dashboard-project-row {
        grid-template-columns: 1fr;
    }

    .dashboard-contract-year {
        white-space: normal;
    }

    .project-card-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .entity-modal-backdrop,
    .rtts-modal-layer {
        padding: 1rem;
    }

    .entity-modal-header,
    .entity-modal-actions,
    .rtts-modal-header,
    .rtts-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .rtts-modal-title-row {
        align-items: flex-start;
    }

    .table-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Compact page title bars. */
.compact-page-header.page-title-bar {
    align-items: center;
    background: linear-gradient(90deg, #eef7ff 0%, #f8fbff 58%, #fff 100%);
    border: 1px solid #cfe0f2;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(21, 95, 149, 0.08);
    justify-content: space-between;
    min-height: auto;
    padding: 0.5rem 0.72rem;
}

.page-title-group {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    min-width: 0;
}

.page-title-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.page-title-icon i {
    font-size: 0.95rem;
}

.compact-page .compact-page-header.page-title-bar .page-title-group h1 {
    color: #102c49;
    font-size: 1.28rem;
    font-weight: 850;
    line-height: 1.05;
    margin: 0;
}

.page-header-command {
    background: #155f95;
    border-color: #155f95;
    box-shadow: 0 10px 20px rgba(21, 95, 149, 0.18);
    flex: 0 0 auto;
    min-height: 2.35rem;
    padding-inline: 0.95rem;
}

.page-header-command:hover,
.page-header-command:focus {
    background: #0f4d7d;
    border-color: #0f4d7d;
    color: #fff;
}

/* Compact project directory refinements. */
.projects-page.compact-page {
    gap: 0.75rem;
    max-width: 1260px;
}

.projects-page.compact-page .page-header {
    align-items: center;
}

.projects-page.compact-page .page-header h1 {
    font-size: 1.7rem;
}

.projects-page.compact-page .page-header p {
    margin-top: 0.2rem;
}

.projects-page.compact-page .metric-grid {
    gap: 0.65rem;
}

.projects-page.compact-page .metric-card {
    min-height: 88px;
    padding: 0.72rem 0.8rem;
}

.projects-page.compact-page .metric-icon {
    height: 2.25rem;
    width: 2.25rem;
}

.project-directory .directory-heading,
.projects-page.compact-page .directory-heading {
    padding: 0.72rem 0.85rem;
}

.compact-toolbar,
.project-directory .table-toolbar {
    align-items: center;
    gap: 0.5rem;
    grid-template-columns: minmax(22rem, 1.7fr) minmax(11rem, 0.55fr) minmax(17rem, 0.85fr);
    overflow-x: visible;
    padding: 0.5rem 0.75rem;
}

.compact-toolbar > *,
.project-directory .table-toolbar > * {
    min-width: 0;
}

.compact-toolbar .search-control,
.project-directory .table-toolbar .search-control {
    min-width: 18rem;
    width: 100%;
}

.compact-toolbar .search-control i,
.project-directory .table-toolbar .search-control i {
    left: 0.72rem;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
}

.compact-toolbar .search-control input,
.project-directory .table-toolbar .search-control input,
.project-directory .filter-panel select {
    min-height: 2.55rem;
}

.compact-toolbar .search-control input,
.project-directory .table-toolbar .search-control input {
    padding-left: 2.45rem;
}

.projects-page.compact-page .compact-toolbar .compact-filter,
.project-directory .table-toolbar .compact-filter {
    width: 100%;
}

.projects-page.compact-page .compact-toolbar .program-unit-filter,
.projects-page.compact-page .compact-toolbar .compact-filter:nth-of-type(3),
.project-directory .table-toolbar .program-unit-filter,
.project-directory .table-toolbar .compact-filter:nth-of-type(3) {
    width: 100%;
}

.projects-page.compact-page .compact-toolbar .compact-filter select,
.project-directory .table-toolbar .compact-filter select {
    width: 100%;
}

.compact-toolbar .app-command-secondary,
.compact-toolbar .view-toggle,
.project-directory .table-toolbar .app-command-secondary,
.project-directory .table-toolbar .view-toggle {
    flex: 0 0 auto;
    min-height: 2.18rem;
    width: auto;
}

.projects-page.compact-page .compact-toolbar .projects-toolbar-add,
.project-directory .table-toolbar .projects-toolbar-add {
    background: #155f95;
    border-color: #155f95;
    box-shadow: 0 10px 20px rgba(21, 95, 149, 0.18);
    justify-self: end;
    min-height: 2.55rem;
    width: auto;
}

.projects-page.compact-page .compact-toolbar .projects-toolbar-add:hover,
.projects-page.compact-page .compact-toolbar .projects-toolbar-add:focus,
.project-directory .table-toolbar .projects-toolbar-add:hover,
.project-directory .table-toolbar .projects-toolbar-add:focus {
    background: #0f4d7d;
    border-color: #0f4d7d;
    color: #fff;
}

.compact-toolbar .view-mode-button,
.project-directory .table-toolbar .view-mode-button {
    flex: 0 0 auto;
    height: 1.78rem;
    width: 1.95rem;
}

.project-directory .filter-panel,
.projects-page.compact-page .filter-panel {
    align-items: end;
    gap: 0.5rem;
    grid-template-columns: minmax(10rem, 0.75fr) minmax(14rem, 1fr) auto;
    overflow-x: auto;
    padding: 0.58rem 0.75rem;
}

.project-directory .filter-panel .select-control {
    min-width: 10rem;
}

.project-directory .filter-panel .app-command-secondary {
    min-height: 2.18rem;
    width: auto;
}

.project-directory .project-card-grid,
.projects-page.compact-page .project-card-grid {
    gap: 0.65rem;
    padding: 0.75rem;
}

.project-directory .project-card,
.projects-page.compact-page .project-card {
    gap: 0.65rem;
    padding: 0.75rem;
}

.project-directory .project-card-header {
    gap: 0.6rem;
}

.project-directory .project-card-meta {
    gap: 0.55rem;
}

.project-directory .project-card-meta div {
    padding-top: 0.42rem;
}

.project-directory .data-table th {
    padding: 0.55rem 0.65rem;
}

.project-directory .sort-header {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    font: inherit;
    font-weight: inherit;
    gap: 0.38rem;
    letter-spacing: inherit;
    padding: 0;
    text-align: left;
    text-transform: inherit;
}

.project-directory .sort-header:hover,
.project-directory .sort-header:focus {
    color: #155f95;
    outline: none;
}

.project-directory .sort-header:focus-visible {
    border-radius: 4px;
    box-shadow: 0 0 0 0.16rem rgba(21, 95, 149, 0.18);
}

.project-directory .sort-icon {
    color: #7d8ca0;
    font-size: 0.74rem;
}

.project-directory .sort-header.is-active .sort-icon {
    color: #155f95;
}

.project-directory .data-table td {
    padding: 0.52rem 0.65rem;
}

.project-directory .project-table tbody tr {
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.project-directory .project-table tbody tr:hover {
    background: #f8fbff;
}

.project-directory .project-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 #7eb8ff;
}

.project-directory .entity-cell {
    gap: 0.08rem;
}

.project-directory .project-table .entity-cell strong,
.project-directory .project-card-header strong,
.project-name-status {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.project-name-status {
    color: #111827;
    font-weight: 850;
}

.project-name-status i {
    align-items: center;
    border-radius: 0.45rem;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    height: 1.35rem;
    justify-content: center;
    width: 1.35rem;
}

.project-name-status.is-active,
.project-name-status.is-active strong {
    color: #111827;
}

.project-name-status.is-active i {
    background: #e7f6ed;
    box-shadow: inset 0 0 0 1px #a9d8ba;
    color: #176b34;
}

.project-name-status.is-inactive,
.project-name-status.is-inactive strong {
    color: #111827;
}

.project-name-status.is-inactive i {
    background: #fde8e8;
    box-shadow: inset 0 0 0 1px #efb5b5;
    color: #a82020;
}

.project-directory .status-pill {
    font-size: 0.74rem;
    padding: 0.22rem 0.5rem;
}

.project-directory .row-actions,
.projects-page.compact-page .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.28rem;
}

.project-directory .icon-button,
.projects-page.compact-page .icon-button {
    height: 2rem;
    width: 2rem;
}

.action-view,
.project-directory .icon-button[title="View project"] {
    color: #115ba4;
}

.icon-button.action-view,
.project-directory .icon-button[title="View project"] {
    background: #f7fbff;
    border-color: #9dccff;
}

.icon-button.action-view:hover,
.icon-button.action-view:focus,
.project-directory .icon-button[title="View project"]:hover,
.project-directory .icon-button[title="View project"]:focus {
    background: #e5f1ff;
    border-color: #115ba4;
    color: #06366d;
}

.action-edit,
.project-directory .icon-button[title="Edit project"] {
    color: #7a4f00;
}

.icon-button.action-edit,
.project-directory .icon-button[title="Edit project"] {
    background: #fffaf0;
    border-color: #e8c35a;
}

.icon-button.action-edit:hover,
.icon-button.action-edit:focus,
.project-directory .icon-button[title="Edit project"]:hover,
.project-directory .icon-button[title="Edit project"]:focus {
    background: #fff4d2;
    border-color: #9a6900;
    color: #5f3d00;
}

.action-status-active,
.project-directory .icon-button[title="Mark project active"] {
    color: #176b34;
}

.icon-button.action-status-active,
.project-directory .icon-button[title="Mark project active"] {
    background: #f4fbf6;
    border-color: #a9d8ba;
}

.icon-button.action-status-active:hover,
.icon-button.action-status-active:focus,
.project-directory .icon-button[title="Mark project active"]:hover,
.project-directory .icon-button[title="Mark project active"]:focus {
    background: #e7f6ed;
    border-color: #176b34;
    color: #0d5125;
}

.action-status-inactive,
.project-directory .icon-button[title="Mark project inactive"] {
    color: #a82020;
}

.icon-button.action-status-inactive,
.project-directory .icon-button[title="Mark project inactive"] {
    background: #fff7f7;
    border-color: #efb5b5;
}

.icon-button.action-status-inactive:hover,
.icon-button.action-status-inactive:focus,
.project-directory .icon-button[title="Mark project inactive"]:hover,
.project-directory .icon-button[title="Mark project inactive"]:focus {
    background: #fde8e8;
    border-color: #a82020;
    color: #7f1717;
}

.action-status-toggle.is-active {
    color: #176b34;
}

.icon-button.action-status-toggle.is-active {
    background: #f4fbf6;
    border-color: #a9d8ba;
}

.icon-button.action-status-toggle.is-active:hover,
.icon-button.action-status-toggle.is-active:focus {
    background: #e7f6ed;
    border-color: #176b34;
    color: #0d5125;
}

.action-status-toggle.is-inactive {
    color: #a82020;
}

.icon-button.action-status-toggle.is-inactive {
    background: #fff7f7;
    border-color: #efb5b5;
}

.icon-button.action-status-toggle.is-inactive:hover,
.icon-button.action-status-toggle.is-inactive:focus {
    background: #fde8e8;
    border-color: #a82020;
    color: #7f1717;
}

.project-directory .table-footer,
.projects-page.compact-page .table-footer {
    align-items: center;
    gap: 0.65rem;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
}

.project-directory .table-footer-controls,
.projects-page.compact-page .table-footer-controls {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.project-directory .rows-control,
.projects-page.compact-page .rows-control {
    align-items: center;
    color: #31455f;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 800;
    gap: 0.55rem;
}

.project-directory .rows-control select,
.projects-page.compact-page .rows-control select {
    min-height: 2.1rem;
    min-width: 4rem;
}

.project-directory .compact-pager,
.projects-page.compact-page .compact-pager {
    gap: 0.42rem;
}

.project-directory .compact-pager .pager-button,
.projects-page.compact-page .compact-pager .pager-button {
    background: transparent;
    border-color: transparent;
    color: #aab8ca;
    height: 2rem;
    width: 2rem;
}

.project-directory .compact-pager .pager-button:not(:disabled):hover,
.project-directory .compact-pager .pager-button:not(:disabled):focus,
.projects-page.compact-page .compact-pager .pager-button:not(:disabled):hover,
.projects-page.compact-page .compact-pager .pager-button:not(:disabled):focus {
    background: #eef5ff;
    border-color: #c8d9f3;
    color: #155f95;
}

.project-directory .pager-current,
.projects-page.compact-page .pager-current {
    align-items: center;
    background: linear-gradient(135deg, #2967ff 0%, #6d4cff 100%);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 850;
    height: 2.1rem;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0 0.7rem;
}

/* Compact vendor directory refinements. */
.vendors-page.compact-page {
    gap: 0.75rem;
    max-width: 1260px;
}

.vendors-page.compact-page .metric-grid {
    gap: 0.65rem;
}

.vendors-page.compact-page .metric-card {
    min-height: 88px;
    padding: 0.72rem 0.8rem;
}

.vendors-page.compact-page .metric-icon {
    height: 2.25rem;
    width: 2.25rem;
}

.two-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.positions-directory .table-toolbar {
    grid-template-columns: minmax(22rem, 1fr) minmax(11rem, 13rem);
}

.supervisors-directory .table-toolbar,
.contractors-directory .table-toolbar {
    grid-template-columns: minmax(22rem, 1.7fr) minmax(11rem, 0.55fr) minmax(16rem, 0.85fr);
}

.contractors-directory .table-toolbar {
    grid-template-columns: minmax(13rem, 0.72fr) minmax(18rem, 1.2fr) minmax(10rem, 0.5fr) minmax(15rem, 0.78fr);
}

.contractors-directory .contract-period-filter select {
    font-weight: 850;
}

.assignment-directory .table-toolbar {
    grid-template-columns:
        minmax(13rem, 0.8fr)
        minmax(9rem, 0.45fr)
        minmax(13rem, 0.75fr)
        minmax(17rem, 1.2fr);
}

@media (max-width: 62rem) {
    .assignment-directory .table-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 45rem) {
    .assignment-directory .table-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }
}

.assignment-table .date-cell {
    white-space: nowrap;
}

.entity-name-status {
    align-items: center;
    color: #111827;
    display: inline-flex;
    font-weight: 850;
    gap: 0.4rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.entity-name-status i {
    align-items: center;
    border-radius: 0.45rem;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    height: 1.35rem;
    justify-content: center;
    width: 1.35rem;
}

.entity-name-status.is-active i {
    background: #e7f6ed;
    box-shadow: inset 0 0 0 1px #a9d8ba;
    color: #176b34;
}

.entity-name-status.is-inactive i {
    background: #fde8e8;
    box-shadow: inset 0 0 0 1px #efb5b5;
    color: #a82020;
}

.assignment-tabs {
    align-items: center;
    border-bottom: 1px solid #e1ebf4;
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
}

.assignment-tab {
    background: #f4f7fb;
    border: 1px solid #e1ebf4;
    border-radius: 6px;
    color: #43536a;
    font-weight: 850;
    min-height: 2.15rem;
    padding: 0.35rem 0.85rem;
}

.assignment-tab.selected {
    background: #eef5ff;
    border-color: #9dccff;
    color: #155f95;
}

.assignment-summary-band {
    align-items: center;
    background: linear-gradient(90deg, #f2f7ff 0%, #fff 100%);
    border-bottom: 1px solid #e1ebf4;
    border-top: 1px solid #edf3fa;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.75rem 1rem;
}

.assignment-summary-band strong {
    color: #102c49;
    display: block;
    font-weight: 850;
}

.assignment-summary-band span {
    color: #52657d;
    font-weight: 750;
}

.assignment-summary-count {
    border-left: 1px solid #dce6f0;
    padding-left: 1.2rem;
}

.assignment-summary-count strong {
    font-size: 1.45rem;
    line-height: 1.1;
}

.vendor-directory .table-toolbar {
    align-items: center;
    gap: 0.5rem;
    grid-template-columns: minmax(22rem, 1fr) minmax(11rem, 13rem);
    overflow-x: visible;
    padding: 0.5rem 0.75rem;
}

.vendor-directory .table-toolbar > * {
    min-width: 0;
}

.vendor-directory .table-toolbar .search-control {
    min-width: 18rem;
    width: 100%;
}

.vendor-directory .table-toolbar .search-control i {
    left: 0.72rem;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
}

.vendor-directory .table-toolbar .search-control input {
    min-height: 2.55rem;
    padding-left: 2.45rem;
}

.vendor-directory .table-toolbar .compact-filter,
.vendor-directory .table-toolbar .county-filter {
    width: 100%;
}

.vendor-directory .table-toolbar .compact-filter select {
    min-height: 2.55rem;
    width: 100%;
}

.vendor-directory .table-toolbar .vendor-toolbar-add {
    background: #155f95;
    border-color: #155f95;
    box-shadow: 0 10px 20px rgba(21, 95, 149, 0.18);
    justify-self: end;
    min-height: 2.55rem;
    width: auto;
}

.vendor-directory .table-toolbar .vendor-toolbar-add:hover,
.vendor-directory .table-toolbar .vendor-toolbar-add:focus {
    background: #0f4d7d;
    border-color: #0f4d7d;
    color: #fff;
}

.vendor-directory .data-table th {
    padding: 0.55rem 0.65rem;
}

.vendor-directory .data-table td {
    padding: 0.52rem 0.65rem;
}

.vendor-directory .sort-header {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    font: inherit;
    font-weight: inherit;
    gap: 0.38rem;
    letter-spacing: inherit;
    padding: 0;
    text-align: left;
    text-transform: inherit;
}

.vendor-directory .sort-header:hover,
.vendor-directory .sort-header:focus {
    color: #155f95;
    outline: none;
}

.vendor-directory .sort-header:focus-visible {
    border-radius: 4px;
    box-shadow: 0 0 0 0.16rem rgba(21, 95, 149, 0.18);
}

.vendor-directory .sort-icon {
    color: #7d8ca0;
    font-size: 0.74rem;
}

.vendor-directory .sort-header.is-active .sort-icon {
    color: #155f95;
}

.vendor-directory .vendor-table tbody tr {
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.vendor-directory .vendor-table tbody tr:hover {
    background: #f8fbff;
}

.vendor-directory .vendor-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 #7eb8ff;
}

.vendor-name-status {
    align-items: center;
    color: #111827;
    display: inline-flex;
    font-weight: 850;
    gap: 0.4rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.vendor-name-status i {
    align-items: center;
    border-radius: 0.45rem;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    height: 1.35rem;
    justify-content: center;
    width: 1.35rem;
}

.vendor-name-status.is-active i {
    background: #e7f6ed;
    box-shadow: inset 0 0 0 1px #a9d8ba;
    color: #176b34;
}

.vendor-name-status.is-inactive i {
    background: #fde8e8;
    box-shadow: inset 0 0 0 1px #efb5b5;
    color: #a82020;
}

.vendor-directory .row-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.28rem;
}

.vendor-directory .icon-button {
    height: 2rem;
    width: 2rem;
}

.vendor-directory .table-footer {
    align-items: center;
    gap: 0.65rem;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
}

.vendor-directory .table-footer-controls {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.vendor-directory .rows-control {
    align-items: center;
    color: #31455f;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 800;
    gap: 0.55rem;
}

.vendor-directory .rows-control select {
    min-height: 2.1rem;
    min-width: 4rem;
}

.vendor-directory .compact-pager {
    gap: 0.42rem;
}

.vendor-directory .compact-pager .pager-button {
    background: transparent;
    border-color: transparent;
    color: #aab8ca;
    height: 2rem;
    width: 2rem;
}

.vendor-directory .compact-pager .pager-button:not(:disabled):hover,
.vendor-directory .compact-pager .pager-button:not(:disabled):focus {
    background: #eef5ff;
    border-color: #c8d9f3;
    color: #155f95;
}

.vendor-directory .pager-current {
    align-items: center;
    background: linear-gradient(135deg, #2967ff 0%, #6d4cff 100%);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 850;
    height: 2.1rem;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0 0.7rem;
}

@supports selector(:has(*)) {
    .app-page:has(.project-directory) {
        gap: 0.75rem;
        max-width: 1260px;
    }

    .app-page:has(.project-directory) > .page-header {
        align-items: center;
    }

    .app-page:has(.project-directory) > .page-header h1 {
        font-size: 1.7rem;
    }

    .app-page:has(.project-directory) > .metric-grid {
        gap: 0.65rem;
    }

    .app-page:has(.project-directory) > .metric-grid .metric-card {
        min-height: 88px;
        padding: 0.72rem 0.8rem;
    }

    .app-page:has(.project-directory) > .metric-grid .metric-icon {
        height: 2.25rem;
        width: 2.25rem;
    }

    .project-directory .project-table tbody tr:has(.status-pill.success) .entity-cell strong,
    .project-directory .project-card:has(.status-pill.success) .project-card-header strong {
        color: #176b34;
    }

    .project-directory .project-table tbody tr:has(.status-pill.danger) .entity-cell strong,
    .project-directory .project-card:has(.status-pill.danger) .project-card-header strong {
        color: #a82020;
    }

    .project-directory .project-table tbody tr:has(.status-pill.success) .entity-cell strong::before,
    .project-directory .project-card:has(.status-pill.success) .project-card-header strong::before,
    .project-directory .project-table tbody tr:has(.status-pill.danger) .entity-cell strong::before,
    .project-directory .project-card:has(.status-pill.danger) .project-card-header strong::before {
        border-radius: 50%;
        content: "";
        flex: 0 0 auto;
        height: 0.5rem;
        width: 0.5rem;
    }

    .project-directory .project-table tbody tr:has(.status-pill.success) .entity-cell strong::before,
    .project-directory .project-card:has(.status-pill.success) .project-card-header strong::before {
        background: #176b34;
        box-shadow: 0 0 0 3px #e7f6ed;
    }

    .project-directory .project-table tbody tr:has(.status-pill.danger) .entity-cell strong::before,
    .project-directory .project-card:has(.status-pill.danger) .project-card-header strong::before {
        background: #a82020;
        box-shadow: 0 0 0 3px #fde8e8;
    }
}

.inline-success {
    align-items: center;
    background: #ecfff6;
    border: 1px solid #9df0bf;
    border-radius: 8px;
    color: #08784f;
    display: flex;
    font-size: 1rem;
    font-weight: 900;
    gap: 0.72rem;
    min-height: 3.2rem;
    padding: 0.78rem 1rem;
}

.inline-success::before {
    align-items: center;
    background: #08784f;
    border-radius: 50%;
    color: #fff;
    content: "\f00c";
    display: inline-flex;
    flex: 0 0 auto;
    font-family: "Font Awesome 6 Free";
    font-size: 0.72rem;
    font-weight: 900;
    height: 1.35rem;
    justify-content: center;
    width: 1.35rem;
}

.timesheet-page.compact-page {
    gap: 0.75rem;
    max-width: 1280px;
}

.timesheet-title-bar {
    align-items: center;
    gap: 0.85rem;
    justify-content: space-between;
}

.timesheet-admin-contractor-picker {
    align-items: flex-start;
    display: grid;
    flex: 1 1 20rem;
    gap: 0.22rem;
    max-width: 26rem;
    min-width: 18rem;
}

.timesheet-admin-contractor-picker span {
    color: #52657d;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.timesheet-admin-contractor-picker select {
    background: #fff;
    border-color: #b9c8d8;
    border-radius: 6px;
    color: #0b2744;
    font-weight: 850;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0.35rem 0.55rem;
}

.timesheet-heading-navigator {
    align-items: center;
    flex: 1 1 auto;
    justify-content: space-between;
    max-width: 34rem;
}

.timesheet-heading-chip {
    align-items: center;
    display: inline-flex;
    gap: 0.65rem;
    justify-content: center;
    min-width: 18rem;
}

.timesheet-heading-chip h1 {
    color: #102c49;
    font-size: 1.28rem;
    font-weight: 900;
    line-height: 1.05;
    margin: 0;
    white-space: nowrap;
}

.timesheet-header-actions {
    align-items: center;
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.timesheet-export-command .fa-file-excel {
    color: #176b34;
}

.timesheet-export-command .fa-file-pdf {
    color: #a82020;
}

.timesheet-email-command .fa-envelope {
    color: #155f95;
}

.month-navigator {
    align-items: center;
    background: #fff;
    border: 1px solid #c9dced;
    border-radius: 8px;
    display: inline-flex;
    gap: 0.45rem;
    padding: 0.32rem;
}

.month-chip {
    color: #0b2744;
    font-size: 0.95rem;
    font-weight: 900;
    text-align: center;
}

.timesheet-summary-grid {
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(18rem, 1.25fr);
}

.timesheet-summary-grid .metric-card {
    min-height: 74px;
    padding: 0.55rem 0.75rem;
}

.timesheet-summary-grid .metric-card strong {
    font-size: 1rem;
    line-height: 1.2;
}

.timesheet-summary-grid .metric-detail {
    color: #52657d;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0.18rem;
}

.timesheet-hours-summary-card {
    align-items: center;
}

.timesheet-hours-summary {
    flex: 1;
    min-width: 0;
}

.timesheet-hours-values {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timesheet-hours-values span {
    min-width: 0;
}

.timesheet-hours-values em {
    color: #52657d;
    display: block;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.1;
}

.timesheet-hours-values strong {
    font-size: 0.98rem;
    margin-top: 0.1rem;
}

.timesheet-hours-values span:last-child {
    text-align: right;
}

.timesheet-hours-progress {
    background: #e6edf5;
    border-radius: 999px;
    height: 0.68rem;
    margin-top: 0.48rem;
    overflow: hidden;
}

.timesheet-hours-progress span {
    background: linear-gradient(90deg, #0f7a3a 0%, #41a94f 42%, #ffd166 72%, #d92d20 100%);
    display: block;
    height: 100%;
    min-width: 0.18rem;
}

.timesheet-readonly-note {
    align-items: center;
    background: #eef6ff;
    border: 1px solid #cfe0f2;
    border-radius: 8px;
    color: #31455f;
    display: flex;
    font-size: 0.9rem;
    font-weight: 800;
    gap: 0.55rem;
    padding: 0.72rem 0.9rem;
}

.timesheet-validation ul {
    margin: 0;
    padding-left: 1.15rem;
}

.timesheet-directory {
    overflow: hidden;
}

.timesheet-section-heading {
    align-items: center;
    background: linear-gradient(90deg, #f5faff 0%, #fff 100%);
    border-bottom: 1px solid #e1ebf4;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 0.95rem;
}

.timesheet-section-title-group {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    min-width: 0;
}

.timesheet-section-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.timesheet-section-heading h2 {
    color: #102c49;
    font-size: 1.08rem;
    font-weight: 900;
    margin: 0;
}

.timesheet-week-toggle-all-button {
    align-items: center;
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.95rem;
    height: 2.35rem;
    justify-content: center;
    line-height: 1;
    width: 2.35rem;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.timesheet-week-toggle-all-button.is-expand {
    background: linear-gradient(135deg, #36c979 0%, #15905a 100%);
    box-shadow: 0 0.6rem 1.25rem rgba(21, 144, 90, 0.24);
}

.timesheet-week-toggle-all-button.is-collapse {
    background: linear-gradient(135deg, #ffcf7a 0%, #f59b32 100%);
    box-shadow: 0 0.6rem 1.25rem rgba(245, 155, 50, 0.24);
}

.timesheet-week-toggle-all-button:hover,
.timesheet-week-toggle-all-button:focus {
    box-shadow: 0 0.8rem 1.45rem rgba(16, 44, 73, 0.22);
    transform: translateY(-1px);
}

.timesheet-week-toggle-all-button:focus-visible {
    outline: 3px solid rgba(21, 95, 149, 0.35);
    outline-offset: 2px;
}

.timesheet-total-badge {
    align-items: center;
    background: #eef7ff;
    border: 1px solid #cfe0f2;
    border-radius: 8px;
    color: #155f95;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 850;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
}

.timesheet-table-scroll {
    max-height: none;
}

.timesheet-table {
    border-collapse: collapse;
    min-width: 700px;
    table-layout: fixed;
}

.timesheet-col-date {
    width: 9%;
}

.timesheet-col-project {
    width: 21%;
}

.timesheet-col-description {
    width: 48%;
}

.timesheet-col-hours {
    width: 10%;
}

.timesheet-col-actions {
    width: 12%;
}

.timesheet-week-list {
    display: grid;
    gap: 0.42rem;
    padding: 0.42rem;
}

.timesheet-week-field-header-scroll {
    border-radius: 5px;
    overflow: hidden;
}

.timesheet-week-field-header {
    margin: 0;
}

.timesheet-week-section {
    border-radius: 6px;
    overflow: hidden;
}

.timesheet-week-header {
    align-items: center;
    background: #245aa8;
    border: 0;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 900;
    gap: 0.75rem;
    justify-content: space-between;
    min-height: 2rem;
    padding: 0.36rem 0.56rem;
    text-align: left;
    width: 100%;
}

.timesheet-week-header:hover,
.timesheet-week-header:focus {
    background: #1f5198;
}

.timesheet-week-header:focus-visible {
    box-shadow: 0 0 0 3px rgba(21, 102, 157, 0.28);
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.timesheet-week-title {
    align-items: center;
    display: inline-flex;
    flex: 1 1 auto;
    gap: 0.52rem;
    min-width: 0;
}

.timesheet-week-title i {
    font-size: 0.78rem;
    width: 0.8rem;
}

.timesheet-week-title small {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}

.timesheet-week-total {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    color: #fff;
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 950;
    min-width: 5.25rem;
    padding: 0.18rem 0.44rem;
    text-align: right;
}

.timesheet-week-content {
    border: 1px solid #bdd2ea;
    border-top: 0;
}

.timesheet-week-table {
    margin: 0;
}

.timesheet-week-table tr:first-child td {
    border-top: 0;
}

.timesheet-empty-state {
    display: block;
    padding: 1.85rem 1rem;
    text-align: center;
}

.timesheet-month-total {
    align-items: center;
    background: #f8fbff;
    border-top: 2px solid #dce8f4;
    display: flex;
    gap: 1.25rem;
    justify-content: flex-end;
    padding: 0.72rem 1rem;
}

.timesheet-month-total span {
    color: #52657d;
    font-size: 0.95rem;
    font-weight: 950;
    text-transform: uppercase;
}

.timesheet-month-total strong {
    color: #155f95;
    font-size: 1.05rem;
    font-weight: 950;
    min-width: 5.2rem;
    text-align: center;
}

.timesheet-table th {
    padding: 0.55rem;
}

.timesheet-table th:nth-child(1) {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    text-align: center;
    width: 9%;
}

.timesheet-table th:nth-child(2) {
    width: 21%;
}

.timesheet-table th:nth-child(3) {
    width: 48%;
}

.timesheet-table th:nth-child(4) {
    width: 10%;
}

.timesheet-table th:nth-child(5) {
    width: 12%;
}

.timesheet-table td {
    border-top: 0;
    border-bottom: 1px solid #d7e3ef;
    padding: 0.55rem 0.55rem;
    vertical-align: middle;
}

.timesheet-actions-cell {
    display: table-cell;
    text-align: center;
}

.timesheet-row-actions {
    align-items: center;
    display: flex;
    gap: 0.42rem;
    justify-content: center;
}

.timesheet-hours-header {
    text-align: center;
}

.timesheet-hours-header span {
    display: inline-block;
    max-width: 5.2rem;
    text-align: center;
    width: 100%;
}

.timesheet-table .actions-column {
    text-align: center;
}

.timesheet-hours-cell {
    text-align: center;
}

.timesheet-hours-cell .timesheet-hours {
    margin-inline: auto;
}

.timesheet-table .icon-button {
    height: 2.15rem;
    width: 2.15rem;
}

.timesheet-table tfoot td {
    background: #f8fbff;
    border-top: 2px solid #dce8f4;
    padding: 0.72rem 0.55rem;
}

.timesheet-total-label-cell {
    color: #52657d !important;
    font-size: 0.95rem;
    font-weight: 950;
    text-align: right;
    text-transform: uppercase;
    white-space: nowrap;
}

.timesheet-total-value-cell {
    text-align: center;
}

.timesheet-total-value-cell span {
    color: #155f95;
    display: inline-block;
    font-size: 1.05rem;
    font-weight: 950;
    max-width: 5.2rem;
    text-align: center;
    width: 100%;
}

.timesheet-date-group-cell {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
    vertical-align: middle !important;
}

.timesheet-date-cell {
    display: grid;
    gap: 0.18rem;
    justify-items: center;
    text-align: center;
}

.timesheet-date-cell strong {
    color: #0b2744;
    font-size: 0.88rem;
    font-weight: 900;
}

.timesheet-date-cell small {
    color: #52657d;
    font-size: 0.72rem;
    font-weight: 850;
    white-space: nowrap;
}

.timesheet-select,
.timesheet-hours {
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 6px;
    color: #0b2744;
    box-sizing: border-box;
    font: inherit;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0.45rem 0.55rem;
    width: 100%;
}

.timesheet-description-preview {
    align-items: center;
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 6px;
    color: #0b2744;
    box-sizing: border-box;
    cursor: text;
    display: flex;
    gap: 0.42rem;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0.28rem 0.28rem 0.28rem 0.55rem;
    text-align: left;
    width: 100%;
}

.timesheet-description-icon {
    align-items: center;
    background: linear-gradient(135deg, #15669d 0%, #14966f 100%);
    border-radius: 5px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.65rem;
    justify-content: center;
    width: 1.65rem;
}

.timesheet-description-icon i {
    font-size: 0.78rem;
}

.timesheet-description-preview-input {
    background: transparent;
    border: 0;
    color: #0b2744;
    cursor: text;
    flex: 1 1 auto;
    font: inherit;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.timesheet-description-preview-input:focus {
    outline: none;
}

.timesheet-description-preview-input::placeholder {
    color: #52657d;
}

.timesheet-description-preview.is-empty {
    color: #52657d;
}

.timesheet-description-preview.is-disabled {
    background: #f4f7fb;
    border-color: #d2deea;
    color: #7a899a;
    cursor: not-allowed;
}

.timesheet-description-preview:hover,
.timesheet-description-preview:focus-within {
    border-color: #155f95;
    box-shadow: 0 0 0 0.16rem rgba(21, 95, 149, 0.15);
    outline: none;
}

.timesheet-description-preview.is-disabled:hover,
.timesheet-description-preview.is-disabled:focus-within {
    border-color: #d2deea;
    box-shadow: none;
}

.timesheet-description-preview.is-disabled .timesheet-description-icon {
    background: #d7e3ee;
    color: #7a899a;
}

.timesheet-description-preview-input:disabled {
    color: #7a899a;
    cursor: not-allowed;
}

.timesheet-hours {
    max-width: 5.2rem;
    text-align: right;
}

.timesheet-select:focus,
.timesheet-hours:focus {
    border-color: #155f95;
    box-shadow: 0 0 0 0.16rem rgba(21, 95, 149, 0.15);
    outline: none;
}

.timesheet-select:disabled,
.timesheet-hours:disabled {
    background: #f4f7fb;
    color: #52657d;
}

.timesheet-description-modal-card .rtts-modal-body {
    padding: 1rem 1.2rem 0.9rem;
}

.timesheet-submit-confirmation-dialog {
    max-width: min(680px, calc(100vw - 2rem));
}

.timesheet-submit-confirmation-card {
    background: #fff;
    border-color: #cbd5e1;
    border-radius: 12px;
}

.timesheet-submit-confirmation-card::before {
    background: #1769e0;
    height: 3px;
}

.timesheet-submit-confirmation-header {
    background: #fff;
    padding: 0.85rem 1.35rem;
}

.timesheet-submit-confirmation-header-icon {
    background: #eaf2ff;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    color: #1769e0;
    height: 2.8rem;
    width: 2.8rem;
}

.timesheet-submit-confirmation-header .rtts-close-button {
    background: transparent;
    border: 0;
    color: #4b5563;
    font-size: 1.25rem;
}

.timesheet-submit-confirmation-header h2 .timesheet-submit-confirmation-month {
    color: #075dcc !important;
    font-style: italic !important;
    font-weight: inherit;
}

.timesheet-submit-confirmation-body {
    color: #1f2f46;
    display: block;
    font-size: 1rem;
    line-height: 1.45;
    padding: 0 1.75rem;
}

.timesheet-submit-confirmation-body p {
    margin: 0;
}

.timesheet-submit-confirmation-row {
    align-items: center;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 3.1rem minmax(0, 1fr);
    min-height: 5.5rem;
    padding: 0.9rem 0;
}

.timesheet-submit-confirmation-row + .timesheet-submit-confirmation-row {
    border-top: 1px solid #e2e8f0;
}

.timesheet-submit-confirmation-row-icon {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    font-size: 1.2rem;
    height: 3.1rem;
    justify-content: center;
    position: relative;
    width: 3.1rem;
}

.timesheet-submit-confirmation-row-icon.confirmation {
    background: #eef5ff;
    color: #1769e0;
}

.timesheet-submit-confirmation-row-icon.confirmation .fa-circle-check {
    background: #fff;
    border-radius: 50%;
    bottom: 0.35rem;
    font-size: 0.85rem;
    position: absolute;
    right: 0.28rem;
}

.timesheet-submit-confirmation-row-icon.locked {
    background: #fff0f0;
    color: #df1717;
}

.timesheet-submit-confirmation-row-icon.guidance {
    background: #eef5ff;
    color: #1769e0;
}

.timesheet-submit-confirmation-row.warning p {
    color: #df1717;
    font-weight: 850;
}

.timesheet-submit-confirmation-row strong {
    color: #075dcc;
    font-weight: 850;
}

.timesheet-submit-confirmation-actions {
    background: #fff;
    gap: 1rem;
    padding: 1rem 1.75rem 1.1rem !important;
}

.timesheet-submit-cancel-button,
.timesheet-submit-confirm-button {
    min-height: 2.65rem;
}

.timesheet-submit-cancel-button {
    border: 1px solid #b9c5d3;
    color: #344258;
    justify-content: center;
    min-width: 8rem;
}

.timesheet-submit-confirm-button {
    background: #0868df !important;
    border-color: #0868df !important;
    box-shadow: 0 10px 22px rgba(8, 104, 223, 0.22) !important;
    justify-content: center;
    min-width: 13.5rem !important;
}

@media (max-width: 575.98px) {
    .timesheet-submit-confirmation-header {
        padding: 1rem;
    }

    .timesheet-submit-confirmation-body {
        padding: 0 1rem;
    }

    .timesheet-submit-confirmation-row {
        gap: 0.9rem;
        grid-template-columns: 3rem minmax(0, 1fr);
        min-height: auto;
    }

    .timesheet-submit-confirmation-row-icon {
        height: 3rem;
        width: 3rem;
    }

    .timesheet-submit-confirmation-actions {
        align-items: stretch;
        flex-direction: column-reverse;
        padding: 1rem !important;
    }

    .timesheet-submit-cancel-button,
    .timesheet-submit-confirm-button {
        width: 100%;
    }
}

.timesheet-description-modal-card .description-meta {
    color: #52657d;
    font-size: 0.86rem;
    font-weight: 800;
    margin: 0.12rem 0 0;
}

.timesheet-description-editor {
    min-height: 14rem !important;
    resize: vertical;
}

.timesheet-row-invalid .timesheet-hours {
    border-color: #df8d8d;
}

.timesheet-row-weekend,
.timesheet-row-weekend td {
    background: #dbe2ea;
    border-bottom-color: #aebccb;
}

.timesheet-row-weekend .timesheet-date-group-cell {
    border-left: 5px solid #52657d;
}

.timesheet-row-holiday,
.timesheet-row-holiday td {
    background: #dcecff;
    border-bottom-color: #8db8e8;
}

.timesheet-row-holiday .timesheet-date-group-cell {
    border-left: 5px solid #1d6ed0;
}

.timesheet-row-over-eight,
.timesheet-row-over-eight td {
    background: #fff5cc;
    border-bottom-color: #d49a00;
}

.timesheet-row-over-eight .timesheet-date-group-cell {
    border-left: 5px solid #b56f00;
}

.timesheet-row-invalid,
.timesheet-row-invalid td {
    background: #fff7f7;
    border-bottom-color: #df8d8d;
}

.timesheet-row-invalid .timesheet-date-group-cell {
    border-left: 5px solid #c92d2d;
}

.timesheet-approval-panel {
    overflow: hidden;
}

.approval-grid {
    display: grid;
    column-gap: clamp(3.8rem, 7vw, 7.5rem);
    grid-template-columns: minmax(17rem, 1.45fr) minmax(10rem, 0.8fr) minmax(10rem, 0.8fr);
    padding: 0.95rem;
    row-gap: 1.15rem;
}

.contractor-approval-grid,
.contractor-pending-approval-grid,
.contractor-view-approval-grid {
    align-items: start;
}

.contractor-approval-grid .approval-data-item,
.contractor-pending-approval-grid .approval-data-item,
.contractor-view-approval-grid .approval-data-item {
    min-height: auto;
    padding: 0;
}

.contractor-view-approval-grid .contractor-signature-block {
    grid-column: 1;
}

.contractor-view-approval-grid > .contractor-signature-block:first-child {
    grid-row: 1;
}

.contractor-view-approval-grid .approval-supervisor-signature {
    grid-row: 2;
}

.approval-unified-grid {
    grid-template-rows: auto auto auto;
}

.contractor-signature-block.approval-admin-contractor-signature {
    grid-column: span 2;
    grid-row: auto;
}

.timesheet-approval-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.timesheet-save-draft-button {
    background: #6b7280;
    border-color: #6b7280;
    color: #fff;
}

.timesheet-save-draft-button:hover,
.timesheet-save-draft-button:focus {
    background: #4b5563;
    border-color: #4b5563;
    color: #fff;
}

.contractor-signature-block {
    display: grid;
    gap: 0.45rem;
    grid-column: 1;
    grid-row: 1;
}

.approval-submitted-date {
    grid-column: 2;
    grid-row: 1;
}

.approval-supervisor-signature {
    grid-column: 1;
    grid-row: 2;
}

.contractor-signature-block.approval-supervisor-signature {
    grid-column: 1;
    grid-row: 2;
}

.approval-decision-date {
    grid-column: 2;
    grid-row: 2;
}

.approval-status-item {
    grid-column: 3;
    grid-row: 2;
}

.contractor-signature-field {
    gap: 0.65rem;
}

.approval-field-label,
.approval-data-item span {
    color: #52657d;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.approval-data-item {
    align-content: start;
    display: grid;
    gap: 0.42rem;
    min-height: 3.8rem;
    padding: 1.45rem 0 0;
}

.approval-data-item strong {
    color: #0b2744;
    font-weight: 900;
}

.approval-editable-item {
    cursor: default;
}

.approval-inline-input,
.approval-status-select {
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 6px;
    color: #0b2744;
    font: inherit;
    font-weight: 850;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0.38rem 0.55rem;
    width: min(100%, 16rem);
}

.approval-inline-input:focus,
.approval-status-select:focus {
    border-color: #155f95;
    box-shadow: 0 0 0 0.16rem rgba(21, 95, 149, 0.15);
    outline: none;
}

.approval-status-select {
    width: min(100%, 12rem);
}

.approval-comments-field {
    display: grid;
    gap: 0.42rem;
    grid-column: 1 / -1;
    grid-row: 3;
}

.approval-comments-field span {
    color: #52657d;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.approval-comments-field textarea {
    min-height: 5.6rem;
    resize: vertical;
}

.approval-comments-readonly p {
    background: #f8fbff;
    border: 1px solid #d9e4f1;
    border-radius: 7px;
    color: #0b2744;
    font-weight: 700;
    margin: 0;
    min-height: 2.5rem;
    padding: 0.65rem 0.8rem;
}

.approval-data-item .approval-status-pill {
    align-self: start;
    display: inline-flex;
    font-size: 0.78rem;
    justify-self: start;
    line-height: 1;
    width: fit-content;
}

.signature-summary-button {
    align-items: center;
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 7px;
    color: #0b2744;
    cursor: pointer;
    display: flex;
    gap: 0.8rem;
    min-height: 4.15rem;
    padding: 0.75rem 0.9rem;
    text-align: left;
    width: 100%;
}

.signature-summary-button i {
    align-items: center;
    background: #eaf2fb;
    border-radius: 7px;
    color: #155f95;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    height: 2.65rem;
    justify-content: center;
    width: 2.65rem;
}

.signature-summary-button span {
    display: grid;
    gap: 0.12rem;
    letter-spacing: 0;
    min-width: 0;
    text-transform: none;
}

.signature-summary-button .signature-summary-content {
    min-width: 0;
}

.signature-summary-preview {
    background: transparent;
    display: block;
    height: 2rem;
    max-width: 12rem;
    width: min(12rem, 100%);
}

.signature-summary-button strong {
    color: #0b2744;
    font-size: 1.18rem;
    line-height: 1.1;
    text-transform: none;
}

.signature-summary-button small {
    color: #52657d;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: none;
}

.signature-summary-button.is-signed {
    border-color: #81c7a7;
    box-shadow: 0 0 0 0.14rem rgba(20, 150, 111, 0.12);
}

.signature-summary-button.is-signed i {
    background: #e7f7ef;
    color: #08784f;
}

.signature-summary-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.signature-card-heading {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
}

.signature-mode-toggle {
    align-items: center;
    background: #eaf2fb;
    border: 1px solid #c9d9e8;
    border-radius: 7px;
    display: inline-flex;
    padding: 0.16rem;
}

.signature-mode-button {
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: #284763;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.3rem 0.55rem;
}

.signature-mode-button.is-active {
    background: #155f95;
    color: #fff;
}

.signature-mode-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.signature-pad-shell {
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 7px;
    min-height: 7rem;
    overflow: hidden;
}

.signature-pad-shell.is-readonly {
    background: #f4f7fb;
}

.signature-pad-canvas {
    display: block;
    height: 7rem;
    touch-action: none;
    width: 100%;
}

.contractor-signature-modal-card {
    max-height: min(92vh, 760px);
}

.signature-modal-body {
    display: grid;
    gap: 0.85rem;
}

.signature-pad-modal-shell {
    min-height: 12rem;
}

.signature-pad-modal-canvas {
    height: 12rem;
}

.signature-modal-preview {
    min-height: 4rem;
}

.signature-pad-canvas.is-readonly {
    cursor: not-allowed;
}

.signature-pad-actions {
    align-items: center;
    color: #52657d;
    display: flex;
    font-size: 0.75rem;
    font-weight: 800;
    justify-content: space-between;
}

.signature-clear-button {
    background: #fff;
    border: 1px solid #b9c8d8;
    border-radius: 6px;
    color: #155f95;
    font-weight: 900;
    padding: 0.3rem 0.65rem;
}

.typed-signature-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1.4fr 0.9fr;
}

.signature-font-locked {
    align-items: center;
    background: #f4f7fb;
    color: #314a65;
    display: flex;
    font-weight: 800;
    gap: 0.55rem;
}

.signature-font-locked i {
    color: #17679d;
}

.typed-signature-preview {
    align-items: center;
    background: #fff;
    border: 1px dashed #b9c8d8;
    border-radius: 7px;
    color: #0b2744;
    display: flex;
    font-size: 1.45rem;
    min-height: 3rem;
    padding: 0.45rem 0.65rem;
}

.approval-supervisor {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #d7e5f2;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    padding: 0.8rem;
}

.approval-avatar {
    align-items: center;
    background: #e6f2ff;
    border-radius: 8px;
    color: #155f95;
    display: inline-flex;
    height: 2.55rem;
    justify-content: center;
    width: 2.55rem;
}

.approval-supervisor span,
.approval-grid .form-field span {
    color: #52657d;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.approval-supervisor strong,
.approval-status-text,
.approval-grid .form-field strong {
    color: #0b2744;
    font-weight: 900;
}

.approval-grid .form-field .approval-status-pill {
    align-self: start;
    display: inline-flex;
    font-size: 0.78rem;
    justify-self: start;
    line-height: 1;
    margin-top: 0.1rem;
    width: fit-content;
}

.approval-grid .form-field .approval-status-pill.success {
    color: #176b34;
}

.approval-grid .form-field .approval-status-pill.warning {
    color: #8a5a00;
}

.approval-grid .form-field .approval-status-pill.danger {
    color: #a82020;
}

.approval-grid .form-field .approval-status-pill.info {
    color: #155f95;
}

.approval-grid .form-field .approval-status-pill.neutral {
    color: #40536b;
}

.approval-data-item .approval-status-pill.success {
    color: #176b34;
}

.approval-data-item .approval-status-pill.warning {
    color: #8a5a00;
}

.approval-data-item .approval-status-pill.danger {
    color: #a82020;
}

.approval-data-item .approval-status-pill.info {
    color: #155f95;
}

.approval-data-item .approval-status-pill.neutral {
    color: #40536b;
}

.approval-signature .signature-preview {
    font-size: 1.25rem;
    font-weight: 700;
}

.approval-decision {
    align-content: start;
}

.approval-decision label {
    align-items: center;
    color: #0b2744;
    display: inline-flex;
    font-weight: 800;
    gap: 0.35rem;
    margin-right: 0.8rem;
}

.approval-decision input {
    accent-color: #155f95;
}

.timesheet-approval-actions {
    justify-content: flex-end;
    margin: 0;
    padding: 0.85rem 0.95rem 1rem;
}

/* Timesheet Overview. */
.timesheet-overview-page.compact-page {
    gap: 0.75rem;
    max-width: 1260px;
}

.overview-scope-badge {
    align-items: center;
    background: #fff;
    border: 1px solid #cfe0f2;
    border-radius: 999px;
    color: #155f95;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 850;
    gap: 0.45rem;
    padding: 0.42rem 0.72rem;
}

.timesheet-overview-directory {
    overflow: hidden;
}

.timesheet-overview-directory .timesheet-overview-toolbar {
    grid-template-columns: minmax(13rem, 1.2fr) minmax(13rem, 1.05fr) minmax(7rem, 0.45fr) minmax(9rem, 0.55fr) minmax(11rem, 0.75fr);
}

.timesheet-overview-table {
    table-layout: fixed;
}

.timesheet-overview-table th:nth-child(1) {
    width: 32%;
}

.timesheet-overview-table th:nth-child(2) {
    width: 22%;
}

.timesheet-overview-table th:nth-child(3) {
    width: 18%;
}

.timesheet-overview-table th:nth-child(4) {
    width: 16%;
}

.timesheet-overview-table th:nth-child(5) {
    width: 12%;
}

.contractor-link-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #102c49;
    cursor: pointer;
    display: inline-flex;
    gap: 0.65rem;
    max-width: 100%;
    padding: 0;
    text-align: left;
}

.contractor-link-button:hover strong,
.contractor-link-button:focus-visible strong {
    color: #155f95;
    text-decoration: underline;
}

.contractor-link-button:focus-visible {
    border-radius: 8px;
    box-shadow: 0 0 0 0.18rem rgba(21, 95, 149, 0.22);
    outline: none;
}

.contractor-link-button span:last-child {
    display: grid;
    min-width: 0;
}

.contractor-link-button strong {
    color: #102c49;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contractor-link-button small {
    color: #60758e;
    font-size: 0.78rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contractor-avatar {
    align-items: center;
    background: linear-gradient(135deg, #e8f4ff 0%, #d5ecff 100%);
    border: 1px solid #b9d7f0;
    border-radius: 10px;
    color: #155f95;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 950;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.remaining-hours-open {
    color: #155f95;
}

.remaining-hours-complete {
    color: #176b34;
}

@media (max-width: 1100px) {
    .timesheet-title-bar,
    .timesheet-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .timesheet-admin-contractor-picker {
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .timesheet-heading-navigator {
        max-width: none;
        width: 100%;
    }

    .approval-grid {
        column-gap: clamp(2.2rem, 5vw, 4.5rem);
        grid-template-columns: minmax(15rem, 1.2fr) minmax(9rem, 0.8fr) minmax(9rem, 0.8fr);
    }

    .timesheet-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timesheet-overview-directory .timesheet-overview-toolbar {
        grid-template-columns: minmax(12rem, 1.15fr) minmax(12rem, 1fr) minmax(6.5rem, 0.45fr) minmax(8rem, 0.55fr) minmax(10rem, 0.75fr);
    }
}

@media (max-width: 760px) {
    .timesheet-summary-grid,
    .approval-grid {
        grid-template-columns: 1fr;
    }

    .contractor-approval-grid,
    .typed-signature-grid {
        grid-template-columns: 1fr;
    }

    .contractor-signature-block,
    .approval-submitted-date,
    .approval-supervisor-signature,
    .approval-decision-date,
    .approval-status-item,
    .approval-comments-field {
        grid-column: 1;
        grid-row: auto;
    }

    .contractor-signature-block.approval-supervisor-signature,
    .contractor-view-approval-grid > .contractor-signature-block:first-child,
    .contractor-view-approval-grid .approval-supervisor-signature {
        grid-row: auto;
    }

    .signature-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .timesheet-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .timesheet-section-title-group {
        width: 100%;
    }

    .timesheet-approval-header-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .timesheet-approval-header-actions .app-command,
    .timesheet-approval-header-actions .app-command-secondary {
        flex: 1 1 12rem;
    }

    .timesheet-section-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .timesheet-week-header {
        align-items: flex-start;
        gap: 0.45rem;
    }

    .timesheet-week-title {
        flex-wrap: wrap;
        gap: 0.3rem 0.5rem;
    }

    .timesheet-week-title small {
        white-space: normal;
    }

    .timesheet-week-total {
        min-width: 4.5rem;
    }

    .month-navigator {
        justify-content: space-between;
        width: 100%;
    }

    .timesheet-heading-chip {
        min-width: 0;
    }

    .timesheet-heading-chip h1 {
        font-size: 1.08rem;
        white-space: normal;
    }

    .timesheet-overview-directory .timesheet-overview-toolbar {
        grid-template-columns: 1fr;
    }

    .overview-scope-badge {
        width: max-content;
    }

    .timesheet-table-scroll {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    .timesheet-table {
        min-width: 640px;
    }

    .timesheet-table th,
    .timesheet-table td {
        padding: 0.42rem;
    }

    .timesheet-table th:nth-child(1) {
        padding-left: 0.42rem;
        padding-right: 0.42rem;
        text-align: center;
        width: 10%;
    }

    .timesheet-table th:nth-child(2) {
        width: 22%;
    }

    .timesheet-table th:nth-child(3) {
        width: 44%;
    }

    .timesheet-table th:nth-child(4) {
        width: 11%;
    }

    .timesheet-table th:nth-child(5) {
        width: 13%;
    }

    .timesheet-table tfoot td {
        padding: 0.55rem 0.42rem;
    }

    .timesheet-total-label-cell {
        font-size: 0.82rem;
    }

    .timesheet-total-value-cell span {
        max-width: 4.8rem;
    }

    .timesheet-select,
    .timesheet-description-preview,
    .timesheet-hours {
        font-size: 0.88rem;
        height: 2.15rem;
        min-height: 2.15rem;
        padding: 0.35rem 0.45rem;
    }

    .timesheet-description-preview {
        gap: 0.35rem;
    }

    .timesheet-hours {
        max-width: 4.8rem;
    }

    .timesheet-table .icon-button {
        height: 2rem;
        width: 2rem;
    }

    .timesheet-date-cell small {
        white-space: normal;
    }

    .timesheet-description-modal-card .rtts-modal-body {
        padding: 0.85rem;
    }

    .timesheet-description-editor {
        min-height: 11rem !important;
    }
}
