:root {
  --bg: #ffffff;
  --text: #18212f;
  --muted: #5d6b82;
  --accent: #4856ff;
  --accent-2: #02b6c8;
  --card: #f5f7ff;
  --danger: #b94a5b;
  --ok: #27835a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
body.gate-active {
  overflow: hidden;
}
body.gate-active > *:not(#entryGate):not(#eSignatureModal) {
  visibility: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1100px, 92%); margin: 0 auto; }
.announcement {
  background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  color: white; font-weight: 600; padding: 10px 12px; text-align: center; font-size: 0.92rem;
}
.topbar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid #e6e9f2; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; gap: 12px; }
.brand { 
  font-weight: 800; 
  font-size: 1.4rem; 
  background: linear-gradient(90deg, #0052cc 0%, #7d3c98 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-links a { font-weight: 600; color: #31405a; }
.nav-links button { border: 0; background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%); background-size: 200% 100%; background-position: 0% 0%; animation: smoothFlowBorder 8.5s ease-in-out infinite; color: #fff; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
#logoutBtn { background: #fff !important; color: #31405a !important; border: 1px solid #cad2e7 !important; animation: none !important; padding: 9px 11px !important; }
.hero { padding: 28px 0 10px; }
.hero-header { display: flex; gap: 18px; align-items: center; justify-content: center; margin: 0 auto 20px; max-width: 820px; }
.hero-logo { flex-shrink: 0; width: 180px; height: 180px; display: flex; align-items: center; justify-content: center; }
.hero-logo-img { width: 100%; height: 100%; object-fit: contain; }
.hero-content { flex: 1; min-width: 0; }
.hero h1 { font-size: clamp(1.25rem, 2.6vw, 1.65rem); margin: 0 0 8px 0; text-align: left; background: linear-gradient(90deg, #0052cc 0%, #7d3c98 100%); background-size: 100%; background-position: 0% 0%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.01em; font-weight: 800; line-height: 1.3; }
.hero-subtext { margin: 0; font-size: 0.98rem; color: var(--muted); font-weight: 500; line-height: 1.45; letter-spacing: 0.005em; }
@media (max-width: 768px) {
  .hero-header { flex-direction: column; gap: 12px; justify-content: center; margin-bottom: 16px; }
  .hero-logo { width: 120px; height: 120px; }
  .hero-content { text-align: center; }
  .hero h1 { text-align: center; }
  .hero-subtext { text-align: center; }
}
.hero p { color: var(--muted); margin: 0; max-width: 860px; }
.spotlight-container { display: contents; }
.disclaimer-card {
  background: #fafbfc;
  padding: 12px;
  border-radius: 10px;
  margin: 14px 0;
  font-weight: 600;
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.disclaimer-card::before {
  content: '';
  position: absolute;
  inset: -2.5px;
  border-radius: 12px;
  z-index: -2;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    #1b0a5e 0%,
    #2418a0 8%,
    #2f4bc8 14%,
    #2660d4 18%,
    #3a3bbf 21%,
    #6a2dac 24%,
    #7b28a8 27%,
    #8625a0 30%,
    #6a2dac 34%,
    #3a3bbf 38%,
    #1b0a5e 50%,
    #2418a0 58%,
    #2f4bc8 64%,
    #2660d4 68%,
    #3a3bbf 71%,
    #6a2dac 74%,
    #7b28a8 77%,
    #8625a0 80%,
    #6a2dac 84%,
    #3a3bbf 88%,
    #1b0a5e 100%
  );
  animation: rotateBorderAngle 4s linear infinite;
  filter: brightness(1.15);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 2.5px;
}

@supports not (background: conic-gradient(from 0deg, red, red)) {
  .disclaimer-card::before {
    background: linear-gradient(
      90deg,
      #4000ff 0%,
      #6b00ff 25%,
      #0033cc 50%,
      #5500ff 75%,
      #4000ff 100%
    );
    background-size: 200% 100%;
    animation: smoothFlowBorder 8.5s linear infinite;
  }
}

@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes rotateBorderAngle {
  to {
    --border-angle: 360deg;
  }
}

.compliance-spotlight {
  margin-top: 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
}

.compliance-spotlight::before {
  display: none;
}
.spotlight-container {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.spotlight-content {
  flex: 1;
  min-width: 0;
}
.spotlight-logo-wrapper {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f2f6ff 0%, #e8f1ff 100%);
  border-radius: 16px;
  padding: 12px;
}
.spotlight-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.spotlight-head {
  display: none;
}
.spotlight-icon {
  display: none;
}
.spotlight-kicker {
  display: none;
}
.compliance-spotlight h2 {
  display: none;
}
.spotlight-pill-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1.5px solid #a8bef0;
  background: linear-gradient(135deg, rgba(241, 245, 255, 0.85) 0%, rgba(230, 240, 255, 0.65) 100%);
  color: #253b89;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 12px rgba(79, 86, 255, 0.12), inset 0 0 8px rgba(255, 255, 255, 0.5);
  position: relative;
}
.feature-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.feature-header h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #253b89;
}
.feature-text {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  color: #3a4d7a;
}
.feature-card:hover {
  transform: scale(1.08) translateZ(0) translateY(-6px);
  box-shadow: 0 0 25px rgba(79, 86, 255, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.8), 0 15px 30px rgba(79, 86, 255, 0.25);
  border-color: #7c8ae0;
  background: linear-gradient(135deg, rgba(241, 245, 255, 0.95) 0%, rgba(220, 235, 255, 0.95) 100%);
}
.feature-card.danger {
  border-color: #e9adb8;
  background: linear-gradient(135deg, rgba(255, 242, 244, 0.85) 0%, rgba(255, 230, 235, 0.65) 100%);
  color: #8f273d;
  box-shadow: 0 0 12px rgba(185, 74, 91, 0.12), inset 0 0 8px rgba(255, 255, 255, 0.5);
}
.feature-card.danger .feature-header h3,
.feature-card.danger .feature-text {
  color: #8f273d;
}
.feature-card.danger:hover {
  transform: scale(1.08) translateZ(0) translateY(-6px);
  box-shadow: 0 0 25px rgba(185, 74, 91, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.8), 0 15px 30px rgba(185, 74, 91, 0.25);
  border-color: #d17a92;
  background: linear-gradient(135deg, rgba(255, 242, 244, 0.95) 0%, rgba(255, 220, 230, 0.95) 100%);
}
.spotlight-critical {
  margin: 6px 0 8px;
  border: 1px solid #e29aa8;
  background: linear-gradient(180deg, #fff8f9 0%, #ffeef1 100%);
  color: #8a1f39;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.spotlight-primary {
  margin: 8px 0 8px;
  background: #fff;
  color: #1f2d52;
  border: 1px solid #cbd8fb;
  border-left: 5px solid #3856d6;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
}
.spotlight-secondary {
  margin: 0;
  background: #ffffff;
  border: 1px solid #d3ddf6;
  border-radius: 12px;
  padding: 11px 12px;
  color: #263656;
  line-height: 1.45;
  font-weight: 600;
}
.section-title { margin-top: 24px; margin-bottom: 8px; }
.search-wrap { position: relative; margin: 14px 0; flex: 1; }
.field .search-wrap { margin: 0; flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.search-wrap input {
  width: 100%; border: 1px solid #d4dcee; border-radius: 10px; padding: 10px 12px; font-size: 0.95rem;
}
.field .search-wrap input { padding: 9px; border-radius: 8px; }
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid #dfe5f4; border-radius: 10px; box-shadow: 0 10px 25px rgba(20,40,90,0.10);
  display: none; z-index: 20; max-height: 280px; overflow: auto;
}
.search-dropdown.open { display: block; }
.search-item {
  width: 100%; border: 0; border-bottom: 1px solid #edf1fa; background: #fff; padding: 8px;
  display: flex; gap: 10px; align-items: center; cursor: pointer; text-align: left;
}
.search-item img { width: 46px; height: 36px; object-fit: cover; border-radius: 6px; background: #dce1f2; }
.search-item:hover { background: #f5f7ff; }
.search-empty { padding: 10px 12px; color: var(--muted); font-size: 0.9rem; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
  margin: 18px 0 40px;
}
.product-card {
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(20,40,80,0.05);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: 
    linear-gradient(
      90deg,
      #4000ff 0%,
      #6b00ff 25%,
      #0033cc 50%,
      #5500ff 75%,
      #4000ff 100%
    );
  background-size: 200% 100%;
  background-position: 0% 0%;
  border-radius: 16px;
  z-index: -1;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  clip-path: polygon(
    0 0, 
    100% 0, 
    100% 100%, 
    0 100%, 
    0 0, 
    0 4px, 
    2px 2px, 
    4px 0, 
    calc(100% - 4px) 0,
    calc(100% - 2px) 2px,
    100% 4px,
    100% calc(100% - 4px),
    calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) 100%,
    4px 100%,
    2px calc(100% - 2px),
    0 calc(100% - 4px),
    0 4px
  );
}

.product-card:hover {
  box-shadow: 0 6px 18px rgba(20,40,80,0.05), 0 0 20px rgba(64, 0, 255, 0.25);
}
.product-card img { height: 500px; object-fit: cover; border-radius: 10px; background: #dce1f2; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 5px 8px; }
.badge.ruo { background: #e8edff; color: #2f44b8; border: none; cursor: pointer; min-width: fit-content; transition: all 0.3s ease; display: inline-block; }
.badge.ruo:hover { background: #d4deff; }
.badge.ruo[data-ruo-expanded="true"] { padding: 5px 12px; }
.badge.ruo[data-ruo-expanded="true"]::before { content: 'Research Use Only'; font-weight: 700; }
.badge.ruo[data-ruo-expanded="true"] { font-size: 0; }
.badge.ruo[data-ruo-expanded="true"]::before { font-size: 0.75rem; }
.badge.status-in { background: #eaf8f1; color: var(--ok); }
.badge.status-out { background: #fbecef; color: var(--danger); }
.badge.status-soon { background: #fff4df; color: #996100; }
.card-title { margin: 0; font-size: 1rem; }
.card-desc { color: var(--muted); font-size: 0.88rem; margin: 0; }
.dosage-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.dosage-btn {
  border: 1px solid #d5dbeb; background: #f7f9ff; color: #25324a;
  border-radius: 8px; padding: 5px 9px; font-size: 0.82rem; cursor: pointer;
}
.dosage-btn:disabled { cursor: not-allowed; opacity: 0.45; filter: grayscale(0.8); }
.product-card.unavailable { }
.product-card.unavailable .card-title { color: var(--muted); }
.product-card.unavailable .dosage-wrap { opacity: 0.6; filter: grayscale(0.7); }
.product-card:not(.coming-soon):not(.unavailable) { cursor: pointer; }
.primary-btn {
  border: 0; background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%); background-size: 200% 100%; background-position: 0% 0%; animation: smoothFlowBorder 8.5s ease-in-out infinite; color: #fff; font-weight: 700;
  border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.action-btn {
  width: 100%;
  height: 44px;
  margin: 14px 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.secondary-btn { border: 1px solid #cad2e7; background: #fff; border-radius: 10px; padding: 9px 11px; cursor: pointer; }
footer { margin-top: 40px; border-top: 1px solid #e6e9f2; padding: 32px 0 52px; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 52px; align-items: start; }
.footer-col-links { padding-top: 0; }
.footer-col-label { font-size: 0.78rem; font-weight: 700; color: var(--text); margin: 0 0 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0; }
.footer-links a { display: block; color: var(--accent); text-decoration: none; font-size: 0.85rem; font-weight: 600; line-height: 2.1; transition: color 0.18s ease; }
.footer-links a:hover { color: var(--accent-2); }
.footer-legal-section { font-size: 0.82rem; line-height: 1.65; color: var(--muted); }
.footer-legal-section h3 { font-size: 0.82rem; font-weight: 700; color: var(--text); margin: 0 0 6px; letter-spacing: 0; text-transform: none; }
.footer-legal-section p { margin: 0; }
.footer-legal-section-stack { display: flex; flex-direction: column; }
.footer-legal-section + .footer-legal-section { border-top: 1px solid #e6e9f2; margin-top: 18px; padding-top: 18px; }
.contact-section { border-top: 1px solid #e6e9f2; margin-top: 24px; padding-top: 22px; }
.contact-list p { margin: 6px 0; color: #33445f; }
.overlay {
  position: fixed; inset: 0; background: rgba(14,18,26,0.68); display: none;
  align-items: center; justify-content: center; z-index: 120;
}
.overlay.active { display: flex; }
.gate-wall {
  background:
    radial-gradient(circle at top left, rgba(72, 86, 255, 0.2), transparent 32%),
    radial-gradient(circle at top right, rgba(2, 182, 200, 0.18), transparent 30%),
    linear-gradient(180deg, #eef3ff 0%, #f7fbff 52%, #edf7fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2vw, 28px);
  overflow-y: auto;
  overflow-x: hidden;
}
@media (max-width: 820px) {
  .gate-wall {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: clamp(12px, 2vw, 20px);
  }
}
.gate-modal {
  width: min(1240px, calc(100vw - clamp(32px, 4vw, 56px)));
  max-width: 100%;
  min-height: auto;
  max-height: none;
  height: auto;
  margin: 0;
  border-radius: 0;
  overflow: visible;
  padding: clamp(12px, 1.6vw, 20px) clamp(18px, 2.4vw, 28px);
  background: transparent;
  box-shadow: none;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 460px);
  column-gap: clamp(24px, 3.2vw, 44px);
  row-gap: 22px;
  align-items: center;
  justify-content: center;
}
@media (max-width: 1240px) {
  .gate-modal {
    width: min(1120px, calc(100vw - 32px));
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    column-gap: clamp(20px, 2.6vw, 30px);
  }
}
@media (max-width: 960px) {
  .gate-modal {
    width: min(940px, calc(100vw - 28px));
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    column-gap: 18px;
  }
}
@media (max-width: 820px) {
  .gate-modal {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    max-height: none;
    height: auto;
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 20px;
    overflow: visible;
    justify-content: stretch;
    align-items: stretch;
    padding: clamp(10px, 1.5vw, 16px) clamp(12px, 2.5vw, 18px);
    display: flex;
    flex-direction: column;
  }
}
.gate-modal > * {
  min-width: 0;
}
.gate-brand-panel {
  width: min(100%, 680px);
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6px, 1vw, 12px);
  min-width: 0;
  max-width: 680px;
  justify-self: stretch;
}
@media (max-width: 820px) {
  .gate-brand-panel {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin-bottom: 12px;
  }
}
.gate-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e9efff;
  color: #324aa0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
}
.gate-title {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.02;
  color: #1b2850;
}
.gate-copy {
  margin: 0 0 12px;
  color: #33445f;
  line-height: 1.5;
}
.gate-brand-points {
  display: grid;
  gap: 12px;
  margin: 18px 0 14px;
}
.gate-point {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid #d2ddf6;
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(241,247,255,0.92) 100%);
  box-shadow: 0 16px 30px rgba(27, 54, 112, 0.08);
}
.gate-point strong {
  display: block;
  margin-bottom: 6px;
  color: #243a81;
}
.gate-point p {
  margin: 0;
  color: #33445f;
  line-height: 1.45;
}
.gate-disclaimer {
  margin: 14px 0 0;
  max-width: 540px;
}
@media (max-width: 820px) {
  .gate-disclaimer {
    max-width: 100%;
    margin: 10px 0 0;
  }
}
.gate-auth-shell {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  justify-self: stretch;
  min-width: 0;
}
@media (max-width: 820px) {
  .gate-auth-shell {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
  }
}
.gate-auth-card {
  width: 100%;
  max-width: 560px;
  padding: clamp(20px, 2.2vw, 28px);
  border-radius: 26px;
  border: 1px solid #d5dff6;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,249,255,0.98) 100%);
  box-shadow: 0 26px 48px rgba(22, 45, 97, 0.16);
  min-width: 0;
}
@media (max-width: 820px) {
  .gate-auth-card {
    max-width: 100%;
    width: 100%;
  }
}
.gate-auth-header {
  margin-bottom: 18px;
}
.gate-auth-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #4c61b9;
}
.gate-auth-title {
  margin: 0 0 10px;
  color: #16234d;
}
.gate-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border-radius: 16px;
  background: #edf2ff;
}
.gate-mode-tab {
  border: 1px solid #e6e9f2;
  border-radius: 14px;
  background: #fff;
  color: #3d4d7b;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20,40,80,0.05);
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
}
.gate-mode-tab::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  border-radius: 16px;
  z-index: -1;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  clip-path: polygon(
    0 0, 100% 0, 100% 100%, 0 100%, 0 0, 0 4px, 2px 2px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 2px) 2px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) 100%, 4px 100%, 2px calc(100% - 2px),
    0 calc(100% - 4px), 0 4px
  );
}
.gate-mode-tab.active {
  background: #fff;
  color: #223780;
  box-shadow: 0 6px 18px rgba(20,40,80,0.05);
}
.gate-mode-panel {
  display: none;
}
.gate-mode-panel.active {
  display: block;
}
.gate-name-grid {
  gap: 12px;
}
.gate-checks {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #d6e0f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f7ff 100%);
}
.gate-signature-note {
  margin: 0 0 14px;
}
.gate-coa-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 150px;
  margin-top: 6px;
}
.gate-submit {
  width: 100%;
}
.modal {
  width: min(1000px, 94vw); background: #fff; border-radius: 14px; padding: 14px; max-height: 96vh; overflow: auto;
}
/* Product modal with wider layout for compound details */
.product-modal {
  width: min(1220px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.modal h2 { margin-top: 0; margin-bottom: 6px; }
.modal-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #d4dcee;
  margin-bottom: 10px;
}
.modal > p { margin: 4px 0; }
#complianceOverlay > .modal > p[data-disclaimer-long] {
  background: rgba(72, 86, 255, 0.08);
  border: 1.5px solid rgba(72, 86, 255, 0.3);
  border-radius: 12px;
  padding: 10px;
  margin: 10px 0 !important;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #1a1a1a;
  box-shadow: 0 0 25px rgba(72, 86, 255, 0.18), inset 0 0 10px rgba(72, 86, 255, 0.06), 0 0 20px rgba(72, 86, 255, 0.08);
}
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.product-top-area { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 14px; }
.product-top-area > div:last-child { display: flex; flex-direction: column; gap: 8px; }
#productModalOverlay #modalImage { height: 800px; object-fit: cover; border-radius: 10px; margin-left: 60px; }
.field { display: grid; gap: 4px; margin: 4px 0; }
.field label { display: flex; flex-direction: column; gap: 4px; }
.address-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.address-row .field { width: 100%; }
.address-row .field label { display: flex; flex-direction: column; gap: 4px; }
.address-row .field input { min-height: 36px; }
.field .search-wrap { position: relative; margin: 0; }
.optional-label { color: #7a8ba3; font-size: 13px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #d4dcee; border-radius: 8px; padding: 6px 9px; flex: 1; min-height: 36px;
}
.field .search-wrap input { padding: 6px 9px; border-radius: 8px; min-height: 36px; }

/* Compound Details Section Styling */
.compound-details-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e6e9f2;
}

.compound-details-layout {
  display: grid;
  grid-template-columns: 65% 35%;
  gap: 16px;
  align-items: start;
}

.properties-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d4dcee;
  overflow: hidden;
}

.properties-header {
  background: #3a4a5e;
  color: #fff;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.properties-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.property-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f3ff;
  align-items: flex-start;
}

.property-row:last-child {
  border-bottom: none;
}

.property-row:nth-child(odd) {
  background: #fafbfd;
}

.property-label {
  font-weight: 600;
  color: #3a4a5e;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.property-value {
  color: #1a1a1a;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
}

.structure-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d4dcee;
  overflow: hidden;
  min-height: 350px;
}

.structure-header {
  background: #3a4a5e;
  color: #fff;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.structure-image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #fafbfd;
}

.structure-image-container img {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  border-radius: 4px;
}

/* Stacked compound blocks for blends */
.compound-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.compound-block:not(:last-child) {
  padding-bottom: 16px;
  border-bottom: 1px solid #e6e9f2;
}

.compound-block-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.5px;
  margin-top: 4px;
  margin-bottom: 8px;
}

/* Blend layout with 68/32 split and compact sizing */
.blend-layout {
  display: grid;
  grid-template-columns: 68% 32%;
  gap: 14px;
  align-items: start;
}

.compact-table .property-row {
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid #f0f3ff;
  font-size: 0.85rem;
}

.compact-table .property-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.compact-table .property-value {
  font-size: 0.85rem;
  line-height: 1.3;
}

.compact-structure {
  min-height: 280px;
}

.compact-structure .structure-image-container img {
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
}

.properties-header,
.structure-header {
  padding: 10px 12px;
  font-size: 0.9rem;
}

/* Responsive adjustments for Compound Details */
@media (max-width: 1200px) {
  .compound-details-layout {
    grid-template-columns: 1fr;
  }
  
  .structure-panel {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .product-modal {
    width: min(100vw, 96vw);
  }
  
  .property-row {
    grid-template-columns: 100px 1fr;
    gap: 8px;
    padding: 8px 10px;
  }
  
  .property-label {
    font-size: 0.85rem;
  }
  
  .property-value {
    font-size: 0.85rem;
  }
  
  .properties-header,
  .structure-header {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  
  #productModalOverlay #modalImage {
    height: 550px;
  }
}

.shipping-methods { margin: 20px 0; border: 1px solid #e6e9f2; border-radius: 10px; padding: 14px; background: #f9fafc; }
.shipping-methods h3 { margin: 0 0 12px; font-size: 14px; }
.shipping-option { margin-bottom: 14px; }
.shipping-option label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.shipping-option input[type="radio"] { cursor: pointer; }
.signature-canvas {
  border: 2px solid #d4dcee;
  border-radius: 8px;
  background: #fff;
  display: block;
  width: 100%;
  height: 105px;
  cursor: crosshair;
  touch-action: none;
}
.signature-consent {
  background: #f5f7ff;
  border: 1px solid #d4dcee;
  border-radius: 8px;
  padding: 8px;
  margin: 0;
}
.signature-consent h3 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.5px;
}
.signature-legal-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #1a1a1a;
  font-family: 'Times New Roman', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.2px;
}
.checkbox { 
  display: flex; 
  gap: 8px; 
  align-items: flex-start; 
  margin: 8px 0; 
  color: #1a1a1a;
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.2px;
}
.compliance-form-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  justify-items: center;
}
.compliance-left {
  display: none;
}
.compliance-right {
  display: grid;
  gap: 8px;
}
.small { font-size: 0.85rem; color: var(--muted); }
.cart-panel {
  position: fixed; right: 0; top: 0; height: 100vh; width: min(380px, 95vw);
  background: #fff; border-left: 1px solid #e6e9f2; z-index: 90; transform: translateX(100%);
  transition: transform 0.25s ease; display: flex; flex-direction: column;
}
.cart-panel.open { transform: translateX(0); }
.cart-header {
  flex-shrink: 0;
  padding: 14px;
  border-bottom: 2px solid #e6e9f2;
}
.cart-footer {
  flex-shrink: 0;
  padding: 14px;
  border-top: 2px solid #e6e9f2;
  margin-top: auto;
}
.cart-items {
  flex: 1;
  padding: 0;
  overflow: auto;
  display: grid;
  gap: 0;
  border-top: 1px solid #e6e9f2;
}
.cart-item {
  border: none;
  border-bottom: 1px solid #e6e9f2;
  border-radius: 0;
  padding: 4px 12px;
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item p {
  margin: 2px 0;
}
.cart-item .row {
  margin: 2px 0;
}
.cart-item .secondary-btn {
  padding: 5px 8px;
  font-size: 0.85rem;
}
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.inline-warning { color: #7c2330; font-weight: 600; }
.page-wrap { padding: 30px 0; }
.page-wrap h1 { background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%); background-size: 200% 100%; background-position: 0% 0%; animation: smoothFlowBorder 8.5s ease-in-out infinite; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.card {
  border: 1px solid #e6e9f2;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(20,40,80,0.05);
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
}
.card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  border-radius: 16px;
  z-index: -1;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  clip-path: polygon(
    0 0, 100% 0, 100% 100%, 0 100%, 0 0, 0 4px, 2px 2px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 2px) 2px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) 100%, 4px 100%, 2px calc(100% - 2px),
    0 calc(100% - 4px), 0 4px
  );
}
.coa-grid { display: grid; gap: 12px; }
.highlight-coa { animation: highlightGlow 3s ease-out forwards; }
@keyframes highlightGlow {
  0% { box-shadow: 0 0 0 0 rgba(64, 0, 255, 0.8), 0 0 0 8px rgba(64, 0, 255, 0.6), 0 0 0 16px rgba(64, 0, 255, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(64, 0, 255, 0.6), 0 0 0 20px rgba(64, 0, 255, 0.3), 0 0 0 28px rgba(64, 0, 255, 0.1); }
  100% { box-shadow: 0 0 0 12px rgba(64, 0, 255, 0.2), 0 0 0 24px rgba(64, 0, 255, 0.1), 0 0 0 36px rgba(64, 0, 255, 0); }
}
.checkout-steps { display: grid; gap: 14px; }
.step-tabs { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 10; }
.step-tab {
  border: 1px solid #e6e9f2;
  background: #fff;
  padding: 8px 10px;
  border-radius: 14px;
  cursor: default;
  text-align: center;
  box-shadow: 0 6px 18px rgba(20,40,80,0.05);
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
}
.step-tab::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  border-radius: 16px;
  z-index: -1;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  clip-path: polygon(
    0 0, 100% 0, 100% 100%, 0 100%, 0 0, 0 4px, 2px 2px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 2px) 2px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) 100%, 4px 100%, 2px calc(100% - 2px),
    0 calc(100% - 4px), 0 4px
  );
}
.step-tab.active { background: #e9edff; border-color: #8da0ff; color: #2e43b4; font-weight: 700; }
.checkout-step {
  display: none;
  border: 1px solid #e6e9f2;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(20,40,80,0.05);
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
}
.checkout-step::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  border-radius: 16px;
  z-index: -1;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  clip-path: polygon(
    0 0, 100% 0, 100% 100%, 0 100%, 0 0, 0 4px, 2px 2px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 2px) 2px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) 100%, 4px 100%, 2px calc(100% - 2px),
    0 calc(100% - 4px), 0 4px
  );
}
.checkout-step.active { display: block; }
.tabs { display: flex; gap: 8px; }
.tab {
  border: 1px solid #e6e9f2;
  padding: 8px 10px;
  border-radius: 14px;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 6px 18px rgba(20,40,80,0.05);
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
}
.tab::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  border-radius: 16px;
  z-index: -1;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  clip-path: polygon(
    0 0, 100% 0, 100% 100%, 0 100%, 0 0, 0 4px, 2px 2px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 2px) 2px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) 100%, 4px 100%, 2px calc(100% - 2px),
    0 calc(100% - 4px), 0 4px
  );
}
.tab.active { background: #e9edff; border-color: #8da0ff; color: #2e43b4; font-weight: 700; }

/* Order Review Section */
.order-review-container {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  margin: 14px 0;
  padding: 14px;
  background: var(--card);
  border-radius: 12px;
  position: relative;
}

.order-items-section h3 {
  margin: 0 0 14px 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.order-items-grid {
  display: grid;
  gap: 12px;
}

.order-item-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.order-item-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(72, 86, 255, 0.1);
}

.order-item-card img {
  width: 120px;
  height: 180px;
  object-fit: contain;
  border-radius: 6px;
  background: #e6e9f2;
  flex-shrink: 0;
}

.item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-details h4 {
  margin: 0 0 3px 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.item-dosage {
  margin: 0 0 4px 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.item-price-qty {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.order-totals {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

.totals-box {
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 8px;
  padding: 12px;
  position: sticky;
  top: 80px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--text);
}

.total-row:last-child {
  margin-bottom: 0;
}

.total-row span:last-child {
  font-weight: 600;
}

.total-row.total-final {
  border-top: 2px solid #e6e9f2;
  padding-top: 8px;
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.final-acknowledgment-section {
  padding: 12px;
  background: #fafbfc;
  border-radius: 10px;
  margin: 12px 0 0 0;
  border-left: 4px solid var(--accent);
}

.final-acknowledgment-section label {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.final-acknowledgment-section input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

/* Terms and Conditions Section */
.terms-and-conditions-section {
  padding: 12px;
  background: #fafbfc;
  border-radius: 10px;
  border-left: 4px solid var(--accent);
}

.terms-header {
  margin-bottom: 12px;
}

.terms-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.terms-checkbox input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Accordion */
.terms-accordion {
  margin-bottom: 12px;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
  user-select: none;
  appearance: none;
  outline: none;
  box-sizing: border-box;
}

.accordion-header:hover {
  border-color: var(--accent);
  background: #f5f7ff;
  box-shadow: 0 2px 4px rgba(72, 86, 255, 0.1);
}

.accordion-header:active {
  transform: scale(0.99);
}

.accordion-header:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.accordion-icon {
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.accordion-content {
  margin-top: 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 6px;
  overflow-y: scroll;
  font-size: 0.78rem;
  line-height: 1.6;
  box-shadow: inset 0 1px 3px rgba(20, 40, 80, 0.02);
}

.accordion-content-collapsed {
  display: none;
}

.accordion-content-expanded {
  display: block;
  max-height: 280px;
}

.terms-body h4 {
  margin: 0 0 8px 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.terms-body h5 {
  margin: 10px 0 6px 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.terms-body p {
  margin: 0 0 8px 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text);
}

.terms-body ul {
  margin: 6px 0 8px 16px;
  padding: 0;
}

.terms-body li {
  margin-bottom: 4px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text);
}

/* Signature Section */
.signature-section {
  display: grid;
  gap: 12px;
}

.signature-box-wrapper {
  display: grid;
  gap: 8px;
}

.signature-box-wrapper label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.required-mark {
  color: var(--danger);
}

.signature-pad {
  width: 100%;
  height: 120px;
  border: 2px solid #e6e9f2;
  border-radius: 6px;
  background: #fff;
  cursor: crosshair;
  display: block;
  box-shadow: inset 0 1px 3px rgba(20, 40, 80, 0.05);
  touch-action: none;
}

.signature-pad:hover {
  border-color: var(--accent);
}

.signature-pad:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 1px 3px rgba(20, 40, 80, 0.05), 0 0 0 3px rgba(72, 86, 255, 0.1);
}

.clear-signature-btn {
  padding: 6px 10px;
  font-size: 0.78rem;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.clear-signature-btn:hover {
  background: #f5f7ff;
  border-color: var(--accent);
  color: var(--accent);
}

.printed-name-section {
  padding: 10px;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 6px;
}

.printed-name-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.printed-name-display {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.printed-name-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
  font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
  .order-review-container {
    grid-template-columns: 1fr;
  }
  .totals-box {
    position: static;
  }
}

@media (max-width: 760px) {
  .modal-grid, .footer-grid { grid-template-columns: 1fr; }
  .compliance-form-layout { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .gate-brand-panel {
    min-height: auto;
    padding: 0 0 16px 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  .gate-title {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    margin-bottom: 12px;
  }
  .gate-copy {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 10px;
  }
  .gate-point {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
  .gate-point strong {
    margin-bottom: 4px;
    font-size: 0.95rem;
  }
  .gate-point p {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  .gate-brand-points {
    margin: 14px 0 10px;
    gap: 10px;
  }
  .gate-coa-link {
    min-width: auto;
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  .gate-auth-shell {
    justify-content: stretch;
  }
  .gate-auth-card {
    width: 100%;
    max-width: 100%;
    padding: clamp(16px, 2.5vw, 20px);
  }
  .gate-auth-title {
    font-size: clamp(1.3rem, 4vw, 1.5rem);
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .gate-wall {
    padding: clamp(12px, 2vw, 20px);
  }
  .gate-modal {
    padding: clamp(10px, 1.5vw, 16px) clamp(12px, 2.5vw, 16px);
    row-gap: 18px;
  }
  .gate-brand-panel {
    padding: 0 0 12px 0;
  }
  .gate-eyebrow {
    font-size: 0.7rem;
    padding: 6px 9px;
    margin-bottom: 10px;
  }
  .gate-title {
    font-size: clamp(1.5rem, 4.5vw, 2rem);
    margin-bottom: 10px;
  }
  .gate-copy {
    font-size: clamp(0.85rem, 2.3vw, 0.95rem);
    margin-bottom: 8px;
  }
  .gate-brand-points {
    margin: 12px 0 8px;
    gap: 8px;
  }
  .gate-point {
    padding: 10px 12px;
    border-radius: 14px;
  }
  .gate-point strong {
    font-size: 0.9rem;
    margin-bottom: 3px;
  }
  .gate-point p {
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .gate-auth-card {
    padding: clamp(14px, 2vw, 18px);
    border-radius: 20px;
  }
  .gate-mode-tabs {
    gap: 6px;
    margin-bottom: 14px;
    padding: 4px;
  }
  .gate-mode-tab {
    padding: 9px 12px;
    font-size: 0.9rem;
    border-radius: 12px;
  }
  .gate-auth-header p {
    font-size: 0.85rem;
  }
  .field input, .field select, .field textarea {
    padding: 5px 8px;
    font-size: 0.95rem;
    min-height: 32px;
  }
  .field label {
    font-size: 0.9rem;
  }
  .gate-submit {
    padding: 9px 12px;
    font-size: 0.95rem;
    min-height: 40px;
  }
  .checkbox {
    gap: 6px;
    font-size: 0.8rem;
  }
}

@keyframes smoothFlowBorder {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

/* Notification System */
.notification-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 90%;
  max-width: clamp(280px, 90%, 500px);
}

.notification {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.notification::before {
  content: '⚠';
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notification-error {
  background: #ffa500;
  color: #ffffff;
}

.notification-success {
  background: #27835a;
  color: #ffffff;
}

.notification-info {
  background: #4856ff;
  color: #ffffff;
}

.notification.fade-out {
  animation: slideUp 0.3s ease-in forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* Contact Page Styles */
.contact-page {
  padding: 32px 0 48px;
}

.contact-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 960px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Support Information Section */
.support-info h2 {
  font-size: 1.6rem;
  margin: 0 0 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.support-accordion {
  border-bottom: 1px solid #e6e9f2;
  padding: 16px 0;
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s ease;
}

.accordion-header:hover {
  color: var(--accent);
}

.accordion-icon {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.2s ease;
}



.accordion-content p {
  margin: 0;
}

.support-notices {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e6e9f2;
}

.support-notices p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

.support-notices p:last-child {
  margin-bottom: 0;
}

/* Contact Form Styles */
.contact-form-wrapper {
  background: #f5f7ff;
  border-radius: 16px;
  padding: 28px;
  height: fit-content;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.required {
  color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid #d4dcee;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #ffffff;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(72, 86, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
  font-family: inherit;
}

.form-group input[type="file"] {
  padding: 8px 0;
}

.contact-form .primary-btn {
  margin-top: 8px;
  font-size: 0.95rem;
  padding: 12px 16px;
  font-weight: 700;
}

/* Gate Terms Links */
.gate-terms-link {
  color: #4856ff;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.gate-terms-link:hover {
  color: #0033cc;
}

/* Gate E-Signature Button */
.e-signature-field {
  width: 100%;
}

.e-signature-box {
  display: inline-block;
  width: auto;
  min-height: auto;
  border: none;
  background: linear-gradient(90deg, #4000ff 0%, #6b00ff 25%, #0033cc 50%, #5500ff 75%, #4000ff 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  animation: smoothFlowBorder 8.5s ease-in-out infinite;
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
}

.e-signature-box:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.signature-preview-container {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e6e9f2;
  border-radius: 8px;
  background: #f9fbff;
  text-align: center;
}

.signature-preview-image {
  max-width: 200px;
  max-height: 100px;
  border: 1px solid #d4dcee;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

.signature-display-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
}

.signature-display-image {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  display: block;
  border-bottom: 1px solid #e6e9f2;
  padding-bottom: 8px;
}

.signature-status-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #22c55e;
  letter-spacing: 0.5px;
}

/* Checkout E-Signature Modal */
.e-signature-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 18, 26, 0.68);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 130;
}

.e-signature-modal:not([hidden]) {
  display: flex;
}

.e-signature-modal-content {
  background: #fff;
  border-radius: 14px;
  max-width: 600px;
  width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 26px 48px rgba(22, 45, 97, 0.16);
}

.e-signature-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e6e9f2;
  flex-shrink: 0;
}

.e-signature-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.e-signature-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.e-signature-close:hover {
  color: var(--text);
}

.e-signature-modal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.e-signature-canvas-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.e-signature-canvas-container label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.signature-canvas {
  border: 2px solid #d4dcee;
  border-radius: 8px;
  background: #fff;
  display: block;
  width: 100%;
  height: 200px;
  cursor: crosshair;
  touch-action: none;
}

.signature-canvas:hover {
  border-color: var(--accent);
}

.signature-canvas:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(72, 86, 255, 0.1);
}

.e-signature-modal-footer {
  padding: 20px;
  border-top: 1px solid #e6e9f2;
  background: #f9fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.signature-name-label {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}

.e-signature-modal-footer .primary-btn {
  margin: 0;
  font-size: 0.95rem;
  padding: 10px 16px;
}
