:root {
  --ink: #16313c;
  --muted: #6a7c83;
  --line: #dfe8e8;
  --canvas: #f3f7f5;
  --paper: #ffffff;
  --teal-950: #092f34;
  --teal-900: #0c4046;
  --teal-800: #0f5056;
  --teal-700: #176a70;
  --ice: #8fd5e5;
  --ice-soft: #e8f8fb;
  --lime: #accb34;
  --lime-soft: #f0f6d8;
  --mango: #f5a623;
  --mango-soft: #fff4d8;
  --coral: #f26b4f;
  --coral-soft: #fff0ec;
  --blue: #4b7bec;
  --blue-soft: #edf2ff;
  --shadow: 0 18px 50px rgba(9, 47, 52, .10);
  --shadow-small: 0 8px 25px rgba(9, 47, 52, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 15%, rgba(143,213,229,.15), transparent 25%),
    radial-gradient(circle at 88% 80%, rgba(172,203,52,.12), transparent 23%),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(143,213,229,.85); outline-offset: 2px; }
svg { display: block; }
.svg-sprite { position: absolute; overflow: hidden; }
.app {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--canvas);
}
.app[hidden], .auth-shell[hidden] { display: none !important; }

.auth-shell {
  width: min(calc(100% - 28px), 480px);
  min-height: min(720px, calc(100vh - 28px));
  margin: 14px auto;
  padding: calc(24px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: 11px; color: var(--teal-800); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.auth-brand img { width: 48px; height: 48px; padding: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--ice-soft); object-fit: contain; }
.auth-copy { margin-top: 34px; }
.auth-kicker { color: var(--teal-700); font-size: 9px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.auth-copy h1 { margin: 8px 0 0; font-size: clamp(34px,10vw,48px); line-height: 1; letter-spacing: -.055em; }
.auth-copy p { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.auth-form { display: grid; gap: 9px; margin-top: 26px; }
.auth-form label { color: #526970; font-size: 10px; font-weight: 850; }
.auth-form input { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--canvas); color: var(--ink); font-size: 16px; }
.auth-form button { min-height: 50px; padding: 11px 14px; border: 0; border-radius: 15px; background: var(--lime); color: var(--teal-950); font-size: 11px; font-weight: 900; cursor: pointer; }
.auth-form .auth-text-button { min-height: 36px; background: transparent; color: var(--teal-700); }
.review-accounts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-accounts > span { width: 100%; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.review-accounts button { min-height: 34px; padding: 7px 10px; border: 1px solid #cde8ed; border-radius: 10px; background: var(--ice-soft); color: var(--teal-800); font-size: 8px; font-weight: 850; cursor: pointer; }
.auth-status { min-height: 18px; margin: 14px 0 0; color: var(--teal-700); font-size: 10px; line-height: 1.45; }
.auth-status.error { color: #9a3e2c; }
.auth-privacy { margin: 20px 0 0; color: #8a999d; font-size: 8.5px; line-height: 1.55; }
.contact-card form { margin-top: 12px; }
.role-toggle { display: flex; gap: 5px; margin-top: 13px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.1); }
.role-toggle button { width: auto; flex: 1; margin: 0; }
.role-toggle button.active { color: var(--teal-950); background: var(--lime); }
.sync-note { display: inline-flex; align-items: center; gap: 5px; color: var(--teal-700); font-size: 8px; font-weight: 850; }
.sync-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.app[aria-busy="true"] button:not(.nav-button) { opacity: .68; cursor: progress; }
.app[aria-busy="true"] .demo-strip::after { content: " · Saving…"; font-weight: 900; }

.offline-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  color: #805700;
  background: var(--mango-soft);
  border-bottom: 1px solid #f0d493;
  font-size: 11px;
  font-weight: 800;
}
.offline-banner.show { display: flex; }
.offline-banner svg { width: 15px; height: 15px; }
.recovery-banner { margin: 0 18px 13px; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #f1d092; border-radius: 12px; background: var(--mango-soft); color: #684a0d; font-size: 10px; line-height: 1.4; }
.recovery-banner span { min-width: 0; }
.recovery-banner strong { display: block; margin-bottom: 2px; color: #543a07; font-size: 11px; }
.recovery-banner button { min-height: 38px; flex: 0 0 auto; padding: 8px 11px; border: 0; border-radius: 10px; background: #815800; color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.recovery-banner button:disabled { opacity: .62; cursor: wait; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(14px + env(safe-area-inset-top)) 18px 12px;
  background: rgba(243,247,245,.94);
  backdrop-filter: blur(14px);
}
.header-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-brand img { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #fff, var(--shadow-small); }
.header-brand span { display: block; color: var(--teal-700); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.header-brand strong { display: block; margin-top: 3px; font-size: 16px; line-height: 1.05; letter-spacing: -.02em; }
.header-action { position: relative; width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-small); cursor: pointer; }
.header-action svg { width: 19px; height: 19px; }
.header-action span { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); border: 2px solid #fff; }
.header-action:disabled { opacity: .68; cursor: wait; }
.header-action.syncing svg { animation: syncSpin .8s linear infinite; }
@keyframes syncSpin { to { transform: rotate(360deg); } }
.demo-strip { margin: 0 18px 13px; padding: 8px 11px; border: 1px solid #cde8ed; border-radius: 11px; background: var(--ice-soft); color: #4f6c73; font-size: 9px; line-height: 1.35; }
.demo-strip span { margin-right: 6px; color: var(--teal-800); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.demo-strip[data-sync-state="current"], .demo-strip[data-sync-state="review"] { border-color: #cddd87; background: var(--lime-soft); }
.demo-strip[data-sync-state="pending"], .demo-strip[data-sync-state="error"], .demo-strip[data-sync-state="check"] { border-color: #f0d493; background: var(--mango-soft); }
.demo-strip[data-sync-state="offline"] { border-color: #d8dee0; background: #eef1f1; }

.screens { min-height: calc(100vh - 130px); padding: 0 18px calc(104px + env(safe-area-inset-bottom)); }
.screen { display: grid; gap: 14px; animation: screenIn .24s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 2px 0 1px; }
.screen-kicker { display: block; margin-bottom: 4px; color: var(--teal-700); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.screen-head h1 { margin: 0; font-size: 25px; line-height: 1.08; letter-spacing: -.04em; }
.screen-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.text-action { min-height: 36px; padding: 7px 10px; border: 0; border-radius: 10px; background: var(--ice-soft); color: var(--teal-800); font-size: 9px; font-weight: 850; cursor: pointer; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-small); }
.section-card { padding: 16px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.section-head h2 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 4px 8px; border-radius: 999px; background: var(--ice-soft); color: var(--teal-800); font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge.good { background: var(--lime-soft); color: #536b00; }
.badge.warn { background: var(--mango-soft); color: #815800; }
.badge.danger { background: var(--coral-soft); color: #9a3e2c; }
.badge.blue { background: var(--blue-soft); color: #3659ad; }

.balance-card {
  position: relative;
  min-height: 212px;
  overflow: hidden;
  padding: 20px;
  border-radius: 23px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-950), var(--teal-700));
  box-shadow: 0 18px 42px rgba(9,47,52,.20);
}
.balance-card::before, .balance-card::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.balance-card::before { width: 175px; height: 175px; right: -64px; top: -65px; background: rgba(143,213,229,.17); }
.balance-card::after { width: 110px; height: 110px; left: -50px; bottom: -55px; background: rgba(172,203,52,.14); }
.balance-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.balance-label { color: #b9d6d9; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.balance-value { margin-top: 6px; font-size: 45px; line-height: 1; font-weight: 900; letter-spacing: -.055em; }
.balance-value span { margin-left: 3px; color: var(--ice); font-size: 12px; letter-spacing: 0; }
.balance-ring { position: relative; width: 74px; height: 74px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--lime) var(--progress,68%), rgba(255,255,255,.12) 0); }
.balance-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--teal-900); }
.balance-ring div { position: relative; z-index: 1; text-align: center; }
.balance-ring strong { display: block; font-size: 14px; }
.balance-ring span { display: block; margin-top: 1px; color: #b9d6d9; font-size: 7px; }
.progress-copy { position: relative; z-index: 1; margin-top: 25px; color: #d0e4e6; font-size: 10px; line-height: 1.45; }
.progress-copy strong { color: #fff; }
.mini-progress { position: relative; z-index: 1; height: 6px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.13); }
.mini-progress span { display: block; width: var(--progress,68%); height: 100%; border-radius: inherit; background: var(--lime); }

.quick-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.quick-action { min-height: 91px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 16px; display: grid; place-items: center; align-content: center; gap: 8px; background: #fff; text-align: center; cursor: pointer; box-shadow: var(--shadow-small); }
.quick-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--quick-bg,var(--ice-soft)); color: var(--quick-color,var(--teal-700)); }
.quick-icon svg { width: 18px; height: 18px; }
.quick-action span { font-size: 9px; font-weight: 850; line-height: 1.2; }

.next-shift { overflow: hidden; }
.next-shift-visual { min-height: 86px; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; background: linear-gradient(120deg, var(--teal-900), var(--teal-700)); }
.date-box { width: 49px; height: 49px; flex: 0 0 auto; border-radius: 13px; display: grid; place-content: center; text-align: center; background: #fff; color: var(--teal-900); }
.date-box span { color: var(--teal-700); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.date-box strong { font-size: 18px; line-height: 1; }
.shift-copy { flex: 1; min-width: 0; }
.shift-copy span { color: var(--ice); font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.shift-copy strong { display: block; margin-top: 5px; font-size: 14px; line-height: 1.25; }
.shift-points { padding: 6px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 8px; font-weight: 900; white-space: nowrap; }
.shift-details { padding: 13px 15px 15px; }
.meta-row { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.meta-row + .meta-row { margin-top: 7px; }
.meta-row svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--teal-700); }
.inline-action { width: 100%; min-height: 40px; margin-top: 12px; border: 0; border-radius: 12px; background: var(--ice-soft); color: var(--teal-800); font-size: 10px; font-weight: 900; cursor: pointer; }

.announcement { display: grid; grid-template-columns: 39px minmax(0,1fr) 18px; gap: 11px; align-items: center; padding: 13px; }
.announcement-icon { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; background: var(--mango-soft); color: #8a5c00; }
.announcement-icon svg { width: 18px; height: 18px; }
.announcement strong { display: block; font-size: 10.5px; }
.announcement p { margin: 4px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.4; }
.announcement > svg { width: 17px; height: 17px; color: #9aabad; }
.activity-prompt { display: flex; align-items: center; gap: 11px; padding: 13px; }
.activity-day { width: 43px; height: 43px; flex: 0 0 auto; border-radius: 13px; display: grid; place-content: center; text-align: center; background: var(--lime-soft); color: #536b00; }
.activity-day span { font-size: 7px; font-weight: 900; text-transform: uppercase; }
.activity-day strong { font-size: 13px; }
.activity-prompt > div:nth-child(2) { flex: 1; }
.activity-prompt strong { display: block; font-size: 10.5px; }
.activity-prompt p { margin: 4px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.35; }

.segment { display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; padding: 4px; border-radius: 13px; background: #e8efed; }
.segment.three { grid-template-columns: repeat(3,1fr); }
.segment button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 850; cursor: pointer; }
.segment button.active { background: #fff; color: var(--teal-800); box-shadow: 0 5px 15px rgba(9,47,52,.08); }
.shift-stack { display: grid; gap: 12px; }
.shift-card { overflow: hidden; }
.shift-card-head { padding: 14px 15px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.shift-card-head span { display: block; color: var(--teal-700); font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.shift-card-head h2 { margin: 5px 0 0; font-size: 15px; line-height: 1.25; }
.cost-pill { min-width: 62px; padding: 7px 9px; border-radius: 12px; text-align: center; background: var(--mango-soft); color: #815800; }
.cost-pill strong { display: block; font-size: 12px; }
.cost-pill span { display: block; margin-top: 1px; color: inherit; font-size: 7px; }
.shift-card-body { padding: 0 15px 15px; }
.seat-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #edf2f2; }
.seat-copy { color: var(--muted); font-size: 8.5px; }
.seat-copy strong { color: var(--ink); }
.primary-button, .secondary-button, .danger-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.primary-button { color: var(--teal-950); background: var(--lime); }
.secondary-button { color: var(--teal-800); background: var(--ice-soft); border-color: #c9e5eb; }
.danger-button { color: #973c2b; background: var(--coral-soft); border-color: #f7d5cd; }
.primary-button:disabled, .secondary-button:disabled { opacity: .48; cursor: not-allowed; }
.seat-status .primary-button, .seat-status .secondary-button, .seat-status .danger-button { min-height: 44px; padding: 7px 11px; font-size: 9px; }

.zoom-card { padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ice-soft); border-color: #b9dce5; }
.zoom-card span { display: block; color: var(--teal-700); font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.zoom-card strong { display: block; margin-top: 4px; font-size: 11px; }
.zoom-card a { min-height: 44px; padding: 8px 12px; border-radius: 11px; display: inline-flex; align-items: center; color: #fff; background: var(--teal-800); font-size: 9px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.program-stack { display: grid; gap: 10px; }
.program-card { padding: 13px; display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 12px; align-items: flex-start; }
.program-day { width: 50px; min-height: 58px; padding: 8px 4px; border-radius: 14px; display: grid; place-content: center; text-align: center; background: var(--lime-soft); color: #536b00; }
.program-day span { font-size: 7px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.program-day strong { margin-top: 3px; font-size: 16px; line-height: 1; }
.program-day small { margin-top: 2px; font-size: 6.5px; font-weight: 850; }
.program-copy { min-width: 0; }
.program-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.program-title > div { min-width: 0; }
.program-title span:not(.badge) { display: block; color: var(--teal-700); font-size: 7.5px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.program-title h2 { margin: 4px 0 0; font-size: 12px; line-height: 1.25; }
.program-title .badge { max-width: 126px; white-space: normal; text-align: center; line-height: 1.25; }
.point-editor { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #edf2f2; }
.point-editor label { display: grid; gap: 5px; color: var(--muted); font-size: 7.5px; font-weight: 850; }
.point-editor .control { min-height: 36px; padding: 7px 9px; }
.manager-shift-row { padding: 12px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid #edf2f2; }
.manager-shift-row:last-child { padding-bottom: 0; border-bottom: 0; }
.manager-shift-row:first-child { padding-top: 0; }
.manager-shift-row span { display: block; color: var(--teal-700); font-size: 7.5px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.manager-shift-row strong { display: block; margin-top: 4px; font-size: 11px; }
.manager-shift-row p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.35; }
.manager-shift-row > div:last-child { display: grid; justify-items: end; gap: 6px; }
.manager-shift-row .manager-free { color: #587100; }
.manager-shift-row button { min-width: 70px; min-height: 33px; padding: 6px 9px; font-size: 8px; }

.points-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.points-tile { min-height: 105px; padding: 15px; border-radius: 17px; background: var(--tile-bg,var(--ice-soft)); }
.points-tile span { color: var(--muted); font-size: 8.5px; }
.points-tile strong { display: block; margin-top: 9px; font-size: 25px; letter-spacing: -.04em; }
.points-tile p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.35; }
.ledger-list { display: grid; }
.ledger-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf2f2; }
.ledger-row:last-child { border-bottom: 0; }
.ledger-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ledger-bg,var(--lime-soft)); color: var(--ledger-color,#5a7300); }
.ledger-icon svg { width: 17px; height: 17px; }
.ledger-row strong { display: block; font-size: 10px; line-height: 1.3; }
.ledger-row p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.35; }
.ledger-amount { font-size: 11px; font-weight: 900; text-align: right; }
.ledger-amount.negative { color: #9a5c00; }
.ledger-amount.positive { color: #587100; }

.reward-stack { display: grid; gap: 11px; }
.reward-row { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px; }
.reward-art { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: var(--reward-bg,var(--ice-soft)); color: var(--reward-color,var(--teal-700)); }
.reward-art svg { width: 24px; height: 24px; }
.reward-row h2 { margin: 0; font-size: 12px; }
.reward-row p { margin: 4px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.35; }
.reward-meta { margin-top: 6px; display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 8px; }
.reward-action { min-width: 62px; text-align: right; }
.reward-action strong { display: block; font-size: 10px; }
.reward-action button { min-height: 44px; margin-top: 7px; padding: 5px 8px; border: 0; border-radius: 9px; background: var(--ice-soft); color: var(--teal-800); font-size: 8px; font-weight: 900; cursor: pointer; }
.reward-action button:disabled { opacity: .45; }

.profile-hero { padding: 18px; display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 14px; align-items: center; }
.profile-avatar { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--teal-800); color: #fff; font-size: 17px; font-weight: 900; box-shadow: inset 0 0 0 5px rgba(255,255,255,.08); }
.profile-hero h2 { margin: 0; font-size: 17px; }
.profile-hero p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.profile-list { display: grid; }
.profile-row { width: 100%; min-height: 55px; padding: 11px 0; border: 0; border-bottom: 1px solid #edf2f2; display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; gap: 10px; align-items: center; background: transparent; text-align: left; cursor: pointer; }
.profile-row:last-child { border-bottom: 0; }
.profile-row-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--ice-soft); color: var(--teal-700); }
.profile-row-icon svg { width: 17px; height: 17px; }
.profile-row strong { display: block; font-size: 10px; }
.profile-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; line-height: 1.35; }
.profile-row > svg { width: 17px; height: 17px; color: #9aabad; }
.role-card { overflow: hidden; padding: 16px; color: #fff; background: linear-gradient(130deg,var(--teal-950),var(--teal-700)); }
.role-card span { color: var(--ice); font-size: 8px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.role-card h2 { margin: 7px 0 5px; font-size: 16px; }
.role-card p { margin: 0; color: #c7dee0; font-size: 9px; line-height: 1.45; }
.role-card button { width: 100%; min-height: 44px; margin-top: 13px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; font-size: 9px; font-weight: 900; cursor: pointer; }
.install-card { padding: 15px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 11px; align-items: center; background: var(--mango-soft); border-color: #f1d899; }
.install-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: #8a5c00; }
.install-icon svg { width: 19px; height: 19px; }
.install-card strong { display: block; font-size: 10px; }
.install-card p { margin: 3px 0 0; color: #806d44; font-size: 8px; line-height: 1.35; }
.install-card button { min-height: 44px; padding: 6px 9px; border: 0; border-radius: 9px; background: #fff; color: #7e5600; font-size: 8px; font-weight: 900; cursor: pointer; }

.manager-hero { position: relative; overflow: hidden; padding: 18px; color: #fff; background: linear-gradient(135deg,var(--teal-950),var(--teal-700)); }
.manager-hero::after { content: ""; position: absolute; width: 115px; height: 115px; right: -35px; top: -45px; border-radius: 50%; background: rgba(143,213,229,.15); }
.manager-hero span { color: var(--ice); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.manager-hero h2 { margin: 8px 0 5px; font-size: 19px; letter-spacing: -.03em; }
.manager-hero p { max-width: 300px; margin: 0; color: #c6dfe1; font-size: 9px; line-height: 1.45; }
.manager-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.manager-kpi { min-height: 88px; padding: 12px; border-radius: 15px; background: var(--kpi-bg,var(--ice-soft)); }
.manager-kpi span { color: var(--muted); font-size: 7.8px; line-height: 1.3; }
.manager-kpi strong { display: block; margin-top: 8px; font-size: 20px; letter-spacing: -.04em; }
.action-list { display: grid; gap: 10px; }
.action-row { width: 100%; min-height: 62px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; display: grid; grid-template-columns: 40px minmax(0,1fr) 18px; gap: 11px; align-items: center; background: #fff; text-align: left; cursor: pointer; }
.action-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--action-bg,var(--ice-soft)); color: var(--action-color,var(--teal-700)); }
.action-icon svg { width: 19px; height: 19px; }
.action-row strong { display: block; font-size: 10.5px; }
.action-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; line-height: 1.35; }
.action-row > svg { width: 17px; height: 17px; color: #9aabad; }

.attendance-list { display: grid; gap: 10px; }
.attendance-card { padding: 13px; }
.attendance-person { display: flex; align-items: center; gap: 10px; }
.attendance-avatar { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--ice-soft); color: var(--teal-800); font-size: 10px; font-weight: 900; }
.attendance-person strong { display: block; font-size: 11px; }
.attendance-person span { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.status-buttons { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 12px; }
.status-button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-size: 8px; font-weight: 900; cursor: pointer; }
.status-button.active[data-status="Present"] { border-color: #cddd87; background: var(--lime-soft); color: #506700; }
.status-button.active[data-status="Late"] { border-color: #f0d493; background: var(--mango-soft); color: #815800; }
.status-button.active[data-status="No-show"] { border-color: #f3c7bc; background: var(--coral-soft); color: #983b29; }

.form { display: grid; gap: 13px; }
.field { display: grid; gap: 6px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field label { color: #526970; font-size: 8.5px; font-weight: 850; }
.control { width: 100%; min-height: 44px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 10px; }
textarea.control { min-height: 92px; resize: vertical; }
.field-help { margin: -1px 0 0; color: var(--muted); font-size: 7.8px; line-height: 1.4; }
.upload-card { border-color: #c9e5eb; background: linear-gradient(180deg,#fff,var(--ice-soft)); }
.upload-card .form { padding-top: 2px; }
.file-control { min-height: 54px; padding: 9px; background: #fff; }
.file-control::file-selector-button { min-height: 34px; margin-right: 10px; padding: 7px 10px; border: 0; border-radius: 9px; background: var(--ice-soft); color: var(--teal-800); font-size: 9px; font-weight: 900; cursor: pointer; }
.rating { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.rating button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 9px; font-weight: 900; cursor: pointer; }
.rating button.active { border-color: #afd8e0; background: var(--ice-soft); color: var(--teal-800); }
.submit-bar { position: sticky; bottom: calc(77px + env(safe-area-inset-bottom)); z-index: 12; padding: 9px 0; background: linear-gradient(transparent,var(--canvas) 25%); }
.submit-bar button { width: 100%; }

.team-list { display: grid; }
.team-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf2f2; }
.team-row:last-child { border-bottom: 0; }
.team-avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--ice-soft); color: var(--teal-800); font-size: 10px; font-weight: 900; }
.team-row strong { display: block; font-size: 10.5px; }
.team-row p { margin: 4px 0 0; color: var(--muted); font-size: 8.5px; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  width: min(100%,480px);
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 3px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
  box-shadow: 0 -8px 35px rgba(9,47,52,.07);
}
.nav-button { min-height: 53px; border: 0; border-radius: 13px; display: grid; place-items: center; align-content: center; gap: 4px; background: transparent; color: #708288; cursor: pointer; }
.nav-button svg { width: 19px; height: 19px; }
.nav-button span { font-size: 7.5px; font-weight: 850; }
.nav-button.active { background: var(--ice-soft); color: var(--teal-800); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-end; justify-content: center; background: rgba(4,35,39,.56); backdrop-filter: blur(4px); }
.sheet-backdrop.open { display: flex; }
.sheet { width: min(100%,480px); max-height: min(82vh,690px); overflow-y: auto; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -20px 60px rgba(0,0,0,.2); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 16px; border-radius: 999px; background: #d4dede; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-kicker { color: var(--teal-700); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.sheet-head h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.035em; }
.sheet-close { width: 44px; height: 44px; border: 0; border-radius: 11px; display: grid; place-items: center; background: var(--canvas); color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.sheet-body { margin-top: 16px; }
.sheet-body p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.sheet-summary { display: grid; gap: 9px; margin-top: 14px; padding: 13px; border-radius: 14px; background: var(--canvas); }
.sheet-summary-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; }
.sheet-summary-row strong { color: var(--ink); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; margin-top: 18px; }
.sheet-actions button { width: 100%; }
.compact-button { width: auto; min-width: 112px; padding-inline: 16px; }
.admin-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-card-actions button { min-height: 44px; flex: 1 1 96px; }
.admin-summary { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.admin-sheet-form { gap: 12px; }
.admin-sheet-form .field { margin: 0; }
.admin-sheet-form textarea.control { min-height: 84px; resize: vertical; }
.form-stack { display: grid; gap: 12px; }
.form-audience { display: inline-block; margin-top: 7px; color: var(--teal-700); font-size: 11px; font-weight: 800; }
.team-list { display: grid; gap: 8px; margin-bottom: 18px; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; }
.team-row p { margin: 3px 0 0; }
.team-row button { min-height: 44px; }
.admin-program-card .admin-card-actions { padding: 0 14px 14px; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); width: min(calc(100% - 28px),440px); padding: 12px 13px; border-radius: 14px; display: flex; align-items: center; gap: 10px; color: #fff; background: var(--teal-950); box-shadow: 0 18px 45px rgba(0,0,0,.24); transform: translate(-50%,18px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast-check { width: 29px; height: 29px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; background: var(--lime); color: var(--teal-950); }
.toast-check svg { width: 16px; height: 16px; }
.toast strong { display: block; font-size: 10px; }
.toast span { display: block; margin-top: 2px; color: #bdd1d3; font-size: 8.5px; line-height: 1.35; }

@media (min-width: 700px) {
  .app, .auth-shell { width: min(720px,calc(100% - 48px)); max-width: 720px; }
  .screens { padding-left: 26px; padding-right: 26px; }
  .app-header { padding-left: 26px; padding-right: 26px; }
  .demo-strip, .recovery-banner { margin-left: 26px; margin-right: 26px; }
}

@media (min-width: 1100px) {
  body { background: var(--canvas); }
  .app {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(210px,240px) minmax(0,1fr);
    grid-template-rows: auto auto auto auto 1fr;
    align-items: start;
    overflow: visible;
  }
  .auth-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 64px max(48px,calc((100vw - 560px)/2));
    border: 0;
    border-radius: 0;
    background: rgba(255,255,255,.86);
    box-shadow: none;
  }
  .offline-banner { grid-column: 1 / -1; grid-row: 1; }
  .app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 15px clamp(28px,4vw,64px);
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
  }
  .bottom-nav {
    position: sticky;
    top: 75px;
    left: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 3 / 6;
    width: 100%;
    height: calc(100vh - 75px);
    padding: 24px 16px;
    grid-template-columns: 1fr;
    grid-auto-rows: 64px;
    align-content: start;
    gap: 8px;
    border-top: 0;
    border-right: 1px solid var(--line);
    transform: none;
    box-shadow: 8px 0 30px rgba(9,47,52,.04);
  }
  .bottom-nav .nav-button {
    min-height: 64px;
    padding: 0 16px;
    grid-template-columns: 28px minmax(0,1fr);
    place-items: center start;
    align-content: center;
    gap: 12px;
  }
  .bottom-nav .nav-button svg { width: 22px; height: 22px; }
  .bottom-nav .nav-button span { font-size: 13px; line-height: 1.2; }
  .recovery-banner {
    grid-column: 2;
    grid-row: 3;
    width: min(calc(100% - 96px),1180px);
    justify-self: center;
    margin: 18px 0 0;
  }
  .demo-strip {
    grid-column: 2;
    grid-row: 4;
    width: min(calc(100% - 96px),1180px);
    justify-self: center;
    margin: 18px 0;
  }
  .recovery-banner:not([hidden]) + .app-header ~ .demo-strip { margin-top: 10px; }
  .screens {
    grid-column: 2;
    grid-row: 5;
    width: 100%;
    max-width: 1276px;
    min-height: calc(100vh - 154px);
    justify-self: center;
    padding: 0 48px 64px;
  }
  .screen { gap: 18px; }
  .action-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .toast { bottom: 32px; }
  .sheet { width: min(100%,620px); }
}

/* Legible tap and reading sizes for phones, tablets, and shared desktop computers. */
.auth-kicker, .review-accounts > span, .auth-privacy { font-size: 11px; }
.auth-copy p { font-size: 15px; }
.auth-form label, .auth-status { font-size: 13px; }
.auth-form button, .review-accounts button { font-size: 13px; }
.sync-note { font-size: 12px; }
.demo-strip, .screen-kicker, .header-brand span { font-size: 11px; }
.screen-head p { font-size: 14px; }
.section-head h2 { font-size: 16px; }
.section-head p, .reward-row p, .activity-prompt p, .manager-shift-row p, .profile-row span, .attendance-person span, .team-row p, .sheet-summary-row, .toast span { font-size: 12px; }
.badge, .shift-card-head span, .program-title span:not(.badge), .program-day span, .field label, .nav-button span { font-size: 11px; }
.balance-label, .progress-copy, .meta-row, .seat-copy, .reward-meta, .points-tile span, .points-tile p { font-size: 12px; }
.balance-ring span, .date-box span, .shift-copy span, .shift-points, .activity-day span, .cost-pill span, .program-day small, .point-editor label, .manager-shift-row span, .role-card span, .manager-hero span, .manager-kpi span, .field-help, .sheet-kicker { font-size: 11px; }
.quick-action span, .announcement p, .activity-prompt p, .zoom-card span, .program-title span:not(.badge), .ledger-row p, .profile-hero p, .role-card p, .install-card p, .manager-hero p, .action-row span, .attendance-person span, .team-row p, .sheet-summary-row, .toast span { font-size: 12px; }
.announcement strong, .activity-prompt strong, .ledger-row strong, .reward-action strong, .profile-row strong, .install-card strong, .attendance-person strong, .team-row strong { font-size: 13px; }
.shift-copy strong, .manager-shift-row strong, .ledger-amount, .action-row strong { font-size: 14px; }
.shift-card-head h2, .reward-row h2 { font-size: 15px; }
.program-title h2 { font-size: 14px; }
.cost-pill strong { font-size: 13px; }
.primary-button, .secondary-button, .danger-button, .inline-action, .segment button, .reward-action button { font-size: 13px; }
.seat-status .primary-button, .seat-status .secondary-button, .seat-status .danger-button, .zoom-card a, .role-card button, .install-card button, .manager-shift-row button, .status-button, .rating button, .file-control::file-selector-button { font-size: 12px; }
.text-action, .inline-action, .review-accounts button, .manager-shift-row button { min-height: 44px; }
.control { font-size: 16px; }
.nav-button span { line-height: 1.15; }
.sheet-body p { font-size: 13px; }
.toast strong { font-size: 13px; }
.nav-button { min-height: 56px; }

@media (max-width: 360px) {
  .screens { padding-left: 13px; padding-right: 13px; }
  .app-header { padding-left: 13px; padding-right: 13px; }
  .demo-strip, .recovery-banner { margin-left: 13px; margin-right: 13px; }
  .balance-card { padding: 17px; }
  .balance-value { font-size: 40px; }
  .quick-grid { gap: 7px; }
  .quick-action { padding-left: 4px; padding-right: 4px; }
  .shift-card-head { flex-direction: column; }
  .cost-pill { text-align: left; }
  .field-grid { grid-template-columns: 1fr; }
  .program-title { display: grid; }
  .program-title .badge { width: fit-content; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
