/* The mockup page: a contents list, then one section per screen. Phone screens are drawn at 390 by 844
   pixels with the phone app's colors (phone/src/components/ui.tsx); office screens are the saved pages. */

:root {
  --brand: #1f5fbf;
  --text: #1b1b1b;
  --muted: #5b5b5b;
  --error: #b3261e;
  --border: #c4c4c4;
  --surface: #ffffff;
  --page: #eef1f5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.35;
}

header { max-width: 900px; margin: 0 auto 24px; }
.lead { font-size: 17px; }
.toc p { font-weight: 700; margin: 8px 0; }
.toc ul { margin: 4px 0; padding-left: 20px; }
.toc a { color: var(--brand); }

main { max-width: 1100px; margin: 0 auto; }
h1 { font-size: 28px; margin: 40px 0 12px; border-bottom: 2px solid var(--brand); padding-bottom: 6px; }
section { margin: 0 0 36px; }
h2 { font-size: 18px; margin: 0 0 10px; }

/* Office pages sit in a frame at desktop width. */
iframe.office { width: 100%; height: 720px; border: 1px solid var(--border); background: var(--surface); }

/* The phone frame. */
.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 100%;
  border: 10px solid #222;
  border-radius: 36px;
  background: var(--surface);
  font-size: 16px;
}
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 6px 22px 2px;
  font-size: 12px;
  font-weight: 600;
}
.screen-title {
  padding: 4px 16px 8px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.screen { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.content { flex: 1; overflow-y: auto; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; border-top: 1px solid var(--border); background: #fafafa; }
.tab { flex: 1; text-align: center; padding: 10px 0 18px; font-size: 13px; color: var(--muted); }
.tab.active { color: var(--brand); font-weight: 700; }

.phone p { margin: 0; }
.title { font-size: 24px; font-weight: 700; }
.body { font-size: 16px; }
.muted { font-size: 13px; color: var(--muted); }
.label { font-size: 14px; font-weight: 600; }
.error { font-size: 15px; color: var(--error); }
.link { font-size: 15px; color: var(--brand); padding: 4px 0; }
.inline-link { color: var(--brand); }
.heading { font-size: 16px; font-weight: 700; margin-top: 8px; }
.card-name { font-size: 18px; font-weight: 700; }
.kind { font-size: 14px; font-weight: 600; color: var(--brand); }
.pay { font-size: 18px; font-weight: 700; }

.button {
  border-radius: 8px;
  padding: 13px 8px;
  text-align: center;
  font-weight: 600;
  background: var(--brand);
  color: var(--surface);
  border: 1px solid var(--brand);
}
.button.secondary { background: var(--surface); color: var(--brand); }
.button.destructive { background: var(--error); border-color: var(--error); }
.button.disabled { opacity: 0.5; }
.row { display: flex; gap: 8px; }
.row .cell { flex: 1; }

.field { display: flex; flex-direction: column; gap: 4px; }
.input { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-height: 42px; }
.input.tall { min-height: 72px; }
.placeholder { color: #9a9a9a; }
.counter { font-size: 12px; color: var(--muted); text-align: right; }

.box, .driver-card .box, .date, .agreement {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.driver-card { display: flex; flex-direction: column; gap: 8px; }
.strip { border: 1px solid var(--brand); border-radius: 8px; padding: 12px; }
.list-row { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.pair { display: flex; justify-content: space-between; gap: 8px; }
.line { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.line.strong { font-weight: 700; }

.choices { display: flex; flex-direction: column; gap: 6px; }
.choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.choice.chosen { border-color: var(--brand); }
.words { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.choice-label { font-size: 16px; }
.caption { font-size: 13px; color: var(--muted); }
.note { font-size: 13px; color: var(--error); }
.check { color: var(--brand); font-weight: 700; }

.tiers { display: flex; flex-direction: column; gap: 8px; }
.tier { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.tier.chosen { border: 2px solid var(--brand); }
.tier-picture { width: 72px; height: 72px; object-fit: contain; }

.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.switch { position: relative; flex: none; width: 50px; height: 30px; border-radius: 15px; background: #d0d0d0; }
.switch.on { background: #34c759; }
.switch.disabled { opacity: 0.5; }
.knob { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.switch.on .knob { left: 22px; }
.online { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.online .body { font-size: 18px; font-weight: 700; }

.check-row { display: flex; align-items: center; gap: 10px; }
.check-box {
  width: 24px; height: 24px; border: 1px solid var(--brand); border-radius: 4px;
  text-align: center; color: var(--brand); font-weight: 700;
}
.mark-row { display: flex; align-items: center; gap: 10px; }
.mark { width: 20px; text-align: center; font-weight: 700; color: var(--muted); }
.mark.done { color: var(--brand); }
.status-line { display: flex; gap: 8px; align-items: center; }
.sending { font-size: 13px; color: var(--brand); }

.photo { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; }
.photo.large { height: 280px; }
.card-photo { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; }
.card-photo.empty, .list-photo.empty { background: var(--border); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.thumb-row { display: flex; align-items: center; gap: 10px; }
.thumbs, .photo-row { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb-cell, .photo-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.remove { color: var(--error); font-size: 13px; }
.nearby { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.list-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.stars { font-size: 32px; color: var(--brand); letter-spacing: 8px; }

.role-choice {
  border: 2px solid var(--brand);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.role-label { font-size: 22px; font-weight: 700; color: var(--brand); }

/* A map is a plain box: no tiles, no key. */
.map {
  border: 1px dashed var(--muted);
  border-radius: 8px;
  background: #e7efe3;
  padding: 12px;
  min-height: 120px;
  font-size: 14px;
}
.map-title { font-weight: 700; }

/* A sheet over a dimmed backdrop. */
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 90%;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sheet-title { font-size: 20px; font-weight: 700; }

@media (max-width: 430px) {
  body { padding: 8px; }
  .phone { border-width: 4px; border-radius: 20px; }
}
