/*
 * The employee view (M5, styled by M7-04) is phone-first and has no build step: one stylesheet,
 * served straight from `public/`, so a cached page needs nothing else to render (R23). It sits
 * on the shared palette in `tokens.css` — the same file the panel and the public page read — so
 * no colour of its own is stated here.
 */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px 16px 40px;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
}

.page {
    margin: 0 auto;
    max-width: 28rem;
}

/*
 * The one piece of chrome every employee screen carries: the mark and the name, so the phone
 * looks like the product the manager sent them the link for (M7-04).
 */
.app-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 18px;
    max-width: 28rem;
    color: var(--ink-faint);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: block;
    flex: 0 0 auto;
}

.head {
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--ink-faint);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.25;
}

h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.meta {
    margin: 6px 0 0;
    color: var(--ink-soft);
    font-size: 0.9375rem;
}

.card {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
}

.card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.9375rem;
}

.state {
    margin-bottom: 14px !important;
}

.state-on {
    color: var(--accent) !important;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    color: var(--ink-faint);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font-size: 1.25rem;
    letter-spacing: 0.4em;
    text-align: center;
}

input:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent-soft);
}

.button {
    display: block;
    width: 100%;
    padding: 15px;
    border: 0;
    border-radius: var(--radius-control);
    background: var(--button-bg);
    color: var(--button-ink);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.button-quiet {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
}

.error {
    margin: 0;
    color: var(--danger) !important;
    font-size: 0.875rem;
}

.hint,
.fineprint {
    margin: 0;
    color: var(--ink-faint);
    font-size: 0.8125rem;
}

.fineprint {
    margin: 0 0 16px;
    text-align: center;
}

.fineprint a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.fineprint a:hover {
    text-decoration: underline;
}

.flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--notice-line);
    border-radius: var(--radius-control);
    background: var(--notice-bg);
    color: var(--notice-ink);
    font-size: 0.875rem;
}

/* R21: the period's own shifts, one line per day. */
.card .period,
.card .hint {
    margin-bottom: 12px;
}

.period {
    color: var(--ink-soft);
    font-weight: 600;
}

/* R21: the current period and the two before it, as chips above the dates. */
.periods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.period-chip {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--ink-soft);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.period-chip.is-selected {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--surface);
}

.shifts {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.shift {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
}

.shift-date {
    flex: 0 0 5.75rem;
    color: var(--ink-faint);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.shift-what {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.shift-clock {
    color: var(--ink-soft);
    font-size: 0.875rem;
    white-space: nowrap;
}

.shift-hours {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* R22: the approved hours, bucket by bucket, with corrections kept apart. */
.hours {
    margin: 0;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
}

.hours-row dt {
    color: var(--ink-soft);
}

.hours-row dd {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.hours-total {
    border-bottom: 0;
}

.hours-total dt,
.hours-total dd {
    color: var(--ink);
    font-weight: 700;
}

.hours-sub {
    margin: 18px 0 4px;
    color: var(--ink-faint);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hours-why {
    display: block;
    color: var(--ink-faint);
    font-size: 0.8125rem;
    font-weight: 400;
}

/* M5-04 / R23: the notice the service worker adds to a page served from the phone. */
.offline-note {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--notice-line);
    border-radius: var(--radius-control);
    background: var(--notice-bg);
    color: var(--notice-ink);
    font-size: 0.875rem;
}

/* The home-screen card. It is hidden until a browser says it can install, or iOS is told. */
.install .hint {
    margin-bottom: 12px;
}

.install .hint strong {
    color: var(--ink);
}

a.button {
    text-align: center;
    text-decoration: none;
}

@media (min-width: 30rem) {
    body {
        padding-top: 48px;
    }
}
