:root {
    --primary: #0b6bcb;
    --primary-dark: #084f96;
    --primary-soft: #e8f1fc;
    --accent: #0e9f6e;
    --danger: #dc2626;
    --warning: #d97706;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 8px 30px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

/* ---------------- 布局 ---------------- */
.admin-body { display: flex; min-height: 100vh; }

.sidebar {
    width: 236px;
    flex: 0 0 236px;
    background: #0f172a;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    overflow-y: auto;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand-mark {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, #2f80ed, #0e9f6e);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
}
.brand-text { line-height: 1.25; }
.brand-text strong { display: block; color: #fff; font-size: 15px; font-weight: 600; }
.brand-text span { font-size: 11px; color: #94a3b8; }

.site-switcher { padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.site-switcher label { display: block; font-size: 11px; color: #94a3b8; margin-bottom: 6px; letter-spacing: .04em; }
.site-switcher select {
    width: 100%; padding: 8px 10px; border-radius: 8px;
    background: #1e293b; color: #e2e8f0; border: 1px solid #334155; font-size: 13px;
}

.nav-group { padding: 14px 0 6px; }
.nav-group-title { padding: 4px 20px 8px; font-size: 11px; color: #64748b; letter-spacing: .08em; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 18px; margin: 2px 10px; border-radius: 9px;
    color: #cbd5e1; font-size: 13.5px;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(47, 128, 237, .18); color: #fff; box-shadow: inset 3px 0 0 #60a5fa; }
.nav-item .ico { width: 18px; text-align: center; opacity: .8; font-size: 14px; }
.nav-item .dot {
    margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px;
    display: inline-flex; align-items: center; justify-content: center;
}

.sidebar-foot { margin-top: auto; padding: 16px 18px 18px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 12px; }
.sidebar-foot a { display: block; color: #94a3b8; padding: 5px 0; }
.sidebar-foot a:hover { color: #fff; }

.sidebar-close {
    display: none;
    margin-left: auto;
    width: 32px; height: 32px;
    align-items: center; justify-content: center;
    padding: 0; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px;
    background: rgba(255, 255, 255, .06); color: #e2e8f0;
    font-size: 20px; line-height: 1; cursor: pointer;
}
.sidebar-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.sidebar-backdrop { display: none; }

/* 当前产品与产品权限 */
.product-chip {
    margin: 0 12px 6px; padding: 11px 12px; border-radius: 10px;
    background: rgba(47, 128, 237, .10); border: 1px solid rgba(96, 165, 250, .20);
    font-size: 11.5px; color: #b9c6d6;
}
.product-chip-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-chip-top span { color: #93a4b8; }
.product-chip-top b { color: #fff; font-size: 13px; font-weight: 600; }
.product-chip-perms { margin-top: 5px; color: #8fa8c4; font-size: 11px; line-height: 1.5; }
.product-chip a { display: inline-block; margin-top: 7px; color: #7db7ff; font-size: 11.5px; }
.product-chip a:hover { color: #fff; }
.product-select { width: 112px; }
.product-perm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 22px 0 12px; }
.product-perm-head b { font-size: 14px; }
.product-perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.perm-item {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer;
}
.perm-item:hover { border-color: #bfdbfe; background: #f8fbff; }
.perm-item input { margin-top: 3px; accent-color: var(--primary); }
.perm-item span { display: grid; gap: 3px; min-width: 0; }
.perm-item b { font-size: 13px; color: var(--text); }
.perm-item small { color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.product-perm-summary { display: flex; flex-wrap: wrap; gap: 5px; max-width: 440px; }
@media (max-width: 760px) {
    .product-perm-grid { grid-template-columns: 1fr; }
}

.main { margin-left: 236px; flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 62px; background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; position: sticky; top: 0; z-index: 15;
}
.topbar-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title { min-width: 0; }
.topbar-title h1, .topbar-title .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-menu-btn {
    display: none;
    width: 38px; height: 38px; flex: 0 0 38px;
    align-items: center; justify-content: center;
    padding: 0; border: 1px solid var(--border); border-radius: 10px;
    background: #f8fafc; color: var(--text); font-size: 19px; line-height: 1; cursor: pointer;
}
.admin-menu-btn:hover { background: var(--primary-soft); color: var(--primary-dark); border-color: #bfdbfe; }
.admin-menu-btn:focus-visible, .sidebar-close:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.topbar h1 { margin: 0; font-size: 17px; font-weight: 600; }
.topbar .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
    display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px;
    border-radius: 20px; background: #f8fafc; border: 1px solid var(--border); font-size: 13px;
}
.avatar {
    width: 26px; height: 26px; border-radius: 50%; background: var(--primary);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 12px; text-transform: uppercase;
}

.content { padding: 22px 24px 40px; width: 100%; max-width: 1360px; }

/* ---------------- 通用组件 ---------------- */
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.card-head .hint { font-size: 12px; color: var(--muted); }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px 16px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: #fbfcfe; display: flex; gap: 10px; align-items: center; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: 9px; border: 1px solid transparent;
    background: var(--primary); color: #fff; font-size: 13.5px; cursor: pointer;
    transition: .16s ease; white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #f8fafc; color: var(--primary); border-color: #cbd5e1; }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn-soft:hover { background: #dbeafe; color: var(--primary-dark); }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; color: #991b1b; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-icon { padding: 6px 9px; }

.input, .select, .textarea {
    width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 9px;
    font-size: 13.5px; font-family: inherit; color: var(--text); background: #fff; transition: .16s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 107, 203, .12);
}
.textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
.select { height: 38px; }
.input-sm { padding: 6px 10px; font-size: 12.5px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: #374151; margin-bottom: 6px; font-weight: 500; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field .req { color: var(--danger); }
.form-grid { display: grid; gap: 0 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.links-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 1200px) {
    .links-layout { grid-template-columns: 1fr; gap: 18px 0; }
}
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 6px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; padding: 11px 16px; background: #f8fafc; color: #475569;
    font-weight: 500; font-size: 12.5px; white-space: nowrap; border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fcfdff; }
.table .actions { display: flex; gap: 6px; white-space: nowrap; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.thumb-sm { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f1f5f9; flex: 0 0 44px; }
.cell-title { font-weight: 500; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.license-edit { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.license-edit .input { width: 136px; }

/* ---------------- 素材库 ---------------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-top: 16px; }
.media-item { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.media-thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; font: inherit; background: #f1f5f9; border: 0; cursor: zoom-in; }
.media-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.media-thumb:hover img { transform: scale(1.03); }
.media-thumb:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.media-thumb-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; background: rgba(15,23,42,.38); opacity: 0; transition: opacity .18s ease; }
.media-thumb:hover .media-thumb-hint, .media-thumb:focus-visible .media-thumb-hint { opacity: 1; }
.media-meta { padding: 12px; }
.media-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text); }
.media-desc-form { display: flex; flex-direction: column; gap: 5px; }
.media-desc-label { font-size: 11px; color: var(--muted); }
.media-desc-row { display: flex; align-items: center; gap: 6px; }
.media-desc-row .input { min-width: 0; height: 32px; padding: 6px 8px; font-size: 12.5px; }
.media-desc-row .btn { flex: 0 0 auto; padding: 6px 9px; }
.media-preview { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.media-preview[hidden] { display: none; }
.media-preview-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.72); }
.media-preview-dialog { position: relative; z-index: 1; display: flex; flex-direction: column; width: min(880px, 100%); max-height: 90vh; overflow: hidden; background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(15,23,42,.35); }
.media-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.media-preview-head strong { display: block; font-size: 15px; }
.media-preview-close { padding: 0 6px; font-size: 26px; line-height: 1.1; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.media-preview-close:hover { color: var(--text); }
.media-preview-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; background: #f8fafc; }
.media-preview-body img { display: block; max-width: 100%; max-height: 64vh; object-fit: contain; border-radius: 4px; }
.media-preview-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
body.media-preview-open { overflow: hidden; }

.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.badge-green { background: #ecfdf5; color: #047857; }
.badge-gray { background: #f1f5f9; color: #64748b; }
.badge-red { background: #fef2f2; color: #b91c1c; }
.badge-blue { background: var(--primary-soft); color: var(--primary-dark); }
.badge-amber { background: #fffbeb; color: #b45309; }

.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty h3 { margin: 0 0 8px; font-size: 15px; color: var(--text); }
.empty p { margin: 0 0 16px; font-size: 13px; }

.pager { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff;
    font-size: 13px; color: var(--text);
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .disabled { color: #cbd5e1; }

/* ---------------- 数据看板 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 18px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::after {
    content: ""; position: absolute; right: -30px; top: -30px; width: 80px; height: 80px;
    border-radius: 50%; background: var(--primary-soft); opacity: .6;
}
.stat-label { font-size: 12.5px; color: var(--muted); position: relative; z-index: 1; }
.stat-value { font-size: 28px; font-weight: 700; margin: 6px 0 2px; letter-spacing: -.02em; position: relative; z-index: 1; }
.stat-foot { font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
.stat-foot .up { color: var(--accent); } .stat-foot .down { color: var(--danger); }

.chart-box { padding: 8px 8px 0; }
.chart-canvas { width: 100%; height: 260px; display: block; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.quick-item {
    display: flex; flex-direction: column; gap: 4px; padding: 16px;
    border: 1px dashed #dbe3ef; border-radius: 10px; background: #fbfdff; color: var(--text);
}
.quick-item:hover { border-color: var(--primary); color: var(--primary); }
.quick-item .q-ico { font-size: 18px; }
.quick-item b { font-size: 13.5px; font-weight: 600; }
.quick-item span { font-size: 12px; color: var(--muted); }

.checklist { display: flex; flex-direction: column; gap: 10px; }
.check-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.check-item .mark {
    width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-size: 12px; background: #f1f5f9; color: #94a3b8;
}
.check-item.done .mark { background: #ecfdf5; color: #047857; }
.check-item a { margin-left: auto; font-size: 12px; }

/* ---------------- 提示 ---------------- */
.flash { margin-bottom: 14px; padding: 12px 16px; border-radius: 10px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.flash-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.flash-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.flash-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert-info { background: #eff6ff; color: #1d4ed8; }
.alert-warn { background: #fffbeb; color: #92400e; }
.alert-danger { background: #fef2f2; color: #b91c1c; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab {
    padding: 10px 16px; border-radius: 9px 9px 0 0; font-size: 13.5px; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; background: #fff; }

/* ---------------- 图片字段 ---------------- */
.image-field { display: flex; gap: 10px; align-items: flex-start; }
.image-preview {
    width: 96px; height: 96px; border-radius: 9px; border: 1px dashed #cbd5e1;
    background: #f8fafc center/cover no-repeat; flex: 0 0 96px;
    display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 12px;
}
.image-field .grow { display: flex; flex-direction: column; gap: 8px; }
.image-field .row { gap: 8px; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 10px; }
.image-item {
    position: relative; aspect-ratio: 1 / 1; border: 1px solid #e2e8f0; border-radius: 9px;
    background: #f8fafc; overflow: hidden;
}
.image-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-remove {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%;
    background: rgba(15, 23, 42, .72); color: #fff; font-size: 14px; line-height: 20px;
    cursor: pointer; padding: 0;
}
.image-remove:hover { background: #b91c1c; }

/* ---------------- 编辑器（设计器） ---------------- */
.editor-body { margin: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: #0f172a; }
.editor-topbar {
    height: 56px; background: #0f172a; color: #e2e8f0; display: flex; align-items: center;
    justify-content: space-between; padding: 0 16px; gap: 12px; border-bottom: 1px solid #1e293b; flex: 0 0 56px;
}
.editor-topbar .left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.editor-topbar .left a { color: #94a3b8; font-size: 13px; }
.editor-topbar .left a:hover { color: #fff; }
.editor-topbar .page-name { color: #fff; font-weight: 600; font-size: 14px; }
.editor-topbar .right { display: flex; align-items: center; gap: 10px; }
.save-state { font-size: 12px; color: #94a3b8; }
.save-state.ok { color: #34d399; }
.save-state.err { color: #f87171; }
.btn-light { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; }
.btn-light:hover { background: #263449; color: #fff; }
.btn-primary-editor { background: #2f80ed; color: #fff; }
.btn-primary-editor:hover { background: #1c6fd6; color: #fff; }

.editor-shell { flex: 1; display: flex; min-height: 0; }
.editor-left {
    width: 230px; flex: 0 0 230px; background: #111c2e; color: #cbd5e1;
    display: flex; flex-direction: column; border-right: 1px solid #1e293b; min-height: 0;
}
.editor-panel-title {
    padding: 12px 14px; font-size: 12px; color: #94a3b8; border-bottom: 1px solid #1e293b;
    display: flex; align-items: center; justify-content: space-between;
}
.editor-pages { padding: 8px; overflow-y: auto; max-height: 200px; }
.page-link {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px;
    font-size: 13px; color: #cbd5e1;
}
.page-link:hover { background: #1a2739; color: #fff; }
.page-link.active { background: #1c3350; color: #fff; }
.page-link .home-tag { font-size: 10px; background: #14532d; color: #86efac; padding: 1px 5px; border-radius: 4px; }
.editor-blocks { flex: 1; overflow-y: auto; padding: 8px; }
.block-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px;
    font-size: 12.5px; color: #cbd5e1; cursor: pointer; border: 1px solid transparent;
}
.block-item:hover { background: #1a2739; }
.block-item.active { background: #1c3350; border-color: #2f80ed; color: #fff; }
.block-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-item .ops { display: flex; gap: 2px; opacity: 0; }
.block-item:hover .ops, .block-item.active .ops { opacity: 1; }
.block-item .mini { background: none; border: 0; color: #94a3b8; cursor: pointer; padding: 2px 4px; font-size: 11px; }
.block-item .mini:hover { color: #fff; }

.editor-canvas { flex: 1; min-width: 0; background: #eef2f7; position: relative; }
.canvas-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.canvas-badge {
    position: absolute; left: 14px; top: 12px; z-index: 2; background: rgba(15, 23, 42, .72);
    color: #fff; font-size: 11.5px; padding: 4px 10px; border-radius: 20px; pointer-events: none;
}

.editor-right {
    width: 330px; flex: 0 0 330px; background: #fff; border-left: 1px solid var(--border);
    display: flex; flex-direction: column; min-height: 0;
}
.editor-right-head {
    padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center;
    justify-content: space-between;
}
.editor-right-head b { font-size: 14px; }
.editor-props { flex: 1; overflow-y: auto; padding: 16px; }
.editor-props .field { margin-bottom: 14px; }
.editor-props .field label { font-size: 12.5px; }
.prop-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.editor-add-btn { padding: 12px; border-top: 1px solid var(--border); background: #fbfcfe; }

.prop-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.prop-list-item { border-bottom: 1px solid var(--border); padding: 10px; background: #fbfcfe; }
.prop-list-item:last-child { border-bottom: 0; }
.prop-list-item .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.prop-list-item .head b { font-size: 12px; color: var(--muted); }
.prop-list-item .inputs { display: grid; gap: 6px; }
.prop-list-item .inputs input, .prop-list-item .inputs textarea {
    padding: 7px 9px; font-size: 12.5px; border-radius: 7px; border: 1px solid #d1d5db; width: 100%;
}
.prop-list-add { padding: 8px; }

/* 添加区块弹层 */
.modal-mask {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 40;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
    width: 640px; max-width: 100%; max-height: 80vh; background: #fff; border-radius: 14px;
    overflow: hidden; display: flex; flex-direction: column;
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head b { font-size: 15px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.block-group-title { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.block-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.block-choice {
    border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer;
    background: #fbfcfe; text-align: left; font-family: inherit;
}
.block-choice:hover { border-color: var(--primary); background: #f3f8ff; color: var(--primary); }
.block-choice b { display: block; font-size: 13px; margin-bottom: 3px; }
.block-choice span { font-size: 11.5px; color: var(--muted); }

/* ---------------- 模板卡片 ---------------- */
.template-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.template-category-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.template-filter { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; font: inherit; font-size: 12.5px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; transition: .16s; }
.template-filter:hover { color: var(--primary); border-color: var(--primary); }
.template-filter.active { color: var(--primary-dark); background: var(--primary-soft); border-color: var(--primary); }
.template-filter-count { min-width: 18px; padding: 1px 5px; text-align: center; font-size: 11px; color: var(--muted); background: #fff; border-radius: 999px; }
.template-filter-tip { align-self: center; margin-left: 2px; }
.template-category-browser { margin: 0 0 4px; }
.template-category-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.template-top-filter { cursor: default; }
.template-top-filter:hover, .template-top-filter.is-open { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.template-top-filter.is-selected { color: #fff; background: var(--primary); border-color: var(--primary); }
.template-top-filter.is-selected .template-filter-count { color: var(--primary-dark); }
.template-top-caret { font-size: 10px; color: var(--muted); }
.template-top-filter.is-selected .template-top-caret { color: #dbeafe; }
.template-subcategory-panel { margin-top: 12px; padding: 13px 14px; background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; }
.template-subcategory-panel[hidden] { display: none; }
.template-subcategory-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.template-subcategory-head b { font-size: 13px; color: var(--text); }
.template-subcategory-list { display: flex; flex-wrap: wrap; gap: 8px; }
.template-subcategory { padding: 7px 12px; font: inherit; font-size: 12.5px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: .16s; }
.template-subcategory:hover { color: var(--primary); border-color: var(--primary); }
.template-subcategory.active { color: var(--primary-dark); background: var(--primary-soft); border-color: var(--primary); }
.template-subcategory-empty { margin: 0; font-size: 12.5px; color: var(--muted); }
.template-filter.active .template-filter-count { color: var(--primary-dark); }
.template-filter-side { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: 0 1 380px; }
.template-search { width: 240px; max-width: 100%; }
.template-search::-webkit-search-cancel-button { cursor: pointer; }
.template-category-note { margin: 8px 0 16px; }

.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tpl-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.tpl-card.is-current { border-color: var(--primary); }
.tpl-card[hidden] { display: none; }
.tpl-thumb { position: relative; aspect-ratio: 16 / 10; background: #f1f5f9 center top / cover no-repeat; overflow: hidden; }
.tpl-current-flag { position: absolute; top: 10px; left: 10px; padding: 4px 9px; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(14,159,110,.95); border-radius: 999px; }
.tpl-card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.tpl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tpl-card-head b { font-size: 14.5px; color: var(--text); }
.tpl-card-head .badge { flex: 0 0 auto; }
.tpl-desc { min-height: 40px; margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-tags .badge { font-size: 11.5px; }
.tpl-card-body .row { margin-top: auto; padding-top: 12px; }
.template-empty { padding: 40px 20px; }

.current-template { padding: 6px 12px; border-radius: 20px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; }

/* ---------------- 站点卡片 ---------------- */
.site-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.site-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.site-card h3 { margin: 0 0 6px; font-size: 15px; }
.site-card .url { font-size: 12px; color: var(--muted); word-break: break-all; }
.site-card .row { margin-top: 14px; }
.site-card.current { border-color: var(--primary); }

/* ---------------- 登录页 ---------------- */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px;
    background: radial-gradient(1200px 600px at 10% 0%, #e8f1fc 0%, #f5f7fb 55%);
}
.auth-card { width: 420px; max-width: 100%; background: #fff; border-radius: 18px; padding: 34px; box-shadow: 0 24px 60px rgba(15, 23, 42, .12); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .brand-mark { width: 42px; height: 42px; border-radius: 11px; font-size: 19px; }
.auth-brand strong { font-size: 19px; display: block; }
.auth-brand span { font-size: 12px; color: var(--muted); }
.auth-card h2 { font-size: 18px; margin: 0 0 4px; }
.auth-card p.lead { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.auth-card .btn { width: 100%; padding: 11px; font-size: 14px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1200px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tpl-grid, .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .admin-body { display: block; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 306px);
        flex: 0 0 auto;
        transform: translateX(-102%);
        transition: transform .24s ease;
        z-index: 60;
        box-shadow: 18px 0 48px rgba(15, 23, 42, .24);
    }
    .main { margin-left: 0; }
    body.admin-menu-open .sidebar { transform: translateX(0); }
    body.admin-menu-open { overflow: hidden; }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: none;
        background: rgba(15, 23, 42, .50);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }
    body.admin-menu-open .sidebar-backdrop { display: block; }
    .sidebar-close, .admin-menu-btn { display: inline-flex; }
    .content { padding: 16px 16px 34px; max-width: none; }
    .topbar { padding: 0 16px; }
    .grid-2, .grid-3, .grid-4, .site-grid { grid-template-columns: 1fr; }
    .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .nav-group { display: block; }
    .nav-group-title { padding-left: 20px; }
    .sidebar-foot { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

@media (max-width: 900px) {
    .topbar { height: 58px; padding: 0 12px; }
    .topbar-lead { gap: 9px; }
    .admin-menu-btn { width: 36px; height: 36px; flex-basis: 36px; border-radius: 9px; }
    .topbar h1 { font-size: 15.5px; }
    .topbar .sub { font-size: 11px; }
    .topbar-actions { gap: 6px; }
    .content { padding: 12px 12px 30px; }

    .card { border-radius: 10px; margin-bottom: 14px; }
    .card-head { align-items: flex-start; flex-direction: column; gap: 8px; padding: 14px 14px 12px; }
    .card-head h2 { font-size: 14.5px; }
    .card-head .row { width: 100%; flex-wrap: wrap; }
    .card-body { padding: 14px; }
    .card-body.tight { padding: 10px 12px; }
    .card-foot { flex-wrap: wrap; padding: 12px 14px; }

    .form-grid { gap: 0; }
    .row { flex-wrap: wrap; }
    .row.between { align-items: flex-start; }
    .row > .input:not([type="color"]), .row > .select { flex: 1 1 180px; width: auto !important; min-width: 0; }
    .license-edit { flex-wrap: wrap; white-space: normal; }
    .license-edit .input { width: 100%; }

    .page-head h1 { font-size: 21px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1 1 auto; }

    .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { flex: 0 0 auto; white-space: nowrap; }

    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table th, .table td { padding: 10px 12px; font-size: 12.5px; }
    .table th { font-size: 11.5px; }

    .stat-value { font-size: 24px; }
    .chart-canvas { height: 220px; }
    .quick-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px; }
    .pager { gap: 5px; padding: 14px 8px; }
    .pager a, .pager span { min-width: 32px; height: 32px; padding: 0 8px; }

    .modal-mask { padding: 12px; align-items: flex-end; }
    .modal { width: 100%; max-height: 88vh; border-radius: 14px 14px 0 0; }
    .block-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .topbar .sub { display: none; }
    .topbar-actions .btn-ghost { display: none; }
    .user-chip { padding: 3px; border: 0; background: transparent; }
    .user-chip > span:last-child { display: none; }
    .content { padding: 10px 10px 26px; }
    .block-choices { grid-template-columns: 1fr; }
    .image-field { flex-direction: column; align-items: stretch; }
    .image-preview { width: 100%; flex: 0 0 auto; height: 140px; }
    .geo-entity-preview { padding: 12px; }
    .geo-ai-row { grid-template-columns: 78px minmax(0, 1fr) 52px; gap: 8px; }
}

/* 手机端列表：把宽表格改成一行一张卡片 */
@media (max-width: 560px) {
    .table-card { display: block; }
    .table-card thead { display: none; }
    .table-card tbody { display: grid; gap: 10px; padding: 10px; }
    .table-card tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "main status"
            "extra actions";
        gap: 8px 10px;
        align-items: start;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: #fff;
    }
    .table-card tr:hover td { background: transparent; }
    .table-card td { display: block; padding: 0; border: 0; }
    .table-card td.m-hide { display: none; }
    .table-card td.m-main { grid-area: main; min-width: 0; }
    .table-card td.m-status { grid-area: status; justify-self: end; align-self: start; }
    .table-card td.m-date,
    .table-card td.m-extra,
    .table-card td.m-price { grid-area: extra; align-self: end; }
    .table-card td.m-actions { grid-area: actions; justify-self: end; align-self: end; }
    .table-card .cell-main { min-width: 0; }
    .table-card .thumb-sm { width: 40px; height: 40px; flex-basis: 40px; }
    .table-card .cell-sub { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .table-card .actions { display: flex; gap: 5px; }
    .table-card .actions .btn { padding: 5px 9px; font-size: 12px; }
    .table-card .m-actions { width: 100%; padding-top: 8px; border-top: 1px dashed #eef2f7; }
    .table-card-price tr { grid-template-areas: "main status" "price actions"; }
    .table-card-price td.m-price { grid-area: price; align-self: end; }
    .table-card-form tr { grid-template-areas: "main status" "extra actions"; }
}
@media (max-width: 620px) {
    .tpl-grid { grid-template-columns: 1fr; }
    .template-filter-side { flex: 1 1 100%; justify-content: flex-start; }
    .template-search { width: 100%; }
}

/* ---------------- 正文 HTML 编辑器 ---------------- */
.richtext {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.rt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}
.rt-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rt-btn {
    padding: 7px 9px;
    font: inherit;
    font-size: 12.5px;
    line-height: 1;
    color: #334155;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
}
.rt-btn:hover { color: var(--primary-dark); background: #e8f1fc; border-color: #dbeafe; }
.rt-btn:active { transform: translateY(1px); }
.rt-btn b, .rt-btn i, .rt-btn u { pointer-events: none; }
.rt-btn-strong { color: var(--primary-dark); background: #f3f8ff; border-color: #dbeafe; }
.rt-sep { width: 1px; height: 16px; margin: 0 2px; background: var(--border); }
.rt-editor {
    min-height: 320px;
    padding: 16px 18px;
    overflow-y: auto;
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.75;
    outline: none;
}
.rt-editor:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}
.rt-editor:focus { box-shadow: inset 0 0 0 2px rgba(11, 107, 203, .08); }
.rt-editor p { margin: 0 0 12px; }
.rt-editor h2 { margin: 18px 0 8px; font-size: 22px; line-height: 1.35; }
.rt-editor h3 { margin: 16px 0 6px; font-size: 18px; line-height: 1.4; }
.rt-editor ul, .rt-editor ol { margin: 0 0 12px 22px; padding: 0; }
.rt-editor blockquote {
    margin: 12px 0;
    padding: 8px 14px;
    color: #475569;
    background: #f8fafc;
    border-left: 3px solid #93c5fd;
}
.rt-editor a { color: var(--primary); text-decoration: underline; }
.rt-editor img { max-width: 100%; height: auto; margin: 8px 0; border-radius: 6px; }
.rt-editor table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.rt-editor th, .rt-editor td { padding: 7px 9px; border: 1px solid var(--border); }
.rt-editor hr { margin: 18px 0; border: 0; border-top: 1px solid var(--border); }
.rt-source {
    display: block;
    width: 100%;
    min-height: 320px;
    padding: 14px 16px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.65;
    border: 0;
    border-radius: 0;
    outline: none;
    resize: vertical;
}
.rt-source[hidden] { display: none; }
.rt-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    color: var(--muted);
    background: #fbfcfe;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
}
.rt-tip { color: #9ca3af; }
.rt-source-mode .rt-format { opacity: .45; pointer-events: none; user-select: none; }
.rt-fullscreen {
    position: fixed;
    inset: 14px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .3);
}
.rt-fullscreen .rt-toolbar, .rt-fullscreen .rt-status { flex: 0 0 auto; }
.rt-fullscreen .rt-editor, .rt-fullscreen .rt-source { flex: 1 1 auto; min-height: 0; }
body.rt-body-lock { overflow: hidden; }

/* ---------------- 素材库选择弹层 ---------------- */
.media-picker-mask {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .62);
}
.media-picker-mask[hidden] { display: none; }
.media-picker-dialog {
    display: flex;
    flex-direction: column;
    width: 760px;
    max-width: 100%;
    max-height: 86vh;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .3);
}
.media-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}
.media-picker-head b { display: block; font-size: 15px; }
.media-picker-head .small { display: block; margin-top: 3px; }
.media-picker-search { padding: 12px 20px 0; }
.media-picker-search .input { width: 100%; }
.media-picker-grid {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 20px 20px;
    overflow-y: auto;
    align-content: start;
}
.media-picker-card {
    display: block;
    min-width: 0;
    padding: 7px;
    font: inherit;
    text-align: left;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
}
.media-picker-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(11, 107, 203, .12); }
.media-picker-card.selected { border-color: var(--primary); background: #f3f8ff; }
.media-picker-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f1f5f9;
    border-radius: 7px;
}
.media-picker-name {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.media-picker-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.media-picker-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: #fafcff;
}
.media-picker-foot[hidden] { display: none; }
.media-picker-empty { padding: 56px 20px; color: var(--muted); text-align: center; }
.media-picker-empty[hidden] { display: none; }
body.media-picker-open { overflow: hidden; }

@media (max-width: 720px) {
    .media-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .media-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- GEO ---------- */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.page-head h1 { margin: 0 0 5px; font-size: 24px; letter-spacing: -.02em; }
.page-sub { max-width: 840px; margin: 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.geo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}
.geo-main, .geo-side { display: grid; gap: 18px; min-width: 0; }
.geo-side .card { margin: 0; }
.card-sub { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.geo-score-ring {
    display: grid;
    place-items: center;
    width: 142px;
    height: 142px;
    margin: 4px auto 18px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--score) * 1%), #e9eff7 0);
    position: relative;
}
.geo-score-ring::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #edf2f8;
}
.geo-score-ring div { position: relative; z-index: 1; text-align: center; }
.geo-score-ring strong { display: block; font-size: 30px; line-height: 1; color: var(--primary-dark); }
.geo-score-ring span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.geo-checks { display: grid; gap: 9px; }
.geo-check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #334155; }
.geo-check-icon {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 50%;
    color: #94a3b8;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
}
.geo-check-icon.ok { color: #047857; background: #ecfdf5; }
.geo-progress {
    height: 7px;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f8;
}
.geo-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #2563eb); }
.geo-groups { display: grid; gap: 18px; }
.geo-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.geo-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}
.geo-group-head h3 { margin: 0; font-size: 14px; }
.geo-group-head h3 small { color: var(--muted); font-weight: 400; }
.geo-mini-score { font-size: 12px; font-weight: 700; }
.geo-mini-score.good { color: #047857; }
.geo-mini-score.mid { color: #b45309; }
.geo-mini-score.low { color: #b91c1c; }
.geo-table-score { display: grid; gap: 2px; }
.geo-table-score span { font-size: 13px; font-weight: 800; }
.geo-table-score small { font-size: 11px; color: var(--muted); }
.geo-table-score.good span { color: #047857; }
.geo-table-score.mid span { color: #b45309; }
.geo-table-score.low span { color: #b91c1c; }
.geo-summary { display: block; color: #334155; font-size: 12px; line-height: 1.55; }
.geo-check-dots { display: flex; gap: 5px; margin-top: 7px; }
.geo-dot { width: 7px; height: 7px; border-radius: 50%; background: #dbe3ed; }
.geo-dot.ok { background: #10b981; }
.geo-ai-list { display: grid; gap: 11px; }
.geo-ai-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 13px; }
.geo-ai-bar { height: 7px; border-radius: 999px; background: #edf2f8; overflow: hidden; }
.geo-ai-bar i { display: block; height: 100%; border-radius: inherit; background: #8b5cf6; }
.geo-ai-row strong { text-align: right; font-size: 12px; color: #334155; }
.geo-links { display: grid; gap: 9px; }
.geo-links a { display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; }
.geo-links a:hover { border-color: #bfdbfe; background: #f8fbff; }
.geo-links span { display: block; color: var(--primary-dark); font-size: 13px; font-weight: 700; }
.geo-links small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.geo-tips { margin: 0; padding-left: 18px; color: #475569; font-size: 12.5px; line-height: 1.8; }
.geo-tips li + li { margin-top: 7px; }
.code-textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.5px; line-height: 1.65; }
.empty-line { padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 1100px) {
    .geo-layout { grid-template-columns: 1fr; }
    .geo-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .page-head { display: block; }
    .page-actions { margin-top: 12px; }
    .geo-side { grid-template-columns: 1fr; }
}

/* ---------- SEO 工作台 ---------- */
.seo-shell { display: grid; gap: 18px; }
.seo-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 30px 32px;
    border-radius: 18px;
    overflow: hidden;
    color: #f8fbff;
    background:
        radial-gradient(circle at 82% 18%, rgba(56, 189, 248, .22), transparent 32%),
        linear-gradient(118deg, #08111f 0%, #0f2138 56%, #102d47 100%);
    box-shadow: 0 16px 38px rgba(8, 20, 38, .18);
}
.seo-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 197, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 197, 255, .08) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .72), transparent 78%);
}
.seo-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -130px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(125, 211, 252, .16);
    box-shadow: 0 0 0 24px rgba(125, 211, 252, .04), 0 0 0 56px rgba(125, 211, 252, .025);
}
.seo-hero-copy, .seo-hero-score { position: relative; z-index: 1; }
.seo-hero-copy { max-width: 720px; }
.seo-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: #7dd3fc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
}
.seo-hero h1 { margin: 0; color: #fff; font-size: 34px; line-height: 1.15; letter-spacing: -.03em; }
.seo-hero-copy p { max-width: 620px; margin: 12px 0 0; color: #b8c9dd; font-size: 13.5px; line-height: 1.8; }
.seo-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.seo-hero-tags span {
    padding: 5px 10px;
    border: 1px solid rgba(148, 197, 255, .2);
    border-radius: 999px;
    color: #d9e8f8;
    background: rgba(255, 255, 255, .055);
    font-size: 11.5px;
}
.seo-hero-score { flex: none; text-align: center; }
.seo-score-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 134px;
    height: 134px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: conic-gradient(#38bdf8 calc(var(--score) * 1%), rgba(255, 255, 255, .13) 0);
    box-shadow: 0 0 0 1px rgba(125, 211, 252, .15), 0 0 28px rgba(56, 189, 248, .12);
}
.seo-score-ring::after {
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 50%;
    background: #0d1d31;
    box-shadow: inset 0 0 0 1px rgba(148, 197, 255, .13);
}
.seo-score-ring div { position: relative; z-index: 1; }
.seo-score-ring strong { display: block; color: #fff; font-size: 34px; line-height: 1; letter-spacing: -.04em; }
.seo-score-ring span { display: block; margin-top: 7px; color: #93b3d3; font-size: 11px; }
.seo-hero-score p { margin: 0; color: #91a9c2; font-size: 11.5px; }
.seo-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.seo-kpi {
    position: relative;
    min-height: 122px;
    padding: 18px 18px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.seo-kpi::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -34px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(14, 165, 233, .02));
}
.seo-kpi-index { position: absolute; top: 14px; right: 16px; color: #cbd8e8; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.seo-kpi label { display: block; color: var(--muted); font-size: 12px; }
.seo-kpi strong { position: relative; z-index: 1; display: block; margin: 10px 0 4px; color: #0f2744; font-size: 29px; line-height: 1; letter-spacing: -.03em; }
.seo-kpi strong em { margin-left: 2px; font-size: 14px; font-style: normal; font-weight: 600; color: #64748b; }
.seo-kpi small { position: relative; z-index: 1; color: #8494a8; font-size: 11.5px; }
.seo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.seo-main, .seo-side { display: grid; gap: 18px; min-width: 0; }
.seo-card { margin: 0; }
.seo-head-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.seo-head-actions .small { font-size: 12px; }
.seo-basic-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.seo-fields { min-width: 0; }
.seo-field { margin-bottom: 17px; }
.seo-field:last-child { margin-bottom: 0; }
.seo-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.seo-field-head label { display: block; margin: 0; font-size: 13px; font-weight: 600; color: #374151; }
.seo-counter { flex: none; color: #94a3b8; font-size: 11px; font-variant-numeric: tabular-nums; }
.seo-counter b { color: #475569; font-weight: 700; }
.seo-counter.over { color: #dc2626; }
.seo-counter.over b { color: #dc2626; }
.seo-preview {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dbe6f3;
    border-radius: 14px;
    background: linear-gradient(180deg, #f7fbff, #f1f6fc);
}
.seo-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; color: #64748b; font-size: 11px; letter-spacing: .03em; }
.seo-preview-dots { display: flex; gap: 4px; }
.seo-preview-dots i { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; }
.seo-preview-dots i:first-child { background: #60a5fa; }
.seo-serp { padding: 16px 16px 18px; border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .045); }
.seo-serp-url { color: #4f7a42; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-serp-title { margin-top: 7px; color: #1a0dab; font-size: 18px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.seo-serp-desc { margin-top: 6px; color: #4b5563; font-size: 12.5px; line-height: 1.65; overflow-wrap: anywhere; }
.seo-preview-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.seo-preview-chip { padding: 4px 8px; border: 1px solid #dbe6f3; border-radius: 999px; color: #64748b; background: rgba(255, 255, 255, .68); font-size: 10.5px; }
.seo-table th { font-size: 11.5px; }
.seo-table td { vertical-align: middle; }
.seo-table .input-sm { min-width: 0; }
.seo-page-meter { display: block; width: 100%; height: 5px; margin: 0 0 7px; border-radius: 999px; background: #edf2f8; overflow: hidden; }
.seo-page-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #2563eb); }
.seo-code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.seo-code-grid .seo-field { margin: 0; }
.seo-savebar {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border: 1px solid #d7e4f4;
    border-radius: 12px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .1);
    backdrop-filter: blur(12px);
}
.seo-savebar strong { display: block; color: #0f2744; font-size: 13px; }
.seo-savebar span { display: block; margin-top: 2px; color: #8494a8; font-size: 11.5px; }
.seo-score-summary { display: grid; gap: 10px; margin-bottom: 16px; }
.seo-score-summary > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.seo-score-summary strong { color: #0f2744; font-size: 17px; }
.seo-score-summary small { color: #8494a8; font-size: 11.5px; }
.seo-progress { height: 6px; border-radius: 999px; overflow: hidden; background: #edf2f8; }
.seo-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #2563eb); }
.seo-checks { display: grid; gap: 12px; }
.seo-check-row { display: flex; align-items: flex-start; gap: 9px; }
.seo-check-icon {
    display: inline-grid;
    place-items: center;
    width: 19px;
    height: 19px;
    flex: none;
    margin-top: 1px;
    border-radius: 50%;
    color: #b45309;
    background: #fff7ed;
    font-size: 11px;
    font-weight: 800;
}
.seo-check-icon.ok { color: #047857; background: #ecfdf5; }
.seo-check-row b { display: block; color: #334155; font-size: 12.5px; font-weight: 600; }
.seo-check-row small { display: block; margin-top: 3px; color: #8494a8; font-size: 11px; line-height: 1.55; }
.seo-link-list { display: grid; gap: 8px; }
.seo-link-list a {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.seo-link-list a:hover { border-color: #bfdbfe; background: #f8fbff; transform: translateY(-1px); }
.seo-link-list b { display: block; grid-column: 1; color: #0f2744; font-size: 12.5px; }
.seo-link-list small { display: block; grid-column: 1 / -1; margin-top: 3px; padding-right: 0; color: #8494a8; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-link-list span { position: static; grid-column: 2; grid-row: 1; align-self: start; color: #2563eb; font-size: 10.5px; white-space: nowrap; }
.seo-link-note { margin: 14px 0 0; color: #8494a8; font-size: 11.5px; line-height: 1.7; }
.seo-tips { margin: 0; padding-left: 17px; color: #475569; font-size: 12px; line-height: 1.8; }
.seo-tips li + li { margin-top: 7px; }
@media (max-width: 1180px) {
    .seo-layout { grid-template-columns: 1fr; }
    .seo-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .seo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .seo-basic-grid, .seo-code-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .seo-hero { display: block; padding: 26px 22px; }
    .seo-hero h1 { font-size: 28px; }
    .seo-hero-score { margin-top: 22px; }
    .seo-score-ring { width: 118px; height: 118px; }
    .seo-score-ring strong { font-size: 29px; }
    .seo-side { grid-template-columns: 1fr; }
    .seo-savebar { position: static; display: block; }
    .seo-savebar .btn { width: 100%; margin-top: 10px; }
}

/* ---------- GEO 工作台 ---------- */
.geo-hero {
    background:
        radial-gradient(circle at 82% 18%, rgba(45, 212, 191, .22), transparent 32%),
        linear-gradient(118deg, #07151f 0%, #0c2434 56%, #0d3340 100%);
}
.geo-hero::before {
    background-image:
        linear-gradient(rgba(94, 234, 212, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 234, 212, .08) 1px, transparent 1px);
}
.geo-hero::after {
    border-color: rgba(94, 234, 212, .16);
    box-shadow: 0 0 0 24px rgba(94, 234, 212, .04), 0 0 0 56px rgba(94, 234, 212, .025);
}
.geo-hero .seo-kicker { color: #5eead4; }
.geo-hero .seo-hero-tags span { border-color: rgba(94, 234, 212, .2); }
.geo-hero .seo-score-ring {
    background: conic-gradient(#2dd4bf calc(var(--score) * 1%), rgba(255, 255, 255, .13) 0);
    box-shadow: 0 0 0 1px rgba(94, 234, 212, .16), 0 0 28px rgba(45, 212, 191, .13);
}
.geo-hero .seo-score-ring::after { background: #0a2024; }
.geo-hero-link {
    display: inline-flex;
    margin-top: 15px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(94, 234, 212, .35);
    color: #99f6e4;
    font-size: 12px;
    text-decoration: none;
}
.geo-hero-link:hover { color: #fff; border-bottom-color: #fff; }
.geo-kpi-word { font-size: 27px !important; letter-spacing: .02em !important; }
.geo-profile-card .card-body { padding-bottom: 6px; }
.geo-entity-preview {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid #dbe9ef;
    border-radius: 13px;
    background: linear-gradient(120deg, #f2fbfa, #edf7fb 64%, #f7fbff);
}
.geo-entity-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #0e7490);
    box-shadow: 0 8px 18px rgba(15, 118, 110, .18);
    font-size: 20px;
    font-weight: 700;
}
.geo-entity-main { min-width: 0; flex: 1; }
.geo-entity-main span {
    display: block;
    color: #0f766e;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .16em;
}
.geo-entity-main strong {
    display: block;
    margin-top: 4px;
    color: #0f2744;
    font-size: 16px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.geo-entity-main small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.geo-entity-preview .badge { flex: none; }
.geo-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.geo-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.geo-field-head label { margin: 0; }
.geo-form-grid .field { min-width: 0; }
.geo-profile-foot { justify-content: space-between; gap: 18px; background: #f8fbff; }
.geo-save-note strong { display: block; color: #0f2744; font-size: 12.5px; }
.geo-save-note span { display: block; margin-top: 3px; color: #8494a8; font-size: 11.5px; }
.geo-content-overview {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #dbe9ef;
    border-radius: 12px;
    background: linear-gradient(110deg, #f2fbfa, #f8fbff 72%);
}
.geo-content-score strong {
    display: block;
    color: #0f2744;
    font-size: 27px;
    line-height: 1;
    letter-spacing: -.03em;
}
.geo-content-score strong em { margin-left: 2px; color: #64748b; font-size: 13px; font-style: normal; font-weight: 600; }
.geo-content-score span { display: block; margin-top: 6px; color: #8494a8; font-size: 11px; }
.geo-content-track { min-width: 0; }
.geo-content-track .seo-progress { height: 7px; background: #e6f3f2; }
.geo-content-track .seo-progress span { background: linear-gradient(90deg, #2dd4bf, #0ea5e9); }
.geo-content-track small { display: block; margin-top: 8px; color: #8494a8; font-size: 11.5px; line-height: 1.55; }
.geo-kpis .seo-kpi strong em { margin-left: 4px; }
.geo-ai-empty {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #dcf0ed;
    border-radius: 12px;
    background: linear-gradient(110deg, #f0fbfa, #f7fbff 72%);
}
.geo-ai-empty-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    color: #0f766e;
    background: #d9f5f1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}
.geo-ai-empty strong { display: block; color: #0f2744; font-size: 13px; }
.geo-ai-empty small { display: block; margin-top: 4px; color: #8494a8; font-size: 11.5px; line-height: 1.55; }
.geo-ai-empty .btn { margin-left: auto; flex: none; }
.geo-groups { gap: 16px; }
.geo-group { border-color: #e1ebf3; border-radius: 12px; }
.geo-group-head { padding: 12px 14px; background: #f8fbff; }
.geo-group-head h3 { color: #0f2744; }
.geo-ai-bar i { background: linear-gradient(90deg, #2dd4bf, #0ea5e9); }
.geo-side-panel .card-sub { margin-top: 3px; }
@media (max-width: 960px) {
    .geo-form-grid { grid-template-columns: 1fr; }
    .geo-content-overview { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 820px) {
    .geo-entity-preview { align-items: flex-start; }
    .geo-entity-preview .badge { display: none; }
    .geo-profile-foot { display: block; }
    .geo-profile-foot .btn { width: 100%; margin-top: 12px; }
    .geo-ai-empty { align-items: flex-start; flex-wrap: wrap; }
    .geo-ai-empty .btn { width: 100%; margin-left: 0; }
}
/* GEO 内容编辑 */
.geo-edit-hero { padding: 24px 28px; }
.geo-edit-hero h1 { font-size: 28px; }
.geo-edit-hero .seo-hero-score { min-width: 150px; }
.geo-edit-hero .seo-score-ring { width: 104px; height: 104px; margin-bottom: 8px; }
.geo-edit-hero .seo-score-ring strong { font-size: 28px; }
.geo-edit-hero .seo-score-ring span { font-size: 10.5px; }
.geo-edit-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 15px; }
.geo-edit-links a {
    color: #99f6e4;
    font-size: 12px;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(94, 234, 212, .28);
}
.geo-edit-links a:hover { color: #fff; border-bottom-color: #fff; }
.geo-edit-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.geo-side-panel .seo-progress span { background: linear-gradient(90deg, #2dd4bf, #0ea5e9); }
@media (max-width: 820px) {
    .geo-edit-hero { padding: 22px; }
    .geo-edit-hero h1 { font-size: 25px; }
    .geo-edit-hero .seo-hero-score { min-width: 0; }
    .geo-edit-hero .seo-score-ring { width: 96px; height: 96px; }
    .geo-edit-buttons { justify-content: flex-start; }
    .geo-edit-buttons .btn { flex: 1; }
}



/* 套餐用量 */
.quota-card .card-head { align-items: flex-start; }
.quota-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 16px;
}
.quota-item {
    padding: 12px 14px 13px;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    background: #fbfcfd;
}
.quota-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.quota-head span {
    font-size: 12.5px;
    color: #64748b;
}
.quota-head b {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -.2px;
}
.quota-head i {
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
}
.quota-track {
    height: 5px;
    margin-top: 9px;
    border-radius: 99px;
    background: #edf1f6;
    overflow: hidden;
}
.quota-track > span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #0f766e, #0ea5e9);
    transition: width .3s ease;
}
.quota-item.is-over {
    border-color: #f3d1d1;
    background: #fffafa;
}
.quota-item.is-over .quota-head b { color: #b42318; }
.quota-item.is-over .quota-track > span { background: linear-gradient(90deg, #ef4444, #f97316); }
.quota-track.is-unlimited {
    height: auto;
    background: none;
    color: #64748b;
    font-size: 11px;
}
.quota-form { margin-top: 4px; }
@media (max-width: 1100px) {
    .quota-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .quota-grid { grid-template-columns: 1fr; }
}