:root {
  --orange: #ff4f00;
  --orange-press: #e64600;
  --tint: #ff4f00;
  --label: #000;
  --secondary: rgba(60, 60, 67, 0.6);
  --tertiary: rgba(60, 60, 67, 0.3);
  --fill: #f2f2f7;
  --fill-2: #e5e5ea;
  --grouped: #f2f2f7;
  --card: #fff;
  --sep: rgba(60, 60, 67, 0.12);
  --red: #ff3b30;
  --green: #34c759;
  --blue: #007aff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --safe-top: 54px;
  --tab: 84px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { background: #0b0b0c; }
body {
  font-family: var(--font);
  color: var(--label);
  background: #0b0b0c;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, a { font-family: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* —— device —— */
.stage {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.phone {
  width: min(390px, 100%);
  height: min(844px, calc(100vh - 32px));
  max-height: 900px;
  background: var(--grouped);
  border-radius: 54px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 12px #1c1c1e,
    0 0 0 14px #3a3a3c,
    0 40px 80px rgba(0,0,0,.45);
}
.island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 40;
  pointer-events: none;
}

/* —— login —— */
.login {
  position: absolute;
  inset: 0;
  background: var(--orange);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 28px calc(48px + env(safe-area-inset-bottom));
  z-index: 30;
}
.login-hero {
  flex: 1;
  width: 100%;
  display: grid;
  place-items: center;
  padding-top: 48px;
}
.login-logo {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.login h1 { display: none; }
.login .claim { display: none; }
.login .sub {
  margin: 0 0 28px;
  color: rgba(255,255,255,.78);
  font-size: 15px;
  text-align: center;
  line-height: 1.35;
}
.btn {
  appearance: none;
  border: 0;
  width: 100%;
  height: 50px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.btn-primary { background: #fff; color: var(--orange); }
.btn-primary:active { background: #f2f2f2; }
.btn-ghost {
  background: transparent;
  color: #fff;
  height: 44px;
  font-weight: 500;
  opacity: .9;
  text-decoration: none;
  display: grid;
  place-items: center;
}
.login-foot {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  text-align: center;
  line-height: 1.4;
}

.app { display: none; position: absolute; inset: 0; }
body.is-in .login { display: none; }
body.is-in .app { display: flex; flex-direction: column; }

/* —— nav bar —— */
.nav {
  flex: none;
  padding: calc(var(--safe-top) + 6px) 16px 10px;
  background: rgba(242,242,247,.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
  z-index: 20;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
}
.brand-logo {
  height: 28px;
  width: 28px;
  object-fit: cover;
  border-radius: 7px;
}
.nav-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--fill-2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  position: relative;
  color: var(--label);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  border: 1.5px solid var(--fill);
}
.large-title {
  margin: 10px 0 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--tint);
  text-decoration: none;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 2px;
}
.back svg { width: 20px; height: 20px; }

.seg {
  display: flex;
  margin-top: 12px;
  padding: 2px;
  background: rgba(118, 118, 128, 0.12);
  border-radius: 9px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  height: 28px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--label);
}
.seg button.on {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

.mode {
  display: flex;
  margin: 0 0 12px;
  padding: 2px;
  background: rgba(118, 118, 128, 0.12);
  border-radius: 9px;
}
.mode button {
  flex: 1;
  border: 0;
  background: transparent;
  height: 28px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--label);
}
.mode button.on {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.month {
  background: #fff;
  border-radius: 16px;
  padding: 10px 8px 12px;
  margin-bottom: 12px;
}
.mhead, .mgrid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mhead {
  font-size: 11px;
  font-weight: 600;
  color: var(--secondary);
  text-align: center;
  padding-bottom: 6px;
}
.mday {
  border: 0;
  background: transparent;
  padding: 4px 0 6px;
  border-radius: 12px;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.mday .n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
}
.mday.on .n { background: var(--orange); color: #fff; }
.mday.today:not(.on) .n { box-shadow: inset 0 0 0 2px rgba(255, 79, 0, 0.4); }
.mday.out { opacity: 0.28; pointer-events: none; }
.mday .dots {
  display: flex;
  gap: 2px;
  height: 6px;
  align-items: center;
}
.mday .dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: block;
}

.hours-cell { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.hours-cell .txt { padding-top: 2px; }
.hours-cell .txt span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hbar {
  height: 4px;
  background: #e5e5ea;
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}
.hbar > i { display: block; height: 100%; border-radius: 99px; }
.hspark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  margin-top: 8px;
}
.hspark i {
  flex: 1;
  background: rgba(255, 79, 0, 0.28);
  border-radius: 2px 2px 0 0;
  min-height: 3px;
}
.hspark i.on { background: var(--orange); }

/* —— scroll —— */
.main {
  flex: 1;
  overflow: auto;
  padding: 12px 16px calc(var(--tab) + 16px);
  -webkit-overflow-scrolling: touch;
}

/* —— iOS grouped —— */
.group {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.caption {
  font-size: 13px;
  font-weight: 400;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 8px 16px 6px;
}
.cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px;
  text-decoration: none;
  background: var(--card);
  border-bottom: 0.5px solid var(--sep);
}
.cell:last-child { border-bottom: 0; }
.cell:active { background: #d1d1d6; }
.sym {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.sym svg { width: 18px; height: 18px; }
.sym.lg { width: 36px; height: 36px; border-radius: 10px; }
.cell .txt { flex: 1; min-width: 0; }
.cell .txt strong {
  display: block;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alert-cell .txt strong { white-space: normal; }
.cell .txt span {
  display: block;
  font-size: 13px;
  color: var(--secondary);
  margin-top: 1px;
}
.cell .val {
  font-size: 17px;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cell .val.emph { color: var(--label); font-weight: 600; }
.chev {
  width: 12px;
  height: 12px;
  color: #c7c7cc;
  flex: none;
}
.badge {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border-radius: 10px;
  padding: 2px 7px;
}
.badge.ok { background: var(--green); }
.badge.warn { background: var(--orange); }

/* widgets */
.hero {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 18px 14px;
  margin-bottom: 16px;
}
.hero .k {
  font-size: 13px;
  color: var(--secondary);
  font-weight: 500;
}
.hero .amt {
  margin: 4px 0 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.hero .delta { margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--green); }
.hero .delta.down { color: var(--red); }
.spark { height: 44px; margin-top: 12px; }
.spark svg { width: 100%; height: 100%; }

.alert-cell .sym { background: var(--red); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.tile {
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  text-decoration: none;
  min-height: 92px;
}
.tile .k { font-size: 13px; color: var(--secondary); display: flex; align-items: center; gap: 6px; }
.tile .k svg { width: 14px; height: 14px; color: var(--orange); }
.tile b {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.tile span { display: block; margin-top: 2px; font-size: 12px; color: var(--secondary); }

.heat { display: grid; gap: 4px; padding: 12px 12px 16px; }
.heat-row { display: grid; grid-template-columns: 26px repeat(11, minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat-lab, .heat-head { font-size: 9px; color: var(--secondary); text-align: center; }
.cell-h { aspect-ratio: 1; border-radius: 3px; background: #ffe5d6; }

.btn-ios {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}
.btn-ios svg { width: 18px; height: 18px; }
.btn-ios:active { background: var(--orange-press); }

.foot-note {
  text-align: center;
  font-size: 12px;
  color: var(--secondary);
  padding: 8px 16px 24px;
  line-height: 1.4;
}

/* tab bar */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--tab);
  padding: 6px 6px 18px;
  display: flex;
  background: rgba(249,249,249,.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
  z-index: 25;
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--tertiary);
  font-size: 10px;
  font-weight: 500;
}
.tabbar a svg { width: 26px; height: 26px; }
.tabbar a.on { color: var(--orange); }

.overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 50;
  place-items: end;
  padding: 12px;
}
.overlay.on { display: grid; }
.sheet-modal {
  width: 100%;
  background: var(--fill);
  border-radius: 14px;
  padding: 12px 16px 28px;
  max-height: 82vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.handle {
  width: 36px; height: 5px; border-radius: 99px;
  background: #c6c6c8; margin: 4px auto 16px;
}
.fake-doc {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
  color: #3a3a3c;
  line-height: 1.5;
  margin: 8px 0 14px;
}
.prog { height: 4px; background: #e5e5ea; border-radius: 99px; overflow: hidden; }
.prog > i { display: block; height: 100%; width: 0; background: var(--orange); transition: width 1s ease; }

.compare {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--sep);
  font-size: 16px;
}
.compare:last-child { border-bottom: 0; }
.compare .old { color: var(--secondary); text-decoration: line-through; font-size: 13px; }
.compare .new { color: var(--red); font-weight: 600; }
.tot { font-weight: 600; }

.photo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
  background: #eee;
}
.hero-photo {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  margin-bottom: 12px;
}
.brand-strip {
  position: relative;
  height: 140px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}
.brand-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-strip .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
  color: #fff;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 17px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.shots {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 6px;
  margin: 0 0 16px;
}
.shots img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  background: #eee;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
  background: var(--orange);
}
.avatar.gray { background: #8e8e93; }
.shift {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 0.5px solid var(--sep);
  font-size: 15px;
}
.shift:last-child { border-bottom: 0; }
.shift .when {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 92px;
}
.shift .who { flex: 1; }
.shift .loc {
  font-size: 12px;
  color: var(--secondary);
}
.ai {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,79,0,.22);
}
.ai .tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--orange);
  margin-bottom: 6px;
}
.ai .tag svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.ai p { margin: 0 0 12px; font-size: 15px; line-height: 1.35; color: var(--secondary); }
.ai h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.field {
  width: 100%;
  height: 44px;
  border: 0;
  background: #fff;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 17px;
  margin-bottom: 8px;
  outline: none;
}
.roles { display: flex; gap: 8px; margin: 8px 0 16px; }
.roles button {
  flex: 1;
  border: 0;
  background: #fff;
  border-radius: 10px;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 600;
}
.roles button.on { background: var(--orange); color: #fff; }
.roles.wrap { flex-wrap: wrap; }
.roles.wrap button { flex: 1 1 30%; }
.act {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.act button {
  border: 0;
  background: #fff;
  border-radius: 12px;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 600;
}

.today-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-decoration: none;
}
.today-card .txt { flex: 1; min-width: 0; }
.today-card .txt strong { display: block; font-size: 17px; font-weight: 600; }
.today-card .txt span { display: block; font-size: 13px; color: var(--secondary); margin-top: 2px; }
.faces { display: flex; align-items: center; }
.avatar.sm {
  width: 26px;
  height: 26px;
  font-size: 9px;
  margin-left: -6px;
  border: 2px solid #fff;
}
.faces .avatar.sm:first-child { margin-left: 0; }

button.cell {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: #fff;
  border-radius: 16px;
  padding: 8px 6px 10px;
  margin-bottom: 12px;
}
.week button {
  border: 0;
  background: transparent;
  padding: 4px 0 0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.week .d {
  font-size: 11px;
  font-weight: 600;
  color: var(--secondary);
}
.week .n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
}
.week button.on .n { background: var(--orange); color: #fff; }
.week button.on .d { color: var(--orange); }
.week button.peak .n { box-shadow: inset 0 0 0 2px rgba(255, 79, 0, 0.35); }

.cal-board {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
}
.cal-head, .cal-body {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
}
.cal-head.one, .cal-body.one { grid-template-columns: 28px 1fr; }
.cal-head {
  padding: 8px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--secondary);
  text-align: center;
}
.cal-body { height: 408px; }
.cal-hours { position: relative; }
.cal-hours span {
  position: absolute;
  left: 0;
  right: 2px;
  font-size: 9px;
  color: var(--secondary);
  text-align: right;
  transform: translateY(-50%);
}
.cal-lane {
  position: relative;
  border-left: 0.5px solid var(--sep);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(100% / 12 - 0.5px),
    var(--sep) calc(100% / 12 - 0.5px),
    var(--sep) calc(100% / 12)
  );
}
.cal-block {
  position: absolute;
  border: 0;
  border-radius: 10px;
  padding: 6px 7px;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  line-height: 1.2;
  box-sizing: border-box;
}
.cal-block small {
  display: block;
  font-weight: 500;
  opacity: 0.88;
  font-size: 10px;
  margin-top: 2px;
}

.ai.compact { padding: 12px 14px; margin-bottom: 12px; }
.ai.compact h3 { font-size: 16px; }
.ai.compact p { margin-bottom: 10px; font-size: 13px; }
.ai.compact .btn-ios { height: 44px; font-size: 16px; }

.cell-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  text-decoration: none;
  margin-bottom: 8px;
}
.sheet-person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar { position: relative; }
.avatar .live {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  background: #34c759;
  border: 2px solid #fff;
  border-radius: 50%;
}
.clock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.clock-row .txt { flex: 1; }
.clock-row .txt strong { display: block; font-size: 15px; }
.clock-row .txt span { font-size: 12px; color: var(--secondary); }
.mini-btn {
  border: 0;
  background: var(--orange);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}
.stock { border-bottom: 0.5px solid var(--sep); padding-bottom: 10px; }
.stock:last-child { border-bottom: 0; }
.track {
  position: relative;
  height: 4px;
  background: #e5e5ea;
  border-radius: 99px;
  margin: 0 16px 8px 60px;
  overflow: hidden;
}
.track > i { display: block; height: 100%; border-radius: 99px; position: relative; z-index: 1; }
.track > i.ghost {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  background: rgba(255, 79, 0, 0.28);
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.step button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--fill-2);
  font-size: 16px;
  font-weight: 600;
}
.step span { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  text-align: left;
}
.choice svg { width: 22px; height: 22px; color: var(--orange); flex: none; }
.choice strong { display: block; font-size: 16px; }
.choice em { font-style: normal; font-size: 13px; color: var(--secondary); }

@media (max-width: 480px) {
  html, body { background: #000; }
  .stage { padding: 0; }
  .phone {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
  .island { display: none; }
  :root { --safe-top: env(safe-area-inset-top, 44px); }
}
