:root {
  --bg: #080706;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.11);
  --border: rgba(236, 207, 138, 0.22);
  --border-soft: rgba(255, 255, 255, 0.12);
  --text: #fff8eb;
  --muted: rgba(255, 248, 235, 0.68);
  --muted-2: rgba(255, 248, 235, 0.48);
  --gold: #d8b76a;
  --gold-2: #f4d68b;
  --danger: #ff6b6b;
  --success: #77d49a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(216, 183, 106, 0.24), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(108, 85, 41, 0.28), transparent 34rem),
    linear-gradient(135deg, #070604 0%, #14100b 44%, #080706 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.av-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.av-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(18px);
  background: rgba(7, 6, 4, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.av-nav-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.av-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.av-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
}
.av-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.av-nav-links a {
  color: var(--muted);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 999px;
}
.av-nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.08); }

.av-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 46px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, border-color .18s ease, background .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.av-btn:hover { transform: translateY(-1px); }
.av-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.av-btn-primary {
  color: #171008;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 16px 40px rgba(216, 183, 106, 0.18);
}
.av-btn-secondary {
  color: var(--text);
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.07);
}
.av-btn-ghost {
  color: var(--gold-2);
  background: transparent;
  border: 1px solid var(--border);
}

.av-hero {
  padding: 56px 0 34px;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(340px, .54fr);
  gap: 28px;
  align-items: stretch;
}
.av-hero-copy, .av-card {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.045));
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}
.av-hero-copy { padding: 42px; position: relative; overflow: hidden; }
.av-hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(216, 183, 106, .16);
  filter: blur(8px);
}
.av-eyebrow {
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.av-title {
  font-size: clamp(34px, 5vw, 66px);
  line-height: .95;
  letter-spacing: -0.06em;
  margin: 0 0 20px;
}
.av-title span { color: var(--gold-2); }
.av-lede {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 760px;
  margin: 0;
}
.av-mini-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}
.av-mini-list div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
}
.av-dot {
  width: 9px;
  height: 9px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--gold-2);
  box-shadow: 0 0 18px rgba(244, 214, 139, .7);
  flex: 0 0 auto;
}
.av-card { padding: 28px; }
.av-side-title { margin: 0 0 10px; font-size: 22px; letter-spacing: -0.03em; }
.av-side-text { color: var(--muted); line-height: 1.65; margin: 0 0 20px; }
.av-status-box {
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,.2);
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 14px;
}
.av-status-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 12px;
}
.av-status-row:last-child { border-bottom: 0; padding-bottom: 0; }
.av-status-row strong { color: var(--text); text-align: right; }

.av-form-wrap {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 20px 0 70px;
}
.av-steps {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.06);
  padding: 18px;
  position: sticky;
  top: 94px;
}
.av-step-pill {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
}
.av-step-pill[aria-current="step"] { background: rgba(216,183,106,.14); color: var(--text); }
.av-step-num {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--gold-2);
  font-weight: 800;
}
.av-step-pill small { display: block; color: var(--muted-2); margin-top: 2px; }
.av-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,0.095), rgba(255,255,255,0.045));
  box-shadow: var(--shadow);
  padding: 30px;
}
.av-form-card h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -0.04em; }
.av-form-card > p { color: var(--muted); margin: 0 0 24px; line-height: 1.6; }
.av-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.av-field { display: grid; gap: 8px; }
.av-field.full { grid-column: 1 / -1; }
.av-field label { color: var(--muted); font-size: 13px; font-weight: 700; }
.av-field input, .av-field select, .av-field textarea {
  width: 100%;
  color: var(--text);
  background: rgba(0,0,0,.25);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  outline: none;
}
.av-field input:focus, .av-field select:focus, .av-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(216,183,106,.12); }
.av-field input:disabled, .av-field select:disabled, .av-field textarea:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: rgba(255,255,255,.05);
}
.av-field-locked { opacity: .88; }
.av-field option { color: #111; }
.av-inline-field { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.av-hint { color: var(--muted-2); font-size: 12px; line-height: 1.5; }
.av-error { color: var(--danger); font-size: 13px; line-height: 1.5; }
.av-success { color: var(--success); font-size: 13px; line-height: 1.5; }
.av-success-panel {
  margin-top: 18px;
  border: 1px solid rgba(119, 212, 154, .35);
  background: rgba(119, 212, 154, .09);
  border-radius: 18px;
  padding: 16px;
  color: #d8ffe6;
}
.av-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.av-radio-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.av-radio-grid-pretty { margin-top: 12px; }
.av-choice-card {
  position: relative;
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,.22);
  border-radius: 22px;
  padding: 20px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  min-height: 180px;
  transition: border-color .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.av-choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 214, 139, .35);
}
.av-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.av-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.av-choice-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.45);
  position: relative;
  flex: 0 0 auto;
}
.av-choice-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: var(--gold-2);
  transform: scale(0);
  transition: transform .18s ease;
}
.av-choice-title {
  margin-left: auto;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.av-choice-text {
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
}
.av-choice-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.av-choice-card.active {
  border-color: rgba(244, 214, 139, .55);
  background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(216,183,106,0.08));
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.av-choice-card.active .av-choice-dot { border-color: var(--gold-2); }
.av-choice-card.active .av-choice-dot::after { transform: scale(1); }
.av-choice-card.av-choice-danger.active {
  border-color: rgba(255, 107, 107, .42);
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,107,107,0.09));
}
.av-warning {
  margin-top: 18px;
  border: 1px solid rgba(255, 107, 107, .45);
  background: rgba(255, 107, 107, .11);
  border-radius: 18px;
  padding: 16px;
  color: #ffd4d4;
  line-height: 1.6;
}
.av-document-list { display: grid; gap: 12px; }
.av-document-item {
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.av-checkboxes { display: grid; gap: 12px; margin: 18px 0; }
.av-check { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); line-height: 1.55; }
.av-check input { margin-top: 4px; }
.av-signature-pad {
  min-height: 130px;
  display: grid;
  place-items: center;
  color: rgba(244,214,139,.9);
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 38px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: rgba(0,0,0,.2);
}
.av-footer { padding: 28px 0 40px; color: var(--muted-2); border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; line-height: 1.65; }

.av-login-shell {
  min-height: calc(100vh - 75px);
  display: grid;
  place-items: center;
  padding: 48px 0 70px;
}
.av-login-card { width: min(520px, 100%); }
.av-portal-grid { display: grid; grid-template-columns: .86fr .54fr; gap: 24px; padding: 26px 0 70px; }
.av-project-card {
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.055);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  gap: 12px;
}
.av-project-card h3 { margin: 0; font-size: 20px; }
.av-project-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.av-tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.av-tag { color: var(--gold-2); background: rgba(216,183,106,.12); border: 1px solid var(--border); padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.av-divider { height: 1px; background: rgba(255,255,255,.1); margin: 18px 0; }

@media (max-width: 900px) {
  .av-hero, .av-form-wrap, .av-portal-grid { grid-template-columns: 1fr; }
  .av-steps { position: static; }
  .av-grid, .av-radio-grid { grid-template-columns: 1fr; }
  .av-nav-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
}
@media (max-width: 560px) {
  .av-shell { width: min(100% - 24px, 1180px); }
  .av-hero-copy, .av-card, .av-form-card { padding: 22px; border-radius: 22px; }
  .av-inline-field { grid-template-columns: 1fr; }
  .av-actions .av-btn { width: 100%; }
  .av-choice-card { min-height: auto; }
}


.av-verify-panel {
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,.18);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  gap: 14px;
}
.av-email-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--gold-2);
  border: 1px solid var(--border);
  background: rgba(216,183,106,.1);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.av-center-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.av-register-shell {
  padding: 34px 0 60px;
}
.av-form-wrap-simple {
  display: block;
  padding: 0;
}
.av-form-card-compact {
  width: min(900px, 100%);
  margin: 0 auto;
}
.av-form-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.av-step-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(216,183,106,.1);
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.av-step-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

/* v5 compact registration refinements */
.av-field input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  width: 22px;
  height: 22px;
  filter: invert(88%) sepia(34%) saturate(700%) hue-rotate(355deg) brightness(105%);
}
.av-form-card-modal {
  width: min(780px, 100%);
}
.av-verification-modal {
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,.18);
  border-radius: 22px;
  padding: 28px 30px;
  display: grid;
  gap: 18px;
}
.av-verification-modal h2 {
  font-size: 36px;
  margin-bottom: 0;
}
.av-verification-modal p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.av-progress-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
}
.av-progress-line span {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
}
.av-progress-line span:first-child {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}
.av-edit-email {
  width: fit-content;
  color: var(--gold-2);
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 800;
  cursor: pointer;
}
.av-edit-email::before {
  content: "✎";
  margin-right: 8px;
}
.av-code-label {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  margin-top: 6px;
}
.av-code-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  max-width: 560px;
}
.av-code-grid input {
  width: 100%;
  height: 64px;
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  background: rgba(0,0,0,.22);
  border: 0;
  border-bottom: 2px solid rgba(255,255,255,.36);
  border-radius: 0;
  outline: none;
}
.av-code-grid input:focus {
  border-bottom-color: var(--gold-2);
  box-shadow: 0 10px 24px rgba(216,183,106,.12);
}
.av-code-actions {
  margin-top: 6px;
}
.av-code-error {
  margin-top: -4px;
}
.av-portal-grid-simple .av-project-card p {
  margin-bottom: 8px;
}

@media (max-width: 560px) {
  .av-verification-modal { padding: 22px; }
  .av-code-grid { gap: 8px; }
  .av-code-grid input { height: 54px; font-size: 26px; }
}

/* v6 refinements */
.av-code-grid-compact {
  grid-template-columns: repeat(6, 48px);
  gap: 10px;
  max-width: 340px;
}
.av-code-grid-compact input {
  height: 54px;
  font-size: 26px;
  padding: 0;
}
.av-code-success {
  margin-top: -4px;
  border: 1px solid rgba(119, 212, 154, .35);
  background: rgba(119, 212, 154, .09);
  border-radius: 14px;
  padding: 10px 12px;
  width: fit-content;
}
.av-sign-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.av-sign-row .av-btn {
  min-width: 112px;
}
.av-portal-grid-simple .av-tag-row {
  display: none;
}
@media (max-width: 560px) {
  .av-code-grid-compact {
    grid-template-columns: repeat(6, 1fr);
    gap: 7px;
    max-width: 100%;
  }
  .av-code-grid-compact input {
    height: 46px;
    font-size: 22px;
  }
}


/* Forgot password modal */
.av-forgot-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--gold-2);
  font-weight: 800;
  cursor: pointer;
  padding: 2px 0 0;
  text-align: center;
}
.av-forgot-button:hover { text-decoration: underline; }
.av-forgot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}
.av-forgot-card {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,0.105), rgba(255,255,255,0.052));
  box-shadow: var(--shadow);
  padding: 30px;
}
.av-forgot-card h2 {
  margin: 12px 0 12px;
  font-size: 34px;
  letter-spacing: -0.04em;
}
.av-forgot-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.av-forgot-text {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 18px;
}
.av-forgot-main { width: 100%; margin-top: 16px; }
.av-forgot-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}
.av-forgot-row .av-btn { flex: 1 1 190px; }
.av-forgot-label {
  display: block;
  color: var(--text);
  font-weight: 800;
  margin: 18px 0 12px;
}
.av-forgot-link {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--gold-2);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
.av-forgot-message {
  margin-top: 16px;
}
.av-forgot-success {
  color: #d8ffe6;
  border: 1px solid rgba(119, 212, 154, .35);
  background: rgba(119, 212, 154, .09);
  border-radius: 18px;
  padding: 18px;
  line-height: 1.6;
}
.av-code-row-small input {
  width: 46px;
  height: 58px;
  font-size: 26px;
}
@media (max-width: 560px) {
  .av-forgot-card { padding: 24px; }
  .av-code-row-small { gap: 8px; }
  .av-code-row-small input { width: 40px; height: 52px; }
}
