:root {
  --auth-bg: #f4f7fb;
  --auth-surface: #ffffff;
  --auth-text: #172033;
  --auth-muted: #6c788b;
  --auth-border: #dfe5ee;
  --auth-primary: #1463ff;
  --auth-primary-dark: #0e49bd;
  --auth-danger: #b42318;
  --auth-radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body.auth-page {
  min-height: 100%;
}

body.auth-page {
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-text);
  background: var(--auth-bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-page button,
.auth-page input {
  font: inherit;
}

.auth-page a {
  color: var(--auth-primary);
  font-weight: 650;
  text-decoration: none;
}

.auth-page a:hover {
  color: var(--auth-primary-dark);
}

.auth-page :focus-visible {
  outline: 3px solid rgba(20, 99, 255, 0.24);
  outline-offset: 2px;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(440px, 0.9fr) minmax(520px, 1.1fr);
  background: var(--auth-surface);
}

.auth-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(28px, 4vw, 60px);
}

.auth-brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
}

.auth-brand img {
  display: block;
  width: 190px;
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.auth-content {
  width: min(100%, 440px);
  margin: auto;
  padding: 46px 0;
}

.auth-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--auth-primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-content h1 {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(29px, 3.4vw, 42px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

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

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 13px 14px;
  color: var(--auth-danger);
  background: #fff4f2;
  border: 1px solid #f6d1cc;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-alert--success {
  color: #086947;
  background: #effaf5;
  border-color: #bfe8d6;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: #34425a;
  font-size: 13px;
  font-weight: 680;
}

.auth-input-wrap {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-input-wrap:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(20, 99, 255, 0.1);
}

.auth-input-wrap > i {
  color: #8491a5;
  font-size: 17px;
}

.auth-input-wrap input {
  width: 100% !important;
  height: 50px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--auth-text);
  background: transparent;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  outline: 0 !important;
  font-size: 15px;
}

.auth-input-wrap input::placeholder {
  color: #a2adbd;
}

.auth-password-toggle {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #68758a;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.auth-password-toggle:hover {
  color: var(--auth-primary);
  background: #edf3ff;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8a96a8;
  font-size: 13px;
}

.auth-primary-button,
.auth-page .login-btn,
.auth-page button.sign-up {
  display: inline-flex;
  width: 100% !important;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 0 0 !important;
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-primary), #0d4ed0);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 10px 20px rgba(20, 99, 255, 0.2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 720;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.auth-primary-button:hover,
.auth-page .login-btn:hover,
.auth-page button.sign-up:hover {
  color: #fff;
  background: linear-gradient(135deg, #0f55d9, #0b3fa9);
  box-shadow: 0 13px 24px rgba(20, 99, 255, 0.25);
  transform: translateY(-1px);
}

.auth-secondary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  color: #536176;
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 13px;
  cursor: pointer;
  font-weight: 680;
}

.auth-secondary-button:hover {
  color: var(--auth-primary);
  background: #f7f9fc;
  border-color: #cbd8ec;
}

.signup-actions {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.signup-actions .sign-up {
  margin: 0 !important;
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  text-align: center;
}

.auth-footer {
  margin: 0;
  color: #98a3b3;
  font-size: 12px;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #10264a;
}

.auth-visual video,
.auth-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 24, 48, 0.18), rgba(9, 28, 61, 0.88));
}

.auth-visual-content {
  position: absolute;
  right: clamp(32px, 6vw, 88px);
  bottom: clamp(40px, 7vw, 90px);
  left: clamp(32px, 6vw, 88px);
  z-index: 1;
  max-width: 650px;
  color: #fff;
}

.auth-visual-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 650;
}

.auth-visual-content h2 {
  max-width: 600px;
  margin: 20px 0 12px;
  color: #fff;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 760;
  letter-spacing: -0.05em;
  line-height: 1.03;
}

.auth-visual-content p {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.6;
}

.auth-feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.auth-feature-grid span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
}

/* Existing registration markup mapped onto the same system. */
.auth-page > .container {
  display: grid !important;
  width: 100% !important;
  min-height: 100vh;
  height: auto !important;
  grid-template-columns: minmax(500px, 1fr) minmax(440px, 0.85fr);
  overflow: visible !important;
  background: var(--auth-bg) !important;
}

.auth-page > .container .form-sign-up,
.auth-page > .container .form-login {
  display: flex;
  width: 100% !important;
  max-width: none;
  min-height: 100vh;
  height: auto;
  max-height: none;
  flex-direction: column;
  justify-content: center;
  order: 2;
  margin: 0;
  padding: clamp(34px, 6vw, 80px);
  background: var(--auth-surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-page > .container .admin-login-video {
  position: relative;
  display: block !important;
  width: 100% !important;
  min-height: 100vh;
  order: 1;
  overflow: hidden;
  background: #10264a;
}

.auth-page > .container .admin-login-video::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(9, 24, 48, 0.12), rgba(9, 28, 61, 0.62));
  pointer-events: none;
}

.signup-visual-copy {
  position: absolute;
  right: clamp(28px, 5vw, 72px);
  bottom: clamp(36px, 7vw, 82px);
  left: clamp(28px, 5vw, 72px);
  z-index: 2;
  max-width: 620px;
  color: #fff;
}

.signup-visual-copy h2 {
  margin: 20px 0 12px;
  color: #fff;
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 760;
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.signup-visual-copy p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.6;
}

.auth-page > .container .admin-login-video video {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  object-fit: cover;
}

.auth-page > .container .monogram {
  display: none !important;
}

.auth-page .form-sign-up .login-header,
.auth-page .form-login .login-header {
  justify-content: center;
  margin-bottom: 22px;
}

.signup-intro {
  width: min(100%, 480px);
  margin: 0 auto 22px;
}

.signup-intro h1 {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 760;
  letter-spacing: -0.04em;
}

.signup-intro p {
  margin: 9px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-page .form-sign-up .logo,
.auth-page .form-login .logo {
  display: flex;
  width: 100%;
  justify-content: center;
}

.auth-page .form-sign-up .logo img,
.auth-page .form-login .logo img {
  width: 210px !important;
  height: 64px !important;
  margin: 0 !important;
  object-fit: contain;
}

.auth-page .form-sign-up-item,
.auth-page .form-login-item {
  width: min(100%, 480px);
  height: auto;
  margin: 0 auto;
}

.auth-page .form-sign-up .row > span,
.auth-page .form-login label {
  color: #34425a;
  font-size: 13px;
  font-weight: 680;
}

.auth-page .form-sign-up input:not([type="checkbox"]),
.auth-page .form-login-item input:not([type="button"]):not([type="submit"]) {
  width: 100% !important;
  min-height: 50px;
  margin: 7px 0 14px;
  padding: 0 14px;
  color: var(--auth-text);
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  box-shadow: none;
}

.auth-page .form-sign-up input:focus,
.auth-page .form-login-item input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(20, 99, 255, 0.1);
  outline: 0;
}

.auth-page #progress-container {
  width: min(100%, 480px);
  margin: 0 auto 20px;
}

.auth-page #progress-bar,
.auth-page .circle.active,
.auth-page .circle.completed {
  background: var(--auth-primary);
}

.auth-page .password-requirements {
  margin: 2px 0 18px;
  padding: 13px 15px;
  background: #f7f9fc;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
}

.auth-page .modal-content-sms,
.auth-page .modal-rules {
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.2);
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: 100vh;
  }

  .auth-visual {
    display: none;
  }

  .auth-page > .container {
    display: block !important;
  }

  .auth-page > .container .form-sign-up,
  .auth-page > .container .form-login {
    min-height: 100vh;
  }

  .auth-page > .container .admin-login-video {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .auth-panel,
  .auth-page > .container .form-sign-up,
  .auth-page > .container .form-login {
    padding: 24px 18px;
  }

  .auth-content {
    padding: 38px 0;
  }

  .auth-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .auth-footer {
    text-align: center;
  }

  .auth-page .modal-rules {
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
  }
}

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