/* Authentication screens + client portal (§22, §14).
   Same approved dark navy / graphite / champagne-gold system and the same
   Oxanium + Manrope typography as the public landing — authentication must
   never look like a bolted-on generic template. Self-hosted fonts only. */

@font-face { font-family: 'Oxanium'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/oxanium-latin-wght-normal.woff2') format('woff2-variations'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations'); }

:root {
  --a-bg-1: #1a222c; --a-bg-2: #0d1117;
  --a-gold: #c9a86a; --a-gold-hi: #f6e7bd; --a-gold-line: rgba(233, 200, 126, .28);
  --a-ink: #c4cbd6; --a-ink-bright: #f2f4f8; --a-ink-dim: #99a3b4;
  --a-glass: rgba(255, 255, 255, .04); --a-hair: rgba(255, 255, 255, .1);
  --a-head: 'Oxanium', 'Segoe UI', system-ui, sans-serif;
  --a-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}

/* ---------- auth mode: full-screen, rail hidden ---------- */
body.auth-mode .ws-rail, body.auth-mode .ws-account { display: none; }
body.auth-mode .ws-shell { display: block; }
body.auth-mode .ws-main { padding: 0; max-width: none; }

.auth-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: 40px 20px calc(40px + env(safe-area-inset-bottom, 0px));
  font-family: var(--a-body);
  background: radial-gradient(120% 120% at 50% 15%, var(--a-bg-1) 0%, var(--a-bg-2) 70%);
}
.auth-card {
  width: min(440px, 100%); padding: 34px 32px; border-radius: 20px;
  background: rgba(19, 24, 32, .72); border: 1px solid var(--a-gold-line);
  box-shadow: 0 30px 70px rgba(6, 8, 12, .5);
}
.auth-brand { display: block; margin-bottom: 20px; }
.auth-brand img { height: 44px; width: auto; }
.auth-card h1 { font-family: var(--a-head); font-weight: 600; font-size: 25px; color: var(--a-ink-bright); letter-spacing: .3px; }
.auth-sub { margin-top: 8px; font-size: 14.5px; line-height: 1.6; color: var(--a-ink-dim); }
.auth-sub b { color: var(--a-ink); }

.auth-label { display: block; margin: 18px 0 6px; font-family: var(--a-head); font-weight: 500; font-size: 13px; letter-spacing: .4px; color: var(--a-ink); }
.auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password] {
  width: 100%; padding: 12px 14px; border-radius: 11px; font: inherit; font-size: 15px;
  background: rgba(13, 17, 23, .6); border: 1px solid var(--a-hair); color: var(--a-ink-bright);
}
.auth-card input:focus-visible { outline: 2px solid var(--a-gold); outline-offset: 2px; border-color: transparent; }
.auth-pw { position: relative; display: flex; }
.auth-pw input { padding-right: 74px; }
.auth-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 34px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  font-family: var(--a-head); font-size: 12.5px; font-weight: 500;
  background: transparent; border: 1px solid var(--a-hair); color: var(--a-ink-dim);
}
.auth-eye:hover { color: var(--a-gold-hi); border-color: var(--a-gold-line); }
.auth-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 13.5px; line-height: 1.5; color: var(--a-ink-dim); }
.auth-check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--a-gold); }

.auth-btn {
  display: inline-block; width: 100%; margin-top: 22px; padding: 13px 26px;
  border: 0; border-radius: 999px; cursor: pointer; text-align: center; text-decoration: none;
  font-family: var(--a-head); font-weight: 600; font-size: 15px; letter-spacing: .4px;
  color: #221a0c; background: linear-gradient(135deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 58%), var(--a-gold);
  box-shadow: 0 6px 18px rgba(201, 168, 106, .28);
}
.auth-btn:hover { filter: brightness(1.06); }
.auth-btn:disabled { opacity: .6; cursor: progress; }

.auth-msg { margin-top: 18px; padding: 12px 15px; border-radius: 11px; font-size: 14px; line-height: 1.55; }
.auth-msg.error { background: rgba(220, 90, 90, .1); border: 1px solid rgba(220, 90, 90, .38); color: #f4c3c3; }
.auth-msg.ok { background: rgba(233, 200, 126, .08); border: 1px solid var(--a-gold-line); color: var(--a-gold-hi); }

.auth-links { margin-top: 16px; font-size: 13.5px; }
.auth-links a, .auth-foot a { color: var(--a-gold); text-decoration: none; }
.auth-links a:hover, .auth-foot a:hover { color: var(--a-gold-hi); text-decoration: underline; }
/* a gold button rendered inside a links block keeps its dark ink — the
   .auth-links a colour rule is more specific than .auth-btn alone */
.auth-links a.auth-btn, .auth-links a.auth-btn:hover { color: #221a0c; text-decoration: none; }
.auth-foot { width: min(440px, 100%); font-size: 13px; line-height: 1.6; color: var(--a-ink-dim); text-align: center; }
.auth-legal { font-size: 12px; color: #626c7d; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--a-gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- account bar ---------- */
.ws-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ws-account {
  display: flex; align-items: center; gap: 14px; justify-content: flex-end;
  padding: 10px clamp(14px, 3vw, 28px); border-bottom: 1px solid var(--a-hair);
  font-family: var(--a-body);
}
.ws-who { display: flex; flex-direction: column; line-height: 1.25; margin-right: auto; }
.ws-who b { font-family: var(--a-head); font-size: 14px; color: var(--a-ink-bright); }
.ws-who i { font-style: normal; font-size: 12px; color: var(--a-ink-dim); }

/* ---------- client portal ---------- */
body.client-mode .ws-rail nav .ws-nav[hidden] { display: none; }
.cw-hero {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  padding: 26px 28px; border-radius: 20px; margin-bottom: 22px;
  background: linear-gradient(150deg, rgba(233, 200, 126, .08), var(--a-glass) 55%);
  border: 1px solid var(--a-gold-line);
}
.cw-eyebrow { font-family: var(--a-head); font-weight: 500; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #93856a; }
.cw-hero h1 { font-family: var(--a-head); font-weight: 600; font-size: clamp(24px, 3vw, 34px); color: var(--a-ink-bright); margin-top: 8px; }
.cw-lede { margin-top: 8px; font-size: 15px; color: var(--a-ink); max-width: 46ch; line-height: 1.6; }
.cw-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.cw-stats > div {
  min-width: 104px; padding: 14px 18px; border-radius: 14px; text-align: center;
  background: rgba(13, 17, 23, .5); border: 1px solid var(--a-hair);
}
.cw-stats b { display: block; font-family: var(--a-head); font-size: 26px; font-weight: 600; color: var(--a-gold-hi); }
.cw-stats span { font-size: 12.5px; color: var(--a-ink-dim); }

.cw-journey {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 14px; margin-bottom: 26px;
  background: var(--a-glass); border: 1px solid var(--a-hair);
  font-family: var(--a-head); font-size: 13.5px; color: var(--a-ink-dim);
}
.cw-journey i { color: var(--a-gold); font-style: normal; }
.cw-journey .on { color: var(--a-gold-hi); }

.cw-h2 { font-family: var(--a-head); font-weight: 600; font-size: 19px; color: var(--a-ink-bright); margin: 26px 0 14px; }
.cw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.cw-card {
  display: flex; flex-direction: column; gap: 14px; padding: 20px;
  border-radius: 18px; background: var(--a-glass); border: 1px solid var(--a-hair);
  transition: border-color .2s, transform .2s;
}
.cw-card:hover { border-color: var(--a-gold-line); transform: translateY(-2px); }
.cw-card-head { display: flex; gap: 14px; align-items: center; }
.cw-card-head h3 { font-family: var(--a-head); font-weight: 600; font-size: 17px; color: var(--a-ink-bright); }
.cw-card-meta { font-size: 13px; color: var(--a-ink-dim); margin-top: 3px; }
.cw-card-logo { width: 46px; height: 46px; object-fit: contain; border-radius: 11px; background: rgba(13, 17, 23, .55); padding: 5px; flex: none; }
.cw-card-logo.placeholder { display: block; border: 1px dashed var(--a-hair); }
.cw-card-head .chip { margin-left: auto; }
.cw-svc-list { display: flex; flex-direction: column; gap: 8px; }
.cw-svc, .cw-svc-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 11px; background: rgba(13, 17, 23, .45); border: 1px solid var(--a-hair); }
.cw-svc-row { gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.cw-svc-ico { color: var(--a-gold); font-size: 17px; }
.cw-svc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.cw-svc-body b { font-family: var(--a-head); font-size: 14px; font-weight: 600; color: var(--a-ink-bright); }
.cw-svc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cw-card-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: auto; }
.cw-commercial { font-size: 13px; color: var(--a-ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cw-commercial i { font-style: normal; color: var(--a-ink-dim); }
.cw-commercial b { font-family: var(--a-head); color: var(--a-gold-hi); }
.cw-commercial.muted { color: var(--a-ink-dim); font-style: italic; }

.cw-btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-family: var(--a-head); font-weight: 600; font-size: 13.5px; letter-spacing: .3px;
  color: #221a0c; background: var(--a-gold); border: 1px solid transparent; min-height: 40px;
}
.cw-btn.ghost { background: transparent; color: var(--a-ink); border-color: var(--a-hair); }
.cw-btn.ghost:hover { color: var(--a-gold-hi); border-color: var(--a-gold-line); }
.cw-btn:disabled { opacity: .6; cursor: progress; }

.cw-empty { text-align: center; padding: 34px 22px; }
.cw-empty b { font-family: var(--a-head); font-size: 17px; color: var(--a-ink-bright); }
.cw-empty p { max-width: 52ch; margin: 10px auto 16px; }
.cw-back { margin-bottom: 12px; font-size: 13.5px; }
.cw-back a { color: var(--a-gold); text-decoration: none; }
.cw-proj-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.cw-proj-head h1 { font-family: var(--a-head); font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); color: var(--a-ink-bright); }
.cw-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cw-side { display: flex; flex-direction: column; gap: 18px; }
.cw-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.cw-dl dt { color: var(--a-ink-dim); }
.cw-dl dd { color: var(--a-ink-bright); }
.cw-team { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cw-team li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--a-ink-bright); }
.cw-res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.cw-res-grid > div { padding: 16px; border-radius: 14px; background: var(--a-glass); border: 1px solid var(--a-hair); }
.cw-res-grid b { font-family: var(--a-head); font-size: 14.5px; color: var(--a-ink-bright); }
.cw-res-grid a { color: var(--a-gold); }

@media (max-width: 900px) {
  .cw-cols { grid-template-columns: 1fr; }
  .cw-hero { flex-direction: column; align-items: flex-start; }
  .cw-stats { width: 100%; }
  .cw-stats > div { flex: 1 1 44%; }
}
@media (prefers-reduced-motion: reduce) {
  .cw-card, .cw-card:hover { transition: none; transform: none; }
}

/* ================= UX-D: split authentication composition ================= */
.auth-wrap.split { flex-direction: row; gap: clamp(24px, 5vw, 72px); align-items: center; }
.auth-pane { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(440px, 100%); }
.auth-scene { width: min(400px, 34vw); display: flex; flex-direction: column; gap: 14px; }
.auth-scene-art { border-radius: 20px; border: 1px solid var(--a-gold-line); background: rgba(13, 17, 23, 0.55); padding: 10px; }
.auth-scene-line { font-size: 14px; line-height: 1.6; color: var(--a-ink-dim); max-width: 40ch; }
.auth-scene-products { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--a-head); font-size: 12px; letter-spacing: 0.6px; color: var(--a-ink); }
.auth-scene-products span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--a-hair); background: var(--a-glass); }

/* invitation journey summary (§8) */
.auth-invite-summary {
  display: grid; grid-template-columns: auto 1fr; gap: 7px 16px;
  margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: rgba(13, 17, 23, 0.55); border: 1px solid var(--a-gold-line); font-size: 13.5px;
}
.auth-invite-summary dt { color: var(--a-ink-dim); }
.auth-invite-summary dd { color: var(--a-ink-bright); text-transform: capitalize; }

@media (max-width: 980px) {
  .auth-wrap.split { flex-direction: column; }
  .auth-scene { width: min(440px, 100%); order: 2; }
  .auth-scene-art { max-width: 300px; }
}

/* UX-I: procedural art band on client cards */
.cw-card { padding: 0; overflow: hidden; }
.cw-card > .cw-card-head, .cw-card > .cw-svc-list, .cw-card > .cw-card-foot { padding-left: 20px; padding-right: 20px; }
.cw-card > .cw-card-head { padding-top: 4px; }
.cw-card > .cw-card-foot { padding-bottom: 18px; }
.cw-card-art { background: rgba(13, 17, 23, 0.5); border-bottom: 1px solid var(--a-hair); }
.cw-card-art .xvv { max-height: 130px; }
