/* 习惯设置页面主容器 */
.ps-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 0;
    margin-top: 10px;
}

/* 广告位 */
.ps-main #ad_20 {
    margin-bottom: 20px;
}

/* 两栏布局 */
.ps-container {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    min-height: 600px;
    overflow: hidden;
}

/* 左侧导航 */
.ps-sidebar {
    width: 200px;
    border-right: 1px solid #e8e8e8;
    padding: 20px 0;
    flex-shrink: 0;
    background: #fafafa;
}

.ps-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 0 20px 12px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 8px;
}

.ps-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ps-nav a {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.ps-nav a:hover {
    color: #1890ff;
    background: #f0f0f0;
}

.ps-nav a.active {
    color: #1890ff;
    background: #e6f7ff;
    border-left-color: #1890ff;
}

/* 右侧内容 */
.ps-content {
    position: relative;
    flex: 1;
    padding: 24px 32px 32px;
    min-width: 0;
}

/* 面板 */
.ps-panel {
    display: none;
}

.ps-panel.active {
    display: block;
}

.ps-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e8e8;
}

/* 设置行 */
.ps-row {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ps-row:last-of-type {
    border-bottom: none;
}

.ps-label {
    width: 160px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    padding-top: 6px;
    flex-shrink: 0;
}

.ps-control {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ps-control-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* 单选框 */
.ps-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    margin-right: 8px;
}

.ps-radio input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

/* 复选框 */
.ps-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    margin-right: 8px;
}

.ps-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* 输入框 */
.ps-input {
    height: 32px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all 0.2s;
    min-width: 200px;
}

.ps-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.ps-input::placeholder {
    color: #bfbfbf;
}

.ps-input.wide {
    min-width: 320px;
}

.ps-input.small {
    min-width: 120px;
    width: 120px;
}

.ps-input:disabled {
    background-color: #f5f5f5;
    border-color: #d9d9d9;
    color: #999;
    cursor: not-allowed;
}

/* 下拉选择框 */
.ps-select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    outline: none;
    background: #fff;
    min-width: 200px;
    cursor: pointer;
}

.ps-select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 标签组 */
.ps-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ps-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 4px;
    font-size: 13px;
    color: #1890ff;
    cursor: default;
}

.ps-tag-close {
    cursor: pointer;
    font-style: normal;
    font-size: 16px;
    line-height: 1;
    color: #1890ff;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.ps-tag-close:hover {
    opacity: 1;
}

/* 链接按钮 */
.ps-btn-link {
    padding: 0;
    border: none;
    background: none;
    font-size: 14px;
    color: #1890ff;
    cursor: pointer;
    text-decoration: none;
}

.ps-btn-link:hover {
    text-decoration: underline;
}

/* 底部操作栏 */
.ps-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding: 16px 24px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
}

.ps-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #fa8c16;
}

.ps-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fa8c16;
    display: inline-block;
    animation: psPulse 2s infinite;
}

@keyframes psPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.ps-actions {
    display: flex;
    gap: 12px;
}

.ps-btn-reset {
    padding: 8px 20px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.ps-btn-reset:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.ps-btn-save {
    padding: 8px 24px;
    border: none;
    background: #1890ff;
    border-radius: 4px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.ps-btn-save:hover {
    background: #40a9ff;
}

/* ==========================
   节点选择器 isolated-multi-select
   ========================== */
.ps-node-select {
    width: 100%;
    max-width: 420px;
    position: relative;
    font-family: inherit;
}

.ps-node-select .ims-trigger {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    background-color: #fff;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 36px;
}

.ps-node-select .ims-trigger:hover {
    border-color: #1890ff;
}

.ps-node-select .ims-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    flex: 1;
    margin: 0;
    padding: 0;
}

.ps-node-select .ims-placeholder {
    color: #bfbfbf;
    flex-grow: 1;
    margin: 0;
    font-size: 14px;
}

.ps-node-select .ims-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #999;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.ps-node-select .ims-options {
    position: absolute;
    width: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    margin-top: 4px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.3s ease;
    z-index: 9999;
    padding: 0;
    list-style: none;
}

.ps-node-select .ims-option {
    padding: 8px 12px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #555;
}

.ps-node-select .ims-option:hover {
    background-color: #f0f0ff;
    border-left-color: #1890ff;
}

.ps-node-select .ims-option.selected {
    background-color: #e6f7ff;
    border-left-color: #1890ff;
    color: #1890ff;
}

.ps-node-select .ims-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #1890ff;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    cursor: default;
}

.ps-node-select .ims-tag-close {
    cursor: pointer;
    font-style: normal;
    font-size: 14px;
    line-height: 1;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.ps-node-select .ims-tag-close:hover {
    opacity: 1;
}

.ps-node-select.open .ims-arrow {
    transform: rotate(180deg);
}

.ps-node-select.open .ims-options {
    max-height: 300px;
}

/* 微信扫码登录弹窗 */
.wx-login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.wx-login-modal {
    background: #fff;
    border-radius: 8px;
    width: 360px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.wx-login-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.wx-login-header p {
    font-size: 14px;
    color: #999;
    margin: 0 0 24px;
}

.wx-login-qrcode {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.wx-login-qrcode img {
    width: 100%;
    height: 100%;
    display: block;
}

.wx-qrcode-expired {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.wx-qrcode-expired span {
    font-size: 14px;
    color: #666;
}

.wx-qrcode-refresh {
    padding: 6px 16px;
    border: none;
    background: #1890ff;
    border-radius: 4px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
}

.wx-qrcode-refresh:hover {
    background: #40a9ff;
}

/* 校验错误 */
.ps-input-error {
    border-color: #f56c6c !important;
    box-shadow: 0 0 0 2px rgba(245, 108, 108, 0.2) !important;
}

.ps-error-msg {
    color: #f56c6c;
    font-size: 11px;
    flex-basis: 100%;
    /* margin-top: 4px; */
}

/* 响应式 */
@media (max-width: 768px) {
    .ps-container {
        flex-direction: column;
    }

    .ps-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }

    .ps-label {
        width: 100%;
        margin-bottom: 8px;
    }

    .ps-row {
        flex-direction: column;
    }

    .ps-node-select {
        max-width: 100%;
    }
}
