/* 蓝白色扁平化主题样式 - 丰富版 */

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --accent-primary: #1d4ed8;
    --accent-secondary: #3b82f6;
    --accent-success: #15803d;
    --accent-warning: #b45309;
    --accent-danger: #dc2626;
    --accent-info: #0891b2;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 移除背景动画 */
.bg-animation,
.grid-overlay {
    display: none;
}

/* ========== 登录页面 ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-box {
    width: 420px;
    padding: 48px;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header i {
    font-size: 56px;
    color: var(--accent-primary);
    margin-bottom: 20px;
    display: block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group label i {
    color: var(--accent-primary);
    width: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-default {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-default:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== 主页面布局 ========== */
.main-container {
    display: flex;
    min-height: 100vh;
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header i {
    font-size: 28px;
    color: var(--accent-primary);
}

.sidebar-header span {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--accent-primary);
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: var(--bg-hover);
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.top-header {
    background: var(--bg-secondary);
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* 内容包装器 */
.content-wrapper {
    flex: 1;
    padding: 24px 32px;
}

/* ========== 页面内容 ========== */
.content-page {
    animation: fadeIn 0.3s ease;
}

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

/* ========== 工作台页面 ========== */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 16px;
    padding: 48px;
    margin-bottom: 32px;
    color: white;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.dashboard-welcome h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dashboard-welcome p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.dashboard-welcome .btn {
    background: white;
    color: var(--accent-primary);
    font-weight: 600;
}

.dashboard-welcome .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.15));
    color: var(--accent-primary);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(34, 197, 94, 0.15));
    color: var(--accent-success);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.15));
    color: var(--accent-warning);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(34, 211, 238, 0.15));
    color: var(--accent-info);
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 仪表板分区 */
.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

.section-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.section-card h3 {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card h3 i {
    color: var(--accent-primary);
}

.section-card .card-body {
    padding: 24px;
}

.empty-text {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 24px;
    font-size: 14px;
}

/* ========== 上传页面 ========== */
.upload-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .upload-container {
        grid-template-columns: 1fr;
    }
}

.upload-area {
    background: var(--bg-card);
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.upload-area:hover {
    border-color: var(--accent-primary);
    background: rgba(29, 78, 216, 0.03);
}

.upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(29, 78, 216, 0.08);
    transform: scale(1.02);
}

.upload-area i {
    font-size: 72px;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.upload-area .btn {
    background: var(--accent-primary);
    color: white;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}

.upload-area .btn:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.45);
}

.upload-form {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 32px;
}

.upload-form h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-form h3 i {
    color: var(--accent-primary);
}

/* ========== 工具栏 ========== */
.page-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: nowrap;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.search-box {
    position: relative;
    width: 260px;
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.page-toolbar select {
    padding: 10px 32px 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 110px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.page-toolbar select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.page-toolbar .btn {
    margin-left: auto;
    white-space: nowrap;
}

/* ========== 表格样式 ========== */
.table-container {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-hover);
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

.data-table td {
    color: var(--text-primary);
    font-size: 14px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ========== 标签 ========== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tag.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
}

.tag.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
}

.tag.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
}

.tag.info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
}

.tag.secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* ========== 话术卡片网格 ========== */
.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.script-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
    cursor: pointer;
}

.script-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.script-card .header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.script-card .title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.4;
}

.script-card .category {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.script-card .content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.script-card .footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-muted);
}

.script-card .stats {
    display: flex;
    gap: 16px;
}

.script-card .stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 分析列表 ========== */
.analysis-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analysis-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
    cursor: pointer;
}

.analysis-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.analysis-score {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.analysis-score.high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
}

.analysis-score.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
}

.analysis-score.low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
}

.analysis-score span {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.8;
}

.analysis-info {
    flex: 1;
}

.analysis-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.analysis-info p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.analysis-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ========== 标签页 ========== */
.stats-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    width: fit-content;
}

.tab-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab-btn.active {
    background: var(--accent-primary);
    color: white;
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ========== 分析内容区 ========== */
.analysis-content {
    padding: 24px;
    min-height: 200px;
}

/* ========== 分析结果展示 ========== */
.analysis-result {
    background: var(--bg-hover);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.analysis-section {
    margin-bottom: 24px;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 24px;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.score-circle .score {
    font-size: 32px;
    font-weight: 700;
}

.score-circle .label {
    font-size: 12px;
    opacity: 0.9;
}

.score-details {
    flex: 1;
}

.score-item {
    margin-bottom: 16px;
}

.score-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.score-item .label {
    color: var(--text-secondary);
    font-size: 14px;
}

.score-item .value {
    font-weight: 600;
    color: var(--text-primary);
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.required {
    color: var(--accent-danger);
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.pagination button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pagination button.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
    color: var(--accent-primary);
}

.empty-state h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* ========== 加载动画 ========== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ========== 提示消息 ========== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    animation: toastSlideIn 0.3s ease;
    border: 1px solid var(--border-color);
    min-width: 300px;
}

.toast.success {
    border-left: 4px solid var(--accent-success);
}

.toast.error {
    border-left: 4px solid var(--accent-danger);
}

.toast.warning {
    border-left: 4px solid var(--accent-warning);
}

.toast.info {
    border-left: 4px solid var(--accent-primary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== 隐藏 ========== */
.hidden {
    display: none !important;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .upload-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 16px;
    }
    
    .top-header {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .scripts-grid {
        grid-template-columns: 1fr;
    }
    
    .login-box {
        width: 90%;
        padding: 32px 24px;
    }
    
    .dashboard-welcome {
        padding: 32px 24px;
    }
    
    .dashboard-welcome h2 {
        font-size: 24px;
    }
    
    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .modal {
        margin: 16px;
    }
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
