/* Shared styles — matches the Wave 1 design mockups (Design artifact):
   warm neutral background, white cards, teal accent, Inter + Space Grotesk. */

:root {
  --accent: #0F766E;
  --accent-dark: #0b5a54;
  --bg: #F7F5F1;
  --card-border: #E7E4DD;
  --text-main: #1F2937;
  --text-sub: #6B7280;
  --text-faint: #9CA3AF;
  --text-body: #374151;
  --warn-bg: #FBF3E7;
  --warn-text: #92600A;
  --ok-bg: #ECF6F0;
  --ok-text: #166534;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-main);
  min-height: 100vh;
}

.page {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.brand-name span { color: var(--accent); }

h1, h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
}
h1 { font-size: 25px; line-height: 1.22; }
h2 { font-size: 18px; }

p.lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-sub);
}

.card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

label.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--text-body);
  line-height: 1.4;
}
label.check input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--text-body); }
.field input, .field textarea {
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
  font-family: 'Inter', sans-serif;
  width: 100%;
}
.field textarea { height: 64px; padding: 10px 14px; resize: none; }

.row { display: flex; gap: 10px; }
.row .field { flex: 1; }

button.primary {
  height: 50px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}
button.primary:disabled { opacity: .5; cursor: default; }
button.primary:hover:not(:disabled) { background: var(--accent-dark); }

button.secondary {
  height: 50px;
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

button.small {
  height: 38px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}
button.small.outline {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.fine-print {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-faint);
  text-align: center;
}

.footer-note {
  margin-top: auto;
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  padding-top: 6px;
}

.tabs {
  display: flex;
  background: #EFEBE3;
  border-radius: 12px;
  padding: 4px;
}
.tabs .tab {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  border-radius: 9px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
}
.tabs .tab.active { background: var(--accent); color: #fff; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: var(--text-body);
  font-size: 12px;
  cursor: pointer;
  background: #fff;
  font-family: 'Inter', sans-serif;
}
.pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.banner-warn {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--warn-bg);
  border-radius: 12px;
  padding: 12px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--warn-text);
}
.banner-ok {
  display: flex; gap: 9px; align-items: center;
  background: var(--ok-bg);
  border-radius: 12px;
  padding: 12px;
  font-size: 12.5px;
  color: var(--ok-text);
}

.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--card-border);
  border-radius: 12px; height: 46px; padding: 0 14px;
}
.search-bar input {
  border: none; outline: none; font-size: 13.5px; width: 100%;
  font-family: 'Inter', sans-serif; background: transparent;
}

.result-card {
  background: #fff; border: 1px solid var(--card-border);
  border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.result-card.disabled { opacity: .55; }
.result-head { display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 38px; height: 38px; border-radius: 999px;
  background: var(--card-border); color: var(--text-body);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.result-name { font-size: 14px; font-weight: 600; color: var(--text-main); }
.result-sub { font-size: 11.5px; color: var(--text-faint); }
.result-detail { font-size: 12.5px; color: var(--text-sub); }

.verified-badge { color: var(--accent); }

.decl-card { background: #fff; border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; }
.decl-photo { height: 150px; background: #EFEBE3; display: flex; align-items: center; justify-content: center; }
.decl-rows { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.decl-row { display: flex; justify-content: space-between; font-size: 13px; }
.decl-row span:first-child { color: var(--text-sub); }
.decl-row span:last-child { color: var(--text-main); font-weight: 600; }

.step-list { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.step-text { font-size: 13.5px; color: var(--text-body); line-height: 1.4; padding-top: 2px; }

.chat-log { display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; padding: 4px 0; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--card-border); color: var(--text-main); border-bottom-left-radius: 4px; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row textarea { flex: 1; height: 44px; border-radius: 10px; border: 1px solid var(--card-border); padding: 10px 14px; font-size: 13.5px; font-family: 'Inter', sans-serif; resize: none; }
.chat-input-row button { width: 70px; flex: none; }

.status-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.status-pill.requested, .status-pill.declared { background: var(--warn-bg); color: var(--warn-text); }
.status-pill.accepted { background: var(--ok-bg); color: var(--ok-text); }
.status-pill.delivered { background: var(--ok-bg); color: var(--ok-text); }
.status-pill.refused, .status-pill.cancelled { background: #FEE2E2; color: #B91C1C; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--card-border); }
table.admin-table th { color: var(--text-sub); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }

.error-text { font-size: 12.5px; color: #B91C1C; margin: 0; }
.link-muted {
  text-align: center; font-size: 11.5px; color: var(--text-faint);
  text-decoration: underline; cursor: pointer; background: none; border: none;
  font-family: 'Inter', sans-serif;
}
