/* ==========================================================================
   BestTime · 极简编辑风格
   配色：暖奶油色背景 + 深炭色文字 + 微信绿
   字体：Cormorant Garamond 衬线大标 + 系统无衬线中文
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
    --bg:        #f4f1ea;          /* 暖奶油底色 */
    --bg-2:      #ece8de;          /* 稍深分区 */
    --card:      #ffffff;
    --ink:       #1a1a1a;          /* 主文字 */
    --ink-2:     #5a5a5a;          /* 副文字 */
    --ink-3:     #9a9a9a;          /* 弱文字 */
    --line:      rgba(0, 0, 0, 0.08);
    --line-2:    rgba(0, 0, 0, 0.14);
    --accent:    #1a1a1a;          /* 黑色按钮 */
    --green:     #95ec69;          /* 微信气泡绿 */
    --green-2:   #7fd957;
    --warn:      #c97a2b;
    --danger:    #c43e3e;

    --serif:     'Cormorant Garamond', 'Source Han Serif SC', 'Songti SC', 'STSong', Georgia, 'Times New Roman', serif;
    --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --mono:      'JetBrains Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;

    --radius:    16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
}

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

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; color: inherit; }

/* ============ 顶部导航 ============ */
.topbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 40px;
    background: rgba(244, 241, 234, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar .brand {
    display: flex; align-items: center; gap: 12px;
}
.topbar .brand-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #4d8af0, #2b6ee6);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; font-weight: 700; font-family: var(--serif);
}
.topbar .brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: 0.3px; }
.topbar .brand-sub { color: var(--ink-3); font-size: 13px; margin-left: 8px; }

.topbar nav { display: flex; gap: 32px; }
.topbar nav a {
    color: var(--ink-2); font-size: 14px; transition: color .2s;
    padding: 4px 0;
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a.active { color: var(--ink); font-weight: 500; }

.topbar .user-zone { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.topbar .user-zone a { color: var(--ink-2); }
.topbar .user-zone a:hover { color: var(--ink); }

/* ============ 移动端汉堡菜单 ============ */
.menu-toggle {
    display: none;
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 10px;
    cursor: pointer;
    align-items: center; justify-content: center;
    padding: 0;
    transition: all .2s;
}
.menu-toggle:hover { border-color: var(--ink); }
.menu-toggle span {
    display: block;
    width: 18px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    position: relative;
    transition: all .25s;
}
.menu-toggle span::before,
.menu-toggle span::after {
    content: ''; position: absolute; left: 0;
    width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: all .25s;
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after  { top:  6px; }
.menu-toggle.open span { background: transparent; }
.menu-toggle.open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.open span::after  { top: 0; transform: rotate(-45deg); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 99;
    padding: 12px 20px 20px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    animation: slideDown .25s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mobile-menu.show { display: block; }
.mobile-menu a {
    display: block;
    padding: 14px 12px;
    color: var(--ink-2);
    font-size: 15px;
    border-bottom: 1px solid var(--line);
    transition: all .15s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { background: var(--bg-2); color: var(--ink); }
.mobile-menu a.active { color: var(--ink); font-weight: 500; background: var(--bg-2); border-radius: 8px; }
.mobile-menu .m-user {
    padding: 14px 12px;
    background: var(--bg-2);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--ink-2);
}
.mobile-menu .m-user a { padding: 0; display: inline; border: none; }

/* ============ 主容器 ============ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 40px; }

/* ============ 章节标签 ============ */
.section-label {
    font-family: var(--mono);
    font-size: 12px; color: var(--ink-3);
    letter-spacing: 1.5px; text-transform: uppercase;
    margin-bottom: 24px;
}

/* ============ 页面标题区 ============ */
.page-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 24px; flex-wrap: wrap;
    margin: 40px 0 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

/* ============ Flash 提示容器 ============ */
.flash-wrap {
    max-width: 1280px; margin: 16px auto 0; padding: 0 40px;
}

/* ============ 标题体系 ============ */
.display {
    font-family: var(--serif);
    font-size: 96px; line-height: 1.05; font-weight: 500;
    letter-spacing: -2px;
    color: var(--ink);
    margin: 12px 0 24px;
}
.h1 { font-family: var(--serif); font-size: 48px; line-height: 1.15; font-weight: 500; margin: 0 0 16px; }
.h2 { font-family: var(--serif); font-size: 32px; line-height: 1.2; font-weight: 500; margin: 0 0 12px; }
.h3 { font-family: var(--serif); font-size: 22px; line-height: 1.3; font-weight: 500; margin: 0 0 8px; }

.italic { font-style: italic; }
.text-2 { color: var(--ink-2); }
.text-3 { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 12px; }
.trust-line { color: var(--ink-3); font-size: 13px; margin-top: 32px; letter-spacing: 0.3px; }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 999px;
    font-size: 14px; font-weight: 500;
    border: 1px solid var(--line);
    background: transparent; color: var(--ink);
    transition: all .2s;
    cursor: pointer;
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }

.btn-dark {
    background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-dark:hover { background: #000; border-color: #000; }

.btn-light {
    background: var(--card); color: var(--ink);
    box-shadow: 0 1px 0 var(--line-2);
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 15px; }
.btn-block { width: 100%; }

/* ============ 卡片 ============ */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* ============ 表单 ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { color: var(--ink-2); font-size: 13px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 16px; border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--line-2);
    color: var(--ink);
    font-size: 14px; line-height: 1.5;
    outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.field textarea { min-height: 100px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ============ 微信聊天预览 ============ */
.chat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    overflow: hidden;
    max-width: 480px;
}
.chat-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}
.chat-head .name { font-weight: 500; font-size: 15px; }
.chat-head .time { color: var(--ink-3); font-size: 12px; }
.chat-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.bubble.them { background: #f0ede5; color: var(--ink); align-self: flex-start; border-top-left-radius: 4px; }
.bubble.me   { background: var(--green); color: #1a1a1a; align-self: flex-end; border-top-right-radius: 4px; }
.bubble pre { margin: 6px 0 0; font-family: var(--sans); white-space: pre-wrap; font-size: 13px; }
.chat-foot {
    padding: 12px 24px 18px; text-align: center;
    color: var(--ink-3); font-family: var(--serif); font-style: italic; font-size: 13px;
}

/* ============ 三栏 how it works ============ */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.how-col .roman {
    font-family: var(--serif); font-style: italic; font-size: 32px;
    color: var(--ink); margin-bottom: 18px;
}
.how-col h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; margin: 0 0 10px; }
.how-col p { color: var(--ink-2); font-size: 14px; line-height: 1.7; margin: 6px 0; }
.how-col .demo-quote { color: var(--ink-3); font-size: 13px; margin-top: 12px; font-style: italic; }

/* ============ 通道网格 ============ */
.channel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.channel-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    transition: all .2s;
}
.channel-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.channel-card .ch-icon { font-size: 24px; margin-bottom: 12px; }
.channel-card h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; margin: 0 0 6px; }
.channel-card p { color: var(--ink-2); font-size: 13px; margin: 4px 0; }
.channel-card .ch-meta { color: var(--ink-3); font-size: 12px; margin-top: 12px; }

/* ============ 核心功能卡片 ============ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    border-color: var(--ink);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}
.feature-card .fc-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--bg-2);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 14px;
}
.feature-card h3 {
    font-family: var(--serif); font-size: 20px; font-weight: 500;
    margin: 0 0 6px;
}
.feature-card .fc-desc {
    color: var(--ink-2); font-size: 14px; line-height: 1.7; margin: 6px 0 14px;
}
.feature-card .fc-tags {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.feature-card .fc-tags span {
    font-size: 11px; padding: 3px 10px; border-radius: 999px;
    background: var(--bg-2); color: var(--ink-2);
    border: 1px solid var(--line);
}
.feature-card .fc-tags span.hot {
    background: rgba(201, 122, 43, 0.1); color: var(--warn);
    border-color: rgba(201, 122, 43, 0.3);
}
.feature-card .fc-tags span.new {
    background: rgba(0, 200, 100, 0.1); color: #0a8450;
    border-color: rgba(0, 200, 100, 0.3);
}
.feature-card.feature-wide { grid-column: span 2; }

/* ============ Hero 布局 ============ */
.hero { padding: 80px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: center; }
.hero-eyebrow { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 1.5px; margin-bottom: 16px; }
.hero-italic { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 18px; margin-bottom: 8px; }
.hero-desc { color: var(--ink-2); font-size: 16px; max-width: 460px; line-height: 1.7; margin: 24px 0 32px; }
.hero-trust { color: var(--ink-3); font-size: 12px; margin-top: 40px; letter-spacing: 0.4px; }

/* ============ 登录/注册 ============ */
.auth-wrap {
    min-height: calc(100vh - 80px);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.auth-card {
    width: 420px; max-width: 100%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 44px 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
}
.auth-card .auth-title { font-family: var(--serif); font-size: 36px; font-weight: 500; margin: 0 0 8px; }
.auth-card .auth-sub { color: var(--ink-2); font-size: 14px; margin: 0 0 28px; }
.auth-foot { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 20px; }

/* ============ 表格 ============ */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td {
    text-align: left; padding: 14px 16px; font-size: 14px;
    border-bottom: 1px solid var(--line);
}
.table th {
    color: var(--ink-3); font-weight: 500; font-size: 12px;
    text-transform: uppercase; letter-spacing: 1px;
    font-family: var(--mono);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-2); }

/* ============ 标签 ============ */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 500;
    background: var(--bg-2); color: var(--ink-2);
    border: 1px solid var(--line);
}
.tag-on  { background: rgba(0, 200, 100, 0.1); color: #0a8450; border-color: rgba(0, 200, 100, 0.3); }
.tag-off { background: rgba(0, 0, 0, 0.04); color: var(--ink-3); }
.tag-info{ background: rgba(0, 0, 0, 0.05); color: var(--ink-2); }
.tag-ok  { background: rgba(0, 200, 100, 0.1); color: #0a8450; }
.tag-fail{ background: rgba(196, 62, 62, 0.1); color: var(--danger); }

/* ============ 表格内的操作按钮组（订单管理等） ============ */
.order-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1;
}
.order-action-btn {
    font-size: 11px !important;
    padding: 0 10px !important;
    height: 24px !important;
    line-height: 1 !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    font-weight: 500;
    white-space: nowrap;
}
.data-table td .order-actions { vertical-align: middle; }
.data-table td .tag { vertical-align: middle; }

/* ============ 提示条 ============ */
.alert {
    padding: 14px 18px; border-radius: var(--radius-sm);
    font-size: 13px; line-height: 1.6;
    margin-bottom: 18px;
}
.alert-info    { background: rgba(0, 0, 0, 0.04); color: var(--ink-2); border: 1px solid var(--line); }
.alert-success { background: rgba(0, 200, 100, 0.08); color: #0a8450; border: 1px solid rgba(0, 200, 100, 0.3); }
.alert-error   { background: rgba(196, 62, 62, 0.08); color: var(--danger); border: 1px solid rgba(196, 62, 62, 0.3); }

/* ============ 开关 ============ */
.switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.switch input { display: none; }
.switch .slider {
    position: absolute; inset: 0; cursor: pointer;
    background: var(--line-2); border-radius: 999px; transition: .2s;
}
.switch .slider::before {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; transition: .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: var(--ink); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ============ 统计卡片 ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.stat .label { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-family: var(--mono); }
.stat .value { font-family: var(--serif); font-size: 42px; line-height: 1.1; font-weight: 500; margin: 8px 0 4px; }
.stat .sub { color: var(--ink-3); font-size: 12px; }

/* ============ 模态框 ============ */
.modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    z-index: 200;
}
.modal-mask.show { display: flex; }
.modal {
    width: 600px; max-width: 92%; max-height: 90vh; overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal h3 { font-family: var(--serif); font-size: 28px; font-weight: 500; margin: 0 0 6px; }
.modal .modal-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 24px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ============ 工具 ============ */
.flex { display: flex; }
.between { justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }

/* ============ 表单面板 ============ */
.form-pane {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 12px;
}

/* ============ 二维码 ============ */
.qr-box {
    width: 200px; height: 200px; padding: 10px;
    background: #fff; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.qr-box img { width: 100%; height: 100%; }

/* ============ 页脚 ============ */
.footer {
    text-align: center; padding: 60px 0 40px;
    color: var(--ink-3); font-size: 12px; font-family: var(--mono);
    letter-spacing: 1px;
}

/* ============ 标签扩展 ============ */
.tag-warn { background: rgba(201, 122, 43, 0.1); color: var(--warn); border-color: rgba(201, 122, 43, 0.3); }

/* ============ 提示条扩展 ============ */
.alert-warn { background: rgba(201, 122, 43, 0.08); color: var(--warn); border: 1px solid rgba(201, 122, 43, 0.3); }

/* ============ Toast（大号中央弹窗）============ */
.toast-big {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    padding: 24px 32px;
    font-size: 15px; font-weight: 500;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    z-index: 9999;
    max-width: 80%;
    text-align: center;
    line-height: 1.6;
    animation: toastIn .3s ease;
}
.toast-big.success { border-color: var(--green-2); background: #f0fdf4; color: #0a8450; }
.toast-big.error   { border-color: var(--danger);   background: #fef2f2; color: var(--danger); }
.toast-big.info    { border-color: var(--ink);      background: var(--card);  color: var(--ink); }
.toast-big.fade    { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translate(-50%, -45%) scale(.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -45%) scale(.95); } }

/* ============ 输入框/选择框/文本域 ============ */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"],
select, textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink);
    transition: border-color .2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ink);
}
input[readonly] { background: var(--bg-2); color: var(--ink-3); }
textarea { font-family: var(--mono); line-height: 1.6; resize: vertical; }

/* ============ 管理员后台 ============== */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}
.admin-sidebar {
    position: sticky; top: 100px; align-self: start;
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px 20px;
    border: 1px solid var(--line);
    height: fit-content;
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 14px;
    transition: all .2s;
}
.admin-nav a:hover { background: var(--bg-2); color: var(--ink); }
.admin-nav a.active { background: var(--ink); color: #fff; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--line);
}
.stat-num { font-family: var(--serif); font-size: 36px; font-weight: 600; line-height: 1; }
.stat-label { color: var(--ink-3); font-size: 12px; margin-top: 8px; }

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.quick-card {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    transition: all .2s;
    border: 1px solid var(--line);
}
.quick-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.quick-icon { font-size: 32px; margin-bottom: 8px; }
.quick-title { font-weight: 500; margin-bottom: 4px; }
.quick-desc { color: var(--ink-3); font-size: 12px; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.data-table th { color: var(--ink-3); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:hover { background: var(--bg-2); }
.data-table select { padding: 4px 8px; font-size: 13px; }

@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; padding: 0 20px; }
    .admin-sidebar { position: static; }
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
    .container, .container-narrow { padding: 0 20px; }
    .topbar { padding: 14px 20px; }
    .topbar nav { display: none; }
    .topbar .user-zone { display: none; }
    .menu-toggle { display: inline-flex; }
    .display { font-size: 64px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    /* 中等屏 features / channel 保留 2 列，避免单列过长 */
    .how-grid { grid-template-columns: 1fr; }
    .channel-grid, .features-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-card.feature-wide { grid-column: span 2; }
    .field-row, .field-row-3 { grid-template-columns: 1fr; }
    .h1 { font-size: 36px; }
    /* stats 在中等屏 2x2，避免单列太长 */
    .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 平板及以下（≤768px） ============ */
@media (max-width: 768px) {
    .container, .container-narrow { padding: 0 16px; }
    .topbar { padding: 12px 16px; }
    .topbar .brand-sub { display: none; }     /* 副标题在小屏隐藏 */
    .topbar .brand-name { font-size: 18px; }

    /* page-head 紧凑化 */
    .page-head {
        margin: 24px 0 20px;
        padding-bottom: 16px;
        gap: 12px;
    }
    .section-label { margin-bottom: 12px; }
    .h1 { font-size: 30px; margin-bottom: 10px; }
    .h2 { font-size: 26px; }
    .h3 { font-size: 19px; }

    /* card padding 减小 */
    .card { padding: 20px 18px; border-radius: 14px; }

    /* 表格横向滚动：小屏下让 table 变成可横向滚动的块，避免溢出屏幕 */
    .card > .table,
    .card > .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table th, .table td,
    .data-table th, .data-table td { padding: 10px 8px; font-size: 13px; }
    .data-table th { font-size: 11px; }
    /* 操作按钮组在小屏紧凑 */
    .order-actions { gap: 4px !important; }
    .order-action-btn { padding: 0 8px !important; height: 22px !important; font-size: 10px !important; }

    /* modal 从底部滑入，padding 减小 */
    .modal {
        width: 100%; max-width: 100%;
        max-height: 92vh;
        padding: 22px 18px;
        border-radius: 18px 18px 0 0;
        margin: 0;
    }
    .modal-mask { align-items: flex-end; }
    .modal h3 { font-size: 22px; }
    .modal .actions { flex-direction: column-reverse; }
    .modal .actions .btn { width: 100%; }

    /* stats 2x2，数字字号缩小 */
    .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat { padding: 16px 14px; }
    .stat .value { font-size: 30px; }

    /* 按钮全宽化 */
    .page-head .btn,
    .page-head .flex .btn { width: 100%; }
    .page-head .flex { width: 100%; }

    /* alert 紧凑 */
    .alert { padding: 12px 14px; font-size: 12px; }

    /* features / channel 单列 */
    .features-grid, .channel-grid, .how-grid { grid-template-columns: 1fr; gap: 14px; }
    .feature-card { padding: 20px 18px; }
    .feature-card.feature-wide { grid-column: span 1; }

    /* hero 区域 */
    .hero { padding: 40px 0 30px; }
    .hero-desc { font-size: 14px; margin: 16px 0 20px; }

    /* auth-card 紧凑 */
    .auth-card { padding: 28px 22px; border-radius: 14px; }
    .auth-card .auth-title { font-size: 26px; }

    /* plan-grid 单列，padding 减小 */
    .plan-grid { grid-template-columns: 1fr; gap: 16px; }
    .plan-card { padding: 24px 18px; }
    .price-num { font-size: 40px; }

    /* 管理员布局单列 */
    .admin-layout { grid-template-columns: 1fr; padding: 0 16px; gap: 16px; }
    .admin-sidebar { position: static; }

    /* form-pane 紧凑 */
    .form-pane { padding: 14px; }

    /* footer 紧凑 */
    .footer { padding: 30px 0 24px; }

    /* flash-wrap 对齐 container */
    .flash-wrap { padding: 0 16px; }

    /* 按钮组在小屏允许换行 */
    .flex.gap-12, .flex.gap-8, .flex.gap-16 { flex-wrap: wrap; }

    /* 表单字段间距收紧 */
    .field { margin-bottom: 14px; }
    .field input, .field select, .field textarea { padding: 10px 12px; font-size: 13px; }
}

/* ============ 手机小屏（≤480px） ============ */
@media (max-width: 480px) {
    .container, .container-narrow { padding: 0 12px; }
    .topbar { padding: 10px 12px; }
    .topbar .brand-name { font-size: 16px; }
    .menu-toggle { width: 36px; height: 36px; }

    /* 移动菜单顶部留出空间 */
    .mobile-menu { top: 56px; max-height: calc(100vh - 56px); padding: 10px 14px 16px; }
    .mobile-menu a { padding: 12px 10px; font-size: 14px; }

    /* page-head 极小屏更紧凑 */
    .page-head { margin: 18px 0 16px; padding-bottom: 12px; }
    .section-label { font-size: 11px; margin-bottom: 8px; letter-spacing: 1px; }
    .h1 { font-size: 24px; margin-bottom: 6px; line-height: 1.2; }
    .h2 { font-size: 22px; }
    .h3 { font-size: 17px; }

    /* card 极小屏 padding 进一步缩小 */
    .card { padding: 16px 14px; border-radius: 12px; }
    .stat { padding: 14px 12px; }
    .stat .value { font-size: 26px; }
    .stat .label { font-size: 11px; }

    /* 表格字号再小 */
    .table th, .table td,
    .data-table th, .data-table td { padding: 8px 6px; font-size: 12px; }

    /* 按钮紧凑 */
    .btn { padding: 10px 16px; font-size: 13px; }
    .btn-sm { padding: 6px 12px; font-size: 12px; }
    .btn-lg { padding: 12px 20px; font-size: 14px; }

    /* alert 紧凑 */
    .alert { padding: 10px 12px; font-size: 12px; margin-bottom: 12px; }

    /* auth-card 极小屏 */
    .auth-card { padding: 22px 18px; }
    .auth-card .auth-title { font-size: 22px; }

    /* plan-card 极小屏 */
    .plan-card { padding: 20px 14px; }
    .price-num { font-size: 34px; }
    .plan-name { font-size: 18px; }

    /* features 极小屏 */
    .feature-card { padding: 18px 14px; }
    .feature-card h3 { font-size: 18px; }
    .feature-card .fc-icon { width: 36px; height: 36px; font-size: 18px; }

    /* hero 极小屏 */
    .hero { padding: 28px 0 20px; }
    .display { font-size: 44px; }
    .hero-italic { font-size: 15px; }
    .hero-desc { font-size: 13px; }

    /* chat 页面铺满 */
    .chat-wrap {
        height: calc(100vh - 120px);
        min-height: 400px;
        border-radius: 14px;
    }
    .chat-head { padding: 14px 16px; gap: 10px; }
    .chat-head .avatar { width: 36px; height: 36px; font-size: 17px; }
    .chat-head h1 { font-size: 15px; }
    .chat-head .sub { font-size: 11px; }
    .chat-head .badge { font-size: 10px; padding: 2px 8px; }
    .chat-body { padding: 14px; }
    .msg { gap: 8px; margin-bottom: 12px; }
    .msg .av { width: 28px; height: 28px; font-size: 12px; }
    .msg .bubble { max-width: 80%; font-size: 13px; padding: 8px 12px; }
    .chat-foot { padding: 12px 14px; }
    .chat-foot textarea { height: 40px; font-size: 13px; padding: 8px 12px; }
    .chat-foot button { height: 40px; padding: 0 16px; font-size: 13px; }
    .chat-foot .quick { gap: 4px; margin-bottom: 8px; }
    .chat-foot .quick span { padding: 3px 9px; font-size: 11px; }

    /* daily-row 在极小屏垂直堆叠 */
    .daily-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 14px 0 !important;
    }
    .daily-row > div:first-child { font-size: 24px; }
    .daily-row .flex.gap-8 {
        justify-content: space-between;
        width: 100%;
    }
    .daily-time { width: auto !important; flex: 1; }

    /* feedback 页输入区垂直 */
    .feedback-row { flex-direction: column !important; gap: 8px !important; }
    .feedback-row > * { width: 100%; }

    /* modal 极小屏 */
    .modal { padding: 18px 14px; }
    .modal h3 { font-size: 19px; }
}

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
