:root {
  --auth-primary: #0759a7;
  --auth-primary-dark: #073b70;
  --auth-primary-soft: #eaf4ff;
  --auth-accent: #f7b32b;
  --auth-ink: #14263d;
  --auth-muted: #63758a;
  --auth-border: #dbe5ef;
  --auth-surface: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body.auth-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-ink);
  background: #edf3f8;
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.auth-customs {
  --auth-primary: #087c79;
  --auth-primary-dark: #064d55;
  --auth-primary-soft: #e8f7f5;
  --auth-accent: #f2b84b;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(500px, 1.1fr);
  min-height: 100vh;
}

.auth-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 48px clamp(38px, 5vw, 78px);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, var(--auth-primary-dark) 0%, var(--auth-primary) 72%, #1882cf 100%);
}

.auth-customs .auth-hero {
  background: linear-gradient(145deg, #063c48 0%, var(--auth-primary) 70%, #10a89d 100%);
}

.auth-hero::before,
.auth-hero::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.auth-hero::before {
  right: -190px;
  bottom: -150px;
  width: 520px;
  height: 520px;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.035), 0 0 0 140px rgba(255, 255, 255, 0.025);
}

.auth-hero::after {
  top: -110px;
  left: -90px;
  width: 290px;
  height: 290px;
}

.auth-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 610px;
  margin: 0 auto;
  flex-direction: column;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.auth-brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1px;
}

.auth-brand-copy strong,
.auth-brand-copy span {
  display: block;
}

.auth-brand-logo {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.auth-brand-copy strong {
  font-size: 18px;
  letter-spacing: 0.2px;
}

.auth-brand-copy span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.auth-intro {
  margin: auto 0;
  padding: 70px 0;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--auth-accent);
  box-shadow: 0 0 0 4px rgba(247, 179, 43, 0.15);
}

.auth-intro h1 {
  max-width: 560px;
  margin: 0 0 20px;
  color: #fff;
  font-size: clamp(38px, 4.5vw, 62px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -1.8px;
}

.auth-intro p {
  max-width: 530px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.75;
}

.auth-highlights {
  display: flex;
  margin: 34px 0 0;
  padding: 0;
  gap: 28px;
  list-style: none;
}

.auth-highlights li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 600;
}

.auth-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--auth-primary-dark);
  background: var(--auth-accent);
  font-size: 11px;
}

.auth-hero-footer {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.auth-main {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 50px clamp(28px, 6vw, 90px);
  background:
    radial-gradient(circle at 88% 10%, var(--auth-primary-soft) 0, transparent 30%),
    #f7f9fc;
}

.auth-card {
  width: 100%;
  max-width: 455px;
}

.auth-mobile-brand {
  display: none;
}

.auth-role {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--auth-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0;
  color: var(--auth-ink);
  font-size: 32px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.8px;
}

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

.auth-form-group {
  margin-bottom: 20px;
}

.auth-label {
  display: block;
  margin-bottom: 8px;
  color: #30445d;
  font-size: 13px;
  font-weight: 700;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  width: 20px;
  color: #8494a7;
  text-align: center;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-input-wrap .form-control {
  width: 100%;
  height: 52px;
  padding: 10px 50px 10px 48px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  color: var(--auth-ink);
  background: var(--auth-surface);
  box-shadow: 0 1px 2px rgba(15, 40, 70, 0.03);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-wrap .form-control:focus {
  border-color: var(--auth-primary);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(7, 89, 167, 0.1);
}

.auth-customs .auth-input-wrap .form-control:focus {
  box-shadow: 0 0 0 4px rgba(8, 124, 121, 0.1);
}

.auth-input-wrap .form-control::placeholder {
  color: #9ba8b8;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #7a8ba0;
  background: transparent;
  transform: translateY(-50%);
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  color: var(--auth-primary);
  background: var(--auth-primary-soft);
  outline: 0;
}

.auth-recaptcha {
  min-height: 78px;
  margin: 5px 0 22px;
}

.auth-submit {
  display: flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--auth-primary);
  box-shadow: 0 10px 22px rgba(7, 89, 167, 0.2);
  font-size: 14px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-customs .auth-submit {
  box-shadow: 0 10px 22px rgba(8, 124, 121, 0.2);
}

.auth-submit:hover,
.auth-submit:focus {
  color: #fff;
  background: var(--auth-primary-dark);
  box-shadow: 0 13px 26px rgba(7, 59, 112, 0.24);
  transform: translateY(-1px);
  outline: 0;
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--auth-border);
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-link {
  color: var(--auth-primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

.auth-portal-link {
  display: flex;
  margin-top: 30px;
  padding: 15px 16px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  color: #40546c;
  background: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-portal-link:hover,
.auth-portal-link:focus {
  border-color: var(--auth-primary);
  color: var(--auth-primary);
  background: #fff;
  text-decoration: none;
}

.auth-portal-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--auth-primary);
  background: var(--auth-primary-soft);
}

.auth-portal-copy {
  flex: 1;
}

.auth-portal-copy strong,
.auth-portal-copy span {
  display: block;
}

.auth-portal-copy strong {
  color: var(--auth-ink);
  font-size: 13px;
}

.auth-portal-copy span {
  margin-top: 3px;
  color: var(--auth-muted);
  font-size: 11px;
}

.auth-alert {
  display: none;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #facaca;
  border-radius: 10px;
  color: #a72b2b;
  background: #fff1f1;
  font-size: 13px;
}

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

  .auth-hero {
    padding: 38px 30px;
  }

  .auth-highlights {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    display: block;
  }

  .auth-hero {
    display: none;
  }

  .auth-main {
    min-height: 100vh;
    padding: 38px 22px;
  }

  .auth-mobile-brand {
    display: flex;
    margin-bottom: 44px;
    align-items: center;
    gap: 11px;
    color: var(--auth-primary-dark);
  }

  .auth-mobile-brand .auth-brand-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-color: var(--auth-border);
    color: #fff;
    background: var(--auth-primary);
    font-size: 17px;
  }

  .auth-mobile-brand .auth-brand-logo {
    width: 34px;
    height: 34px;
  }

  .auth-mobile-brand .auth-brand-copy span {
    color: var(--auth-muted);
  }

  .auth-card h2 {
    font-size: 28px;
  }
}

@media (max-width: 360px) {
  .auth-main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .auth-recaptcha {
    width: 304px;
    transform: scale(0.88);
    transform-origin: left top;
    margin-bottom: 10px;
  }

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

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