/* ==============================================================
   Greenjacket Attendance — design system inherited from
   greenjacket-site (lib/theme.ts, app/globals.css) and applied the
   same way greenjacket-pos does: identical tokens, fonts, surfaces,
   buttons and inputs, so this reads as a sibling app of the family.
   ============================================================== */

/* ---- Fonts ---- */
@font-face { font-family:"Hilogen"; src:url("fonts/Hilogen-Regular.otf") format("opentype"); font-weight:400; font-display:swap; }
@font-face { font-family:"Hilogen Sans"; src:url("fonts/Hilogen-Sans.otf") format("opentype"); font-weight:400 900; font-display:swap; }
@font-face { font-family:"HK Grotesk"; src:url("fonts/HKGrotesk-Regular.otf") format("opentype"); font-weight:400; font-display:swap; }
@font-face { font-family:"HK Grotesk"; src:url("fonts/HKGrotesk-Medium.otf") format("opentype"); font-weight:500; font-display:swap; }
@font-face { font-family:"HK Grotesk"; src:url("fonts/HKGrotesk-SemiBold.otf") format("opentype"); font-weight:600; font-display:swap; }
@font-face { font-family:"HK Grotesk"; src:url("fonts/HKGrotesk-Bold.otf") format("opentype"); font-weight:700; font-display:swap; }
@font-face { font-family:"HK Grotesk"; src:url("fonts/HKGrotesk-Black.otf") format("opentype"); font-weight:900; font-display:swap; }

:root {
  --reserve:#253c1d; --reserve-800:#1d3116; --reserve-900:#141f0e; --reserve-950:#0d1409;
  --fairway:#4e6342; --fairway-300:#8ba07c;
  --slate:#678096; --slate-600:#55708a;
  --linen:#ecead5; --linen-050:#faf9f2; --linen-100:#f3f1e5; --linen-300:#dcd9bf; --linen-400:#c3bfa2;
  /* Accent = brand Slate, kept under the --ember* names (matches booking app / POS). */
  --ember:#4e6c88; --ember-400:#a9c2d1; --ember-300:#cddee8;
  --danger:#e08563;

  --script:"Hilogen","Brush Script MT",cursive;
  --display:"Hilogen Sans","HK Grotesk",sans-serif;
  --sans:"HK Grotesk",ui-sans-serif,system-ui,sans-serif;

  --line:rgba(236,234,213,.16);
  --ease:cubic-bezier(.16,1,.3,1);
  --motion-instant:120ms;
  --motion-state:220ms;
}

*, *::before, *::after { box-sizing:border-box; }

/* Class display rules outrank the UA `[hidden]` style. */
[hidden] { display:none !important; }

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

body {
  margin:0;
  min-height:100vh;
  font-family:var(--sans);
  color:var(--linen);
  background:var(--fairway);
  background-image:
    radial-gradient(1400px 700px at 50% -200px, rgba(139,160,124,.30), transparent 70%),
    radial-gradient(1000px 650px at 100% 40%, rgba(20,31,14,.42), transparent 70%);
  background-attachment:fixed;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button { font:inherit; color:inherit; }
select { font:inherit; }
img { max-width:100%; }

:focus-visible { outline:2px solid var(--slate); outline-offset:2px; border-radius:4px; }

.shell {
  max-width:420px;
  margin:0 auto;
  padding:96px 20px 48px;
}

/* ==================== TOP BAR ==================== */
.topbar {
  position:fixed; inset:0 0 auto 0; z-index:40;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:16px 20px;
  background:linear-gradient(rgba(13,20,9,.85), rgba(13,20,9,0));
}
.topbar-mark { height:22px; display:block; }
.topbar-right { display:flex; align-items:center; gap:8px; }

/* Outlined, not filled — the Staff badge beside it is a label and may be
   the louder of the two; this is an exit most people using the kiosk
   should never need to take. */
.topbar-link {
  display:inline-flex; align-items:center;
  min-height:32px; padding:0 13px;
  border:1px solid rgba(236,234,213,.32); border-radius:999px;
  color:var(--linen); text-decoration:none;
  font-family:var(--sans); font-size:11px; font-weight:800;
  letter-spacing:.18em; text-transform:uppercase; line-height:1;
  transition:border-color var(--motion-state), background var(--motion-state);
}
.topbar-link:hover { border-color:rgba(236,234,213,.6); background:rgba(236,234,213,.08); }
.topbar-link:active { transform:scale(.97); }
.topbar-tag {
  font-size:11px; font-weight:800; letter-spacing:.18em; text-transform:uppercase; line-height:1.4;
  color:var(--linen-100); background:var(--ember); border-radius:999px; padding:4px 10px;
}

/* ==================== HERO ==================== */
.hero-eyebrow {
  margin:0 0 10px; font-size:12px; font-weight:700; letter-spacing:.24em; text-transform:uppercase;
  color:var(--ember-300);
  display:flex; align-items:center; gap:12px;
}
.hero-eyebrow::before { content:""; width:26px; height:2px; background:var(--ember); border-radius:2px; }
.hero-title { margin:0 0 8px; line-height:.9; letter-spacing:.01em; }
.hero-line-1 { font-family:var(--display); font-weight:900; font-size:clamp(34px, 9vw, 48px); color:var(--linen-100); }
.hero-line-2 {
  display:inline-block;
  font-family:var(--script); font-weight:400;
  font-size:clamp(30px, 7vw, 42px);
  color:var(--ember-400);
  transform:rotate(-2.5deg);
  padding:0 .1em .1em; margin-left:.1em;
}
.hero-lede { margin:0 0 24px; font-size:15px; color:rgba(236,234,213,.9); }

/* ==================== CARD ==================== */
.card {
  padding:22px 20px;
  border:1px solid var(--line); border-radius:22px;
  background:linear-gradient(180deg, rgba(37,60,29,.55), rgba(20,31,14,.55));
  display:flex; flex-direction:column; gap:18px;
  animation:rise .45s var(--ease) both;
}
.card + .card { margin-top:16px; }
.card h2 {
  margin:0; font-family:var(--display); font-weight:800; font-size:16px; letter-spacing:.02em;
  color:var(--linen-100);
}
@keyframes rise { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }

/* ==================== FIELD (matches the checkout .field) ==================== */
.field { display:grid; gap:8px; }
.field-label {
  font-size:12px; font-weight:800; letter-spacing:.14em; text-transform:uppercase;
  color:rgba(236,234,213,.95);
}

select {
  width:100%; min-height:52px; font-size:16px; color:var(--linen-100);
  border:1px solid var(--line); border-radius:13px;
  background:rgba(13,20,9,.4);
  padding:13px 34px 13px 15px;
  color-scheme:dark;
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ember-300) 50%),
    linear-gradient(135deg, var(--ember-300) 50%, transparent 50%);
  background-position:calc(100% - 20px) 23px, calc(100% - 15px) 23px;
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
  transition:border-color .2s, box-shadow .2s;
}
select:focus {
  outline:none; border-color:var(--slate); box-shadow:0 0 0 3px rgba(103,128,150,.3);
}
select option { background:var(--reserve-900); color:var(--linen); }

.action-toggle { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.toggle-btn {
  min-height:52px;
  border:1px solid var(--line); border-radius:13px;
  background:transparent; color:var(--linen);
  font-family:var(--sans); font-weight:700; font-size:15px;
  cursor:pointer;
  transition:background var(--motion-state), border-color var(--motion-state), color var(--motion-state);
}
.toggle-btn:hover { border-color:rgba(236,234,213,.45); background:rgba(236,234,213,.06); }
.toggle-btn.active {
  background:var(--ember); border-color:var(--ember); color:var(--linen-100);
}
.toggle-btn.active:hover { background:var(--slate-600); border-color:var(--slate-600); }

.hint {
  margin:0; font-size:13px; color:var(--ember-300); min-height:1.2em;
}

/* What today was rostered as — quieter than the action hints, because it is
   context, not an instruction. */
.schedule-hint {
  margin:0; font-size:12px; font-weight:600; letter-spacing:.04em;
  color:var(--fairway-300);
}

/* ==================== SHIFT PICKER ====================
   Which of the venue's shifts they're working. Preselected from the roster,
   so the usual answer needs no tap at all. */
.shift-picker { display:grid; gap:8px; }
.shift-chip {
  display:flex; align-items:baseline; gap:10px;
  min-height:52px; padding:10px 16px;
  border:1px solid var(--line); border-radius:13px;
  background:transparent; color:var(--linen);
  font-family:var(--sans); cursor:pointer; text-align:left;
  transition:background var(--motion-state), border-color var(--motion-state);
}
.shift-chip:hover { border-color:rgba(236,234,213,.45); background:rgba(236,234,213,.06); }
.shift-chip.active { background:var(--ember); border-color:var(--ember); color:var(--linen-100); }
.shift-chip-code {
  font-family:var(--display); font-weight:800; font-size:14px; letter-spacing:.08em;
  min-width:58px;
}
.shift-chip-times { font-size:12.5px; color:var(--linen-300); }
.shift-chip.active .shift-chip-times { color:var(--linen-100); }

@media (min-width:420px) {
  .shift-picker { grid-template-columns:repeat(3, 1fr); }
  .shift-chip { flex-direction:column; gap:2px; align-items:flex-start; justify-content:center; }
  .shift-chip-times { font-size:11.5px; }
}

/* The "can I come in at noon?" form — the employee's side of asking. */
.request-form {
  display:grid; gap:12px; padding:16px;
  border:1px solid var(--line); border-radius:14px;
  background:rgba(13,20,9,.4);
}
.request-form input[type="text"], .request-form input[type="date"] {
  min-height:48px; font-size:15px; color:var(--linen-100);
  border:1px solid var(--line); border-radius:11px;
  background:rgba(13,20,9,.5); padding:12px 14px;
  color-scheme:dark; font-family:var(--sans);
}
.request-form input:focus {
  outline:none; border-color:var(--slate); box-shadow:0 0 0 3px rgba(103,128,150,.3);
}

/* ==================== OVERTIME STEPPER ====================
   A number that lands in someone's pay is picked, never typed: the stepper
   can only produce a valid quarter-hour inside the server's range. */
.ot-stepper {
  display:grid; grid-template-columns:56px 1fr 56px; gap:10px; align-items:center;
  margin-bottom:10px;
}
.ot-stepper button { min-height:52px; font-size:22px; font-weight:800; padding:0; }
.ot-stepper button:disabled { opacity:.35; cursor:not-allowed; }
.ot-value {
  text-align:center;
  font-family:var(--display); font-weight:800; font-size:18px;
  color:var(--linen-100);
}

/* ==================== BUTTONS (matches the checkout .submit) ==================== */
.btn-primary {
  min-height:52px;
  border:0; border-radius:14px;
  padding:15px 26px;
  font-family:var(--sans); font-weight:800; font-size:15.5px; letter-spacing:.02em;
  color:var(--linen-100); background:var(--ember);
  cursor:pointer;
  transition:background .2s, transform .15s var(--ease), opacity .2s;
}
.btn-primary:hover:not(:disabled) { background:var(--slate-600); }
.btn-primary:active:not(:disabled) { transform:scale(.97); }
.btn-primary:disabled { cursor:not-allowed; opacity:.4; }

.btn-secondary {
  min-height:52px;
  border:1px solid var(--line); border-radius:14px;
  background:transparent; color:var(--linen);
  font-family:var(--sans); font-weight:700; font-size:15px;
  cursor:pointer;
  transition:background var(--motion-state), border-color var(--motion-state), transform var(--motion-instant) var(--ease);
}
.btn-secondary:hover:not(:disabled) { border-color:rgba(236,234,213,.45); background:rgba(236,234,213,.06); }
.btn-secondary:active:not(:disabled) { transform:scale(.97); }

.button-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

/* ==================== ALERTS ====================
   Same warm-danger banner the staff board uses for tab-changed / stale
   warnings — a low-alpha wash rather than a solid block. */
.error {
  margin:0; padding:11px 13px;
  border:1px solid rgba(255,210,194,.45); border-radius:12px;
  background:rgba(224,133,99,.12);
  color:#ffd2c2;
  font-size:13.5px; font-weight:600;
}

/* ==================== PREVIEW ==================== */
.preview-img {
  width:100%; aspect-ratio:3/4; object-fit:cover;
  border-radius:16px;
  background:var(--reserve-900);
  border:1px solid var(--line);
}

.summary { margin:0; display:flex; flex-direction:column; gap:6px; }
.summary div { display:flex; justify-content:space-between; font-size:14px; }
.summary dt { color:var(--linen-300); }
.summary dd { margin:0; font-family:var(--display); font-weight:700; color:var(--ember-300); }

/* ==================== SUBMITTING / SUCCESS ==================== */
#step-submitting, #step-success { align-items:center; text-align:center; }

.spinner {
  width:36px; height:36px; margin:0 auto;
  border-radius:50%;
  border:4px solid var(--line);
  border-top-color:var(--ember);
  animation:spin 800ms linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

.check {
  width:60px; height:60px; margin:0 auto;
  border-radius:50%;
  background:var(--fairway-300); color:var(--reserve-900);
  font-size:1.9rem; font-weight:900;
  display:flex; align-items:center; justify-content:center;
}

.success-message {
  margin:0; text-align:center;
  font-family:var(--display); font-weight:800; font-size:17px;
  color:var(--linen-100);
}

/* ==================== FOOTER ==================== */
.foot {
  margin-top:32px; display:flex; align-items:center; justify-content:center; gap:10px;
  font-size:11px; letter-spacing:.08em; color:rgba(236,234,213,.7);
}
.foot img { height:20px; opacity:.85; }
