/* Auth pages (login, etc.) — change this file + partials to restyle all auth screens */

.auth-main-embed {
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(12px, 3vw, 20px) clamp(2rem, 5vw, 3rem);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

.auth-main-embed .auth-panel {
  margin: 0 auto;
  width: min(960px, 100%);
}

.auth-html,
.auth-page {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-family-primary, 'Montserrat', system-ui, sans-serif);
  color: var(--text);
  background: var(--gray);
}

.auth-html {
  height: 100%;
  overflow-x: hidden;
}

html.auth-html--gate {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

html.auth-html--gate.auth-html--register {
  height: auto;
  min-height: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

html.auth-html--gate body.auth-page {
  min-height: 0;
}

.auth-shell,
.auth-shell *,
.auth-shell *::before,
.auth-shell *::after {
  box-sizing: border-box;
}

.auth-page--portal {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, color-mix(in oklab, var(--primary) 18%, transparent), transparent 70%),
    linear-gradient(165deg, #e6f3f4 0%, #f6f8f9 42%, #eef2f4 100%);
  overflow-x: hidden;
}

/* Login / billing gate: fit one screen, no page scrollbar when content fits */
body.auth-page--portal:not(.portal-app-page):not(.auth-page--register) {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body.auth-page--portal:not(.portal-app-page):not(.auth-page--register) .auth-shell {
  height: 100%;
  min-height: 0;
  max-height: 100dvh;
  overflow: hidden;
}

body.auth-page--portal.auth-page--register:not(.portal-app-page) {
  height: auto !important;
  min-height: 100dvh;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: auto !important;
}

body.auth-page--portal.auth-page--register:not(.portal-app-page) .auth-shell {
  height: auto !important;
  min-height: 100dvh;
  max-height: none !important;
  overflow: visible !important;
}

.portal-app-page .auth-shell,
.auth-page--portal.portal-app-page .auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-page--portal .auth-header {
  position: sticky;
  top: 0;
  z-index: 40;
  max-width: 100%;
  padding: clamp(12px, 2vw, 18px) clamp(20px, 4vw, 48px);
  background: var(--white);
  box-shadow: 0 1px 0 color-mix(in oklab, var(--dark) 8%, transparent);
  flex-shrink: 0;
}

.auth-page--portal .portal-app-main {
  margin-top: 0 !important;
  padding-top: clamp(16px, 2.5vw, 28px);
}

.auth-page--portal .auth-main:not(.portal-app-main) {
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin-top: 0 !important;
  padding: clamp(8px, 1.5vw, 14px) clamp(12px, 3vw, 32px) clamp(8px, 1.5vw, 14px);
  overflow-x: hidden;
  overflow-y: hidden;
}

body.auth-page--portal:not(.portal-app-page) .auth-main:not(.portal-app-main) {
  overflow-y: hidden;
}

body.auth-page--portal:not(.portal-app-page) .auth-panel {
  width: min(920px, 100%);
  max-height: calc(100dvh - 9rem);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow:
    0 16px 32px color-mix(in oklab, var(--dark) 12%, transparent),
    0 0 0 1px color-mix(in oklab, var(--dark) 8%, #fff);
}

body.auth-page--portal:not(.portal-app-page) .auth-footer {
  padding: clamp(6px, 1vw, 10px) clamp(20px, 4vw, 48px) clamp(8px, 1.5vw, 12px);
}

body.auth-page--portal:not(.portal-app-page) .auth-panel__hero {
  padding: clamp(22px, 3.5vw, 36px);
  gap: 12px;
}

body.auth-page--portal:not(.portal-app-page) .auth-panel__form {
  padding: clamp(22px, 3.5vw, 32px);
}

.auth-page--portal .auth-footer {
  flex-shrink: 0;
  padding: clamp(8px, 1.5vw, 12px) clamp(20px, 4vw, 48px) clamp(10px, 2vw, 16px);
}

.auth-page--portal .auth-footer__copy {
  margin: 0;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 48px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.auth-brand__mark,
.auth-brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}

.auth-brand__mark {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--dark));
  color: #fff;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

.auth-brand__logo {
  display: block;
  object-fit: contain;
  background: var(--white);
  box-shadow: 0 2px 10px color-mix(in oklab, var(--dark) 8%, transparent);
}

.auth-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-header__btn--primary {
  color: var(--primary);
  background: var(--white);
  border: 1px solid color-mix(in oklab, var(--primary) 35%, var(--white));
  box-shadow: 0 2px 10px color-mix(in oklab, var(--dark) 6%, transparent);
}

.auth-header__btn--primary:hover {
  color: var(--primary-dark);
  background: color-mix(in oklab, var(--primary) 8%, var(--white));
  border-color: color-mix(in oklab, var(--primary) 50%, var(--white));
}

.auth-header__lang.app-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid color-mix(in oklab, var(--dark) 12%, var(--white));
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: 0 2px 10px color-mix(in oklab, var(--dark) 6%, transparent);
}

.portal-app-main {
  align-items: stretch;
  width: 100%;
  padding-top: clamp(16px, 2.5vw, 28px);
  padding-bottom: clamp(20px, 4vw, 40px);
}

.portal-app-main > .section--customer-form,
.portal-app-main > .section {
  width: 100%;
}

.portal-app-page .auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-brand__name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--dark);
}

.auth-brand__tag {
  display: block;
  font-size: 0.78rem;
  color: var(--primary);
  margin-top: 2px;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px clamp(16px, 4vw, 48px) 40px;
}

.auth-panel {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-heavy);
  border: 1px solid color-mix(in oklab, var(--dark) 12%, var(--white));
}

.auth-panel__hero {
  padding: clamp(32px, 5vw, 48px);
  background: linear-gradient(165deg, var(--dark) 0%, var(--primary) 55%, #006d78 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.auth-panel__hero h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.auth-panel__hero p {
  margin: 0;
  font-size: clamp(0.88rem, 2vw, 0.95rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92) !important;
  max-width: 36ch;
}

.auth-panel__features {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-panel__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.auth-panel__features i {
  opacity: 0.9;
}

.auth-panel__form {
  padding: clamp(28px, 5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form__head {
  margin-bottom: 24px;
}

.auth-form__head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.auth-form__head p {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.auth-alert {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  line-height: 1.45;
  background: color-mix(in oklab, var(--color-error-500) 10%, #fff);
  border: 1px solid color-mix(in oklab, var(--color-error-500) 35%, transparent);
  color: var(--color-error-500);
}

.auth-alert ul {
  margin: 0;
  padding-left: 18px;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap > i:first-child {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.9rem;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 44px 12px 42px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 18%, transparent);
}

.auth-input-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #9ca3af;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
}

.auth-input-toggle:hover {
  color: var(--primary);
  background: var(--gray);
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 13px 20px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--dark));
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-theme-lg);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-footer {
  padding: 20px clamp(20px, 4vw, 48px) 28px;
  text-align: center;
}

.auth-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 10px;
}

.auth-footer__nav a {
  font-size: 0.82rem;
  color: #6b7280;
  text-decoration: none;
}

.auth-footer__nav a:hover {
  color: var(--primary);
}

.auth-footer__copy {
  margin: 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* Language switcher on auth pages — globe trigger + dropdown */
.auth-lang-switcher {
  position: relative;
  display: inline-flex;
}

.auth-lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid color-mix(in oklab, var(--dark) 12%, var(--white));
  border-radius: 999px;
  background: var(--white);
  color: var(--dark);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px color-mix(in oklab, var(--dark) 6%, transparent);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-lang-switcher__toggle:hover,
.auth-lang-switcher.is-open .auth-lang-switcher__toggle,
.auth-lang-switcher.is-hover .auth-lang-switcher__toggle,
.auth-lang-switcher:focus-within .auth-lang-switcher__toggle {
  border-color: color-mix(in oklab, var(--primary) 35%, var(--white));
  background: color-mix(in oklab, var(--primary) 6%, var(--white));
}

.auth-lang-switcher__globe {
  font-size: 0.9rem;
  color: var(--primary);
}

.auth-lang-switcher__current {
  min-width: 1.35rem;
  text-align: center;
}

.auth-lang-switcher__caret {
  font-size: 0.58rem;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.auth-lang-switcher.is-open .auth-lang-switcher__caret,
.auth-lang-switcher.is-hover .auth-lang-switcher__caret,
.auth-lang-switcher:hover .auth-lang-switcher__caret,
.auth-lang-switcher:focus-within .auth-lang-switcher__caret {
  transform: rotate(180deg);
}

.auth-lang-switcher__menu {
  position: absolute;
  top: 100%;
  margin-top: 2px;
  right: 0;
  z-index: 30;
  min-width: 11.5rem;
  padding: 0.35rem;
  border: 1px solid color-mix(in oklab, var(--dark) 10%, var(--white));
  border-radius: 12px;
  background: var(--white);
  box-shadow:
    0 14px 34px color-mix(in oklab, var(--dark) 14%, transparent),
    0 0 0 1px color-mix(in oklab, var(--dark) 4%, transparent);
  display: none;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Invisible bridge so moving from button → menu does not drop :hover */
.auth-lang-switcher__menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

html[dir="rtl"] .auth-lang-switcher__menu {
  right: auto;
  left: 0;
}

.auth-lang-switcher.is-open .auth-lang-switcher__menu,
.auth-lang-switcher.is-hover .auth-lang-switcher__menu,
.auth-lang-switcher:hover .auth-lang-switcher__menu,
.auth-lang-switcher:focus-within .auth-lang-switcher__menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.auth-lang-switcher__option {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.55rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease;
}

.auth-lang-switcher__option:hover {
  background: color-mix(in oklab, var(--primary) 9%, transparent);
}

.auth-lang-switcher__option.is-active {
  background: color-mix(in oklab, var(--primary) 12%, transparent);
}

.auth-lang-switcher__option .app-lang-flag-img {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--dark) 12%, transparent);
}

.auth-lang-switcher__name {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.auth-lang-switcher__option .auth-lang-switcher__code {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.auth-lang-switcher__check {
  font-size: 0.72rem;
  color: var(--primary);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html[dir="rtl"] .auth-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .auth-panel__form,
html[dir="rtl"] .auth-form__head,
html[dir="rtl"] .auth-field label {
  text-align: right;
}

html[dir="rtl"] .auth-input-wrap > i:first-child {
  left: auto;
  right: 14px;
}

html[dir="rtl"] .auth-input {
  padding: 12px 42px 12px 44px;
}

html[dir="rtl"] .auth-input-toggle {
  right: auto;
  left: 8px;
}

.auth-header .app-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid color-mix(in oklab, var(--dark) 12%, var(--white));
  border-radius: 999px;
  padding: 4px 6px;
}

.auth-header .app-lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 8px;
  line-height: 1;
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-header .app-lang-switcher__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.auth-header .app-lang-switcher__btn.is-active {
  opacity: 1;
  background: color-mix(in oklab, var(--primary) 18%, transparent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 35%, transparent);
}

.auth-header .app-lang-flag-img {
  display: block;
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

@media (max-width: 520px) {
  .auth-lang-switcher__menu {
    min-width: 10.5rem;
  }

  .auth-lang-switcher__name {
    font-size: 0.78rem;
  }
}

@media (max-width: 992px) {
  .auth-main-embed {
    padding-top: 1rem;
  }
}

@media (max-width: 860px) {
  .auth-panel {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .auth-panel__hero {
    padding: clamp(24px, 5vw, 32px) clamp(20px, 4vw, 28px);
    text-align: center;
    align-items: center;
  }

  .auth-panel__hero p {
    max-width: none;
    margin: 20px 0px 0px;
  }

  .auth-panel__features {
    align-items: flex-start;
    text-align: left;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .auth-main-embed {
    padding-left: 10px;
    padding-right: 10px;
  }

  .auth-panel {
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 86, 98, 0.15);
  }

  .auth-panel__hero {
    padding: 22px 18px;
  }

  .auth-panel__hero h1 {
    font-size: 1.25rem;
  }

  .auth-panel__features {
    gap: 8px;
  }

  .auth-panel__features li {
    font-size: 0.82rem;
  }

  .auth-panel__form {
    padding: 22px 18px;
  }

  .auth-form__head h2 {
    font-size: 1.2rem;
  }

  .auth-submit {
    padding: 12px 16px;
  }
}

/* ===== Sign-in page (login.php only — .auth-page--signin) ===== */
.auth-page--signin {
  background: #f3f6f8;
  font-family: 'Outfit', var(--font-family-primary, system-ui, sans-serif);
}

body.auth-page--portal.auth-page--signin:not(.portal-app-page):not(.auth-page--register) .auth-main:not(.portal-app-main) {
  overflow: hidden;
}

body.auth-page--portal.auth-page--signin:not(.portal-app-page):not(.auth-page--register) .auth-panel,
body.auth-page--portal.auth-page--signin:not(.portal-app-page):not(.auth-page--register) .auth-panel--signin {
  max-height: none;
  overflow: hidden;
  overflow-y: hidden;
}

.auth-page--signin .auth-shell {
  position: relative;
  z-index: 1;
}

.auth-page--signin .auth-main {
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1.2vw, 12px) clamp(14px, 3vw, 32px);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.auth-page--signin .auth-footer {
  padding: 6px 16px 8px;
  background: transparent;
  flex-shrink: 0;
}

.auth-signin {
  position: relative;
  width: min(900px, 100%);
  margin: 0 auto;
  padding-bottom: 0;
  z-index: 2;
  flex-shrink: 1;
  min-height: 0;
}

.auth-signin__bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-signin__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.45;
}

.auth-signin__blob {
  display: none;
}

.auth-signin__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: clamp(12px, 2vw, 20px);
  text-align: left;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.auth-signin__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 86, 98, 0.15);
  flex-shrink: 0;
  opacity: 1;
  position: relative;
  z-index: 2;
}

.auth-signin__name {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  opacity: 1;
}

.auth-signin__tag {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary);
  opacity: 1;
}

.auth-page--signin .auth-panel--signin {
  position: relative;
  width: 100%;
  height: min(580px, calc(100dvh - 9.5rem));
  min-height: min(580px, calc(100dvh - 9.5rem));
  max-height: min(580px, calc(100dvh - 9.5rem));
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  border-radius: 24px;
  border: 0;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 60, 68, 0.12);
  overflow: hidden;
  isolation: isolate;
}

.auth-page--signin .auth-panel__hero {
  position: relative;
  padding: 0px 48px 0 36px !important;
  background: linear-gradient(180deg, #006874 0%, #19909E 51.44%, #006874 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  border-radius: 24px 0 0 24px;
  margin-right: -24px;
  overflow: hidden;
  z-index: 1;
}

.auth-page--signin .auth-panel__hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.auth-page--signin .auth-panel__hero h1 {
  font-size: 26px;
  font-weight: 700;
  text-shadow: none;
  margin: 0;
  margin-top: 105px;
}

.auth-page--signin .auth-panel__hero p {
  margin: 32px 0 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.92) !important;
}

.auth-page--signin .auth-panel__features {
  margin-top: 24px;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.auth-page--signin .auth-panel__features li {
  font-size: 16px;
  gap: 12px;
  justify-content: flex-start;
}

.auth-page--signin .auth-panel__feature-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  mix-blend-mode: lighten;
}

.auth-page--signin .auth-panel__hero-deco {
  position: absolute;
  bottom: 0px;
  left: 137px;
  width: 35%;
  height: 62%;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  pointer-events: none;
}

.auth-page--signin .auth-panel__hero-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left bottom;
  mix-blend-mode: lighten;
  opacity: 1;
  filter: none;
  transform: none;
}

.auth-hero-shape {
  display: none;
}

.auth-page--signin .auth-panel__form {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: 100%;
  padding: 36px 48px 36px 44px;
  background: #ffffff;
  border-radius: 24px;
  z-index: 2;
  box-shadow: none;
  margin-left: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.auth-page--signin .auth-form__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.auth-form__topbar {
  position: absolute;
  top: 24px;
  right: 36px;
  margin: 0;
  min-height: 0;
  z-index: 5;
}

.auth-form__lang.auth-lang-switcher--full .auth-lang-switcher__toggle {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0.25rem 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
  gap: 0.45rem;
}

.auth-form__lang.auth-lang-switcher--full .auth-lang-switcher__toggle:hover,
.auth-form__lang.auth-lang-switcher--full .auth-lang-switcher.is-open .auth-lang-switcher__toggle {
  background: transparent;
  color: var(--primary);
}

.auth-form__lang.auth-lang-switcher--full .auth-lang-switcher__current {
  min-width: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.auth-page--signin .auth-form__head {
  margin-bottom: 28px;
  text-align: left;
}

.auth-page--signin .auth-form__head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

.auth-page--signin .auth-form__head p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
  max-width: 36ch;
  margin: 0;
}

.auth-page--signin .auth-field {
  margin-bottom: 22px;
}

.auth-page--signin .auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 4px;
}

.auth-page--signin .auth-input {
  width: 100%;
  padding: 6px 36px 8px 0;
  border: 0;
  border-bottom: 1px solid #d1d5db;
  border-radius: 0;
  background: transparent !important;
  font-size: 0.9375rem;
  color: #111827;
}

.auth-page--signin .auth-input:-webkit-autofill,
.auth-page--signin .auth-input:-webkit-autofill:hover,
.auth-page--signin .auth-input:-webkit-autofill:focus,
.auth-page--signin .auth-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #111827 !important;
  caret-color: #111827;
  transition: background-color 99999s ease-out 0s;
}

.auth-page--signin .auth-input:autofill {
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #111827 !important;
}

.auth-page--signin .auth-input::placeholder {
  color: transparent;
}

.auth-page--signin .auth-input:focus {
  border-bottom-color: #19909E;
  box-shadow: none;
  outline: none;
}

.auth-page--signin .auth-input-toggle {
  right: 0;
  bottom: 8px;
  top: auto;
  transform: none;
  color: #9ca3af;
  padding: 4px 2px;
}

.auth-page--signin .auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  background-color: #158A97;
  box-shadow: none;
}

.auth-page--signin .auth-submit:hover {
  background-color: #158A97;
  transform: none;
  box-shadow: 0 6px 16px rgba(0, 104, 116, 0.28);
}

html[dir="rtl"] .auth-page--signin .auth-input {
  padding: 10px 0 10px 36px;
}

html[dir="rtl"] .auth-form__topbar {
  justify-content: flex-start;
}

@media (max-width: 860px) {
  .auth-page--signin .auth-panel--signin {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 8rem);
    overflow: hidden;
  }

  .auth-page--signin .auth-panel__hero {
    padding: 28px 24px 24px;
    border-radius: 24px 24px 0 0;
    margin-right: 0;
    min-height: 0;
  }

  .auth-page--signin .auth-panel__hero h1 {
    font-size: 19px;
    max-width: none;
    margin-top: 35px;
  }

  .auth-page--signin .auth-panel__form {
    border-radius: 0 0 24px 24px;
    padding: 28px 24px 32px;
    min-height: 0;
  }

  .auth-page--signin .auth-panel__hero-deco {
    display: none;
  }

  .auth-signin__bg-img {
    opacity: 0.3;
  }

  .auth-signin__brand {
    margin-bottom: 12px;
  }

  .auth-form__topbar {
    position: static;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .auth-page--signin .auth-panel__form {
    padding: 24px 20px;
  }

  .auth-page--signin .auth-form__head h2 {
    font-size: 1.45rem;
  }
}

/* Freelancer registration — sign-in shell + wider panel, scrollable page */
body.auth-page--register:not(.portal-app-page) {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

html.auth-html--gate:has(body.auth-page--register:not(.portal-app-page)) {
  height: auto;
  max-height: none;
  overflow: auto;
}

body.auth-page--register:not(.portal-app-page) .auth-shell {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow: visible;
}

body.auth-page--register.auth-page--signin:not(.portal-app-page) .auth-main:not(.portal-app-main) {
  align-items: flex-start;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto !important;
  padding-top: clamp(12px, 2vw, 20px);
  padding-bottom: clamp(24px, 4vw, 48px);
  -webkit-overflow-scrolling: touch;
}

body.auth-page--register.auth-page--signin:not(.portal-app-page) .auth-panel,
body.auth-page--register.auth-page--signin:not(.portal-app-page) .auth-panel--signin,
body.auth-page--register.auth-page--signin:not(.portal-app-page) .auth-panel--register {
  max-height: none !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.auth-signin--register {
  width: min(960px, 100%);
  margin-top: clamp(12px, 2vw, 24px);
  margin-bottom: clamp(16px, 3vw, 32px);
  flex-shrink: 0;
  min-height: auto;
}

.auth-page--register.auth-page--signin .auth-panel--signin.auth-panel--register {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  overflow: visible !important;
}

.auth-page--register .auth-panel__hero {
  justify-content: flex-start;
  padding-bottom: 32px !important;
}

.auth-page--register .auth-panel__hero h1 {
  margin-top: clamp(48px, 8vw, 105px);
}

.auth-page--register .auth-panel__features i {
  width: 22px;
  font-size: 16px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.95;
}

.auth-page--register .auth-panel__form {
  justify-content: flex-start;
  padding: clamp(28px, 4vw, 36px) clamp(28px, 4vw, 44px) clamp(32px, 4vw, 40px);
  overflow: visible;
  min-height: 0;
}

.auth-page--register .auth-form__inner--register {
  max-width: none;
  width: 100%;
  margin-top: clamp(20px, 3vw, 32px);
  overflow: visible;
}

.auth-page--register .auth-form__head h2 {
  font-size: 26px;
  font-weight: 700;
}

.auth-form--register .auth-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.auth-form--register .auth-field {
  margin-bottom: 0;
}

.auth-form--register .auth-field--full {
  grid-column: 1 / -1;
}

.auth-phone-row {
  display: grid;
  grid-template-columns: minmax(108px, 34%) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.auth-input-wrap--iti {
  width: 100%;
}

.auth-input-wrap--iti .iti {
  width: 100%;
  display: block;
}

.auth-page--register .auth-input-wrap--iti .iti__tel-input,
.auth-page--register .auth-input-wrap--iti .iti input[type='tel'] {
  width: 100%;
  padding: 10px 12px 10px 96px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff !important;
  font-size: 0.9375rem;
  color: #111827;
  min-height: 44px;
}

.auth-page--register .auth-input-wrap--iti .iti__tel-input:focus,
.auth-page--register .auth-input-wrap--iti .iti input[type='tel']:focus {
  outline: none;
  border-color: var(--primary, #19909e);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary, #19909e) 18%, transparent);
}

.auth-page--register .auth-input-wrap--iti .iti__country-container {
  border-radius: 8px 0 0 8px;
}

.auth-page--register .auth-input-wrap--iti .iti__selected-country {
  padding: 0 8px 0 10px;
  border-right: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 8px 0 0 8px;
}

.auth-page--register .auth-input-wrap--iti .iti__dropdown-content {
  max-height: 220px;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  z-index: 1200;
}

.auth-field--phone {
  min-width: 0;
}

body.auth-page--register.auth-page--signin .auth-main {
  overflow: visible !important;
  min-height: auto !important;
  flex: none !important;
}

body.auth-page--register.auth-page--signin .auth-panel--signin.auth-panel--register {
  overflow: visible !important;
}

@media (max-width: 520px) {
  .auth-phone-row {
    grid-template-columns: 1fr;
  }
}

.auth-page--register .auth-input--textarea {
  min-height: 72px;
  resize: vertical;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.45;
}

.auth-page--register .auth-input-wrap--file {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafbfc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-page--register .auth-input-wrap--file:focus-within {
  border-color: #19909E;
  box-shadow: 0 0 0 3px rgba(25, 144, 158, 0.12);
  background: #fff;
}

.auth-page--register .auth-input--file {
  width: 100%;
  padding: 0;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0;
  background: transparent !important;
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
  line-height: 1.4;
}

.auth-page--register .auth-input--file:focus {
  border: 0 !important;
  box-shadow: none;
  outline: none;
}

.auth-page--register .auth-input--file::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-page--register .auth-input--file::file-selector-button:hover {
  background: #f3f6f8;
  border-color: #19909E;
  color: #006874;
}

.auth-page--register .auth-input--file::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-page--register .auth-input--file::-webkit-file-upload-button:hover {
  background: #f3f6f8;
  border-color: #19909E;
  color: #006874;
}

.auth-page--register .auth-form--register .auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-form__footer-link {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.auth-form__footer-link a {
  color: var(--primary, #0d6e7a);
  font-weight: 600;
  text-decoration: none;
}

.auth-form__footer-link a:hover {
  text-decoration: underline;
}

.auth-alert--success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.auth-page--register.auth-page--signin .auth-panel--signin.auth-panel--register:has(.auth-form__inner--success) {
  height: min(580px, calc(100dvh - 9.5rem));
  min-height: min(580px, calc(100dvh - 9.5rem));
  max-height: min(580px, calc(100dvh - 9.5rem));
}

.auth-page--register .auth-panel__form:has(.auth-form__inner--success) {
  justify-content: center;
}

.auth-page--register .auth-form__inner--success {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
  min-height: 0;
}

.auth-page--register .auth-form__inner--success .auth-form__head {
  margin-bottom: 28px;
}

.auth-page--register .auth-form__inner--success .auth-form__head p {
  color: #047857;
  font-size: 0.95rem;
  line-height: 1.55;
}

.auth-submit--link {
  display: inline-flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  justify-content: center;
  margin-top: 8px;
  color: #fff !important;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 860px) {
  .auth-page--register.auth-page--signin .auth-panel--signin.auth-panel--register {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .auth-page--register .auth-panel__hero h1 {
    margin-top: 35px;
  }
}

@media (max-width: 640px) {
  .auth-form--register .auth-form__grid {
    grid-template-columns: 1fr;
  }
}
