body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gray-bg);
}

.gate-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: calc(100vh - 56px);
}

/* Left panel */
.gate-hero {
  background: var(--navy-dark);
  padding: clamp(56px, 5.5vw, 84px) clamp(36px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.gate-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(
      ellipse 88% 72% at -2% 10%,
      rgba(4, 8, 24, 0.97) 0%,
      rgba(8, 13, 35, 0.9) 44%,
      rgba(8, 13, 35, 0.4) 67%,
      transparent 84%
    ),
    radial-gradient(
      ellipse 78% 58% at -2% 104%,
      rgba(4, 8, 24, 0.98) 0%,
      rgba(8, 13, 35, 0.9) 45%,
      rgba(8, 13, 35, 0.4) 70%,
      transparent 88%
    );
  pointer-events: none;
}

.gate-hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.gate-hero-copy,
.hero-stats {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.gate-hero-copy {
  max-width: 680px;
}

.hero-logo {
  display: block;
  width: clamp(230px, 30vw, 360px);
  max-width: 100%;
  height: auto;
  margin-bottom: clamp(28px, 3vw, 42px);
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.22));
}

.hero-title {
  font-size: clamp(2.75rem, 4.25vw, 4.25rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
}

.hero-title span {
  color: var(--crimson);
  font-weight: 800;
}

.hero-desc {
  font-size: clamp(0.98rem, 1.15vw, 1.08rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
  line-height: 1.65;
}

.hero-window-note {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(8, 13, 35, 0.52);
  box-shadow: 0 8px 24px rgba(4, 8, 24, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  font-size: clamp(0.9rem, 1vw, 0.98rem);
  font-weight: 600;
  text-shadow: none;
}

.hero-window-icon {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.86);
}

.hero-stats {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 56px;
  padding: 14px 18px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 9, 28, 0.38);
  box-shadow: 0 12px 30px rgba(4, 8, 24, 0.18);
  backdrop-filter: blur(12px);
  text-shadow: none;
}

.hero-stat-val {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-stat-lbl {
  font-size: 0.69rem;
  color: rgba(255, 255, 255, 0.76);
  margin-top: 5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Right panel */
.gate-panel {
  --sidebar-gutter: 28px;
  --sidebar-stack-gap: 14px;
  min-height: 0;
  background: var(--gray-bg);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(38, 47, 104, 0.12);
  box-shadow: -14px 0 36px rgba(8, 13, 35, 0.08);
}

.gate-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sidebar-stack-gap);
  padding: 32px var(--sidebar-gutter) 28px;
  overflow-y: auto;
}

.gate-panel-subtitle {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Field panels */
.field-panel {
  display: none;
}
.field-panel.visible {
  display: block;
  padding: 18px;
  border: 1px solid rgba(38, 47, 104, 0.1);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(38, 47, 104, 0.06);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.field-panel.visible:hover {
  border-color: rgba(38, 47, 104, 0.18);
  box-shadow: 0 10px 24px rgba(38, 47, 104, 0.08);
}

.gate-panel .form-group {
  gap: 8px;
}

#panelDept .form-group + .form-group {
  margin-top: 22px;
}

.gate-panel .form-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  color: var(--text-soft);
}

.gate-panel .form-control {
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border-input);
  border-radius: 9px;
  background: var(--surface-panel);
  box-shadow: 0 1px 2px rgba(8, 13, 35, 0.03);
}

.gate-panel .form-control:hover {
  border-color: var(--border-input-hover);
}

.gate-panel .form-control:focus {
  border-color: var(--navy-light);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(38, 47, 104, 0.12);
}

.gate-panel select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m3 6 5 5 5-5' stroke='%23262f68' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 16px;
}

.field-help {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Date section */
.date-section {
  padding: 18px;
  border: 1px solid rgba(38, 47, 104, 0.1);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(38, 47, 104, 0.06);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.date-section:hover {
  border-color: rgba(38, 47, 104, 0.18);
  box-shadow: 0 10px 24px rgba(38, 47, 104, 0.08);
}

.date-presets {
  gap: 7px;
}

.gate-panel .preset-chip {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-chip);
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 600;
}

.gate-panel .preset-chip:hover {
  border-color: rgba(38, 47, 104, 0.42);
  background: rgba(38, 47, 104, 0.05);
  color: var(--navy);
}

.gate-panel .preset-chip:active:not(:disabled) {
  background: rgba(38, 47, 104, 0.1);
}

.gate-panel .preset-chip.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 3px 9px rgba(38, 47, 104, 0.18);
}

.date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.date-inputs[hidden] {
  display: none;
}

.gate-actions {
  padding: 20px var(--sidebar-gutter) 24px;
  border-top: 1px solid rgba(38, 47, 104, 0.1);
  background: var(--surface-overlay);
  box-shadow: 0 -10px 28px rgba(38, 47, 104, 0.06);
  display: flex;
  flex-direction: column;
  gap: var(--sidebar-stack-gap);
}

.btn-explore {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  padding: 13px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(154, 30, 34, 0.2);
}

.btn-explore:hover {
  box-shadow: 0 10px 22px rgba(154, 30, 34, 0.27);
}

.compare-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
  text-decoration: none;
}

.compare-link:hover {
  border-color: rgba(38, 47, 104, 0.4);
  background: rgba(38, 47, 104, 0.035);
  box-shadow: 0 4px 12px rgba(38, 47, 104, 0.07);
}

.compare-link:active {
  transform: translateY(0);
}

.compare-link:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(58, 74, 138, 0.28),
    0 4px 12px rgba(38, 47, 104, 0.07);
}

.preset-chip:focus-visible {
  outline: 3px solid rgba(58, 74, 138, 0.28);
  outline-offset: 2px;
}

.error-msg {
  padding: 10px 12px;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 9px;
  font-size: 0.78rem;
  color: var(--error-text);
  display: none;
}

.error-msg.visible {
  display: block;
}

@media (max-width: 900px) {
  .gate-layout {
    grid-template-columns: 1fr;
  }
  .gate-hero {
    padding: 48px 32px;
    min-height: 520px;
  }
  .hero-title {
    font-size: clamp(2.35rem, 8vw, 3.25rem);
  }
  .hero-logo {
    width: min(300px, 78vw);
    margin-bottom: 30px;
  }
  .gate-panel {
    --sidebar-gutter: 20px;
    border-left: none;
    border-top: 1px solid rgba(38, 47, 104, 0.12);
    box-shadow: none;
  }
  .gate-panel-inner {
    padding: 28px var(--sidebar-gutter) 24px;
  }
  .gate-actions {
    padding: 18px var(--sidebar-gutter) 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preset-chip,
  .btn,
  .compare-link {
    transition: none;
  }

  .gate-hero-video {
    display: none;
  }

  .gate-hero {
    background:
      radial-gradient(
        ellipse 88% 72% at -2% 10%,
        rgba(4, 8, 24, 0.97) 0%,
        rgba(8, 13, 35, 0.9) 44%,
        rgba(8, 13, 35, 0.4) 67%,
        transparent 84%
      ),
      radial-gradient(
        ellipse 78% 58% at -2% 104%,
        rgba(4, 8, 24, 0.98) 0%,
        rgba(8, 13, 35, 0.9) 45%,
        rgba(8, 13, 35, 0.4) 70%,
        transparent 88%
      ),
      url("https://res.cloudinary.com/neris/image/upload/f_auto,q_auto:eco,w_1280/v1785450211/poster_grkjob.png")
        center / cover no-repeat #05091c;
  }

  .gate-hero::before {
    content: none;
  }
}
