/* SolaceProcure360 app styles v1.0 - work surfaces are light; brand green + gold frame them */
:root {
  --green: #2a6a4f; --green-deep: #1f5640; --green-soft: #e4efe8;
  --gold: #f5d06e; --gold-ink: #ffe7a3; --gold-soft: #fbf3dc;
  --paper: #f6f4ec; --surface: #ffffff; --ink: #1d3b2f; --muted: #5d6f66; --line: #dfe5df;
  --bad: #b3261e; --bad-soft: #fbe9e7; --warn-soft: #fff3d6; --warn-ink: #7a5300;
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Public Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 400 15px/1.55 var(--f-body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; background: var(--gold); padding: 8px 12px; border-radius: 8px; z-index: 9; }
.muted { color: var(--muted); } .small { font-size: .88rem; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-ink); font: 800 1.25rem/1 var(--f-display); }
.brand b { color: var(--gold); }

/* ---------- forms & buttons ---------- */
label { display: block; font-weight: 600; font-size: .9rem; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #cfd8d1; border-radius: 10px; padding: .65em .8em; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgba(245,208,110,.6); outline-offset: 0; }
textarea { min-height: 96px; resize: vertical; }
.code-input { font: 700 1.8rem/1 ui-monospace, 'SFMono-Regular', Consolas, monospace !important; letter-spacing: .4em; text-align: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 .95rem/1 var(--f-body); padding: .8em 1.2em;
  border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--green); color: var(--gold-ink); }
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost { background: #fff; color: var(--ink); border-color: #cfd8d1; }
.btn-danger { background: #fff; color: var(--bad); border-color: #e5b8b4; }
.btn-ms { background: #fff; color: #222; border-color: #cfd8d1; width: 100%; }
.btn-ms svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-sm { padding: .5em .8em; font-size: .85rem; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--green); font: inherit; text-decoration: underline; cursor: pointer; }
.stack { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
.flash { padding: 12px 14px; border-radius: 10px; font-weight: 600; margin-bottom: 16px; }
.flash-ok { background: var(--green-soft); color: var(--green-deep); }
.flash-err { background: var(--bad-soft); color: var(--bad); }
.flash-warn { background: var(--warn-soft); color: var(--warn-ink); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- auth pages ---------- */
body.auth { background: var(--green); min-height: 100vh; }
.auth-wrap { max-width: 470px; margin: 0 auto; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 22px; justify-items: center; }
.auth-wide { max-width: 640px; }
.auth-card { width: 100%; background: var(--surface); border-radius: 18px; padding: clamp(22px, 5vw, 34px); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.auth-card h1 { font-size: 1.55rem; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 20px; }
.auth-foot { color: var(--gold-ink); font-size: .85rem; text-align: center; }
.auth-foot a { color: var(--gold-ink); }
.steps-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.steps-bar span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps-bar span.done { background: var(--green); }
.steps-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.choice { display: grid; gap: 10px; }
.choice label { border: 1.5px solid #cfd8d1; border-radius: 12px; padding: 14px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.choice input { margin-top: 3px; accent-color: var(--green); }
.choice b { display: block; } .choice span { font-weight: 400; color: var(--muted); font-size: .88rem; }

/* ---------- signed-in shell ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--green); color: var(--gold-ink); padding: 22px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand-side { font-size: 1.08rem; }
.org { font-weight: 700; color: #fff; display: grid; gap: 2px; } .org span { font-weight: 500; font-size: .82rem; color: var(--gold-ink); opacity: .85; }
.trial { font-size: .8rem; background: rgba(245,208,110,.18); color: var(--gold-ink); padding: 6px 10px; border-radius: 8px; }
.side nav { display: grid; gap: 2px; }
.side nav a { color: #e9f1ec; text-decoration: none; padding: 9px 12px; border-radius: 9px; font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.08); }
.side nav a.on { background: var(--gold); color: var(--green-deep); font-weight: 700; }
.me { margin-top: auto; font-size: .82rem; display: grid; gap: 2px; color: #dfeae4; }
.me b { color: #fff; } .me span { overflow-wrap: anywhere; } .me a { color: var(--gold-ink); }
.main { padding: 28px max(16px, 3vw) 60px; display: grid; gap: 20px; align-content: start; max-width: 1100px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side nav { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .me { margin-top: 0; }
}

/* ---------- tables, pills, checklist ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pill { display: inline-block; font-size: .76rem; font-weight: 700; padding: .3em .7em; border-radius: 999px; background: var(--green-soft); color: var(--green-deep); white-space: nowrap; }
.pill-warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill-off { background: #eceeec; color: #5d6662; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.checklist .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #cfd8d1; display: grid; place-items: center; font-weight: 800; color: #fff; }
.checklist li.done .dot { background: var(--green); border-color: var(--green); }
.checklist li.done .dot::after { content: "✓"; font-size: .85rem; }
.checklist b { display: block; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.inline-form > * { flex: 1 1 200px; }
.inline-form .btn { flex: 0 0 auto; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } }
.roles { display: flex; flex-wrap: wrap; gap: 8px 18px; }
