@charset "UTF-8";
/**
 * FlintHub — 首页会员区块插件 样式
 *
 * 内容分两段：
 *   A. 前台面板（.hm-*）：推荐会员 + 三榜，纯 CSS radio tab（零 JS）
 *   B. 后台设置页（.hm-adm-*）：仅补充核心 admin.css 未覆盖的局部（Tab 行 / 记录表）
 *
 * ⚠️ 颜色**只用既有 `--mn-*`（前台）与 `--c-*`（后台）变量**：
 *    `--mn-danger` / `--mn-spectrum-*` 在全站**从未定义**，写了等于没写（静默取初值）。
 * ⚠️ 本文件在 `layout_head_end` 注入 → **加载早于核心 admin.css**
 *    （main.php:49 vs :55）。后台相关规则**必须用严格更高的特异性**取胜，
 *    或改用 `max-width` 这类**不与核心 `width:100%` 正面冲突**的属性
 *    —— 千万不要靠 `!important` 打补丁（核心一改就静默失效）。
 * ⚠️ 改动本文件后 URL 上的 `?v=filemtime` 会自动变化 → 浏览器缓存失效，无需手动 bump。
 *
 * @file plugins/home_members/assets/style.css
 * @package Plugin\HomeMembers
 * @version 1.0.0
 */

/* ==========================================================================
   A. 前台面板
   ========================================================================== */

/* 外层：复用核心 .mn-section 的卡片底（背景/边框/圆角/阴影），这里只补内边距语义 */
.hm-section {
    padding-bottom: 2px;
}

/* 视觉隐藏但仍可聚焦：键盘 Tab 聚焦 + 方向键切换 → :checked 联动（不能 display:none） */
.hm-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.hm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px 12px 0;
    border-bottom: 1px solid var(--mn-border-light);
}

.hm-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--mn-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color .12s, background-color .12s, border-color .12s;
}

.hm-tab:hover {
    color: var(--mn-primary);
    background: var(--mn-primary-subtle);
}

.hm-panes {
    padding: 12px 12px 14px;
}

.hm-pane {
    display: none;
}

/* 纯 CSS 切换：radio 是 .hm-tabs / .hm-panes 的前置兄弟节点
   （:nth-of-type 只数 input，本层没有别的 input 兄弟 → 序号即 tab 序号） */
.hm-radio:nth-of-type(1):checked ~ .hm-tabs > .hm-tab:nth-child(1),
.hm-radio:nth-of-type(2):checked ~ .hm-tabs > .hm-tab:nth-child(2),
.hm-radio:nth-of-type(3):checked ~ .hm-tabs > .hm-tab:nth-child(3),
.hm-radio:nth-of-type(4):checked ~ .hm-tabs > .hm-tab:nth-child(4) {
    color: var(--mn-primary);
    border-bottom-color: var(--mn-primary);
    font-weight: 600;
}

.hm-radio:nth-of-type(1):checked ~ .hm-panes > .hm-pane:nth-child(1),
.hm-radio:nth-of-type(2):checked ~ .hm-panes > .hm-pane:nth-child(2),
.hm-radio:nth-of-type(3):checked ~ .hm-panes > .hm-pane:nth-child(3),
.hm-radio:nth-of-type(4):checked ~ .hm-panes > .hm-pane:nth-child(4) {
    display: block;
}

.hm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
}

.hm-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: background-color .12s, border-color .12s;
}

.hm-card:hover {
    background: var(--mn-bg-row-hover);
    border-color: var(--mn-border-light);
}

.hm-av {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    background: var(--mn-tag-bg);
}

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

.hm-av-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 18px;
    font-weight: 600;
    color: var(--mn-primary);
    background: var(--mn-primary-subtle);
}

.hm-name {
    max-width: 100%;
    font-size: 12.5px;
    line-height: 1.3;
    color: var(--mn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-sub {
    font-size: 11.5px;
    line-height: 1.3;
    color: var(--mn-text-muted);
}

.hm-sub-days {
    color: var(--mn-primary);
}

/* 「我要上墙」：与会员卡片同形，但整块可点（<button> 需清掉浏览器默认外观） */
.hm-add-form {
    margin: 0;
    display: flex;
    min-width: 0;
}

.hm-card-add {
    width: 100%;
    font: inherit;
    cursor: pointer;
    border-style: dashed;
    border-color: var(--mn-border);
    color: var(--mn-text-muted);
}

.hm-card-add:hover {
    border-color: var(--mn-primary);
    color: var(--mn-primary);
    background: var(--mn-primary-subtle);
}

.hm-empty {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--mn-text-muted);
}

/* ==========================================================================
   B. 后台设置页（加载早于 admin.css → 一律用更高特异性）
   ========================================================================== */

/* 说明文字：核心没有对应类，自建即可（不与核心同名） */
.hm-adm-hint {
    margin: 4px 0 8px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--c-text-muted, #64748b);
}

/* 复选行：核心 `.admin-content .form-group label` 是 display:block (0,2,1)，
   这里用 (0,3,1) 压过去，让 checkbox 与文字同行 */
.admin-content .form-group label.hm-adm-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--c-text, #1e293b);
    cursor: pointer;
}

.admin-content .form-group label.hm-adm-check input[type="checkbox"] {
    margin: 0;
    flex: 0 0 auto;
}

/* 数字输入：核心 `.admin-content .form-group input:not(...)` 是 width:100% (0,4,1)。
   不正面冲突 —— 用 max-width 收窄（max-width 优先于 width），零特异性战争。 */
.admin-content .hm-adm-input {
    max-width: 160px;
}

.admin-content .hm-adm-seq {
    max-width: 76px;
}

.admin-content .hm-adm-textarea {
    max-width: 620px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Tab 勾选行 */
.hm-adm-tabrows {
    max-width: 620px;
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

.hm-adm-tabrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--c-border, #e2e8f0);
}

.hm-adm-tabrow:last-child {
    border-bottom: none;
}

.hm-adm-tabrow-head {
    background: var(--c-bg-light, #f1f5f9);
    font-size: 12.5px;
    color: var(--c-text-muted, #64748b);
}

.hm-adm-actions {
    margin-top: 20px;
}

/* 上墙记录表：不复用核心 .admin-table（其列序/nowrap/移动端重排均按别的语义硬编码） */
.hm-adm-scroll {
    overflow-x: auto;
}

.hm-adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--c-bg, #ffffff);
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

.hm-adm-table th,
.hm-adm-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--c-border, #e2e8f0);
    vertical-align: middle;
}

.hm-adm-table thead th {
    background: var(--c-bg-light, #f1f5f9);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text-secondary, #475569);
    white-space: nowrap;
}

.hm-adm-table tbody tr:last-child td {
    border-bottom: none;
}

.hm-adm-table th.hm-adm-num,
.hm-adm-table td.hm-adm-num {
    text-align: right;
    white-space: nowrap;
}

.hm-adm-uid {
    margin-left: 6px;
    font-size: 12px;
    color: var(--c-text-muted, #64748b);
}

.hm-adm-muted {
    color: var(--c-text-muted, #64748b);
}

.hm-adm-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11.5px;
    background: var(--c-bg-light, #f1f5f9);
    color: var(--c-text-muted, #64748b);
}

/* 已过期行：整行减淡，避免管理员误以为还在墙上 */
.hm-adm-row-off td {
    opacity: .6;
}

.hm-adm-inline-form {
    display: inline-block;
    margin: 0;
}

.hm-adm-empty {
    margin: 0;
    font-size: 13px;
    color: var(--c-text-muted, #64748b);
}
