/* ---------- 全局样式初始化 (IE7+) ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* IE8+生效，IE7 不影响但无效 */
}

:root {
    /* 颜色 */
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --primary-active: #096dd9;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #d9d9d9;
    --border-hover: #1890ff;
    --bg-color: #ffffff;
    --error-color: #ff4d4f;
    --error-bg: #fff2f0;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    
    /* 尺寸 */
    --input-height: 40px;
    --border-radius: 4px;
    --container-width: 400px;
    --container-max-width: 480px;
    --container-padding: 40px 30px 30px;
    
    /* 动画 */
    --transition-time: 0.3s;
}

#app {
    height: 100%;
}
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
}
/* 触发 hasLayout 兼容 IE7 */
.position,
.container,
.raas-form-item,
.protocol,
.auth_fun,
.auth_type,
.codebutton,
.auth-block {
    zoom: 1;
}
/* 表单通用样式 */
select,
input[type='text'],
input[type='password'],
input[type='tel'] {
    width: 100%;
    line-height: 50px;
    border-radius: 10px;
    padding: 0 20px;
    cursor: pointer;
    border: none;
    background: #fafafa;
    box-sizing: border-box;
}

select:focus,input:focus {
    outline: none;
}
button {
    cursor: pointer;
    border: none;
    background: none;
}
.raas-form-item {
    margin-top: 20px;
}
/* 认证功能区 (注册/忘记密码等) */
.auth_fun {
    display: flex;
    overflow: hidden;
    margin-bottom: 10px;
}
.auth_fun > div {
    float: left;
    cursor: pointer;
}
/* 协议复选框 */
.protocol {
    text-align: left;
    line-height: 1.4;
}
.protocol input {
    vertical-align: middle;
    margin-right: 4px;
}
.protocol label {
    vertical-align: middle;
    cursor: pointer;
}
/* 验证码按钮绝对定位 */
.codebutton {
    display: flex;
    align-items: center;
    position: relative;
}
.verify_btn {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 12px;
    height: 100%;
}
/* 通知内容的文本域 */
.notice_co_text {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    resize: none;
    line-height: 2;
    font-family: inherit;
}
.notice_co_text:focus {
    outline: none;
}
/* 语言按钮 */
.language {
    position: absolute;
    cursor: pointer;
    z-index: 10;
}
/* 其他认证方式分割线 (兼容IE7使用伪元素) */
.other-auth {
    position: relative;
    text-align: center;
    padding: 0 20px;
}
.other-auth::before,
.other-auth::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: currentColor;
}
.other-auth::before {
    left: 0;
}

.other-auth::after {
    right: 0;
}
/* 认证方式列表 (水平排列) */
.auth_type {
    display: flex;
    flex-wrap: wrap;
}
.auth_type .auth-type-item {
    cursor: pointer;
}
.auth_type div {
    margin: 8px 0;
}
.auth_type div i {
    width: 16px;
    vertical-align: middle;
    margin-right: 3px;
}
/* 主容器 */
.container {
    max-width: 370px;
    box-shadow: 3px 0px 15px white inset;
    text-align: center;
}

/* 手机端：左边距强制为 0 */
@media (max-width: 768px) {
    .container {
        margin-left: 0 !important;  /* 强制左边距为 0 */
    }

    .position {
        padding-top: 20px;
        flex-direction: column;
        justify-content: flex-start!important;
    }

    /* PC端通知区域隐藏 */
    .notice-pc {
        display: none !important;
    }

    /* 移动端通知区域 */
    .notice-phone {
        width: 100%;
        max-width: 370px;
        text-align: left;
        padding: 20px;
    }

    .notice-phone .notice_ti,
    .notice-phone .notice_co_text {
        font-family: inherit;
        color: #fff;
    }
}

.auth_sumit {
    transition: all 0.3s;
    width: 100%;
    text-align: center;
}
.position {
    display: flex;
    overflow: auto;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
}

/* 认证模块默认隐藏，通过 JS 动态显示 */
.auth-block {
    display: none;
}
.auth-block.active {
    display: block;
}
/* 清除浮动 */
.clearfix {
    zoom: 1;
}
.clearfix:after {
    content: '.';
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

.paui-form-item {
    display: flex;
    margin-bottom: 20px;
    text-align: left;
}
.paui-auth-message {
    margin-bottom: 20px;
}

.paui-hide {
    display: none !important;
}

:root {
    --input-height: 40px;
    --border-radius: 4px;
    --error-color: #ff4d4f;
    --error-bg: #fff2f0;
    --success-color: #52c41a;
    --warning-color: #faad14;
}

.paui-message-text {
    width: 100%;
    line-height: var(--input-height);
    text-align: center;
    background-color: var(--error-bg);
    color: var(--error-color);
    border: 1px solid #ffccc7;
    border-radius: var(--border-radius);
    font-size: 13px;
    white-space: pre-wrap;
}

/* ==================== 自定义下拉选择器 ==================== */
.paui-custom-select {
    position: relative;
    width: 140px;
    flex-shrink: 0;
}

/* 选择器触发器 */
.paui-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 10px;
    cursor: pointer;
    transition: all var(--transition-time);
}

.paui-select-trigger:hover {
    border-color: var(--primary-hover);
}

.paui-custom-select.open .paui-select-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.paui-selected-value {
    /* flex: 1; */
    font-size: 13px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.paui-select-arrow {
    margin-left: 8px;
    font-size: 10px;
    color: var(--text-light);
    transition: transform 0.3s;
}

.paui-custom-select.open .paui-select-arrow {
    transform: rotate(180deg);
}

/* 下拉容器 - 宽度是选择器的2倍 */
.paui-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 180px; /* 下拉容器宽度的2倍 */
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px var(--shadow-hover);
    z-index: 1000;
    max-height: 320px;
    overflow: hidden;
    text-align: left;
}

.paui-custom-select.open .paui-select-dropdown {
    display: block;
}

/* 搜索框 */
.paui-select-search {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.paui-search-input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: all var(--transition-time);
}

.paui-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 选项列表容器 */
.paui-select-options {
    max-height: 270px;
    overflow-y: auto;
}

/* 滚动条样式 */
.paui-select-options::-webkit-scrollbar {
    width: 6px;
}

.paui-select-options::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

.paui-select-options::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.paui-select-options::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

/* 选项组 */
.paui-optgroup {
    margin-bottom: 4px;
}

.paui-optgroup:last-child {
    margin-bottom: 0;
}

.paui-optgroup-label {
    padding: 8px 12px 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

/* 选项 */
.paui-option {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.paui-option:hover {
    background-color: rgba(24, 144, 255, 0.08);
}

.paui-option.selected {
    background-color: rgba(24, 144, 255, 0.15);
    color: var(--primary-color);
    font-weight: 500;
}

/* ==================== 全局蒙版样式 ==================== */
.paui-auth-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paui-auth-mask.paui-hide {
    display: none;
}

.paui-auth-mask-content {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
}

.paui-auth-mask-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.paui-auth-mask-text {
    font-size: 14px;
    color: #333;
}

/* ==================== 加载状态样式 ==================== */
.paui-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.paui-loading-state::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #f3f3f3;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn {
  margin-bottom: 0;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  touch-action: manipulation;
  user-select: none;
  line-height: 13px;
  display: inline-block;
  border-radius: 4px;
  color: #fff;
  border: 1px solid #0159a3;
  background-color: #0159a3;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 24px;
  cursor: pointer;
}
#disclare {
  padding: 30px 50px;
}

/* ==================== 代拨账号选择弹窗样式 ==================== */
.paui-proxy-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    animation: fadeIn 0.3s ease-out;
}

.paui-proxy-dialog {
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.paui-proxy-dialog-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e8e8e8;
}

.paui-proxy-dialog-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.paui-proxy-dialog-body {
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
    max-height: 50vh;
}

.paui-proxy-account-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.paui-proxy-account-item {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.paui-proxy-account-item:hover {
    border-color: #1890ff;
    background-color: rgba(24, 144, 255, 0.04);
}

.paui-proxy-account-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    margin: 0;
}

.paui-proxy-account-item input[type="radio"] {
    width: auto;
    margin-right: 10px;
}

.paui-proxy-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.paui-proxy-account-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.paui-proxy-account-info {
    display: flex;
    gap: 6px;
    font-size: 12px;
    color: #999;
}

.paui-proxy-isp {
    padding: 1px 6px;
    background-color: #f5f5f5;
    border-radius: 2px;
}

.paui-proxy-status-current {
    color: #1890ff;
    padding: 1px 6px;
    background-color: rgba(24, 144, 255, 0.1);
    border-radius: 2px;
}

.paui-proxy-item-current {
    border-color: #1890ff;
    background-color: rgba(24, 144, 255, 0.05);
}

.paui-proxy-item-current .paui-proxy-account-name {
    color: #1890ff;
}

.paui-proxy-dialog-footer {
    padding: 12px 16px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.paui-proxy-dialog-footer .paui-btn {
    width: auto;
    padding: 6px 18px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.paui-btn-cancel {
    background-color: transparent;
    color: #666;
    border: 1px solid #d9d9d9;
}

.paui-btn-cancel:hover {
    border-color: #999;
    color: #333;
}

.paui-btn-primary {
    background-color: #1890ff;
    color: white;
    border: 1px solid #1890ff;
}

.paui-btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* ==================== 动画定义 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 480px) {
    .paui-proxy-dialog {
        width: calc(100vw - 20px);
        margin: 10px;
    }

    .paui-proxy-dialog-header,
    .paui-proxy-dialog-body,
    .paui-proxy-dialog-footer {
        padding: 10px 12px;
    }
}
