body {
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.5;
    min-height: 100vh;
}

.policy-configurator {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-width: 100%;
    overflow: hidden;
}

.policy-configurator--locked .policy-configurator__content {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.policy-configurator--locked .policy-configurator__preview__button,
.policy-configurator--locked .policy-configurator__button,
.policy-configurator--locked .policy-option,
.policy-configurator--locked .policy-field__input,
.policy-configurator--locked .policy-repeater__add,
.policy-configurator--locked .policy-repeater__remove {
    cursor: default;
}

.policy-configurator__lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.policy-configurator__lock-overlay-inner {
    max-width: 600px;
    width: 100%;
    padding: 32px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.policy-configurator__lock-title {
    margin-top: 0;
}

.policy-configurator input[type="radio"]:before,
.policy-configurator input[type="checkbox"]:checked:before {
    position: relative !important;
}

.policy-configurator__header {
    padding: 23px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.policy-configurator__title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.policy-configurator__content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.policy-configurator__settings {
    flex: 0 0 45%;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.policy-configurator__settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.policy-configurator__preview {
    flex: 0 0 55%;
    background-color: #f1f5f9;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.policy-configurator__preview__actions {
    padding: 16px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.policy-configurator__preview__title-wrapper {
    flex: 1;
    min-width: 200px;
}

.policy-configurator__preview__buttons,
.policy-configurator__preview__buttons_wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.policy-configurator__preview__actions-left {
    flex: 1;
}

.policy-configurator__preview__actions-right {
    display: flex;
    gap: 12px;
}

.policy-configurator__preview__button {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.policy-configurator__preview__button--html {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.policy-configurator__preview__button--docx {
    background: #235296;
    color: white;
}

.policy-configurator__button--report {
    background: #f1f5f9;
    color: #ce000096;
    border: 1px solid #ce000096;
}

.policy-configurator__preview__button--instruction {
    text-transform: uppercase;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.policy-configurator__preview__button--html:hover {
    background: #f1f5f9;
    opacity: 0.8;
}

.policy-configurator__preview__button--docx:hover {
    background: #235296;
    opacity: 0.8;
}

.policy-configurator__button--report:hover {
    background: #f1f5f9;
    color: #ce000096;
    border: 1px solid #ce000096;
    opacity: 0.8;
}

.policy-configurator__preview__button--instruction:active,
.policy-configurator__preview__button--instruction:hover {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    opacity: 0.8;
}

.policy-configurator__preview__button-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.policy-configurator__preview__button-text {
    white-space: nowrap;
}

.policy-configurator__preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.policy-step {
    margin-bottom: 32px;
}

.policy-step__header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3b82f6;
}

.policy-step__title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.policy-step__subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 16px;
}

.policy-step__hint {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #616978;
}

.policy-step__hint ul,
.policy-step__hint ol {
    list-style-position: inside;
    padding-left: 10px;
}

.policy-configurator__header .policy-step__hint {
    width: fit-content;
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
    padding: 8px 12px;
    background-color: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #dd0000;
}

.policy-step__header .policy-step__hint {
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 4px;
    background: #f7f9fc;
    border: 1px dashed #d5dceb;
    max-width: 100%;
}

.policy-configurator__header .policy-step__title {
    margin-bottom: 4px;
}

.policy-step__header .policy-step__title {
    margin-bottom: 2px;
}

.policy-field {
    margin-bottom: 20px;
}

.policy-field__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.policy-field__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.policy-field__input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.policy-option {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.policy-option__input {
    margin-top: 5px;
    margin-right: 10px;
    flex-shrink: 0;
}

.policy-repeater__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #e3e6ef;
    border-radius: 6px;
    background: #f9fafc;
}

.policy-repeater__row_buttons {
    flex: 1 0 100%;
}

.policy-repeater__add,
.policy-repeater__remove {
    padding: 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}
.policy-repeater__add:hover,
.policy-repeater__remove:hover {
    opacity: 0.8;
}

.policy-repeater__remove {
    padding: 10px;
    background-color: #cd0101;
    color: #ffffff;
}
.policy-repeater__remove:hover {
    background-color: #cd0101;
    color: #ffffff;
}

.policy-repeater__add {
    padding: 10px;
    background-color: #3b82f6;
    color: #ffffff;
}

.policy-repeater__add:hover {
    background-color: #3b82f6;
    color: #ffffff;
}

.policy-repeater__field {
    flex: 1;
}

.policy-option__label {
    flex: 1;
    font-weight: 400;
    color: #334155;
    line-height: 1.4;
}

.policy-option__label ul {
    margin: 0;
}

.policy-option--has-children {
    width: 100%;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.policy-option__children .policy-option div {
    display: flex;
    flex: 1 1 100%;
    align-items: flex-start;
    flex-wrap: wrap;
}

.policy-option__children .policy-option .policy-repeater-wrapper {
    display: flex;
    flex: 1;
    align-items: self-end;
    flex-wrap: wrap;
}

.policy-option__children .policy-option .policy-option {
    flex-basis: 100%;
}

.policy-option__children {
    margin-top: 4px;
    margin-left: 24px;
    padding-left: 16px;
    border-left: 1px solid #e2e8f0;
    width: calc(100% - 24px);
}

.policy-option__children .policy-option {
    margin-bottom: 2px;
    margin-left: 0;
    width: 100%;
}

.policy-option__children .policy-option__label {
    font-size: 14px;
    color: #475569;
}

.policy-option__children .policy-option__input {
    margin-right: 10px;
}

.policy-field__useful {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    padding: 8px 12px;
    background-color: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.policy-field__text_orange {
    color: #da6901;
}

.policy-field__text_green {
    color: #25c000;
}

.policy-field__text_important {
    font-style: italic;
    text-decoration: underline;
}

.policy-field__useful-label {
    font-weight: 600;
}

.policy-field__useful-content {
    display: flex;
    flex-direction: column;
}

.policy-field__useful-content p {
    margin: 0;
    padding: 0;
}

.policy-option__delimiter {
    margin: 10px 0;
    color: #64748b;
}

.policy-field__comment {
    width: 100%;
    margin-top: 5px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    padding: 4px 12px;
    background-color: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #64748b8c;
}

.policy-field__comment-label {
    font-weight: 600;
}

.policy-field__comment a,
.policy-field__useful a,
.policy-option__delimiter a,
.policy-option__label a {
    color: #3b82f6;
    text-decoration: none;
}

.policy-field__comment a:hover,
.policy-field__useful a:hover,
.policy-option__delimiter a:hover,
.policy-option__label a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.policy-field__base {
    display: flex;
    gap: 4px;
    width: 100%;
    margin-top: 5x;
    font-style: italic;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.policy-field__base-label {
    font-weight: 600;
}

.policy-configurator__navigation {
    padding: 20px 24px;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.policy-configurator__button {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.policy-configurator__button--back {
    background-color: #f1f5f9;
    color: #475569;
    float: left;
}

.policy-configurator__button--back:hover {
    background-color: #e2e8f0;
}

.policy-configurator__button--next {
    background-color: #3b82f6;
    color: white;
    float: right;
}

.policy-configurator__button--next:hover {
    background-color: #2563eb;
}

.policy-configurator__finish {
    padding: 20px;
    text-align: center;
}

.policy-configurator__finish_icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #eef4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #2d8cff;
}

.policy-configurator__finish_title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.policy-configurator__finish_text {
    margin: 0;
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .policy-configurator__content {
        flex-direction: column;
    }

    .policy-configurator__settings,
    .policy-configurator__preview {
        flex: 1;
        min-height: 50vh;
    }

    .policy-configurator__settings {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .policy-configurator__preview__actions {
        padding: 14px 20px;
        gap: 10px;
    }

    .policy-configurator__preview__button {
        padding: 9px 16px;
        min-width: 140px;
        font-size: 13px;
    }

    .policy-configurator__preview__button-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    .policy-configurator {
        height: 100%;
    }

    .policy-configurator__preview__actions {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .policy-configurator__preview__title-wrapper {
        min-width: 100%;
        text-align: center;
    }

    .policy-configurator__preview__buttons,
    .policy-configurator__preview__buttons_wrapper {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .policy-configurator__preview__button {
        flex: 1;
        min-width: 0;
        max-width: 200px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .policy-configurator__preview-content {
        max-height: 60vh;
        overflow: scroll;
    }

    .policy-configurator__navigation {
        order: 1;
        border-bottom: 1px solid #e2e8f0;
    }

    .policy-configurator__settings-content {
        order: 2;
    }
}

@media (max-width: 620px) {
    .policy-configurator__preview__buttons,
    .policy-configurator__preview__buttons_wrapper {
        flex-direction: column;
    }

    .policy-configurator__preview__button {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .policy-configurator__preview__button-text {
        display: block;
    }
}