:root {
  --auth-ink: #10202f;
  --auth-muted: #71828e;
  --auth-line: #dce6e8;
  --auth-teal: #16c7a3;
  --auth-teal-dark: #087765;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  color: var(--auth-ink);
  background: #eef4f3;
  font-family: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, 1.08fr) minmax(430px, .92fr);
}

.auth-story {
  position: relative;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 72px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(22, 199, 163, .22), transparent 28%),
    radial-gradient(circle at 12% 90%, rgba(89, 106, 255, .16), transparent 32%),
    linear-gradient(145deg, #07141f, #0c2130 60%, #0b2830);
}
.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 50%;
  pointer-events: none;
}
.auth-story::before { width: 430px; height: 430px; right: -215px; top: 8%; }
.auth-story::after { width: 650px; height: 650px; right: -330px; top: -2%; }

.auth-brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.035em;
}
.auth-brand { position: relative; z-index: 2; width: max-content; color: #fff; text-decoration: none; }
.auth-brand > span,
.mobile-brand > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #04372e;
  background: var(--auth-teal);
  box-shadow: 0 12px 28px rgba(22,199,163,.22);
}

.auth-story-copy { position: relative; z-index: 2; max-width: 620px; margin: 10vh 0; }
.auth-kicker {
  margin: 0 0 12px;
  color: var(--auth-teal-dark);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.auth-story .auth-kicker { color: #72e5ce; }
.auth-story h1 {
  margin: 0;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: clamp(3rem, 6vw, 5.7rem);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.075em;
}
.auth-story h1 em { color: var(--auth-teal); font-style: normal; }
.auth-story-copy > p:last-child {
  max-width: 500px;
  margin: 25px 0 0;
  color: #a2b4c0;
  font-size: .96rem;
  line-height: 1.7;
}

.auth-signal-card {
  position: relative;
  z-index: 2;
  width: min(465px, 100%);
  padding: 14px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
}
.signal-orbit {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(22,199,163,.12);
}
.signal-orbit i { width: 9px; height: 9px; border-radius: 50%; background: var(--auth-teal); box-shadow: 0 0 0 6px rgba(22,199,163,.1); }
.auth-signal-card > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.auth-signal-card b { font-size: .78rem; }
.auth-signal-card small { overflow: hidden; color: #91a5b3; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.signal-status { margin-left: auto; display: flex; align-items: center; gap: 5px; color: #7fe4cf; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.signal-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--auth-teal); }

.auth-panel {
  min-height: 100vh;
  padding: clamp(28px, 5vw, 64px);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 100% 0, rgba(22,199,163,.10), transparent 31rem),
    linear-gradient(145deg, #f8fbfa, #eef4f3);
}
.auth-form-wrap {
  position: relative;
  width: min(448px, 100%);
  padding: clamp(32px, 4vw, 44px);
  overflow: hidden;
  border: 1px solid rgba(210,222,226,.9);
  border-radius: 26px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 32px 80px rgba(23,45,59,.13);
  backdrop-filter: blur(18px);
}
.auth-form-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--auth-teal), #67e0c8 48%, #7d8cff);
}
.mobile-brand { display: none; }
.auth-access-pill {
  width: max-content;
  margin: 0 0 30px auto;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #deebe8;
  border-radius: 999px;
  color: #52716c;
  background: #f3faf8;
  font-size: .64rem;
  font-weight: 800;
}
.auth-access-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--auth-teal); box-shadow: 0 0 0 4px rgba(22,199,163,.1); }
.auth-form-wrap h2 {
  margin: 0;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.055em;
}
.auth-intro { margin: 9px 0 28px; color: var(--auth-muted); font-size: .88rem; }
.auth-error {
  margin: 0 0 18px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #f4ccd3;
  border-radius: 12px;
  color: #a83d51;
  background: #fff0f2;
  font-size: .76rem;
  line-height: 1.45;
}
.auth-form { display: flex; flex-direction: column; gap: 17px; }
.auth-field label { display: block; margin: 0 0 7px 2px; color: #4f6473; font-size: .72rem; font-weight: 800; transition: color .18s ease; }
.auth-field:focus-within label { color: var(--auth-teal-dark); }
.auth-input {
  height: 54px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  color: #8696a1;
  background: #fbfdfd;
  box-shadow: 0 7px 20px rgba(28,47,62,.025);
  transition: .18s ease;
}
.auth-input:focus-within { border-color: rgba(22,199,163,.72); background: #fff; box-shadow: 0 0 0 4px rgba(22,199,163,.1); }
.auth-input input {
  width: 100%;
  height: 100%;
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--auth-ink);
  background: transparent;
  font-size: .9rem;
  font-weight: 700;
}
.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-ink);
  -webkit-box-shadow: 0 0 0 1000px #fbfdfd inset;
  transition: background-color 9999s ease-out;
}
.password-toggle {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #94a2ad;
  background: transparent;
  cursor: pointer;
  transition: .18s ease;
}
.password-toggle:hover { color: var(--auth-teal-dark); background: #eef5f3; }
.auth-submit {
  min-height: 54px;
  margin-top: 5px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #10202f, #193b4c);
  box-shadow: 0 14px 30px rgba(16,32,47,.2);
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}
.auth-submit:hover { background: linear-gradient(135deg, #193447, #205064); box-shadow: 0 18px 34px rgba(16,32,47,.24); transform: translateY(-1px); }
.auth-submit svg { transition: transform .18s ease; }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-footnote { margin: 24px 0 0; display: flex; align-items: center; justify-content: center; gap: 9px; color: #94a1aa; font-size: .64rem; }
.auth-footnote span { display: flex; align-items: center; gap: 5px; }
.auth-footnote i { width: 3px; height: 3px; border-radius: 50%; background: #b2bdc4; }

.logout-shell {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 10%, rgba(22,199,163,.14), transparent 25rem), #eef4f3;
}
.logout-card {
  width: min(520px, 100%);
  padding: 38px;
  border: 1px solid rgba(215,226,231,.9);
  border-radius: 25px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 30px 90px rgba(24,44,59,.12);
  text-align: center;
}
.auth-brand.dark { justify-content: center; color: var(--auth-ink); }
.logout-icon { width: 66px; height: 66px; margin: 38px auto 22px; display: grid; place-items: center; border-radius: 20px; color: var(--auth-teal-dark); background: #e5faf4; }
.logout-card .auth-kicker { margin-bottom: 8px; }
.logout-card h1 { margin: 0; font-family: "Manrope", "DM Sans", sans-serif; font-size: clamp(1.8rem, 5vw, 2.45rem); font-weight: 800; letter-spacing: -.055em; }
.logout-card > p:not(.auth-kicker) { max-width: 390px; margin: 14px auto 24px; color: var(--auth-muted); font-size: .86rem; line-height: 1.6; }
.logout-login { width: 100%; margin: 0; text-decoration: none; }
.logout-card > small { display: block; margin-top: 20px; color: #9aa7af; font-size: .68rem; }

@media (max-width: 960px) {
  .auth-shell { display: block; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; padding: 28px 20px; }
  .mobile-brand { margin-bottom: 38px; display: inline-flex; }
  .mobile-brand > span { width: 34px; height: 34px; }
  .auth-access-pill { position: absolute; top: 31px; right: 28px; margin: 0; }
}

@media (max-width: 520px) {
  .auth-panel { padding: 0; background: #fff; }
  .auth-form-wrap { min-height: 100vh; width: 100%; padding: 28px 20px; border: 0; border-radius: 0; box-shadow: none; }
  .auth-form-wrap::before { height: 3px; }
  .mobile-brand { margin-bottom: 56px; }
  .auth-access-pill { top: 30px; right: 20px; }
  .auth-form-wrap h2 { font-size: 2rem; }
  .auth-footnote { gap: 6px; font-size: .59rem; }
}

@media (max-width: 360px) {
  .auth-access-pill { display: none; }
  .auth-footnote i,
  .auth-footnote span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
