/* ========== 全局样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1e40af;
    --primary-hover: #1e3a8a;
    --primary-light: #dbeafe;
    --primary-gradient: linear-gradient(135deg, #1e40af, #3b82f6);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f0f2f5;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: #ff356d;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

/* ========== 按钮 ========== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border: none; border-radius: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .25s; text-decoration: none; flex-shrink: 0;
    letter-spacing: .3px;
}
.btn:hover { opacity: .92; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary-gradient); color: #fff; box-shadow: 0 4px 14px rgba(30,64,175,.25); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(30,64,175,.35); }
.btn-primary:disabled { background: #bbb; box-shadow: none; cursor: not-allowed; transform: none; opacity: .6; }
.btn-success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,.25); }
.btn-danger { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,.25); }
.btn-outline { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); border-color: var(--primary-hover); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: var(--text); }
.form-control {
    width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 14px; transition: all .25s;
    outline: none; background: #f9fafb;
}
.form-control:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(30,64,175,.1); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ========== 卡片 ========== */
.card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px;
}

/* ========== 提示信息 ========== */
.alert {
    padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
    font-size: 14px; font-weight: 500;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ========== 顶部导航 ========== */
.navbar {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 0 16px; height: 52px; display: flex;
    align-items: center; justify-content: space-between;
    box-shadow: var(--shadow-sm);
}
.navbar .logo { font-size: 17px; font-weight: 700; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.navbar .nav-right { display: flex; align-items: center; gap: 12px; }
.navbar .nav-right .score-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff;
    padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
    white-space: nowrap; box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.navbar .nav-right a { color: var(--text-secondary); font-size: 13px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.navbar .nav-right a:hover { color: var(--primary); }

/* ========== 页面容器 ========== */
/* ========== 页面容器 ========== */
.page-container {
    max-width: 480px;
    padding: 0 16px;
    /* 上下 + 水平居中 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 避免内容超出屏幕 */
    width: 100%;
    box-sizing: border-box;
}

/* ========== 认证页面 ========== */
.auth-card {
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    padding: 32px 24px;
}
.auth-card .auth-logo {
    width: 64px; height: 64px; border-radius: 18px;
    background: var(--primary-gradient); display: flex;
    align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 28px; color: #fff;
    box-shadow: 0 8px 24px rgba(30,64,175,.25);
}
.auth-card h1 { font-size: 22px; margin-bottom: 4px; font-weight: 700; }
.auth-card .subtitle { margin-bottom: 24px; font-size: 14px; color: var(--text-secondary); }
.auth-card .form-group { text-align: left; }
.auth-card .footer-link { margin-top: 20px; font-size: 14px; color: var(--text-secondary); }
.auth-card .footer-link a { font-weight: 600; }

/* ========== 用户面板 ========== */
.dashboard { width: 100%; margin: 16px 0; padding: 0 12px; }
.dashboard .welcome {
    margin-bottom: 20px;
    background: var(--primary-gradient);
    border-radius: 16px; padding: 24px 20px; color: #fff;
    box-shadow: 0 8px 24px rgba(30,64,175,.2);
}
.dashboard .welcome h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.dashboard .welcome p { font-size: 14px; opacity: .85; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card {
    background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
    padding: 16px 12px; text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.stat-card:active { transform: scale(.96); }
.stat-card .stat-value { font-size: 24px; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-card .stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }

/* ========== 聊天页面 ========== */
.chat-container {
    width: 100%; max-width: 440px; margin: 0 auto;
    height: 100vh;
    display: flex; flex-direction: column;
    background: #f0f2f5;
    position: relative;
}
@media (min-width: 441px) {
    .chat-container {
        height: calc(100vh - 48px); margin: 24px auto;
        border-radius: 20px; overflow: hidden;
        box-shadow: 0 12px 48px rgba(0,0,0,.15), 0 4px 12px rgba(0,0,0,.06);
    }
}

/* 聊天头部 */
.chat-header {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    color: #fff;
    padding: 24px 20px 18px;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.chat-header::before {
    content: ''; position: absolute; top: -60%; right: -30%;
    width: 200px; height: 200px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.chat-header::after {
    content: ''; position: absolute; bottom: -14px; left: -10%; right: -10%;
    height: 28px; background: #f0f2f5;
    border-radius: 50% 50% 0 0;
}
.chat-header .header-content {
    position: relative; z-index: 1;
}
.chat-header .back-btn {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,.8); font-size: 22px; text-decoration: none;
    width: 36px; height: 36px; display: flex; align-items: center;
    justify-content: center; border-radius: 50%;
    transition: background .2s, color .2s;
}
.chat-header .back-btn:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.chat-header .agent-info {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin-bottom: 2px;
}
.chat-header .agent-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,.25);
}
.chat-header .agent-text { text-align: left; }
.chat-header h3 { font-size: 16px; font-weight: 700; letter-spacing: .5px; line-height: 1.3; }
.chat-header .status {
    font-size: 12px; opacity: .85; display: block; margin-top: 2px;
    font-weight: 500;
}
.chat-header .status-dot {
    display: inline-block; width: 6px; height: 6px;
    background: #6ee7b7; border-radius: 50%; margin-right: 5px;
    vertical-align: middle; animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(110,231,183,.6); }
    50% { opacity: .6; box-shadow: 0 0 0 4px rgba(110,231,183,0); }
}

/* 消息区域 */
.chat-messages {
    flex: 1; overflow-y: auto; padding: 20px 16px 12px;
    display: flex; flex-direction: column; gap: 20px;
    -webkit-overflow-scrolling: touch;
}
.msg-wrapper {
    display: flex; flex-direction: column;
    animation: msgIn .35s cubic-bezier(.21,1,.33,1);
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.msg-wrapper.sent { align-items: flex-end; }
.msg-wrapper.received { align-items: flex-start; }
.msg-sender {
    font-size: 11px; color: #9ca3af; margin-bottom: 4px; padding: 0 8px;
    font-weight: 600; letter-spacing: .4px;
}
.content-row {
    display: flex; align-items: flex-start; gap: 8px;
}
.msg-wrapper.sent .content-row { flex-direction: row-reverse; }
.msg-wrapper.received .content-row { flex-direction: row; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.admin-avatar { background: linear-gradient(135deg,#0891b2,#3b82f6); }
.avatar.user-avatar { background: linear-gradient(135deg,#ea580c,#f97316); }
.msg-bubble {
    max-width: 78%; display: flex; flex-direction: column;
}
.msg-text {
    padding: 12px 16px; border-radius: 18px;
    font-size: 14px; line-height: 1.65; word-break: break-word;
    letter-spacing: .15px;
}
.msg-wrapper.sent .msg-text {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.msg-wrapper.received .msg-text {
    background: #ffffff;
    color: #1f2937;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.03);
}
.msg-image {
    max-width: 200px; max-height: 200px; border-radius: 14px;
    cursor: pointer; display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .2s;
}
.msg-image:hover { transform: scale(1.02); }
.msg-wrapper.sent .msg-image { border-bottom-right-radius: 6px; }
.msg-wrapper.received .msg-image { border-bottom-left-radius: 6px; }
.msg-video {
    max-width: 220px; max-height: 240px; border-radius: 14px; display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.msg-wrapper.sent .msg-video { border-bottom-right-radius: 6px; }
.msg-wrapper.received .msg-video { border-bottom-left-radius: 6px; }
.msg-caption {
    margin-top: 4px; font-size: 12px; line-height: 1.4;
    padding: 0 4px;
}
.msg-wrapper.sent .msg-caption { color: rgba(255,255,255,.7); }
.msg-wrapper.received .msg-caption { color: #6b7280; }
.msg-meta {
    display: flex; align-items: center; gap: 6px;
    margin-top: 3px; padding: 0 4px;
}
.msg-wrapper.sent .msg-meta { justify-content: flex-end; }
.msg-wrapper.received .msg-meta { justify-content: flex-start; }
.msg-time {
    font-size: 10px; color: #9ca3af; font-weight: 500;
    letter-spacing: .2px;
}
.msg-status {
    width: 14px; height: 14px; display: inline-flex;
    align-items: center; justify-content: center;
}
.msg-status .check { font-size: 10px; color: #93c5fd; line-height: 1; }

/* 消息已读/未读状态 */
.msg-read-status {
    font-size: 10px; font-weight: 600; padding: 2px 8px;
    border-radius: 10px; white-space: nowrap; letter-spacing: .3px;
}
.msg-read-status.unread {
    background: #fef3c7; color: #d97706;
}
.msg-read-status.read {
    background: #d1fae5; color: #059669;
}

/* 日期分割线 */
.date-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 4px 0;
}
.date-divider::before,
.date-divider::after {
    content: ''; flex: 1; height: 1px; background: #e5e7eb;
}
.date-divider span {
    font-size: 11px; color: #9ca3af; font-weight: 600;
    letter-spacing: .3px; white-space: nowrap;
}

/* ========== 聊天输入区域 ========== */
.chat-input-area {
    flex-shrink: 0; padding: 8px 12px 12px; background: #fff;
    display: flex; gap: 8px; align-items: center;
    border-top: 1px solid rgba(0,0,0,.05);
    position: relative; z-index: 10;
    box-shadow: 0 -2px 12px rgba(0,0,0,.03);
}
.chat-input-area .input-wrap {
    flex: 1; position: relative;
    display: flex; align-items: center;
}
.chat-input-area input[type="text"] {
    width: 100%; padding: 11px 18px;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px; font-size: 14px; outline: none;
    transition: all .25s; background: #f3f4f6;
}
.chat-input-area input[type="text"]:focus {
    border-color: #3b82f6; background: #fff;
    box-shadow: 0 0 0 4px rgba(59,130,246,.1);
}
.chat-input-area input[type="text"]::placeholder { color: #9ca3af; }

/* 图标按钮 */
.btn-icon {
    width: 40px; height: 40px; border: none;
    border-radius: 50%; font-size: 18px; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; color: #6b7280; line-height: 1;
    background: transparent;
}
.btn-icon:hover { background: #f3f4f6; color: #374151; }
.btn-icon:active { transform: scale(.92); }
.btn-plus {
    font-size: 20px; font-weight: 700;
    color: #3b82f6;
}
.btn-plus:hover { background: #eff6ff; color: #2563eb; }

/* 发送按钮 */
.btn-send {
    width: 44px; height: 44px; border: none; border-radius: 50%;
    background: var(--primary-gradient); color: #fff; cursor: pointer;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transition: all .25s; font-size: 18px;
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.btn-send:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(37,99,235,.4); }
.btn-send:active { transform: scale(.95); }

/* ========== 空状态 ========== */
.chat-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    color: #9ca3af; padding: 40px 20px;
}
.chat-empty .icon-wrap {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
}
.chat-empty .icon-wrap .icon { font-size: 36px; }
.chat-empty p { font-size: 15px; font-weight: 600; color: #6b7280; }
.chat-empty .sub { font-size: 13px; color: #d1d5db; }

/* ========== 表情面板 ========== */
.emoji-panel {
    position: absolute; bottom: calc(100% + 12px); right: 0;
    background: #fff; border: none;
    border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.06);
    padding: 10px; display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    max-height: 220px; overflow-y: auto; overflow-x: hidden;
    z-index: 100;
    min-width: 320px;
}
.emoji-item {
    font-size: 20px; cursor: pointer;
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: all .15s;
    user-select: none;
}
.emoji-item:hover { background: #f3f4f6; transform: scale(1.18); }

/* ========== 操作菜单（+） ========== */
.action-menu {
    display: none; position: absolute; bottom: calc(100% + 12px); right: 0;
    background: #fff; border: none;
    border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.06);
    z-index: 100; padding: 6px; min-width: 140px;
    overflow: hidden;
    animation: menuIn .2s cubic-bezier(.21,1,.33,1);
}
@keyframes menuIn {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.action-menu.show { display: block; }
.action-menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; font-size: 14px; font-weight: 500; color: #374151;
    cursor: pointer; border: none; background: none; width: 100%;
    text-align: left; transition: all .15s; border-radius: 10px;
}
.action-menu-item:hover { background: #f3f4f6; }
.action-menu-item:active { background: #e5e7eb; transform: scale(.98); }
.action-menu-item .icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }

/* ========== 管理后台 ========== */
.admin-layout { display: flex; height: calc(100vh - 56px); }
.admin-sidebar {
    width: 320px; min-width: 320px; background: var(--card);
    border-right: 1px solid var(--border); display: flex; flex-direction: column;
    overflow: hidden;
}
.admin-sidebar .sidebar-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: space-between;
    background: #fafbfc;
}
.admin-sidebar .sidebar-header .online-dot {
    width: 8px; height: 8px; background: var(--success); border-radius: 50%; display: inline-block;
    box-shadow: 0 0 8px rgba(16,185,129,.4);
}

.user-list { flex: 1; overflow-y: auto; }
.user-list-item {
    padding: 14px 20px; border-bottom: 1px solid #f3f4f6;
    cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: 12px;
}
.user-list-item:hover { background: #f9fafb; }
.user-list-item.active { background: var(--primary-light); border-left: 3px solid var(--primary); }
.user-list-item .avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary-gradient);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.user-list-item .user-info { flex: 1; min-width: 0; }
.user-list-item .user-info .uname { font-weight: 600; font-size: 14px; }
.user-list-item .user-info .upreview { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.user-list-item .user-info .utime { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.user-list-item .badge {
    background: var(--danger); color: #fff; font-size: 11px;
    min-width: 22px; height: 22px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center; padding: 0 6px;
    font-weight: 700; box-shadow: 0 2px 6px rgba(239,68,68,.3);
}
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); background: #fafbfc; }
.sidebar-footer .settings-link {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 0; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: var(--text-secondary);
    text-decoration: none; transition: all .2s;
}
.sidebar-footer .settings-link:hover {
    background: var(--primary-light); color: var(--primary);
}

.admin-chat-area { flex: 1; display: flex; flex-direction: column; overflow: visible; background: #f0f2f5; }
.admin-chat-placeholder {
    flex: 1; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 15px;
}
.admin-chat-header {
    padding: 12px 20px; background: var(--card);
    border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px;
    display: none; align-items: center; justify-content: space-between;
    flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.admin-chat-messages {
    flex: 1; overflow-y: auto; padding: 16px 20px;
    display: none; flex-direction: column; gap: 16px;
}
.admin-chat-input {
    padding: 12px 20px; background: var(--card);
    border-top: 1px solid var(--border); display: none; gap: 8px;
    align-items: center; position: relative; z-index: 10; overflow: visible;
}
.admin-chat-input input {
    flex: 1; padding: 10px 16px; border: 1.5px solid var(--border);
    border-radius: 24px; outline: none; font-size: 14px; transition: all .2s;
    background: #f9fafb;
}
.admin-chat-input input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(30,64,175,.1); }

/* ========== 签到日历 ========== */
.checkin-calendar {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px;
}
.checkin-day {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 10px 6px; gap: 2px;
    border-radius: 12px; font-weight: 700;
    background: #fecdd3; color: #db2777;
    transition: all .2s; font-size: 14px; line-height: 1.3; flex: 1;
}
.checkin-day.checked { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 2px 8px rgba(34,197,94,.25); }

/* ========== 通用工具类 ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.flex-1 { flex: 1; }

/* ========== 安装页面 ========== */
.install-container { max-width: 480px; margin: 40px auto; padding: 0 16px; }
.install-steps { display: flex; margin-bottom: 24px; }
.install-step {
    flex: 1; text-align: center; padding: 10px; font-size: 13px;
    font-weight: 600; color: var(--text-secondary); border-bottom: 3px solid var(--border);
    transition: all .2s;
}
.install-step.active { color: var(--primary); border-color: var(--primary); }
.install-step.completed { color: var(--success); border-color: var(--success); }

/* 滚动条美化 */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* 加载动画 */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
    width: 24px; height: 24px; border: 2.5px solid #e5e7eb;
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin .6s linear infinite; display: inline-block;
}

.empty-state { color: var(--text-secondary); font-size: 13px; padding: 24px 0; }

/* ========== 图片预览弹窗 ========== */
.img-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.85); z-index: 9999;
    align-items: center; justify-content: center;
    backdrop-filter: blur(8px);
}
.img-overlay.show { display: flex; }
.img-overlay img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,.3); }

/* ========== 上传遮罩 ========== */
.upload-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.45); z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.upload-progress-card {
    background: var(--card); padding: 28px 32px; border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0,0,0,.2);
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    min-width: 200px;
}
.upload-progress-card p { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

/* ========== 签到弹窗 ========== */
.checkin-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.5); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
    from { transform: scale(.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.checkin-modal {
    background: #fff; border-radius: 20px; width: 320px; max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden; animation: popIn .35s cubic-bezier(.34,1.56,.64,1);
}
.checkin-modal .modal-top {
    padding: 28px 24px 20px; text-align: center;
}
.checkin-modal .modal-top.success { background: linear-gradient(135deg,#ecfdf5,#d1fae5); }
.checkin-modal .modal-top.error { background: linear-gradient(135deg,#fef2f2,#fee2e2); }
.checkin-modal .modal-icon {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.checkin-modal .modal-icon.success { background: linear-gradient(135deg,#22c55e,#16a34a); color: #fff; }
.checkin-modal .modal-icon.error { background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; }
.checkin-modal .modal-title {
    font-size: 20px; font-weight: 700; margin-bottom: 4px;
}
.checkin-modal .modal-top.success .modal-title { color: #065f46; }
.checkin-modal .modal-top.error .modal-title { color: #991b1b; }
.checkin-modal .modal-subtitle {
    font-size: 13px; color: var(--text-secondary);
}
.checkin-modal .modal-reward {
     font-size: 40px; font-weight: 800; margin: 8px 0 2px;
}
.checkin-modal .modal-top.success .modal-reward { color: #16a34a; }
.checkin-modal .modal-body {
    padding: 20px 24px; text-align: center;
}
.checkin-modal .modal-day-tag {
    display: inline-block; padding: 6px 16px;
    background: linear-gradient(135deg,#fef3c7,#fde68a);
    color: #92400e; border-radius: 20px;
    font-size: 14px; font-weight: 600; margin: 8px 0 16px;
}
.checkin-modal .modal-close {
    display: block; width: 100%; padding: 14px;
    border: none; border-top: 1px solid #e5e7eb;
    background: #f9fafb; color: #6b7280;
    font-size: 15px; font-weight: 600; cursor: pointer;
    border-radius: 0 0 20px 20px; transition: background .2s;
}
.checkin-modal .modal-close:hover { background: #f3f4f6; color: #374151; }