/* Repair Authorization form — matches Velocity black / gold / white look */
:root {
  --auth-bg: #0a0908;
  --auth-paper: #f7f4ee;
  --auth-ink: #16140f;
  --auth-muted: #6b655a;
  --auth-gold: #e0ac2b;
  --auth-gold-grad: linear-gradient(135deg, #f7dc8a 0%, #e0ac2b 42%, #b8841a 100%);
  --auth-line: rgba(22, 20, 15, 0.14);
  --auth-danger: #b42318;
  --auth-radius: 10px;
  --auth-sans: "Inter", system-ui, sans-serif;
  --auth-serif: "Noto Serif", Georgia, serif;
}

.auth-page {
  margin: 0;
  background: var(--auth-bg);
  color: #f2efe6;
  font-family: var(--auth-sans);
  min-height: 100vh;
}

.auth-skip {
  position: absolute;
  left: -9999px;
}
.auth-skip:focus {
  left: 12px;
  top: 12px;
  z-index: 99;
  background: var(--auth-gold);
  color: #1a1408;
  padding: 8px 12px;
}

.auth-top {
  text-align: center;
  padding: 28px 18px 32px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(224, 172, 43, 0.18), transparent 70%),
    var(--auth-bg);
}
.auth-top > a {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto 16px;
}
.auth-top img {
  width: min(220px, 70vw);
  height: auto;
  display: block;
  margin: 0 auto;
}
.auth-lang {
  display: inline-flex;
  border: 1px solid rgba(224, 172, 43, 0.35);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.auth-lang button {
  border: 0;
  background: transparent;
  color: #cfc8b8;
  font: 600 13px/1 var(--auth-sans);
  padding: 8px 16px;
  cursor: pointer;
}
.auth-lang button.is-active {
  background: var(--auth-gold-grad);
  color: #1a1408;
}
.auth-nap {
  font-size: 13px;
  color: #cfc8b8;
  line-height: 1.5;
}
.auth-nap a {
  color: var(--auth-gold);
  text-decoration: none;
}

.auth-sheet {
  background: var(--auth-paper);
  color: var(--auth-ink);
  border-radius: 20px 20px 0 0;
  margin: 0 auto;
  max-width: 720px;
  padding: 36px 22px 120px;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}
@media (min-width: 760px) {
  .auth-sheet {
    border-radius: 16px;
    margin: 0 auto 40px;
    padding: 44px 40px 120px;
  }
  .auth-page {
    padding-bottom: 40px;
  }
}

.auth-sheet h1 {
  font-family: var(--auth-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.15;
  margin: 0 0 12px;
  color: #12100c;
}
.auth-lead {
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 10px;
}
.auth-meta {
  color: var(--auth-muted);
  font-size: 13px;
  margin: 0 0 28px;
}

.auth-section {
  margin: 0 0 32px;
  padding-top: 8px;
  border-top: 1px solid var(--auth-line);
}
.auth-section:first-of-type {
  border-top: 0;
}
.auth-section-num {
  color: var(--auth-gold);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.auth-section h2 {
  font-family: var(--auth-serif);
  font-size: 1.25rem;
  margin: 4px 0 6px;
}
.auth-hint {
  color: var(--auth-muted);
  font-size: 13px;
  margin: 0 0 16px;
  line-height: 1.45;
}

.auth-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 640px) {
  .auth-grid.two {
    grid-template-columns: 1fr 1fr;
  }
  .auth-grid.three {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2a261e;
}
.auth-req {
  color: var(--auth-danger);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-left: 6px;
  text-transform: uppercase;
}
.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-ink);
  border-radius: 8px;
  padding: 12px 14px;
  font: 400 15px/1.3 var(--auth-sans);
}
.auth-field textarea {
  min-height: 96px;
  resize: vertical;
}
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  outline: 2px solid rgba(224, 172, 43, 0.55);
  outline-offset: 1px;
  border-color: var(--auth-gold);
}
.auth-field .sub {
  font-size: 12px;
  color: var(--auth-muted);
  margin-top: 6px;
}

.auth-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 14px;
  font-size: 14px;
  color: #2a261e;
}
.auth-check input {
  margin-top: 3px;
}

.auth-legal {
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  padding: 16px 16px 4px;
  font-size: 13px;
  line-height: 1.55;
  color: #3a342a;
}
.auth-legal p {
  margin: 0 0 12px;
}
.auth-legal strong {
  color: var(--auth-ink);
}

.auth-docs-summary {
  width: 100%;
  text-align: left;
  border: 1px solid var(--auth-line);
  background: #fff;
  border-radius: var(--auth-radius);
  padding: 14px 16px;
  cursor: pointer;
  font: 600 14px/1.35 var(--auth-sans);
  color: var(--auth-ink);
}
.auth-docs-body {
  margin-top: 12px;
}
.auth-docs-body[hidden] {
  display: none;
}
.auth-photo {
  background: #fff;
  border: 1px dashed rgba(22, 20, 15, 0.22);
  border-radius: var(--auth-radius);
  padding: 14px;
  margin-bottom: 12px;
}
.auth-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.auth-photo-actions label,
.auth-photo-actions button {
  border: 1px solid var(--auth-line);
  background: #faf8f3;
  border-radius: 8px;
  padding: 8px 12px;
  font: 600 13px/1 var(--auth-sans);
  cursor: pointer;
  color: var(--auth-ink);
}
.auth-photo-actions input[type="file"] {
  display: none;
}
.auth-photo-preview {
  margin-top: 10px;
  max-width: 220px;
  border-radius: 8px;
  border: 1px solid var(--auth-line);
  display: none;
}
.auth-photo-preview.is-on {
  display: block;
}

.auth-sig-wrap {
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  padding: 12px;
}
.auth-sig-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}
.auth-sig-toolbar button {
  border: 0;
  background: transparent;
  color: var(--auth-muted);
  font: 600 13px/1 var(--auth-sans);
  cursor: pointer;
}
#auth-signature {
  display: block;
  width: 100%;
  height: 160px;
  touch-action: none;
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  cursor: crosshair;
}

.auth-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(10, 9, 8, 0.92) 28%);
  display: flex;
  justify-content: center;
}
.auth-submit {
  width: min(720px, 100%);
  border: 0;
  border-radius: 12px;
  padding: 16px 18px;
  font: 800 15px/1.2 var(--auth-sans);
  color: #1a1408;
  background: var(--auth-gold-grad);
  cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(224, 172, 43, 0.7);
}
.auth-submit:disabled {
  opacity: 0.55;
  cursor: default;
}
.auth-sticky-note {
  display: none;
}

.auth-hp {
  position: absolute;
  left: -10000px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.auth-msg {
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 18px;
  font-size: 14px;
  display: none;
}
.auth-msg.is-on {
  display: block;
}
.auth-msg.err {
  background: #fde8e6;
  color: #7a1c14;
  border: 1px solid #f0b4ae;
}
.auth-msg.ok {
  background: #e8f6ee;
  color: #1a5c38;
  border: 1px solid #a8d9bc;
}
.auth-msg a {
  color: inherit;
  font-weight: 700;
}

.auth-foot {
  text-align: center;
  color: #9a9486;
  font-size: 12px;
  padding: 24px 16px 100px;
  max-width: 720px;
  margin: 0 auto;
}
.auth-foot a {
  color: var(--auth-gold);
  text-decoration: none;
}

.auth-custom-wrap[hidden] {
  display: none !important;
}

/* ---- Success / confirmation (matches Vercel post-submit) ---- */
.auth-success[hidden] {
  display: none !important;
}
.auth-success {
  padding-top: 8px;
}
.auth-success-check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e7f6ec;
  color: #1f7a45;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.auth-success h1 {
  font-family: var(--auth-serif);
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  margin: 0 0 10px;
  line-height: 1.2;
}
.auth-success-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  margin: 28px 0;
  padding: 4px 0 8px;
}
@media (max-width: 560px) {
  .auth-success-grid {
    grid-template-columns: 1fr;
  }
}
.auth-success-label {
  font-size: 13px;
  color: var(--auth-muted);
  margin-bottom: 4px;
}
.auth-success-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--auth-ink);
  word-break: break-word;
}
.auth-save-box {
  background: #fff8e8;
  border: 1px solid rgba(224, 172, 43, 0.55);
  border-radius: 12px;
  padding: 20px 18px;
  margin: 8px 0 28px;
}
.auth-save-box h2 {
  font-family: var(--auth-sans);
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--auth-ink);
}
.auth-save-box .auth-hint {
  margin-bottom: 16px;
}
.auth-save-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}
.auth-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 160px;
  padding: 14px 22px;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: none;
}
.auth-print-link {
  color: var(--auth-ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-success-questions h2 {
  font-family: var(--auth-sans);
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.auth-new-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--auth-ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-page.is-success .auth-sticky,
.auth-page.is-success #auth-foot {
  display: none;
}
.auth-page.is-success .auth-sheet {
  padding-bottom: 48px;
}
