/* ==================== 全局重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1a1a2e;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }
svg { width: 24px; height: 24px; }

/* ==================== 通用按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}
.btn svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45); }
.btn-secondary {
    background: #f1f3f9;
    color: #4a4a60;
    border: 1px solid #e4e7ef;
}
.btn-secondary:hover { background: #e8ebf3; }
.btn-android {
    background: linear-gradient(135deg, #3ddc84 0%, #2ba866 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(61, 220, 132, 0.35);
}
.btn-android:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(61, 220, 132, 0.45); }
.btn-ios {
    background: linear-gradient(135deg, #1a1a2e 0%, #4a4a6a 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 26, 46, 0.35);
}
.btn-ios:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26, 26, 46, 0.45); }

/* ==================== 提示框 ==================== */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-error { background: #fff0f0; color: #e53e3e; border: 1px solid #fed7d7; }
.alert-success { background: #f0fff4; color: #2f855a; border: 1px solid #c6f6d5; }

/* ==================== 登录页（前台/后台通用） ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}
.login-container { width: 100%; max-width: 400px; }
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
}
.app-icon {
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}
.app-icon svg { width: 36px; height: 36px; }
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.login-subtitle { font-size: 14px; color: #8b8b9e; margin-bottom: 24px; }
.login-form { text-align: left; }

.input-group { position: relative; margin-bottom: 16px; }
.input-group input[type="password"],
.input-group input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 16px;
    border: 2px solid #e8e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #fafafc;
    transition: all 0.2s ease;
}
.input-group input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
.input-group input::placeholder { color: #b0b0c0; }
.input-icon-left {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: #b0b0c0;
    display: flex;
}
.input-icon-left svg { width: 18px; height: 18px; }
.toggle-password {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    color: #b0b0c0;
    padding: 6px;
    display: flex;
}
.toggle-password svg { width: 18px; height: 18px; }
.login-footer {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    margin-top: 20px;
}

/* ==================== 前台 - App 列表页 ==================== */
.list-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f5f7fa 0%, #e8ecf3 100%);
}
.list-container { max-width: 640px; margin: 0 auto; padding: 24px 20px 40px; }
.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.header-title { display: flex; align-items: center; gap: 12px; }
.app-icon-small {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px rgba(102,126,234,0.35);
    flex-shrink: 0;
}
.app-icon-small svg { width: 24px; height: 24px; }
.page-title { font-size: 20px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: #8b8b9e; margin-top: 2px; }
.logout-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    color: #8b8b9e;
    border: 1px solid #e8e8f0;
    transition: all 0.2s;
    flex-shrink: 0;
}
.logout-btn:hover { color: #e53e3e; border-color: #fed7d7; background: #fff0f0; }
.logout-btn svg { width: 18px; height: 18px; }

.app-grid { display: flex; flex-direction: column; gap: 12px; }
.app-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.03);
}
.app-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.app-card-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.app-card-icon svg { width: 28px; height: 28px; }
.app-card-info { flex: 1; min-width: 0; }
.app-card-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.app-card-version {
    display: inline-block;
    font-size: 11px;
    color: #667eea;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
}
.app-card-desc {
    font-size: 13px;
    color: #8b8b9e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-card-arrow { color: #c0c0d0; flex-shrink: 0; }
.app-card-arrow svg { width: 20px; height: 20px; }

/* 简洁版应用列表（仅图标+名称） */
.app-grid-simple {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 20px 16px;
    padding: 8px 4px;
}
.app-card-simple {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 16px;
    transition: transform 0.2s ease;
}
.app-card-simple:hover {
    transform: translateY(-3px);
    box-shadow: none;
    background: rgba(102,126,234,0.05);
}
.app-card-icon-simple {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    overflow: hidden;
}
.app-card-icon-simple svg {
    width: 30px;
    height: 30px;
}
.app-card-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}
.app-card-name-simple {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
    word-break: break-all;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #b0b0c0;
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

.list-footer {
    text-align: center;
    font-size: 12px;
    color: #b0b0c0;
    margin-top: 32px;
}

/* ==================== 前台 - 下载详情页 ==================== */
.download-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f5f7fa 0%, #e8ecf3 100%);
}
.download-container { max-width: 640px; margin: 0 auto; padding: 24px 20px 40px; }
.download-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}
.back-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    color: #4a4a60;
    border: 1px solid #e8e8f0;
    transition: all 0.2s;
    flex-shrink: 0;
}
.back-btn:hover { background: #f0f2f8; }
.back-btn svg { width: 18px; height: 18px; }
.app-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.app-icon-large {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.app-icon-large svg { width: 28px; height: 28px; }
.app-text { display: flex; flex-direction: column; gap: 4px; }
.app-name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.app-version {
    font-size: 12px;
    color: #667eea;
    background: #eef2ff;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}
.app-description {
    text-align: center;
    font-size: 14px;
    color: #6b6b80;
    margin-bottom: 24px;
    line-height: 1.6;
}

.download-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
}
@media (min-width: 560px) {
    .download-cards { grid-template-columns: 1fr 1fr; }
}
.download-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.04);
}
.download-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.1); }
.card-icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
}
.android-icon { background: linear-gradient(135deg, #e6f9ef 0%, #d4f5e3 100%); color: #2ba866; }
.ios-icon { background: linear-gradient(135deg, #ececf3 0%, #dddde8 100%); color: #1a1a2e; }
.card-icon svg { width: 32px; height: 32px; }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.card-desc { font-size: 13px; color: #8b8b9e; margin-bottom: 18px; line-height: 1.5; }
.card-tip { font-size: 11px; color: #b0b0c0; margin-top: 12px; line-height: 1.5; }

.install-guide {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    border: 1px solid rgba(0,0,0,0.04);
}
.guide-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.guide-title::before {
    content: "";
    width: 4px; height: 16px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}
.guide-steps { list-style: none; counter-reset: step; padding: 0; }
.guide-steps li {
    counter-increment: step;
    position: relative;
    padding: 8px 0 8px 32px;
    font-size: 13px;
    color: #4a4a60;
    line-height: 1.6;
    border-bottom: 1px dashed #f0f0f5;
}
.guide-steps li:last-child { border-bottom: none; }
.guide-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 8px;
    width: 22px; height: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.download-footer {
    text-align: center;
    font-size: 12px;
    color: #b0b0c0;
    line-height: 1.6;
}

/* ==================== 后台管理系统 ==================== */
.admin-page {
    background: #f5f7fa;
    min-height: 100vh;
}
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sidebar-icon svg { width: 20px; height: 20px; color: #fff; }
.sidebar-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-nav { flex: 1; padding: 12px 10px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    margin-bottom: 4px;
    transition: all 0.2s;
    text-decoration: none;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}
.sidebar-footer { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.nav-item.logout:hover { background: rgba(233,69,96,0.2); color: #e94560; }

/* 主内容区 */
.admin-main {
    flex: 1;
    padding: 24px 28px;
    min-width: 0;
    overflow-x: auto;
}
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.admin-page-title { font-size: 22px; font-weight: 700; }
.admin-page-subtitle { font-size: 13px; color: #8b8b9e; margin-top: 4px; }

/* 统计卡片 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 12px; color: #8b8b9e; margin-top: 2px; }

/* 表格卡片 */
.admin-table-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}
.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f5;
}
.table-header h3 { font-size: 16px; font-weight: 600; }
.table-responsive { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    text-align: left;
    padding: 12px 16px;
    background: #fafbfc;
    color: #8b8b9e;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f5;
    white-space: nowrap;
}
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f8;
    vertical-align: middle;
}
.admin-table tbody tr:hover { background: #fafbfc; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.text-center { text-align: center; }
.text-muted { color: #b0b0c0; font-size: 12px; }

.table-app-name { display: flex; align-items: center; gap: 10px; }
.table-app-dot {
    width: 32px; height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}
.app-name-text { font-weight: 600; font-size: 14px; }
.app-desc-text { font-size: 12px; color: #8b8b9e; margin-top: 2px; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.badge-version { background: #eef2ff; color: #667eea; }
.badge-active { background: #f0fff4; color: #2f855a; }
.badge-inactive { background: #fff5f5; color: #e53e3e; }

.table-actions { display: flex; gap: 6px; justify-content: center; }
.action-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}
.action-btn svg { width: 16px; height: 16px; }
.action-view { color: #667eea; background: #eef2ff; }
.action-view:hover { background: #667eea; color: #fff; }
.action-edit { color: #f59e0b; background: #fef3c7; }
.action-edit:hover { background: #f59e0b; color: #fff; }
.action-delete { color: #e53e3e; background: #fff0f0; }
.action-delete:hover { background: #e53e3e; color: #fff; }
.action-source { color: #10b981; background: #ecfdf5; }
.action-source:hover { background: #10b981; color: #fff; }
.action-qrcode { color: #8b5cf6; background: #f5f3ff; }
.action-qrcode:hover { background: #8b5cf6; color: #fff; }
.action-copy { color: #0ea5e9; background: #f0f9ff; }
.action-copy:hover { background: #0ea5e9; color: #fff; }

/* 表单卡片 */
.admin-form-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}
.form-section { margin-bottom: 28px; }
.form-section:last-of-type { margin-bottom: 0; }
.form-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-section-title::before {
    content: "";
    width: 4px; height: 16px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}
.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.form-group { flex: 1; min-width: 200px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a4a60;
    margin-bottom: 8px;
}
.required { color: #e53e3e; }
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e8e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fafafc;
    transition: all 0.2s;
    color: #1a1a2e;
}
.form-input:focus, .form-textarea:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.form-hint { font-size: 12px; color: #b0b0c0; margin-top: 6px; line-height: 1.5; }

.platform-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 6px;
    vertical-align: middle;
}
.android-tag { background: #e6f9ef; color: #2ba866; }
.ios-tag { background: #ececf3; color: #1a1a2e; }

.color-picker-wrap { display: flex; gap: 10px; align-items: center; }
.form-color {
    width: 48px; height: 42px;
    border: 2px solid #e8e8f0;
    border-radius: 10px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
}
.color-text { flex: 1; }

/* 开关 */
.switch-wrap { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #d0d0dc;
    transition: 0.3s;
    border-radius: 26px;
}
.switch-slider::before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: #fff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch-label { font-size: 13px; color: #6b6b80; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f5;
    margin-top: 8px;
}

/* ==================== 文件上传 ==================== */
.file-upload-area {
    position: relative;
}
.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}
.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 20px;
    border: 2px dashed #d0d0dc;
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.file-upload-label:hover {
    border-color: #667eea;
    background: #f5f7ff;
}
.file-upload-area.drag-over .file-upload-label {
    border-color: #667eea;
    border-style: solid;
    background: #e8eeff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
}
.file-upload-area.drag-over .file-upload-label svg {
    transform: scale(1.1);
    color: #667eea;
}
.file-upload-label svg {
    width: 32px;
    height: 32px;
    color: #b0b0c0;
}
.file-upload-label:hover svg {
    color: #667eea;
}
.file-upload-text {
    font-size: 14px;
    font-weight: 600;
    color: #4a4a60;
}
.file-upload-hint {
    font-size: 12px;
    color: #b0b0c0;
}
.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-top: 10px;
    background: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-radius: 10px;
}
.file-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.android-file-icon {
    background: #e6f9ef;
    color: #2ba866;
}
.ios-file-icon {
    background: #ececf3;
    color: #1a1a2e;
}
.file-icon svg {
    width: 20px;
    height: 20px;
}
.file-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #2b5cb8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-clear {
    font-size: 12px;
    color: #e53e3e;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #fed7d7;
    flex-shrink: 0;
    transition: all 0.2s;
}
.file-clear:hover {
    background: #fff0f0;
}

/* 异步上传进度条 */
.upload-progress {
    margin-top: 12px;
    padding: 14px 16px;
    background: #f0f4ff;
    border: 1px solid #c3dafe;
    border-radius: 10px;
}
.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.2s ease;
}
.upload-progress-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #4a5568;
    text-align: center;
}

/* 正方形图标上传框 */
.form-row-with-icon {
    align-items: flex-start;
    gap: 24px;
}
.icon-upload-group {
    flex-shrink: 0;
    width: 120px;
}
.icon-upload-box {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 2px dashed #cbd5e0;
    background: #f7fafc;
    overflow: hidden;
    transition: all 0.2s;
}
.icon-upload-box:hover {
    border-color: #667eea;
    background: #f0f4ff;
}
.icon-upload-box.drag-over {
    border-color: #667eea;
    border-style: solid;
    background: #e8eeff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
    transform: scale(1.02);
}
.icon-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}
.icon-upload-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}
.icon-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #a0aec0;
    font-size: 12px;
}
.icon-upload-placeholder svg {
    width: 28px;
    height: 28px;
}
.icon-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 3;
    border-radius: 14px;
}
.icon-upload-progress {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255,255,255,0.95);
    z-index: 4;
    border-radius: 14px;
}
.icon-progress-bar {
    width: 80%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}
.icon-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.2s ease;
}
.icon-upload-progress span {
    font-size: 12px;
    color: #4a5568;
    font-weight: 500;
}
.icon-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 6;
    transition: background 0.2s;
}
.icon-remove-btn:hover {
    background: rgba(229,62,62,0.8);
}
.icon-remove-btn svg {
    width: 14px;
    height: 14px;
}

.current-file-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #fafbfc;
    border-radius: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}
.current-file-label {
    color: #8b8b9e;
    font-weight: 600;
}
.current-file-name {
    color: #2b5cb8;
    font-weight: 600;
    word-break: break-all;
}
.current-file-tip {
    color: #b0b0c0;
}

/* ==================== 下载页 v2 设计 ==================== */
.dl-page {
    margin: 0;
    padding: 0;
    background: #f5f6fa;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Hero 渐变区 */
.dl-hero {
    position: relative;
    overflow: hidden;
    padding-bottom: 80px;
    --app-color: #667eea;
}
.dl-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--app-color) 90%, #fff) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, color-mix(in srgb, var(--app-color) 60%, #000) 0%, transparent 50%),
        linear-gradient(160deg, var(--app-color) 0%, color-mix(in srgb, var(--app-color) 50%, #0a0e27) 100%);
}
/* 网格纹理 */
.dl-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    pointer-events: none;
}
.dl-hero-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}
/* 装饰光斑 */
.dl-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    animation: orbFloat 8s ease-in-out infinite;
}
.dl-hero-orb.orb-1 {
    width: 200px;
    height: 200px;
    top: -40px;
    right: -30px;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
    animation-delay: 0s;
}
.dl-hero-orb.orb-2 {
    width: 160px;
    height: 160px;
    bottom: 20px;
    left: -40px;
    background: radial-gradient(circle, rgba(100,180,255,0.3) 0%, transparent 70%);
    animation-delay: -3s;
}
.dl-hero-orb.orb-3 {
    width: 120px;
    height: 120px;
    top: 40%;
    right: 15%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation-delay: -5s;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -15px) scale(1.05); }
}
/* 装饰圆环 */
.dl-hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    pointer-events: none;
}
.dl-hero-ring.ring-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}
.dl-hero-ring.ring-2 {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -60px;
    border-width: 2px;
    border-color: rgba(255,255,255,0.05);
}
.dl-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.dl-hero-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: env(safe-area-inset-top, 16px);
    padding-top: 16px;
    height: 52px;
}
.dl-back-btn, .dl-logout-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.2s;
}
.dl-back-btn:hover, .dl-logout-btn:hover {
    background: rgba(255,255,255,0.28);
}
.dl-back-btn svg, .dl-logout-btn svg {
    width: 20px;
    height: 20px;
}
.dl-hero-title {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    font-weight: 600;
}

/* 应用信息 */
.dl-hero-app {
    text-align: center;
    padding: 24px 0 0;
}
.dl-app-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 18px;
    position: relative;
}
.dl-app-icon-inner {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.dl-app-icon-inner svg {
    width: 44px;
    height: 44px;
}
.dl-app-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 22px;
}
.dl-app-name {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}
.dl-app-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.dl-app-version {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.dl-app-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.dl-tag-android {
    background: rgba(61,220,132,0.25);
    color: #a7f3d0;
}
.dl-tag-ios {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.dl-app-desc {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* 内容区 */
.dl-content {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 20px 40px;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

/* 区块标题 */
.dl-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
    padding-left: 4px;
}
.dl-section-dot {
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--app-color, #667eea) 0%, color-mix(in srgb, var(--app-color, #667eea) 70%, #000) 100%);
    border-radius: 2px;
}

/* 平台下载卡片 */
.dl-download-section {
    margin-bottom: 24px;
}
.dl-platform-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dl-platform-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 18px;
    padding: 18px 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}
.dl-platform-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    opacity: 0;
    transition: opacity 0.25s;
}
.dl-card-android::before {
    background: linear-gradient(180deg, #3ddc84, #2ba866);
}
.dl-card-ios::before {
    background: linear-gradient(180deg, #1a1a2e, #4a4a6a);
}
.dl-platform-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.1);
}
.dl-platform-card:hover::before {
    opacity: 1;
}
.dl-platform-card:active {
    transform: translateY(0);
}
.dl-platform-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dl-card-android .dl-platform-icon {
    background: linear-gradient(135deg, #e6f9ef 0%, #d4f5e3 100%);
    color: #2ba866;
}
.dl-card-ios .dl-platform-icon {
    background: linear-gradient(135deg, #ececf3 0%, #dddde8 100%);
    color: #1a1a2e;
}
.dl-platform-icon svg {
    width: 28px;
    height: 28px;
}
.dl-platform-info {
    flex: 1;
    min-width: 0;
}
.dl-platform-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.dl-platform-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}
.dl-platform-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f0f2f8;
    color: #6b6b80;
    letter-spacing: 0.5px;
}
.dl-platform-desc {
    font-size: 12px;
    color: #8b8b9e;
}
.dl-download-arrow {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s;
}
.dl-card-android .dl-download-arrow {
    background: linear-gradient(135deg, #3ddc84 0%, #2ba866 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(61,220,132,0.35);
}
.dl-card-ios .dl-download-arrow {
    background: linear-gradient(135deg, #1a1a2e 0%, #4a4a6a 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26,26,46,0.35);
}
.dl-platform-card:hover .dl-download-arrow {
    transform: scale(1.08);
}
.dl-download-arrow svg {
    width: 18px;
    height: 18px;
}

/* 空状态 */
.dl-empty {
    background: #fff;
    border-radius: 18px;
    padding: 48px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.dl-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #f5f6fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0c0d0;
}
.dl-empty-icon svg {
    width: 32px;
    height: 32px;
}
.dl-empty-text {
    color: #8b8b9e;
    font-size: 14px;
}

/* iOS 安装步骤 */
.dl-steps-section {
    margin-bottom: 24px;
}
.dl-steps-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.dl-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.dl-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--app-color, #667eea) 0%, color-mix(in srgb, var(--app-color, #667eea) 70%, #000) 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.dl-step-content {
    flex: 1;
    padding-bottom: 4px;
}
.dl-step-text {
    font-size: 13px;
    color: #4a4a60;
    line-height: 1.6;
}
.dl-step-line {
    width: 2px;
    height: 16px;
    background: #e8e8f0;
    margin-left: 12px;
    margin-bottom: 4px;
}

/* 提示卡片 */
.dl-tip-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 24px;
}
.dl-tip-card svg {
    width: 18px;
    height: 18px;
    color: #d97706;
    flex-shrink: 0;
    margin-top: 1px;
}
.dl-tip-card p {
    font-size: 12px;
    color: #92400e;
    line-height: 1.6;
}

/* 页脚 */
.dl-footer {
    text-align: center;
    padding: 8px 0 0;
}
.dl-footer p {
    font-size: 12px;
    color: #b0b0c0;
    line-height: 1.6;
}
.dl-footer-sub {
    margin-top: 2px;
    font-size: 11px !important;
    color: #c8c8d8 !important;
}

/* 短链接密码页 */
.dl-login-section {
    margin-bottom: 24px;
}
.dl-login-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    text-align: center;
}
.dl-login-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--app-color, #667eea) 0%, color-mix(in srgb, var(--app-color, #667eea) 70%, #000) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 6px 20px rgba(102,126,234,0.35);
}
.dl-login-icon svg {
    width: 26px;
    height: 26px;
}
.dl-login-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}
.dl-login-subtitle {
    font-size: 13px;
    color: #8b8b9e;
    margin-bottom: 24px;
}
.dl-login-form {
    text-align: left;
}
.dl-input-group {
    position: relative;
    margin-bottom: 16px;
}
.dl-input-group input {
    width: 100%;
    height: 50px;
    padding: 0 48px 0 16px;
    border: 2px solid #e8e8f0;
    border-radius: 14px;
    font-size: 15px;
    background: #fafbfc;
    transition: all 0.2s;
    color: #1a1a2e;
}
.dl-input-group input:focus {
    border-color: var(--app-color, #667eea);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}
.dl-toggle-pwd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0b0c0;
    padding: 6px;
    display: flex;
}
.dl-toggle-pwd svg {
    width: 20px;
    height: 20px;
}
.dl-login-btn {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--app-color, #667eea) 0%, color-mix(in srgb, var(--app-color, #667eea) 70%, #000) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 20px rgba(102,126,234,0.35);
}
.dl-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.45);
}
.dl-login-btn:active {
    transform: translateY(0);
}

/* 后台短链接输入 */
.short-link-input-wrap {
    display: flex;
    align-items: center;
    border: 2px solid #e8e8f0;
    border-radius: 10px;
    background: #fafbfc;
    overflow: hidden;
    transition: all 0.2s;
}
.short-link-input-wrap:focus-within {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}
.short-link-prefix {
    padding: 0 10px 0 14px;
    font-size: 14px;
    color: #8b8b9e;
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid #e8e8f0;
    height: 40px;
    display: flex;
    align-items: center;
}
.short-link-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 40px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
}
.short-link-input:focus {
    box-shadow: none !important;
}
.form-hint-inline {
    font-size: 11px;
    color: #b0b0c0;
    font-weight: 400;
    margin-left: 6px;
}
.short-link-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #8b8b9e;
    flex-wrap: wrap;
}
.short-link-code {
    background: #f0f2f8;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: monospace;
    color: #2b5cb8;
    font-weight: 600;
}
.copy-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e4e7ef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b6b80;
    cursor: pointer;
    transition: all 0.2s;
}
.copy-btn:hover {
    background: #f0f2f8;
    color: #667eea;
}
.copy-btn svg {
    width: 14px;
    height: 14px;
}

/* 后台列表短链接徽章 */
.short-link-row {
    margin-top: 3px;
}
.short-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2ff;
    color: #667eea;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.short-link-badge:hover {
    background: #667eea;
    color: #fff;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .admin-sidebar { width: 60px; }
    .sidebar-title, .nav-item span, .sidebar-logo span { display: none; }
    .nav-item { justify-content: center; padding: 10px; }
    .admin-main { padding: 16px; }
    .stats-row { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
}
@media (max-width: 480px) {
    .login-card { padding: 32px 24px 24px; }
    .login-title { font-size: 20px; }
    .list-container, .download-container { padding: 16px 14px 32px; }
    .app-name { font-size: 17px; }
    .download-card { padding: 20px 16px; }
    .admin-form-card { padding: 16px; }
}

/* Switch 开关 */
.table-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    vertical-align: middle;
}
.table-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.table-switch input:checked + .toggle-slider {
    background-color: #667eea;
}
.table-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}
.table-switch input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 二维码弹窗 */
.qrcode-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.qrcode-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 320px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: qrcodeFadeIn 0.2s ease;
}
@keyframes qrcodeFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.qrcode-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.qrcode-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}
.qrcode-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.qrcode-close:hover {
    background: #f5f5f5;
    color: #333;
}
.qrcode-close svg {
    width: 18px;
    height: 18px;
}
.qrcode-modal-body {
    padding: 24px 20px;
    text-align: center;
}
.qrcode-box {
    display: inline-block;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 16px;
}
.qrcode-box img,
.qrcode-box canvas {
    display: block;
}
.qrcode-url {
    font-size: 12px;
    color: #888;
    word-break: break-all;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}
.qrcode-copy-btn {
    width: 100%;
    justify-content: center;
}
