/* ClubOS Staff — Fresh Linen, the same look as the ClubOS app. */

/* Manrope as one small web font for every weight (@fontsource-variable/manrope 5.3.0). */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #F4F5F2;
  --surface: #FFFFFF;
  --sunken: #F7F8F5;
  --border: #E3E6E1;
  --border-strong: #CBD1CB;
  --divider: #EEF0EC;
  --text: #14201D;
  --text-2: #5E6B67;
  --text-3: #6A7672;
  --accent: #0D7A73;
  --accent-strong: #095C57;
  --accent-soft: #E2F2EF;
  --on-accent-soft: #0B5C57;
  --on-accent: #FFFFFF;
  --ink: #14201D;
  --success: #1B8556;
  --success-soft: #E3F4EA;
  --warning: #B54708;
  --warning-soft: #FFF4EC;
  --warning-border: #F8DCC6;
  --danger: #C2343F;
  --danger-soft: #FCE8E9;
  --shadow: 0 10px 30px rgba(20, 32, 29, 0.08);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1412;
    --surface: #18211F;
    --sunken: #131B19;
    --border: #2A3633;
    --border-strong: #3A4844;
    --divider: #24302D;
    --text: #F1F4F2;
    --text-2: #A6B2AE;
    --text-3: #83908C;
    --accent: #3DBFB2;
    --accent-strong: #2FA397;
    --accent-soft: #163330;
    --on-accent-soft: #9FE3DA;
    --on-accent: #05201D;
    --ink: #223A35;
    --success: #4CC98C;
    --success-soft: #173227;
    --warning: #F2A65A;
    --warning-soft: #3A2A1C;
    --warning-border: #5A3E26;
    --danger: #F07178;
    --danger-soft: #3A2226;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
/* Chosen in More › Display. */
:root[data-theme="dark"] {
  --bg: #0E1412;
  --surface: #18211F;
  --sunken: #131B19;
  --border: #2A3633;
  --border-strong: #3A4844;
  --divider: #24302D;
  --text: #F1F4F2;
  --text-2: #A6B2AE;
  --text-3: #83908C;
  --accent: #3DBFB2;
  --accent-strong: #2FA397;
  --accent-soft: #163330;
  --on-accent-soft: #9FE3DA;
  --on-accent: #05201D;
  --ink: #223A35;
  --success: #4CC98C;
  --success-soft: #173227;
  --warning: #F2A65A;
  --warning-soft: #3A2A1C;
  --warning-border: #5A3E26;
  --danger: #F07178;
  --danger-soft: #3A2226;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}

/* ---- Brand ---- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand-name span { color: var(--accent); }
.brand-sub { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }

/* ---- Cards and text ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
h1 { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h2 { margin: 0; font-size: 16px; font-weight: 800; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }

/* ---- Forms ---- */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
input.text, textarea.text {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 16px; /* stops iPhone zooming in */
  font-weight: 500;
  color: var(--text);
}
textarea.text { min-height: 88px; resize: vertical; }
input.text:focus, textarea.text:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hint { font-size: 12px; color: var(--text-2); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px;
  border-radius: 999px; border: none;
  font-size: 16px; font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-quiet { background: transparent; color: var(--accent); min-height: 44px; padding: 0 12px; }
.btn-block { width: 100%; }

.alert {
  border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 600;
  background: var(--danger-soft); color: var(--danger);
}
.alert.info { background: var(--accent-soft); color: var(--on-accent-soft); }
.alert.warn { background: var(--warning-soft); color: var(--warning); border: 1px solid var(--warning-border); }

/* ---- Sign in ---- */
.signin { min-height: calc(100dvh - 60px); display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.signin form { display: flex; flex-direction: column; gap: 14px; }

/* ---- Header ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 22px; border: none;
  background: var(--accent); color: var(--on-accent);
  font-weight: 800; font-size: 15px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---- Today ---- */
.shift-line { display: flex; flex-direction: column; gap: 2px; }
.shift-name { font-size: 17px; font-weight: 800; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--on-accent-soft);
}
.pill.warn { background: var(--warning-soft); color: var(--warning); }
.pill.redo { background: var(--danger-soft); color: var(--danger); }
.pill.ok { background: var(--success-soft); color: var(--success); }
.bar { height: 8px; border-radius: 4px; background: var(--divider); overflow: hidden; }
.bar > div { height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.3s ease; }

.list { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 14px 14px 12px; min-height: 68px;
  border-top: 1px solid var(--divider);
  background: var(--surface);
}
.item:first-child { border-top: none; }
.item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; background: none; border: none; padding: 0; }
.item .title { font-size: 16px; font-weight: 700; line-height: 1.25; }
.item .meta { font-size: 13px; color: var(--text-2); }
.item .note { font-size: 13px; color: var(--text); background: var(--sunken); border-radius: 10px; padding: 8px 10px; margin-top: 4px; }
.item.done .title { color: var(--text-2); }

.tick {
  width: 48px; height: 48px; border-radius: 24px; flex: none;
  border: 2px solid var(--border-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.tick svg { width: 24px; height: 24px; opacity: 0; }
.tick:active { transform: scale(0.94); }
.tick.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tick.on svg { opacity: 1; }
.tick.waiting { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tick.waiting svg { opacity: 1; }
.chev { color: var(--text-3); flex: none; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; }
.empty { text-align: center; padding: 28px 18px; color: var(--text-2); font-size: 14px; }
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---- Bottom sheet ---- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(10, 16, 14, 0.45);
  display: flex; align-items: flex-end; justify-content: center; z-index: 20;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
}
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 0 auto 14px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.photo-add {
  width: 76px; height: 76px; border-radius: 12px; border: 1.5px dashed var(--border-strong);
  background: var(--sunken); color: var(--text-2); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-direction: column; gap: 2px;
}

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #FFFFFF; border-radius: 999px;
  padding: 10px 10px 10px 18px; display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow); z-index: 30; max-width: calc(100% - 32px);
}
.toast button { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; border: none; border-radius: 999px; padding: 8px 14px; font-weight: 800; }

/* ---- Menu ---- */
.menu {
  position: absolute; right: 16px; top: calc(max(20px, env(safe-area-inset-top)) + 52px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); min-width: 200px; overflow: hidden; z-index: 15;
}
.menu button { display: block; width: 100%; text-align: left; padding: 14px 16px; background: none; border: none; border-top: 1px solid var(--divider); font-weight: 600; }
.menu button:first-child { border-top: none; }
.menu .who { padding: 12px 16px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--divider); }

.offline { position: sticky; top: 0; z-index: 10; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Tab bar (Today · Shifts · Check · Report · More) ---- */
body.tabs .app { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
body.tabs .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 18;
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 560px; margin: 0 auto;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
@media (min-width: 561px) { .tabbar { border: 1px solid var(--border); border-bottom: none; border-radius: 20px 20px 0 0; } }
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; padding: 4px 0; border: none; background: none; border-radius: 14px;
  color: var(--text-3); font-size: 11px; font-weight: 700; -webkit-tap-highlight-color: transparent;
}
.tabbar button.on { color: var(--accent); }
.tabbar button:active { background: var(--sunken); }

/* ---- Small pieces used by the new screens ---- */
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-big { min-height: 60px; font-size: 18px; }
.pill.quiet { background: var(--sunken); color: var(--text-2); border: 1px solid var(--border); }
.icon-bubble {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.notes { border-color: var(--accent); background: var(--accent-soft); }
.notes .eyebrow { color: var(--on-accent-soft); }
.note-line { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.note-line:first-of-type { border-top: none; padding-top: 0; }
.note-line p { margin: 0; font-weight: 600; color: var(--text); white-space: pre-wrap; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--divider); }
.check-row:nth-child(2) { border-top: none; padding-top: 4px; }
.check-name { font-weight: 700; }
.code-input { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; text-align: center; font-size: 20px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--sunken); border: 1px solid var(--border); border-radius: 14px; }
.segmented button { min-height: 42px; border: none; border-radius: 10px; background: none; font-weight: 700; color: var(--text-2); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 32, 29, 0.12); }
select.text { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.check-field { display: flex; align-items: center; gap: 12px; font-weight: 600; min-height: 44px; }
.check-field input { width: 24px; height: 24px; accent-color: var(--accent); flex: none; }
.menu-row { width: 100%; text-align: left; border-left: none; border-right: none; border-bottom: none; font: inherit; color: inherit; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.steps li { padding-left: 4px; }
.guide-photo { width: 100%; border-radius: 16px; border: 1px solid var(--border); }
.scan-frame { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 60dvh; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-target { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); }

/* ---- Part 3: shifts, handovers and the team ---- */
html.large body { zoom: 1.12; }
.tabbar button { position: relative; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; }
.chip:active { background: var(--sunken); }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.action-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 8px;
  border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--accent); font: inherit;
  font-size: 13px; font-weight: 700; text-align: center; box-shadow: var(--shadow); }
.action-tile span { color: var(--text); }
.action-tile:active { background: var(--sunken); }
.kudos { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border-color: var(--accent); }
.icon-bubble.star { color: #C98A00; }
.handover { border-left: 4px solid var(--warning); }
.handover.seen { border-left-color: var(--success); }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.kv-block { display: grid; gap: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { display: grid; gap: 2px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.stat strong { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 140px; align-items: end; }
.week-bar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; align-items: end; text-align: center; gap: 4px; }
.week-bar .fill { background: var(--accent-soft); border-radius: 6px 6px 2px 2px; min-height: 4px; width: 100%; align-self: end; }
.week-bar.today .fill { background: var(--accent); }
.week-bar .n { font-size: 12px; font-weight: 700; color: var(--text-2); }
.week-bar .d { font-size: 12px; font-weight: 700; color: var(--text-3); }
.segmented button { padding: 0 4px; line-height: 1.15; }
.segmented[style*="repeat(4"] button, .segmented[style*="repeat(3"] button { font-size: 14px; }

/* ---- Today, option A: next task first ---- */
.progress { gap: 8px; }
.progress-count { font-size: 16px; font-weight: 800; white-space: nowrap; }
.segments { display: grid; gap: 4px; }
.segments span { height: 6px; border-radius: 3px; background: var(--border); }
.segments span.on { background: var(--accent); }
.next-card { padding: 20px; gap: 14px; border-radius: 22px; box-shadow: var(--shadow); }
.next-card .eyebrow { color: var(--accent); font-weight: 800; }
.next-card .eyebrow.warn { color: var(--warning); }
.next-card .title { font-size: 25px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.next-due { font-size: 13px; font-weight: 700; color: var(--text-2); }
.next-due.late { color: var(--warning); }
.next-done { min-height: 58px; font-size: 18px; font-weight: 800; border-radius: 16px; gap: 10px; }
.next-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.next-actions .btn { min-height: 46px; font-size: 15px; background: var(--sunken); border-color: var(--border); }
.link-button { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 0; background: none; border: none;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--accent); min-height: 32px; }
.all-done { align-items: center; }
.updates .update-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: none;
  border-top: 1px solid var(--divider); background: none; font: inherit; color: var(--text); text-align: left; text-decoration: none; min-height: 56px; }
.updates .update-row:first-child { border-top: none; }
.updates .update-row:active { background: var(--sunken); }
.update-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.update-row .dot.fresh { background: var(--warning); }
.update-body { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.update-title { font-size: 14px; font-weight: 700; }
.update-text { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-action { font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
