@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --navy: #1B2A41;
  --navy-deep: #131F33;
  --orange: #E8622C;
  --orange-soft: #FBE2D6;
  --gray: #6B7280;
  --paper: #F7F5F1;
  --surface: #FFFFFF;
  --line: #DDD7C9;
  --green: #2F7A4D;
  --ink: #1E2530;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--ink);
}

.display { font-family: 'Oswald', sans-serif; letter-spacing: 0.01em; }
.mono { font-family: 'JetBrains Mono', monospace; }

.app-shell {
  max-width: 720px;
  margin: 24px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 70vh;
}

.topbar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: white;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 17px; }
.brand-sub { font-size: 11px; color: #B9C3D6; margin-top: -2px; }

.tabs { display: flex; gap: 6px; background: rgba(255,255,255,0.08); padding: 4px; border-radius: 10px; }
.tab {
  border: none; background: transparent; color: #C9D2E3; text-decoration: none;
  padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit;
}
.tab.is-active { background: var(--orange); color: white; }

.panel { padding: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px;
}
.card.narrow { max-width: 460px; margin: 0 auto; }

h2.h2 { font-size: 22px; margin: 0 0 6px 0; color: var(--navy); }
h3.h3 { font-size: 16px; margin: 0 0 10px 0; color: var(--navy); }
p.sub { font-size: 13.5px; color: var(--gray); margin: 0 0 16px 0; line-height: 1.5; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: white; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

.btn {
  border: none; border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: #D4541F; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }

.alert {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: #FCEAE6; color: #9A3412; font-size: 13px;
}

.status-pill {
  font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 100px;
  background: var(--orange-soft); color: #B6431B; white-space: nowrap; display: inline-block;
}
.status-pill.completed { background: #DCEEE1; color: var(--green); }

.timeline { margin-top: 6px; }
.tl-row { display: flex; gap: 12px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.stamp {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--gray);
  background: white; flex-shrink: 0; font-size: 13px;
}
.stamp.done { border-color: var(--green); color: var(--green); background: #F1F8F3; }
.stamp.active { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.stamp.future { opacity: 0.55; }
.tl-line { width: 2px; flex: 1; min-height: 22px; background: var(--line); margin: 2px 0; }
.tl-line.filled { background: var(--green); }
.tl-body { padding-bottom: 18px; flex: 1; }
.tl-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.tl-label.future { color: var(--gray); font-weight: 500; }
.tl-time { font-size: 12px; color: var(--gray); margin-top: 2px; }
.stop-pill { font-size: 11px; background: var(--navy); color: white; padding: 2px 8px; border-radius: 100px; font-weight: 600; margin-left: 6px; }

.meta-row { font-size: 13px; color: var(--gray); margin-top: 8px; }
.note-box { font-size: 13px; color: var(--ink); background: #F6F2EA; border-radius: 8px; padding: 10px; margin-top: 12px; line-height: 1.5; }

.confirm-code {
  font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 600;
  color: var(--navy); background: var(--orange-soft); border: 1.5px dashed var(--orange);
  border-radius: 10px; padding: 10px 22px; margin: 10px 0; letter-spacing: 0.05em; display: inline-block;
}

.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--gray);
}
.footer a { color: var(--gray); text-decoration: none; }
.footer a:hover { color: var(--navy); }

/* dispatch board */
.dispatch-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .dispatch-grid { grid-template-columns: 1fr; } }
.joblist { display: flex; flex-direction: column; max-height: 640px; }
.joblist-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.joblist-scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; }
.search-input { max-width: 200px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; }

.jobrow { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #FCFBF8; }
.jobrow-top { display: flex; justify-content: space-between; align-items: center; }
.jobid { font-size: 12.5px; font-weight: 600; color: var(--navy); margin-right: 8px; }
.jobname { font-size: 13.5px; font-weight: 600; }
.jobrow-svc { font-size: 12.5px; color: var(--gray); margin: 4px 0 8px; }
.jobrow-controls { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.jobrow-controls select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; flex: 1; min-width: 130px; }
.stop-input { width: 50px; border: 1px solid var(--line); border-radius: 6px; padding: 6px; font-size: 12.5px; text-align: center; }
.runner-input { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; width: 90px; }
.jobrow-notes { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; resize: vertical; font-family: inherit; }
.jobrow-meta { font-size: 11px; color: var(--gray); margin-top: 6px; }
.icon-btn { border: none; background: transparent; color: var(--gray); cursor: pointer; padding: 4px; border-radius: 6px; font-size: 13px; }
.icon-btn:hover { color: #B6431B; background: var(--orange-soft); }

.empty { text-align: center; padding: 24px 10px; color: var(--gray); font-size: 13.5px; }

.notiflog-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: none; cursor: pointer; padding: 0; margin-bottom: 4px;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px; color: var(--navy); font-size: 16px;
}
.notiflog-hint { font-size: 12px; color: var(--gray); margin: 4px 0 12px; }
.notiflog-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.notif-item { background: #FCFBF8; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.notif-meta { font-size: 11px; color: var(--gray); margin-bottom: 3px; }
.notif-text { font-size: 13px; color: var(--ink); line-height: 1.4; }
.notif-item.unsent { border-left: 3px solid #C9772E; }

.login-wrap { max-width: 340px; margin: 60px auto; text-align: center; }
.login-wrap input { text-align: center; }

/* profile badges on job cards */
.profile-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 100px;
  vertical-align: middle; margin-left: 6px; white-space: nowrap;
}
.profile-ok { background: #DCEEE1; color: var(--green); }
.profile-needed { background: #FEF3C7; color: #92400E; }
.resend-btn {
  border: none; background: #E8622C; color: white; border-radius: 4px;
  font-size: 10px; font-weight: 600; padding: 1px 7px; cursor: pointer; font-family: inherit;
}
.resend-btn:hover { background: #D4541F; }

/* service area ZIP validation */
.zip-error {
  margin-top: 6px; padding: 8px 12px; border-radius: 6px;
  background: #FEF2F2; border: 1px solid #FECACA;
  color: #991B1B; font-size: 12.5px; line-height: 1.5;
}

/* payment section in booking form */
.payment-divider {
  display: flex; align-items: center; gap: 10px; margin: 20px 0 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray);
}
.payment-divider::before, .payment-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.payment-summary { margin-bottom: 14px; }
.payment-amount { font-size: 22px; font-weight: 700; font-family: 'Oswald', sans-serif; color: var(--navy); }
.payment-note { font-size: 11.5px; color: var(--gray); margin-top: 4px; }
.card-element-wrap {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  background: #fafaf8; font-size: 14px;
}
.doc-options { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.doc-option-label {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 14px; font-weight: 400; color: var(--ink);
  text-transform: none; letter-spacing: 0; text-align: left;
}
.doc-option-label input[type="radio"] { width: 16px; height: 16px; flex-shrink: 0; margin: 0; }
.doc-info-box {
  background: #F0F4FF; border: 1px solid #C7D7FF; border-radius: 8px;
  padding: 12px 14px; font-size: 13px; line-height: 1.5; margin-bottom: 10px;
}

/* payment request on dispatch board */
.pay-req-wrap { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.pay-req-toggle {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--gray); padding: 3px 10px;
  cursor: pointer; font-family: inherit;
}
.pay-req-toggle:hover { border-color: var(--orange); color: var(--orange); }
.pay-req-form {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px;
}
.pay-req-amount {
  width: 100px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; font-family: inherit;
}
.pay-req-note {
  flex: 1; min-width: 160px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; font-family: inherit;
}
.pay-req-cancel {
  background: none; border: none; font-size: 12px; color: var(--gray);
  cursor: pointer; font-family: inherit; padding: 4px 6px;
}
.pay-req-cancel:hover { color: var(--ink); }

/* document download links on dispatch board */
.jobrow-docs { padding: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.doc-dl-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--navy); background: #F0F4FF;
  border: 1px solid #C7D7FF; border-radius: 6px; padding: 2px 8px;
  text-decoration: none; font-weight: 500;
}
.doc-dl-link:hover { background: #DDE8FF; }

/* intake form */
.intake-section-heading {
  font-family: 'Oswald', sans-serif; font-size: 15px; font-weight: 600;
  color: var(--navy); margin: 24px 0 14px; border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.intake-section-heading:first-of-type { margin-top: 8px; }
.required { color: var(--orange); }
.optional { font-size: 11px; font-weight: 400; color: var(--gray); }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr 1fr; } }
