@import url('ubold-saas.css');

/* UBold authentication shell: brand scene left, domestic entry form right. */
.auth-entry {
  margin: 0;
  min-width: 320px;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(500px, 38vw, 620px);
  overflow: hidden;
  background: var(--ubold-canvas);
  color: var(--ubold-text);
  font-family: Inter, "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

.auth-entry-register {
  grid-template-columns: minmax(0, 1fr) clamp(620px, 44vw, 760px);
}

.auth-entry *,
.auth-entry *::before,
.auth-entry *::after {
  box-sizing: border-box;
}

.auth-entry .login-hero,
.auth-entry .reg-hero {
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(35, 43, 54, .94), rgba(35, 43, 54, .72), rgba(35, 43, 54, .42)),
    url('../images/ubold/auth-office.webp') center / cover no-repeat;
  color: #fff;
}

.auth-entry .login-hero::before,
.auth-entry .reg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(20, 30, 39, .12), transparent 38%, rgba(20, 30, 39, .08));
}

.auth-entry .hero-shapes {
  display: none;
}

.auth-entry .hero-content {
  width: min(100%, 620px);
  max-width: 620px;
  padding: clamp(44px, 6vw, 88px);
  margin: auto;
  position: relative;
  z-index: 1;
  color: #fff;
}

.auth-entry .hero-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 14px;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
}

.auth-entry .hero-icon svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
}

.auth-entry .hero-content h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(34px, 3.2vw, 54px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.03em;
}

.auth-entry .hero-content > p {
  max-width: 480px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  line-height: 1.8;
}

.auth-entry .hero-features {
  display: grid;
  gap: 14px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.auth-entry .hero-features .feat {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .9);
}

.auth-entry .hero-features .feat-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}

.auth-entry .hero-features svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.auth-entry .login-panel,
.auth-entry .reg-panel {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(36px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--ubold-surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-entry .reg-panel {
  align-items: flex-start;
}

.auth-entry .login-form-wrapper,
.auth-entry .reg-form-wrapper {
  width: 100%;
  max-width: 440px;
  margin: auto;
  animation: none;
}

.auth-entry .reg-form-wrapper {
  max-width: 620px;
}

.auth-entry .brand-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  margin-bottom: 34px;
  color: var(--ubold-text);
  text-decoration: none;
}

.auth-entry .brand-logo .logo-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-entry .brand-logo .logo-icon img,
.auth-entry .brand-logo .logo-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-entry .brand-logo > span {
  min-width: 0;
  overflow: hidden;
  color: var(--ubold-text);
  font-size: 20px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-entry .form-heading {
  margin-bottom: 28px;
  text-align: left;
}

.auth-entry .form-heading h1 {
  margin: 0 0 8px;
  color: var(--ubold-text);
  font-size: 28px;
  font-weight: 650;
  line-height: 1.3;
}

.auth-entry .form-heading p {
  margin: 0;
  color: var(--ubold-muted);
  font-size: 14px;
  line-height: 1.7;
}

.auth-entry .form-group {
  min-width: 0;
  margin-bottom: 18px;
}

.auth-entry .form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--ubold-text);
  font-size: 14px;
  font-weight: 600;
}

.auth-entry .form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.auth-entry .form-row .form-group {
  min-width: 0;
}

.auth-entry .input-wrapper input,
.auth-entry .input-wrapper select,
.auth-entry .subdomain-preview {
  min-height: 44px;
  border: 1px solid var(--ubold-line);
  border-radius: 5px;
  background: var(--ubold-surface);
  color: var(--ubold-text);
  box-shadow: none;
  font: inherit;
}

.auth-entry .input-wrapper input:focus,
.auth-entry .input-wrapper select:focus,
.auth-entry .subdomain-preview:focus-within {
  outline: 0;
  border-color: var(--ubold-primary);
  box-shadow: 0 0 0 3px var(--ubold-primary-subtle);
}

.auth-entry .subdomain-preview input {
  min-width: 40px;
  border: 0;
  box-shadow: none;
}

.auth-entry .subdomain-suffix {
  max-width: 55%;
  flex-shrink: 0;
  overflow: hidden;
  color: var(--ubold-muted);
  font-size: 13px;
  text-overflow: ellipsis;
}

.auth-entry .input-wrapper .input-icon {
  color: var(--ubold-muted);
  stroke: var(--ubold-muted);
}

.auth-entry .toggle-password {
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ubold-muted);
}

.auth-entry .toggle-password:focus-visible,
.auth-entry button:focus-visible,
.auth-entry a:focus-visible {
  outline: 2px solid var(--ubold-primary);
  outline-offset: 3px;
}

.auth-entry .btn-login,
.auth-entry .btn-register {
  min-height: 44px;
  margin-top: 6px;
  padding: 10px 16px;
  border: 1px solid var(--ubold-primary);
  border-radius: 5px;
  background: var(--ubold-primary);
  color: #fff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  transform: none;
  cursor: pointer;
}

.auth-entry .btn-login:hover,
.auth-entry .btn-register:hover {
  border-color: var(--ubold-primary-emphasis);
  background: var(--ubold-primary-emphasis);
  box-shadow: none;
  transform: none;
}

.auth-entry button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

.auth-entry .form-options {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-entry a {
  color: var(--ubold-primary);
}

.auth-entry .remember-check input,
.auth-entry .terms-check input {
  accent-color: var(--ubold-primary);
}

.auth-entry .login-alert,
.auth-entry .reg-alert {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--ubold-danger-border);
  border-radius: 5px;
  background: var(--ubold-danger-subtle);
  color: var(--ubold-danger-emphasis);
}

.auth-entry .login-alert-success {
  border-color: var(--ubold-success-border);
  background: var(--ubold-success-subtle);
  color: var(--ubold-success-emphasis);
}

.auth-entry .field-hint,
.auth-entry .login-footer,
.auth-entry .reg-footer {
  color: var(--ubold-muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-entry .field-error {
  color: var(--ubold-danger);
  font-size: 13px;
}

.auth-entry .is-invalid {
  border-color: var(--ubold-danger) !important;
}

.auth-entry .login-footer,
.auth-entry .reg-footer {
  margin-top: 26px;
  text-align: center;
}

.auth-entry .divider {
  margin: 24px 0;
}

.auth-entry .back-home {
  justify-content: center;
}

.auth-entry .cycle-btn.active {
  border-color: var(--ubold-primary);
  background: var(--ubold-primary-subtle);
  color: var(--ubold-primary);
}

@media (max-width: 1080px) {
  .auth-entry,
  .auth-entry-register {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    display: block;
    overflow: auto;
    background: var(--ubold-surface);
  }

  .auth-entry .login-hero,
  .auth-entry .reg-hero {
    display: none;
  }

  .auth-entry .login-panel,
  .auth-entry .reg-panel {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(32px, 7vw, 64px) 24px;
  }

  .auth-entry .login-form-wrapper {
    max-width: 480px;
  }

  .auth-entry .reg-form-wrapper {
    max-width: 680px;
  }
}

@media (max-width: 575px) {
  .auth-entry .login-panel,
  .auth-entry .reg-panel {
    align-items: flex-start;
    padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  }

  .auth-entry .brand-logo {
    margin-bottom: 28px;
  }

  .auth-entry .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-entry .form-heading h1 {
    font-size: 24px;
  }

  .auth-entry .subdomain-suffix {
    max-width: 48%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-entry *,
  .auth-entry *::before,
  .auth-entry *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/*
 * UBold v8 Authentication > Split shell.
 * Source: UBold_v8.0/HTML/Admin/src/auth-split-*.html and _authentication.scss.
 * The purchased template is mirrored for the domestic layout: scene left, form right.
 */
.auth-entry,
.auth-entry-register {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(425px, 475px);
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ubold-surface);
}

.auth-entry .login-hero,
.auth-entry .reg-hero {
  display: flex;
  background-image:
    linear-gradient(to top, #313a46, rgba(49, 58, 70, .80), rgba(49, 58, 70, .50)),
    url('../images/ubold/auth-office.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.auth-entry .login-hero::before,
.auth-entry .reg-hero::before,
.auth-entry .hero-content,
.auth-entry .hero-shapes {
  display: none;
}

.auth-entry .login-panel,
.auth-entry .reg-panel {
  position: relative;
  isolation: isolate;
  align-items: stretch;
  min-width: 425px;
  padding: 50px;
}

.auth-entry .login-panel::before,
.auth-entry .reg-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 auto auto;
  width: 180px;
  height: 180px;
  background: url('../images/ubold/auth-card-bg.svg') top right / 180px auto no-repeat;
  pointer-events: none;
}

.auth-entry .login-form-wrapper,
.auth-entry .reg-form-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 375px;
  min-height: calc(100svh - 100px);
  display: flex;
  flex-direction: column;
  margin-inline: auto;
}

.auth-entry .login-form-wrapper {
  margin-block: auto;
}

.auth-entry .reg-panel {
  justify-content: flex-start;
}

.auth-entry .reg-form-wrapper {
  margin-block: 0;
}

.auth-entry .brand-logo {
  justify-content: center;
  gap: 9px;
  margin: 0 0 32px;
}

.auth-entry .brand-logo .logo-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.auth-entry .brand-logo > span {
  font-size: 20px;
  font-weight: 700;
}

.auth-entry .login-form-wrapper .form-heading {
  margin-top: auto;
}

.auth-entry .form-heading {
  margin-bottom: 24px;
  text-align: center;
}

.auth-entry .form-heading h1 {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 600;
}

.auth-entry .form-heading p {
  max-width: 320px;
  margin-inline: auto;
  line-height: 1.6;
}

.auth-entry form {
  width: 100%;
}

.auth-entry .form-row {
  display: block;
}

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

.auth-entry .form-group label {
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 500;
}

.auth-entry .input-wrapper input,
.auth-entry .input-wrapper select,
.auth-entry .subdomain-preview {
  min-height: 40px;
  border-width: 1px;
  border-radius: 4px;
  font-size: 14px;
}

.auth-entry .input-wrapper input:focus,
.auth-entry .input-wrapper select:focus,
.auth-entry .subdomain-preview:focus-within {
  box-shadow: 0 0 0 3px var(--ubold-primary-subtle);
}

.auth-entry .field-hint,
.auth-entry .field-error {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.auth-entry .registration-plan-note {
  gap: 2px;
  margin: 2px 0 16px;
  padding: 11px 13px;
  border: 1px solid var(--ubold-success-border);
  border-radius: 4px;
  background: var(--ubold-success-subtle);
  font-size: 12px;
  line-height: 1.5;
}

.auth-entry .btn-login,
.auth-entry .btn-register {
  width: 100%;
  min-height: 40px;
  margin-top: 0;
  border-radius: 4px;
  font-weight: 600;
}

.auth-entry .btn-arrow {
  display: none;
}

.auth-entry .form-options {
  margin: 0 0 18px;
  font-size: 13px;
}

.auth-entry .divider {
  display: none;
}

.auth-entry .back-home {
  width: auto;
  min-height: auto;
  margin: 22px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ubold-muted);
  font-size: 13px;
  text-decoration: none;
}

.auth-entry .back-home:hover {
  border: 0;
  background: transparent;
  color: var(--ubold-primary);
  text-decoration: underline;
}

.auth-entry .auth-switch {
  margin: 22px 0 0;
  color: var(--ubold-muted);
  font-size: 13px;
  text-align: center;
}

.auth-entry .auth-switch a {
  margin-left: 4px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-entry .login-footer,
.auth-entry .reg-footer {
  margin-top: auto;
  padding-top: 32px;
  font-size: 12px;
}

.auth-entry-register .reg-form-wrapper {
  min-height: auto;
}

.auth-entry-register .brand-logo {
  margin-bottom: 22px;
}

.auth-entry-register .form-heading {
  margin-bottom: 20px;
}

.auth-entry-register .field-hint {
  display: none;
}

.auth-entry-register .registration-otp-status:not(:empty) {
  display: block;
}

.auth-entry-register .form-group {
  margin-bottom: 14px;
}

.auth-entry-register .registration-plan-note {
  margin-bottom: 14px;
  padding-block: 9px;
}

@media (max-width: 767.98px) {
  .auth-entry,
  .auth-entry-register {
    display: block;
    height: auto;
    min-height: 100svh;
    overflow: auto;
  }

  .auth-entry .login-hero,
  .auth-entry .reg-hero {
    display: none;
  }

  .auth-entry .login-panel,
  .auth-entry .reg-panel {
    min-width: 0;
    min-height: 100svh;
    padding: 36px 28px;
  }

  .auth-entry .login-form-wrapper,
  .auth-entry .reg-form-wrapper {
    max-width: 375px;
    min-height: calc(100svh - 72px);
  }
}

@media (max-width: 420px) {
  .auth-entry .login-panel,
  .auth-entry .reg-panel {
    padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  }

  .auth-entry .login-form-wrapper,
  .auth-entry .reg-form-wrapper {
    min-height: calc(100svh - 56px);
  }
}
