.sw-form {
    width:         100%;
    max-width:     520px;
    margin:        40px auto;
    padding:       40px 36px;
    background:    #ffffff;
    border-radius: 14px;
    box-shadow:    0 10px 30px rgba(0, 0, 0, .08);
    font-family:   system-ui, -apple-system, sans-serif;
    box-sizing:    border-box;
}

.sw-title {
    text-align:    center;
    font-size:     26px;
    font-weight:   700;
    margin-bottom: 8px;
}

.sw-subtitle {
    text-align:    center;
    font-size:     14px;
    color:         #444444;
    margin-bottom: 28px;
}

.sw-field {
    margin-bottom: 18px;
}

.sw-field label {
    display:       block;
    font-size:     13px;
    font-weight:   600;
    margin-bottom: 6px;
}

.sw-field input,
.sw-field select {
    width:         100%;
    padding:       12px 14px;
    border-radius: 10px;
    border:        1px solid #dcdcdc;
    font-size:     14px;
    background:    #fafafa;
    box-shadow:    inset 0 1px 4px rgba(0, 0, 0, .06);
    box-sizing:    border-box;
}

.sw-field input:focus,
.sw-field select:focus {
    outline:      none;
    border-color: #c21f1f;
    background:   #ffffff;
}

.sw-field.has-error input,
.sw-field.has-error select,
.sw-checkbox-wrap.has-error,
.sw-extra-group.has-error {
    border-color: #d42c2c;
    box-shadow: 0 0 0 2px rgba(212, 44, 44, .15);
}

.sw-error {
    display: block;
    color: #d42c2c;
    min-height: 16px;
    margin-top: 6px;
    font-size: 12px;
}

.sw-checkbox-wrap,
.sw-extra-group {
    display: block;
    margin: 18px 0 20px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.sw-checkbox {
    display:   flex;
    gap:       10px;
    font-size: 13px;
    cursor:    pointer;
}

.sw-inline-checkbox {
    margin-top: 8px;
}

.sw-checkbox input {
    margin-top: 3px;
}

.sw-submit {
    display:       block;
    width:         220px;
    margin:        0 auto;
    padding:       12px 0;
    border-radius: 999px;
    border:        none;
    background:    linear-gradient(90deg, #c21f1f, #ef5d5d);
    color:         #ffffff;
    font-size:     15px;
    font-weight:   700;
    cursor:        pointer;
    box-shadow:    0 6px 16px rgba(194, 31, 31, .35);
}

.sw-submit:hover {
    filter: brightness(.96);
}

.sw-result {
    margin: 0 0 16px 0;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    display: none;
}

.sw-result.success,
.sw-result.error,
.sw-result.info {
    display: block;
}

.sw-result.success {
    background: #ebf8ef;
    color: #166c2e;
}

.sw-result.error {
    background: #fdeeee;
    color: #8b1d1d;
}

.sw-result.info {
    background: #eef4ff;
    color: #1f3a7a;
}

.sw-links-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 24px;
    font-family: system-ui, -apple-system, sans-serif;
}

.sw-links-page a {
    color: #b11a1a;
}

.sw-back-link {
    display: block;
    width: fit-content;
    margin: 24px auto 0;
    color: #b11a1a;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 600;
    text-decoration: none;
}

.sw-back-link:hover {
    text-decoration: underline;
}


.sw-popup-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin: 40px auto;
    font-family: system-ui, -apple-system, sans-serif;
}

.sw-popup-action {
    min-width: 160px;
    padding: 12px 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, #c21f1f, #ef5d5d);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.sw-popup-action.secondary {
    background: #ffffff;
    color: #b11a1a;
    border: 1px solid #b11a1a;
}

.sw-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    box-sizing: border-box;
}

.sw-popup-overlay.is-open {
    display: flex;
}

.sw-popup {
    position: relative;
}

.sw-popup .sw-form {
    margin: 0;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.sw-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    z-index: 2;
}
