:root {
    --a-bg: #f4f6f8;
    --a-ink: #111827;
    --a-muted: #6b7280;
    --a-line: #e5e7eb;
    --a-brand: #0d9488;
    --a-brand-deep: #0f766e;
    --a-side: #0b1220;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--a-bg);
    color: var(--a-ink);
    font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }
code { background: #eef2f4; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
    width: 216px;
    flex: 0 0 216px;
    background: var(--a-side);
    color: #cbd5e1;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.admin-side .brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    color: #fff;
    padding: 4px 8px 16px;
    font-size: 15px;
}
.admin-side .brand span {
    width: 28px; height: 28px; border-radius: 8px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    font-size: 12px;
}
.admin-side .group { font-size: 11px; letter-spacing: .12em; color: #64748b; padding: 14px 10px 6px; }
.admin-side a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 10px; border-radius: 9px;
    color: #cbd5e1; font-size: 13.5px;
}
.admin-side a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-side a.active { background: rgba(13,148,136,.22); color: #fff; box-shadow: inset 0 0 0 1px rgba(20,184,166,.35); }
.admin-side .foot { margin-top: auto; font-size: 12px; color: #64748b; padding: 18px 8px 0; }

.admin-main { flex: 1; padding: 22px 28px 44px; min-width: 0; }
.admin-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 20px;
}
.admin-top h1 { font-size: 21px; margin: 0; letter-spacing: -.02em; }
.admin-top .sub { color: var(--a-muted); font-size: 12.5px; margin-top: 4px; }
.admin-top .actions { display: flex; gap: 10px; align-items: center; }
.who { font-size: 12.5px; color: var(--a-muted); }

.card {
    background: #fff; border: 1px solid var(--a-line); border-radius: 14px;
    padding: 20px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.card h3 { margin: 0 0 14px; font-size: 15px; }
.card + .card { margin-top: 18px; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }

.stat { background: #fff; border: 1px solid var(--a-line); border-radius: 14px; padding: 16px 18px; }
.stat span { display: block; font-size: 12px; color: var(--a-muted); margin-bottom: 6px; }
.stat strong { font-size: 24px; letter-spacing: -.03em; }
.stat .hint { font-size: 12px; color: var(--a-muted); margin-top: 6px; }

table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th, table.table td { padding: 10px 10px; border-bottom: 1px solid #f0f2f5; text-align: left; vertical-align: middle; }
table.table th { color: var(--a-muted); font-weight: 600; font-size: 12px; background: #fafbfc; }
table.table tr:hover td { background: #fcfdfd; }
table.table td .muted { color: var(--a-muted); font-size: 12px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; border-radius: 9px; border: 1px solid transparent;
    font-size: 13px; cursor: pointer; background: #fff; color: var(--a-ink);
}
.btn-primary { background: var(--a-brand); color: #fff; }
.btn-primary:hover { background: var(--a-brand-deep); }
.btn-ghost { border-color: var(--a-line); color: var(--a-ink); }
.btn-ghost:hover { border-color: #cbd5e1; background: #f9fafb; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-soft { background: #ecfdf5; color: #0f766e; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }

.pill {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 11.5px; background: #f1f5f9; color: #475569; white-space: nowrap;
}
.pill.ok { background: #dcfce7; color: #15803d; }
.pill.warn { background: #fef3c7; color: #b45309; }
.pill.bad { background: #fee2e2; color: #b91c1c; }
.pill.info { background: #e0f2fe; color: #0369a1; }

.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; font-size: 12px; color: #475569; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 12px; border-radius: 9px; font-size: 13px; background: #fff; border: 1px solid var(--a-line); color: #475569; }
.tabs a.active { background: var(--a-brand); border-color: var(--a-brand); color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12.5px; color: #374151; font-weight: 600; }
.field input, .field select, .field textarea {
    border: 1px solid #d1d5db; border-radius: 9px; padding: 9px 11px;
    font-size: 13px; font-family: inherit; background: #fff; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(13,148,136,.25); border-color: var(--a-brand); }
.field .hint { font-size: 11.5px; color: var(--a-muted); }
#package-code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; letter-spacing: .3px; background: #f8fafc; color: #0f172a; }
.package-code-hint { display: block; min-height: 17px; margin-top: 3px; }
.package-code-hint.is-loading { color: #64748b; }
.package-code-hint.is-ok { color: #0f766e; font-weight: 600; }
.package-code-hint.is-error { color: #b42318; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .field-full { grid-column: span 2; }

.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #d1fae5; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { border: 1px solid #d1d5db; border-radius: 8px; padding: 7px 10px; font-size: 13px; }

.empty { text-align: center; padding: 40px 20px; color: var(--a-muted); }
.small { font-size: 12px; }
.muted { color: var(--a-muted); }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 500px at 50% -10%, #0f766e22, transparent), var(--a-bg); }
.login-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 18px; padding: 30px; box-shadow: 0 20px 50px rgba(15,23,42,.10); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card p { color: var(--a-muted); font-size: 12.5px; margin: 0 0 20px; }

/* ===== 第二轮后台改造 ===== */
.tabs a .tab-count { margin-left: 7px; font-size: 11px; background: #eef2f7; color: #64748b; border-radius: 999px; padding: 1px 7px; }
.tabs a.active .tab-count { background: rgba(255,255,255,.22); color: #fff; }
.app-thumb {
    width: 62px; height: 42px; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--a-line); background: #f4f6f8; display: block;
}

/* 拖拽上传组件 */
.dropzone {
    position: relative; border: 1.5px dashed #cbd5e1; border-radius: 10px;
    background: #fbfcfd; padding: 14px 16px; text-align: center; cursor: pointer;
    transition: .18s; overflow: hidden;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--a-brand); background: #f3fbfa; }
.dropzone .dz-icon {
    width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 10px;
    display: grid; place-items: center; background: #ecfdf5; color: #0f766e;
    font-size: 16px; font-weight: 700;
}
.dropzone .dz-title { font-size: 13.5px; font-weight: 600; color: #111827; }
.dropzone .dz-hint { font-size: 11.5px; color: var(--a-muted); margin-top: 3px; }
.dropzone .dz-file {
    display: none; margin-top: 10px; font-size: 12px; color: #0f766e;
    background: #ecfdf5; border: 1px solid #d1fae5; border-radius: 8px; padding: 6px 10px;
    word-break: break-all;
}
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone.has-file { border-color: #34d399; background: #f7fefb; }

/* 后台上传应用页 */
.upload-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.upload-card { position: relative; overflow: hidden; padding: 28px; }
.upload-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg,#0f766e,#2dd4bf,#99f6e4); }
.upload-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.upload-head-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg,#0f766e,#14b8a6); color: #fff; font-size: 21px; font-weight: 700; box-shadow: 0 8px 18px rgba(15,118,110,.18); }
.upload-head h3 { margin: 0; font-size: 20px; }
.upload-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--a-muted); }
.upload-section { display: flex; align-items: center; gap: 9px; margin: 8px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: #0f766e; }
.upload-section::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg,#d1fae5,transparent); }
.upload-card .form-grid { gap: 16px; }
.upload-side { position: static; padding: 24px; }
.upload-side h3 { margin: 0 0 12px; font-size: 18px; }
.upload-notes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.upload-notes li { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 9px; align-items: start; padding: 10px 11px; border: 1px solid #e4efec; border-radius: 10px; background: #fbfdfc; font-size: 12.5px; line-height: 1.65; color: #516176; }
.upload-notes b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #e7f8f4; color: #0f766e; font-size: 11px; }
@media (max-width: 900px) { .upload-notes { grid-template-columns: 1fr; } }

/* 开发者头像 */
.dev-avatar-cell { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 1px solid var(--a-line); background: #f4f6f8; }
.dev-avatar-fallback { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; font-weight: 700; font-size: 15px; }
.avatar-upload { display: flex; gap: 14px; align-items: center; }
.avatar-preview { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; border: 1px solid var(--a-line); background: #f4f6f8; }
.avatar-preview-fallback { width: 72px; height: 72px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; font-weight: 700; font-size: 22px; }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .admin-shell { flex-direction: column; }
    .admin-side { width: 100%; flex: none; flex-direction: row; overflow-x: auto; }
    .admin-side .group, .admin-side .foot { display: none; }
    .form-grid, .grid-2, .grid-4, .grid-3 { grid-template-columns: 1fr; }
}

/* Markdown 编辑器 */
.md-editor{border:1px solid #dbe3ea;border-radius:12px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s}
.md-editor:focus-within{border-color:#0d9488;box-shadow:0 0 0 3px rgba(13,148,136,.12)}
.md-toolbar{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:8px 10px;background:#f8fafc;border-bottom:1px solid #e5e7eb}
.md-toolbar button{border:1px solid transparent;background:transparent;color:#334155;border-radius:6px;padding:5px 9px;font-size:12px;cursor:pointer;line-height:1.4}
.md-toolbar button:hover{background:#e2e8f0;border-color:#cbd5e1}
.md-toolbar button:active{background:#cbd5e1}
.md-toolbar button[data-md="code"]{display:inline-flex;align-items:center;justify-content:center;min-width:30px}
.md-toolbar button .md-tool-icon{width:15px;height:15px;display:block}
.md-status{margin-left:auto;font-size:12px;color:#0f766e}
.md-status.error{color:#dc2626}
.md-editor textarea{display:block;width:100%;border:0;outline:none;padding:18px 20px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:14px;line-height:1.8;resize:vertical;min-height:420px;background:#fff}
.md-foot{display:flex;justify-content:space-between;gap:12px;padding:8px 12px;border-top:1px solid #e5e7eb;background:#f8fafc;font-size:12px;color:#94a3b8}
.md-file-inputs{display:none}

/* 通用拖拽上传组件（由后台布局脚本自动包装所有 file 控件） */
.upload-field{position:relative;border:1.5px dashed #cbd5e1;border-radius:10px;background:#fbfdfe;padding:12px 14px;display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto auto auto auto;column-gap:10px;row-gap:3px;align-items:center;text-align:left;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s}
.upload-field:hover,.upload-field.is-drag{border-color:#0d9488;background:#f0fdfa;box-shadow:0 0 0 3px rgba(13,148,136,.08)}
.upload-field input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.upload-field-icon{grid-column:1;grid-row:1/3;width:32px;height:32px;margin:0;border-radius:9px;background:#e6fffb;color:#0f766e;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:700}
.upload-field-title{grid-column:2;grid-row:1;font-size:13px;font-weight:600;color:#334155;line-height:1.4}
.upload-field-hint{grid-column:2;grid-row:2;margin:0;font-size:11px;line-height:1.4;color:#94a3b8}
.upload-field-file{grid-column:1/-1;grid-row:4;margin-top:4px;font-size:11.5px;color:#0f766e;word-break:break-all}
.upload-field-file.empty{display:none}
.upload-field-preview{grid-column:1/-1;grid-row:3;margin-top:6px;padding:4px;border:1px solid #dbe7e4;border-radius:8px;background:#fff;display:none}
.upload-field-preview:not(.empty){display:block}
.upload-field-preview img{display:block;width:100%;max-height:120px;object-fit:contain;border-radius:5px;background:#f8fafc}

/* 原生控件兜底样式（脚本执行前的短暂状态） */
.field > input[type=file]{width:100%;padding:10px 12px;border:1.5px dashed #cbd5e1;border-radius:10px;background:#fbfdfe;color:#64748b;font-size:13px;cursor:pointer}
.field > input[type=file]::file-selector-button{margin-right:10px;padding:7px 12px;border:0;border-radius:7px;background:#0d9488;color:#fff;font-size:13px;cursor:pointer}

/* 首页轮播图设置 */
.slide-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.slide-setting-card{padding:16px;border:1px solid #e2e8f0;border-radius:14px;background:#fbfdfe}
.slide-setting-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;color:#0f172a}
.slide-setting-card .field{margin-top:10px}
.slide-setting-preview{display:block;width:100%;margin-top:10px;border:1px solid #e2e8f0;border-radius:10px;aspect-ratio:16/6;object-fit:cover;background:#0f172a}
@media(max-width:900px){.slide-settings-grid{grid-template-columns:1fr}}

/* 文章栏目二级选项卡 */
.subtabs{display:flex;gap:6px;flex-wrap:wrap;padding-top:10px;border-top:1px dashed #e8edf2}
.subtabs a{padding:5px 11px;border-radius:999px;font-size:12px;color:#64748b;background:#f8fafc;border:1px solid #edf1f5;transition:.16s}
.subtabs a:hover{color:#0f766e;border-color:#b7ddd7;background:#f0fbf8}
.subtabs a.active{background:#ecfdf5;border-color:#a7f3d0;color:#0f766e;font-weight:600}

/* Markdown 编辑区：编辑 + 实时预览双栏 */
.md-workspace{display:grid;grid-template-columns:1fr 1fr;align-items:stretch;border-top:1px solid #eef2f7}
.md-input{min-width:0}
.md-input textarea{min-height:520px;height:100%;resize:vertical}
.md-preview{min-width:0;border-left:1px solid #eef2f7;background:#fcfdfe;display:flex;flex-direction:column;max-height:640px}
.md-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 14px;border-bottom:1px solid #eef2f7;background:#f8fafc;font-size:12px;color:#475569;font-weight:600;position:sticky;top:0;z-index:2}
.md-preview-state{font-weight:400;color:#94a3b8}
.md-preview>.md-body{padding:16px 18px;overflow:auto;font-size:13.5px;line-height:1.8;color:#24324a}
.md-preview .md-body p{margin:0 0 10px}
.md-preview .md-body h1,.md-preview .md-body h2,.md-preview .md-body h3,.md-preview .md-body h4{margin:18px 0 8px;line-height:1.45;color:#0f172a}
.md-preview .md-body h2{font-size:18px;border-bottom:1px solid #eef2f7;padding-bottom:4px}
.md-preview .md-body h3{font-size:15.5px}
.md-preview .md-body ul,.md-preview .md-body ol{padding-left:20px;margin:0 0 10px}
.md-preview .md-body table{width:100%;border-collapse:collapse;margin:0 0 12px;font-size:12.5px}
.md-preview .md-body th,.md-preview .md-body td{border:1px solid #e2e8f0;padding:6px 9px;text-align:left}
.md-preview .md-body th{background:#f8fafc}
.md-preview .md-body code{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:4px;padding:1px 5px;font-size:.9em}
.md-preview .md-body pre{background:#0f172a;color:#e2e8f0;padding:14px 16px;border-radius:10px;overflow:auto;line-height:1.65;margin:0 0 12px}
.md-preview .md-body pre code{background:transparent;border:0;padding:0;color:inherit;font-size:12.5px;display:block;white-space:pre}
.md-preview .md-body pre code .tok-str{color:#86efac}
.md-preview .md-body pre code .tok-com{color:#94a3b8;font-style:italic}
.md-preview .md-body pre code .tok-kw{color:#7dd3fc;font-weight:600}
.md-preview .md-body pre code .tok-var{color:#fca5a5}
.md-preview .md-body pre code .tok-num{color:#fdba74}
.md-preview .md-body pre code .tok-tag{color:#f0abfc}
.md-preview .md-body img{max-width:100%;border-radius:8px}
@media (max-width:1100px){.md-workspace{grid-template-columns:1fr}.md-preview{max-height:none;border-left:0;border-top:1px solid #eef2f7}}

/* 后台列表批量操作 */
.bulk-bar{display:flex;align-items:center;gap:10px;padding:10px 14px;margin-bottom:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}
.bulk-all{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#475569;cursor:pointer}
.bulk-all input,.bulk-check{width:15px;height:15px;accent-color:#0d9488;cursor:pointer}
.bulk-count{font-size:12px;color:#94a3b8}
.bulk-bar .btn[disabled]{opacity:.55;cursor:not-allowed}
.table th.bulk-col,.table td.bulk-col{width:40px;text-align:center}

/* 后台邮件设置 */
.check-line{display:flex;align-items:center;gap:8px;font-size:13px;color:#334155;margin-top:6px;cursor:pointer}
.check-line input{width:auto;margin:0}
.mail-hint{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:14px 16px}
.mail-hint strong{font-size:13px;color:#0f172a}

/* 通用表格、分页与空状态 */
.table-wrap{overflow-x:auto}
.pagination{display:flex;align-items:center;justify-content:center;gap:10px;padding-top:16px;flex-wrap:wrap}
.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;flex-wrap:wrap}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.empty-state{display:grid;place-items:center;text-align:center;gap:6px;padding:34px 20px;color:#334155}
.empty-state.compact{padding:18px 10px}
.empty-state h3{margin:0;font-size:16px}
.empty-state p{margin:0;max-width:440px;line-height:1.7}
.empty-state .empty-icon{font-size:30px;font-weight:800;letter-spacing:.08em;color:#0f766e;background:#ecfdf5;border-radius:14px;padding:8px 14px}
.empty-state .btn{margin-top:6px}

/* 用户管理 */
.user-role-link{color:#0f766e;font-weight:600}
.user-sub{font-size:12px;color:#94a3b8;margin-top:2px}

/* 权限管理 */
.permission-list{display:grid;gap:14px}
.permission-card{border:1px solid #e5eaf1;border-radius:14px;padding:16px 18px;background:#fff}
.permission-card.is-super{background:linear-gradient(180deg,#f0fdfa,#fff 46%);border-color:#b7e4dc}
.permission-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid #f0f2f5}
.permission-card-head strong{font-size:15px;color:#0f172a;margin-right:8px}
.permission-card-head .muted{font-size:12px}
.permission-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-top:14px}
.permission-item{display:flex;align-items:center;gap:8px;border:1px solid #e8edf4;border-radius:9px;padding:9px 10px;background:#fbfdff;font-size:13px;cursor:pointer;transition:.16s}
.permission-item:hover{border-color:#b7e4dc;background:#f0fdfa}
.permission-item input{width:15px;height:15px;accent-color:#0d9488;margin:0}
.permission-item span{flex:1;color:#334155;font-weight:600}
.permission-item small{font-size:10px;color:#94a3b8;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.permission-item.is-disabled{opacity:.7;cursor:default}
.permission-card-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:14px;flex-wrap:wrap}

/* 附件管理 */
.attachment-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:18px}
.attachment-table td{vertical-align:middle}
.attachment-thumb{display:block;width:52px;height:52px;border-radius:9px;overflow:hidden;border:1px solid #e5eaf1;background:#f8fafc}
.attachment-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.attachment-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:9px;background:#f0f7f6;color:#0f766e;font-size:22px;border:1px solid #e3efed}
.attachment-icon.kind-audio{background:#f5f0ff;color:#7c3aed;border-color:#e8ddff}
.attachment-icon.kind-video{background:#fff4e8;color:#c2410c;border-color:#ffdfba}
.attachment-name{display:block;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.attachment-path{max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}
.attachment-actions{display:flex;gap:6px;flex-wrap:wrap}
.kind-pill{background:#f1f5f9;color:#475569}
@media (max-width:760px){
    .attachment-name,.attachment-path{max-width:180px}
    .permission-card-head{align-items:flex-start}
}
