:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --card-soft: #f7fafc;
  --line: rgba(5, 7, 10, 0.16);
  --ink: #05070a;
  --muted: #5d6872;
  --accent: #00e6a8;
  --accent-2: #45f3ff;
  --danger: #ff6b7f;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #ffffff 0%, #f4f7fb 46%, #eef2f8 100%),
    linear-gradient(120deg, rgba(0, 230, 168, 0.08), transparent 30%);
  display: grid;
  grid-template-rows: auto 1fr;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image: radial-gradient(#000000 0.4px, transparent 0.4px);
  background-size: 3px 3px;
  z-index: -1;
}

.topbar {
  width: min(1100px, 92vw);
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img {
  height: 40px;
  width: auto;
}

.back-link {
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.62rem 1.15rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.back-link:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 7, 10, 0.4);
}

.apply-main {
  width: min(1100px, 92vw);
  margin: 0 auto 3.4rem;
  display: grid;
  place-items: center;
}

.apply-card {
  width: min(850px, 100%);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 252, 0.97));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.14);
  padding: 1.7rem;
  animation: fadeUp 650ms ease both;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: #0a5b66;
}

h1,
h2 {
  margin: 0;
  text-transform: uppercase;
  font-family: "Anton", Impact, sans-serif;
  letter-spacing: 0.03em;
}

h1 {
  margin-top: 0.52rem;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: 0.98;
}

.lead {
  margin: 0.85rem 0 1.25rem;
  color: var(--muted);
  max-width: 64ch;
}

form {
  display: grid;
  gap: 1rem;
}

.grid {
  display: grid;
  gap: 0.9rem;
}

.grid.two {
  grid-template-columns: 1fr 1fr;
}

.selected-date {
  margin: 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(0, 230, 168, 0.08), rgba(69, 243, 255, 0.12));
  color: #16344c;
  font-size: 0.95rem;
  font-weight: 800;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.93rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 46px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 0.72rem 0.8rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(69, 243, 255, 0.17);
}

input::file-selector-button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #04120e;
  font-weight: 800;
  margin-right: 0.75rem;
  padding: 0.45rem 0.7rem;
}

.date-impact {
  margin: 0.1rem 0 0;
  color: #16344c;
  border-left: 3px solid var(--accent-2);
  padding-left: 0.72rem;
  font-weight: 600;
}

.input-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.small-note {
  margin: 0.2rem 0 0;
  color: rgba(93, 104, 114, 0.95);
  font-size: 0.84rem;
  min-height: 1.2em;
}

.submit-btn {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #042019;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.submit-btn:disabled {
  filter: grayscale(0.35);
  cursor: wait;
}

.success-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 14, 0.65);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}

.success-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.success-card {
  position: relative;
  width: min(420px, 90vw);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: linear-gradient(160deg, #101d2f 0%, #10273c 100%);
  padding: 1.4rem;
  box-shadow: 0 35px 95px rgba(0, 0, 0, 0.6);
}

.ring {
  width: 84px;
  height: 84px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  animation: spin 1s linear infinite;
}

.check {
  margin: -58px auto 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #04120e;
  font-size: 2rem;
  font-weight: 900;
}

.success-card h2 {
  margin-top: 0.9rem;
  font-size: 1.9rem;
}

.success-card p {
  margin: 0.45rem 0 0;
  color: #d9ecff;
}

body.fade-out {
  animation: screenFade 650ms ease forwards;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes screenFade {
  to {
    opacity: 0;
    transform: scale(0.985);
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 78px;
  }

  .brand img {
    height: 35px;
  }

  .apply-card {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }
}
