/* ===== 基础 ===== */
.admin-body, .install-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f6f8;
    margin: 0;
    color: #1f2329;
    font-size: 14px;
    line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }

a { color: #1677ff; text-decoration: none; }
a:hover { color: #4096ff; }

/* ===== 侧栏布局（国内后台常见结构） ===== */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #001529;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
}
.admin-main { flex: 1; margin-left: 220px; min-width: 0; display: flex; flex-direction: column; }
.sidebar-brand {
    padding: 18px 20px 16px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: rgba(255,255,255,.75);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    transition: background .15s, color .15s;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-link.active { color: #fff; background: #1677ff; }
.sidebar-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: 13px;
}
.sidebar-user { display: block; color: rgba(255,255,255,.55); margin-bottom: 6px; }
.sidebar-logout { color: rgba(255,255,255,.85); font-size: 13px; }
.sidebar-logout:hover { color: #fff; }

.admin-page-head {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.page-head-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 32px; }
.back-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 6px;
    color: #4e5969;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
    border: 1px solid #e8e8e8;
}
.back-link:hover { background: #e6f4ff; color: #1677ff; border-color: #91caff; }
.back-link-editor { flex-shrink: 0; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; font-size: 14px; color: #86909c; }
.breadcrumb a { color: #4e5969; }
.breadcrumb a:hover { color: #1677ff; }
.breadcrumb-sep { color: #c9cdd4; margin: 0 6px; user-select: none; }
.breadcrumb-current { color: #1f2329; font-weight: 500; }
.page-head-title { margin: 0; font-size: 18px; font-weight: 600; color: #1f2329; }

/* 旧顶栏（登录页等保留兼容） */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.topbar a { color: #4e5969; text-decoration: none; margin-left: 20px; font-size: 14px; }
.topbar a:hover, .topbar a.active { color: #1677ff; }
.brand { font-weight: 600; font-size: 17px; color: #1f2329; }
.topbar .user { color: #86909c; margin-left: 20px; font-size: 13px; }

/* ===== 内容区（全站统一宽度） ===== */
.admin-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 32px;
    width: 100%;
}
/* 兼容旧类名 */
.container,
.container-wide { max-width: 1280px; margin: 0 auto; padding: 20px 24px 32px; width: 100%; }

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.card h2, .card h3 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.card h3 { font-size: 15px; color: #4e5969; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; text-align: left; font-size: 14px; }
th { background: #fafafa; font-weight: 600; color: #4e5969; font-size: 13px; }
tr:hover td { background: #fafbfc; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, box-shadow .15s;
    line-height: 1.4;
}
.btn:hover { background: #4096ff; color: #fff; }
.btn-secondary { background: #fff; color: #4e5969; border: 1px solid #d9d9d9; }
.btn-secondary:hover { color: #1677ff; border-color: #1677ff; background: #fff; }
.btn-danger { background: #ff4d4f; }
.btn-danger:hover { background: #ff7875; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn-ghost { background: transparent; color: #4e5969; border: 1px solid transparent; }
.btn-ghost:hover { background: #f5f5f5; color: #1677ff; }

/* ===== 表单控件 ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #4e5969; font-size: 13px; }
.form-group .hint { font-weight: normal; color: #86909c; font-size: 12px; margin-top: 4px; }
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22,119,255,.12);
}
.form-group input[type="color"] { width: 48px; height: 36px; padding: 2px; border-radius: 6px; cursor: pointer; }
.form-group input[type="checkbox"] { width: auto; margin-right: 6px; accent-color: #1677ff; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 16px; }
.checkbox-row label { display: inline-flex; align-items: center; font-weight: normal; cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ===== 提示 ===== */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }
.alert-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }

/* ===== 标签 ===== */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.tag-published { background: #f6ffed; color: #389e0d; }
.tag-draft { background: #fff7e6; color: #d46b08; }
.tag-offline { background: #f5f5f5; color: #8c8c8c; }
.tag-blocked { background: #fff2f0; color: #cf1322; }
.tag-converted { background: #e6f4ff; color: #0958d9; }
.tag-region { background: #f0f5ff; color: #2f54eb; border: 1px solid #adc6ff; padding: 4px 10px; border-radius: 20px; }
.tag-region .tag-remove { cursor: pointer; opacity: .6; font-size: 14px; line-height: 1; margin-left: 2px; }
.tag-region .tag-remove:hover { opacity: 1; color: #ff4d4f; }

/* ===== 安装向导 ===== */
.install-box { max-width: 640px; margin: 40px auto; background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.steps { display: flex; gap: 8px; margin-bottom: 24px; }
.step { flex: 1; text-align: center; padding: 8px; background: #f5f5f5; border-radius: 6px; font-size: 13px; }
.step.active { background: #1677ff; color: #fff; }

/* ===== 落地页编辑器 ===== */
.page-editor { margin: 0; }
.editor-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 16px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    background: #f5f6f8;
    z-index: 50;
    gap: 12px;
    flex-wrap: wrap;
}
.editor-topbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.editor-topbar h1 { margin: 0; font-size: 18px; font-weight: 600; }
.editor-actions { display: flex; align-items: center; gap: 10px; }
.editor-actions select { padding: 7px 12px; border-radius: 8px; border: 1px solid #d9d9d9; font-size: 14px; }

.editor-split { display: flex; gap: 20px; align-items: flex-start; }
.editor-main { flex: 1; min-width: 0; }
.editor-preview { width: 360px; flex-shrink: 0; position: sticky; top: 130px; }

/* 正文 + 表单配置 左右分栏 */
.card-meta { margin-bottom: 16px; }
.content-form-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
.content-column h3,
.form-config-column .fields-toolbar h3,
.form-config-column .card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: #1f2329; }
.content-column .tox-tinymce { border-radius: 8px; }
.form-config-column { min-width: 0; }
.form-config-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-config-panel .card { margin-bottom: 0; }
.filter-mode-hint {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f6f8fa;
    border-radius: 8px;
    border-left: 3px solid #1677ff;
    line-height: 1.55;
}
.settings-test-box {
    margin-top: 8px;
    padding: 16px;
    background: #fafbfc;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
}
.settings-test-box > label { display: block; font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.settings-test-row { display: flex; gap: 10px; }
.settings-test-row input { flex: 1; padding: 9px 12px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 14px; }
.test-result { margin-top: 12px; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.test-result-loading { background: #f0f5ff; color: #1677ff; }
.test-result-ok { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.test-result-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }
.form-config-column .field-card-body { grid-template-columns: 1fr; }
.form-config-column .field-card-preview { grid-column: auto; }
.form-config-column .button-designer-stack { grid-template-columns: 1fr; gap: 12px; }
.button-designer-preview-sm { min-height: auto; padding: 12px; }
.button-designer-preview-sm .btn-preview-sample { max-width: 100%; }
.region-picker-compact .region-picker-row { gap: 6px; }
.region-picker-compact .region-picker-row select { flex: 1; min-width: 0; padding: 7px 8px; font-size: 13px; }
.region-picker-compact .region-picker-row .btn { flex-shrink: 0; }

/* Tab 导航 */
.editor-tabs {
    display: flex;
    gap: 4px;
    background: #fff;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    margin-bottom: 16px;
}
.editor-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4e5969;
    transition: all .15s;
    text-align: center;
}
.editor-tab:hover { background: #f5f5f5; color: #1677ff; }
.editor-tab.active { background: #1677ff; color: #fff; box-shadow: 0 2px 6px rgba(22,119,255,.3); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 表单字段卡片 */
.field-cards { display: flex; flex-direction: column; gap: 12px; }
.field-card {
    background: #fafbfc;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
    transition: border-color .15s, box-shadow .15s;
}
.field-card:hover { border-color: #91caff; box-shadow: 0 2px 8px rgba(22,119,255,.08); }
.field-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.field-card-title { font-weight: 600; font-size: 14px; color: #1f2329; }
.field-card-actions { display: flex; gap: 4px; }
.field-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-card-preview {
    grid-column: 1 / -1;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed #d9d9d9;
}
.field-card-preview label { font-size: 12px; color: #86909c; margin-bottom: 4px; display: block; }
.field-card-preview input,
.field-card-preview textarea,
.field-card-preview select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
    background: #fafafa;
}
.field-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #e6f4ff;
    color: #0958d9;
    margin-left: 8px;
}
.fields-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.fields-toolbar h3 { margin: 0; }

/* 按钮设计器 */
.button-designer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.button-designer-compact .button-designer-preview { min-height: 140px; padding: 20px; }

/* 表单与转化 - 双列布局 */
.form-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.form-settings-grid .card { margin-bottom: 0; }
.field-card-preview input,
.field-card-preview textarea,
.field-card-preview select {
    opacity: .85;
    cursor: not-allowed;
}
.button-designer-controls { display: flex; flex-direction: column; gap: 14px; }
.button-designer-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e8e8e8;
}
.button-designer-preview .preview-label { font-size: 12px; color: #86909c; margin-bottom: 16px; }
.btn-preview-sample {
    display: block;
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: default;
    text-align: center;
    transition: all .2s;
}
/* 预览区复用落地页按钮动效 */
.btn-preview-sample.lp-anim-pulse { animation: lp-anim-pulse 2s ease-in-out infinite; }
.btn-preview-sample.lp-anim-breathe { animation: lp-anim-breathe 2.4s ease-in-out infinite; }
.btn-preview-sample.lp-anim-glow { animation: lp-anim-glow 2s ease-in-out infinite; }
.btn-preview-sample.lp-anim-shake { animation: lp-anim-shake 3s ease-in-out infinite; }
.btn-preview-sample.lp-anim-bounce { animation: lp-anim-bounce 2s ease-in-out infinite; }
@keyframes lp-anim-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }
@keyframes lp-anim-breathe { 0%,100%{transform:scale(1);box-shadow:0 4px 14px rgba(0,0,0,.12)} 50%{transform:scale(1.02);box-shadow:0 8px 24px rgba(0,0,0,.18)} }
@keyframes lp-anim-glow { 0%,100%{box-shadow:0 0 0 0 rgba(255,87,34,.45)} 50%{box-shadow:0 0 0 10px rgba(255,87,34,0)} }
@keyframes lp-anim-shake { 0%,90%,100%{transform:translateX(0)} 92%{transform:translateX(-3px)} 94%{transform:translateX(3px)} 96%{transform:translateX(-2px)} 98%{transform:translateX(2px)} }
@keyframes lp-anim-bounce { 0%,100%{transform:translateY(0)} 40%{transform:translateY(-4px)} 60%{transform:translateY(-2px)} }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type="color"] { flex-shrink: 0; }
.color-row input[type="text"] { flex: 1; }
.radius-row { display: flex; align-items: center; gap: 12px; }
.radius-row input[type="range"] { flex: 1; accent-color: #1677ff; }

/* 地域选择器 */
.region-picker {
    background: #fafbfc;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
}
.region-picker-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.region-picker-row .form-group { margin-bottom: 0; flex: 1; min-width: 120px; }
.region-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; min-height: 36px; }
.region-tags-empty { color: #86909c; font-size: 13px; padding: 8px 0; }

/* 设置页 */
.settings-section { margin-bottom: 24px; }
.settings-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.settings-note {
    background: #f6f8fa;
    border-left: 3px solid #1677ff;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #4e5969;
    margin-bottom: 16px;
}
.settings-note a { color: #1677ff; }

/* 预览面板 */
.preview-panel { background: #fff; border-radius: 14px; border: 1px solid #e8e8e8; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.preview-header {
    padding: 14px 18px;
    background: linear-gradient(180deg, #fafafa, #fff);
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.preview-header span { color: #86909c; font-weight: normal; font-size: 12px; }
.preview-phone { background: #1a1a2e; padding: 14px; }
.preview-phone iframe { width: 100%; height: 640px; border: none; border-radius: 10px; background: #fff; display: block; }

/* 折叠 */
.editor-collapsible summary { cursor: pointer; font-weight: 600; padding: 8px 0; list-style: none; }
.editor-collapsible summary::-webkit-details-marker { display: none; }
.editor-collapsible[open] summary { margin-bottom: 12px; }

/* ===== 仪表盘 ===== */
.dashboard-welcome { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 16px; }
.dashboard-welcome h1 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.dashboard-actions { display: flex; gap: 10px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.stat-card-label { font-size: 13px; color: #86909c; margin-bottom: 8px; }
.stat-card-value { font-size: 28px; font-weight: 700; color: #1f2329; line-height: 1.2; }
.stat-card-sub { font-size: 12px; color: #86909c; margin-top: 8px; }
.stat-card-blue { border-top: 3px solid #1677ff; }
.stat-card-green { border-top: 3px solid #52c41a; }
.stat-card-orange { border-top: 3px solid #fa8c16; }
.dashboard-ticker-card { margin-bottom: 20px; overflow: hidden; }
.dashboard-ticker-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.dashboard-ticker-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.dashboard-ticker {
    position: relative;
    background: linear-gradient(90deg, #f7f9fc 0%, #fff 50%, #f7f9fc 100%);
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 0;
    overflow: hidden;
}
.dashboard-ticker::before,
.dashboard-ticker::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 1;
    pointer-events: none;
}
.dashboard-ticker::before { left: 0; background: linear-gradient(90deg, #f7f9fc, transparent); }
.dashboard-ticker::after { right: 0; background: linear-gradient(270deg, #f7f9fc, transparent); }
.dashboard-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    white-space: nowrap;
    padding: 0 16px;
    animation: dashboard-ticker-scroll 40s linear infinite;
}
.dashboard-ticker-track:hover { animation-play-state: paused; }
.dashboard-ticker-item { font-size: 13px; color: #1f2329; }
.dashboard-ticker-item.ticker-visit { color: #1677ff; }
.dashboard-ticker-item.ticker-submit { color: #389e0d; }
.dashboard-ticker-sep { color: #c9cdd4; font-size: 12px; }
.dashboard-ticker-placeholder { color: #86909c; }
@keyframes dashboard-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.page-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.page-header-row h2 { margin: 0; }
.text-muted { color: #86909c; font-size: 13px; }
.empty-state { text-align: center; padding: 40px 20px; color: #86909c; }
.empty-state .btn { margin-top: 12px; }
.table-responsive { overflow-x: auto; }
.dashboard-table td .hint { font-size: 12px; margin-top: 2px; }
.actions-cell a { margin-right: 10px; white-space: nowrap; }

/* 操作 / 数据 按钮区分 */
.link-group { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}
.btn-link-action {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #4e5969;
}
.btn-link-action:hover { color: #1677ff; border-color: #91caff; background: #f0f5ff; }
.btn-link-data {
    background: #e6f4ff;
    border: 1px solid #91caff;
    color: #0958d9;
}
.btn-link-data:hover { background: #bae0ff; color: #003eb3; }
.btn-link-danger {
    background: #fff;
    border: 1px solid #ffccc7;
    color: #cf1322;
}
.btn-link-danger:hover { background: #fff2f0; border-color: #ff7875; }

/* 统计筛选 */
.stats-filter-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.stats-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px 16px;
    margin-bottom: 12px;
}
.stats-filter-row .form-group { margin-bottom: 0; }
.stats-filter-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.date-preset-group { display: flex; flex-wrap: wrap; gap: 6px; }
.date-preset {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    background: #f5f5f5;
    color: #4e5969;
    border: 1px solid #e8e8e8;
}
.date-preset:hover { background: #e6f4ff; color: #1677ff; border-color: #91caff; }
.date-preset.active { background: #1677ff; color: #fff; border-color: #1677ff; }

.channel-links-box {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f6f8fa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
}
.channel-links-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.channel-btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.channel-link-output { display: flex; gap: 8px; margin-top: 12px; }
.stats-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-cell { text-align: center; color: #86909c; padding: 32px 16px !important; }
.ua-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-info-card { margin-bottom: 16px; }

/* ===== 域名管理 ===== */
.domain-add-box { background: #fafbfc; border: 1px solid #e8e8e8; border-radius: 10px; padding: 16px; margin-top: 16px; }
.domain-add-box h3 { margin: 0 0 12px; font-size: 14px; }
.domain-add-form { width: 100%; }
.domain-add-form .btn { margin-top: 8px; }
.domain-table { min-width: 720px; }
.health-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: help; }
.health-safe { background: #f6ffed; color: #389e0d; }
.health-warning { background: #fff7e6; color: #d46b08; }
.health-blocked { background: #fff2f0; color: #cf1322; }
.health-unknown { background: #f5f5f5; color: #8c8c8c; }
.edit-row td { background: #fafbfc; }
.domain-edit-form { padding: 8px 0; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

@media (max-width: 1100px) {
    .editor-split { flex-direction: column; }
    .editor-preview { width: 100%; position: static; }
    .preview-phone iframe { height: 500px; }
    .content-form-split { grid-template-columns: 1fr; }
    .button-designer, .form-settings-grid { grid-template-columns: 1fr; }
    .field-card-body { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .editor-topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
    .domain-add-form { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .admin-sidebar { width: 64px; }
    .admin-sidebar .sidebar-brand,
    .admin-sidebar .sidebar-link span:not(.sidebar-icon),
    .admin-sidebar .sidebar-user,
    .admin-sidebar .sidebar-logout { display: none; }
    .admin-sidebar .sidebar-link { justify-content: center; padding: 12px; }
    .admin-main { margin-left: 64px; }
    .admin-page-head { padding: 10px 16px; }
    .admin-content,
    .container, .container-wide { padding: 12px 16px 24px; }
    .stat-cards { grid-template-columns: 1fr; }
}
