.step-progress {
    margin-bottom: 30px;
}

.step-item {
    display: inline-block;
    width: 32%;
    text-align: center;
    position: relative;
}

.step-item::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #ddd;
    z-index: -1;
}

.step-item:last-child::after {
    display: none;
}

.step-number {
    display: inline-block;
    width: 26px;
    height: 26px;
    line-height: 26px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    margin-bottom: 5px;
}

.step-active .step-number {
    background: #31708f;
}

.step-done .step-number {
    background: #5cb85c;
}

.step-done .step-number::after {
    content: '\2713';
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.required {
    color: #a94442;
}

.collapse-box {
    margin-top: 10px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    display: none;
}

.btn-group {
    margin-top: 30px;
}

.radio-inline {
    margin-right: 20px;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    text-align: center;
}

.loading-overlay .spinner-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px 50px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.loading-overlay .spinner-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: #337ab7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ================================================================
   Bootstrap自定义下拉选择组件 (bs-dropdown) - 替代Select2
   视觉样式�?.form-control 输入框保持完全一�?   ================================================================ */
.bs-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.bs-dropdown-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    height: 34px;
    padding: 6px 30px 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    overflow: hidden;
    white-space: nowrap;
}

.bs-dropdown-toggle .caret {
    position: absolute;
    top: 50%;
    right: 12px;
    margin-top: -2px;
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #555;
}

.bs-dropdown.open .bs-dropdown-toggle .caret {
    border-top-color: transparent;
    border-bottom: 4px solid #555;
    margin-top: -4px;
}

.bs-dropdown-toggle:hover {
    border-color: #adadad;
}

.bs-dropdown.open .bs-dropdown-toggle,
.bs-dropdown-toggle:focus {
    border-color: #66afe9;
    outline: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

.bs-dropdown-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bs-dropdown-text.placeholder {
    color: #999;
}

.bs-flag-icon {
    display: none;
    width: 20px;
    height: 14px;
    margin-right: 6px;
    vertical-align: middle;
    object-fit: cover;
    border-radius: 1px;
    background: #e8e8e8;
    -webkit-box-shadow: 0 0 0 1px rgba(0,0,0,.1);
    box-shadow: 0 0 0 1px rgba(0,0,0,.1);
    position: relative;
    top: -1px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    opacity: 0;
    -webkit-transition: opacity .15s ease-in;
    transition: opacity .15s ease-in;
}

.bs-dropdown-toggle .bs-flag-icon.show {
    display: inline-block;
    opacity: 1;
}

.bs-dropdown-list li .bs-flag-icon {
    display: inline-block;
    opacity: 1;
    top: -1px;
}

.bs-dropdown-list li.selected .bs-flag-icon {
    -webkit-box-shadow: 0 0 0 1px rgba(255,255,255,.5);
    box-shadow: 0 0 0 1px rgba(255,255,255,.5);
}

.bs-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    min-width: 100%;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 4px;
    -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
    margin-top: 2px;
    padding: 0;
}

.bs-dropdown.open > .bs-dropdown-menu,
.bs-dropdown.open .bs-dropdown-menu {
    display: block;
}

.bs-dropdown-search {
    padding: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.bs-dropdown-search input {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
}

.bs-dropdown-search input:focus {
    border-color: #66afe9;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 4px rgba(102,175,233,.4);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 4px rgba(102,175,233,.4);
}

.bs-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 5px 0;
    max-height: 220px;
    overflow-y: auto;
}

.bs-dropdown-list li {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bs-dropdown-list li:hover,
.bs-dropdown-list li.hover {
    background-color: #f5f5f5;
    color: #333;
}

.bs-dropdown-list li.selected {
    background-color: #337ab7;
    color: #fff;
}

.bs-dropdown-list li.no-result {
    color: #999;
    cursor: default;
    text-align: center;
    padding: 10px 12px;
}

.bs-dropdown-list li.no-result:hover {
    background-color: transparent;
    color: #999;
}

/* mobile-row弹性布局 - 区号下拉与手机号同行 */
.mobile-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: stretch;
    align-items: stretch;
}

.mobile-row .bs-dropdown {
    -webkit-flex: 0 0 160px;
    -ms-flex: 0 0 160px;
    flex: 0 0 160px;
    width: 160px;
    min-width: 140px;
}

/* 移动端原生select（跳过自定义下拉时）宽度约束 */
.mobile-row select.form-control {
    -webkit-flex: 0 0 105px;
    -ms-flex: 0 0 105px;
    flex: 0 0 105px;
    width: 105px;
    min-width: 90px;
}

.mobile-row .bs-dropdown-toggle {
    border-radius: 4px 0 0 4px;
    border-right: 0;
}

.mobile-row .bs-dropdown.open .bs-dropdown-toggle {
    border-right: 1px solid #66afe9;
}

.mobile-row input.form-control {
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border-radius: 0 4px 4px 0;
}

.mobile-row .input-clear-wrap {
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
}

.mobile-row .input-clear-wrap input.form-control {
    width: 100%;
    border-radius: 0 4px 4px 0;
}

/* write-type-row弹性布局 - 代写类型下拉与需求类型radio同行 */
.write-type-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.write-type-row .bs-dropdown {
    -webkit-flex: 0 0 200px;
    -ms-flex: 0 0 200px;
    flex: 0 0 200px;
    width: 200px;
    min-width: 160px;
}

.write-type-row .write-type-radios {
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    padding-left: 15px;
    white-space: nowrap;
}

/* 响应�?- 移动端全宽下拉菜�?*/
@media (max-width: 767px) {
    .bs-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        margin-top: 0;
        max-height: 50vh;
        z-index: 1100;
    }

    .bs-dropdown-list {
        max-height: 35vh;
    }

    .bs-dropdown-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,.4);
        z-index: 1099;
    }
}

@media (min-width: 768px) {
    .bs-dropdown-backdrop {
        display: none;
    }
    .write-type-row .write-type-radios {
        white-space: nowrap;
    }
}

.loading-overlay .spinner-text {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
}

input[type="date"] {
    position: relative;
    height: 42px;
    font-size: 16px;
    padding: 6px 12px;
    cursor: pointer;
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}
.modal-overlay.show { display: block; }
.modal-dialog-box {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 460px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: modalIn 0.25s ease-out;
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
}
@keyframes modalIn {
    from { transform: translate(-50%, -30px); opacity: 0; }
    to { transform: translateX(-50%); opacity: 1; }
}
.modal-header-bar {
    padding: 16px 20px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.modal-close-btn {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.modal-close-btn:hover { color: #333; }
.modal-body-content {
    padding: 20px;
    font-size: 15px;
    color: #555;
    line-height: 1.8;
}
.modal-footer-bar {
    padding: 10px 20px 16px;
    text-align: center;
}
.modal-footer-bar .btn {
    min-width: 100px;
    font-size: 15px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    color: transparent;
    background: transparent;
    cursor: pointer;
}

/* ================================================================
   逐字段清除按�?(input-clear-btn)
   ================================================================ */
.input-clear-wrap {
    position: relative;
    display: block;
}

.input-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    border-radius: 50%;
    display: none;
    z-index: 3;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-transition: color .15s, background .15s;
    transition: color .15s, background .15s;
}

.input-clear-btn:hover {
    color: #fff;
    background: #999;
}

.input-clear-btn.visible {
    display: block;
}

/* textarea清除按钮靠右�?*/
textarea + .input-clear-btn,
.input-clear-wrap textarea ~ .input-clear-btn {
    top: 12px;
    -webkit-transform: none;
    -ms-transform: none;
    transform: none;
}

/* input-group内清除按�?*/
.input-group {
    position: relative;
}
.input-group .input-clear-btn {
    right: 56px;
}

/* bs-dropdown清除按钮 */
.bs-dropdown .bs-clear-btn {
    display: none;
    position: absolute;
    right: 28px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    border-radius: 50%;
    z-index: 2;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-transition: color .15s, background .15s;
    transition: color .15s, background .15s;
}

.bs-dropdown .bs-clear-btn:hover {
    color: #fff;
    background: #999;
}

.bs-dropdown .bs-clear-btn.visible {
    display: block;
}