/* Dawn Time Clock staff app. The header is a sky: night before clock-in, sunrise while working, dusk on break. */
:root {
  --ink: #171a35; --ink-2: #252a55;
  --mist: #f2f3f8; --paper: #ffffff; --line: #e2e4ee;
  --text: #1b1e33; --muted: #646a84;
  --sun: #f2a31b; --sun-deep: #b96f00; --sun-soft: #fff2d6;
  --leaf: #12875a; --leaf-soft: #dff3e9;
  --dusk: #b93a72; --dusk-soft: #fae5ee;
  --end: #b3261e; --end-soft: #fdeceb;
  --warn: #9a4a05; --warn-soft: #ffe9d6;
  --display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(23, 26, 53, .06), 0 10px 28px -14px rgba(23, 26, 53, .25);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--mist); color: var(--text); font: 16px/1.4 var(--body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.loading { padding-top: 34vh; text-align: center; color: var(--muted); }

/* Sky header */
.sky { color: #fff; padding: calc(14px + env(safe-area-inset-top)) 20px 44px; border-radius: 0 0 30px 30px; position: relative; overflow: hidden; }
.sky.out { background: radial-gradient(90% 60% at 50% 118%, rgba(242,163,27,.5), rgba(194,85,63,.22) 45%, transparent 72%), linear-gradient(#171a35, #262a58); }
.sky.in { background: radial-gradient(95% 70% at 50% 112%, #f7b53a 0%, rgba(240,128,60,.85) 34%, rgba(160,70,110,.55) 60%, transparent 84%), linear-gradient(#1c1f45, #3a2f68); }
.sky.break.soon .timer { color: #ffd76a; }
.sky.break.over { background: radial-gradient(95% 70% at 50% 112%, #e0533d 0%, rgba(185,40,40,.75) 40%, transparent 82%), linear-gradient(#2a1020, #4a1626); }
.sky.break { background: radial-gradient(95% 70% at 50% 112%, rgba(214,90,140,.9) 0%, rgba(140,60,130,.6) 42%, transparent 80%), linear-gradient(#171a35, #33265c); }
.skybar { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 15px; color: rgba(255,255,255,.85); }
.skybar button { color: rgba(255,255,255,.8); font-weight: 600; padding: 8px; margin: -8px; }
.sky .date { margin-top: 26px; color: rgba(255,255,255,.72); font-size: 15px; }
.sky h1 { font: 700 34px/1.05 var(--display); letter-spacing: -.025em; margin-top: 6px; max-width: 11em; }

.dial { position: relative; margin: 22px auto 22px; max-width: 340px; }
.arc { display: block; width: 100%; height: auto; overflow: visible; }
.arc path { fill: none; stroke-linecap: round; }
.arc .track { stroke: rgba(255,255,255,.28); stroke-width: 3; stroke-dasharray: .6 2.2; }
.arc .prog { stroke: #fff; stroke-width: 4; }
.arc .sunglow { fill: rgba(255, 214, 120, .35); }
.arc .sun { fill: #ffd76a; stroke: #fff; stroke-width: 3; }
.sky.break .arc .sun { fill: #f6c1d8; }
.dialtext { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; }
.state { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; background: rgba(23,26,53,.34); padding: 5px 13px; border-radius: 999px; }
.state i { width: 9px; height: 9px; border-radius: 50%; }
.timer { font: 800 58px/1 var(--display); letter-spacing: -.02em; margin-top: 10px; text-shadow: 0 2px 18px rgba(23,26,53,.35); }
.timer { font-variant-numeric: tabular-nums; }
.timer span { display: inline-block; width: .62em; text-align: center; }
.timer span.c { width: .26em; opacity: .75; }
.since { margin-top: 8px; color: rgba(255,255,255,.88); font-size: 15px; font-weight: 500; }

/* Content below the sky */
.content { padding: 0 16px calc(32px + env(safe-area-inset-bottom)); margin-top: -26px; position: relative; }
.card { background: var(--paper); border-radius: 20px; padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h2 { font: 700 18px var(--display); letter-spacing: -.01em; margin-bottom: 12px; }

.here { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 14px; width: 100%; text-align: left; background: var(--sun); color: var(--ink); border-radius: 22px; padding: 18px 18px 18px 20px; margin-bottom: 14px; box-shadow: 0 14px 30px -14px rgba(201,122,0,.8); }
.here:active { transform: scale(.985); }
.here .lbl { font-size: 14px; font-weight: 600; opacity: .8; }
.here .nm { font: 800 26px/1.1 var(--display); letter-spacing: -.02em; grid-column: 1; }
.here .go { grid-row: 1 / span 2; grid-column: 2; background: var(--ink); color: #fff; font-weight: 700; padding: 14px 18px; border-radius: 14px; white-space: nowrap; }

.search { display: block; width: 100%; min-height: 50px; margin-bottom: 6px; padding: 0 14px; font: inherit; border: 1.5px solid var(--line); border-radius: 14px; background: var(--mist); }
.jobs { display: grid; }
.job { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; min-height: 60px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 600; }
.jobs .job:last-child { border-bottom: 0; }
.job:active { background: var(--mist); }
.job .dot { width: 14px; height: 14px; border-radius: 5px; flex: none; }
.job .go { margin-left: auto; color: var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap; background: var(--mist); padding: 8px 12px; border-radius: 10px; }
.job small.near { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.job.current .go { background: var(--leaf-soft); color: var(--leaf); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { min-height: 58px; border-radius: 16px; font-weight: 700; font-size: 17px; padding: 0 16px; background: var(--paper); border: 1.5px solid var(--line); }
.btn:active { transform: scale(.985); }
.btn.wide { grid-column: 1 / -1; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.break { color: var(--dusk); border-color: #f0c4d8; background: var(--dusk-soft); }
.btn.back { background: var(--leaf); color: #fff; border-color: var(--leaf); min-height: 64px; font-size: 19px; }
.btn.end { color: var(--end); border-color: #f3c7c3; background: var(--end-soft); }
.btn.ghost { border-color: transparent; color: var(--muted); }

.gps { display: flex; align-items: center; gap: 12px; font-size: 14.5px; padding: 12px 16px; border-radius: 16px; margin-bottom: 14px; background: var(--paper); color: var(--text); box-shadow: var(--shadow); }
/* No looping animations anywhere in the staff app: they keep the phone's graphics chip busy and warm. */
.gps .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); flex: none; box-shadow: 0 0 0 4px rgba(18,135,90,.18); }
.gps.warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; box-shadow: none; }
.gps.warn .pulse { background: var(--warn); box-shadow: none; }
.gps.off { background: none; box-shadow: none; color: var(--muted); padding: 2px 6px; }
.gps.off .pulse { background: #b9bdd0; box-shadow: none; }
.gps span { flex: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.banner { background: var(--warn-soft); color: var(--warn); border-radius: 16px; padding: 12px 16px; font-size: 14.5px; font-weight: 600; margin-bottom: 14px; }

.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.card h2 + .row { border-top: 0; padding-top: 0; }
.row .t { font-variant-numeric: tabular-nums; font-weight: 600; }
.row small { display: block; color: var(--muted); font-size: 13.5px; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 2px; }
.total .t { font: 800 24px var(--display); font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); }

/* Sign in */
.loginwrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(transparent 44%, #171a35 44%), radial-gradient(80% 36% at 50% 44%, #ffd76a 0%, #f7b53a 9%, rgba(240,128,60,.75) 30%, rgba(160,70,110,.4) 58%, transparent 84%), linear-gradient(#171a35, #2f2c62 44%); }
.loginwrap .mark { padding: 0 24px 28px; color: #fff; }
.loginwrap .mark img { width: 60px; height: 60px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.loginwrap .mark h1 { font: 800 40px/1 var(--display); letter-spacing: -.03em; margin-top: 18px; }
.loginwrap .mark p { color: rgba(255,255,255,.8); margin-top: 8px; }
.login { background: var(--paper); border-radius: 28px 28px 0 0; padding: 26px 20px calc(28px + env(safe-area-inset-bottom)); }
.field { display: block; margin-top: 16px; font-weight: 600; font-size: 15px; }
.field:first-child { margin-top: 0; }
.field select, .field input, textarea { display: block; width: 100%; margin-top: 6px; min-height: 56px; padding: 0 14px; font: inherit; font-size: 18px; color: var(--text); background: var(--mist); border: 1.5px solid var(--line); border-radius: 14px; }
textarea { padding: 12px 14px; min-height: 84px; resize: vertical; font-size: 16px; }
.error { color: var(--end); font-weight: 600; margin: 10px 0; min-height: 22px; }
.hint { color: var(--muted); font-size: 14px; text-align: center; margin-top: 14px; }
.alarm h3 { color: var(--end); font-size: 28px; }
.alarm .sub { font-size: 16px; color: var(--text); }
.btn:disabled { opacity: .6; }

/* Bottom sheet */
.scrim { position: fixed; inset: 0; background: rgba(23,26,53,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet { background: var(--paper); width: 100%; max-width: 480px; border-radius: 28px 28px 0 0; padding: 24px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet h3 { font: 700 24px var(--display); letter-spacing: -.02em; margin-bottom: 4px; }
.sheet .sub { color: var(--muted); margin-bottom: 14px; }
.sheet .jobs, .sheet .actions { margin-top: 12px; }

#toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); background: #fff; color: var(--ink); padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(23,26,53,.3); white-space: nowrap; }
#toast.show { opacity: 1; }

.banner.bad { background: var(--end-soft); color: var(--end); border: 1.5px solid #f3c7c3; }
.note { color: var(--text); margin-bottom: 10px; }
.card .note + .actions { margin-top: 16px; }
.gps .mini { background: var(--ink); color: #fff; font-weight: 700; padding: 9px 14px; border-radius: 10px; white-space: nowrap; }
.actions .btn { font-size: 16px; }
a.btn.dl { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.job.eventin { background: var(--paper); border-radius: 20px; padding: 14px 18px; margin-bottom: 14px; box-shadow: var(--shadow); border-bottom: 0; }
.login .note { margin-bottom: 4px; }
.login .link { color: var(--muted); font-weight: 600; text-decoration: underline; }
.job.teambtn { background: var(--paper); border-radius: 20px; padding: 14px 18px; margin-bottom: 14px; box-shadow: var(--shadow); border-bottom: 0; }
/* My team (for managers) */
.team .sky { padding-bottom: 40px; }
.team .back { color: rgba(255,255,255,.85); font-weight: 600; padding: 8px; margin: -8px; }
.team .daynav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.team .daynav button { color: #fff; font-size: 26px; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.12); }
.team .daynav button:disabled { opacity: .3; }
.team .daynav b { font: 700 20px var(--display); }
.tm { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tm:last-child { border-bottom: 0; }
.tm .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 14px var(--display); }
.tm .nm { font-weight: 700; display: block; }
.tm .st { font-size: 14px; color: var(--muted); display: block; }
.tm .st.bad, .tl2 .bad { color: var(--end); font-weight: 700; }
.tm .hrs { font: 700 18px var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.tm .hrs small { display: block; font: 600 12px var(--body); color: var(--end); }
#team-map { height: 260px; border-radius: 16px; margin-bottom: 14px; background: #e8eaf1; }
.tl2 { position: relative; padding-left: 20px; }
.tl2::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl2 .ev { position: relative; margin-bottom: 14px; }
.tl2 .ev::before { content: ""; position: absolute; left: -20px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 3px var(--paper); }
.tl2 .ev.brk::before { background: var(--dusk); } .tl2 .ev.bad::before { background: var(--end); } .tl2 .ev.out::before { background: var(--ink); }
.tl2 .when { font: 700 15px var(--display); font-variant-numeric: tabular-nums; }
.tl2 .addr { color: var(--muted); font-size: 13.5px; }
.hint .office { color: var(--ink); font-weight: 700; }
