/* Antidote Health Design System — Prior Authorization Portal */
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/Montserrat-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/Montserrat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ah-deep-blue: #090942;
  --ah-purple: #6e81ff;
  --ah-lilac: #e4e4fb;
  --ah-orange: #ff5d11;
  --ah-white: #ffffff;
  --ah-black: #000000;
  --ah-gray-100: #f9f9f9;
  --ah-gray-200: #f6f6f6;
  --ah-gray-300: #ededed;
  --ah-border: #cccccc;
  --ah-muted: #767676;
  --ah-success: #15803d;
  --ah-success-bg: #ecfdf5;
  --ah-error: #c33737;
  --ah-error-bg: #fef2f2;
  --ah-heading-font: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  --ah-body-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--ah-body-font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ah-black);
  background-color: var(--ah-gray-200);
  background-image: url("/static/images/antidote-bg-gradient.png");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
  -webkit-font-smoothing: antialiased;
}

/* Sticky Top Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ah-gray-300);
}

.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 20px;
  background: var(--ah-border);
}

.brand-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--ah-deep-blue);
  letter-spacing: 0.01em;
}

.security-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ah-deep-blue);
  background: var(--ah-lilac);
  padding: 6px 14px;
  border-radius: 999px;
}

.security-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ah-orange);
}

/* Hero Banner */
.hero {
  background-color: var(--ah-deep-blue);
  background-image: url("/static/images/antidote-bg-navy-grid.png");
  background-size: cover;
  background-position: center;
  color: var(--ah-white);
  padding: 44px 24px 56px;
}

.hero-inner {
  max-width: 920px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ah-lilac);
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--ah-heading-font);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.hero p {
  margin: 0;
  max-width: 660px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(228, 228, 251, 0.88);
}

/* Progress Steps Bar */
.progress-strip {
  max-width: 920px;
  margin: -26px auto 28px;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.progress-card {
  background: var(--ah-white);
  border: 1px solid var(--ah-gray-300);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 10px 30px rgba(9, 9, 66, 0.07);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.step-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ah-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
}

.step-link:hover {
  background: var(--ah-gray-100);
  color: var(--ah-deep-blue);
}

.step-link.is-complete {
  color: var(--ah-deep-blue);
}

.step-num {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--ah-lilac);
  color: var(--ah-deep-blue);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-link.is-complete .step-num {
  background: var(--ah-deep-blue);
  color: var(--ah-white);
}

/* Main Container */
.main-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* Form Section Cards */
.section-card {
  background: var(--ah-white);
  border: 1px solid var(--ah-gray-300);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(9, 9, 66, 0.035);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ah-gray-300);
}

.section-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ah-purple);
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--ah-heading-font);
  font-size: 21px;
  font-weight: 500;
  color: var(--ah-deep-blue);
  margin: 0;
}

.section-subtitle {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ah-muted);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
}

.grid-name {
  display: grid;
  grid-template-columns: 1fr 110px 1fr;
  gap: 18px 16px;
}

.grid-address {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.9fr;
  gap: 18px 16px;
}

.col-full {
  grid-column: 1 / -1;
}

.mt-16 {
  margin-top: 16px;
}

.mt-18 {
  margin-top: 18px;
}

.provider-subcard {
  background: var(--ah-gray-100);
  border: 1px solid var(--ah-gray-300);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
}

.provider-subcard:last-child {
  margin-bottom: 0;
}

.provider-subcard-title {
  font-family: var(--ah-heading-font);
  font-size: 16px;
  font-weight: 600;
  color: var(--ah-deep-blue);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.provider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ah-purple);
}

.provider-dot.is-dest {
  background: var(--ah-orange);
}

/* Form Controls */
.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ah-deep-blue);
  margin-bottom: 7px;
}

.req {
  color: var(--ah-orange);
  margin-left: 2px;
}

.hint {
  font-size: 12px;
  color: var(--ah-muted);
  margin-top: 5px;
}

input[type="text"],
input[type="date"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  font-family: var(--ah-body-font);
  font-size: 15px;
  font-weight: 400;
  color: var(--ah-black);
  background: var(--ah-white);
  border: 1px solid var(--ah-border);
  border-radius: 8px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: var(--ah-muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ah-purple);
  box-shadow: 0 0 0 3px rgba(110, 129, 255, 0.18);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--ah-error);
  box-shadow: 0 0 0 3px rgba(195, 55, 55, 0.12);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

/* Pill Radio Groups */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-option {
  position: relative;
}

.pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-option span {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--ah-border);
  background: var(--ah-white);
  color: var(--ah-deep-blue);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.pill-option input[type="radio"]:checked + span {
  background: var(--ah-deep-blue);
  border-color: var(--ah-deep-blue);
  color: var(--ah-white);
}

.pill-option input[type="radio"]:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(110, 129, 255, 0.3);
}

/* File Upload Dropzone */
.dropzone {
  border: 2px dashed var(--ah-purple);
  background: #f7f8ff;
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dropzone:hover,
.dropzone.is-dragover {
  background: var(--ah-lilac);
  border-color: var(--ah-deep-blue);
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ah-deep-blue);
  color: var(--ah-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.dropzone-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ah-deep-blue);
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 13px;
  color: var(--ah-muted);
}

.file-input-hidden {
  display: none;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--ah-gray-100);
  border: 1px solid var(--ah-gray-300);
  border-radius: 10px;
  font-size: 13.5px;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.file-ext {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ah-lilac);
  color: var(--ah-deep-blue);
}

.file-name {
  font-weight: 500;
  color: var(--ah-deep-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: var(--ah-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.file-remove {
  background: transparent;
  border: 1px solid var(--ah-border);
  color: var(--ah-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.file-remove:hover {
  border-color: var(--ah-error);
  color: var(--ah-error);
}

/* Honeypot */
.hp-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Alerts */
.alert-banner {
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.alert-banner.is-visible {
  display: block;
}

.alert-error {
  background: var(--ah-error-bg);
  border: 1px solid #fca5a5;
  color: var(--ah-error);
}

/* Submit Footer Card */
.submit-card {
  background: var(--ah-white);
  border: 1px solid var(--ah-gray-300);
  border-radius: 20px;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 6px 24px rgba(9, 9, 66, 0.05);
}

.attestation {
  font-size: 13px;
  color: var(--ah-muted);
  line-height: 1.5;
  max-width: 520px;
}

.btn-primary {
  font-family: var(--ah-body-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--ah-white);
  background: var(--ah-deep-blue);
  border: 2px solid var(--ah-deep-blue);
  border-radius: 999px;
  padding: 14px 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: transparent;
  color: var(--ah-deep-blue);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-accent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ah-orange);
}

/* Confirmation Receipt Screen */
.receipt-card {
  display: none;
  background: var(--ah-white);
  border: 1px solid var(--ah-gray-300);
  border-radius: 24px;
  padding: 48px 36px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(9, 9, 66, 0.08);
}

.receipt-card.is-visible {
  display: block;
}

.receipt-check {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ah-success-bg);
  color: var(--ah-success);
  font-size: 28px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.receipt-card h2 {
  font-family: var(--ah-heading-font);
  font-size: 28px;
  font-weight: 500;
  color: var(--ah-deep-blue);
  margin: 0 0 10px;
}

.receipt-ref-box {
  display: inline-block;
  margin: 18px 0 24px;
  padding: 14px 24px;
  border-radius: 12px;
  background: var(--ah-gray-100);
  border: 1px solid var(--ah-gray-300);
}

.receipt-ref-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ah-muted);
}

.receipt-ref-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--ah-deep-blue);
  margin-top: 4px;
}

.footer-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--ah-muted);
  margin-top: 32px;
}

@media (max-width: 780px) {
  .progress-card {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2, .grid-3, .grid-name, .grid-address {
    grid-template-columns: 1fr;
  }
  .submit-card {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary {
    justify-content: center;
  }
}
