:root {
    --auth-component-accent: var(--accent, var(--auth-accent, #f04b23));
    --auth-component-text: var(--text, var(--auth-text, #f4f3ef));
    --auth-component-muted: var(--text-muted, var(--auth-muted, #918f88));
    --auth-component-surface: var(--surface, var(--auth-inset, #101311));
    --auth-component-border: var(--border, rgba(255, 255, 255, .14));
    --auth-component-ease-out: cubic-bezier(.23, 1, .32, 1);
}

.auth-component-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-otp {
    display: grid;
    grid-template-columns: repeat(6, minmax(40px, 48px));
    justify-content: center;
    gap: clamp(6px, 2vw, 10px);
    width: 100%;
}

.auth-otp__cell {
    width: 100% !important;
    min-width: 0;
    min-height: 48px;
    padding: 0 !important;
    border: 1px solid var(--auth-component-border) !important;
    border-radius: 10px !important;
    background: var(--auth-component-surface) !important;
    color: var(--auth-component-text) !important;
    text-align: center !important;
    font: inherit;
    font-size: 1.25rem !important;
    font-weight: 800;
    line-height: 1;
    caret-color: var(--auth-component-accent);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--auth-component-ease-out);
}

.auth-otp__cell:focus-visible {
    border-color: var(--auth-component-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-component-accent) 22%, transparent) !important;
    transform: translateY(-2px);
}

.auth-otp__cell.is-filled {
    border-color: color-mix(in srgb, var(--auth-component-accent) 58%, var(--auth-component-border)) !important;
    animation: auth-otp-fill 180ms var(--auth-component-ease-out);
}

.auth-otp--error {
    animation: auth-otp-error 220ms var(--auth-component-ease-out);
}

.auth-otp--error .auth-otp__cell {
    border-color: #ff7259 !important;
}

@keyframes auth-otp-fill {
    from { opacity: .72; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes auth-otp-error {
    0%, 100% { transform: translateX(0); }
    35% { transform: translateX(-4px); }
    70% { transform: translateX(4px); }
}

.password-strength {
    width: 100%;
    margin: 10px 0 4px;
    color: var(--auth-component-muted);
    font-size: .75rem;
}

.password-strength__summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.password-strength__caption { font-weight: 650; }
.password-strength__status { color: var(--auth-component-text); font-size: .72rem; }

.password-strength__meter {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    min-height: 44px;
    align-items: center;
}

.password-strength__segment {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--auth-component-text) 12%, transparent);
    transform-origin: left;
    transition: background-color 180ms ease, transform 180ms var(--auth-component-ease-out), opacity 180ms ease;
}

.password-strength__segment.is-active { transform: scaleY(1.5); }
.password-strength[data-score="1"] .is-active { background: #ef5b4b; }
.password-strength[data-score="2"] .is-active { background: #e98a3a; }
.password-strength[data-score="3"] .is-active { background: #d8a928; }
.password-strength[data-score="4"] .is-active { background: #68ad70; }
.password-strength[data-score="5"] .is-active { background: #35a66a; }

.password-strength__rules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 12px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.password-strength__rule {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    line-height: 1.35;
}

.password-strength__rule-mark { color: var(--auth-component-muted); font-weight: 800; }
.password-strength__rule.is-met { color: var(--auth-component-text); }
.password-strength__rule.is-met .password-strength__rule-mark { color: #45b879; }
.password-strength__rule small { color: var(--auth-component-muted); font-size: .64rem; }
.password-strength__warning { margin: 7px 0 0; color: #ee9c4f; font-weight: 650; }
.password-strength--compact .password-strength__rules { display: none; }
.password-strength--compact { margin-top: 5px; }
.password-strength--compact .password-strength__meter { min-height: 16px; }

@media (max-width: 420px) {
    .auth-otp { grid-template-columns: repeat(6, minmax(38px, 1fr)); gap: 5px; }
    .auth-otp__cell { min-height: 44px; font-size: 1.05rem !important; }
    .password-strength__rules { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-otp,
    .auth-otp__cell,
    .password-strength__segment {
        animation: none !important;
        transition-duration: 1ms !important;
    }
    .auth-otp__cell:focus-visible { transform: none; }
}
