/* ============================================================
   Soro · the provider drop
   ------------------------------------------------------------
   Deliberately quieter than the patient portal. That portal is
   somebody's own place and is painted like one; this is a page a
   stranger lands on from an email they weren't expecting, and
   the job is to look unmistakably like a real company and make
   one action obvious. So: white paper, one column, the brand
   green used once, and nothing that moves for decoration.

   Light only. A billing clerk's browser is a work machine on a
   dark-mode default half the time, and a form that changes
   colour scheme is one more reason to hesitate — this page
   always looks the same, which is the point of it.
   ============================================================ */

:root {
  --pine: #2E6B4F;
  --pine-deep: #1B3D2D;
  --ink: #141614;
  --text: #33372F;
  --muted: #6E7268;
  --line: #E5E7DF;
  --line-strong: #D5D8CD;
  --wash: #F6F7F3;
  --flag: #C03B30;
  --flag-bg: #FBEFED;
  --ok: #2E6B4F;
  --r: 14px;
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: light; }

body {
  min-height: 100vh;
  background: var(--wash);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.mark { height: 26px; width: auto; display: block; }
.top-note {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}

main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 32px 20px 12px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 28px;
  box-shadow: 0 1px 2px rgba(16, 20, 14, .04), 0 16px 40px -28px rgba(16, 20, 14, .35);
}

h1 { font-size: 25px; line-height: 1.25; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 700; color: var(--ink); }
.lead { margin-top: 10px; color: var(--text); }

/* ---------- what this is for ---------- */

.facts {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.facts > div {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: none; }
.facts dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.facts dd { font-size: 14.5px; color: var(--ink); }
/* The one line a clerk checks against their own chart before sending
   anything, so it is the one line set apart. */
.facts dd.patient { font-size: 17px; font-weight: 700; }

.already {
  margin: -8px 0 22px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--wash);
  font-size: 13.5px; color: var(--muted);
}

/* ---------- who is sending ---------- */

.who { margin-bottom: 22px; }
.hint { margin-top: 3px; font-size: 13px; color: var(--muted); }
.who-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.who-row label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.who-row input {
  display: block; width: 100%; margin-top: 5px; padding: 11px 13px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink);
  font-family: var(--font); font-size: 15px;
}
.who-row input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(46, 107, 79, .12); }

/* ---------- the drop zone ---------- */

.drop {
  display: block; width: 100%;
  padding: 34px 22px; text-align: center;
  border: 2px dashed var(--line-strong); border-radius: 12px;
  background: var(--wash);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-visible { border-color: var(--pine); background: #fff; outline: none; }
.drop.over { border-color: var(--pine); background: #fff; border-style: solid; }
.drop-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.drop-sub { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--muted); }

/* ---------- the queue ---------- */

.list { margin-top: 14px; }
.row {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
/* Progress is the row filling up, not a separate meter to read. */
.row-bar {
  position: absolute; inset: 0 auto 0 0;
  background: rgba(46, 107, 79, .10);
  transition: width .2s linear;
  pointer-events: none;
}
.row-text { position: relative; flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.row-name {
  flex: 1; min-width: 0;
  font-size: 14px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-meta { font-size: 12.5px; color: var(--muted); flex: none; }
.row.done { border-color: rgba(46, 107, 79, .35); }
.row.done .row-meta { color: var(--ok); font-weight: 600; }
.row.failed { border-color: rgba(192, 59, 48, .4); background: var(--flag-bg); }
.row.failed .row-meta { color: var(--flag); font-weight: 600; }
.row-x {
  position: relative;
  border: none; background: none; cursor: pointer;
  padding: 4px 6px; border-radius: 6px;
  color: var(--muted); font-size: 13px; line-height: 1;
}
.row-x:hover { background: var(--wash); color: var(--ink); }

/* ---------- send ---------- */

.actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.btn {
  padding: 13px 26px;
  border: none; border-radius: 100px;
  background: var(--pine); color: #fff;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .1s;
}
.btn:hover:not([disabled]) { filter: brightness(1.08); }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.ghost { background: #fff; color: var(--pine); border: 1px solid var(--line-strong); }

.status { font-size: 13.5px; color: var(--muted); }
.status.warn { color: var(--flag); font-weight: 600; }

/* ---------- end states ---------- */

.card.gone h1, .card.sent h1 { margin-bottom: 8px; }
.card.gone p, .card.sent p { color: var(--muted); }
.card.sent { text-align: center; }
.card.sent .tick {
  width: 52px; height: 52px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(46, 107, 79, .12); color: var(--pine);
  font-size: 26px; line-height: 1;
}
.card.sent p { margin-bottom: 10px; }
.card.sent .quiet { font-size: 13.5px; }
.card.sent .btn { margin-top: 14px; }

.loading { display: grid; place-items: center; padding: 60px 0; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--pine);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- the footer that says this is real ---------- */

.foot {
  width: 100%; max-width: 720px; margin: 0 auto; padding: 18px 20px 40px;
  font-size: 12.5px; line-height: 1.65; color: var(--muted);
}
.foot p + p { margin-top: 10px; }
.foot a { color: var(--pine); }
.foot-check {
  padding: 12px 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
  border-radius: 8px; background: #fff;
}
.foot-check b { color: var(--ink); }

@media (max-width: 600px) {
  main { padding: 20px 14px 8px; }
  .card { padding: 22px 18px; border-radius: 12px; }
  h1 { font-size: 22px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .who-row { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .row-bar, .btn { transition: none; }
  .spinner { animation-duration: 2s; }
}
