:root {
  --grice-navy: #04364E;
  --grice-blue: #7CB0D3;
  --grice-cream: #F0EDEB;
  --grice-orange: #FF7F00;
  --gwg-teal: #0B6E6E;
  --gwg-mint: #2A9D8F;
  --gwg-sand: #F4F7F5;
  --text: #1a2b33;
  --muted: #5b6b73;
  --line: #d7e0e5;
  --ok: #1b7f4a;
  --warn: #b86e00;
  --bad: #b42318;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(4, 54, 78, 0.12);
  --radius: 18px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, #eaf3f8 0%, #f7f4f1 45%, #ffffff 100%);
  min-height: 100%;
}
body {
  -webkit-font-smoothing: antialiased;
}
a { color: var(--grice-navy); }
button, input, select, textarea {
  font: inherit;
}
.app-shell {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 16px 16px 48px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--grice-navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
}
.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}
.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.card {
  background: var(--card);
  border: 1px solid rgba(4, 54, 78, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.card .sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}
.biz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 420px) {
  .biz-grid { grid-template-columns: 1fr 1fr; }
}
.biz-card {
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.biz-card:hover { transform: translateY(-1px); }
.biz-card.selected-grice {
  border-color: var(--grice-navy);
  box-shadow: 0 0 0 3px rgba(4, 54, 78, 0.12);
  background: linear-gradient(180deg, #fff, #eef6fb);
}
.biz-card.selected-gwg {
  border-color: var(--gwg-teal);
  box-shadow: 0 0 0 3px rgba(11, 110, 110, 0.14);
  background: linear-gradient(180deg, #fff, #eef8f6);
}
.biz-card strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.biz-card span { color: var(--muted); font-size: 0.85rem; }
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 650;
  margin-bottom: 6px;
}
.field .hint {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  margin-top: 4px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  background: #fff;
  color: var(--text);
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(124, 176, 211, 0.55);
  border-color: var(--grice-blue);
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  background: #f5fafc;
  border: 1px solid #d7e8f0;
}
.checkbox input { margin-top: 3px; width: 18px; height: 18px; }
.checkbox label { font-size: 0.9rem; line-height: 1.35; }
.btn {
  appearance: none;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}
.btn-primary {
  background: var(--grice-navy);
  color: #fff;
}
.btn-primary.gwg {
  background: var(--gwg-teal);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-secondary {
  background: #fff;
  color: var(--grice-navy);
  border: 1px solid var(--line);
}
.btn-accent {
  background: var(--grice-orange);
  color: #fff;
}
.btn-danger {
  background: #fff;
  color: var(--bad);
  border: 1px solid #f0c7c3;
}
.btn-ok {
  background: var(--ok);
  color: #fff;
}
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.hidden { display: none !important; }
.banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.banner-info { background: #e8f3fb; color: #0d3d55; }
.banner-ok { background: #e7f6ec; color: #14532d; }
.banner-warn { background: #fff4e0; color: #7a4d00; }
.banner-err { background: #fdeceb; color: #7f1d1d; }
.confirm {
  text-align: center;
  padding: 28px 12px;
}
.confirm .big {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: #e7f6ec;
  color: var(--ok);
  font-size: 2rem;
  font-weight: 800;
}
.confirm h2 { margin: 0 0 8px; }
.confirm p { color: var(--muted); margin: 0 0 18px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill-pending { background: #fff4e0; color: #7a4d00; }
.pill-approved { background: #e7f6ec; color: #14532d; }
.pill-declined { background: #fdeceb; color: #7f1d1d; }
.pill-suggested { background: #e8f3fb; color: #0d3d55; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.filters select {
  flex: 1;
  min-width: 140px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
}
.request {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}
.request header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.request h3 {
  margin: 0;
  font-size: 1rem;
}
.request .meta {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.request .actions {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.outbox-item {
  border-left: 3px solid var(--grice-blue);
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #f7fbfe;
  border-radius: 0 10px 10px 0;
  font-size: 0.85rem;
}
.outbox-item .to { font-weight: 700; }
.outbox-item pre {
  white-space: pre-wrap;
  margin: 6px 0 0;
  font-family: inherit;
  color: var(--muted);
}
.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  margin-top: 8px;
}
.install-tip {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
}
.login-box {
  max-width: 420px;
  margin: 40px auto;
}
.staff-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.tab {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  font-weight: 650;
  cursor: pointer;
}
.tab.active {
  background: var(--grice-navy);
  color: #fff;
  border-color: var(--grice-navy);
}
.tiny {
  font-size: 0.78rem;
  color: var(--muted);
}
