/* ---------------------------------------------------------------
   Xreach 管理后台样式 —— 简洁、实用，不做过度装饰
   --------------------------------------------------------------- */

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f6faf8;
    color: #1a2521;
    font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont,
        "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "HarmonyOS Sans SC",
        "MiSans", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI",
        "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: #3f7d63; text-decoration: none; }
a:hover { text-decoration: underline; }

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

.admin-side {
    width: 190px;
    flex: 0 0 190px;
    background: #fff;
    border-right: 1px solid #dfeae4;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.side-brand {
    padding: 18px 18px 14px;
    border-bottom: 1px solid #e8f1ec;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .3px;
}

.side-brand a { color: #1a2521; }

.side-version {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #8e9d96;
    font-weight: 400;
}

.side-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    color: #3d4a43;
    font-size: 13.5px;
    border-left: 3px solid transparent;
}

.side-nav a:hover { background: #f1f7f3; color: #1a2521; text-decoration: none; }

.side-nav a.active {
    background: #eaf4ee;
    border-left-color: #3f7d63;
    color: #2f6250;
    font-weight: 600;
}

.side-nav .icon {
    width: 16px;
    text-align: center;
    color: #8b9a93;
    font-size: 13px;
}

.side-nav a.active .icon { color: #3f7d63; }

.side-nav .dot {
    margin-left: auto;
    background: #e2574c;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 9px;
}

.side-foot {
    padding: 12px 18px 16px;
    border-top: 1px solid #e8f1ec;
    font-size: 12.5px;
    color: #74837c;
}

.side-foot a { display: block; }

.admin-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 26px;
    background: #fff;
    border-bottom: 1px solid #dfeae4;
    position: relative;
    z-index: 20;
}

.page-title { margin: 0; font-size: 16px; font-weight: 600; color: #1a2521; }

/* ---------------- 右上角账号菜单 ---------------- */
.account { position: relative; }

.account > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 8px 4px 5px;
    border-radius: 4px;
    cursor: pointer;
}

.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover { background: #f1f7f3; }
.account[open] > summary { background: #eaf4ee; }

.account-greeting { font-size: 13px; color: #74837c; }
.account-greeting strong { color: #1a2521; font-weight: 600; }

.account-caret { font-size: 10px; color: #8e9d96; line-height: 1; }
.account[open] .account-caret { color: #3f7d63; }

.account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 236px;
    padding: 6px;
    background: #fff;
    border: 1px solid #dfeae4;
    border-radius: 5px;
    box-shadow: 0 10px 26px rgba(45, 36, 28, .13);
    z-index: 40;
}

.account-menu a,
.account-logout button {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 3px;
    background: none;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    color: #33413b;
    cursor: pointer;
}

.account-menu a:hover,
.account-logout button:hover { background: #f1f7f3; text-decoration: none; }

.account-logout {
    margin: 4px 0 0;
    padding-top: 4px;
    border-top: 1px solid #e8f1ec;
}

.account-logout button:hover { color: #e2574c; }

.account-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e8f1ec;
}

.account-card-text { min-width: 0; }
.account-card-text strong { display: block; font-size: 13.5px; color: #1a2521; }
.account-card-text span {
    display: block;
    font-size: 11.5px;
    color: #8e9d96;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------- 头像 ---------------- */
.avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    overflow: hidden;
    color: #fff;
    font-weight: 600;
    line-height: 1;
    user-select: none;
}

.avatar-initial { position: relative; z-index: 0; }

.avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* ---------------- 三栏：内容 + 右侧设置栏 ---------------- */
.admin-columns {
    display: flex;
    align-items: flex-start;
    flex: 1;
}

.admin-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 22px 26px 40px;
    max-width: 1180px;
    width: 100%;
}

.admin-aside {
    width: 288px;
    flex: 0 0 288px;
    align-self: flex-start;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 22px 26px 40px 0;
    scrollbar-width: thin;
}

.aside-panel { margin-bottom: 16px; }
.aside-panel .panel-head { padding: 10px 14px; font-size: 13px; }
.aside-panel .panel-body { padding: 14px; }

.panel-link { font-weight: 400; font-size: 12px; color: #8e9d96; }
.panel-link:hover { color: #3f7d63; }

/* 设置入口 */
.aside-links { list-style: none; margin: 0; padding: 4px 0; }

.aside-links a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 14px;
    font-size: 13px;
    color: #33413b;
}

.aside-links a:hover { background: #f7fbf8; text-decoration: none; }
.aside-links a span { font-size: 11.5px; color: #8e9d96; text-align: right; }

.aside-links-compact a { padding: 6px 14px; }

.aside-subhead {
    padding: 8px 14px 4px;
    border-top: 1px solid #edf5f0;
    font-size: 11.5px;
    letter-spacing: .04em;
    color: #8e9d96;
}

/* 概览 */
.aside-stats { list-style: none; margin: 0; padding: 2px 0; }

.aside-stats li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 7px 14px;
    font-size: 13px;
    border-bottom: 1px dashed #eef5f0;
}

.aside-stats li:last-child { border-bottom: 0; }
.aside-stats a { color: #33413b; }
.aside-stats strong { font-weight: 600; color: #1a2521; }
.aside-stats strong.warn { color: #cf3b3b; }

/* 控制台快速设置 */
.quick-form .form-row { margin-bottom: 14px; }
.quick-form .form-row > label { font-size: 12.5px; margin-bottom: 5px; }
.quick-form input[type="text"],
.quick-form input[type="number"] {
    max-width: 100%;
    padding: 7px 9px;
    font-size: 13.5px;
}
.quick-form .checkbox { display: flex; margin-bottom: 7px; font-size: 13px; }

input[type="color"] {
    width: 76px;
    height: 32px;
    padding: 2px;
    border: 1px solid #d3e0d8;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
}

/* 安全检查 */
.aside-issues { list-style: none; margin: 0 0 8px; padding: 0; }

.aside-issues li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 6px;
    font-size: 12.5px;
    line-height: 1.65;
    color: #8a5a3a;
}

.aside-issues li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1844a;
}

.aside-ok { margin: 0; font-size: 12.5px; line-height: 1.7; color: #4a7a56; }

.aside-meta { margin: 4px 0 0; font-size: 11.5px; color: #9aa8a1; }

.admin-footer {
    padding: 14px 26px 22px;
    color: #93a29b;
    font-size: 12px;
}

/* 设置页锚点跳转时留出一点空隙 */
.panel[id] { scroll-margin-top: 18px; }

.back-link { margin: 0 0 14px; font-size: 13px; }

.avatar-preview { display: flex; align-items: center; gap: 14px; }
.avatar-preview-text strong { display: block; font-size: 14.5px; color: #1a2521; }
.avatar-preview-text span { display: block; margin-top: 3px; font-size: 12.5px; color: #6a7a73; }

/* ---------------- 提示 ---------------- */
.flash {
    padding: 10px 14px;
    margin-bottom: 18px;
    border-radius: 4px;
    font-size: 13.5px;
    border: 1px solid #cfe8c7;
    background: #f3faf0;
    color: #35703a;
}

.flash.error {
    border-color: #f2cccc;
    background: #fdf2f2;
    color: #a83a3a;
}

/* ---------------- 卡片 / 面板 ---------------- */
.panel {
    background: #fff;
    border: 1px solid #dfeae4;
    border-radius: 5px;
    margin-bottom: 20px;
}

.panel-head {
    padding: 13px 18px;
    border-bottom: 1px solid #e9f2ed;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-body { padding: 18px; }

.panel-body.tight { padding: 0; }

/* ---------------- 统计卡片 ---------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    background: #fff;
    border: 1px solid #dfeae4;
    border-radius: 5px;
    padding: 16px 18px;
}

.stat-card .num {
    font-size: 24px;
    font-weight: 700;
    color: #1a2521;
    line-height: 1.2;
}

.stat-card .label { color: #74837c; font-size: 12.5px; margin-top: 4px; }

.stat-card a { color: inherit; }

/* ---------------- 表格 ---------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.table th,
.table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e9f1ec;
    vertical-align: top;
}

.table th {
    background: #f8fcf9;
    font-weight: 600;
    color: #57645d;
    font-size: 12.5px;
    white-space: nowrap;
}

.table tr:last-child td { border-bottom: 0; }

.table tr:hover td { background: #fbfefc; }

.table .title-cell a { font-weight: 600; color: #1a2521; }

.table .muted { color: #8e9d96; font-size: 12.5px; }

.table .actions { white-space: nowrap; }

.table .actions a,
.table .actions button {
    margin-right: 10px;
    font-size: 12.5px;
}

.table .actions > *:last-child a,
.table .actions > *:last-child button,
.table .actions > a:last-child { margin-right: 0; }

.table .actions .danger { color: #cf3b3b; }

.row-actions form { display: inline; }

/* 表格行内的快捷操作表单必须内联，否则每个表单会独占一行 */
.table .actions form { display: inline; margin: 0; }

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: #3f7d63;
    cursor: pointer;
    font-size: 12.5px;
    font-family: inherit;
}

.link-btn.danger { color: #cf3b3b; }

.link-btn:hover { text-decoration: underline; }

/* ---------------- 表单 ---------------- */
.form-row { margin-bottom: 14px; }

.form-row > label,
.form-label {
    display: block;
    font-size: 13px;
    color: #4b584f;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-row .hint { color: #8e9d96; font-size: 12px; margin-top: 4px; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
input[type="url"],
select,
textarea {
    width: 100%;
    max-width: 520px;
    padding: 7px 10px;
    border: 1px solid #d3e0d8;
    border-radius: 3px;
    font-family: inherit;
    font-size: 13.5px;
    color: #1a2521;
    background: #fff;
    outline: none;
}

input:focus,
select:focus,
textarea:focus { border-color: #3f7d63; box-shadow: 0 0 0 2px rgba(63, 125, 99, .12); }

textarea { resize: vertical; }

textarea.code {
    font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
    font-size: 13.5px;
    line-height: 1.7;
    min-height: 380px;
    max-width: 100%;
    width: 100%;
}

select { max-width: 260px; }

.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: #4b584f; }

.btn {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid #d3e0d8;
    background: #fff;
    color: #33413b;
    border-radius: 3px;
    font-size: 13.5px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.btn:hover { background: #f4faf6; text-decoration: none; }

.btn-primary {
    background: #3f7d63;
    border-color: #3f7d63;
    color: #fff;
}

.btn-primary:hover { background: #2f6250; border-color: #2f6250; color: #fff; }

.btn-danger { color: #cf3b3b; border-color: #eccfcf; }

.btn-danger:hover { background: #fdf3f3; }

.btn-sm { padding: 4px 10px; font-size: 12.5px; }

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid #e9f2ed;
    background: #f8fcf9;
    flex-wrap: wrap;
}

.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

.inline-form .form-row { margin-bottom: 0; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 22px;
}

.grid-2 .form-row input,
.grid-2 .form-row select { max-width: 100%; }

/* ---------------- 徽章 ---------------- */
.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11.5px;
    line-height: 1.7;
    font-weight: 500;
    white-space: nowrap;
}

.badge-publish { background: #eaf6ea; color: #2f7a3a; }
.badge-draft { background: #eef2ee; color: #6a7a73; }
.badge-pending { background: #fdf4e3; color: #96650c; }
.badge-spam { background: #fbeaea; color: #a83a3a; }

/* ---------------- 分页 ---------------- */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    flex-wrap: wrap;
    font-size: 13px;
}

.pagination a,
.pagination span {
    padding: 3px 9px;
    border: 1px solid #dbe7e0;
    border-radius: 3px;
    color: #3d4a43;
    background: #fff;
}

.pagination a:hover { border-color: #3f7d63; color: #3f7d63; text-decoration: none; }

.pagination .current { background: #3f7d63; border-color: #3f7d63; color: #fff; }

.pagination .total { border: 0; color: #8e9d96; margin-left: auto; }

/* ---------------- 筛选条 ---------------- */
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid #e9f2ed;
    font-size: 13px;
}

.filter-bar select,
.filter-bar input[type="text"] {
    width: auto;
    max-width: 200px;
    padding: 5px 9px;
}

.filter-bar .inline-form {
    margin-left: auto;
    flex-wrap: nowrap;
}

.filter-bar .inline-form input[type="text"] { width: 170px; }

.filter-bar .tabs { display: flex; gap: 14px; margin-right: 6px; }

.filter-bar .tabs a { color: #57645d; }
.filter-bar .tabs a.on { color: #1a2521; font-weight: 600; }

/* ---------------- 登录页 ---------------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6faf8;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 1px solid #dfeae4;
    border-radius: 6px;
    padding: 30px 28px 24px;
}

.login-box h1 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #1a2521;
    text-align: center;
}

.login-box .sub { text-align: center; color: #8e9d96; font-size: 12.5px; margin: 0 0 20px; }

.login-box input[type="text"],
.login-box input[type="password"] { max-width: 100%; }

.login-box .btn { width: 100%; text-align: center; }

.login-box .login-error {
    background: #fdf2f2;
    border: 1px solid #f2cccc;
    color: #a83a3a;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 13px;
    margin-bottom: 14px;
}

.login-foot { text-align: center; margin-top: 16px; font-size: 12.5px; }

/* ---------------- 媒体库 ---------------- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.media-item {
    border: 1px solid #dfeae4;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    font-size: 12px;
}

.media-thumb {
    height: 110px;
    background: #f1f7f3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.media-thumb .ext { color: #8b9a93; font-size: 12px; text-transform: uppercase; }

.media-info { padding: 8px 10px; }

.media-info .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #33413b;
}

.media-info .meta { color: #8e9d96; margin-top: 2px; }

.media-info .ops { margin-top: 6px; display: flex; gap: 8px; }

/* ---------------- 编辑器 ---------------- */
.editor-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid #d3e0d8;
    border-bottom: 0;
    border-radius: 3px 3px 0 0;
    background: #f8fcf9;
}

.editor-toolbar button {
    padding: 3px 9px;
    border: 1px solid #dbe7e0;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12.5px;
    color: #3d4a43;
    font-family: inherit;
}

.editor-toolbar button:hover { background: #eaf4ee; border-color: #c3ddd0; }

.editor-wrap textarea {
    border-radius: 0 0 3px 3px;
    max-width: 100%;
}

.preview-box {
    border: 1px solid #d3e0d8;
    border-radius: 3px;
    padding: 16px 18px;
    background: #fff;
    min-height: 200px;
    font-size: 14.5px;
    line-height: 1.85;
}

.preview-box h1, .preview-box h2, .preview-box h3 { margin-top: 1em; }

.preview-box pre {
    background: #f1f7f3;
    border: 1px solid #e5efe9;
    border-radius: 3px;
    padding: 12px;
    overflow-x: auto;
}

.preview-box code { font-family: Consolas, Menlo, monospace; font-size: 13px; }

.preview-box blockquote {
    border-left: 3px solid #dbe7e0;
    margin: 1em 0;
    padding: .3em 1em;
    color: #57645d;
}

.preview-box table { border-collapse: collapse; }
.preview-box th, .preview-box td { border: 1px solid #dfeae4; padding: 6px 10px; }

.preview-box img { max-width: 100%; }

/* ---------------- 空状态 ---------------- */
.empty {
    padding: 40px 20px;
    text-align: center;
    color: #8e9d96;
    font-size: 13.5px;
}

/* ---------------- 平板：右侧栏换到内容下方 ---------------- */
@media (max-width: 1080px) {
    .admin-columns { flex-wrap: wrap; }

    .admin-aside {
        flex: 1 1 100%;
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0 26px 32px;
    }

    .admin-content { max-width: none; }
}

/* ---------------- 移动端 ---------------- */
@media (max-width: 860px) {
    .admin-layout { flex-direction: column; }

    .admin-side {
        width: 100%;
        flex: none;
        height: auto;
        position: static;
        border-right: 0;
        border-bottom: 1px solid #dfeae4;
    }

    .side-brand { padding: 12px 16px 10px; }

    .side-nav {
        display: flex;
        overflow-x: auto;
        padding: 0 8px 6px;
        gap: 2px;
    }

    .side-nav a {
        border-left: 0;
        border-bottom: 2px solid transparent;
        padding: 7px 12px;
        white-space: nowrap;
        font-size: 13px;
    }

    .side-nav a.active { border-left: 0; border-bottom-color: #3f7d63; background: #eaf4ee; }

    .side-nav .icon { display: none; }

    .side-foot {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 16px;
        gap: 12px;
    }

    .admin-top { padding: 10px 16px; }

    .account-greeting { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .admin-content { padding: 16px 16px 32px; }

    .admin-aside { padding: 0 16px 24px; }

    .plugin-row { flex-direction: column; gap: 10px; }
    .plugin-row-actions { width: 100%; padding-top: 0; }

    .grid-2 { grid-template-columns: 1fr; }

    .table th, .table td { padding: 9px 10px; }

    .table .hide-sm { display: none; }

    /* 窄屏下操作列允许换行，避免表格被撑出屏幕 */
    .table .actions { white-space: normal; }

    .table .actions a,
    .table .actions button { margin-right: 8px; }

    .filter-bar .inline-form {
        margin-left: 0;
        flex-wrap: wrap;
        width: 100%;
    }

    .filter-bar .inline-form input[type="text"] { width: 100%; flex: 1 1 120px; }

    .filter-bar .tabs { flex-wrap: wrap; gap: 10px; }

    .pagination .total { margin-left: 0; width: 100%; }

    .panel-head { flex-wrap: wrap; }

    input[type="text"], input[type="password"], input[type="email"], input[type="number"],
    input[type="datetime-local"], textarea, select { max-width: 100%; }
}

/* 封面字段 */
.field-tip {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #6a7a73;
}
.cover-preview {
    position: relative;
    margin-top: 10px;
    max-width: 340px;
    border: 1px solid #dfeae4;
    background: #f4faf6;
    overflow: hidden;
}
.cover-preview img {
    display: block;
    width: 100%;
    height: auto;
}
.cover-hint {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 2px 9px;
    background: rgba(33, 31, 28, .74);
    color: #fff;
    font-size: 11px;
    letter-spacing: .04em;
}

/* ---------------- 插件 ---------------- */
.plugin-version {
    margin-left: 7px;
    font-size: 11.5px;
    font-weight: 400;
    color: #8e9d96;
}

.plugin-desc {
    margin: 0 0 8px;
    font-size: 13.5px;
    line-height: 1.75;
    color: #33413b;
}

.plugin-meta {
    margin: 0;
    font-size: 12.5px;
    color: #6a7a73;
}
.plugin-meta code {
    padding: 1px 5px;
    background: #f2f8f4;
    font-size: 12px;
}

/* 插件列表：一行一个，设置放在独立页面，列表再长也不会变成表单堆 */
.plugin-list { list-style: none; margin: 0; padding: 0; }

.plugin-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef5f0;
}

.plugin-row:last-child { border-bottom: 0; }

.plugin-row-main { min-width: 0; }

.plugin-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.plugin-row-title .plugin-version { margin-left: 0; }

.plugin-name { font-size: 14.5px; font-weight: 600; color: #1a2521; }

.plugin-row-main .plugin-desc { margin: 0 0 6px; }

.plugin-row .errors { margin: 10px 0 0; }

.plugin-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding-top: 2px;
}

.plugin-row-actions form { margin: 0; }

.errors {
    margin: 0 0 16px;
    padding: 9px 12px;
    background: #fbeaea;
    border-left: 3px solid #cf3b3b;
    color: #a83a3a;
    font-size: 13px;
}
.errors ul { margin: 0; padding-left: 18px; }

/* 插件在后台角落输出的标语（HelloWorld 示例） */
.xr-plugin-slogan {
    position: fixed;
    z-index: 30;
    pointer-events: none;
    letter-spacing: .05em;
    opacity: .9;
}

/* ---------------- 控制台：快速设置 ---------------- */
.quick-form { padding-bottom: 14px; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 18px;
}

.quick-grid .form-row { margin-bottom: 14px; }
.quick-grid .form-row input[type="text"],
.quick-grid .form-row input[type="number"] { max-width: 100%; }
.quick-grid .form-row input[type="color"] { max-width: 76px; }

.quick-toggles {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 24px;
    padding-top: 2px;
}

.quick-label {
    font-size: 13px;
    color: #55635b;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef5f0;
}

.quick-actions .hint { margin: 0; font-size: 12px; color: #8e9d96; }

/* ---------------- 用户 ---------------- */
.user-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 14px;
    font-size: 13px;
}

.filter-bar.in-body {
    padding: 0 0 4px;
    border-bottom: 0;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-id {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.user-id strong { font-weight: 600; color: #1a2521; }

.user-login { font-size: 11.5px; color: #6a7a73; }
.user-login em { font-style: normal; color: #3f7d63; }

.role-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.role-select {
    width: auto;
    min-width: 88px;
    padding: 4px 7px;
    font-size: 12.5px;
}

.plain-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.95;
    color: #33413b;
}

.static-value { font-size: 13.5px; color: #33413b; }

/* ---------------- 2K / 4K ---------------- */
@media (min-width: 1600px) {
    .admin-content { max-width: 1360px; padding: 26px 34px 48px; }
    .admin-aside { width: 320px; flex-basis: 320px; padding-right: 30px; }
    .stat-grid { gap: 12px; }
    .stat-card { padding: 16px 18px; }
    .stat-card .num { font-size: 26px; }
    .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .admin-top { padding: 16px 34px; }
}

@media (min-width: 2100px) {
    .admin-side { width: 212px; flex-basis: 212px; }
    .side-nav a { padding-left: 22px; }
    .admin-content { max-width: 1600px; }
    .admin-aside { width: 352px; flex-basis: 352px; }
    body { font-size: 14.5px; }
    .table td, .table th { padding: 11px 14px; }
    .panel-head { padding: 12px 18px; }
}

@media (max-width: 860px) {
    .quick-grid { grid-template-columns: 1fr; }
    .quick-toggles { grid-column: auto; }
    .user-summary { font-size: 12.5px; }
    .role-form { flex-wrap: wrap; }
}
