:root {
  --auth-navy: #0f2557;
  --auth-blue: #1d5dd8;
  --auth-blue-2: #3d7df0;
  --auth-ice: #eef5ff;
  --auth-silver: #dce5f1;
  --auth-silver-2: #c8d4e4;
  --auth-text: #13213f;
  --auth-muted: #71809c;
  --auth-white: rgba(255, 255, 255, 0.94);
  --auth-shadow: 0 24px 62px rgba(25, 57, 111, 0.17);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

@media (hover: none) and (pointer: coarse) {
  html {
    overscroll-behavior-y: none;
  }
}

body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 12% 12%, rgba(105, 156, 234, 0.24), transparent 28%),
    radial-gradient(circle at 88% 84%, rgba(64, 116, 203, 0.16), transparent 30%),
    linear-gradient(135deg, #d8e0ea 0%, #f5f8fc 46%, #dbe7f7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.auth-main {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.7vw, 30px);
}

.auth-choice-card {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background: rgba(247, 250, 254, 0.78);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-visual-panel {
  position: relative;
  min-height: 420px;
  padding: clamp(26px, 3.2vw, 38px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(145deg, #0d2d72 0%, #1e58c4 55%, #4587e7 100%);
}

.auth-visual-panel::before,
.auth-visual-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  z-index: -1;
  pointer-events: none;
}

.auth-visual-panel::before {
  width: 230px;
  height: 230px;
  top: -118px;
  right: -62px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.035), 0 0 0 76px rgba(255, 255, 255, 0.022);
}

.auth-visual-panel::after {
  width: 210px;
  height: 210px;
  left: -106px;
  bottom: -94px;
  background: rgba(255, 255, 255, 0.065);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.28rem, 2vw, 1.72rem);
  letter-spacing: -0.03em;
}

.auth-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-illustration-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 228px;
  padding: 4px 0;
}

.auth-illustration {
  display: block;
  width: min(282px, 76%);
  height: auto;
  max-height: 270px;
  object-fit: contain;
  filter: drop-shadow(0 18px 25px rgba(0, 20, 62, 0.2));
}

.auth-visual-title {
  width: 100%;
  max-width: 470px;
  margin: auto auto 0;
  color: #fff;
  font-size: clamp(0.68rem, 1vw, 0.85rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  align-self: center;
}

.auth-choice-panel {
  position: relative;
  padding: clamp(28px, 3.5vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(240, 245, 252, 0.95));
}

.auth-choice-panel::after {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(95, 129, 177, 0.13);
  border-radius: 20px;
  pointer-events: none;
}

.auth-role-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 18px;
  color: var(--auth-blue);
  font-size: 1.32rem;
  border: 1px solid rgba(66, 118, 199, 0.18);
  background: linear-gradient(145deg, #ffffff, #e8eef8);
  box-shadow: 0 10px 24px rgba(36, 75, 137, 0.13), inset 0 1px 0 #fff;
}

.auth-role-icon-image {
  display: block;
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.auth-title-heart {
  color: #F87C63;
}

.auth-choice-title,
.auth-form-title {
  margin: 0 0 18px;
  text-align: center;
  color: var(--auth-navy);
  font-size: clamp(1.55rem, 2.5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.auth-choice-title {
  font-size: clamp(1.4rem, 2.1vw, 1.7rem);
}

.auth-role-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
}

.auth-role-btn,
.auth-submit-btn {
  min-height: 50px;
  border: 0;
  border-radius: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.auth-role-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  color: var(--auth-navy);
  border: 1px solid rgba(70, 105, 157, 0.2);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(37, 66, 112, 0.07);
}

.auth-role-btn:hover,
.auth-role-btn:focus-visible {
  color: var(--auth-blue);
  border-color: rgba(43, 103, 204, 0.36);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(34, 73, 135, 0.12);
}

.auth-role-btn .role-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-role-btn .role-badge {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--auth-blue);
  background: linear-gradient(145deg, #eef5ff, #dfeafa);
}

.auth-form-wrap {
  width: min(300px, 100%);
  margin: 0 auto;
}

.auth-form-card {
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 26px;
  padding: 22px 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-form-card::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  top: -92px;
  right: -66px;
  border-radius: 50%;
  background: rgba(53, 112, 206, 0.075);
  box-shadow: 0 0 0 30px rgba(53, 112, 206, 0.03);
  pointer-events: none;
}

.auth-logo-wrap {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.auth-logo {
  display: block;
  max-width: min(180px, 68%);
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.auth-login-page .auth-form-title {
  margin-bottom: 14px;
  font-size: 1.55rem;
}

.auth-field {
  margin-bottom: 12px;
}

.auth-field label {
  display: block;
  margin-bottom: 5px;
  color: #31415f;
  font-size: 0.89rem;
  font-weight: 700;
}

.auth-control-wrap {
  min-height: 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--auth-silver-2);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  box-shadow: inset 0 1px 0 #fff, 0 6px 15px rgba(34, 63, 106, 0.055);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-control-wrap:focus-within {
  border-color: rgba(38, 99, 205, 0.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(46, 111, 222, 0.1), 0 8px 18px rgba(34, 63, 106, 0.07);
}

.auth-field-icon {
  width: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  align-self: stretch;
  color: var(--auth-blue);
  font-size: 0.96rem;
}

.auth-control {
  min-width: 0;
  flex: 1;
  height: 46px;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  color: #14233f;
  background: transparent;
  font-size: 1rem;
}

.auth-control::placeholder {
  color: #9aa7bb;
}

.auth-password-toggle {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(147, 165, 194, 0.25);
  color: var(--auth-blue);
  background: transparent;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  background: rgba(49, 111, 211, 0.06);
}

.auth-submit-btn {
  width: 100%;
  margin-top: 2px;
  min-height: 48px;
  color: #fff;
  background: linear-gradient(110deg, #1649bd 0%, #2d6ee0 54%, #174bbd 100%);
  box-shadow: 0 11px 23px rgba(29, 87, 190, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.auth-submit-btn:hover,
.auth-submit-btn:focus-visible {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(29, 87, 190, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.auth-alert {
  margin: 12px 0 0;
  border: 1px solid rgba(196, 61, 61, 0.18);
  border-radius: 12px;
  padding: 9px 11px;
  color: #9b2c2c;
  background: #fff3f3;
  font-size: 0.88rem;
}

.auth-switch {
  display: flex;
  justify-content: center;
  margin-top: 13px;
}

.auth-switch a {
  color: #6d7b92;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
}

.auth-switch a:hover,
.auth-switch a:focus-visible {
  color: var(--auth-blue);
}

.auth-footer {
  position: absolute;
  z-index: 3;
  left: 12px;
  right: 12px;
  bottom: 9px;
  text-align: center;
  color: #65728a;
  font-size: 0.78rem;
  pointer-events: none;
}

.auth-education-silhouette {
  position: fixed;
  z-index: 0;
  display: grid;
  place-items: center;
  color: rgba(116, 128, 148, 0.17);
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 24px rgba(89, 103, 124, 0.08));
}

.auth-education-silhouette-top {
  top: -24px;
  right: -20px;
  font-size: clamp(7.5rem, 15vw, 13rem);
  transform: rotate(10deg);
}

.auth-education-silhouette-bottom {
  left: -28px;
  bottom: -30px;
  font-size: clamp(7rem, 14vw, 12rem);
  transform: rotate(-11deg);
}

@media (max-width: 900px) {
  .auth-choice-card {
    grid-template-columns: 1fr;
    max-width: 390px;
  }

  .auth-visual-panel {
    min-height: 226px;
    padding: 18px 24px;
  }

  .auth-brand {
    font-size: 1.22rem;
  }

  .auth-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .auth-illustration-wrap {
    min-height: 112px;
    padding: 0;
  }

  .auth-illustration {
    width: min(170px, 48%);
    max-height: 132px;
  }

  .auth-visual-title {
    font-size: 0.68rem;
  }

  .auth-choice-panel {
    padding: 20px 28px 24px;
  }

  .auth-role-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border-radius: 16px;
  }

  .auth-choice-title {
    margin-bottom: 13px;
    font-size: 1.3rem;
  }

  .auth-role-actions {
    gap: 9px;
  }

  .auth-role-btn {
    min-height: 47px;
  }
}

@media (max-width: 900px) and (max-height: 559px) and (min-width: 577px) {
  .auth-choice-card {
    max-width: 710px;
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 1fr);
  }

  .auth-visual-panel {
    min-height: 330px;
    padding: 22px 28px;
  }

  .auth-illustration-wrap {
    min-height: 175px;
  }

  .auth-illustration {
    width: min(220px, 62%);
    max-height: 205px;
  }

  .auth-choice-panel {
    padding: 24px 28px;
  }
}

@media (max-width: 576px) {
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .auth-main {
    align-items: center;
    padding: 10px;
  }

  .auth-choice-card,
  .auth-form-card {
    border-radius: 20px;
  }

  .auth-choice-card {
    max-width: 390px;
  }

  .auth-visual-panel {
    min-height: 232px;
    padding: 16px 19px;
  }

  .auth-brand {
    font-size: 1.12rem;
  }

  .auth-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .auth-illustration-wrap {
    min-height: 105px;
  }

  .auth-illustration {
    width: min(154px, 50%);
    max-height: 122px;
  }

  .auth-visual-title {
    font-size: clamp(0.62rem, 2.8vw, 0.68rem);
  }

  .auth-choice-panel {
    padding: 18px 18px 21px;
  }

  .auth-choice-panel::after {
    inset: 9px;
    border-radius: 15px;
  }

  .auth-role-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
    border-radius: 14px;
    font-size: 1.12rem;
  }

  .auth-choice-title {
    margin-bottom: 11px;
    font-size: 1.22rem;
  }

  .auth-role-btn,
  .auth-submit-btn {
    min-height: 46px;
    border-radius: 13px;
  }

  .auth-role-btn .role-badge {
    width: 33px;
    height: 33px;
  }

  .auth-form-wrap {
    width: min(300px, 100%);
  }

  .auth-form-card {
    padding: 19px 19px 18px;
  }

  .auth-logo-wrap {
    min-height: 46px;
    margin-bottom: 3px;
  }

  .auth-logo {
    max-width: min(160px, 66%);
    max-height: 44px;
  }

  .auth-login-page .auth-form-title {
    margin-bottom: 12px;
    font-size: 1.45rem;
  }

  .auth-field {
    margin-bottom: 10px;
  }

  .auth-control-wrap {
    min-height: 46px;
    border-radius: 13px;
  }

  .auth-control,
  .auth-password-toggle {
    height: 44px;
  }

  .auth-field-icon,
  .auth-password-toggle {
    width: 44px;
    flex-basis: 44px;
  }

  .auth-submit-btn {
    min-height: 46px;
  }

  .auth-switch {
    margin-top: 11px;
  }

  .auth-footer {
    bottom: 6px;
    font-size: 0.74rem;
  }

  .auth-education-silhouette-top {
    top: -14px;
    right: -26px;
    font-size: 7.2rem;
  }

  .auth-education-silhouette-bottom {
    left: -22px;
    bottom: -20px;
    font-size: 6.8rem;
  }
}

@media (max-height: 500px) {
  .auth-main {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .auth-footer {
    bottom: 3px;
    font-size: 0.7rem;
  }

  .auth-login-page .auth-form-wrap {
    width: min(300px, 100%);
  }

  .auth-login-page .auth-form-card {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .auth-login-page .auth-logo-wrap {
    min-height: 38px;
  }

  .auth-login-page .auth-logo {
    max-height: 38px;
  }

  .auth-login-page .auth-field {
    margin-bottom: 8px;
  }
}

@media (max-width: 576px) and (max-height: 500px) {
  .auth-choice-page .auth-visual-panel {
    min-height: 170px;
    padding: 11px 16px;
  }

  .auth-choice-page .auth-brand {
    font-size: 1rem;
  }

  .auth-choice-page .auth-brand-mark {
    width: 32px;
    height: 32px;
  }

  .auth-choice-page .auth-illustration-wrap {
    min-height: 62px;
  }

  .auth-choice-page .auth-illustration {
    width: min(105px, 36%);
    max-height: 75px;
  }

  .auth-choice-page .auth-visual-title {
    font-size: 0.58rem;
  }

  .auth-choice-page .auth-choice-panel {
    padding: 12px 16px 14px;
  }

  .auth-choice-page .auth-role-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 5px;
    border-radius: 12px;
    font-size: 0.95rem;
  }

  .auth-choice-page .auth-choice-title {
    margin-bottom: 7px;
    font-size: 1.02rem;
  }

  .auth-choice-page .auth-role-actions {
    gap: 6px;
  }

  .auth-choice-page .auth-role-btn {
    min-height: 40px;
  }

  .auth-choice-page .auth-role-btn .role-badge {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-role-btn,
  .auth-submit-btn,
  .auth-control-wrap {
    transition: none;
  }
}


@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none !important;
  mix-blend-mode: normal;
}

@media (max-width: 576px) {
  .auth-choice-page .auth-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .auth-choice-page .auth-choice-card {
    width: 100%;
    max-width: calc(100vw - 36px);
  }
}
