/* ================= 全局变量与重置 ================= */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-body: #f9fafb;
    --bg-surface: #ffffff;
    --text-main: #1f2937;
    --text-footer: #9ca3af;
    --text-secondary: #6b7280;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius-lg: 12px;
    --radius-xl: 25px;
    --sidebar-width: 260px;
    --header-height: 64px;
    --ai-color: #7c3aed;
    --success: #16a34a;
    --danger: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input { font-family: inherit; }

/* 滚动条整体宽度 */
::-webkit-scrollbar {
    width: 8px; /* 垂直滚动条宽度 */
    height: 8px; /* 水平滚动条高度 */
}

/* 滚动条轨道 (背景) */
::-webkit-scrollbar-track {
    background: transparent; /* 背景透明，或者你可以设为 #f1f1f1 */
    border-radius: 4px;
}

/* 滚动条滑块 (拖动部分) */
::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2); /* 默认半透明灰色 */
    border-radius: 4px; /* 圆角 */
    border: 2px solid transparent; /* 增加一点内边距效果，让滑块看起来更细 */
    background-clip: content-box;
}

/* 鼠标悬停时的滑块颜色 */
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4); /* 颜色加深 */
}

/* ================= 布局组件 ================= */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 20;
}

.main-content {
    overflow-y: auto;
    position: relative;
    flex: 1;
}

/* ================= 侧边栏样式 ================= */
.logo-area {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--border-light);
}

.logo-area img {width: 80%}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin-right: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.nav-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    padding: 0 12px;
    margin-bottom: 8px;
    margin-top: 24px;
}
.nav-section-title:first-child { margin-top: 0; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 4px;
    cursor: pointer;
}

.nav-item .badge {
    margin-left: auto;
    padding: 2px 6px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
}

.nav-item:hover {
    background-color: #f3f4f6;
    color: var(--text-main);
}

.nav-item.active {
    background-color: #eef2ff;
    color: var(--primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    stroke: currentColor;
}

.user-profile {
    padding: 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.user-profile:hover { background-color: #f9fafb; }

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.avatar.logged-in {
    background-color: var(--primary);
    color: white;
}

.user-info {
    flex: 1;
    min-width: 0;
}
.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-status {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ================= 主工作区样式 ================= */
.header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.workspace {
    padding: 32px;
}

.workspace-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.welcome-section {
    text-align: center;
}
.welcome-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}
.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}


/* ================= 底部备案号 ================= */
.site-footer {
    padding: 10px;
    text-align: center;
    color: var(--text-footer);
    font-size: 12px;
    line-height: 1.6;
    margin-top: auto;
}
.site-footer a {
    color: var(--text-footer);
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}
.footer-divider {
    margin: 0 8px;
    color: var(--border-light);
}

/* ================= 模态框 (Modal) ================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: var(--bg-surface);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s;
}
.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}
.close-btn {
    color: #9ca3af;
    font-size: 24px;
    line-height: 1;
}
.close-btn:hover { color: var(--text-main); }

.modal-body {
    padding: 24px;
}

.auth-tabs {
    display: flex;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active {
    background: var(--bg-surface);
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s;
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input-wrapper {
    flex: 1;
}

.captcha-img-box {
    width: 125px;
    height: 42px; /* 与输入框高度保持一致 */
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background-color: #f3f4f6;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.captcha-img-box:hover {
    border-color: var(--primary);
}

.captcha-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 刷新遮罩层 */
.captcha-refresh-mask {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none; /* 让点击穿透到父元素 */
}

.captcha-img-box:hover .captcha-refresh-mask {
    opacity: 1;
}

.form-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

.hidden { display: none!important; }

/* ================= 加载动画 ================= */
.loading-spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .loading-spinner { display: inline-block; }
.btn-submit:not(.loading) .loading-spinner { display: none; }

/* 进度条 */
.progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 16px;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s;
    width: 0%;
}

/* 覆盖layui默认样式 */
.layui-layer-btn .layui-layer-btn0 {
    background-color: var(--primary)!important;;
    border-color: var(--primary)!important;;
    font-size: 14px;
}


.sidebar-wrap {
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    bottom: 125px;
    display: -webkit-flex;
    display: -moz-box;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    position: fixed;
    right: 24px;
    width: 48px;
    z-index: 699
}

.volcfe-sidebar-cell-wrap {
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -moz-box-align: center;
    -moz-box-pack: center;
    -webkit-align-items: center;
    align-items: center;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 35px -2px rgb(0 0 0 / 5%), 0 5px 15px rgb(0 0 0 / 3%);
    color: #41464f;
    display: -webkit-flex;
    display: -moz-box;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
    margin-top: 12px;
    min-height: 48px;
    overflow: hidden;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 48px;
    z-index: 0;
}

.volcfe-sidebar-first-level-item-wrap {
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -moz-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    display: -webkit-flex;
    display: -moz-box;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    position: relative;
    -moz-transition: color .3s ease;
    transition: color .3s ease;
}

.volcfe-sidebar-icon-small {
    height: 21px;
    width: 21px
}

.volcfe-sidebar-scrolltop-wrap:hover {
    color: #1664ff;
}

.volcfe-sidebar-first-level-item-wrap:hover {
    color: #1664ff;
}

.kefu:hover tip {
    opacity: 1;
}

.volcfe-sidebar-cell-text {
    font-size: 11px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
    white-space: nowrap;
    width: 100%
}

.volcfe-sidebar-scrolltop-wrap {
    -moz-box-pack: center;
    -moz-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    background: #fff;
    border-radius: 50%;
    bottom: -65px;
    box-shadow: 0 15px 35px -2px rgb(0 0 0 / 5%), 0 5px 15px rgb(0 0 0 / 3%);
    color: #41464f;
    cursor: pointer;
    display: -webkit-flex;
    display: -moz-box;
    display: flex;
    height: 48px;
    -webkit-justify-content: center;
    justify-content: center;
    position: absolute;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 48px;
}

.volcfe-sidebar-icon-middle {
    height: 24px;
    width: 24px
}

.kefu {
    position:absolute;left:-140px;top:-15px;display: none;
}

.taobao {
    position:absolute;left:-140px;top:35px;display: none;
}

.tip {
    position: relative;
    background: #fff;
    padding: 0px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    text-align: center;
}

/*提示框-左三角*/
.tip-trangle-left {
    position: absolute;
    bottom: 15px;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid #fff;
}

/*提示框-右三角*/
.tip-trangle-right {
    position: absolute;
    top: 55px;
    right: -10px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid #fff;
}

/*提示框-上三角*/
.tip-trangle-top {
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid #fff;
}

/*提示框-下三角*/
.tip-trangle-bottom {
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #fff;
}