@supports selector(:has(*)) {
  .auth-tabs { --tab-pad: 6px; position: relative; isolation: isolate; padding: var(--tab-pad); }
  .auth-tabs::before { content: ''; position: absolute; z-index: -1; top: var(--tab-pad); bottom: var(--tab-pad); left: var(--tab-pad); width: calc(50% - var(--tab-pad) - 4px); border-radius: 999px; background: var(--gold-gradient); box-shadow: 0 8px 22px -8px rgba(212, 175, 55, 0.6); transition: transform 0.55s cubic-bezier(0.34, 1.25, 0.5, 1); }
  .auth-tabs:has(#btnTabRegister.active)::before { transform: translateX(calc(100% + 8px)); }
  .auth-tabs .auth-tab-btn { transition: color 0.3s ease; }
  .auth-tabs .auth-tab-btn.active { background: transparent; box-shadow: none; }
}

.pw-meter { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; column-gap: 10px; min-height: 2.8em; margin-top: 8px; font-size: 0.74rem; line-height: 1.4; color: var(--text-muted, #94a3b8); }
.pw-meter-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-meter-bar i { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); transition: background-color 0.35s ease, box-shadow 0.35s ease; }
.pw-meter-label { font-weight: 700; margin-right: 6px; }
.pw-meter[data-score="0"] .pw-meter-label, .pw-meter[data-score="1"] .pw-meter-label { color: #fca5a5; }
.pw-meter[data-score="1"] .pw-meter-bar i:first-child { background: #ef4444; }
.pw-meter[data-score="2"] .pw-meter-bar i:nth-child(-n+2) { background: #f59e0b; }
.pw-meter[data-score="2"] .pw-meter-label { color: #fcd34d; }
.pw-meter[data-score="3"] .pw-meter-bar i:nth-child(-n+3) { background: var(--gold-primary, #d4af37); }
.pw-meter[data-score="3"] .pw-meter-label { color: var(--gold-light, #f6e29e); }
.pw-meter[data-score="4"] .pw-meter-bar i { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.45); }
.pw-meter[data-score="4"] .pw-meter-label { color: #86efac; }
.pw-match { min-height: 1.4em; margin-top: 6px; font-size: 0.74rem; line-height: 1.4; }
.pw-match.is-ok { color: #86efac; }
.pw-match.is-bad { color: #fca5a5; }

@media (max-width: 760px) {
  .auth-page-body::after { content: ''; position: fixed; left: 50%; top: 50%; z-index: 0; width: 160vw; height: 76svh; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(212, 175, 55, 0.13), rgba(212, 175, 55, 0.04) 55%, transparent); pointer-events: none; }
  .auth-header { padding: 12px 14px; }
  .auth-header .badge-gold { display: none; }
  .auth-back-link { padding: 8px 13px; font-size: 0.78rem; }
  .auth-main-container { flex: 1; align-items: center; padding: 4px 14px clamp(12px, 2.6svh, 26px); }
  .auth-card { padding: clamp(22px, 3.6svh, 34px) 20px clamp(20px, 3.2svh, 30px); border-radius: 28px; border-color: rgba(212, 175, 55, 0.3); background: linear-gradient(180deg, rgba(23, 25, 33, 0.92), rgba(11, 13, 19, 0.95)); box-shadow: 0 34px 80px -34px rgba(0, 0, 0, 0.95), 0 0 80px -30px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06); animation: authIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .auth-brand { --logo: clamp(48px, 7.4svh, 66px); margin-bottom: clamp(16px, 2.8svh, 28px); }
  .auth-brand .auth-logo { height: var(--logo); margin: 0 auto clamp(8px, 1.4svh, 14px); }
  .auth-brand::before { top: -9px; width: calc(var(--logo) + 18px); height: calc(var(--logo) + 18px); margin-left: calc(var(--logo) / -2 - 9px); }
  .auth-brand .auth-title { font-size: clamp(1.3rem, 3.2svh, 1.65rem); }
  .auth-brand .auth-sub { margin-top: 6px; font-size: 0.68rem; letter-spacing: 0.24em; }
  .auth-tabs { --tab-pad: 5px; margin-bottom: clamp(16px, 2.6svh, 26px); }
  .auth-tab-btn { padding: clamp(10px, 1.6svh, 13px) 4px; font-size: 0.8rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .auth-page-body .form-group { margin-bottom: clamp(12px, 2svh, 18px); }
  .auth-page-body .form-label { font-size: 0.8rem; margin-bottom: 6px; color: #cbd5e1; }
  .auth-page-body .form-control { padding: clamp(12px, 1.9svh, 15px) 16px; font-size: 16px; border-radius: 14px; border-color: rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.04); }
  .auth-page-body .form-control:focus { border-color: rgba(212, 175, 55, 0.6); box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12); background: rgba(255, 255, 255, 0.06); }
  .auth-page-body .btn-primary.btn-block { min-height: clamp(50px, 6.6svh, 56px); border-radius: 16px; }
  .auth-page-body .auth-form-options { margin-bottom: clamp(16px, 2.6svh, 24px) !important; font-size: 0.84rem; }
  .auth-card:has(:where(#paneRegister).active) .auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: clamp(12px, 2svh, 18px); }
  .auth-card:has(:where(#paneRegister).active) .auth-brand .auth-logo { height: 42px; margin: 0; }
  .auth-card:has(:where(#paneRegister).active) .auth-brand .auth-title { font-size: 1.3rem; margin: 0; }
  .auth-card:has(:where(#paneRegister).active) .auth-brand .auth-sub, .auth-card:has(:where(#paneRegister).active) .auth-brand::before { display: none; }
  .auth-card:has(:where(#paneRegister).active) .auth-tabs { margin-bottom: clamp(12px, 2svh, 18px); }
  .auth-page-body #formRegister .form-group { margin-bottom: clamp(9px, 1.5svh, 14px); }
  .auth-page-body #formRegister .form-control { padding-top: clamp(11px, 1.6svh, 14px); padding-bottom: clamp(11px, 1.6svh, 14px); }
  .auth-page-body #formRegister .form-row { gap: 0; }
  .auth-page-body #formRegister .form-row:has(#regFirst) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .auth-page-body #formRegister label[style*="font-size: 0.8rem"] { font-size: 0.76rem !important; line-height: 1.45 !important; gap: 9px !important; }
  .auth-page-body #formRegister .form-group[style*="margin-bottom: 20px"] { margin-bottom: 14px !important; }
  .auth-page-body #paneLogin .auth-divider, .auth-page-body #btnNfcLogin { display: none !important; }
  .auth-footer { padding: 4px 12px 12px; font-size: 0.72rem; }
  .auth-footer > div:first-child { display: none !important; }
  .auth-page-body.auth-tight .auth-header { padding-top: 8px; padding-bottom: 8px; }
  .auth-page-body.auth-tight .auth-main-container { padding-bottom: 8px; }
  .auth-page-body.auth-tight .auth-card { padding-top: 16px; padding-bottom: 14px; }
  .auth-page-body.auth-tight .auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
  .auth-page-body.auth-tight .auth-brand .auth-logo { height: 34px; margin: 0; }
  .auth-page-body.auth-tight .auth-brand .auth-title { font-size: 1.12rem; margin: 0; }
  .auth-page-body.auth-tight .auth-brand .auth-sub, .auth-page-body.auth-tight .auth-brand::before { display: none; }
  .auth-page-body.auth-tight .auth-tabs { margin-bottom: 12px; }
  .auth-page-body.auth-tight .auth-tab-btn { padding-top: 9px; padding-bottom: 9px; }
  .auth-page-body.auth-tight .form-group, .auth-page-body.auth-tight #formRegister .form-group { margin-bottom: 8px; }
  .auth-page-body.auth-tight #formRegister .form-group[style] { margin-bottom: 8px !important; }
  .auth-page-body.auth-tight .form-label { margin-bottom: 4px; }
  .auth-page-body.auth-tight .form-control, .auth-page-body.auth-tight #formRegister .form-control { padding-top: 10px; padding-bottom: 10px; }
  .auth-page-body.auth-tight .btn-primary.btn-block { min-height: 46px; }
  .auth-page-body.auth-tight .auth-form-options { margin-bottom: 12px !important; }
  .auth-page-body.auth-tight .pw-meter { margin-top: 6px; }
  .auth-page-body.auth-tight .pw-match { margin-top: 4px; }
  .auth-page-body.auth-tight .reg-step-dots { margin-bottom: 8px; }
  .auth-page-body.auth-tight .reg-step-back { margin-top: 2px; padding: 6px; }
  .auth-page-body.auth-tight #formRegister label[style*="font-size: 0.8rem"] { font-size: 0.72rem !important; line-height: 1.4 !important; }
  .auth-page-body.auth-tighter .auth-brand, .auth-page-body.auth-tighter .auth-footer { display: none; }
  .auth-page-body.auth-tighter .auth-main-container { padding-bottom: 6px; }
  .auth-page-body.auth-tighter .auth-tab-btn { padding-top: 7px; padding-bottom: 7px; }
  .auth-page-body.auth-tighter :is(.form-group, #formRegister .form-group, #formRegister .form-group[style]) { margin-bottom: 6px !important; }
  .auth-page-body.auth-tighter .form-label { font-size: 0.74rem; }
}
.reg-type { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; padding: 4px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 999px; background: rgba(255, 255, 255, 0.03); }
.reg-type label { position: relative; display: block; margin: 0; cursor: pointer; }
.reg-type input { position: absolute; opacity: 0; pointer-events: none; }
.reg-type span { display: block; padding: 9px 10px; border-radius: 999px; color: #cbd5e1; font-size: 0.84rem; font-weight: 600; text-align: center; transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }
.reg-type input:checked + span { background: rgba(212, 175, 55, 0.16); color: var(--gold-light, #f6e29e); box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45); }
.reg-type input:focus-visible + span { outline: 2px solid var(--gold-primary, #d4af37); outline-offset: 2px; }
.reg-company-note { margin: -4px 0 14px; color: var(--text-muted, #94a3b8); font-size: 0.74rem; line-height: 1.5; }
@media (max-width: 760px) {
  .auth-page-body #formRegister .form-row:has(#regCompanyNumber) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .auth-page-body.auth-tight .reg-type { margin-bottom: 10px; }
  .auth-page-body.auth-tight .reg-type span { padding: 7px 10px; }
  .auth-page-body.auth-tight .reg-company-note { margin-bottom: 8px; }
}
@keyframes authIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

#formRegister:not(.is-steps) :is(.reg-step-next, .reg-step-back, .reg-step-dots) { display: none !important; }
#formRegister.is-steps:not(.on-step-2) [data-reg-step="2"] { display: none !important; }
#formRegister.is-steps.on-step-2 [data-reg-step="1"] { display: none !important; }
#formRegister.is-steps > [data-reg-step="1"] { animation: regStepIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; --from: -18px; }
#formRegister.is-steps > [data-reg-step="2"] { animation: regStepIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; --from: 18px; }
@keyframes regStepIn { from { opacity: 0; transform: translateX(var(--from)); } }
.reg-step-dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 12px; }
.reg-step-dots i { width: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); transition: background-color 0.3s ease; }
#formRegister:not(.on-step-2) .reg-step-dots i:first-child, #formRegister.on-step-2 .reg-step-dots i { background: var(--gold-primary, #d4af37); }
.reg-step-back { display: block; width: 100%; margin-top: 10px; padding: 8px; border: 0; background: none; color: var(--text-muted, #94a3b8); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.reg-step-back:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .auth-card, #formRegister.is-steps > [data-reg-step] { animation: none !important; }
  .auth-tabs::before { transition: none; }
}
