/* ═══ shared.css ── 云集智能创意工作站 · 整站设计 token ═══
   统一所有页面的颜色 / 字体 / 间距 / 圆角 / 组件
   复用 admin.html 的设计语言，扩展移动端适配
   ──────────────────────────────────────────────────────── */

:root {
    /* 背景层级 */
    --bg-1: #0b0d12;
    --bg-2: #14171f;
    --bg-3: #1c2029;
    --bg-elevated: #1f242f;

    /* 边线 / 分割 */
    --line: #2a2f3a;
    --line-strong: #3a4150;

    /* 文本层级 */
    --text-1: #e6e9ef;
    --text-2: #a0a4ad;
    --text-3: #6b6f78;
    --text-4: #4a4f58;

    /* 品牌色 */
    --primary: #6d8eff;
    --primary-soft: rgba(109, 142, 255, 0.12);
    --primary-strong: #5a7bf0;
    --accent: #8b5cf6;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #ef4444;
    --info: #38bdf8;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);

    /* 圆角 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* 间距 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* 字号 */
    --fs-xs: 11px;
    --fs-sm: 12px;
    --fs-base: 13px;
    --fs-md: 14px;
    --fs-lg: 16px;
    --fs-xl: 18px;
    --fs-2xl: 22px;
    --fs-3xl: 28px;

    /* 动画 */
    --t-fast: 0.15s;
    --t: 0.25s;
    --t-slow: 0.4s;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 模态遮罩与卡片（全局基础类） ── */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
}

.modal-card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
    .modal-mask {
        padding: 0;
        align-items: flex-end;
    }

    .modal-card {
        max-width: 100vw;
        width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: 20px 16px;
    }
}

/* ── 重置 ── */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font: 13px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    background: var(--bg-1);
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    text-decoration: underline;
}

button {
    font: inherit;
    color: inherit;
}

input,
textarea,
select {
    font: inherit;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    padding: 8px 12px;
    outline: none;
    transition: border-color var(--t-fast);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

code {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    background: var(--bg-3);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* ── 按钮 ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: var(--fs-sm);
    font-weight: 500;
    background: var(--bg-3);
    color: var(--text-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-2);
    border-color: var(--line-strong);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
}

.btn-ghost:hover {
    background: var(--bg-2);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-sm {
    padding: 4px 10px;
    font-size: var(--fs-xs);
}

.btn-lg {
    padding: 12px 20px;
    font-size: var(--fs-md);
}

.btn-block {
    width: 100%;
}

/* ── 卡片 ── */
.card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    gap: 12px;
}

.card-head h2 {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 600;
    flex: 1;
}

.card-body {
    padding: 18px;
}

/* ── 标签 ── */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: var(--fs-xs);
    font-weight: 500;
    background: var(--bg-3);
    color: var(--text-2);
}

.tag-primary {
    background: var(--primary-soft);
    color: var(--primary);
}

.tag-success {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.tag-warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.tag-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.tag-info {
    background: rgba(56, 189, 248, 0.15);
    color: var(--info);
}

/* ── 表格 ── */
.tbl {
    width: 100%;
    border-collapse: collapse;
}

.tbl th,
.tbl td {
    padding: 10px 18px;
    text-align: left;
    font-size: var(--fs-sm);
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.tbl th {
    color: var(--text-3);
    font-weight: 500;
    background: var(--bg-3);
    position: sticky;
    top: 0;
}

.tbl tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.tbl .mono {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: var(--fs-xs);
}

.tbl-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
    font-size: var(--fs-sm);
}

/* ── 统计卡 ── */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.stat .label {
    font-size: var(--fs-xs);
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat .val {
    font-size: var(--fs-2xl);
    font-weight: 600;
    margin-top: 6px;
}

.stat .sub {
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-top: 4px;
}

.stat.ok .val {
    color: var(--success);
}

.stat.warn .val {
    color: var(--warning);
}

.stat.bad .val {
    color: var(--danger);
}

/* ── 输入框 ── */
.input {
    width: 100%;
    padding: 10px 14px;
    font-size: var(--fs-base);
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text-1);
}

.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.input-group {
    margin-bottom: var(--space-3);
}

.input-group label {
    display: block;
    font-size: var(--fs-sm);
    color: var(--text-2);
    margin-bottom: 6px;
}

.help {
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-top: 4px;
}

/* ── 整体布局：顶部 topnav + 主内容 ── */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-content {
    flex: 1;
    min-width: 0;
}

/* ── 顶部 topnav（所有页面统一） ── */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 13, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.topnav .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-1);
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 12px;
}

/* 全站统一：logo 文字纯白 */
.topnav.site-topnav .logo,
.topnav.site-topnav .logo .brand-accent {
    color: #fff;
}

.topnav .logo img {
    height: 24px;
    width: 24px;
    border-radius: 6px;
}

.topnav .nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
    margin-left: 12px;
}

/* 全站统一：创作区风格的菜单面板 */
.topnav.site-topnav .nav-links {
    gap: 6px;
    padding: 5px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    width: fit-content;
    flex: 0 0 auto;
}

/* 类创作区顶部菜单的胶囊导航 */
.topnav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: var(--fs-sm);
    color: var(--text-2);
    border-radius: 8px;
    transition: all var(--t-fast);
    text-decoration: none;
    min-height: 32px;
}

.topnav .nav-link:hover {
    color: var(--text-1);
    background: var(--bg-3);
    text-decoration: none;
}

.topnav .nav-link.active {
    color: #fff;
    background: linear-gradient(140deg, var(--primary), var(--accent));
    box-shadow: 0 4px 12px var(--primary-soft);
    font-weight: 500;
}

.topnav .nav-link .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
}

.topnav .nav-link .icon svg {
    width: 100%;
    height: 100%;
}

.topnav .right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── 用户头像/登录按钮 ── */
.topnav .user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 99px;
    cursor: pointer;
    transition: all var(--t-fast);
    color: var(--text-1);
    font-size: var(--fs-sm);
    text-decoration: none;
    min-height: 36px;
}

.topnav .user-pill:hover {
    background: var(--bg-3);
    text-decoration: none;
}

.topnav .user-pill .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.topnav .user-pill .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topnav .user-pill .name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topnav .user-pill.login {
    padding: 7px 14px;
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 500;
    gap: 6px;
}

.topnav .user-pill.login .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.topnav .user-pill.login .icon svg {
    width: 100%;
    height: 100%;
}

.topnav .user-pill.login:hover {
    filter: brightness(1.1);
}

.topnav .user-pill.admin-mode {
    background: var(--warning);
    border-color: var(--warning);
    color: #0b0d12;
    font-weight: 500;
}

/* ── 顶部导航下拉菜单（移动端） ── */
.topnav .hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-1);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topnav .hamburger:active {
    background: var(--bg-2);
}

.topnav .nav-links.open {
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ── 主容器 ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.container.narrow {
    max-width: 720px;
}

.container.wide {
    max-width: 1400px;
}

.page-title {
    margin: 0 0 4px;
    font-size: var(--fs-2xl);
    font-weight: 600;
}

.page-sub {
    margin: 0 0 24px;
    font-size: var(--fs-sm);
    color: var(--text-2);
}

/* ── 页脚 ── */
.footer {
    margin-top: var(--space-7);
    padding: var(--space-5) 24px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-3);
    line-height: 1.8;
}

.footer a {
    color: var(--text-2);
}

.footer a:hover {
    color: var(--text-1);
    text-decoration: underline;
}

.footer .copy {
    margin-bottom: 2px;
}

.footer .links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer .beian {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer .beian::before {
    content: "🛡";
    font-size: 10px;
}

/* ── 通用工具 ── */
.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-5 {
    margin-top: 24px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-5 {
    margin-bottom: 24px;
}

.text-2 {
    color: var(--text-2);
}

.text-3 {
    color: var(--text-3);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.hidden {
    display: none !important;
}

.center {
    text-align: center;
}

/* ── 移动端适配 ── */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .topnav {
        padding: 0 12px;
        gap: 8px;
        height: 52px;
    }

    .topnav .nav-links {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-1);
        border-bottom: 1px solid var(--line);
        padding: 8px;
        gap: 2px;
    }

    .topnav .nav-links.open {
        display: flex;
        max-height: calc(100vh - 52px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .topnav .nav-links .nav-link {
        padding: 12px 16px;
    }

    .topnav .hamburger {
        display: flex;
    }

    .topnav .user-pill .name {
        display: none;
    }

    .topnav .user-pill {
        padding: 4px;
    }

    .topnav .user-pill .avatar {
        width: 32px;
        height: 32px;
    }

    .topnav .right .theme-toggle {
        display: none;
    }

    .container {
        padding: 16px;
    }

    .page-title {
        font-size: 20px;
    }

    .stat-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat {
        padding: 12px 14px;
    }

    .stat .val {
        font-size: 20px;
    }

    .card-head {
        padding: 12px 14px;
    }

    .card-body {
        padding: 14px;
    }

    /* 表格在手机端变为卡片堆叠 */
    .tbl-mobile-stack thead {
        display: none;
    }

    .tbl-mobile-stack,
    .tbl-mobile-stack tbody,
    .tbl-mobile-stack tr,
    .tbl-mobile-stack td {
        display: block;
        width: 100%;
    }

    .tbl-mobile-stack tr {
        background: var(--bg-2);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        margin-bottom: 12px;
        padding: 12px;
    }

    .tbl-mobile-stack td {
        border-bottom: none;
        padding: 4px 0;
    }

    .tbl-mobile-stack td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: var(--fs-xs);
        color: var(--text-3);
        margin-bottom: 2px;
    }

    .tbl-mobile-stack td[data-label]:not(:last-child) {
        border-bottom: 1px dashed var(--line);
        margin-bottom: 6px;
        padding-bottom: 6px;
    }

    /* 按钮移动端加大点击区 */
    .btn {
        min-height: 36px;
        padding: 8px 14px;
    }

    .btn-sm {
        min-height: 32px;
        padding: 5px 10px;
    }

    /* 行内操作按钮在移动端可换行 */
    .row-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .row-actions .btn {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* 统计卡防止长邮箱溢出 */
    .stat {
        overflow: hidden;
    }

    .stat .val {
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    .stat-row {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 12px;
    }

    .topnav .logo {
        font-size: var(--fs-sm);
    }
}

/* ── 主题切换（亮色基础，暗色为默认） ── */
body.theme-light {
    --bg-1: #ffffff;
    --bg-2: #f6f7fa;
    --bg-3: #eceff4;
    --bg-elevated: #ffffff;
    --line: #d8dde6;
    --line-strong: #b8c0cc;
    --text-1: #1a1f2c;
    --text-2: #5a6172;
    --text-3: #8b91a0;
    --text-4: #b0b6c2;
    --primary-soft: rgba(109, 142, 255, 0.10);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ── Toast 简单通知 ── */
.toast-container {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    color: var(--text-1);
    box-shadow: var(--shadow);
    animation: toastIn 0.3s var(--ease);
    max-width: 360px;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.danger {
    border-left-color: var(--danger);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── adminCard 同源组件（index.html / account.html 共享） ── */
.studio-card {
    background: var(--surface, var(--bg-2));
    border: 1px solid var(--border-soft, var(--line));
    border-radius: var(--r-lg, var(--radius-lg));
    box-shadow: var(--shadow-md, var(--shadow));
}

.admin-section {
    padding: 20px 22px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.admin-section-header svg {
    width: 17px;
    height: 17px;
    color: var(--accent-ink, var(--primary));
}

.admin-section-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.admin-section-desc {
    font-size: 12.5px;
    color: var(--text-muted, var(--text-3));
    margin-bottom: 16px;
    line-height: 1.5;
}

.admin-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-row input {
    font-family: var(--font-mono, var(--font-ui));
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

/* ════════════════════════════════════════════════════════════════
   整站统一布局：topnav + 左侧 nav-rail + 主内容
   由 shared.js 的 applyUnifiedLayout() 自动套壳
   ════════════════════════════════════════════════════════════════ */

/* 根容器：竖向 flex 让 layout-body 撑满剩余高度 */
#appRoot {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 套壳后的整体容器 */
.unified-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 水平布局：左 nav-rail + 右 main-area */
.layout-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ── 左侧 nav-rail ── */
.nav-rail {
    width: 96px;
    flex-shrink: 0;
    background: var(--bg-2);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 0 14px;
    gap: 6px;
    overflow-y: auto;
}

.nav-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(140deg, var(--primary), var(--accent));
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px var(--primary-soft);
    margin-bottom: 14px;
    overflow: hidden;
    text-decoration: none;
}

.nav-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-logo:hover {
    text-decoration: none;
    filter: brightness(1.08);
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    align-items: center;
}

.nav-btn {
    width: 68px;
    min-height: 64px;
    padding: 10px 0 8px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-2);
    position: relative;
    transition: all .15s;
    font-size: 12px;
    font-weight: 500;
    box-sizing: border-box;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.nav-btn:hover {
    background: var(--bg-3);
    color: var(--text-1);
    text-decoration: none;
}

.nav-btn svg {
    width: 28px;
    height: 28px;
}

.nav-btn > span {
    max-width: 64px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-btn .avatar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.nav-btn.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    border-radius: 99px;
    background: var(--primary);
}

.nav-spacer {
    flex: 1;
    min-height: 8px;
}

/* ── 主内容区 ── */
.main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--bg-1);
}

.content {
    flex: 1;
    width: 100%;
    padding: 24px 28px;
    overflow-y: auto;
}

.content-inner {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── 移动端：nav-rail 变顶部横排 ── */
@media (max-width: 768px) {
    .layout-body {
        flex-direction: column;
    }

    .nav-rail {
        width: 100%;
        flex-direction: row;
        padding: 8px 12px;
        gap: 4px;
        border-right: none;
        border-bottom: 1px solid var(--line);
        overflow-x: auto;
        overflow-y: hidden;
    }

    .nav-logo {
        display: none;
    }

    .nav-items {
        flex-direction: row;
        flex: 1;
        gap: 2px;
    }

    .nav-btn {
        width: 56px;
        min-height: 52px;
        padding: 6px 0 4px;
    }

    .nav-btn svg {
        width: 22px;
        height: 22px;
    }

    .nav-btn > span {
        font-size: 10px;
    }

    .nav-spacer {
        display: none;
    }

    .nav-btn.active::before {
        display: none;
    }

    .content {
        padding: 16px;
    }

    .admin-section {
        padding: 16px;
    }

    .admin-section-header h3 {
        font-size: 14px;
    }

    .admin-section-desc {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        width: 48px;
    }
}