:root {
  --astor-blue: #0b2d5c;
  --astor-blue-deep: #071f42;
  --astor-orange: #f47a21;
  --ink: #172033;
  --muted: #667085;
  --surface: #ffffff;
  --line: #e6eaf0;
}

* { box-sizing: border-box; }

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

body {
  background: var(--astor-blue);
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
.hidden { display: none !important; }

.screen {
  min-height: 100svh;
  width: 100%;
}

.loading-screen {
  display: grid;
  place-content: center;
  gap: 18px;
  background: var(--astor-blue);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
}

.loading-mark {
  width: 32px;
  height: 32px;
  margin: auto;
  border: 3px solid rgba(255, 255, 255, .18);
  border-top-color: var(--astor-orange);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

.auth-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, .88fr);
  overflow: hidden;
  background: var(--astor-blue);
}

.orange-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: clamp(12px, 1.4vw, 24px);
  background: var(--astor-orange);
}

.brand-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(56px, 8vw, 124px);
  padding-left: clamp(64px, 9vw, 148px);
  isolation: isolate;
}

.brand-stage::after {
  position: absolute;
  z-index: -1;
  top: 12%;
  right: 4%;
  width: min(44vw, 680px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
  transform: translate(36%, -12%);
}

.brand-logo {
  display: block;
  width: min(100%, 610px);
  height: auto;
}

.brand-stage p {
  max-width: 470px;
  margin: 32px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 500;
  line-height: 1.7;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(28px, 5vw, 76px);
  background: #f5f6f8;
  border-radius: 42px 0 0 42px;
  box-shadow: -30px 0 80px rgba(0, 0, 0, .12);
}

.auth-card {
  width: min(100%, 420px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--astor-orange);
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
}

.eyebrow::before {
  width: 28px;
  height: 3px;
  background: currentColor;
  content: "";
}

.auth-card h1,
.setup-panel h1 {
  margin: 18px 0 8px;
  font-family: "Poppins", sans-serif;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.auth-intro {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.clerk-slot {
  width: 100%;
  min-height: 310px;
}

/* Clerk's root remains responsive while its own accessibility behavior is preserved. */
.clerk-slot > div,
.clerk-slot .cl-rootBox,
.clerk-slot .cl-cardBox,
.clerk-slot .cl-card {
  width: 100%;
  max-width: none;
}

.astor-clerk-header-title,
.astor-clerk-header-subtitle {
  display: none !important;
}

.astor-clerk-card-box,
.astor-clerk-card {
  width: 100% !important;
  max-width: none !important;
}

.home-screen {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--astor-blue);
}

.home-screen::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .045), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, .025), transparent 42%);
  content: "";
}

.home-orange-band {
  position: absolute;
  inset: auto 0 0;
  height: clamp(18px, 4.5vh, 54px);
  background: var(--astor-orange);
}

.home-logo {
  position: relative;
  width: min(64vw, 720px);
  max-height: 52vh;
  object-fit: contain;
}

.user-button {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 28px;
}

.setup-screen {
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--astor-blue);
}

.setup-panel {
  width: min(100%, 760px);
  color: white;
}

.setup-logo {
  width: min(320px, 70vw);
  margin-bottom: 50px;
}

.eyebrow.light { color: var(--astor-orange); }

.setup-panel h1 {
  max-width: 700px;
  font-size: clamp(32px, 6vw, 66px);
}

.setup-panel p {
  max-width: 650px;
  color: rgba(255, 255, 255, .72);
  line-height: 1.7;
}

.setup-panel code {
  padding: 3px 7px;
  background: rgba(255, 255, 255, .1);
  border-radius: 5px;
  color: white;
}

@media (max-width: 900px) {
  .auth-screen {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(230px, 34vh) auto;
  }

  .brand-stage {
    justify-content: flex-end;
    padding: 52px 34px 40px 54px;
  }

  .brand-logo { width: min(70vw, 390px); }
  .brand-stage p { display: none; }

  .auth-panel {
    min-height: 66vh;
    padding: 42px 28px 56px;
    border-radius: 28px 28px 0 0;
  }

  .auth-card { width: min(100%, 430px); }
}

@media (max-width: 520px) {
  .brand-stage {
    padding: 42px 24px 32px 42px;
  }

  .auth-panel {
    padding: 34px 20px 46px;
  }

  .auth-card h1 { font-size: 36px; }
  .auth-intro { margin-bottom: 22px; }
  .home-logo { width: 82vw; }
  .user-button { top: 18px; right: 18px; }
}

