.content-main { text-align: left; }

/* Format toggle */
.format-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #aaa;
}

/* Grid: Start | End | Break | Duration | Del */
.entry-grid { display: grid; grid-template-columns: 1fr 1fr 4.5rem 4.5rem 1.8rem; gap: 0.4rem; align-items: center; }

.entries-header {
    margin-bottom: 0.5rem;
}
.entries-header span,
.time-cell[data-role]::before,
.break-wrap::before,
.entry-dur::before {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
    display: block;
    padding-bottom: 0.4rem;
}
.entries-header span.center { text-align: center; }

.entry-row { margin-bottom: 0.5rem; }

.entry-row input {
    width: 100%;
    padding: 0.55rem 0.6rem;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.entry-row input:focus { border-color: #999; }
.entry-row input.error { border-color: #ffb39a; }
.entry-row input.break-inp { text-align: center; }

.entry-dur {
    font-size: 0.78rem;
    color: #888;
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1.2;
    min-height: 1.2em;
}
.entry-dur.negative { color: #cf1322; }

.del-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0.3rem;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
    text-align: center;
    width: 100%;
}
.del-btn:hover { color: #888; background: #f0f0ee; }
.del-btn:disabled { opacity: 0.3; cursor: default; }

.add-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1.5px dashed #e0e0e0;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: #bbb;
    cursor: pointer;
    width: 100%;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.15s, color 0.15s;
}
.add-btn:hover { border-color: #bbb; color: #555; }

/* Results */
.result-card {
    background: #fff;
    border: 1.5px solid #eee;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 0.5rem;
}
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f5f5f3;
    font-size: 0.875rem;
}
.result-row:last-child { border-bottom: none; }
.result-label { color: #aaa; }
.result-val { color: #1a1a1a; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-val.total { font-size: 1.3rem; }

/* Rate field */
.rate-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0ee;
}
.rate-row label { font-size: 0.8rem; color: #aaa; white-space: nowrap; flex-shrink: 0; }
.rate-input {
    width: 8rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.15s;
}
.rate-input:focus { border-color: #999; }
.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.4rem 0 0;
    font-size: 0.875rem;
}
.pay-label { color: #aaa; }
.pay-val { font-size: 1.1rem; font-weight: 700; color: #1a1a1a; }

/* 12h time cell */
.time-cell { width: 100%; }
.tc-row { display: flex; gap: 0.3rem; margin-right: 0.5rem; }
.tc-row .tc-h,
.tc-row .tc-m { flex: 1; min-width: 0; text-align: center; padding-left: 0.3rem; padding-right: 0.3rem; -moz-appearance: textfield; }
.tc-row .tc-h::-webkit-outer-spin-button, .tc-row .tc-h::-webkit-inner-spin-button,
.tc-row .tc-m::-webkit-outer-spin-button, .tc-row .tc-m::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tc-ampm { flex: 1; min-width: 0; padding: 0.55rem 0.2rem; font-size: 0.875rem; font-family: inherit; border: 1.5px solid #e0e0e0; border-radius: 8px; background: #fff; color: #1a1a1a; outline: none; cursor: pointer; transition: border-color 0.15s; text-align: center; appearance: none; -webkit-appearance: none; }
.tc-ampm:focus { border-color: #999; }
.time-cell.error .tc-h, .time-cell.error .tc-m, .time-cell.error .tc-ampm { border-color: #ffb39a; }

@media (max-width: 480px) {
    .entries-header { display: none; }
    .entry-grid { grid-template-columns: 1fr 1fr 1.8rem; }

    .entry-row [data-role="start"] { grid-column: 1; grid-row: 1; }
    .entry-row [data-role="end"]   { grid-column: 2; grid-row: 1; }
    .entry-row .del-btn            { grid-column: 3; grid-row: 1; align-self: start; margin-top: 1.4rem; }
    .entry-row .break-wrap         { grid-column: 1; grid-row: 2; }
    .entry-row .entry-dur          { grid-column: 2 / span 2; grid-row: 2; display: flex; flex-direction: column; align-items: flex-end; line-height: normal; min-height: unset; }

    /* Inline labels via ::before */
    .time-cell[data-role="start"]::before { content: "Start"; }
    .time-cell[data-role="end"]::before   { content: "End"; }
    .break-wrap::before                    { content: "Break (min)"; }
    .entry-dur::before                     { content: "Duration"; }

    /* Divider between entries */
    .entry-row { border-bottom: 1px solid #f0f0ee; padding-bottom: 0.75rem; margin-bottom: 0.75rem; }

    /* 12h cell sizing */
    .tc-row { gap: 0.2rem; margin-right: 0.25rem; }
}
