/* =====================================================
   外贸实操模拟训练平台 - 小米风格响应式设计
   设计语言：简洁、留白、橙色强调、圆角卡片
   ===================================================== */

:root {
    --mi-orange: #ff6700;
    --mi-orange-dark: #e55d00;
    --mi-orange-light: #fff3e0;
    --mi-green: #07c160;
    --mi-green-light: #f0fff4;
    --mi-red: #ff4d4f;
    --mi-red-light: #fff2f0;
    --mi-blue: #1890ff;
    --mi-blue-light: #e6f7ff;
    --mi-yellow: #faad14;
    --mi-bg: #f5f5f5;
    --mi-bg-white: #ffffff;
    --mi-text: #1a1a1a;
    --mi-text-secondary: #666666;
    --mi-text-muted: #999999;
    --mi-border: #e8e8e8;
    --mi-border-light: #f0f0f0;
    --mi-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --mi-shadow-hover: 0 6px 24px rgba(0,0,0,0.1);
    --mi-radius: 12px;
    --mi-radius-sm: 8px;
    --mi-radius-lg: 16px;
    --sidebar-w: 240px;
    --header-h: 56px;
    --transition: all 0.25s ease;
}

/* ==================== Reset ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--mi-bg);
    color: var(--mi-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--mi-orange); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--mi-orange-dark); }
img { max-width: 100%; height: auto; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ==================== 顶部导航栏 ==================== */
.top-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--mi-bg-white);
    border-bottom: 1px solid var(--mi-border-light);
    display: flex; align-items: center;
    padding: 0 16px;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.top-header .menu-btn {
    width: 36px; height: 36px;
    border: none; background: none; cursor: pointer;
    font-size: 20px; color: var(--mi-text);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.top-header .menu-btn:hover { background: var(--mi-border-light); }
.top-header .logo {
    font-size: 17px; font-weight: 600; color: var(--mi-text);
    margin-left: 8px; white-space: nowrap;
}
.top-header .logo span { color: var(--mi-orange); }
.top-header .header-right {
    margin-left: auto; display: flex; align-items: center; gap: 12px;
}
.top-header .user-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 20px;
    background: var(--mi-orange-light); font-size: 13px; font-weight: 500;
    color: var(--mi-orange);
}

/* ==================== 侧边栏 ==================== */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 200;
    opacity: 0; transition: opacity 0.3s;
}
.sidebar-overlay.show { display: block; opacity: 1; }

.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--mi-bg-white);
    border-right: 1px solid var(--mi-border-light);
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-head {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--mi-border-light);
}
.sidebar-head .s-logo {
    font-size: 18px; font-weight: 700; color: var(--mi-text);
}
.sidebar-head .s-logo span { color: var(--mi-orange); }
.sidebar-head .s-close {
    position: absolute; top: 16px; right: 12px;
    width: 32px; height: 32px; border: none; background: none;
    font-size: 18px; cursor: pointer; border-radius: 8px;
    color: var(--mi-text-muted); display: flex; align-items: center; justify-content: center;
}
.sidebar-head .s-close:hover { background: var(--mi-border-light); }

.sidebar-user {
    padding: 16px; border-bottom: 1px solid var(--mi-border-light);
}
.sidebar-user .su-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--mi-orange); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 600; margin-bottom: 8px;
}
.sidebar-user .su-name { font-size: 15px; font-weight: 600; }
.sidebar-user .su-level {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 500; margin-top: 4px;
}
.su-level.level-0 { background: #f0f0f0; color: #999; }
.su-level.level-1 { background: var(--mi-blue-light); color: var(--mi-blue); }
.su-level.level-2 { background: var(--mi-orange-light); color: var(--mi-orange); }

.sidebar-nav { flex: 1; padding: 8px 0; }
.sidebar-nav .nav-group-title {
    padding: 12px 16px 4px; font-size: 11px; font-weight: 600;
    color: var(--mi-text-muted); text-transform: uppercase; letter-spacing: 1px;
}
.sidebar-nav .nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; margin: 2px 8px;
    border-radius: var(--mi-radius-sm);
    color: var(--mi-text-secondary); font-size: 14px; font-weight: 500;
    transition: var(--transition); cursor: pointer; text-decoration: none;
}
.sidebar-nav .nav-item:hover { background: var(--mi-border-light); color: var(--mi-text); }
.sidebar-nav .nav-item.active {
    background: var(--mi-orange-light); color: var(--mi-orange); font-weight: 600;
}
.sidebar-nav .nav-item .nav-icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-nav .nav-item .nav-lock { margin-left: auto; font-size: 12px; color: var(--mi-text-muted); }

.sidebar-foot {
    padding: 8px 0; border-top: 1px solid var(--mi-border-light);
}

/* ==================== 主内容区 ==================== */
.main-wrap {
    padding-top: var(--header-h);
    min-height: 100vh;
}
.main-content {
    padding: 20px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================== 卡片 ==================== */
.card {
    background: var(--mi-bg-white);
    border-radius: var(--mi-radius);
    padding: 20px;
    box-shadow: var(--mi-shadow);
    margin-bottom: 16px;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--mi-shadow-hover); }
.card-title {
    font-size: 16px; font-weight: 600; color: var(--mi-text);
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 20px; border: none; border-radius: var(--mi-radius-sm);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: var(--transition); text-decoration: none; line-height: 1.5;
}
.btn-primary { background: var(--mi-orange); color: #fff; }
.btn-primary:hover { background: var(--mi-orange-dark); color: #fff; }
.btn-success { background: var(--mi-green); color: #fff; }
.btn-success:hover { background: #06ad56; color: #fff; }
.btn-danger { background: var(--mi-red); color: #fff; }
.btn-danger:hover { background: #e04347; color: #fff; }
.btn-outline {
    background: transparent; color: var(--mi-orange);
    border: 1px solid var(--mi-orange);
}
.btn-outline:hover { background: var(--mi-orange-light); }
.btn-ghost { background: transparent; color: var(--mi-text-secondary); }
.btn-ghost:hover { background: var(--mi-border-light); color: var(--mi-text); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 12px 28px; font-size: 16px; border-radius: var(--mi-radius); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 14px; font-weight: 500;
    color: var(--mi-text-secondary); margin-bottom: 6px;
}
.form-group label .req { color: var(--mi-red); }
.form-control {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--mi-border); border-radius: var(--mi-radius-sm);
    font-size: 14px; color: var(--mi-text);
    background: var(--mi-bg-white); outline: none;
    transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--mi-orange); }
.form-control::placeholder { color: var(--mi-text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--mi-text-muted); margin-top: 4px; }

/* ==================== 提示消息 ==================== */
.alert {
    padding: 12px 16px; border-radius: var(--mi-radius-sm);
    font-size: 14px; margin-bottom: 16px; line-height: 1.6;
}
.alert-danger { background: var(--mi-red-light); color: var(--mi-red); }
.alert-success { background: var(--mi-green-light); color: var(--mi-green); }
.alert-info { background: var(--mi-blue-light); color: var(--mi-blue); }
.alert-warning { background: #fff7e6; color: #d48806; }

/* ==================== 登录/注册页 ==================== */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: linear-gradient(135deg, #fff5eb 0%, #f5f5f5 50%, #e6f7ff 100%);
}
.auth-box {
    background: var(--mi-bg-white); border-radius: var(--mi-radius-lg);
    box-shadow: var(--mi-shadow-hover); max-width: 420px; width: 100%;
    padding: 36px 28px; overflow: hidden;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.auth-logo h1 { font-size: 22px; font-weight: 700; color: var(--mi-text); }
.auth-logo h1 span { color: var(--mi-orange); }
.auth-logo p { font-size: 14px; color: var(--mi-text-muted); margin-top: 4px; }
.auth-demo {
    margin-top: 20px; padding: 14px; background: #fafafa;
    border-radius: var(--mi-radius-sm); font-size: 13px; color: var(--mi-text-muted); line-height: 1.8;
}
.auth-demo strong { color: var(--mi-text-secondary); }

/* ==================== 仪表盘 ==================== */
.dash-hero {
    background: linear-gradient(135deg, var(--mi-orange), #ff8533);
    border-radius: var(--mi-radius-lg); padding: 28px 24px;
    color: #fff; margin-bottom: 20px; position: relative; overflow: hidden;
}
.dash-hero h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.dash-hero p { font-size: 14px; opacity: 0.9; margin-bottom: 16px; }
.dash-hero .hero-stat {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.2); border-radius: 20px;
    padding: 6px 14px; font-size: 13px;
}
.dash-hero .hero-deco {
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    font-size: 72px; opacity: 0.15;
}

.module-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px; margin-bottom: 20px;
}
.module-card {
    background: var(--mi-bg-white); border-radius: var(--mi-radius);
    padding: 20px; box-shadow: var(--mi-shadow);
    cursor: pointer; transition: var(--transition);
    border: 2px solid transparent; text-decoration: none; color: inherit; display: block;
}
.module-card:hover { box-shadow: var(--mi-shadow-hover); border-color: var(--mi-orange); transform: translateY(-2px); }
.module-card .mc-icon { font-size: 32px; margin-bottom: 10px; }
.module-card .mc-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.module-card .mc-desc { font-size: 13px; color: var(--mi-text-muted); margin-bottom: 12px; }
.module-card .mc-bar {
    height: 4px; background: var(--mi-border-light); border-radius: 2px; overflow: hidden;
}
.module-card .mc-bar-fill {
    height: 100%; border-radius: 2px; transition: width 0.6s ease;
    background: var(--mi-orange);
}
.module-card .mc-bar-fill.done { background: var(--mi-green); }
.module-card .mc-pct { font-size: 12px; color: var(--mi-text-muted); text-align: right; margin-top: 4px; }

/* ==================== 课程列表 ==================== */
.lesson-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; background: var(--mi-bg-white);
    border-radius: var(--mi-radius-sm); border: 1px solid var(--mi-border-light);
    cursor: pointer; transition: var(--transition); text-decoration: none; color: inherit;
}
.lesson-item:hover { border-color: var(--mi-orange); background: var(--mi-orange-light); }
.lesson-item .li-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--mi-border-light); color: var(--mi-text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.lesson-item .li-num.done { background: var(--mi-green); color: #fff; }
.lesson-item .li-title { font-size: 15px; font-weight: 500; flex: 1; }
.lesson-item .li-arrow { color: var(--mi-text-muted); font-size: 14px; }

/* ==================== 课程内容 ==================== */
.lesson-content { font-size: 15px; line-height: 1.8; color: var(--mi-text); }
.lesson-content h3 { font-size: 18px; font-weight: 700; margin: 20px 0 12px; color: var(--mi-text); }
.lesson-content h4 { font-size: 16px; font-weight: 600; margin: 16px 0 8px; color: var(--mi-text); }
.lesson-content p { margin-bottom: 12px; }
.lesson-content ul, .lesson-content ol { padding-left: 20px; margin-bottom: 12px; }
.lesson-content li { margin-bottom: 6px; }
.lesson-content strong { color: var(--mi-orange); }

/* ==================== 测验 ==================== */
.quiz-item {
    padding: 16px; margin-bottom: 12px;
    background: #fafafa; border-radius: var(--mi-radius-sm);
    border: 1px solid var(--mi-border-light);
}
.quiz-item.correct { border-color: var(--mi-green); background: var(--mi-green-light); }
.quiz-item.wrong { border-color: var(--mi-red); background: var(--mi-red-light); }
.quiz-question { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.quiz-options { display: flex; flex-direction: column; gap: 6px; }
.quiz-option {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 6px; cursor: pointer;
    font-size: 14px; transition: var(--transition);
}
.quiz-option:hover { background: var(--mi-orange-light); }
.quiz-option input[type="radio"] { accent-color: var(--mi-orange); }

/* ==================== 场景选择 ==================== */
.scenario-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.scenario-card {
    background: var(--mi-bg-white); border-radius: var(--mi-radius);
    padding: 20px; border: 2px solid var(--mi-border-light);
    cursor: pointer; transition: var(--transition);
}
.scenario-card:hover { border-color: var(--mi-orange); box-shadow: var(--mi-shadow); }
.scenario-card.active { border-color: var(--mi-orange); background: var(--mi-orange-light); }
.scenario-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.scenario-card p { font-size: 13px; color: var(--mi-text-muted); line-height: 1.6; }
.scenario-card .sc-diff {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 500; margin-top: 8px;
    background: var(--mi-orange-light); color: var(--mi-orange);
}

/* ==================== 开发信编辑器 ==================== */
.letter-editor textarea {
    min-height: 200px; font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 13px; line-height: 1.7;
}

/* ==================== 评分结果 ==================== */
.score-header {
    text-align: center; padding: 24px; margin-bottom: 16px;
    background: linear-gradient(135deg, var(--mi-orange-light), #fff);
    border-radius: var(--mi-radius);
}
.score-circle {
    width: 100px; height: 100px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px; font-size: 32px; font-weight: 800;
    color: var(--mi-orange);
    background: conic-gradient(var(--mi-orange) calc(var(--pct, 0) * 1%), var(--mi-border-light) calc(var(--pct, 0) * 1%));
    position: relative;
}
.score-circle::after {
    content: ''; position: absolute; inset: 8px;
    background: var(--mi-bg-white); border-radius: 50%;
}
.score-circle span { position: relative; z-index: 1; }
.score-details {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.score-item {
    padding: 12px; background: #fafafa; border-radius: var(--mi-radius-sm);
}
.score-item .si-label { font-size: 13px; color: var(--mi-text-muted); margin-bottom: 4px; }
.score-item .si-bar { height: 6px; background: var(--mi-border-light); border-radius: 3px; overflow: hidden; }
.score-item .si-bar-fill { height: 100%; border-radius: 3px; background: var(--mi-orange); transition: width 0.6s; }
.score-item .si-comment { font-size: 12px; color: var(--mi-text-secondary); margin-top: 4px; }

/* ==================== 聊天/谈判 ==================== */
.chat-box {
    background: var(--mi-bg-white); border-radius: var(--mi-radius);
    box-shadow: var(--mi-shadow); overflow: hidden;
}
.chat-messages {
    height: 400px; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.chat-bubble {
    max-width: 85%; padding: 10px 14px;
    border-radius: 12px; font-size: 14px; line-height: 1.6;
    word-break: break-word;
}
.chat-bubble.user {
    align-self: flex-end;
    background: var(--mi-orange); color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-bubble.ai {
    align-self: flex-start;
    background: #f5f5f5; color: var(--mi-text);
    border-bottom-left-radius: 4px;
}
.chat-bubble .bubble-sender {
    font-size: 11px; font-weight: 600; margin-bottom: 4px; opacity: 0.7;
}
.chat-input-area {
    display: flex; gap: 8px; padding: 12px 16px;
    border-top: 1px solid var(--mi-border-light);
    background: #fafafa;
}
.chat-input-area textarea {
    flex: 1; padding: 8px 12px; border: 1px solid var(--mi-border);
    border-radius: var(--mi-radius-sm); font-size: 14px; resize: none;
    outline: none; min-height: 40px; max-height: 100px;
}
.chat-input-area textarea:focus { border-color: var(--mi-orange); }

/* ==================== 步骤指示器 ==================== */
.steps-bar {
    display: flex; gap: 4px; margin-bottom: 20px; overflow-x: auto;
    padding-bottom: 4px;
}
.step-item {
    flex: 1; min-width: 80px; text-align: center;
    padding: 10px 6px; border-radius: var(--mi-radius-sm);
    font-size: 12px; font-weight: 500; color: var(--mi-text-muted);
    background: var(--mi-border-light); transition: var(--transition);
    white-space: nowrap;
}
.step-item.active { background: var(--mi-orange); color: #fff; }
.step-item.done { background: var(--mi-green); color: #fff; }

/* ==================== 进度条 ==================== */
.progress-bar {
    height: 6px; background: var(--mi-border-light); border-radius: 3px; overflow: hidden;
}
.progress-bar .fill {
    height: 100%; border-radius: 3px; background: var(--mi-orange);
    transition: width 0.6s ease;
}
.progress-bar .fill.done { background: var(--mi-green); }

/* ==================== 标签 ==================== */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 500;
}
.tag-orange { background: var(--mi-orange-light); color: var(--mi-orange); }
.tag-green { background: var(--mi-green-light); color: var(--mi-green); }
.tag-blue { background: var(--mi-blue-light); color: var(--mi-blue); }
.tag-red { background: var(--mi-red-light); color: var(--mi-red); }

/* ==================== 表格 ==================== */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    padding: 10px 12px; text-align: left; font-weight: 600;
    background: #fafafa; border-bottom: 2px solid var(--mi-border);
    color: var(--mi-text-secondary); font-size: 13px;
}
.data-table td {
    padding: 10px 12px; border-bottom: 1px solid var(--mi-border-light);
}
.data-table tr:hover td { background: #fafafa; }

/* ==================== 加载动画 ==================== */
.loading { text-align: center; padding: 32px; }
.spinner {
    width: 32px; height: 32px; border: 3px solid var(--mi-border-light);
    border-top-color: var(--mi-orange); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 动画 ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.35s ease-out; }

/* ==================== 管理后台 ==================== */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side {
    width: 200px; background: #1a1a1a; color: #ccc;
    padding: 16px 0; flex-shrink: 0;
}
.admin-side .as-title {
    padding: 0 16px 16px; font-size: 16px; font-weight: 700;
    color: #fff; border-bottom: 1px solid #333;
}
.admin-side .as-title span { color: var(--mi-orange); }
.admin-side a {
    display: block; padding: 10px 16px; color: #aaa;
    font-size: 14px; text-decoration: none; transition: var(--transition);
}
.admin-side a:hover, .admin-side a.active { background: #333; color: #fff; }
.admin-main { flex: 1; padding: 24px; overflow-y: auto; }
.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px; margin-bottom: 20px;
}
.stat-card {
    background: var(--mi-bg-white); border-radius: var(--mi-radius);
    padding: 18px; box-shadow: var(--mi-shadow); text-align: center;
}
.stat-card .sc-val { font-size: 28px; font-weight: 800; color: var(--mi-orange); }
.stat-card .sc-label { font-size: 13px; color: var(--mi-text-muted); margin-top: 4px; }

/* ==================== 移动端顶栏 ==================== */
.m-header {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--header-h);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    align-items: center; justify-content: space-between;
    padding: 0 16px;
}
.m-menu-btn {
    background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px 8px; color: var(--mi-text);
}
.m-logo { font-size: 16px; font-weight: 700; color: var(--mi-orange); }
.m-level {
    font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600;
}
.m-level.lv-0 { background: #f0f0f0; color: #999; }
.m-level.lv-1 { background: var(--mi-blue-light); color: var(--mi-blue); }
.m-level.lv-2 { background: var(--mi-orange-light); color: var(--mi-orange); }

/* ==================== 会员等级徽章 ==================== */
.level-badge {
    display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 10px; font-weight: 600;
}
.level-badge.lv-0, .level-badge.level-0 { background: #f0f0f0; color: #999; }
.level-badge.lv-1, .level-badge.level-1 { background: var(--mi-blue-light); color: var(--mi-blue); }
.level-badge.lv-2, .level-badge.level-2 { background: var(--mi-orange-light); color: var(--mi-orange); }

/* ==================== 权限不足页面 ==================== */
.no-access {
    text-align: center; padding: 80px 20px;
}
.no-access-icon { font-size: 64px; margin-bottom: 16px; }
.no-access h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.no-access p { color: var(--mi-text-muted); margin-bottom: 24px; }

/* ==================== 演示账号框 ==================== */
.demo-box {
    margin-top: 24px; padding: 16px; background: #fafafa;
    border-radius: var(--mi-radius-sm); font-size: 13px; color: var(--mi-text-secondary);
    border: 1px solid var(--mi-border-light);
}
.demo-box div:first-child { margin-bottom: 4px; }

/* ==================== 响应式 ==================== */
/* 平板 */
@media (min-width: 768px) {
    .main-content { padding: 24px 32px; }
    .auth-box { padding: 40px 36px; }
    .chat-messages { height: 460px; }
    .sidebar { transform: translateX(0); }
    .main-wrap { margin-left: var(--sidebar-w); }
    .sidebar-overlay { display: none !important; }
    .sidebar-head .s-close { display: none; }
}

/* 桌面 */
@media (min-width: 1024px) {
    .main-content { padding: 28px 40px; }
    .module-grid { grid-template-columns: repeat(3, 1fr); }
    .scenario-grid { grid-template-columns: repeat(2, 1fr); }
    .score-details { grid-template-columns: repeat(3, 1fr); }
    .chat-messages { height: 500px; }
}

/* 手机 */
@media (max-width: 767px) {
    :root { --sidebar-w: 280px; }
    .m-header { display: flex; }
    .main-wrap { padding-top: var(--header-h); }
    .main-content { padding: 16px 12px; }
    .dash-hero { padding: 20px 16px; }
    .dash-hero h1 { font-size: 18px; }
    .dash-hero .hero-deco { display: none; }
    .module-grid { grid-template-columns: 1fr; }
    .scenario-grid { grid-template-columns: 1fr; }
    .score-details { grid-template-columns: 1fr 1fr; }
    .auth-box { padding: 28px 20px; }
    .auth-logo h1 { font-size: 18px; }
    .card { padding: 16px; }
    .chat-messages { height: 320px; }
    .chat-input-area { flex-direction: column; }
    .chat-input-area .btn { width: 100%; }
    .steps-bar { flex-wrap: nowrap; overflow-x: auto; }
    .step-item { min-width: 60px; font-size: 11px; padding: 8px 4px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-wrap { flex-direction: column; }
    .admin-side { width: 100%; display: flex; overflow-x: auto; padding: 0; }
    .admin-side .as-title { padding: 12px 16px; white-space: nowrap; border-bottom: none; border-right: 1px solid #333; }
    .admin-side a { white-space: nowrap; padding: 12px 16px; }
    .admin-main { padding: 16px; }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 6px; }
}

/* 超小屏 */
@media (max-width: 400px) {
    .score-details { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}
