/* Roybal Customer Portal — read-only status page. Branded to match the
   field app (navy chrome, orange accent), responsive, light. */
:root {
  --navy: #16395a; --navy-2: #1e4a72; --brand: #f26a21; --brand-dark: #d4520f;
  --ink: #18202c; --ink-2: #3b4656; --muted: #6a7585;
  --line: #e6e9ef; --bg: #f3f4f6; --panel: #fff;
  --green: #1f9d55;
  --header-grad: linear-gradient(135deg, #21527e 0%, #1a4569 52%, #123450 100%);
  --shadow: 0 4px 16px rgba(16,24,40,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 16px;
  -webkit-text-size-adjust: 100%;
  display: flex; flex-direction: column; min-height: 100vh;
}

.top { background: var(--header-grad); color: #fff; padding: calc(env(safe-area-inset-top) + 16px) 16px 16px; }
.top__inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 13px; }
.mark { width: 46px; height: 46px; border-radius: 12px; background: #fff; padding: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18); flex: 0 0 auto; box-sizing: border-box; }
.top strong { display: block; font-size: 16px; letter-spacing: .2px; }
.top span { font-size: 12.5px; color: rgba(255,255,255,.82); }

.wrap { flex: 1; max-width: 760px; width: 100%; margin: 0 auto; padding: 20px 16px 40px; }
.loading, .msg { text-align: center; color: var(--muted); padding: 60px 16px; }
.msg .big { font-size: 40px; margin-bottom: 10px; }
.msg h2 { color: var(--navy); margin: 0 0 6px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }

.hero h1 { font-size: 22px; margin: 0 0 2px; letter-spacing: -.2px; }
.hero .addr { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.statusbadge { display: inline-flex; align-items: center; gap: 8px; background: var(--brand);
  color: #fff; font-weight: 700; font-size: 15px; padding: 8px 16px; border-radius: 999px; }
.statusbadge .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; }

.sectitle { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin: 0 0 14px; }

/* milestone timeline */
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-bottom: 18px; }
.step:last-child { padding-bottom: 0; }
.step__rail { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
.step__dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong, #d4dae3);
  background: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); z-index: 1; }
.step:not(:last-child) .step__rail::after { content: ""; position: absolute; top: 24px; bottom: -18px;
  width: 2px; background: var(--line); }
.step--done .step__dot { background: var(--green); border-color: var(--green); color: #fff; }
.step--done:not(:last-child) .step__rail::after { background: var(--green); }
.step--current .step__dot { background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 0 0 4px rgba(242,106,33,.18); }
.step__label { padding-top: 1px; font-size: 15px; color: var(--ink-2); }
.step--current .step__label { font-weight: 800; color: var(--ink); }
.step--done .step__label { color: var(--ink); }
.step--upcoming .step__label { color: var(--muted); }

/* photo gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 620px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 380px) { .gallery { grid-template-columns: 1fr; } }
.photo { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #eef1f5; }
.photo figcaption { padding: 8px 10px; font-size: 12.5px; color: var(--ink-2); }
.photo .stage { color: var(--muted); text-transform: capitalize; }

/* message thread */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto;
  padding: 2px 2px 4px; margin-bottom: 14px; }
.thread__empty { color: var(--muted); font-size: 14px; text-align: center; padding: 22px 8px; margin: 0; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 15px; }
.bubble__body { white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; }
.bubble__meta { font-size: 11px; margin-top: 3px; opacity: .72; }
.bubble--them { align-self: flex-start; background: #eef1f5; color: var(--ink); border-bottom-left-radius: 5px; }
.bubble--me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.bubble--me .bubble__meta { color: #fff; }

.composer { display: flex; gap: 9px; align-items: flex-end; }
.composer__input { flex: 1; resize: none; font: inherit; font-size: 15px; line-height: 1.4;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink);
  max-height: 140px; overflow-y: auto; }
.composer__input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,106,33,.15); }
.composer__send { flex: 0 0 auto; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px;
  border: none; border-radius: 13px; padding: 11px 20px; cursor: pointer; }
.composer__send:disabled { opacity: .55; cursor: default; }
.composer__send:not(:disabled):active { background: var(--brand-dark); }
.composer__status { color: var(--brand-dark); font-size: 13px; margin-top: 8px; min-height: 1px; }

/* "typing" indicator while the concierge is thinking */
.bubble--typing .bubble__body { padding: 2px 0; }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block;
  animation: dot 1.2s infinite ease-in-out both; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.foot a { color: var(--navy-2); }
