/* New World Capital receive POC. Original yellow and black look.
   The mark lives in assets/nwc-mark.svg so it can be swapped later. */
:root {
  --gold: #F5C51A;
  --gold-deep: #D4A50A;
  --ink: #111111;
  --ink-soft: #2A2A2A;
  --paper: #FFF8E6;
  --card: #FFFFFF;
  --line: #E6D7A0;
  --muted: #5C5748;
  --ok: #1B6B3A;
  --ok-bg: #E8F6EC;
  --warn: #8A4B00;
  --warn-bg: #FFF1D6;
  --ask: #6B1D1D;
  --ask-bg: #FBECEC;
  --open: #1A3F73;
  --open-bg: #E7F0FA;
  --shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
  --radius: 18px;
  --font: "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: #0E0E0E;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.45;
}

body.customer-mode {
  background:
    radial-gradient(1200px 400px at 50% -80px, #2A2A2A, #0E0E0E);
}
body.teller-mode { background: #1A1A1A; }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 12px 24px;
}
.app-shell.teller {
  align-items: stretch;
}

.phone {
  width: 100%;
  max-width: 430px;
  background: var(--paper);
  min-height: calc(100vh - 24px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #333, var(--shadow);
  display: flex;
  flex-direction: column;
}
.teller .phone {
  max-width: 860px;
  margin: 0 auto;
}

.topbar {
  background: var(--ink);
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.topbar a { color: var(--gold); text-decoration: none; }
.nwc-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: block;
}
.brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand .name {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 13px;
  color: var(--gold);
}
.brand .tag {
  font-size: 11px;
  color: #F8E7A0;
  line-height: 1.3;
}
.topbar .link {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.progress {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
}
.progress span {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 99px;
}
.progress span.on { background: var(--ink); }
.progress span.done { background: var(--gold-deep); }

main.view {
  flex: 1;
  padding: 16px 16px 8px;
}
h1 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
h2 { font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.lead { font-size: 16px; color: var(--ink-soft); }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }

.hero-card, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 0 0 12px;
  box-shadow: var(--shadow);
}
.hero-card { background: var(--gold); border-color: var(--gold-deep); }

.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.benefit-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.benefit-list strong { display: block; font-size: 14px; }
.tick {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin: 0 0 6px;
}
input[type="text"], input[type="tel"], input[type="file"], select, textarea {
  width: 100%;
  border: 1.5px solid #C9B56A;
  border-radius: 12px;
  padding: 12px 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
  margin-bottom: 12px;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.btn-row { display: flex; gap: 8px; margin-top: 8px; }
button, .btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn.primary, button.primary {
  background: var(--ink);
  color: var(--gold);
  width: 100%;
}
.btn.secondary, button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  width: 100%;
}
.btn.ghost, button.ghost {
  background: transparent;
  color: var(--ink);
  width: auto;
  padding: 8px 4px;
  font-weight: 600;
  font-size: 14px;
}
.btn.small { width: auto; padding: 8px 12px; font-size: 13px; }
button:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.sample {
  background: var(--warn-bg);
  border: 1px dashed var(--gold-deep);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.sample code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  background: #fff;
  padding: 1px 6px;
  border-radius: 6px;
}

.notice, .ok, .ask, .openq {
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 12px;
  font-size: 14px;
}
.notice { background: var(--warn-bg); color: var(--warn); }
.ok { background: var(--ok-bg); color: var(--ok); }
.ask { background: var(--ask-bg); color: var(--ask); }
.openq { background: var(--open-bg); color: var(--open); }
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.badge.ask { background: var(--ask); color: #fff; padding: 3px 8px; }
.badge.open { background: var(--open); color: #fff; }
.badge.demo { background: var(--ink); color: var(--gold); }
.badge.nwc { background: var(--gold); color: var(--ink); }
.badge.other { background: #EEE; color: #444; }

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.review-row:last-child { border-bottom: 0; }
.review-row span { color: var(--muted); }
.review-row b { text-align: right; }

.id-grid { display: grid; gap: 8px; margin-bottom: 12px; }
.id-grid label.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  font-weight: 600;
  margin: 0;
}
.id-grid input { width: auto; margin: 3px 0 0; }
.id-grid label.choice.selected { border-color: var(--ink); background: #FFF6CC; }

.selfie-stage {
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  position: relative;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F8E7A0;
}
.selfie-stage video, .selfie-stage img, .selfie-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.selfie-stage .placeholder { padding: 20px; text-align: center; font-size: 14px; }

.branch {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  margin: 0 0 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-weight: 500;
  display: block;
}
.branch.selected { border-color: var(--ink); background: #FFF6CC; }
.branch .title { font-weight: 750; font-size: 15px; }
.branch .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.branch.disabled { cursor: not-allowed; opacity: 0.7; background: #F4F4F4; }

.slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.slots button {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 13px;
  width: auto;
  font-weight: 650;
}
.slots button.selected { background: var(--ink); color: var(--gold); border-color: var(--ink); }

.qr-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}
.qr-wrap #qrcode { width: 196px; height: 196px; }
.qr-wrap #qrcode img, .qr-wrap #qrcode canvas { width: 196px; height: 196px; }
.ref-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-top: 8px;
}

.footer-note {
  font-size: 11px;
  color: #7A7464;
  text-align: center;
  padding: 10px 16px 16px;
  line-height: 1.4;
}

.teller-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.teller-table th, .teller-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.teller-table th { font-size: 12px; color: var(--muted); font-weight: 700; }
.status {
  display: inline-block;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.status.wait { background: var(--warn-bg); color: var(--warn); }
.status.done { background: #EEE; color: #444; }

.home-actions { display: grid; gap: 8px; }
.q-card h2 { font-size: 16px; }
.q-card p { margin-bottom: 0; }

.days { display: flex; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; }
.days button {
  width: auto;
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  padding: 8px 10px;
}
.days button.selected { background: var(--ink); color: var(--gold); border-color: var(--ink); }

@media (max-width: 430px) {
  .app-shell { padding: 0; }
  .phone { border-radius: 0; min-height: 100vh; box-shadow: none; }
}

@media (max-width: 600px) {
  .teller-table thead { display: none; }
  .teller-table, .teller-table tbody, .teller-table tr, .teller-table td { display: block; width: 100%; }
  .teller-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin: 0 0 10px;
    padding: 6px 4px;
  }
  .teller-table td {
    border-bottom: 0;
    padding: 4px 8px;
  }
  .btn-row { flex-wrap: wrap; }
  .btn-row input { flex: 1 1 160px; }
}
