.stco-auth-shell {
    --stco-blue: #0052ff;
    --stco-dark: #020617;
    --stco-bg: #f5f7fd;
    --stco-border: #dfe5f0;
    --stco-muted: #64748b;
    --stco-danger: #b42318;
    --stco-success: #067647;
    width: 100%;
    box-sizing: border-box;
    padding: 48px 18px;
    color: var(--stco-dark);
}

.stco-auth-shell:not(.stco-auth-shell-combined) {
    display: flex;
    justify-content: center;
}

.stco-auth-card {
    width: min(100%, 540px);
    background: #fff;
    border: 1px solid var(--stco-border);
    border-radius: 22px;
    padding: clamp(24px, 5vw, 42px);
    box-shadow: 0 18px 50px rgba(2, 6, 23, .08);
    box-sizing: border-box;
}

.stco-auth-card-single { margin: 0 auto; }

.stco-auth-combined {
    width: min(100%, 540px);
    margin: 0 auto;
    display: block;
}

.stco-auth-panel {
    width: 100%;
}

.stco-auth-panel[hidden] {
    display: none !important;
}

.stco-auth-heading { margin-bottom: 28px; }
.stco-auth-heading h2 { margin: 6px 0 10px; font-size: clamp(26px, 4vw, 34px); line-height: 1.12; color: var(--stco-dark); }
.stco-auth-heading p { margin: 0; color: var(--stco-muted); line-height: 1.65; }
.stco-kicker { color: var(--stco-blue); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

.stco-auth-form,
.stco-verify-form { display: grid; gap: 14px; }

.stco-auth-form > label:not(.stco-check-row):not(.stco-terms-row) { font-weight: 650; font-size: 14px; }
.stco-auth-form > input[type="text"],
.stco-auth-form > input[type="email"],
.stco-auth-form > input[type="password"] {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 16px;
    background: #fff;
    color: var(--stco-dark);
    box-sizing: border-box;
}

.stco-auth-form > input:focus,
.stco-code-box:focus {
    outline: 3px solid rgba(0, 82, 255, .14);
    border-color: var(--stco-blue);
}

.stco-check-row,
.stco-terms-row {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

.stco-check-row input,
.stco-terms-row input { margin-top: 3px; flex: 0 0 auto; }
.stco-terms-row a { color: var(--stco-blue); font-weight: 650; }
.stco-field-help { margin: -7px 0 1px; color: var(--stco-muted); font-size: 12.5px; line-height: 1.5; }

.stco-primary-button,
.stco-secondary-button {
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    box-sizing: border-box;
}

.stco-primary-button { background: var(--stco-blue); color: #fff !important; }
.stco-primary-button:hover { filter: brightness(.96); }
.stco-primary-button:disabled { opacity: .45; cursor: not-allowed; }
.stco-secondary-button { background: var(--stco-dark); color: #fff !important; }
.stco-button-link { width: 100%; }

.stco-auth-links,
.stco-verification-actions {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.stco-auth-links a,
.stco-verification-actions a,
.stco-text-button {
    color: var(--stco-blue);
    font-weight: 650;
    font-size: 14px;
    text-decoration: none;
}

.stco-text-button {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.stco-code-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: clamp(4px, 1.4vw, 8px);
    width: 100%;
    max-width: 448px;
    margin: 4px auto 8px;
}

.stco-code-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-width: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    text-align: center;
    font-size: clamp(20px, 5vw, 28px);
    line-height: 1;
    font-weight: 750;
    text-transform: uppercase;
    padding: 0;
    box-sizing: border-box;
}

.stco-attempts { text-align: center; color: var(--stco-muted); font-size: 13px; margin-bottom: 2px; }
.stco-verification-terms { margin: 4px 0; padding: 14px; background: var(--stco-bg); border: 1px solid var(--stco-border); border-radius: 10px; }

.stco-notice,
.stco-locked-panel {
    border-radius: 12px;
    padding: 13px 15px;
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
}

.stco-auth-shell-combined > .stco-notice { width: min(100%, 540px); margin: 0 auto 20px; box-sizing: border-box; }
.stco-notice-error { background: #fff4f2; color: var(--stco-danger); border: 1px solid #ffd5cf; }
.stco-notice-success { background: #ecfdf3; color: var(--stco-success); border: 1px solid #abefc6; }
.stco-locked-panel { background: var(--stco-bg); border: 1px solid var(--stco-border); }
.stco-locked-panel strong { display: block; font-size: 18px; margin-bottom: 5px; }
.stco-locked-panel p { color: var(--stco-muted); margin: 0 0 16px; }

.stco-external-terms { margin: 14px 0; }
.stco-external-terms .stco-terms-row { font-weight: 400; }

@media (max-width: 420px) {
    .stco-auth-shell { padding-inline: 10px; }
    .stco-auth-card { padding-inline: 18px; border-radius: 16px; }
    .stco-code-grid { gap: 4px; }
    .stco-code-box { border-radius: 7px; }
}

.stco-auth-form input[readonly] {
    background: var(--stco-bg);
    color: #475569;
    cursor: default;
}

.stco-password-wrap {
    position: relative;
}

.stco-password-wrap > input[type="password"],
.stco-password-wrap > input[type="text"] {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 72px 0 14px;
    font-size: 16px;
    background: #fff;
    color: var(--stco-dark);
    box-sizing: border-box;
}

.stco-password-wrap > input:focus {
    outline: 3px solid rgba(0, 82, 255, .14);
    border-color: var(--stco-blue);
}

.stco-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 7px;
    background: var(--stco-bg);
    color: var(--stco-dark);
    padding: 7px 10px;
    font-weight: 650;
    cursor: pointer;
}

.stco-password-strength {
    display: grid;
    gap: 7px;
    color: var(--stco-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.stco-password-strength-bar {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.stco-password-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #94a3b8;
    transition: width .18s ease, background-color .18s ease;
}

.stco-password-strength-bar span[data-strength="2"] { background: #d97706; }
.stco-password-strength-bar span[data-strength="3"] { background: #16803c; }
.stco-password-strength-bar span[data-strength="4"] { background: #067647; }

/* Verification submit state: prevents duplicate OTP submissions and gives immediate feedback. */
.stco-verify-form { position: relative; }

.stco-verify-form.stco-is-submitting > :not(.stco-submit-overlay) {
    filter: blur(2px);
    opacity: .5;
    pointer-events: none;
    user-select: none;
    transition: filter .16s ease, opacity .16s ease;
}

.stco-submit-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .58);
    color: var(--stco-dark);
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, visibility .16s ease;
}

.stco-verify-form.stco-is-submitting .stco-submit-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.stco-submit-spinner {
    width: 34px;
    height: 34px;
    border: 4px solid rgba(0, 82, 255, .18);
    border-top-color: var(--stco-blue);
    border-radius: 50%;
    box-sizing: border-box;
    animation: stco-authinvite-spin .72s linear infinite;
}

.stco-submit-message {
    font-size: 14px;
    letter-spacing: .01em;
}

@keyframes stco-authinvite-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .stco-submit-spinner {
        animation-duration: 1.4s;
    }
}
