.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: Day | Clock In | Clock Out | Break | Hours | Del */
.entry-grid { display: grid; grid-template-columns: 3rem 1fr 1fr 4rem 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,
.day-num::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; }
.entries-header span.left { text-align: left; }

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

.day-num {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.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.82rem;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1.2;
    min-height: 1.2em;
    font-weight: 600;
}
.entry-dur.has-overtime { color: #c9512b; }

.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;
    justify-content: center;
    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; }

.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[hidden] { display: none; }
.result-row:last-of-type { 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; }
.result-val.muted { font-weight: 500; color: #666; }

/* Pay section */
.pay-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f0f0ee; }
.rate-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.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;
    font-variant-numeric: tabular-nums;
    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; }

.ot-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #555;
    margin-top: 0.5rem;
}
.ot-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #c9512b;
}
.ot-fields {
    display: none;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #f0f0ee;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.ot-fields.visible { display: flex; }
.ot-field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 9rem; }
.ot-field label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #aaa; }
.ot-field input {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.15s;
}
.ot-field input:focus { border-color: #999; }

.pay-breakdown {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0ee;
}
.pay-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.3rem 0; font-size: 0.85rem; }
.pay-row[hidden] { display: none; }
.pay-row.total-pay { padding-top: 0.6rem; margin-top: 0.3rem; border-top: 1px solid #f0f0ee; }
.pay-row .pay-label { color: #888; }
.pay-row .pay-val { font-variant-numeric: tabular-nums; color: #1a1a1a; font-weight: 600; }
.pay-row.total-pay .pay-val { font-size: 1.15rem; font-weight: 700; }

/* 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: 600px) {
    .entries-header { display: none; }
    .entry-grid { grid-template-columns: 1.7rem 1fr 1fr 1.8rem; }

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

    .day-num::before                       { content: ""; padding-bottom: 0; }
    .day-num::after                        { content: ""; }
    .time-cell[data-role="start"]::before { content: "Clock In"; }
    .time-cell[data-role="end"]::before   { content: "Clock Out"; }
    .break-wrap::before                    { content: "Break (min)"; }
    .entry-dur::before                     { content: "Hours"; }

    .entry-row { border-bottom: 1px solid #f0f0ee; padding-bottom: 0.75rem; margin-bottom: 0.75rem; }
    .tc-row { gap: 0.2rem; margin-right: 0.25rem; }
}
