:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #203c2b;
  background: #f4f7f1;
  --green: #235633;
  --deep: #173d27;
  --muted: #506454;
  --line: #d9e4d6;
  --soft: #e9f2e5;
  --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
.shell { width: min(1080px, calc(100% - 44px)); margin-inline: auto; }
.topbar { background: var(--white); border-top: 5px solid var(--green); border-bottom: 1px solid var(--line); }
.topbar .shell { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; color: var(--deep); }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--green); color: white; font-size: 24px; line-height: 1; }
.test-label { border: 1px solid var(--line); background: var(--soft); border-radius: 30px; padding: 5px 10px; color: var(--deep); font-size: .875rem; }
main { padding-block: 32px 48px; }
.hero { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; border-radius: 20px; padding: 28px; background: #e2efde; border: 1px solid #d3e4ce; }
h1 { margin: 0 0 6px; color: var(--deep); font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.055em; line-height: 1.04; }
h2 { margin: 0; color: var(--deep); font-size: 1.23rem; }
p { margin: .45rem 0; line-height: 1.5; color: var(--muted); }
a { color: var(--green); text-underline-offset: 3px; }
button, .action-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #a8bca4; border-radius: 9px; padding: 10px 14px; min-height: 42px; background: white; color: var(--deep); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.primary { background: var(--green); color: white; border-color: var(--green); }
button:hover:not(:disabled), .action-link:hover { filter: brightness(.94); }
button:disabled { opacity: .6; cursor: default; }
.quiet { background: transparent; }
:focus-visible { outline: 3px solid #598b48; outline-offset: 3px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 17px 0; }
.card { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 13px; padding: 15px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; }
.card strong { font-size: 1.45rem; line-height: 1; }
.card-label { color: var(--muted); font-size: .9rem; grid-column: 2; }
.icon, .choice-icon { display: grid; place-items: center; height: 33px; width: 33px; border-radius: 9px; background: var(--soft); color: var(--green); font-size: 1.18rem; }
.card .icon { grid-row: span 2; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: white; padding: 21px; }
.list-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hint { font-size: .875rem; }
.hint:empty, .staff-status:empty, .announcement:empty { display: none; }
.announcement { border-radius: 8px; background: var(--soft); padding: 8px 11px; font-size: .9rem; color: var(--deep); }
.orders { margin-top: 8px; }
.order-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(175px, .9fr) auto; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.order-row:first-child { margin-top: 3px; }
.order-title { font-size: 1rem; font-weight: 750; }
.order-date { display: block; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.pill { justify-self: start; display: inline-flex; align-items: center; background: #eef1ed; color: #405648; padding: 6px 9px; border-radius: 20px; font-size: .865rem; font-weight: 700; }
.pill.open { background: #ebf1f9; color: #344f73; }
.pill.response { background: #e2f0df; color: #225631; }
.pill.change { background: #fff1d8; color: #68491d; }
.order-detail { border: 1px solid var(--line); border-radius: 12px; background: #f7faf5; padding: 14px; margin-top: 12px; }
.timeline { padding-left: 22px; line-height: 1.65; color: var(--muted); }
.timeline li+li { margin-top: 4px; }
.empty { text-align: center; padding: 22px 8px 15px; border-top: 1px solid var(--line); }
.empty .icon { margin: 0 auto 10px; }
.empty strong { color: var(--deep); }
.help { margin-top: 14px; color: var(--muted); font-size: .9rem; }
.help summary { cursor: pointer; color: var(--green); font-weight: 700; }
.help li { margin-block: 6px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
dialog { width: min(calc(100% - 28px), 560px); border: 1px solid var(--line); padding: 20px; border-radius: 14px; color: var(--deep); box-shadow: 0 16px 50px #173d2733; }
dialog::backdrop { background: #172b21aa; }
dialog label { display: block; font-size: .875rem; font-weight: 700; margin: 12px 0 5px; }
input { width: 100%; padding: 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--deep); font: inherit; }
.error { color: #8e3026; }
.buyer { max-width: 700px; }
.buyer-hero { flex-wrap: nowrap; }
.hero-icon, .success-icon { display: grid; place-items: center; width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; background: var(--green); color: white; font-size: 2rem; }
.steps { display: flex; flex-wrap: wrap; gap: 12px 22px; list-style: none; padding: 0; margin: 17px 0; }
.steps li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .9rem; }
.steps li span { display: grid; place-items: center; width: 26px; height: 26px; background: white; border: 1px solid var(--line); border-radius: 50%; }
.steps li[aria-current] { font-weight: 750; color: var(--deep); }
.steps li[aria-current] span { border-color: var(--green); background: var(--green); color: white; }
.buyer-panel { padding: 23px; }
.doc-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 9px 11px; background: var(--soft); border-radius: 8px; font-weight: 700; }
.policies { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 17px; font-size: .9rem; }
.choices { display: grid; gap: 8px; margin: 12px 0; }
.choice { width: 100%; text-align: left; justify-content: start; align-items: center; gap: 11px; padding: 11px; border-color: var(--line); }
.choice:first-child { background: #f2f7ef; border-color: #a8bca4; }
.choice-icon { flex-shrink: 0; }
.choice small { display: block; margin-top: 4px; font-weight: 400; color: var(--muted); }
.success-icon { width: 43px; height: 43px; font-size: 1.55rem; margin-bottom: 12px; }
.buyer-note { font-size: .875rem; padding: 5px 2px; }
[hidden] { display: none !important; }
@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  main { padding-top: 20px; }
  .hero, .panel { padding: 15px; }
  .cards { gap: 6px; }
  .card { padding: 8px; gap: 4px; grid-template-columns: 1fr; }
  .card .icon { grid-row: auto; }
  .card-label { grid-column: auto; font-size: .825rem; }
  .order-row { grid-template-columns: 1fr auto; gap: 8px; }
  .order-row .pill { grid-row: 2; }
  .order-row button { grid-row: 1 / span 2; grid-column: 2; }
  .hero-icon { width: 42px; height: 42px; font-size: 1.4rem; }
}

.email-preview { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); overflow-wrap: anywhere; }
.email-preview a, .order-identity { font-weight: 700; }
.order-title, .order-identity { overflow-wrap: anywhere; }
.pilot-panel { margin-top: 16px; }
.pilot-form { display: grid; gap: 12px; margin: 14px 0; }
.pilot-form label { display: grid; gap: 5px; }
.pilot-form button { justify-self: start; }
.pilot-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pilot-form select, .pilot-form textarea { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.pilot-form .pilot-check { display:flex; align-items:flex-start; gap:8px; padding-block:4px; }
.pilot-check input { width:auto; margin-top:3px; }
@media (max-width: 620px) { .pilot-columns { grid-template-columns: 1fr; } }
