/* LXB Time Clock: employee app. Look and feel come from the approved mock-up. */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/figtree-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-latin.woff2) format('woff2');
}

:root {
  --paper: #eef1ef;
  --card: #ffffff;
  --ink: #16211c;
  --soft: #5c6b64;
  --faint: #6f7c76;
  --line: #d8dfdb;
  --go: #0e6b4a;
  --go-deep: #0a4f37;
  --go-tint: #e3f0ea;
  --amber: #9a6410;
  --amber-tint: #fbf1dd;
  --stop: #8e2f22;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.6; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.scr.on :focus-visible { outline-color: #fff; }
.veil :focus-visible { outline-color: var(--ink); }

.noscript { padding: 24px; text-align: center; }

/* ------------------------------------------------------------ frame -- */
/* On a phone the app fills the screen. On a wide screen it is a phone-width
   column in the middle of a calm background. */
.scr {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  transition: background 0.6s ease, color 0.6s ease;
}
.scr.on { background: var(--go); color: #fff; }
@media (min-width: 600px) {
  body { padding: 24px 16px; background: #e3e8e5; }
  html { background: #e3e8e5; }
  .scr {
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    border-radius: 32px;
    box-shadow: 0 22px 50px rgba(16, 30, 25, 0.18);
  }
}

.view { flex: 1; display: flex; flex-direction: column; }

/* ---------------------------------------------------- shared controls -- */
.mark { width: 64px; height: 64px; border-radius: 20px; background: var(--go); display: grid; place-items: center; }
.mark svg { width: 36px; height: 36px; }
.sub { font-size: 16px; color: var(--soft); }
.btn-main, .btn-quiet, .btn-stop {
  min-height: 60px; padding: 0 24px; border-radius: 18px; border: 0;
  font: 700 17px var(--body);
}
.btn-main { background: var(--go); color: #fff; }
.btn-quiet { background: transparent; border: 2px solid var(--line); color: var(--ink); }
.btn-stop { background: var(--stop); color: #fff; }
.form-err, .msg { color: var(--stop); font-weight: 600; font-size: 15px; }

/* ------------------------------------------------------ wait / loading -- */
.wait { align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; color: var(--soft); font-size: 17px; }

/* ---------------------------------------------------------- PIN sign in -- */
.pin, .setup {
  align-items: center; justify-content: center; text-align: center;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom, 0px));
}
.pin h1, .setup h1 { font-family: var(--display); font-size: 24px; margin-top: 14px; }
.pin .sub { margin-top: 14px; }
.dots { display: flex; gap: 16px; margin: 16px 0 6px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--soft); }
.dots i.f { background: var(--ink); border-color: var(--ink); }
.dots.shake { animation: shake 0.4s; }
@keyframes shake {
  20% { transform: translateX(-10px); } 40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}
.msg { min-height: 24px; margin-bottom: 12px; max-width: 320px; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 340px; }
.key {
  height: 64px; border: 0; border-radius: 18px; background: var(--card); color: var(--ink);
  font: 500 26px var(--body); box-shadow: 0 1px 0 var(--line);
  transition: transform 0.1s, background 0.1s;
}
.key:active:not(:disabled) { background: var(--go-tint); transform: scale(0.96); }
.key.x { background: none; box-shadow: none; font-size: 15px; color: var(--soft); }

/* -------------------------------------------------------------- set up -- */
.setup-form { width: 100%; max-width: 340px; margin-top: 18px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.setup-form .sub { text-align: center; }
.setup > .btn-main { margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.field input, .note {
  height: 60px; border: 2px solid var(--line); border-radius: 16px; padding: 0 16px;
  font: 500 18px var(--body); color: var(--ink); background: var(--card); width: 100%;
}
.field input:focus, .note:focus, .fld input:focus { outline: 3px solid var(--go-tint); border-color: var(--go); }
.setup-form .btn-main { margin-top: 4px; }

/* ------------------------------------------------------------ the clock -- */
.hello { padding: 18px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hello small { display: block; font-size: 15px; opacity: 0.85; }
.hello strong { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.2; }
.hello-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.chip { font-size: 13px; font-weight: 600; padding: 3px 12px; border-radius: 999px; background: rgba(22, 33, 28, 0.08); white-space: nowrap; }
.scr.on .chip { background: rgba(255, 255, 255, 0.2); }
.link-btn { background: none; border: 0; color: inherit; font: 600 14px var(--body); text-decoration: underline; min-height: 44px; padding: 0 4px; opacity: 0.9; }

.signout { margin: 8px 24px 0; padding: 14px; border-radius: 18px; background: var(--card); color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.signout p { flex: 1 1 100%; font-weight: 600; }
.signout button { flex: 1; }

.dial { margin: 22px auto 0; width: 232px; height: 232px; border-radius: 50%; position: relative; display: grid; place-items: center; flex: none; }
.dial::before, .dial::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--line); transition: border-color 0.6s; }
.scr.on .dial::before { border-color: rgba(255, 255, 255, 0.5); }
.scr.on .dial::after { border-color: rgba(255, 255, 255, 0.35); animation: breathe 2.8s ease-out infinite; }
@keyframes breathe { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.22); opacity: 0; } }
.dial > div { text-align: center; }
.dial .t { font-size: 48px; font-weight: 300; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; line-height: 1; }
.dial .l { font-size: 15px; opacity: 0.88; margin-top: 10px; max-width: 170px; }

.go-btn {
  margin: 26px 24px 0; height: 68px; border: 0; border-radius: 20px; background: var(--go); color: #fff;
  font: 700 21px var(--body); flex: none; position: relative; overflow: hidden;
  transition: transform 0.12s, background 0.5s, color 0.5s, box-shadow 0.3s;
  box-shadow: 0 8px 18px rgba(14, 107, 74, 0.28);
}
.go-btn:active:not(:disabled) { transform: scale(0.97); }
.scr.on .go-btn { background: #fff; color: var(--go-deep); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); }
.go-btn .rip {
  position: absolute; border-radius: 50%; background: currentColor; opacity: 0.25; width: 20px; height: 20px;
  left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); animation: rip 0.6s ease-out forwards;
}
@keyframes rip { to { transform: translate(-50%, -50%) scale(18); opacity: 0; } }

.break-btn {
  margin: 12px 24px 0; height: 60px; border-radius: 18px; background: transparent; flex: none;
  border: 2px solid currentColor; color: var(--go-deep); font: 600 17px var(--body);
}
.scr.on .break-btn { color: #fff; }

.install { margin: 18px 24px 0; padding: 12px 8px 12px 16px; border-radius: 18px; background: var(--card); color: var(--ink); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.install-text { flex: 1; font-size: 14px; line-height: 1.35; }
.install-text strong { display: block; font-size: 15px; }
.install-text small { display: block; font-size: 13.5px; color: var(--soft); margin-top: 2px; }
.install-act { min-height: 48px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--go); color: #fff; font: 700 15px var(--body); }
.install-x { width: 48px; height: 48px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--soft); }
.ios-share {
  display: inline-block; width: 16px; height: 18px; vertical-align: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18' fill='none' stroke='%230e6b4a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 11V1.5M4.5 4.5 8 1l3.5 3.5M3 7.5H2.5v9h11v-9H13'/%3E%3C/svg%3E") center / contain no-repeat;
}

.spacer { flex: 1 0 24px; }
.day { background: var(--card); color: var(--ink); border-radius: 24px 24px 0 0; padding: 18px 24px calc(20px + env(safe-area-inset-bottom, 0px)); }
.day h2 { margin: 0 0 6px; font: 600 12.5px var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; font-size: 16px; border-bottom: 1px solid var(--line); animation: rise 0.35s ease-out; }
@keyframes rise { from { opacity: 0.2; transform: translateY(6px); } }
.row .w { color: var(--soft); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.row .d { font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; flex: none; }
.row.brk .w, .row.brk .d { color: var(--faint); font-weight: 500; }
.tag { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 9px; background: #e9eeeb; color: var(--soft); }
.tag-a { background: var(--amber-tint); color: var(--amber); }
.pen { width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--go-deep); display: grid; place-items: center; }
.pen svg { width: 28px; height: 28px; padding: 7px; border-radius: 8px; background: var(--go-tint); }
.none { font-size: 16px; color: var(--soft); padding: 10px 0; border-bottom: 1px solid var(--line); }
.wk { display: flex; justify-content: space-between; padding-top: 12px; font-weight: 700; font-size: 16px; }

/* ------------------------------------------------------------ toast -- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  transform: translate(-50%, 10px); max-width: min(92vw, 420px); text-align: center;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 500;
  opacity: 0; transition: 0.25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------- fix-time sheet -- */
.veil {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15, 21, 18, 0.45); animation: fade 0.2s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: var(--card); color: var(--ink); width: 100%; max-width: 460px; border-radius: 24px 24px 0 0;
  padding: 12px 24px calc(20px + env(safe-area-inset-bottom, 0px)); animation: slide 0.28s ease-out;
  max-height: 100dvh; overflow-y: auto;
}
@keyframes slide { from { transform: translateY(100%); } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { font-family: var(--display); font-size: 22px; margin: 0 0 14px; }
.fld {
  display: flex; justify-content: space-between; align-items: center; min-height: 60px;
  border: 2px solid var(--line); border-radius: 16px; padding: 6px 16px; margin-bottom: 10px; font-size: 16px;
}
.fld > span { color: var(--soft); }
.fld input { font: 600 18px var(--body); font-variant-numeric: tabular-nums; border: 2px solid transparent; border-radius: 10px; padding: 8px; background: transparent; color: var(--ink); min-width: 120px; text-align: right; }
.fld.still b { font-weight: 500; color: var(--soft); font-size: 16px; }
.note { margin-bottom: 12px; font-size: 17px; }
.sheet .form-err { margin-bottom: 12px; }
.save { width: 100%; min-height: 60px; border: 0; border-radius: 18px; background: var(--go); color: #fff; font: 700 18px var(--body); }
.fine { font-size: 13.5px; color: var(--soft); text-align: center; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
