html {
    font-size: 14px;
}

.monthly-report-link { color: inherit; text-decoration: none; text-align: left; cursor: pointer; font: inherit; }
.monthly-report-link:hover, .monthly-report-link:focus-visible { outline: 2px solid #1565b3; outline-offset: 3px; }
.employee-report-link { background: none; border: 0; padding: 0; font: inherit; color: #155a9a; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: inherit; }
.employee-report-link:hover, .employee-report-link:focus-visible { color: #0f3762; outline: 2px solid #1565b3; outline-offset: 3px; }
.summary-help { color: #526274; font-size: .8rem; margin: .3rem 0 0; }
.time-overlap-warning { background: #fff6df; border: 1px solid #d7a440; border-left: 5px solid #ad6900; border-radius: 8px; color: #664100; margin: 0 0 1.25rem; padding: 1rem 1.25rem; }
.time-overlap-warning h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.time-overlap-warning p { margin-bottom: .65rem; }
.time-overlap-warning summary { cursor: pointer; font-weight: 650; }
.time-overlap-warning a { color: #754000; }
.overlap-table { margin-top: .75rem; min-width: 620px; }
.day-overlap-label { color: #754000; background: #fff6df; border: 1px solid #d7a440; border-radius: 4px; padding: .15rem .4rem; font-size: .75rem; font-weight: 700; }
.report-tabs { display: flex; gap: .35rem; border-bottom: 1px solid #bbcbd9; margin-bottom: 1.25rem; }
.report-tabs a { padding: .85rem 1.15rem; color: #4c6177; text-decoration: none; font-weight: 650; border-bottom: 3px solid transparent; }
.report-tabs a.active { color: #0f3762; border-color: #1565b3; background: #eaf1f8; border-radius: 6px 6px 0 0; }
.report-filters { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; margin-bottom: 1.5rem; }
.report-filters label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; }
.report-customer-filter { flex: 1; min-width: 240px; }
.report-paper { background: white; border: 1px solid #d8e0e8; border-radius: 10px; padding: 2rem; }
.report-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.report-heading h2 { font-size: 1.65rem; color: #0f3762; }
.report-heading p { margin-bottom: .4rem; }
.report-export { padding: .7rem 1rem; white-space: nowrap; text-decoration: none; }
.report-muted { color: #627184; font-size: .88rem; }
.report-metrics { display: flex; flex-wrap: wrap; gap: 2.5rem; background: #f0f5fa; border-radius: 6px; padding: 1rem 1.4rem; margin: 1.5rem 0; }
.report-metrics div { display: grid; gap: .15rem; }
.report-metrics span { color: #52687e; font-size: .84rem; }
.report-metrics strong { color: #0f3762; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.report-summary-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 2rem; }
.report-paper h3 { font-size: 1.1rem; color: #0f3762; margin: 0 0 .9rem; }
.report-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.report-table td, .report-table th { padding: .6rem .65rem; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.report-table thead { background: #f0f4f8; color: #354c63; }
.report-table tfoot, .report-customer-row { background: #e7eff7; font-weight: 700; color: #0f3762; }
.report-area-row { font-weight: 650; border-top: 1px solid #a9bfd4; }
.report-table .report-indent { padding-left: 1.5rem; }
.report-table .numeric-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-empty { padding: 1rem 0; color: #627184; }
.report-chart-scroll { overflow-x: auto; margin: 1.5rem 0 2rem; }
.report-day-chart { display: flex; min-width: 740px; gap: 5px; padding-top: .5rem; }
.report-day-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #536679; font-size: .72rem; gap: .4rem; }
.bar-track { height: 120px; width: 80%; display: flex; align-items: end; background: #f3f6f9; }
.bar-track > span { height: max(2px, var(--bar-height)); width: 100%; background: #3e7eb7; border-radius: 3px 3px 0 0; }
.report-day-bar.high-hours .bar-track > span { background: #bf6518; }
.bar-value { font-size: .65rem; font-variant-numeric: tabular-nums; }
.report-day { border: 1px solid #dce4ec; border-radius: 5px; margin: .5rem 0; scroll-margin-top: 1rem; }
.report-day summary { padding: .8rem 1rem; cursor: pointer; display: flex; align-items: center; gap: 1rem; }
.report-day summary::before { content: '+'; font-weight: 700; color: #1565b3; width: .8rem; }
.report-day[open] summary::before { content: '−'; }
.report-day summary strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.day-entry-count { color: #627184; font-size: .8rem; }
.report-day.high-hours summary { background: #fff4e5; }
.high-hours-label { color: #89430f; font-size: .75rem; font-weight: 700; }
.report-comments { white-space: pre-wrap; overflow-wrap: anywhere; }
.report-entry-table { min-width: 720px; }
.report-entry-table td.report-comments { width: 42%; }
.report-nowrap { white-space: nowrap; }
.report-detail-group { margin-bottom: 1.7rem; }
.report-detail-group h4 { font-size: 1rem; margin: 1rem 0 .7rem; }
.report-detail-customer { padding: .8rem; background: #eaf1f8; }
.report-customer-total, .report-grand-total { display: flex; justify-content: space-between; padding: .9rem; background: #eaf1f8; gap: 1rem; }
.report-grand-total { background: #0f3762; color: white; }
@media (max-width: 700px) {
    .report-paper { padding: 1rem; }
    .report-summary-grid { grid-template-columns: 1fr; }
    .report-heading { flex-direction: column; }
    .report-tabs a { padding: .8rem .6rem; font-size: .85rem; }
    .report-metrics { gap: 1.4rem; }
    .day-entry-count { display: none; }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #ffffff, 0 0 0 0.22rem #2b70c9;
}

html {
    min-height: 100%;
}

body {
    background: #f4f6f8;
    color: #1d2733;
    margin: 0;
    min-height: 100vh;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.app-nav {
    background: #0f3762;
    border-bottom: 1px solid #082748;
}

.app-nav .nav-link,
.app-nav .navbar-brand {
    color: #ffffff;
}

.app-nav .nav-link:hover,
.app-nav .navbar-brand:hover {
    color: #dbeafe;
}

.app-brand {
    align-items: center;
    display: inline-flex;
    font-weight: 700;
    gap: 0.65rem;
}

.brand-icon {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    height: 1.85rem;
    justify-content: center;
    width: 1.85rem;
}

.nav-session {
    align-items: center;
    color: #e8f1fb;
    display: flex;
    gap: 0.85rem;
}

.app-shell {
    margin: 0 auto;
    max-width: 1120px;
    padding: 2rem 1.25rem 4rem;
}

.app-footer {
    color: #667789;
    font-size: 0.88rem;
    padding: 0 1.25rem 2rem;
    text-align: center;
}

.login-page {
    align-items: center;
    display: grid;
    min-height: calc(100vh - 190px);
}

.login-panel {
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 35, 56, 0.12);
    margin: 0 auto;
    max-width: 430px;
    padding: 2rem;
    width: min(100%, 430px);
}

.login-brand {
    color: #18324f;
}

.login-title {
    margin: 1.25rem 0 1.5rem;
}

.login-title h1 {
    font-size: 1.55rem;
    margin: 0;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.form-label {
    color: #2f3b48;
    font-weight: 650;
}

.form-control {
    border-color: #b8c4d1;
    border-radius: 6px;
}

.primary-action {
    background: #1565b3;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 700;
    min-height: 2.7rem;
}

.primary-action:hover {
    background: #0f5599;
    color: #ffffff;
}

.validation-summary,
.field-validation-error {
    color: #b42318;
}

.validation-summary ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.workspace-header {
    align-items: center;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.workspace-header h1 {
    font-size: 1.9rem;
    margin: 0;
}

.eyebrow {
    color: #627184;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 0.35rem;
    text-transform: uppercase;
}

.user-tile,
.module-tile {
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
}

.user-tile {
    display: grid;
    min-width: 220px;
    padding: 1rem;
}

.user-label {
    color: #627184;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-strip {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 360px) minmax(240px, 1fr);
    margin-bottom: 1rem;
}

.month-filter,
.monthly-total-card {
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    min-height: 96px;
    padding: 1rem;
}

.month-filter {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr auto;
}

.month-filter label {
    display: grid;
    gap: 0.35rem;
}

.month-filter span,
.monthly-total-card span {
    color: #526274;
    display: block;
    font-size: 0.78rem;
    font-weight: 750;
}

.monthly-total-card {
    display: grid;
}

.monthly-total-card strong {
    align-self: end;
    color: #18324f;
    font-size: 2.3rem;
    line-height: 1;
    text-align: right;
}

.admin-monthly-summary {
    background: #ffffff;
    border: 1px solid #cbd6e2;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.summary-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.summary-heading h2 {
    color: #18324f;
    font-size: 1.1rem;
    margin: 0;
}

.summary-heading > span {
    color: #526274;
    font-size: 0.82rem;
    font-weight: 750;
}

.admin-monthly-summary .status-message {
    margin: 0 1rem 1rem;
}

.monthly-user-table {
    border-collapse: collapse;
    min-width: 480px;
    width: 100%;
}

.monthly-user-table th,
.monthly-user-table td {
    border-top: 1px solid #dfe6ee;
    padding: 0.65rem 1rem;
    text-align: left;
}

.monthly-user-table th {
    background: #e9eff5;
    color: #1c2f45;
    font-size: 0.76rem;
    font-weight: 800;
}

.monthly-user-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.monthly-user-table .numeric-cell {
    text-align: right;
}

.work-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.module-tile {
    color: #1d2733;
    display: grid;
    min-height: 120px;
    padding: 1.2rem;
    text-decoration: none;
}

.module-tile strong {
    align-self: end;
    color: #8a5a00;
}

.module-tile.is-disabled {
    cursor: default;
    opacity: 0.72;
}

.page-heading {
    align-items: center;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.page-heading h1 {
    font-size: 1.75rem;
    margin: 0;
}

.heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.filter-strip {
    align-items: stretch;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: minmax(220px, 1fr) 160px minmax(320px, 1fr) auto;
    margin-bottom: 1rem;
}

.filter-group,
.metric-group,
.date-filter {
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    margin: 0;
    min-height: 76px;
    padding: 0.8rem 1rem;
}

.filter-group legend,
.legend-label,
.metric-group span,
.date-filter span {
    color: #526274;
    display: block;
    font-size: 0.78rem;
    font-weight: 750;
    margin-bottom: 0.45rem;
}

.radio-option {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    margin-right: 1rem;
}

.radio-option.is-disabled {
    opacity: 0.55;
}

.metric-group strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.9rem;
    text-align: right;
}

.date-filter .form-control {
    min-height: 2.25rem;
}

.date-navigation {
    align-items: center;
    display: flex;
    gap: 0.4rem;
    min-width: 0;
}

.date-navigation .date-filter {
    flex: 1;
    min-width: 0;
}

.date-navigation .secondary-action {
    min-width: 40px;
    padding: 0.55rem;
}

.compact-action {
    align-self: stretch;
    min-width: 112px;
}

.primary-link-action,
.secondary-action {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 2.45rem;
    padding: 0.5rem 0.85rem;
    text-decoration: none;
}

.primary-link-action {
    background: #1565b3;
    border: 1px solid #1565b3;
    color: #ffffff;
}

.primary-link-action:hover {
    background: #0f5599;
    color: #ffffff;
}

.secondary-action {
    background: #ffffff;
    border: 1px solid #9fb0c1;
    color: #18324f;
}

.secondary-action:hover {
    background: #edf4fb;
    color: #102235;
}

.secondary-action:disabled {
    color: #7b8794;
    cursor: default;
    opacity: 0.65;
}

.status-message {
    background: #fff7ed;
    border: 1px solid #f1b76d;
    border-radius: 8px;
    color: #7c3f00;
    font-weight: 650;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.status-message.is-success {
    background: #ecfdf3;
    border-color: #8fd8ab;
    color: #05603a;
}

.listing-surface {
    background: #ffffff;
    border: 1px solid #cbd6e2;
    border-radius: 8px;
    min-height: 390px;
}

.table-wrap {
    overflow: auto;
}

.activity-table {
    border-collapse: collapse;
    font-size: 0.86rem;
    min-width: 1380px;
    width: 100%;
}

.auditor-table {
    min-width: 900px;
}

.activity-table th,
.activity-table td {
    border-bottom: 1px solid #dfe6ee;
    border-right: 1px solid #edf1f5;
    padding: 0.48rem 0.55rem;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.activity-table th {
    background: #e9eff5;
    color: #1c2f45;
    font-size: 0.76rem;
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 1;
}

.activity-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.activity-table tbody tr:hover {
    background: #eaf3ff;
}

.numeric-cell {
    text-align: right;
}

.empty-row {
    color: #667789;
    font-weight: 650;
    padding: 2rem 1rem;
    text-align: center;
}

.action-column {
    width: 260px;
}

.row-actions {
    align-items: center;
    display: flex;
    gap: 0.45rem;
    min-width: 245px;
}

.row-actions form {
    margin: 0;
}

.table-action {
    background: #ffffff;
    border: 1px solid #b4c3d4;
    border-radius: 5px;
    color: #16395f;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 750;
    justify-content: center;
    line-height: 1;
    min-width: 58px;
    padding: 0.45rem 0.55rem;
    text-decoration: none;
}

.table-action:hover {
    background: #edf4fb;
    color: #102235;
}

.danger-action {
    border-color: #d79b9b;
    color: #9f1d1d;
}

.danger-action:hover {
    background: #fff1f1;
    color: #7f1515;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.auditor-filter-strip {
    grid-template-columns: minmax(340px, 1fr) 160px;
}

.segmented-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.segment-link {
    border: 1px solid #b6c4d2;
    border-radius: 999px;
    color: #18324f;
    font-size: 0.82rem;
    font-weight: 750;
    padding: 0.4rem 0.7rem;
    text-decoration: none;
}

.segment-link:hover {
    background: #edf4fb;
    color: #102235;
}

.segment-link.is-active {
    background: #18324f;
    border-color: #18324f;
    color: #ffffff;
}

.maintenance-form {
    display: grid;
    gap: 1rem;
}

.form-section {
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    padding: 1.1rem;
}

.form-section h2 {
    font-size: 1rem;
    margin: 0 0 1rem;
}

.form-grid {
    display: grid;
    gap: 0.9rem 1rem;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.form-grid label {
    display: grid;
    gap: 0.35rem;
}

.form-grid label > span:first-child {
    color: #2f3b48;
    font-weight: 650;
}

.form-grid .checkbox-field {
    align-content: center;
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 0.55rem;
    min-height: 2.4rem;
}

.form-grid .checkbox-field span {
    color: #2f3b48;
    font-weight: 650;
}

.daily-form-grid {
    grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr);
}

.wide-field {
    grid-column: 1 / -1;
}

.status-field {
    background: #39e75f;
    color: #043a11;
    font-weight: 800;
    text-align: center;
}

.project-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #b6c4d2;
}

.project-tabs a {
    padding: 0.8rem 1.2rem;
    color: #18324f;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    font-weight: 700;
}

.project-tabs a.is-active {
    border-color: #0f3762;
    background: #e9f1fa;
}

.project-tabs span {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
}

.project-actions, .project-filter, .activity-maintenance {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.project-filter { margin-bottom: 1rem; }
.project-filter select { width: auto; max-width: 100%; }
.project-table { vertical-align: middle; }
.project-table th { white-space: nowrap; }
.selected-project-row > td { background: #edf4fb; }
.project-delete { border: 0; background: transparent; color: #9f1d1d; text-decoration: underline; padding: 0; }
.activity-maintenance span { color: #667789; font-size: 0.85rem; }

.numeric-entry {
    text-align: right;
}

.comments-entry {
    min-height: 110px;
    resize: vertical;
}

.field-meta {
    color: #667789;
    font-size: 0.78rem;
    font-weight: 650;
    text-align: right;
}

.field-meta.is-near-limit {
    color: #8a5a00;
}

.field-meta.is-at-limit {
    color: #9f1d1d;
}

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

@media (max-width: 640px) {
    .workspace-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-strip,
    .month-filter {
        grid-template-columns: 1fr;
    }

    .monthly-total-card strong {
        text-align: left;
    }

    .summary-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .login-panel {
        padding: 1.35rem;
    }
}
