.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Plain hamburger icon button, not a dropdown-select look: no chevron,
   menu opens right-aligned since this sits at the far right of the header. */
.hamburger-menu > summary {
    padding-inline: 0.75rem;
}
.hamburger-menu > summary::after {
    display: none;
}
.hamburger-menu > summary + ul {
    left: auto;
    right: 0;
}

.visually-hidden {
    display: none;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sort-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.sort-toggle select {
    width: auto;
    margin: 0;
}

.show-completed-link {
    white-space: nowrap;
}

.empty-state {
    opacity: 0.7;
    font-style: italic;
}

.tier-group h4 {
    margin-bottom: 0.5rem;
    opacity: 0.75;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.thing-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.thing-row.at-risk {
    border-left-color: #dc2626;
}

.thing-row.near-complete {
    border-left-color: #16a34a;
}

.thing-main {
    flex: 1;
    min-width: 0;
}

.thing-name-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    background: var(--pico-muted-border-color);
    white-space: nowrap;
}

.at-risk-badge {
    background: #fecaca;
    color: #7f1d1d;
}

.near-complete-badge {
    background: #bbf7d0;
    color: #14532d;
}

.thing-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.thing-progress.no-target {
    opacity: 0.8;
}

.progress-bar {
    width: 6rem;
    flex-shrink: 0;
    height: 0.6rem;
    background: var(--pico-muted-border-color);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--pico-primary);
}

.progress-label {
    font-size: 0.85rem;
    white-space: nowrap;
}

.running-elapsed-line {
    margin-bottom: 0.25rem;
}
.running-elapsed {
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    opacity: 0.8;
}

.thing-actions {
    flex-shrink: 0;
}
.thing-actions button {
    margin: 0;
    width: 5rem;
    white-space: nowrap;
}

.detail-summary {
    margin-bottom: 1rem;
}

.streak-stats {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.detail-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.entry-log {
    list-style: none;
    padding: 0;
}
.entry-log li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--pico-muted-border-color);
}
.entry-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.entry-row-editing {
    flex-wrap: wrap;
}
.entry-edit-fields {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.entry-edit-fields input {
    margin: 0;
}
.entry-row-actions {
    display: flex;
    gap: 0.75rem;
    white-space: nowrap;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
}

.hms-inputs {
    align-items: end;
}

