/* ========================================================================
   站长工具网 · 统一设计系统
   - 顶部为全局设计 token（明/暗主题），前台 / 后台 / 安装三端共享
   - 前台专属样式见 frontend.css（复用下方 token）
   - 本文件负责：安装向导 + 后台管理 两套样式
   在 <html data-theme="dark"> 时自动切换暗色
   ======================================================================== */

:root {
    /* 品牌主色（渐变） */
    --brand-1: #667eea;
    --brand-2: #764ba2;
    --brand-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* 语义色 */
    --color-primary: #667eea;
    --color-success: #67c23a;
    --color-danger: #f56c6c;
    --color-warning: #e6a23c;

    /* 中性色 —— 明主题 */
    --bg-page: #f5f7fa;
    --bg-surface: #ffffff;
    --bg-subtle: #f5f7fa;
    --bg-hover: #fafafa;
    --border: #ebeef5;
    --border-strong: #dcdfe6;
    --text-1: #333333;
    --text-2: #606266;
    --text-3: #999999;
    --text-on-brand: #ffffff;

    /* 阴影 / 圆角 */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 6px 20px rgba(102, 126, 234, 0.2);
    --shadow-pop: 0 8px 30px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;

    /* 后台侧栏 */
    --admin-sidebar: #304156;
    --admin-sidebar-hover: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] {
    --bg-page: #14161a;
    --bg-surface: #1f2329;
    --bg-subtle: #262b32;
    --bg-hover: #2a2f37;
    --border: #2e343c;
    --border-strong: #3a414b;
    --text-1: #e6e8eb;
    --text-2: #b4b9c0;
    --text-3: #8a9099;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 6px 22px rgba(102, 126, 234, 0.35);
    --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.5);
    --admin-sidebar: #181b20;
    --admin-sidebar-hover: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-page);
    color: var(--text-1);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--brand-2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================== 安装向导 ===================== */
.install-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.install-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
    border: 1px solid var(--border);
}

.install-header {
    background: var(--brand-grad);
    color: #fff;
    padding: 32px;
    text-align: center;
}

.install-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.install-body {
    padding: 32px;
}

.steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 8px;
}

.step-item {
    display: flex;
    align-items: center;
    margin: 0 12px;
    color: var(--text-3);
    font-size: 14px;
}

.step-item.active {
    color: var(--brand-1);
    font-weight: 600;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 13px;
}

.step-item.active .step-num {
    border-color: var(--brand-1);
    background: var(--brand-1);
    color: #fff;
}

.step-item.done .step-num {
    border-color: var(--color-success);
    background: var(--color-success);
    color: #fff;
}

.env-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.env-table th,
.env-table td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
}

.env-table th {
    background: var(--bg-subtle);
}

.status-pass {
    color: var(--color-success);
}

.status-fail {
    color: var(--color-danger);
}

.install-actions {
    text-align: center;
    margin-top: 24px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: var(--bg-subtle);
    color: var(--color-success);
    border: 1px solid #e1f3d8;
}

.alert-error {
    background: var(--bg-subtle);
    color: var(--color-danger);
    border: 1px solid #fde2e2;
}

/* ===================== 后台 ===================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: var(--admin-sidebar);
    color: #fff;
    flex-shrink: 0;
    transition: background 0.3s, width 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-sidebar-body {
    flex: 1;
    overflow-y: auto;
}

.admin-sidebar .logo {
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-menu {
    list-style: none;
    padding: 10px 0;
}

.admin-menu li a {
    display: block;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.admin-menu li a:hover,
.admin-menu li a.active {
    background: var(--admin-sidebar-hover);
    color: #fff;
    border-left-color: var(--brand-1);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: var(--bg-surface);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
}

.admin-topbar .topbar-title {
    font-weight: 600;
    font-size: 15px;
}

.admin-topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-2);
    font-size: 14px;
}

/* 通用明暗主题切换按钮（后台 topbar / login 等） */
.theme-toggle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-2);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.theme-toggle:hover {
    border-color: var(--brand-1);
    color: var(--brand-1);
    transform: rotate(15deg);
}

.admin-content {
    flex: 1;
    padding: 24px;
}

.admin-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.admin-card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.admin-card h2 .btn {
    margin-left: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--brand-grad);
    color: #fff;
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .num {
    font-size: 32px;
    font-weight: 700;
}

.stat-card .label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
}

.data-table th {
    background: var(--bg-subtle);
    font-weight: 600;
    color: var(--text-2);
}

.data-table tr:hover {
    background: var(--bg-hover);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.badge-success {
    background: rgba(103, 194, 58, 0.12);
    color: var(--color-success);
}

.badge-danger {
    background: rgba(245, 108, 108, 0.12);
    color: var(--color-danger);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--brand-grad);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: var(--shadow-lg);
}

.btn-default {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    color: var(--text-2);
}

.btn-default:hover {
    border-color: var(--brand-1);
    color: var(--brand-1);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-success {
    background: var(--color-success);
    color: #fff;
    border: none;
}

.btn-success:hover {
    opacity: 0.9;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-grad);
    padding: 20px;
}

.login-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 400px;
    max-width: 100%;
    box-shadow: var(--shadow-pop);
    border: 1px solid var(--border);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-1);
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination ul.pagination,
.pagination ul.pager {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination ul.pagination li,
.pagination ul.pager li {
    list-style: none;
}

.pagination ul.pagination li a,
.pagination ul.pagination li span,
.pagination ul.pager li a,
.pagination ul.pager li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-2);
    text-decoration: none;
    background: var(--bg-surface);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pagination ul.pagination li a:hover,
.pagination ul.pager li a:hover {
    border-color: var(--brand-1);
    color: var(--brand-1);
}

.pagination ul.pagination li.active span,
.pagination ul.pager li.active span {
    background: var(--brand-grad);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
}

.pagination ul.pagination li.disabled span,
.pagination ul.pager li.disabled span {
    color: var(--text-3);
    background: var(--bg-subtle);
    cursor: default;
}

.radio-group {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    cursor: pointer;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-surface);
    color: var(--text-1);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: "Consolas", "Monaco", monospace;
}

/* 后台表单通用结构 */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
}

.form-group .help-text {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

.diff-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Consolas", monospace;
    font-size: 13px;
}

.diff-table td {
    padding: 4px 8px;
    border: 1px solid var(--border);
    vertical-align: top;
}

.diff-same { background: var(--bg-surface); }
.diff-changed { background: #fdf6ec; }
.diff-added { background: #f0f9eb; }
.diff-removed { background: #fef0f0; }

html[data-theme="dark"] .diff-changed { background: #3a3320; }
html[data-theme="dark"] .diff-added { background: #1f3320; }
html[data-theme="dark"] .diff-removed { background: #3a2222; }

/* ===================== Toast 轻提示 ===================== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 220px;
    max-width: 440px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    box-shadow: var(--shadow-pop);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { background: var(--color-success); }
.toast-error   { background: var(--color-danger); }
.toast-info    { background: var(--color-primary); }

/* ===================== 表格空状态 ===================== */
.empty-cell {
    text-align: center;
    padding: 32px 12px;
    color: var(--text-3);
    font-size: 14px;
}

/* ===================== 后台响应式（窄屏） ===================== */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }

    .admin-sidebar .logo {
        padding: 12px 16px;
        justify-content: flex-start;
    }

    .admin-menu {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }

    .admin-menu li {
        flex: 0 0 auto;
    }

    .admin-menu li a {
        padding: 12px 16px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .admin-menu li a:hover,
    .admin-menu li a.active {
        border-left: none;
        border-bottom-color: var(--brand-1);
    }

    .admin-content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        padding: 0 16px;
    }

    .admin-grid-2,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .card-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===================== 后台增强组件 ===================== */
.admin-sidebar .logo {
    flex-direction: column;
    gap: 4px;
    padding: 20px 16px;
}

.admin-sidebar .logo-icon {
    font-size: 28px;
}

.admin-sidebar .logo-text {
    font-size: 14px;
    font-weight: 600;
}

.admin-menu-group {
    margin-bottom: 8px;
}

.menu-group-title {
    padding: 8px 24px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
}

.admin-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.menu-item-muted {
    opacity: 0.75;
}

.topbar-left {
    min-width: 0;
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.topbar-subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--text-3);
    font-weight: 400;
}

.admin-user {
    font-size: 13px;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    position: relative;
    overflow: hidden;
    text-align: left;
    padding: 20px 22px;
}

.stat-card .stat-icon {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 28px;
    opacity: 0.35;
}

.stat-card-primary { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card-success { background: linear-gradient(135deg, #11998e, #38ef7d); }
.stat-card-warning { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card-info    { background: linear-gradient(135deg, #4facfe, #00f2fe); }

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action-card {
    display: block;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--text-1);
    transition: all 0.25s;
}

.quick-action-card:hover {
    border-color: var(--brand-1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-1);
}

.qa-icon { font-size: 22px; display: block; margin-bottom: 8px; }
.qa-title { display: block; font-weight: 600; font-size: 14px; }
.qa-desc { display: block; font-size: 12px; color: var(--text-3); margin-top: 4px; }

.card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.toolbar-search {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 360px;
}

.toolbar-search .form-control {
    flex: 1;
}

.toolbar-search-wide {
    max-width: 520px;
}

.cell-tool {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cell-tool-icon {
    font-size: 22px;
    line-height: 1.2;
    flex-shrink: 0;
}

.cell-title {
    font-weight: 600;
    color: var(--text-1);
}

.cell-desc {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.code-inline {
    font-size: 12px;
    padding: 2px 6px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.form-group-lg {
    grid-column: span 2;
}

.form-textarea-lg {
    min-height: 280px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.required { color: var(--color-danger); }

.empty-cell {
    text-align: center;
    color: var(--text-3);
    padding: 32px 12px !important;
}

.setting-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.setting-tab {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--text-2);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.setting-panel[hidden] {
    display: none !important;
}

.setting-tab:hover {
    border-color: var(--brand-1);
    color: var(--brand-1);
}

.setting-tab.active {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.setting-panel-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-1);
}

.setting-panel-desc {
    font-size: 13px;
    color: var(--text-3);
    margin: -8px 0 16px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
}

.qrcode-upload-row {
    align-items: stretch;
}

.qrcode-upload-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qrcode-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
}

.qrcode-preview img {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.qrcode-preview-empty {
    font-size: 13px;
    color: var(--text-3);
}

.logo-preview {
    width: 120px;
    height: 120px;
}

.logo-preview img {
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
    border-radius: 12px;
}

.qrcode-upload-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qrcode-upload-btn {
    position: relative;
    overflow: hidden;
    margin: 0;
    cursor: pointer;
}

.qrcode-upload-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.form-hint {
    font-size: 12px;
    color: var(--text-3);
    margin: 0;
}

.form-hint code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--bg-subtle);
    font-size: 11px;
}

.setting-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0 16px;
}

.setting-subtitle {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-1);
}

.donate-list-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.donate-list-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.donate-list-editor .table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.donate-list-table {
    margin: 0;
}

.donate-list-table th,
.donate-list-table td {
    vertical-align: middle;
}

.donate-list-table .form-control {
    min-width: 0;
}

.donate-list-actions {
    text-align: center;
    white-space: nowrap;
}

.donate-list-add {
    align-self: flex-start;
}

/* ========== 新闻管理 ========== */
.toolbar-search-news {
    max-width: 560px;
}

.data-table-news .col-id {
    width: 56px;
    color: var(--text-3);
}

.data-table-news .col-time {
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-2);
}

.cell-news {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 220px;
}

.cell-news-body {
    min-width: 0;
}

.cell-title-link {
    color: var(--text-1) !important;
    text-decoration: none;
}

.cell-title-link:hover {
    color: var(--brand-1) !important;
}

.news-cover-thumb {
    width: 56px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.news-cover-thumb--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-3);
}

.news-form-section {
    margin-bottom: 28px;
}

.news-form-section:last-of-type {
    margin-bottom: 0;
}

.news-form-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}

.form-hint {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
    line-height: 1.5;
}

.news-cover-preview {
    display: block;
    margin-top: 10px;
    max-width: 240px;
    max-height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
}

.news-cover-preview:not(.is-visible),
.news-cover-preview[src=""] {
    display: none;
}

/* wangEditor 新闻正文 */
.news-editor-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-surface);
}

.news-editor-toolbar {
    border-bottom: 1px solid var(--border);
}

.news-editor-body {
    min-height: 360px;
    background: var(--bg-surface);
}

.news-editor-source {
    display: none !important;
}

.news-editor-wrap .w-e-text-container {
    background: var(--bg-surface) !important;
    color: var(--text-1) !important;
}

.news-editor-wrap .w-e-toolbar {
    background: var(--bg-subtle) !important;
    border-bottom: 1px solid var(--border) !important;
}

.news-editor-wrap .w-e-bar-item button {
    color: var(--text-2) !important;
}

@media (max-width: 960px) {
    .data-table-news .col-time,
    .data-table-news th:nth-child(4),
    .data-table-news td:nth-child(4) {
        display: none;
    }
}

/* 系统信息页 */
.info-kv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}

.info-kv-table th,
.info-kv-table td {
    padding: 12px 14px;
    border: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
    vertical-align: top;
}

.info-kv-table th {
    width: 180px;
    background: var(--bg-subtle);
    color: var(--text-2);
    font-weight: 500;
}

.info-kv-table td code {
    font-size: 13px;
}

.system-info-note {
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
}

.system-info-note h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--text-1);
}

.system-info-note ul {
    margin: 0;
    padding-left: 20px;
}

.system-info-note li + li {
    margin-top: 6px;
}

/* 商业授权页 */
.license-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.license-hero {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

.license-hero--success {
    border-color: rgba(56, 239, 125, 0.35);
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.08) 0%, var(--bg-surface) 100%);
}

.license-hero--info {
    border-color: rgba(79, 172, 254, 0.35);
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.08) 0%, var(--bg-surface) 100%);
}

.license-hero--warning {
    border-color: rgba(245, 87, 108, 0.35);
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.08) 0%, var(--bg-surface) 100%);
}

.license-hero--danger {
    border-color: rgba(245, 87, 108, 0.45);
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.1) 0%, var(--bg-surface) 100%);
}

.license-hero-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    border-radius: 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
}

.license-hero-body {
    flex: 1;
    min-width: 0;
}

.license-hero-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.license-hero-label {
    font-size: 13px;
    color: var(--text-3);
}

.license-hero-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-1);
}

.license-hero-meta {
    margin: 0;
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.6;
}

.license-hero-meta strong {
    color: var(--text-1);
    font-weight: 600;
}

.license-hero-sep {
    margin: 0 4px;
    opacity: 0.5;
}

.license-detail-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.license-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
}

.license-detail-icon {
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
}

.license-detail-label {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 4px;
}

.license-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    word-break: break-all;
}

.license-key-section {
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
}

.license-key-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.license-key-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}

.license-key-tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(56, 239, 125, 0.15);
    color: var(--color-success);
}

.license-key-tag--muted {
    background: var(--bg-surface);
    color: var(--text-3);
    border: 1px solid var(--border);
}

.license-key-value {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    color: var(--text-1);
    letter-spacing: 0.04em;
    word-break: break-all;
}

.license-key-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.5;
}

.license-editions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.license-edition-card {
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.license-edition-card.is-active {
    border-color: var(--brand-1);
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.15);
}

.license-edition-card--pro.is-active {
    border-color: #11998e;
    box-shadow: 0 0 0 1px rgba(17, 153, 142, 0.15);
}

.license-edition-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--bg-subtle);
    color: var(--text-3);
}

.license-edition-card--pro .license-edition-badge {
    background: rgba(17, 153, 142, 0.12);
    color: #11998e;
}

.license-edition-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
}

.license-edition-desc {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.6;
}

.license-edition-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
}

.license-edition-price {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    color: #11998e;
    line-height: 1.2;
}

.license-edition-price--free {
    font-size: 22px;
    color: var(--text-2);
}

.license-edition-price-currency {
    font-size: 18px;
    margin-right: 2px;
}

.license-edition-price-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
}

.license-purchase {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.license-price-card {
    padding: 22px 20px;
    border-radius: var(--radius);
    border: 1px solid rgba(17, 153, 142, 0.35);
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, var(--bg-surface) 100%);
    text-align: center;
}

.license-price-label {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 8px;
}

.license-price-value {
    font-size: 42px;
    font-weight: 700;
    color: #11998e;
    line-height: 1;
}

.license-price-currency {
    font-size: 22px;
    margin-right: 2px;
}

.license-price-unit {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}

.license-price-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
}

.license-purchase-info {
    padding: 20px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
}

.license-purchase-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
}

.license-purchase-steps {
    margin: 0 0 16px;
    padding-left: 20px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.8;
}

.license-contact-list {
    display: grid;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.license-contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.license-contact-label {
    color: var(--text-3);
    flex-shrink: 0;
}

.license-contact-value {
    color: var(--text-1);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

a.license-contact-value:hover {
    color: var(--brand-1);
}

@media (max-width: 960px) {
    .license-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .license-editions {
        grid-template-columns: 1fr;
    }

    .license-purchase {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .license-hero {
        flex-direction: column;
    }

    .license-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* 产品版权信息 */
.admin-sidebar-footer {
    margin-top: auto;
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.45);
}

.admin-copyright-main {
    color: rgba(255, 255, 255, 0.55);
}

.admin-copyright-main a,
.admin-copyright-sub a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}

.admin-copyright-main a:hover,
.admin-copyright-sub a:hover {
    color: #fff;
    text-decoration: underline;
}

.admin-copyright-sub {
    margin-top: 2px;
}

.admin-copyright-notice {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    font-size: 10px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.38);
}

.login-copyright {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.login-copyright-main {
    margin: 0;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
}

.login-copyright-main a {
    color: var(--text-2);
}

.login-copyright-main a:hover {
    color: var(--brand-1);
}

.login-copyright-notice {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.5;
}
