/* EarnLedger — design system.
   One spacing scale (4 / 8 / 12 / 16 / 24), one card treatment
   (white, 1px soft border, 20px radius, one soft shadow), one type
   scale, shared components only — every screen uses the same buttons,
   pills, rows, fields, segmented control, headings and captions. */
:root {
  --green: #0e7a3d;
  --green-dark: #0b3d24;
  --green-soft: #e3f2e7;
  --ink: #0b3d24;
  --muted: #68766b;
  --line: #e7e0d2;
  --card: #ffffff;
  --bg: #faf7f0;
  --amber: #8a6410;
  --amber-bg: #fdf0cd;
  --red: #a33327;
  --red-bg: #fbeae8;
  --radius-card: 20px;
  --radius-tile: 14px;
  --radius-btn: 14px;
  --radius-input: 12px;
  --shadow: 0 1px 2px rgba(11, 61, 36, .05), 0 10px 30px rgba(11, 61, 36, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

/* ---------- type scale ---------- */
h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.tab-title { font-size: 20px; font-weight: 700; margin: 16px 0 12px; }
.hint { color: var(--muted); font-size: 14px; margin: 8px 0; }
p[id$="-error"]:not(:empty) { color: var(--red); }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--green);
}

/* ---------- header ---------- */
.topbar {
  padding: calc(18px + env(safe-area-inset-top)) 20px 6px; max-width: 560px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.brand { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.tagline { color: var(--muted); margin-top: 2px; font-size: 14px; }
.avatar-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--green); color: #fff; border: none; cursor: pointer;
  font-size: 15px; font-weight: 700;
}
.avatar-btn:active { background: var(--green-dark); }

/* ---------- layout & cards ---------- */
main { max-width: 560px; margin: 0 auto; padding: 4px 16px 110px; }
.tab { display: none; }
.tab.active { display: block; }
.panel, .card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 14px 16px; margin-top: 12px;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.panel-head h2 { margin: 0; }
.empty-note {
  background: var(--green-soft); border-radius: var(--radius-tile);
  padding: 16px; text-align: center; margin: 12px 0;
}
.empty-note p { margin: 0 0 12px; }

/* ---------- buttons (shared) ---------- */
.big-btn {
  display: block; width: 100%;
  background: var(--green); color: #fff; border: none;
  font-size: 18px; font-weight: 700;
  padding: 14px 16px; border-radius: var(--radius-btn);
  margin: 12px 0 16px; cursor: pointer; min-height: 52px;
}
.big-btn:active { background: var(--green-dark); }
.big-btn.warn { background: var(--card); color: var(--amber); border: 2px solid var(--amber); }
.soft-btn {
  background: var(--card); color: var(--green-dark);
  border: 1.5px solid var(--green); border-radius: var(--radius-btn);
  font-size: 15px; font-weight: 600;
  padding: 12px 16px; cursor: pointer; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.soft-btn.primary { background: var(--green); color: #fff; }
.soft-btn:active { opacity: .85; }
.mini-btn {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 13.5px; font-weight: 600; padding: 8px 12px; cursor: pointer;
  min-height: 38px; color: var(--ink);
}
.mini-btn.go { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.mini-btn.danger { color: var(--red); }
.link-btn {
  background: none; border: none; color: var(--green); font: inherit;
  font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline;
}
.link-btn.view-all { text-decoration: none; font-size: 15px; white-space: nowrap; }
.cust-toggle { display: inline-block; margin: 2px 0 6px; }
.cust-line { margin-top: 8px; overflow-wrap: break-word; }
.cust-line a { color: var(--green-dark); }
.danger-btn { color: var(--red); border-color: #efc4c0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.file-btn { display: inline-flex; align-items: center; }

/* ---------- pills & badges (shared) ---------- */
.pill {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; margin-left: 8px; vertical-align: 2px; white-space: nowrap;
}
.pill.owed { background: var(--amber-bg); color: var(--amber); }
.pill.approved { background: var(--green-soft); color: var(--green-dark); }
.pill.paid { background: var(--green); color: #fff; }
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: var(--green-soft); color: var(--green-dark);
  margin-left: 8px; vertical-align: 2px; white-space: nowrap;
}
.badge.risk { background: var(--amber-bg); color: var(--amber); }
.badge.cb { background: var(--red-bg); color: var(--red); }
.icon-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 15px; padding: 8px; line-height: 1;
}

/* ---------- list rows (shared pattern) ---------- */
.breakdown-row, .entry-row, .rate-row, .check-line, .bd-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line); gap: 12px;
}
.breakdown-row:last-child, .entry-row:last-child, .rate-row:last-child, .check-line:last-child, .bd-row:last-child { border-bottom: none; }
.bd-row > span:first-child { flex: 1; font-weight: 600; }
.bd-name, .e-name, .entry-name { font-weight: 600; }
.bd-meta, .e-meta, .entry-meta { color: var(--muted); font-size: 13.5px; }
.bd-value, .e-value { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entry { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-tile); padding: 12px 16px; margin-bottom: 12px; }
.entry .entry-main { flex-direction: row; justify-content: space-between; align-items: baseline; }
.entry-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.entry-actions button, .rate-actions button, .plan-actions button {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 14px; font-weight: 600; padding: 8px 12px; cursor: pointer; min-height: 40px; color: var(--ink);
}
.entry-actions button.go { border-color: var(--green); color: var(--green-dark); }
.entry-actions button.danger, .rate-actions button.danger, .plan-actions button.danger { color: var(--red); }
.rate-actions, .plan-actions { display: flex; gap: 8px; }
.rate-row { align-items: center; }
.risk { font-size: 13.5px; margin-top: 4px; }
.risk.at-risk { color: var(--amber); font-weight: 600; }
.risk.safe { color: var(--muted); }
.risk.charged-back { color: var(--red); font-weight: 600; }
.inline-form { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }

/* ---------- fields (shared) ---------- */
.field { display: block; margin: 12px 0; }
.field > span, .field > .split-label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .money-input input {
  width: 100%; font-size: 17px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius-input);
  background: #fff; color: var(--ink); min-height: 50px;
}
.money-input { display: flex; align-items: center; gap: 8px; }
.money-input > span { font-size: 18px; font-weight: 700; color: var(--muted); }
.money-input input { flex: 1; width: auto; }
select { font: inherit; }
.stepper { display: flex; align-items: center; gap: 16px; }
.stepper button {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--green); background: #fff; color: var(--green-dark);
  font-size: 26px; font-weight: 700; cursor: pointer; line-height: 1;
}
.stepper span { font-size: 22px; font-weight: 800; min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.flash {
  background: var(--green); color: #fff; text-align: center; font-weight: 700;
  padding: 12px; border-radius: var(--radius-input); margin: 12px 0;
}
.pw-wrap { display: block; position: relative; }
.pw-wrap input { width: 100%; padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 20px; padding: 8px 10px; cursor: pointer; color: var(--muted); line-height: 1; }
.pw-toggle.pw-shown { text-decoration: line-through; opacity: .55; }

/* ---------- segmented control (shared) ---------- */
.seg { display: flex; background: #efeade; border-radius: 999px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: none; background: transparent; padding: 8px 4px;
  border-radius: 999px; font-size: 14.5px; font-weight: 600;
  color: var(--muted); cursor: pointer; min-height: 36px;
}
.seg button.active { background: var(--green); color: #fff; }

/* ---------- HOME ---------- */
.greeting { font-size: 20px; font-weight: 700; margin: 10px 4px 0; }
.lead-card { border-radius: var(--radius-card); padding: 20px; }
.lead-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.lead-value { font-size: 44px; font-weight: 800; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.lead-caption { color: var(--muted); font-size: 14px; margin-top: 4px; }
.lead-tiles { display: flex; gap: 12px; margin-top: 16px; }
.lead-tile { flex: 1; border-radius: var(--radius-tile); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.lead-tile.paid-tile { background: var(--green-soft); }
.lead-tile.owed-tile { background: var(--amber-bg); }
.lead-tile-label { font-size: 13px; font-weight: 600; color: #5c6b5e; }
.lead-tile-value { font-size: 20px; font-weight: 800; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.lead-foot { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.lead-empty { font-size: 16px; color: var(--muted); margin: 12px 0 4px; line-height: 1.5; }
.home-actions { display: flex; gap: 12px; margin-top: 12px; align-items: stretch; }
.home-actions[hidden] { display: none; }
.home-actions .big-btn { flex: 1.5; margin: 0; }
.home-actions .soft-btn { flex: 1; font-size: 16px; border-radius: var(--radius-btn); min-height: 52px; }
.next-shift-panel { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.next-shift-panel[hidden] { display: none; }
.next-shift-label { color: var(--muted); font-size: 14px; font-weight: 600; flex: none; }
.next-shift-value { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.next-shift-time { font-weight: 600; color: var(--muted); font-size: 14.5px; }
.recent-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.recent-row:last-child { border-bottom: none; }
.recent-ico {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--green-soft); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
}
.recent-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recent-name { font-weight: 600; }
.recent-amt { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.period-line { color: var(--muted); font-size: 13.5px; margin: 10px 4px 0; }
.earnings-hero { margin-top: 10px; }
.earnings-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.earnings-value { font-size: 36px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.earnings-sub { color: var(--muted); font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.breakdown-toggle { margin-top: 10px; text-decoration: none; }
#window-totals { margin-top: 6px; }
.empty-state h2 { margin-bottom: 4px; }
.empty-actions { margin-top: 14px; }
.board-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 0; font: inherit; color: var(--ink); text-align: left;
}
.board-head-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.board-title { font-size: 17px; font-weight: 700; }
.board-snapshot { color: var(--muted); font-size: 14px; }
#board-panel .expander-chev { transition: transform .2s ease; }
#board-panel.open .expander-chev { transform: rotate(180deg); }
#board-list { margin-top: 8px; }

/* ---------- owed vs paid / paycheck tiles ---------- */
.split-row, .check-row, .hours-row { display: flex; gap: 12px; }
.split, .check-cell, .hours-cell {
  flex: 1; border-radius: var(--radius-tile); padding: 12px 16px;
  display: flex; flex-direction: column; gap: 4px; background: var(--green-soft);
}
.split.owed { background: var(--amber-bg); }
.split-label, .card-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.split-value, .card-value { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-sub { font-size: 13px; color: var(--muted); }
.split-bar { height: 8px; background: var(--amber-bg); border-radius: 4px; overflow: hidden; margin: 12px 0; }
.split-bar > div { height: 100%; background: var(--green); width: 0%; transition: width .3s; }
#mark-period-paid { width: 100%; }
.diff-line { font-weight: 700; margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-tile); background: var(--green-soft); color: var(--green-dark); }
.diff-line.diff-under { background: var(--red-bg); color: var(--red); }

/* ---------- SALES (log) ---------- */
.type-pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.sale-card .type-pick { margin-bottom: 8px; }
.compose-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 8px 0 12px; }
.compose-math { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: break-word; }
/* Sticky save bar: pinned directly above the fixed tab bar (58px +
   safe-area), always visible while composing a sale. It lives inside
   the Log section, so it only renders while that tab is active. */
.save-bar {
  position: fixed; left: 0; right: 0; z-index: 9;
  bottom: calc(58px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(11, 61, 36, .08);
}
.save-bar-inner { max-width: 560px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.save-bar-total { display: flex; flex-direction: column; flex: none; }
.save-bar-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.save-bar-value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.save-bar .big-btn { margin: 0; flex: 1; min-height: 52px; }
#tab-log.composing { padding-bottom: 96px; }
.type-option {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius-tile);
  padding: 16px; font-size: 17px; font-weight: 600; cursor: pointer; min-height: 56px;
  width: 100%; text-align: left; color: var(--ink);
}
.type-option .t-amt { color: var(--green-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.type-option.selected { border-color: var(--green); background: var(--green-soft); }
.sale-lines-list { margin-top: 8px; }
.sale-line {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line);
}
.sale-line-right { display: inline-flex; align-items: center; gap: 8px; }
.line-actions { margin-top: 4px; padding-bottom: 8px; }
.sale-total { display: flex; justify-content: space-between; font-weight: 700; padding: 8px 0 4px; font-variant-numeric: tabular-nums; }

/* ---------- CLOCK ---------- */
.clock-panel { text-align: center; }
.clock-status { font-size: 19px; font-weight: 700; }
.clock-elapsed { color: var(--muted); font-size: 15px; margin: 4px 0 12px; min-height: 20px; }
.clock-team { color: var(--muted); font-size: 15px; font-weight: 600; margin: -4px 4px 0; }
.clock-team:empty { display: none; }
.clock-cue { color: var(--green-dark); font-weight: 600; font-size: 15px; margin-top: 12px; }
#shift-add { margin-top: 12px; }
.time-row { display: flex; gap: 12px; }
.time-row .field { flex: 1; }
/* Date/time controls: WebKit sizes the native control from its own
   format string + picker glyph and does not shrink it with the CSS
   box, so the generic min-width fix never reached these two control
   types — in a flex row they kept their native widths and crowded
   the middle, and the full-width date control painted past its card.
   Resetting the native appearance hands sizing back to the author
   width (tapping still opens the platform picker). */
.field input[type="date"], .field input[type="time"] {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; min-width: 0; max-width: 100%;
}
/* On phone widths Start and End stack — they never compete for the
   same row, whatever the engine does with the controls. */
@media (max-width: 520px) {
  .time-row { flex-direction: column; gap: 0; }
  .time-row .field { flex: none; width: 100%; }
}
.overnight-tag {
  display: inline-block; background: var(--amber-bg); color: var(--amber);
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  margin-left: 8px; vertical-align: 2px; white-space: nowrap;
}
.overnight-tag[hidden] { display: none; }
.break-input { margin-top: 8px; }

/* ---------- SCHEDULE ---------- */
.week-nav { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; }
.week-nav .soft-btn { min-height: 44px; padding: 8px 16px; font-size: 20px; }
.week-label { flex: 1; text-align: center; font-weight: 700; }
.week-total { color: var(--green-dark); font-weight: 700; font-size: 15px; margin: 0 4px 4px; font-variant-numeric: tabular-nums; }
.week-total:empty { display: none; }
.week-strip { display: flex; gap: 6px; margin-bottom: 12px; }
.strip-day {
  flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 2px 6px; cursor: pointer; font: inherit; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.strip-day.today .strip-num { color: var(--green); }
.strip-day.selected { border-color: var(--green); background: var(--green-soft); }
.strip-dow { font-size: 11px; font-weight: 700; color: var(--muted); }
.strip-num { font-size: 16px; font-weight: 800; line-height: 1.2; }
.strip-dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.strip-dot.on { background: var(--green); }
.day-panel { margin-top: 0; }
.day-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.day-panel-titles { min-width: 0; }
.day-panel-date { font-size: 17px; font-weight: 800; }
.day-panel-hours { color: var(--muted); font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.day-panel-head .soft-btn { flex: none; }
.shift-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.shift-row:last-child { border-bottom: none; }
.shift-row-main { flex: 1; min-width: 0; }
.shift-row-text { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.shift-row-sub { color: var(--muted); font-weight: 500; }
#day-actual .entry-meta { margin-top: 8px; }
.shift-menu-wrap { position: relative; flex: none; }
.shift-menu-btn { font-size: 20px; font-weight: 800; padding: 8px 10px; }
.shift-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); min-width: 168px; padding: 4px;
}
.shift-menu button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 12px; font: inherit; font-size: 15px; font-weight: 600;
  color: var(--ink); cursor: pointer; border-radius: 8px; min-height: 44px;
}
.shift-menu button:active { background: var(--green-soft); }
.shift-menu button.danger { color: var(--red); }

/* ---------- sheets (bottom-sheet dialogs) ---------- */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(11, 61, 36, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-overlay[hidden] { display: none; }
.sheet {
  background: var(--card); width: 100%; max-width: 560px;
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow);
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-head h3 { margin: 0; }
.sheet .field input, .sheet .field select { min-width: 0; }
.confirm-sheet h3 { margin: 0; }
.confirm-body { color: var(--muted); font-size: 15px; margin: 8px 0 16px; }
.plan-paid-line { font-weight: 700; font-variant-numeric: tabular-nums; margin: 12px 0 4px; min-height: 22px; }

/* ---------- teams, board, auth ---------- */
.auth-panel { margin-top: 24px; }
.auth-brand { text-align: center; margin-bottom: 16px; }
.auth-brand .brand-mark { width: 64px; height: 64px; }
.auth-brand-name { font-size: 24px; font-weight: 800; margin-top: 8px; }
.auth-brand-tag { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.team-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow); padding: 4px 8px 4px 16px; margin: 8px 0 2px;
}
.team-bar .split-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.team-bar select {
  flex: 1; border: none; background: transparent; font-size: 16px; font-weight: 600;
  color: var(--ink); padding: 8px 24px 8px 4px; min-height: 36px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b3d24' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.board-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.board-row:last-child { border-bottom: none; }
.board-main { flex: 1; min-width: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.dot-in { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot-lunch { background: #e0a100; box-shadow: 0 0 0 3px #fbeecd; }
.dot-out { background: #c3ccc7; }
.dot-wait { background: #e5e9e6; border: 1px dashed #b9c4bd; }
.approve-line { color: var(--amber); font-weight: 600; }
.invite-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.invite-code { font-size: 20px; font-weight: 800; letter-spacing: 1px; background: var(--green-soft); padding: 8px 12px; border-radius: 8px; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.chip {
  background: var(--green-soft); color: var(--green-dark); border: none;
  border-radius: 999px; padding: 12px 16px; font-size: 15px; font-weight: 700;
  cursor: pointer; min-height: 46px;
}

/* ---------- more apps ---------- */
.more-apps { list-style: none; padding: 0; margin: 8px 0 0; }
.more-apps li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.more-apps li:last-child { border-bottom: none; }
.more-apps a { color: var(--green-dark); text-decoration: none; }
.more-apps strong { color: var(--ink); }

/* ---------- settings expanders ---------- */
.expander { padding: 0; overflow: hidden; }
.expander-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 16px; font: inherit; color: var(--ink); text-align: left; min-height: 56px;
}
.expander-title { font-size: 19px; font-weight: 700; }
.expander-chev {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--green-soft); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: transform .2s ease;
}
.expander.open .expander-chev { transform: rotate(180deg); }
.expander-body { padding: 0 16px 16px; }
.expander-body > :first-child { margin-top: 0; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
  z-index: 10;
}
.tabbar button {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 8px 0 10px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px;
}
.tabbar button .tab-ico { font-size: 20px; line-height: 1.1; display: inline-flex; }
.tabbar button.active { color: var(--green-dark); }

/* ---------- manager member rates ---------- */
.member-rates { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.member-rates-title { margin-bottom: 4px; }

/* ---------- team panel (Settings → Team) ----------
   Scoped to the Team expander only: heading row with a quiet Edit
   button, hairline-divided sub-groups with small subheads, one-row
   input+button pairs, and one uniform button height. */
[data-expander="team"] .team-head { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
[data-expander="team"] #team-name-title { margin: 0; font-size: 20px; font-weight: 800; }
[data-expander="team"] .team-edit-btn {
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 14.5px; font-weight: 600; color: var(--green);
  padding: 6px 8px; border-radius: 8px; line-height: 1;
}
[data-expander="team"] .team-edit-btn:active { opacity: .7; }
[data-expander="team"] #team-name-form { margin-bottom: 12px; }
[data-expander="team"] #team-name-form .field { margin-top: 0; }
[data-expander="team"] .team-group { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
[data-expander="team"] .team-subhead {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px;
}
[data-expander="team"] #team-members > h3 {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  margin-top: 0 !important; margin-bottom: 0;
}
[data-expander="team"] .team-inline { display: flex; gap: 8px; align-items: flex-end; }
[data-expander="team"] .team-inline .field { flex: 1 1 auto; min-width: 0; margin: 0; }
[data-expander="team"] .team-inline .soft-btn { flex: none; }
[data-expander="team"] .soft-btn { min-height: 50px; }
[data-expander="team"] .invite-row { margin-bottom: 0; }
[data-expander="team"] .invite-code { min-height: 50px; display: inline-flex; align-items: center; }
[data-expander="team"] .team-leave-row { margin-top: 16px; }

/* ---------- mobile containment (iPhone width) ----------
   Real fixes first: flex children that hold inputs or long text get
   min-width: 0 so they can shrink inside their card instead of
   pushing past its edge; inputs are capped at 100% of their field.
   The overflow-x rule is only a backstop. */
html, body { overflow-x: hidden; }
input, select, textarea, img { max-width: 100%; }
.field input, .field select { min-width: 0; }
.time-row .field { flex: 1 1 0; min-width: 0; }
.time-row input { min-width: 0; }
.money-input input { min-width: 0; }
.split, .check-cell, .hours-cell, .lead-tile { min-width: 0; }
.seg button { min-width: 0; }
.team-bar select { min-width: 0; }
.entry .entry-main > span:first-child { min-width: 0; overflow-wrap: break-word; }
.entry .entry-main > span:last-child { flex: none; }
.shift-row-text { min-width: 0; }
.recent-name { overflow-wrap: break-word; }
.board-row .mini-btn { flex: none; }
.entry-row .entry-actions { flex: none; }
.type-option > span:first-child { min-width: 0; overflow-wrap: break-word; }
.type-option .t-amt { flex: none; }
