/* Minimal extra styling (Bootstrap is loaded via CDN) */

code { font-size: .875em; }

.contents { display: contents; }

.card { border-radius: 1rem; }

.table > :not(caption) > * > * { vertical-align: middle; }

.time-date-hero {
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 55%, #ffffff 100%);
    border: 1px solid #d9e7fb;
}

.time-date-hero__eyebrow {
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #5f6f86;
    margin-bottom: .35rem;
}

.time-date-hero__date {
    font-size: 1.1rem;
    color: #4f5d73;
}

.time-date-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.time-progress-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid #dfe7f3;
    border-radius: 1rem;
    background: #fff;
}

.time-progress-track {
    height: .7rem;
    border-radius: 999px;
    background: #e8eef6;
    overflow: hidden;
}

.time-progress-fill {
    height: 100%;
    border-radius: inherit;
}

.time-progress-fill.is-presence {
    background: linear-gradient(90deg, #58a6ff 0%, #2f74ff 100%);
}

.time-progress-fill.is-booked {
    background: linear-gradient(90deg, #46b97a 0%, #1d8f5a 100%);
}

.time-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-size: .85rem;
    color: #5f6f86;
}

.time-focus-card {
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #fff9ef 0%, #fff 100%);
    border: 1px solid #f1ddba;
}

.time-summary-table {
    height: 100%;
    border: 1px solid #dfe7f3;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
    overflow: hidden;
}

.time-summary-table__row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e7edf7;
}

.time-summary-table__row:last-child {
    border-bottom: 0;
}

.time-summary-table__label {
    font-size: .9rem;
    color: #5f6f86;
}

.time-summary-table__value {
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
    color: #213047;
}

.time-visual-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.time-project-column {
    display: flex;
    flex-direction: column;
}

.time-project-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.time-project-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid #dfe7f3;
    border-radius: 1rem;
    background: #fff;
}

.time-presence-total-row td {
    border-top: 3px solid #213047 !important;
    font-weight: 700;
    background: #f8fbff;
}

.time-presence-row-active td {
    background: linear-gradient(90deg, #eefaf3 0%, #f8fffb 100%);
    font-weight: 600;
}

.time-presence-row-active td:first-child {
    box-shadow: inset 4px 0 0 #198754;
}

@media (max-width: 767.98px) {
    .time-summary-table__row {
        grid-template-columns: 1fr;
        gap: .35rem;
    }

    .time-summary-table__value {
        text-align: left;
    }

    .time-project-list__item {
        align-items: flex-start;
        flex-direction: column;
    }
}

.time-entry-table th {
    white-space: nowrap;
    font-size: .85rem;
}

.time-entry-table td {
    vertical-align: top;
}

.time-entry-table .form-control,
.time-entry-table .form-select {
    min-width: 0;
}

.time-entry-layout {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(24rem, 1fr);
    gap: 1.25rem;
}

.time-entry-panel {
    border: 1px solid #dfe7f3;
    border-radius: 1rem;
    padding: 1.25rem;
    background: #fff;
}

.time-entry-panel--accent {
    background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
    border-color: #ecd9b8;
}

.time-entry-empty {
    border: 1px dashed #d3dbe7;
    border-radius: .9rem;
    padding: 1rem;
    background: #fafcff;
}

.time-entry-draft-list {
    display: grid;
    gap: .9rem;
}

.time-entry-draft-row {
    border: 1px solid #e2e8f2;
    border-radius: .9rem;
    padding: .9rem;
    background: #f9fbfe;
}

.time-entry-draft-row__grid {
    display: grid;
    grid-template-columns: minmax(8rem, 10rem) minmax(16rem, 1fr) auto;
    gap: .85rem;
    align-items: end;
}

.time-entry-draft-row__actions {
    display: flex;
    gap: .5rem;
    align-items: end;
}

.time-import-day {
    border: 1px solid #d8e1ec;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
}

.time-import-day.is-ready {
    border-color: #73c69d;
    background: linear-gradient(135deg, #f2fbf5 0%, #ffffff 100%);
}

.time-import-day.is-open {
    border-color: #e7c36a;
    background: linear-gradient(135deg, #fff9e9 0%, #ffffff 100%);
}

.time-import-day.is-imported {
    border-color: #8ab7ff;
    background: linear-gradient(135deg, #eef5ff 0%, #ffffff 100%);
}

.time-import-row.is-open {
    background: #fffaf0;
}

.time-import-cell.is-ready {
    background: #edf9f0;
}

.time-import-cell.is-open {
    background: #fff1d6;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .time-entry-layout {
        grid-template-columns: 1fr;
    }

    .time-entry-draft-row__grid {
        grid-template-columns: 1fr;
    }

    .time-entry-draft-row__actions {
        justify-content: flex-start;
    }
}

.time-entry-hero {
    border: 1px solid #dce5f2;
    border-radius: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
}

.time-entry-progress {
    border: 1px solid #dfe7f3;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, #fffef8 0%, #ffffff 100%);
}

.time-entry-progress__header,
.time-entry-progress__footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.time-entry-progress__track {
    margin: .85rem 0 .65rem;
    height: .8rem;
    border-radius: 999px;
    background: #edf2f9;
    overflow: hidden;
}

.time-entry-progress__value {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f6fed 0%, #79a7ff 100%);
}

.time-entry-tabs .nav-link {
    border-radius: .85rem .85rem 0 0;
    font-weight: 600;
}

.time-entry-tabs .nav-link.active {
    background: #fff;
    border-color: #dfe7f3 #dfe7f3 #fff;
}

.time-entry-selection-grid {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(18rem, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.time-entry-inline-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.time-entry-inline-fields--compact {
    gap: .75rem;
}

.time-entry-inline-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.time-entry-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: .75rem;
}

.time-entry-choice-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .45rem;
    min-height: 5.75rem;
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid #dbe4f1;
    border-radius: .9rem;
    background: #fbfcff;
    color: inherit;
    text-decoration: none;
    white-space: normal;
    word-break: break-word;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.time-entry-choice-card:hover {
    border-color: #90afea;
    box-shadow: 0 .35rem .9rem rgba(32, 67, 128, .08);
    transform: translateY(-1px);
}

.time-entry-choice-card__meta {
    font-size: .8rem;
    color: #5f6f86;
}

.time-entry-section-divider {
    margin: 1.25rem 0;
    border-top: 1px solid #e5ebf4;
}

.time-entry-today-list {
    display: grid;
    gap: .75rem;
}

.time-entry-today-item {
    display: grid;
    grid-template-columns: minmax(4.5rem, 5.5rem) minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: .95rem 1rem;
    border: 1px solid #e2e8f2;
    border-radius: .9rem;
    background: #fbfcff;
}

.time-entry-today-item.is-active {
    border-color: #8eb2ff;
    background: linear-gradient(180deg, #f3f7ff 0%, #ffffff 100%);
}

.time-entry-today-item__time,
.time-entry-today-item__meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .9rem;
}

.time-entry-today-item__time span,
.time-entry-today-item__meta span {
    color: #5f6f86;
    font-size: .8rem;
}

.time-entry-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(8rem, 1fr));
    gap: .9rem;
    align-items: end;
}

.time-entry-form-grid__wide {
    grid-column: span 2;
}

.time-entry-form-grid__actions {
    display: flex;
    gap: .75rem;
    align-items: end;
}

@media (max-width: 991.98px) {
    .time-entry-selection-grid {
        grid-template-columns: 1fr;
    }

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

    .time-entry-form-grid__wide {
        grid-column: auto;
    }

    .time-entry-progress__header,
    .time-entry-progress__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .time-entry-today-item {
        grid-template-columns: 1fr;
    }
}
