/* ============================================================
   仪表盘布局 + 内容样式 - dashboard.css
   原创设计：桌面端顶部水平导航 / 移动端底部Tab栏（类原生APP）
   ============================================================ */

:root {
    --navbar-h: 64px;
    --tabbar-h: 56px;
    --dash-bg: #F4F5FA;
    --card-bg: #FFFFFF;
    --content-max: 960px;
}

/* ====== 页面加载 ====== */
.page-loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dash-bg);
    z-index: 99999;
}

.content-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    gap: 14px;
}

.content-loading .spinner { width: 28px; height: 28px; }

.content-loading-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* ====== 布局容器 ====== */
.app-shell {
    min-height: 100vh;
    background: var(--dash-bg);
    display: flex;
    flex-direction: column;
}

/* ============================================================
   桌面端：顶部导航栏
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-h);
    z-index: 500;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    padding: 0 28px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 36px;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-brand img {
    height: 32px;
    width: auto;
}

.navbar-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

/* 水平导航链接 */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    overflow-x: auto;
    scrollbar-width: none;
}

.navbar-links::-webkit-scrollbar { display: none; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all 0.15s var(--ease-out);
    cursor: pointer;
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--surface-alt);
}

.nav-item.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
}

.nav-item-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-item-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* 导航分隔线 */
.nav-sep {
    width: 1px;
    height: 20px;
    background: var(--divider);
    margin: 0 8px;
    flex-shrink: 0;
}

/* 右侧工具区 */
.navbar-end {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.navbar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.navbar-btn:hover { color: var(--accent); background: var(--surface-alt); }

.navbar-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 用户头像下拉 */
.avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.avatar-wrap:hover { background: var(--surface-alt); }

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.avatar-circle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.avatar-email {
    font-size: 13px;
    color: var(--text-primary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0,0,0,0.14);
    overflow: hidden;
    z-index: 600;
    animation: menuDrop 0.2s var(--ease-out);
}

@keyframes menuDrop {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
}

.avatar-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.12s;
}

.avatar-menu-item:hover { background: var(--surface-alt); }

.avatar-menu-item svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.avatar-menu-item.danger { color: var(--red); }

.avatar-menu-sep {
    height: 1px;
    background: var(--divider);
    margin: 4px 0;
}

/* ============================================================
   内容区域
   ============================================================ */
.main-content {
    flex: 1;
    max-width: var(--content-max);
    width: 100%;
    margin: 0 auto;
    padding: calc(var(--navbar-h) + 24px) 24px 40px;
}

/* ============================================================
   移动端底部Tab栏（类原生APP）
   ============================================================ */
.tabbar {
    display: none;
}

/* ============================================================
   移动端 更多面板（底部弹出）
   ============================================================ */
.more-panel {
    display: none;
}

.more-panel .nav-item:hover {
    background: var(--surface-alt);
}

.more-panel .nav-item.active::after { display: none; }

.more-panel .nav-item.active {
    background: rgba(108,92,231,0.08);
}

/* ============================================================
   卡片系统
   ============================================================ */
.dash-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--divider);
    margin-bottom: 18px;
    animation: cardUp 0.35s var(--ease-out) both;
    overflow: hidden;
}

@keyframes cardUp {
    from { opacity: 0; transform: translateY(14px); }
}

.dash-card-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--divider);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-card-body {
    padding: 22px;
}

/* ====== 双列网格（桌面端） ====== */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.dash-grid .dash-card {
    margin-bottom: 0;
}

/* ====== 公告横幅 ====== */
.notice-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 170px;
    cursor: pointer;
    margin-bottom: 18px;
    animation: cardUp 0.35s var(--ease-out) both;
    transition: box-shadow 0.2s var(--ease-out);
}

.notice-banner:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.12); }

.notice-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6C5CE7 0%, #4834D4 50%, #341f97 100%);
    background-size: cover;
    background-position: center;
}

.notice-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.4) 100%);
}

.notice-body {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
}

.notice-badge {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(6px);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    width: fit-content;
}

.notice-title { font-size: 17px; font-weight: 600; margin: 0; line-height: 1.4; }
.notice-date { font-size: 13px; opacity: 0.7; margin: 4px 0 0; }

.notice-dots {
    position: absolute;
    bottom: 14px;
    right: 20px;
    display: flex;
    gap: 5px;
    z-index: 2;
}

.notice-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: background 0.2s;
}

.notice-dot.active { background: #fff; }

/* ====== 订阅信息卡片 ====== */
.sub-hero {
    background: linear-gradient(135deg, #6C5CE7 0%, #4834D4 100%);
    border-radius: var(--radius-lg);
    padding: 26px;
    color: #fff;
    margin-bottom: 18px;
    animation: cardUp 0.35s var(--ease-out) both;
    position: relative;
    overflow: hidden;
}

.sub-hero::before {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    top: -100px;
    right: -60px;
    pointer-events: none;
}

.sub-hero::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    bottom: -50px;
    left: -30px;
    pointer-events: none;
}

.sub-hero-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 6px;
}

.sub-hero-plan {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.sub-hero-expire {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.sub-hero-expire .tag-expired {
    display: inline-block;
    background: rgba(225,112,85,0.85);
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.sub-traffic-bar {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.sub-traffic-fill {
    height: 100%;
    border-radius: 3px;
    background: #fff;
    transition: width 0.5s var(--ease-out);
}

.sub-traffic-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.75;
}

.sub-empty {
    text-align: center;
    padding: 36px 20px;
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    animation: cardUp 0.35s var(--ease-out) both;
}

.sub-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-empty-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
}

.sub-empty-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.sub-empty-btn {
    display: inline-block;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px var(--accent-glow);
    text-decoration: none;
}

.sub-empty-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-glow); }

/* ====== 快捷操作网格（图标卡片） ====== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    animation: cardUp 0.38s var(--ease-out) both;
    animation-delay: 0.08s;
}

.quick-tile {
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.quick-tile:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 18px rgba(108,92,231,0.1);
    transform: translateY(-2px);
}

.quick-tile:active { transform: scale(0.97); }

.quick-tile-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-tile-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-tile-icon.blue { background: rgba(108,92,231,0.1); color: var(--accent); }
.quick-tile-icon.green { background: rgba(0,184,148,0.1); color: #00B894; }
.quick-tile-icon.orange { background: rgba(253,203,110,0.15); color: #E17055; }
.quick-tile-icon.pink { background: rgba(232,67,147,0.1); color: #E84393; }

.quick-tile-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.quick-tile-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* ====== 订阅弹窗 ====== */
.sub-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99990;
    animation: dialogOverIn .2s var(--ease-out);
}

.sub-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 320px;
    max-width: calc(100vw - 40px);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,.18);
    animation: subModalIn .3s var(--ease-out);
}

@keyframes subModalIn {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}

.sub-modal-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--divider);
    transition: background 0.12s;
    font-size: 14px;
    color: var(--text-primary);
}

.sub-modal-item:hover { background: var(--surface-alt); }

.sub-modal-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sub-modal-icon svg { width: 20px; height: 20px; fill: var(--text-primary); }

.sub-modal-footer { padding: 12px 16px 16px; }

.sub-modal-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.sub-modal-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--accent-glow); }

/* ====== 二维码弹窗 ====== */
.qr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99990;
    animation: dialogOverIn .2s var(--ease-out);
}

.qr-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 280px;
    max-width: calc(100vw - 40px);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,.18);
    animation: subModalIn .3s var(--ease-out);
}

.qr-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--divider);
    font-size: 15px;
    font-weight: 600;
}

.qr-close {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-alt);
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.12s;
}

.qr-close:hover { background: var(--surface-hover); color: var(--text-primary); }
.qr-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.qr-body { padding: 24px; display: flex; align-items: center; justify-content: center; }
.qr-body img { width: 200px; height: 200px; border-radius: 6px; }

.qr-tip { padding: 0 18px 18px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* ====== 账户数据统计条 ====== */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeUp .3s var(--ease-out) both;
}

.dash-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all .15s;
}

.dash-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

.dash-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-stat-icon svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dash-stat-icon.purple { background: linear-gradient(135deg, #6C5CE7, #A78BFA); }
.dash-stat-icon.green { background: linear-gradient(135deg, #10B981, #34D399); }
.dash-stat-icon.blue { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
.dash-stat-icon.orange { background: linear-gradient(135deg, #F59E0B, #FBBF24); }

.dash-stat-info {
    min-width: 0;
}

.dash-stat-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.dash-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ====== 双栏布局 ====== */
.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
    animation: fadeUp .3s var(--ease-out) .05s both;
}

/* ====== 邀请返利卡 ====== */
.dash-invite {
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
}

.dash-invite-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-invite-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-invite-link {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}

.dash-invite-link:hover {
    text-decoration: underline;
}

.dash-invite-stats {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.dash-invite-stat {
    flex: 1;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.dash-invite-stat-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-invite-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-invite-code {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.dash-invite-code-input {
    flex: 1;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--surface-alt);
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    outline: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-invite-copy {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s;
}

.dash-invite-copy:hover {
    background: var(--accent-dark);
}

/* ====== 在线节点概览 ====== */
.dash-nodes {
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
}

.dash-nodes-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-nodes-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-nodes-link {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}

.dash-nodes-link:hover {
    text-decoration: underline;
}

.dash-nodes-summary {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.dash-nodes-num {
    flex: 1;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.dash-nodes-num-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-nodes-num-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-nodes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
    max-height: 120px;
}

.dash-node-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    font-size: 12px;
}

.dash-node-name {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
    display: flex;
    align-items: center;
}

.dash-node-name img.emoji {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    flex-shrink: 0;
}

.dash-node-rate {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ====== 流量用量趋势 ====== */
.dash-traffic {
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 16px;
    animation: fadeUp .3s var(--ease-out) .08s both;
}

.dash-traffic-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-traffic-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-traffic-total {
    font-size: 12px;
    color: var(--text-muted);
}

.dash-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    padding-top: 10px;
}

.dash-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.dash-chart-bar-wrap {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.dash-chart-bar {
    width: 100%;
    max-width: 32px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--accent), var(--accent-light));
    min-height: 3px;
    transition: height .3s var(--ease-out);
    position: relative;
}

.dash-chart-bar:hover {
    opacity: .8;
}

.dash-chart-bar-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: #fff;
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

.dash-chart-bar:hover .dash-chart-bar-tip {
    display: block;
}

.dash-chart-label {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

.dash-traffic-empty {
    text-align: center;
    padding: 32px 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* ====== 公告弹窗 ====== */
.notice-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99990;
}

.notice-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 440px;
    max-width: calc(100vw - 40px);
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    animation: dialogPop 0.3s var(--ease-spring);
    display: flex;
    flex-direction: column;
}

.notice-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--divider);
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.notice-modal-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    overflow-y: auto;
}

/* ====== 底部版权 ====== */
.dash-footer {
    text-align: center;
    padding: 24px 16px 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   响应式：平板
   ============================================================ */
@media (max-width: 900px) {
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-two-col { grid-template-columns: 1fr; }
}

/* ============================================================
   响应式：手机端 — 底部Tab栏 + 隐藏顶部导航链接
   ============================================================ */
@media (max-width: 768px) {
    /* 顶部栏简化：只保留 logo + 用户头像 */
    .navbar {
        height: 50px;
        padding: 0 16px;
    }

    .navbar-links,
    .nav-sep,
    .navbar-btn { display: none; }

    .navbar-brand { margin-right: auto; }
    .navbar-brand-name { font-size: 15px; }

    .avatar-email { display: none; }
    .dash-footer { display: none; }

    /* 底部Tab栏 */
    .tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--tabbar-h);
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--divider);
        z-index: 500;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 6px 0;
        flex: 1;
        text-decoration: none;
        color: var(--text-muted);
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }

    .tab-item.active { color: var(--accent); }

    .tab-item-icon {
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tab-item-icon svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
    }

    .tab-item-label {
        font-size: 10px;
        font-weight: 500;
        line-height: 1;
    }

    .tab-item.active .tab-item-label { font-weight: 600; }

    /* 内容区适配 */
    .main-content {
        padding: 58px 14px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
    }

    .notice-banner { height: 140px; }
    .notice-body { padding: 16px 18px; }
    .notice-title { font-size: 15px; }

    .sub-hero { padding: 20px; }
    .sub-hero-plan { font-size: 20px; }

    .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .quick-tile { padding: 18px 12px; }
    .quick-tile-icon { width: 38px; height: 38px; border-radius: 10px; }
    .quick-tile-icon svg { width: 18px; height: 18px; }

    /* 更多导航浮层 */
    .more-panel {
        display: block;
        position: fixed;
        top: auto;
        bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
        right: 10px;
        left: 10px;
        min-width: auto;
        background: #fff;
        border-radius: var(--radius-lg);
        box-shadow: 0 10px 36px rgba(0,0,0,0.14);
        z-index: 600;
        overflow: hidden;
        animation: menuDrop 0.2s var(--ease-out);
    }

    .more-panel .nav-item {
        padding: 14px 20px;
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .quick-tile { padding: 14px 8px; }
    .quick-tile-label { font-size: 12px; }
}
