/* 全局样式 - WumAdmin JS版本 */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

#app {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 应用加载状态 */
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: #86909c;
}

.app-loading p {
    margin-top: 16px;
    font-size: 14px;
}

/* 需要撑满屏幕的页面添加 .full-height 类 */
#app.full-height {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#app.full-height > .arco-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0 !important;
}

#app.full-height > .arco-card > .arco-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Arco Design 卡片样式优化 */
.arco-card {
    margin-bottom: 16px;
    transition: none !important;
    border: 1px solid var(--color-border-2, #e5e6eb) !important;
    border-radius: 0 !important;
}

.arco-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.arco-card-header {
    padding: 12px 16px !important;
}

.arco-card-body {
    padding: 16px 16px 16px 16px !important;
}

/* 表格卡片特殊处理 */
.arco-card-body:has(.arco-table) {
    padding: 12px 16px 12px 16px !important;
}

.arco-card-body:has(.arco-table) > .arco-table {
    margin-top: 0;
}

/* 统计卡片样式 */
.stat-card {
    border-radius: 0 !important;
    border: 1px solid var(--color-border-2, #e5e6eb) !important;
    background: #fff !important;
    transition: none !important;
}

.stat-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--color-border-2, #e5e6eb) !important;
}

.stat-card .arco-card-body {
    padding: 8px 14px 8px !important;
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 14px;
    color: var(--color-text-2, #4e5969);
    font-weight: 400;
    padding-left: 10px;
    border-left: 3px solid #165dff;
    line-height: 1;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--color-text-3, #86909c);
    background: var(--color-fill-2, #f7f8fa);
}

.stat-value {
    font-size: 30px;
    font-weight: 500;
    color: var(--color-text-1, #1d2129);
    margin-bottom: 16px;
    line-height: 1;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-2, #e5e6eb);
}

.stat-footer {
    display: flex;
    margin-top: -10px;
    gap: 16px;
    font-size: 13px;
}

.stat-link {
    color: var(--color-text-3, #86909c);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
}

.stat-link:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background-color: var(--color-border-2, #e5e6eb);
}

.stat-link:hover {
    color: var(--color-text-2, #4e5969);
}

/* 表格样式优化 */
#app .arco-table-td, #app .arco-table-th {
    padding: 2px !important;
    line-height: 1.5 !important;
}

#app .arco-table-tr {
    height: auto !important;
}

#app .arco-table-cell {
    padding: 4px 3px !important;
}

.arco-tag {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    font-weight: normal !important;
}

/* 分页器样式 */
.arco-table-pagination {
    margin-top: 12px !important;
}

.arco-pagination {
    font-size: 13px !important;
}

.arco-pagination-item {
    min-width: 28px !important;
    height: 28px !important;
    line-height: 26px !important;
    font-size: 13px !important;
}

.arco-pagination-item-ellipsis {
    font-size: 12px !important;
}

.arco-pagination-total {
    font-size: 13px !important;
}

.arco-pagination-list {
    gap: 4px !important;
}

.arco-pagination-item + .arco-pagination-item {
    margin-left: 0 !important;
}

/* 侧边栏菜单禁止文本选中 */
.arco-layout-sider,
.arco-menu,
.arco-menu-item,
.arco-sub-menu,
.arco-sub-menu-title,
.arco-menu-inner {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* 标签页样式 */
.tab-item {
    transition: background-color 0.2s, color 0.2s;
    color: #4e5969;
    font-size: 13px;
}

.tab-item:hover {
    background-color: #f7f8fa;
}

.tab-item.active {
    background-color: #e8f3ff;
    color: #165dff;
    font-weight: 500;
}

.tab-control-btn {
    width: 32px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
    z-index: 10;
    box-sizing: border-box;
}

.tab-control-btn:hover {
    background-color: #f7f8fa;
}

.tab-control-btn i {
    font-size: 14px;
    color: #4e5969;
    line-height: 1;
}

/* 隐藏标签页容器的滚动条 */
.tabs-scroll-container::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.tabs-scroll-container {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* 登录页样式 */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.login-header {
    background: #fff;
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid #f5f5f5;
}

.login-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d2129;
}

.login-header .subtitle {
    color: #4e5969;
    font-size: 14px;
    margin-bottom: 0;
}

.login-body {
    padding: 30px 32px 16px 32px;
}

.login-footer {
    text-align: center;
    padding: 16px 32px 16px;
    color: #86909c;
    font-size: 13px;
    border-top: 1px solid #f5f5f5;
}

.form-item-spacing {
    margin-bottom: 16px;
}

.register-link {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f5f5f5;
}

.register-link a {
    color: #165dff;
    text-decoration: none;
    font-size: 14px;
}

.register-link a:hover {
    color: #0a53be;
}

/* 确保Message组件可见 */
.arco-message-wrapper {
    z-index: 9999 !important;
    position: fixed !important;
}

.arco-message {
    z-index: 9999 !important;
    position: fixed !important;
}

/* 页面内容区域 */
.page-content {
    padding: 16px;
    min-height: calc(100vh - 60px);
}

/* 搜索面板样式 */
.search-panel {
    z-index: 1000 !important;
}

.search-panel .arco-select,
.search-panel .arco-select-view {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 !important;
}

/* 确保卡片头部可以显示下拉内容 */
.arco-card-header {
    overflow: visible !important;
}

.arco-card-header-extra {
    overflow: visible !important;
}

.arco-space {
    overflow: visible !important;
}

/* 订单详情列表样式 */
.detail-list {
    padding: 0 16px 16px;
}

.detail-item {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.5;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #86909c;
    flex-shrink: 0;
}

.detail-value {
    color: #1d2129;
    word-break: break-all;
}

/* 用户信息页样式 */
.user-header-bg {
    height: 160px;
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    margin-bottom: 60px;
}

.user-avatar-wrapper {
    position: absolute;
    bottom: -40px;
    left: 20px;
    display: flex;
    align-items: flex-end;
}

.user-avatar {
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #fff;
}

.user-basic-info {
    margin-left: 20px;
    margin-bottom: 10px;
}

.user-nickname {
    font-size: 24px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.user-meta {
    display: flex;
    gap: 12px;
}

.asset-card {
    background: #ffffff;
    color: #1d2129;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.asset-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(50, 111, 255, 0.08);
    border-radius: 50%;
}

.asset-label {
    font-size: 14px;
    color: #86909c;
    margin-bottom: 8px;
}

.asset-value {
    font-size: 28px;
    font-weight: bold;
    color: #326FFF;
}

.asset-unit {
    font-size: 14px;
    margin-left: 4px;
    color: #1d2129;
}

/* 环形进度条文字大小 */
.arco-progress-circle-text {
    font-size: 12px !important;
    white-space: nowrap !important;
}

/* 日志列省略样式 */
.remarks-cell {
    display: flex !important;
    align-items: center;
    height: 100%;
    padding: 4px 0 !important;
}

.remarks-text {
    line-height: 1.5 !important;
    max-height: 3em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    word-break: break-all !important;
    text-overflow: ellipsis !important;
}


/* ============ 安装向导样式 ============ */
.install-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f5f5;
}

.install-container {
    width: 100%;
    max-width: 520px;
    padding: 0 15px;
}

.install-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.install-header {
    background: #fff;
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid #f5f5f5;
}

.install-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1d2129;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.install-header h1 i {
    color: #165dff;
    margin-right: 8px;
}

.install-header p {
    color: #4e5969;
    font-size: 14px;
    margin: 0;
}

.install-body {
    padding: 24px;
}

.install-footer {
    text-align: center;
    padding: 14px 24px;
    color: #86909c;
    font-size: 12px;
    border-top: 1px solid #f5f5f5;
}

/* 步骤指示器 */
.steps-wrapper {
    margin-bottom: 24px;
}

.steps-wrapper .arco-steps-item-title {
    font-size: 13px !important;
}

/* 特性列表 */
.feature-list {
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: #f7f8fa;
    border-radius: 6px;
    margin-bottom: 10px;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e8f3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.feature-icon i {
    color: #165dff;
    font-size: 16px;
}

.feature-text h3 {
    color: #1d2129;
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 2px 0;
}

.feature-text p {
    color: #86909c;
    font-size: 12px;
    margin: 0;
}

/* 环境检查 */
.check-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #f7f8fa;
    border: 1px solid #e5e6eb;
}

.check-item.success {
    background: #f6ffed;
    border-color: #b7eb8f;
}

.check-item.error {
    background: #fff2f0;
    border-color: #ffccc7;
}

.check-status {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
}

.check-status.success {
    background: #52c41a;
    color: white;
}

.check-status.error {
    background: #ff4d4f;
    color: white;
}

.check-info {
    flex: 1;
    min-width: 0;
}

.check-name {
    font-size: 13px;
    font-weight: 500;
    color: #1d2129;
}

.check-details {
    font-size: 11px;
    color: #86909c;
}

/* 表单区域 */
.section-title {
    font-size: 13px;
    font-weight: 500;
    color: #1d2129;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

.section-title i {
    color: #165dff;
    margin-right: 6px;
    font-size: 15px;
}

/* 进度环 */
.progress-wrapper {
    text-align: center;
    padding: 20px 0;
}

.progress-ring {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 20px;
}

.progress-bar {
    position: absolute;
    width: 6px;
    height: 18px;
    border-radius: 2px;
    background: #e5e6eb;
    transform-origin: center 80px;
    left: calc(50% - 3px);
    top: 0;
    transition: background-color 0.2s ease;
}

.progress-bar.active {
    background: #165dff;
}

.progress-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percent {
    font-size: 32px;
    font-weight: 600;
    color: #1d2129;
}

.progress-text {
    font-size: 12px;
    color: #86909c;
    margin-top: 4px;
}

.install-status {
    margin-top: 10px;
}

.install-status-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    font-size: 13px;
    color: #4e5969;
}

.install-status-item i {
    margin-right: 6px;
    font-size: 14px;
}

.install-status-item.done i {
    color: #52c41a;
}

.install-status-item.doing i {
    color: #165dff;
    animation: spin 1s linear infinite;
}

.install-status-item.wait {
    color: #c9cdd4;
}

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

.sql-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f7f8fa;
    border-radius: 4px;
    font-size: 12px;
    color: #86909c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sql-info i {
    margin-right: 6px;
    color: #165dff;
}

/* 成功页 */
.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f6ffed;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.success-icon i {
    font-size: 36px;
    color: #52c41a;
}

.success-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2129;
    text-align: center;
    margin-bottom: 6px;
}

.success-desc {
    font-size: 14px;
    color: #4e5969;
    text-align: center;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: #f7f8fa;
    border-radius: 6px;
    margin-bottom: 10px;
}

.info-item i {
    font-size: 18px;
    color: #165dff;
    margin-right: 12px;
    flex-shrink: 0;
}

.info-item .label {
    font-size: 11px;
    color: #86909c;
}

.info-item .value {
    font-size: 13px;
    color: #1d2129;
    font-weight: 500;
}

.warning-box {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    padding: 12px 14px;
    margin: 16px 0;
    display: flex;
    align-items: flex-start;
}

.warning-box i {
    color: #faad14;
    font-size: 16px;
    margin-right: 10px;
    margin-top: 1px;
    flex-shrink: 0;
}

.warning-box .content {
    flex: 1;
}

.warning-box h4 {
    color: #d48806;
    font-size: 12px;
    font-weight: 500;
    margin: 0 0 2px 0;
}

.warning-box p {
    color: #8c6e00;
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-group .arco-btn {
    flex: 1;
}

/* 结果提示 */
.result-box {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.result-box.success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.result-box.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

.result-box i {
    margin-right: 8px;
    font-size: 15px;
}

/* 安装向导移动端适配 */
@media (max-width: 576px) {
    .install-wrapper {
        padding: 3px;
    }
    
    .install-container {
        padding: 0 3px;
    }
    
    .install-header {
        padding: 16px 12px 12px;
    }
    
    .install-header h1 {
        font-size: 18px;
    }
    
    .install-body {
        padding: 12px;
    }
    
    .install-footer {
        padding: 10px 12px;
    }
    
    .steps-wrapper {
        overflow-x: auto;
        padding: 0 5px;
    }
    
    .steps-wrapper .arco-steps {
        min-width: auto;
    }
    
    .steps-wrapper .arco-steps-item {
        flex: 0 0 auto;
        min-width: 30px;
    }
    
    .steps-wrapper .arco-steps-item-title {
        display: none !important;
    }
    
    .steps-wrapper .arco-steps-item-icon {
        margin-right: 0 !important;
    }
    
    .feature-item {
        padding: 10px 12px;
    }
    
    .feature-icon {
        width: 30px;
        height: 30px;
        margin-right: 10px;
    }
    
    .feature-icon i {
        font-size: 14px;
    }
    
    .feature-text h3 {
        font-size: 12px;
    }
    
    .feature-text p {
        font-size: 11px;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .arco-btn {
        min-width: calc(50% - 6px);
    }
    
    .section-title {
        font-size: 12px;
    }
    
    .check-item {
        padding: 8px 10px;
    }
    
    .check-name {
        font-size: 12px;
    }
    
    .check-details {
        font-size: 10px;
    }
    
    .progress-ring {
        width: 140px;
        height: 140px;
    }
    
    .progress-percent {
        font-size: 28px;
    }
    
    .install-status-item {
        font-size: 12px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
    }
    
    .success-icon i {
        font-size: 30px;
    }
    
    .success-title {
        font-size: 18px;
    }
    
    .success-desc {
        font-size: 13px;
    }
    
    .info-item {
        padding: 10px 12px;
    }
    
    .warning-box {
        padding: 10px 12px;
    }
}


/* ============ 侧边栏菜单性能优化 ============ */
/* 禁用侧边栏收缩动画，提升性能 */
.arco-layout-sider {
    transition: width 0.1s ease-out !important;
    will-change: width;
}

/* 优化菜单展开/收起动画 */
.arco-menu-inline .arco-menu-inline-content {
    transition: height 0.15s ease-out !important;
}

/* 禁用菜单项的复杂动画 */
.arco-menu-item,
.arco-sub-menu-title {
    transition: background-color 0.1s ease-out, color 0.1s ease-out !important;
}

/* 禁用菜单图标旋转动画的延迟 */
.arco-menu-icon-suffix {
    transition: transform 0.15s ease-out !important;
}

/* 使用GPU加速 */
.arco-layout-sider,
.arco-menu,
.arco-menu-inline-content {
    transform: translateZ(0);
    backface-visibility: hidden;
}


/* ============ 全局加载组件样式覆盖 ============ */
/* 遮罩背景色覆盖 */
#globalLoadingApp {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    display: none;
}

#globalLoadingApp .ivu-spin-fix {
    background: transparent !important;
}

/* 确保 LoadingBar 在加载遮罩上面 */
.ivu-loading-bar {
    z-index: 99999 !important;
}
