﻿/* ============================================================
 * 云寄售 AI 客服系统 — 全局样式（Telegram 渐变风格）
 * ============================================================
 * 设计方向：Telegram 风格渐变背景 + 现代聊天界面
 * 配色：蓝绿渐变底 + 半透明毛玻璃面板 + 琥珀色点缀
 * ============================================================ */

/* ---------- CSS 变量（设计令牌） ---------- */
:root {
    /* 主色调 — Telegram 蓝绿渐变 */
    --bg-primary: #0f1a2e;
    --bg-secondary: rgba(17, 27, 42, 0.85);
    --bg-tertiary: rgba(26, 38, 55, 0.9);
    --bg-card: rgba(22, 34, 52, 0.85);
    --bg-input: rgba(13, 21, 32, 0.85);

    /* 文字色 */
    --text-primary: #e8edf3;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* 强调色 */
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-dim: rgba(245, 158, 11, 0.12);

    /* 气泡色 */
    --bubble-user: #1e3a5f;
    --bubble-ai: #1a2332;
    --bubble-system: rgba(245, 158, 11, 0.08);

    /* 边框 */
    --border: #1e293b;
    --border-light: #2a3a4e;

    /* 状态色 */
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 9999px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.08);

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* 动画 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* ---------- 全局重置 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
                 sans-serif;
    background-color: #dae8e6;
    background-image:
        /* 装饰点阵 - 卡通风格小圆点 */
        radial-gradient(circle 2px, rgba(129,178,154,0.38) 100%, transparent 0),
        radial-gradient(circle 3px, rgba(100,149,237,0.24) 100%, transparent 0),
        radial-gradient(circle 1.5px, rgba(144,190,109,0.32) 100%, transparent 0),
        radial-gradient(circle 2.5px, rgba(72,169,166,0.22) 100%, transparent 0),
        /* 柔光光斑 */
        radial-gradient(ellipse 70% 60% at 25% 20%, rgba(129,212,178,0.45) 0%, transparent 55%),
        radial-gradient(ellipse 60% 55% at 75% 80%, rgba(100,181,246,0.35) 0%, transparent 55%),
        radial-gradient(ellipse 50% 50% at 55% 45%, rgba(165,214,167,0.28) 0%, transparent 60%),
        /* 主渐变 */
        linear-gradient(165deg, #c4e2d4 0%, #d2e8dc 15%, #deede4 40%, #d9ecf2 70%, #d0e2ee 100%);
    background-size: 48px 48px, 78px 78px, 58px 58px, 68px 68px, auto, auto, auto, auto;
    background-position: 0 0, 20px 15px, 9px 30px, 36px 7px, 0 0, 0 0, 0 0, 0 0;
    background-attachment: fixed;
    animation: bg-shift 25s ease-in-out infinite;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

/* Telegram 风格渐变背景 — 动画 */
@keyframes bg-shift {
    0%, 100% { background-position: 0 0, 20px 15px, 9px 30px, 36px 7px, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
    33% { background-position: 0 0, 20px 15px, 9px 30px, 36px 7px, 1% 1%, -1% 0%, 0.5% -0.5%, 0% 1%; }
    66% { background-position: 0 0, 20px 15px, 9px 30px, 36px 7px, -0.5% -0.5%, 1% -1%, -0.5% 0.5%, 0% -0.5%; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
 * 聊天页面布局
 * ============================================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    background: transparent;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 0;
}

/* ---------- 顶部栏 ---------- */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.chat-header-info h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-header-info .status {
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-header-info .status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chat-header-actions {
    display: flex;
    gap: var(--space-sm);
}

.chat-header-actions button {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* 返回按钮 */
.btn-back {
    background: transparent;
    border: none;
    color: #5c7a6e;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-back:hover {
    color: #2e7d5b;
    background: rgba(0,0,0,0.06);
}
.chat-header-actions button:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

/* ---------- 消息列表 ---------- */
.chat-messages {
    background: rgba(255, 255, 255, 0.42);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

/* 返回底部按钮 */
.scroll-bottom-btn {
    position: absolute;
    bottom: 90px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 20;
    transition: all var(--transition-normal);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    box-shadow: var(--shadow-md);
}

.scroll-bottom-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-bottom-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--info);
    color: var(--info);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* 加载提示 */
.chat-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- 消息气泡 ---------- */
.message {
    display: flex;
    gap: var(--space-sm);
    max-width: 85%;
    animation: msg-in 0.3s ease;
}

@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.ai {
    align-self: flex-start;
}

.message.system {
    align-self: center;
    max-width: 90%;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    font-weight: 600;
}

.message.user .message-avatar {
    background: var(--accent);
}

.message.ai .message-avatar {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.message-bubble {
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.65;
    word-break: break-word;
    position: relative;
}

.message.user .message-bubble {
    background: var(--bubble-user);
    border-bottom-right-radius: var(--radius-sm);
}

.message.ai .message-bubble {
    background: var(--bubble-ai);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-bottom-left-radius: var(--radius-sm);
}

.message.system .message-bubble {
    background: var(--bubble-system);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-md);
    font-size: 13px;
    text-align: center;
    color: var(--accent);
}

/* ---------- 引导选项按钮 ---------- */
.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.option-btn {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--info);
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-btn:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: var(--info);
    transform: translateY(-1px);
}

/* ---------- FAQ 快捷入口 ---------- */
.chat-faq {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    padding-bottom: var(--space-xs);
    overflow-x: auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.chat-faq::-webkit-scrollbar { display: none; }

.faq-chip {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0,0,0,0.08);
    color: #3a5a4a;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.faq-chip:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

/* ---------- 欢迎消息 ---------- */
.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    animation: msg-in 0.5s ease;
}

.welcome-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: var(--space-md);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.welcome-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a3a2a;
    margin-bottom: var(--space-xs);
}

.welcome-subtitle {
    font-size: 13px;
    color: #4a6b5a;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
    max-width: 320px;
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.welcome-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #2a4a3a;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-normal);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.welcome-action-btn:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.welcome-action-btn .icon {
    font-size: 16px;
}

/* ---------- 输入区域 ---------- */
.chat-input-area {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: var(--space-md) var(--space-lg);
    padding-bottom: max(var(--space-md), env(safe-area-inset-bottom));
    flex-shrink: 0;
}

.chat-input-row {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.chat-input-row input {
    flex: 1;
    height: 44px;
    background: var(--bg-input);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-pill);
    padding: 0 var(--space-md);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.chat-input-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim), 0 0 20px rgba(245, 158, 11, 0.08);
}

.chat-input-row input::placeholder {
    color: var(--text-muted);
}

.btn-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #0a0f1a;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-send:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-input-hint {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    min-height: 16px;
}

/* ============================================================
 * 弹窗（Modal）
 * ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fade-in 0.2s ease;
    padding: var(--space-lg);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modal-pop 0.25s ease;
}

@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.modal-input {
    width: 100%;
    height: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    margin-bottom: var(--space-md);
    transition: border-color var(--transition-fast);
}

.modal-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-confirm {
    background: var(--accent);
    color: #0a0f1a;
    border: none;
    padding: 8px 24px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-confirm:hover {
    background: var(--accent-hover);
}

.btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- 评分组件 ---------- */
.rating-container {
    display: flex;
    gap: 4px;
}

.rating-star {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    padding: 2px;
}

.rating-star:hover,
.rating-star.active {
    color: var(--accent);
    transform: scale(1.15);
}

.feedback-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.feedback-textarea:focus {
    border-color: var(--accent);
}

/* ---------- 通用按钮 ---------- */
.btn-sm {
    padding: 5px 14px;
    font-size: 12px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
}

/* ============================================================
 * 管理后台页面
 * ============================================================ */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.admin-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-sm);
}

.admin-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-fast);
    position: relative;
}

.admin-tab:hover {
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--accent);
    font-weight: 600;
}

.admin-tab.active::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.admin-tab .badge {
    background: var(--error);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    margin-left: 6px;
}

/* ---------- 数据卡片 ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.stat-card .label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ---------- 表格 ---------- */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

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

th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    color: var(--text-primary);
}

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

tr:hover td {
    background: rgba(59, 130, 246, 0.04);
}

/* ---------- 表单 ---------- */
.form-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 600px;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-primary {
    background: var(--accent);
    color: #0a0f1a;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: var(--error);
    border: 1px solid rgba(239,68,68,0.3);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-danger:hover {
    background: rgba(239,68,68,0.25);
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.search-bar input,
.search-bar select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.search-bar input:focus,
.search-bar select:focus {
    border-color: var(--accent);
}

/* 分页 */
.pagination {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-lg);
}

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

.pagination button:hover {
    background: var(--accent-dim);
    color: var(--accent);
}

.pagination button.active {
    background: var(--accent);
    color: #0a0f1a;
    border-color: var(--accent);
}

/* 登录页 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a1628;
    padding: var(--space-lg);
}

.login-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    text-align: center;
}

.login-card .login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-error {
    background: rgba(239,68,68,0.1);
    color: var(--error);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: var(--space-md);
    display: none;
}

.login-error.show { display: block; }

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    animation: toast-in 0.3s ease;
    max-width: 360px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

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