.space-protection-card {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(34, 49, 82, 0.10);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.space-protection-card.is-locked {
    background: rgba(255, 255, 255, 0.46);
}

.space-protection-heading,
.space-protection-toggle-row,
.space-protection-copy-row,
.space-password-actions {
    display: flex;
    align-items: center;
}

.space-protection-heading {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.space-protection-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #223152;
    font-weight: 800;
}

.space-protection-title i {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(248, 209, 118, 0.32);
}

.space-protection-pro-badge {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(34, 49, 82, 0.08);
    color: #223152;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.10em;
}

.space-protection-toggle-row {
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
}

.space-protection-toggle-row > span:first-child {
    min-width: 0;
}

.space-protection-toggle-row strong {
    display: block;
    color: #223152;
    font-size: 14px;
}

.space-protection-toggle-row small,
.space-protection-copy {
    display: block;
    margin-top: 3px;
    color: #6d7890;
    font-size: 12px;
    line-height: 1.45;
}

.space-protection-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
}

.space-protection-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.space-protection-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(34, 49, 82, 0.16);
    transition: 160ms ease;
}

.space-protection-switch span::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(34, 49, 82, 0.20);
    transition: 160ms ease;
}

.space-protection-switch input:checked + span {
    background: #223152;
}

.space-protection-switch input:checked + span::after {
    transform: translateX(18px);
}

.space-protection-switch input:disabled + span {
    opacity: 0.52;
}

.space-protection-copy-row {
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.space-protection-upgrade {
    flex: 0 0 auto;
    color: #223152;
    font-weight: 800;
    font-size: 12px;
    text-decoration: none;
}

.space-protection-upgrade:hover {
    text-decoration: underline;
}

.space-protection-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.space-protection-fields .field-group {
    margin: 0;
}

.space-protection-note {
    grid-column: 1 / -1;
    color: #6d7890;
    font-size: 11px;
    line-height: 1.45;
}

.space-password-gate {
    padding: 22px;
    border: 1px solid rgba(34, 49, 82, 0.10);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.74);
    text-align: left;
}

.space-password-gate-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 16px;
}

.space-password-gate-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(248, 209, 118, 0.55), rgba(255, 255, 255, 0.82));
    color: #223152;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.space-password-gate h2 {
    margin: 2px 0 4px;
    color: #223152;
    font-size: clamp(20px, 2vw, 26px);
}

.space-password-gate p {
    margin: 0;
    color: #6d7890;
    line-height: 1.5;
}

.space-password-field {
    display: grid;
    gap: 7px;
}

.space-password-field label {
    color: #223152;
    font-size: 12px;
    font-weight: 800;
}

.space-password-field input,
.space-protection-fields input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(34, 49, 82, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.90);
    color: #223152;
    outline: none;
}

.space-password-field input:focus,
.space-protection-fields input:focus {
    border-color: rgba(34, 49, 82, 0.42);
    box-shadow: 0 0 0 3px rgba(248, 209, 118, 0.20);
}

.space-password-actions {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 12px;
}

.space-password-error {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(183, 55, 55, 0.08);
    color: #a33434;
    font-size: 12px;
    font-weight: 700;
}

.space-password-gate .section-kicker {
    margin-bottom: 0;
}

.account-status-lock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #5f6a82;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 680px) {
    .space-protection-fields {
        grid-template-columns: 1fr;
    }

    .space-password-gate {
        padding: 18px;
    }

    .space-protection-copy-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
