/* DESSWO employee time clock (phone-first) */

:root {
    --accent: #2E67B1;
    --accent-dark: #25548f;
    --ink: #1d232b;
    --ink-2: #4b5560;
    --ink-3: #78828d;
    --line: #e3e6ea;
    --bg: #f5f6f7;
    --ok: #1a7f4b;
    --danger: #b42318;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

h1 { margin: 0; font-size: 1.35rem; font-weight: 600; }
p { margin: 0; }

.wordmark {
    font-family: 'League Spartan', var(--font);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent);
    font-size: 1.4rem;
}

.clock {
    max-width: 440px;
    margin: 0 auto;
    padding: calc(1.25rem + env(safe-area-inset-top)) 1rem calc(2rem + env(safe-area-inset-bottom));
}

.clock-head {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0 0.25rem 1rem;
}
.clock-head-sub { color: var(--ink-3); font-size: 0.9rem; }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.panel h1 { margin-bottom: 0.6rem; }
.lead { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 1rem; }

.who { font-size: 1.35rem; font-weight: 600; }
.state { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-2); margin: 0.25rem 0 1.25rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #b8bfc7; flex: none; }
.dot-on { background: var(--ok); }

label { display: block; margin: 0.9rem 0 0.3rem; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 0.8rem 0.9rem;
    font: inherit;
    font-size: 1.1rem; /* 16px+ stops iOS zooming on focus */
    color: var(--ink);
    background: #fff;
    border: 1px solid #c5ccd3;
    border-radius: 8px;
    color-scheme: light;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 103, 177, 0.18); }

button.big {
    display: block;
    width: 100%;
    margin-top: 1.25rem;
    padding: 1.15rem 1rem;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
button.big:active { background: var(--accent-dark); }
button.big small { display: block; margin-top: 0.15rem; font-size: 0.85rem; font-weight: 400; opacity: 0.85; }
.state + form button.big { margin-top: 0; }
button.big-out { background: #2b3440; }
button.big-out:active { background: #1d232b; }

.notice { padding: 0.8rem 1rem; margin-bottom: 1rem; border-radius: 8px; font-size: 0.95rem; border: 1px solid; background: #fff; }
.notice-error { color: #7a1c13; border-color: #efcdc8; background: #fdf5f4; }
.notice-ok { color: #14532d; border-color: #bfe0cc; background: #f3faf6; }
.panel .notice { margin-top: 0; }

.result {
    text-align: center;
    padding: 1.75rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    color: #fff;
}
.result-in  { background: var(--ok); }
.result-out { background: #2b3440; }
.result-mark {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    line-height: 52px;
    font-size: 1.7rem;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
}
.result-time { font-size: 2.2rem; font-weight: 600; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.result-meta { margin-top: 0.25rem; font-size: 0.95rem; opacity: 0.9; }

.week { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 0.75rem; }
.week span { color: var(--ink-2); }
.week strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

.shifts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.shifts li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.shifts li:last-child { border-bottom: 0; padding-bottom: 0; }
.shift-times { color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }

.signout { text-align: center; margin-top: 0.5rem; }
button.link {
    padding: 0.5rem;
    font: inherit;
    font-size: 0.9rem;
    color: var(--ink-3);
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

/* ── My hours ────────────────────────────────────────────── */
.periods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.periods a {
    padding: 0.5rem 0.25rem;
    text-align: center;
    white-space: nowrap;
    font-size: 0.85rem;
    color: var(--ink-2);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
}
.periods a.on { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.period-range { color: var(--ink-3); font-size: 0.9rem; margin-bottom: 0.75rem; }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.total-value { font-size: 1.6rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.total-label { color: var(--ink-3); font-size: 0.85rem; }
.fine-print { color: var(--ink-3); font-size: 0.8rem; margin-top: 0.75rem; }
.shift-hours { font-variant-numeric: tabular-nums; align-self: center; text-align: right; }
.ot-note { display: block; font-size: 0.75rem; font-weight: 400; color: var(--ink-3); }
.more-link { display: block; margin-top: 0.85rem; text-align: center; font-size: 0.95rem; color: var(--accent); }
@media (max-width: 370px) { .periods { grid-template-columns: repeat(2, 1fr); } }
