:root {
  --blue: #1763E9;
  --blue-600: #1257cf;
  --blue-700: #0f49ad;
  --blue-050: #eef4ff;
  --blue-100: #dbe8ff;
  --ink: #0c1524;
  --ink-2: #3a4658;
  --muted: #7a8699;
  --line: #e7ebf2;
  --bg: #f6f8fc;
  --card: #ffffff;
  --green: #16a34a;
  --green-050: #e9f8ef;
  --red: #dc2626;
  --red-050: #fdecec;
  --amber: #d97706;
  --amber-050: #fef3e2;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(16, 39, 84, 0.08);
  --shadow-sm: 0 2px 8px rgba(16, 39, 84, 0.06);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #0a1020;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
}

/* Phone frame */
.device {
  width: 390px;
  max-width: 100%;
  height: 844px;
  max-height: calc(100vh - 64px);
  background: #0c1220;
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 2px #232b3d;
  position: relative;
}
.device__notch {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 150px; height: 28px;
  background: #0c1220;
  border-radius: 0 0 18px 18px;
  z-index: 20;
}
.device__screen {
  background: var(--bg);
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.statusbar {
  height: 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  flex: 0 0 auto;
  letter-spacing: .3px;
}
.statusbar--onblue { color: #fff; }
.statusbar__right { font-size: 10px; letter-spacing: 1px; }

.app {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.app::-webkit-scrollbar { width: 0; }

/* Screen wrapper */
.screen { min-height: 100%; display: flex; flex-direction: column; }
.screen--pad { padding: 8px 20px 28px; }
.screen--blue { background: var(--blue); color: #fff; }

/* Tab bar */
.tabbar {
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  border-top: 1px solid var(--line);
  background: #fff;
}
.tabbar button {
  flex: 1; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10px; color: var(--muted); font-weight: 600;
}
.tabbar button .ic { font-size: 18px; line-height: 1; }
.tabbar button.active { color: var(--blue); }

/* Typography */
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.15; }
h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
h3 { font-size: 15px; font-weight: 700; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.center { text-align: center; }
.strong { font-weight: 700; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; cursor: pointer;
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  padding: 15px; border-radius: 14px;
  transition: transform .05s ease, background .15s ease;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue-100); }
.btn--dark { background: var(--ink); }
.btn--light { background: var(--blue-050); color: var(--blue); }
.btn--sm { padding: 10px 14px; font-size: 13px; width: auto; border-radius: 11px; }
.btn--danger { background: var(--red); }
.btn--wide { width: 100%; }
.btn-row { display: flex; gap: 10px; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  border: 1px solid var(--line);
}
.card + .card { margin-top: 12px; }
.card--flat { box-shadow: none; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; font-size: 15px; font-family: var(--font);
  padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); outline: none;
}
.input:focus { border-color: var(--blue); }
textarea.input { resize: none; min-height: 76px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--blue); flex: 0 0 auto; }

/* Hero (welcome) */
.hero { padding: 26px 24px 30px; display: flex; flex-direction: column; height: 100%; }
.logo-badge {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; font-family: Georgia, serif;
}
.hero__stats { display: flex; gap: 22px; margin: 22px 0 auto; }
.hero__stat b { font-size: 20px; display: block; }
.hero__stat span { font-size: 11px; opacity: .8; }

.lang {
  align-self: flex-end;
  background: rgba(255,255,255,.16); color: #fff;
  border: 0; font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: 20px; cursor: pointer;
}

/* Trade grid */
.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trade {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 13px; cursor: pointer; text-align: left;
  transition: border-color .15s, transform .05s;
}
.trade:active { transform: scale(0.98); }
.trade:hover { border-color: var(--blue-100); }
.trade__ic {
  width: 38px; height: 38px; border-radius: 10px;
  background: #fff; color: var(--blue); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; margin-bottom: 9px; padding: 3px; overflow: hidden;
}
.ticon { width: 100%; height: 100%; object-fit: contain; display: block; }
.trade__name { font-weight: 700; font-size: 14px; }
.trade__blurb { font-size: 11px; color: var(--muted); margin: 2px 0 8px; line-height: 1.35; min-height: 28px; }
.trade__rate { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.trade__rate b { color: var(--blue); }

/* Banner */
.banner {
  display: flex; gap: 10px; align-items: center;
  background: var(--amber-050); color: var(--amber);
  border-radius: 12px; padding: 11px 13px; font-size: 12px; font-weight: 600;
  margin-bottom: 14px;
}
.banner--blue { background: var(--blue-050); color: var(--blue); }
.banner--green { background: var(--green-050); color: var(--green); }

/* Address bar */
.addr { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }

/* Provider match card */
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; cursor: pointer; }
.pcard:hover { border-color: var(--blue-100); }
.pcard__top { display: flex; gap: 12px; align-items: center; }
.avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: 0 0 auto; }
.avatar--lg { width: 60px; height: 60px; border-radius: 16px; font-size: 20px; }
.pcard__name { font-weight: 700; font-size: 15px; }
.pcard__meta { font-size: 11px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; background: var(--blue-050); color: var(--blue); }
.chip--green { background: var(--green-050); color: var(--green); }
.pcard__stats { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pcard__stat { text-align: center; flex: 1; }
.pcard__stat b { font-size: 14px; display: block; }
.pcard__stat span { font-size: 10px; color: var(--muted); }
.pcard__total { text-align: right; }
.pcard__total b { font-size: 15px; color: var(--blue); }

/* Verify list */
.vrow { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.vrow:last-child { border-bottom: 0; }
.vrow__ic { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; flex: 0 0 auto; }
.vrow__ic--ok { background: var(--green); }
.vrow__ic--pending { background: var(--amber); }
.vrow__body { flex: 1; }
.vrow__body b { font-size: 13px; }
.vrow__body span { font-size: 11px; color: var(--muted); display: block; }
.vrow__tag { font-size: 10px; font-weight: 700; }
.vrow__tag--ok { color: var(--green); }
.vrow__tag--pending { color: var(--amber); }

/* Quote lines */
.qline { display: flex; justify-content: space-between; padding: 9px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.qline:last-of-type { border-bottom: 0; }
.qline span:first-child { color: var(--ink-2); }
.qtotal { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 4px; border-top: 2px solid var(--ink); font-weight: 800; font-size: 17px; }
.earn-box { background: var(--ink); color: #fff; border-radius: 14px; padding: 14px; margin-top: 14px; }
.earn-box .r { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.earn-box .r b { color: #6ee7a8; }
.earn-box .big { font-size: 22px; font-weight: 800; }

/* Matching animation */
.pulse-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.pulse { width: 92px; height: 92px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; position: relative; }
.pulse::before, .pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue); animation: ring 1.8s ease-out infinite; }
.pulse::after { animation-delay: .9s; }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(2.1); opacity: 0; } }

/* Face scan */
.facescan { width: 200px; height: 200px; border-radius: 50%; margin: 20px auto; position: relative; background: radial-gradient(circle, #0c1220, #1a2740); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.facescan__ring { position: absolute; inset: 8px; border-radius: 50%; border: 3px solid var(--blue); border-top-color: transparent; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Map */
.map { height: 190px; border-radius: 14px; background:
  linear-gradient(0deg, rgba(23,99,233,.05), rgba(23,99,233,.05)),
  repeating-linear-gradient(0deg, #eef2f8 0 24px, #e7edf6 24px 25px),
  repeating-linear-gradient(90deg, #eef2f8 0 24px, #e7edf6 24px 25px);
  position: relative; overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
.map__route { position: absolute; top: 40%; left: 12%; width: 70%; height: 2px; background: var(--blue); transform: rotate(-14deg); }
.map__dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.map__pin { position: absolute; font-size: 18px; }

/* Messages */
.msg { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 13px; margin-bottom: 8px; line-height: 1.35; }
.msg--in { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg--out { background: var(--blue); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.msg-input { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.msg-input .input { flex: 1; }

/* Stars */
.stars { display: flex; gap: 6px; justify-content: center; font-size: 30px; color: #d8dee9; margin: 6px 0 14px; }
.stars span { cursor: pointer; }
.stars span.on { color: #f5b301; }

/* Success */
.success-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 16px; }

/* Earnings header */
.earn-hero { background: var(--blue); color: #fff; border-radius: 16px; padding: 18px; }
.earn-hero .bal { font-size: 30px; font-weight: 800; }
.earn-hero__grid { display: flex; gap: 10px; margin-top: 14px; }
.earn-hero__grid > div { flex: 1; background: rgba(255,255,255,.14); border-radius: 11px; padding: 10px; text-align: center; }
.earn-hero__grid b { font-size: 15px; display: block; }
.earn-hero__grid span { font-size: 10px; opacity: .85; }

/* Job (provider incoming) */
.jobrow { border: 1px solid var(--line); border-radius: 13px; padding: 13px; margin-bottom: 11px; }
.jobrow__head { display: flex; justify-content: space-between; align-items: baseline; }
.jobrow__val { color: var(--blue); font-weight: 800; }

/* Rate card table */
.ratecard { width: 100%; font-size: 13px; border-collapse: collapse; }
.ratecard th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ratecard td { padding: 11px 6px; border-bottom: 1px solid var(--line); }
.ratecard td:last-child, .ratecard th:last-child { text-align: right; color: var(--amber); font-weight: 700; }

/* misc */
.back { background: none; border: 0; font-size: 14px; color: var(--ink-2); cursor: pointer; padding: 12px 0 8px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.spacer { flex: 1; }
.mt { margin-top: 14px; } .mt-sm { margin-top: 8px; } .mb { margin-bottom: 14px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.pill-row { display: flex; gap: 8px; margin-bottom: 14px; }
.pill { flex: 1; text-align: center; padding: 11px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.pill.active { border-color: var(--blue); background: var(--blue-050); color: var(--blue); }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13px; z-index: 100; box-shadow: var(--shadow); }
.toggle { width: 44px; height: 26px; border-radius: 20px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex: 0 0 auto; }
.toggle.on { background: var(--blue); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle.on::after { left: 21px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }

/* Photo thumbnails (job request / build quote) */
.thumb-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; border-radius: 11px; background: #eef2f8 center/cover no-repeat; border: 1px solid var(--line); position: relative; flex: 0 0 auto; }
.thumb--add { display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--muted); cursor: pointer; background: var(--blue-050); border: 1px dashed var(--blue-100); }
.thumb__rm { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Instant book (horizontal scroll strip) */
.instant-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.instant-scroll::-webkit-scrollbar { height: 0; }
.ib-card { flex: 0 0 auto; width: 130px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; cursor: pointer; }
.ib-card:hover { border-color: var(--blue-100); }
.ib-card__trade { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: var(--blue); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; margin-bottom: 8px; padding: 2px; overflow: hidden; }
.ib-card__label { font-size: 12.5px; font-weight: 700; line-height: 1.25; min-height: 32px; }
.ib-card__price { font-size: 11px; color: var(--muted); margin-top: 6px; }
.ib-card__price b { color: var(--blue); font-size: 13px; }

/* Performance stat tiles (provider profile) */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-tile { background: var(--blue-050); border-radius: 11px; padding: 12px; text-align: center; }
.stat-tile b { font-size: 18px; display: block; color: var(--ink); }
.stat-tile span { font-size: 11px; color: var(--muted); }

/* ETA card (live tracking) */
.eta-card { display: flex; align-items: center; justify-content: space-between; background: var(--blue); color: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.eta-card__big { font-size: 26px; font-weight: 800; line-height: 1; }
.eta-card__ic { font-size: 26px; opacity: .9; }

/* In-app call screen (masked numbers) */
.callscreen { position: absolute; inset: 0; z-index: 60; background: linear-gradient(180deg, #0f49ad, #0a2f74); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 60px 24px 40px; text-align: center; }
.callscreen__top { display: flex; flex-direction: column; align-items: center; }
.callscreen__avatar { margin: 26px auto 12px; background: rgba(255,255,255,.16); font-size: 26px; }
.callscreen__status { color: #cfe0ff; margin-top: 6px; font-size: 15px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.callscreen__note { color: #bcd2f5; font-size: 12px; line-height: 1.5; max-width: 260px; }
.callscreen__controls { display: flex; gap: 26px; align-items: flex-end; }
.callbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #eaf1ff; font-size: 11px; cursor: pointer; }
.callbtn__ic { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.callbtn--end .callbtn__ic { background: var(--red); transform: rotate(135deg); }

.stage-hint { color: #93a0b8; font-size: 12px; margin-top: 14px; text-align: center; }
.linkbtn { background: none; border: 0; color: #7fb0ff; cursor: pointer; font-size: 12px; text-decoration: underline; font-family: var(--font); }
.err { color: var(--red); font-size: 12px; margin-top: 8px; }

@media (max-height: 860px) { .device { height: calc(100vh - 40px); } }
@media (max-width: 430px) {
  body { padding: 0; }
  .device { border-radius: 0; padding: 0; height: 100vh; max-height: none; }
  .device__screen { border-radius: 0; }
  .device__notch { display: none; }
  .stage-hint { display: none; }
}
