.time-report-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.time-report-projects.card {
    margin-bottom: 0;
}

.time-report-projects-heading {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.time-report-projects-heading .card-title,
.time-report-projects-description,
.time-report-projects-empty {
    margin: 0;
}

.time-report-projects-description,
.time-report-projects-empty {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 400;
}

.time-report-projects-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

.time-report-project-create {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.time-report-project-create .form-input {
    flex: 1;
}

.time-report-project-create .time-report-project-rate-input {
    flex: 0 0 8.5rem;
}

.time-report-project-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.time-report-project-list:empty {
    display: none;
}

.time-report-project-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--menu-tint);
    border-radius: var(--border-radius);
    color: var(--text-tint);
}

.time-report-project-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.time-report-project-client {
    color: var(--gray-600);
    font-size: 0.8125rem;
}

.time-report-project-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.time-report-project-rate {
    font-variant-numeric: tabular-nums;
}

.time-report-project-delete,
.time-report-project-edit,
.time-report-remove-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border-radius: 25rem;
    background: transparent;
    color: var(--text-tint);
    cursor: pointer;
}

.time-report-project-delete svg,
.time-report-project-edit svg,
.time-report-remove-row svg {
    width: 1rem;
    height: 1rem;
}

.time-report-project-delete:hover,
.time-report-project-edit:hover,
.time-report-remove-row:hover {
    background: white;
}

.time-report-optional {
    font-weight: 400;
    opacity: 0.7;
}

.time-report-board {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#time-report-tab-finished {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

/* Selected weight lives on the label. The button weight stays put so the badge digit does not shift. */
.time-report-tab-label {
    display: inline-block;
    white-space: nowrap;
}

#time-report-tab-finished.active .time-report-tab-label {
    font-weight: 600;
}

.time-report-tab-label::after {
    content: attr(data-text);
    display: block;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.time-report-tab-badge {
    display: inline-block;
    flex: none;
    align-self: center;
    box-sizing: border-box;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--danger-700);
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.68rem;
    font-weight: 700;
    font-synthesis: none;
    font-variant-numeric: tabular-nums;
    line-height: 1.1rem;
    text-align: center;
}

.time-report-pending-hours {
    margin: 0;
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-tint);
    padding: 1rem;
}

.time-report-finished-card.card {
    margin-bottom: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.time-report-finished-card > .table-container {
    align-self: stretch;
}

.time-report-finished:not(.hidden) {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.time-report-finished .time-report-pending-hours {
    align-self: flex-start;
}

.time-report-finished > .card {
    align-self: stretch;
}

.time-report-finished-card .table tbody td {
    height: 1.25rem;
    vertical-align: middle;
}

.time-report-finished-check {
    width: 2.75rem;
}

.time-report-finished-week-name {
    cursor: pointer;
}

.time-report-finished-invoices {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.time-report-finished-invoices a.is-appearing {
    animation: time-report-link-in 0.45s ease;
}

@keyframes time-report-link-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.time-report-finished-empty {
    margin: 0;
    padding: 1rem;
    color: var(--gray-600);
}

.time-report-week-card.card {
    position: relative;
    margin-bottom: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: visible;
}

.time-report-week-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.time-report-week-nav {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.time-report-week-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--text-tint);
    cursor: pointer;
}

.time-report-week-step:hover {
    background: var(--menu-tint);
}

.time-report-week-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 14.5em;
    white-space: nowrap;
    border: none;
    background: transparent;
    padding: 0.25rem 0.6rem;
    border-radius: var(--border-radius);
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--text-tint);
    cursor: pointer;
}

.time-report-week-label:hover,
.time-report-week-label[aria-expanded="true"] {
    background: var(--menu-tint);
}

.time-report-week-picker {
    position: fixed;
    z-index: 80;
    top: 0;
    left: 0;
    width: 20rem;
    display: grid;
    grid-template-rows: 0fr;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-report-week-picker.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
}

.time-report-week-picker-clip {
    overflow: hidden;
    min-height: 0;
}

.time-report-week-picker-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--text-tint);
    border-radius: var(--border-radius-lg);
}

.time-report-picker-monthbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.time-report-picker-month {
    font-family: 'Instrument Serif', serif;
    font-size: 1.25rem;
    line-height: 1.1;
    color: var(--text-tint);
}

.time-report-picker-weekdays,
.time-report-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.15rem;
}

.time-report-picker-weekday {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.time-report-picker-day {
    height: 2rem;
    border: none;
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--text-tint);
    cursor: pointer;
}

.time-report-picker-day.is-outside {
    color: var(--gray-400);
}

.time-report-picker-day.is-selected {
    background: var(--menu-tint);
    color: var(--text-tint);
}

.time-report-picker-day.is-today {
    outline: 1px solid var(--text-tint);
}

.time-report-picker-day:hover {
    background: var(--button-tint);
}

.time-report-weeks {
    display: grid;
    align-items: start;
    overflow: hidden;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-report-week {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-report-week:not(.is-leaving) {
    z-index: 1;
}

.time-report-week.is-from-next {
    transform: translateX(100%);
}

.time-report-week.is-from-prev {
    transform: translateX(-100%);
}

.time-report-week.is-leaving {
    pointer-events: none;
}

.time-report-week.is-to-prev {
    transform: translateX(-100%);
}

.time-report-week.is-to-next {
    transform: translateX(100%);
}

.time-report-sheet {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.time-report-day-name,
.time-report-day-number {
    margin: 0;
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    color: var(--text-tint);
}

.time-report-week-invoiced {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--text-tint);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-report-week-invoiced.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.time-report-week-invoiced .time-report-week-bill-label {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.time-report-week-invoiced .icon-boolean {
    width: 1.1em;
    height: 1.1em;
}

.time-report-week-bill {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.time-report-week-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.9rem;
    padding-right: 12rem;
}

.time-report-week-bill-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.time-report-week-bill-amount {
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-tint);
}

.time-report-grid {
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) repeat(7, minmax(4.5rem, 1fr)) minmax(4.5rem, 5.5rem) 2rem;
    gap: 0.5rem;
    align-items: stretch;
    min-width: 52rem;
}

.time-report-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.45rem 0.25rem;
    background: white;
    border: 1px solid var(--menu-tint);
    border-radius: var(--border-radius);
}

.time-report-day-name {
    font-size: 1rem;
    line-height: 1.1;
}

.time-report-day-number {
    font-size: 0.95rem;
    line-height: 1.1;
}

.time-report-day.is-weekend {
    background: var(--menu-tint);
}

.time-report-hours-field {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
    position: relative;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    background: var(--gray-50);
    padding-right: 0.35rem;
    transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-report-hours-field::after {
    content: '';
    position: absolute;
    inset: -1px;
    border: 1px dashed var(--gray-400);
    border-radius: var(--border-radius-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-report-hours-field.is-disabled::after {
    opacity: 1;
}

.time-report-hours-field.is-weekend {
    background: var(--menu-tint);
}

.time-report-hours-field.is-disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.time-report-project.is-disabled,
.time-report-total.is-disabled {
    background: var(--gray-300);
    border-style: dashed;
    border-color: var(--gray-400);
    cursor: not-allowed;
}

.time-report-hours-field.is-disabled .time-report-hours,
.time-report-hours-field.is-disabled .time-report-hours-unit,
.time-report-project.is-disabled,
.time-report-total.is-disabled {
    color: var(--gray-500);
    cursor: not-allowed;
}

.time-report-hours-field:focus-within {
    border-color: var(--text-tint);
    background: white;
}

.time-report-hours-field.is-disabled:focus-within,
.time-report-project.is-disabled:hover,
.time-report-project.is-disabled:focus {
    border-color: var(--gray-400);
    background: var(--gray-300);
}

.time-report-hours-field .time-report-hours {
    width: auto;
    border: none;
    outline: none;
    background: transparent;
    min-width: 0;
    flex: 1;
    padding-right: 0.15rem;
}

.time-report-hours-unit {
    flex-shrink: 0;
    color: var(--gray-600);
    font-size: 0.75rem;
    transition: color 0.35s ease-in-out;
}

.time-report-project {
    border: 1px solid var(--gray-300);
    outline: none;
}

.time-report-hours.form-input:focus,
.time-report-project.form-select:focus {
    outline: none;
    border-color: var(--text-tint);
}

.time-report-hours {
    text-align: center;
    -moz-appearance: textfield;
    transition: color 0.35s ease-in-out;
}

.time-report-hours::-webkit-outer-spin-button,
.time-report-hours::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.time-report-hours:disabled {
    opacity: 1;
    color: var(--gray-500);
    cursor: not-allowed;
}

.time-report-project:disabled {
    cursor: not-allowed;
}

.time-report-total {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    background: var(--gray-50);
    color: var(--text-tint);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.time-report-rows {
    display: flex;
    flex-direction: column;
}

.time-report-row-clip {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-report-row-clip.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
}

.time-report-row {
    overflow: hidden;
    min-height: 0;
    padding: 1px 0;
    margin: -1px 0;
}

.time-report-row .time-report-grid {
    padding-top: 0.5rem;
}

.time-report-rate-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    background: var(--gray-50);
    padding-right: 0.6rem;
}

.time-report-rate-field:focus-within {
    border-color: var(--text-tint);
    background: white;
}

.time-report-rate-field .form-input,
.time-report-rate-field .form-input:focus {
    border: none;
    outline: none;
    background: transparent;
    min-width: 0;
    flex: 1;
}

.time-report-rate-currency {
    flex-shrink: 0;
    color: var(--gray-600);
}

.modal-content.time-report-customer-modal {
    width: min(32rem, 95vw);
}

.time-report-customer-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.time-report-customer-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.time-report-customer-scroller {
    max-height: min(28rem, 60vh);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 0.5rem;
    scroll-behavior: smooth;
}

.time-report-customer-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.time-report-customer-letter {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.time-report-customer-letter-items {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.time-report-customer-letter-items:empty {
    display: none;
}

.time-report-customer-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: white;
    color: var(--text-tint);
    text-align: left;
    cursor: pointer;
}

.time-report-customer-option:hover {
    border-color: var(--text-tint);
}

.time-report-customer-name {
    font-weight: 600;
}

.time-report-customer-address {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.time-report-day-summary-label {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.time-report-day-total {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--menu-tint);
    border-radius: var(--border-radius);
    background: white;
    color: var(--text-tint);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding: 0.45rem 0.25rem;
}

.time-report-day-total.is-weekend {
    background: var(--menu-tint);
}

.time-report-add-row svg {
    width: 1.25rem;
    height: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
    .time-report-row-clip,
    .time-report-week-picker,
    .time-report-week,
    .time-report-weeks,
    .time-report-week-invoiced,
    .time-report-hours-field,
    .time-report-hours-field::after,
    .time-report-hours,
    .time-report-hours-unit,
    .time-report-finished-invoices a.is-appearing {
        transition: none;
        animation: none;
    }

    .time-report-customer-scroller {
        scroll-behavior: auto;
    }
}
