/* DistrictSeal product UI — layered on top of app.css */

:root {
  --ds-bg:#0b0d14;
  --ds-panel:#121723;
  --ds-panel-2:#171c2b;
  --ds-text:#e6e8ef;
  --ds-muted:#8b93a7;
  --ds-gold:#e9c46a;
  --ds-gold-2:#f4a261;
  --ds-danger:#e5484d;
  --ds-ok:#3ddc84;
  --ds-border:rgba(255,255,255,.08);
  --ds-radius:14px;
}

* { box-sizing: border-box; }

body.ds-landing,
body.ds-auth,
body.ds-app {
  margin: 0;
  background: var(--ds-bg);
  color: var(--ds-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--ds-gold); }

/* ---------- nav + logo ---------- */
.ds-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,20,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ds-border);
}
.ds-nav nav { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.ds-nav nav a { color: var(--ds-text); text-decoration: none; opacity: .85; }
.ds-nav nav a:hover { opacity: 1; }
.ds-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700; font-size: 20px;
  color: var(--ds-gold);
  text-decoration: none;
  letter-spacing: .02em;
}

/* ---------- buttons ---------- */
.ds-btn {
  appearance: none; border: 0;
  background: var(--ds-gold); color: #14171f;
  padding: 10px 18px;
  font-size: 14px; font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .05s ease;
}
.ds-btn:hover { background: var(--ds-gold-2); }
.ds-btn:active { transform: translateY(1px); }
.ds-btn:disabled { opacity: .5; cursor: not-allowed; }
.ds-btn-lg { padding: 14px 26px; font-size: 15px; }
.ds-btn-block { width: 100%; }
.ds-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.22);
  color: var(--ds-text);
}
.ds-btn-ghost:hover { background: rgba(255,255,255,.06); }
.ds-btn-danger {
  background: transparent; border: 1px solid rgba(229,72,77,.5);
  color: var(--ds-danger);
}
.ds-btn-danger:hover { background: rgba(229,72,77,.12); }

/* ---------- landing ---------- */
.ds-hero {
  padding: 120px 24px 80px;
  max-width: 900px; margin: 0 auto; text-align: center;
}
.ds-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500; letter-spacing: -.01em;
  font-size: clamp(34px, 5vw, 56px);
  margin: 0 0 22px 0;
  color: #fff;
  line-height: 1.1;
}
.ds-lede {
  font-size: 17px; line-height: 1.6;
  color: var(--ds-muted);
  max-width: 640px; margin: 0 auto 34px auto;
}
.ds-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ds-sub { color: var(--ds-muted); font-size: 13px; margin-top: 18px; }

.ds-features, .ds-how, .ds-pricing { padding: 80px 24px; }
.ds-features h2, .ds-how h2, .ds-pricing h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500; text-align: center;
  font-size: 32px; margin: 0 0 48px 0;
}
.ds-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  max-width: 1100px; margin: 0 auto;
}
.ds-card {
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  padding: 26px;
}
.ds-card h3 { margin: 0 0 10px 0; font-size: 17px; font-weight: 600; color: #fff; }
.ds-card p { margin: 0; color: var(--ds-muted); font-size: 14px; line-height: 1.55; }
.ds-icon { font-size: 26px; margin-bottom: 12px; }
.ds-card-pop {
  background: linear-gradient(180deg, rgba(233,196,106,.10), rgba(233,196,106,.02));
  border-color: rgba(233,196,106,.35);
}
.ds-price {
  font-family: Georgia, serif;
  font-size: 38px; font-weight: 500;
  margin: 10px 0 16px 0;
}
.ds-price span { font-size: 15px; color: var(--ds-muted); font-family: system-ui, sans-serif; }
.ds-card ul { padding: 0 0 0 18px; margin: 0 0 20px 0; color: var(--ds-muted); font-size: 14px; line-height: 1.7; }

.ds-steps { list-style: none; padding: 0; margin: 0 auto; max-width: 760px; }
.ds-steps li {
  display: flex; gap: 22px; align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--ds-border);
}
.ds-steps li:last-child { border-bottom: 0; }
.ds-steps span {
  flex: 0 0 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(233,196,106,.12);
  color: var(--ds-gold);
  font-weight: 700;
}
.ds-steps h3 { margin: 0 0 6px 0; font-size: 16px; color: #fff; }
.ds-steps p { margin: 0; color: var(--ds-muted); font-size: 14px; }

.ds-footer {
  padding: 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--ds-muted); font-size: 13px;
  border-top: 1px solid var(--ds-border);
}
.ds-footer a { color: var(--ds-gold); text-decoration: none; }

/* ---------- auth pages ---------- */
body.ds-auth {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.ds-auth-card {
  width: 100%; max-width: 420px;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.ds-auth-wide { max-width: 520px; }
.ds-auth-card h2 { margin: 22px 0 6px 0; font-size: 22px; font-weight: 600; color: #fff; }
.ds-muted { color: var(--ds-muted); font-size: 14px; }
.ds-center { text-align: center; }
.ds-auth-card label { display: block; margin: 14px 0 0 0; font-size: 13px; color: var(--ds-muted); }
.ds-auth-card input,
.ds-auth-card select,
.ds-auth-card textarea {
  width: 100%; margin-top: 6px;
  background: var(--ds-panel-2);
  border: 1px solid var(--ds-border);
  color: var(--ds-text);
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 14px; font-family: inherit;
}
.ds-auth-card input:focus,
.ds-auth-card select:focus,
.ds-auth-card textarea:focus {
  outline: none; border-color: rgba(233,196,106,.5);
}
.ds-auth-card button { margin-top: 22px; }
.ds-err { color: var(--ds-danger); font-size: 13px; min-height: 18px; margin: 10px 0 0 0; }
.ds-actions { display: flex; gap: 10px; margin-top: 22px; }
.ds-actions .ds-btn { flex: 1; }
.ds-steps-head { display: flex; gap: 22px; margin: 22px 0 4px 0; font-size: 12px; color: var(--ds-muted); }
.ds-step.active { color: var(--ds-gold); font-weight: 700; }
.ds-step-panel.hidden { display: none; }

/* ---------- dashboard shell ---------- */
body.ds-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.ds-side {
  background: #0e121c;
  border-right: 1px solid var(--ds-border);
  padding: 26px 18px;
  display: flex; flex-direction: column;
}
.ds-side .ds-logo { margin-bottom: 30px; display: block; }
.ds-side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ds-side nav a {
  color: var(--ds-text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  opacity: .78;
}
.ds-side nav a:hover { background: rgba(255,255,255,.04); opacity: 1; }
.ds-side nav a.active { background: rgba(233,196,106,.10); color: var(--ds-gold); opacity: 1; }
.ds-side .ds-me {
  padding-top: 16px;
  border-top: 1px solid var(--ds-border);
  font-size: 12px; color: var(--ds-muted);
  word-break: break-all;
}
.ds-side .ds-me strong { display: block; color: var(--ds-text); font-weight: 600; margin-bottom: 4px; }
.ds-side .ds-me button { margin-top: 12px; width: 100%; }

.ds-main { padding: 32px 40px; overflow-y: auto; max-height: 100vh; }
.ds-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.ds-topbar h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500; font-size: 26px; color: #fff;
}
.ds-topbar p { margin: 4px 0 0 0; color: var(--ds-muted); font-size: 13px; }

.ds-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.ds-stat {
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  padding: 18px 20px;
}
.ds-stat-label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ds-muted); }
.ds-stat-num { font-family: Georgia, serif; font-size: 30px; font-weight: 500; margin-top: 8px; color: #fff; }
.ds-stat-ok .ds-stat-num { color: var(--ds-ok); }
.ds-stat-fail .ds-stat-num { color: var(--ds-danger); }

.ds-table {
  width: 100%; border-collapse: collapse;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  overflow: hidden;
}
.ds-table th, .ds-table td {
  text-align: left;
  padding: 13px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--ds-border);
}
.ds-table th {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ds-muted); font-weight: 700;
  background: rgba(255,255,255,.02);
}
.ds-table tr:last-child td { border-bottom: 0; }
.ds-table tbody tr { cursor: pointer; }
.ds-table tbody tr:hover { background: rgba(255,255,255,.03); }

.ds-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ds-pill-verified, .ds-pill-ledger_issued { background: rgba(61,220,132,.14); color: var(--ds-ok); }
.ds-pill-failed { background: rgba(229,72,77,.14); color: var(--ds-danger); }
.ds-pill-created, .ds-pill-webauthn_verified, .ds-pill-scroll_complete,
.ds-pill-consent_accepted, .ds-pill-liveness_captured { background: rgba(233,196,106,.14); color: var(--ds-gold); }

.ds-empty { padding: 50px 20px; text-align: center; color: var(--ds-muted); }

/* drawer */
.ds-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(520px, 92vw);
  background: var(--ds-panel);
  border-left: 1px solid var(--ds-border);
  transform: translateX(100%);
  transition: transform .24s ease;
  z-index: 200;
  display: flex; flex-direction: column;
}
.ds-drawer.open { transform: translateX(0); }
.ds-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--ds-border);
}
.ds-drawer-head h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; font-size: 20px; color: #fff; }
.ds-drawer-body { padding: 22px 24px; overflow-y: auto; }
.ds-drawer-body h3 {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ds-muted); margin: 22px 0 8px 0;
}
.ds-drawer-body h3:first-child { margin-top: 0; }
.ds-kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13px; }
.ds-kv div:nth-child(odd) { color: var(--ds-muted); }
.ds-event { padding: 10px 0; border-bottom: 1px dashed var(--ds-border); font-size: 13px; }
.ds-event:last-child { border-bottom: 0; }
.ds-event-ts { font-family: ui-monospace, monospace; font-size: 11px; color: var(--ds-muted); }
.ds-event-step { font-weight: 600; margin: 2px 0; color: #fff; }
.ds-event-detail { color: var(--ds-muted); font-size: 12px; line-height: 1.5; word-break: break-word; }

.ds-drawer-foot { padding: 16px 24px; border-top: 1px solid var(--ds-border); display: flex; gap: 10px; }
.ds-drawer-foot a, .ds-drawer-foot button { flex: 1; }

/* form section */
.ds-form {
  max-width: 720px;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  padding: 30px;
}
.ds-form label { display: block; margin: 0 0 4px 0; font-size: 13px; color: var(--ds-muted); }
.ds-form input, .ds-form textarea {
  width: 100%; margin-bottom: 16px;
  background: var(--ds-panel-2);
  border: 1px solid var(--ds-border);
  color: var(--ds-text);
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 14px; font-family: inherit;
}
.ds-form input:focus, .ds-form textarea:focus { outline: none; border-color: rgba(233,196,106,.5); }
.ds-form input[type=file] { padding: 8px; }
.ds-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* toast */
.ds-toast {
  position: fixed; bottom: 26px; right: 26px;
  background: var(--ds-panel-2);
  border: 1px solid var(--ds-border);
  border-left: 3px solid var(--ds-ok);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 500;
  transform: translateY(20px); opacity: 0;
  transition: all .24s ease;
  pointer-events: none;
  color: #fff;
}
.ds-toast.show { transform: translateY(0); opacity: 1; }
.ds-toast.err { border-left-color: var(--ds-danger); }

@media (max-width: 800px) {
  body.ds-app { grid-template-columns: 1fr; }
  .ds-side { flex-direction: row; align-items: center; padding: 14px; }
  .ds-side nav { flex-direction: row; flex-wrap: wrap; }
  .ds-main { padding: 20px; max-height: none; }
  .ds-nav { padding: 16px 20px; }
  .ds-nav nav { gap: 14px; font-size: 13px; }
}
