/* 后台管理：侧栏壳 + 概览 + 用户管理 + 弹窗表单（设计语言与登录页一致） */

.admin-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    overflow: clip; /* 装饰层溢出不产生滚动容器 */
    background:
        radial-gradient(1000px 620px at 88% -10%, rgba(74, 125, 255, .14), transparent 62%),
        radial-gradient(880px 560px at -6% 108%, rgba(0, 194, 255, .11), transparent 60%),
        linear-gradient(160deg, #f4f8ff 0%, #eef2fb 60%, #edf2fc 100%);
}

.admin-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

/* ============ 侧栏 ============ */
.adm-side {
    width: 244px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px 18px;
    background: rgba(255, 255, 255, .66);
    backdrop-filter: blur(18px) saturate(1.15);
    border-right: 1px solid rgba(47, 107, 255, .12);
}
.ad-brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px 0; }
.ad-brand-text { display: flex; flex-direction: column; gap: 3px; }
.ad-brand-name { font-size: 21px; font-weight: 800; letter-spacing: 5px; color: var(--ink); }
.ad-brand-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 9.5px;
    letter-spacing: 2px;
    color: #8fa3c6;
}

.ad-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ad-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-size: 14px;
    color: var(--ink-2);
    text-align: left;
    transition: background .15s, color .15s;
}
.ad-nav-item:hover { background: rgba(255, 255, 255, .85); color: var(--ink); }
.ad-nav-item.is-active {
    background: rgba(47, 107, 255, .09);
    color: var(--blue);
    font-weight: 700;
}
.ad-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: 0; top: 9px; bottom: 9px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
}
.ad-nav-item.is-soon { opacity: .55; cursor: default; }
.ad-ico {
    width: 18px; height: 18px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}
.ad-soon-tag {
    margin-left: auto;
    font-style: normal;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 9px;
    letter-spacing: 1px;
    color: #9db1d4;
    border: 1px solid rgba(47, 107, 255, .14);
    border-radius: 4px;
    padding: 1px 5px;
}

.ad-side-foot { display: flex; flex-direction: column; gap: 10px; }
.ad-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(47, 107, 255, .1);
    border-radius: 12px;
}
.adm-avatar { display: block; border-radius: 50%; flex-shrink: 0; }
.ad-user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-user-name { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-user-role {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--cyan-deep);
}
.ad-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 0;
    border: 1px solid rgba(47, 107, 255, .16);
    border-radius: 10px;
    background: rgba(255, 255, 255, .55);
    font-size: 13px;
    color: var(--ink-2);
    transition: background .15s, color .15s;
}
.ad-logout:hover { background: #fff; color: #e5484d; }
.ad-logout:hover .ad-ico { stroke: #e5484d; }

/* ============ 主区 ============ */
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-top {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(18px, 3vw, 34px);
    background: rgba(244, 248, 255, .72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(47, 107, 255, .08);
}
.adm-top-title h1 { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: 2px; }
.adm-crumb {
    margin-top: 3px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10.5px;
    letter-spacing: 2.5px;
    color: var(--cyan-deep);
}
.adm-top-right { display: flex; align-items: center; gap: 16px; }
.adm-online {
    display: flex; align-items: center; gap: 6px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10px; letter-spacing: 2px;
    color: var(--ink-3);
}
.adm-online i {
    width: 7px; height: 7px; border-radius: 50%;
    background: #22c58b;
    box-shadow: 0 0 0 3px rgba(34, 197, 139, .18);
    animation: onlineBlink 2.2s ease-in-out infinite;
}

.adm-me { position: relative; }
.adm-me-btn {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 12px 5px 6px;
    border: 1px solid rgba(47, 107, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    font-size: 13px;
    color: var(--ink);
    transition: box-shadow .15s;
}
.adm-me-btn:hover { box-shadow: 0 4px 14px rgba(40, 80, 180, .12); }
.adm-caret { color: #9db1d4; font-size: 11px; }
.adm-me-menu {
    position: absolute;
    right: 0; top: calc(100% + 8px);
    min-width: 150px;
    padding: 6px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(47, 107, 255, .12);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(38, 70, 160, .16);
    display: flex; flex-direction: column;
}
.adm-me-menu[hidden] { display: none; }
.adm-me-menu button {
    padding: 9px 12px;
    border: none; border-radius: 8px;
    background: transparent;
    font-size: 13px; color: var(--ink-2); text-align: left;
}
.adm-me-menu button:hover { background: rgba(47, 107, 255, .08); color: var(--ink); }
.adm-me-menu button:last-child:hover { background: rgba(229, 72, 77, .08); color: #e5484d; }

.adm-content {
    flex: 1;
    padding: 26px clamp(18px, 3vw, 34px) 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============ 通用件 ============ */
.adm-btn-primary {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 8px 18px rgba(47, 107, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s, box-shadow .15s;
}
.adm-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(47, 107, 255, .36), inset 0 1px 0 rgba(255, 255, 255, .35); }
.adm-btn-primary:active { transform: none; }
.adm-btn-plain {
    padding: 10px 20px;
    border: 1px solid #dbe4f3;
    border-radius: 10px;
    font-size: 14px;
    color: var(--ink-2);
    background: #fff;
}
.adm-btn-plain:hover { background: #f5f8fd; }
.adm-btn-danger {
    padding: 10px 20px;
    border: 1px solid rgba(229, 72, 77, .3);
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f06065, #e5484d);
    box-shadow: 0 8px 18px rgba(229, 72, 77, .25);
}
.adm-btn-danger:hover { box-shadow: 0 11px 24px rgba(229, 72, 77, .32); }

/* ============ 概览 ============ */
.ov-welcome {
    position: relative;
    padding: 30px 32px 26px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(38, 70, 160, .1);
}
.ov-tag, .ov-links-tag {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--cyan-deep);
    margin-bottom: 10px;
}
.ov-title { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: 1px; }
.ov-name { background: linear-gradient(90deg, var(--blue), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ov-slogan { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
.ov-slogan .grad {
    font-weight: 700;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.ov-stat {
    padding: 20px 22px;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(38, 70, 160, .07);
}
.ov-stat-label {
    display: flex; align-items: baseline; gap: 8px;
    font-size: 13px; color: var(--ink-2);
}
.ov-stat-label em {
    font-style: normal;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 9.5px; letter-spacing: 1.5px; color: #a9b8d4;
}
.ov-stat-value {
    margin-top: 8px;
    font-size: 34px; font-weight: 800; color: var(--ink);
    font-family: ui-monospace, Consolas, monospace;
    background: linear-gradient(120deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ov-stats-fail { color: var(--ink-3); font-size: 13px; }

.ov-links-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ov-link {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 16px;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 26px rgba(38, 70, 160, .07);
    font-size: 15px; color: var(--ink); font-weight: 600;
    transition: transform .15s, box-shadow .15s;
}
.ov-link:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(38, 70, 160, .12); }
.ov-link .ad-ico { width: 20px; height: 20px; color: var(--blue); }
.ov-link-go { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--cyan-deep); }
.ov-link.is-soon { opacity: .55; cursor: default; }
.ov-link.is-soon:hover { transform: none; box-shadow: 0 10px 26px rgba(38, 70, 160, .07); }
.ov-link.is-soon .ov-link-go { color: var(--ink-3); }

/* ============ 用户管理 ============ */
.us-toolbar { display: flex; align-items: center; gap: 14px; }
.us-search {
    flex: 1;
    max-width: 380px;
    display: flex; align-items: center; gap: 9px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid #dbe4f3;
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}
.us-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 107, 255, .14); }
.us-search-ico { width: 16px; height: 16px; fill: none; stroke: #9db1d4; stroke-width: 1.8; stroke-linecap: round; }
.us-search input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; color: var(--ink); }
.us-search input::placeholder { color: #aab6cf; }
.us-toolbar .adm-btn-primary { margin-left: auto; }

.us-card {
    position: relative;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(38, 70, 160, .09);
}
.us-scroll { overflow-x: auto; border-radius: 18px; }
.us-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.us-table th {
    padding: 15px 18px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #9db1d4;
    text-align: left;
    white-space: nowrap;
}
.us-table td { padding: 13px 18px; border-top: 1px solid rgba(47, 107, 255, .08); font-size: 13.5px; color: var(--ink); vertical-align: middle; }
.us-table tbody tr { transition: background .12s; }
.us-table tbody tr:hover { background: rgba(47, 107, 255, .045); }

.us-user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.us-user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.us-user-main { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.us-user-sub { font-size: 11.5px; color: var(--ink-3); }
.us-username { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ink-2); }
.us-date { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }

.us-role {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(47, 107, 255, .09);
    border: 1px solid rgba(47, 107, 255, .16);
    color: var(--blue);
    white-space: nowrap;
}
.us-role-developer { background: rgba(122, 92, 255, .1); border-color: rgba(122, 92, 255, .22); color: #6a4de0; }
.us-role-user { background: rgba(0, 194, 255, .1); border-color: rgba(0, 194, 255, .24); color: var(--cyan-deep); }
.us-role-none { background: rgba(132, 150, 181, .1); border-color: rgba(132, 150, 181, .22); color: var(--ink-3); }

.us-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; white-space: nowrap; }
.us-status i { width: 7px; height: 7px; border-radius: 50%; }
.us-status.is-on { color: #1c9e73; }
.us-status.is-on i { background: #22c58b; box-shadow: 0 0 0 3px rgba(34, 197, 139, .16); }
.us-status.is-off { color: var(--ink-3); }
.us-status.is-off i { background: #b6c2d8; }

.us-ops { white-space: nowrap; text-align: right; }
.us-op {
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--blue);
    padding: 4px 8px;
    border-radius: 6px;
}
.us-op:hover { background: rgba(47, 107, 255, .08); }
.us-op.is-danger { color: #e5484d; }
.us-op.is-danger:hover { background: rgba(229, 72, 77, .08); }

.us-empty { padding: 42px 0 46px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.us-loading { padding: 18px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ============ 需求管理 / 更新日志（列表共用量） ============ */
.id-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.id-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid #dbe4f3;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    font-size: 13px;
    color: var(--ink-2);
    transition: all .15s;
}
.id-tab em {
    font-style: normal;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10.5px;
    color: var(--ink-3);
    background: rgba(47, 107, 255, .06);
    border-radius: 999px;
    padding: 1px 7px;
}
.id-tab:hover { border-color: rgba(47, 107, 255, .35); color: var(--ink); }
.id-tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(47, 107, 255, .25);
}
.id-tab.is-active em { color: rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .2); }

.id-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 460px; }
.id-title {
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.id-title:hover { color: var(--blue); }
.id-summary {
    font-size: 12px;
    color: var(--ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.id-submitter { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.id-status {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}
.id-status-pending { background: rgba(240, 148, 43, .12); border: 1px solid rgba(240, 148, 43, .26); color: #c77817; }
.id-status-planned { background: rgba(122, 92, 255, .1); border: 1px solid rgba(122, 92, 255, .22); color: #6a4de0; }
.id-status-question { background: rgba(234, 179, 8, .12); border: 1px solid rgba(234, 179, 8, .3); color: #a16207; }
.id-status-building { background: rgba(47, 107, 255, .09); border: 1px solid rgba(47, 107, 255, .18); color: var(--blue); }
.id-status-done { background: rgba(34, 197, 139, .1); border: 1px solid rgba(34, 197, 139, .24); color: #1c9e73; }
.id-status-rejected { background: rgba(132, 150, 181, .1); border: 1px solid rgba(132, 150, 181, .24); color: var(--ink-3); }

/* MCP 认领标记 + 站长指示块（需求详情） */
.id-claimed {
    display: inline-block; margin-left: 6px; padding: 3px 11px;
    border-radius: 999px; font-size: 12px; white-space: nowrap;
    background: rgba(47, 107, 255, .08); border: 1px dashed rgba(47, 107, 255, .35); color: var(--blue);
}
.id-directive {
    margin: 12px 0; padding: 12px 14px; border-radius: 12px;
    background: rgba(234, 179, 8, .07); border: 1px solid rgba(234, 179, 8, .35);
}
.id-directive-tag { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .6px; color: #a16207; font-family: ui-monospace, Consolas, monospace; }
.id-directive-text { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-1); white-space: pre-wrap; word-break: break-word; }

/* API密钥 / 提示词库 */
.key-mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--ink-2); }
.key-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.key-chip {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 11.5px; white-space: nowrap;
    background: rgba(122, 92, 255, .08); border: 1px solid rgba(122, 92, 255, .2); color: #6a4de0;
}
.key-state { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; }
.key-state.is-on { background: rgba(34, 197, 139, .1); border: 1px solid rgba(34, 197, 139, .24); color: #1c9e73; }
.key-state.is-off { background: rgba(132, 150, 181, .1); border: 1px solid rgba(132, 150, 181, .24); color: var(--ink-3); }
.key-reveal {
    margin: 8px 0 12px; padding: 11px 14px; border-radius: 10px;
    background: #f4f7fd; border: 1px solid #dbe4f3; word-break: break-all;
}
.pr-content {
    margin: 8px 0 12px; padding: 14px 16px; border-radius: 12px; max-height: 46vh; overflow: auto;
    background: #f4f7fd; border: 1px solid #dbe4f3;
    font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.75;
    color: var(--ink-1); white-space: pre-wrap; word-break: break-word;
}

.up-cat {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}
.up-cat-feature { background: rgba(47, 107, 255, .09); border: 1px solid rgba(47, 107, 255, .18); color: var(--blue); }
.up-cat-tech { background: rgba(122, 92, 255, .1); border: 1px solid rgba(122, 92, 255, .22); color: #6a4de0; }
.up-cat-ui { background: rgba(0, 194, 255, .1); border: 1px solid rgba(0, 194, 255, .24); color: var(--cyan-deep); }
.up-cat-fix { background: rgba(240, 148, 43, .12); border: 1px solid rgba(240, 148, 43, .26); color: #c77817; }

.up-scope { font-size: 12.5px; white-space: nowrap; }
.up-scope.is-all { color: #1c9e73; }
.up-scope.is-dev { color: var(--ink-3); }

.id-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.id-detail-date { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--ink-3); }
.id-detail-title { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.id-detail-content {
    white-space: pre-wrap;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.8;
    padding: 14px 16px;
    background: rgba(47, 107, 255, .05);
    border-radius: 12px;
    margin-bottom: 16px;
}

/* ============ 弹窗 ============ */
.adm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 34, 72, .4);
    backdrop-filter: blur(3px);
}
.adm-modal {
    position: relative;
    width: min(540px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(20, 40, 100, .25);
    padding: 26px 28px 22px;
}
.adm-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.adm-modal-tag {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10.5px;
    letter-spacing: 3px;
    color: var(--cyan-deep);
    margin-bottom: 6px;
}
.adm-modal-title { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: 2px; }
.adm-modal-close {
    width: 30px; height: 30px;
    border: none; border-radius: 8px;
    background: rgba(47, 107, 255, .07);
    color: var(--ink-2);
    font-size: 18px; line-height: 1;
}
.adm-modal-close:hover { background: rgba(47, 107, 255, .14); color: var(--ink); }
.adm-modal-foot { margin-top: 20px; }
/* 弹窗可滚动：角框收到 0 偏移，避免 -2px 溢出撑出滚动条 */
.adm-modal .corner.tl { top: 0; left: 0; }
.adm-modal .corner.tr { top: 0; right: 0; }
.adm-modal .corner.bl { bottom: 0; left: 0; }
.adm-modal .corner.br { bottom: 0; right: 0; }
.adm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.adm-confirm-text { color: var(--ink-2); font-size: 14px; line-height: 1.7; }

/* ---- 弹窗表单 ---- */
.fm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.fm-field { display: flex; flex-direction: column; gap: 7px; }
.fm-field-full { grid-column: 1 / -1; }
.fm-textarea { resize: vertical; min-height: 96px; line-height: 1.7; font-family: inherit; }
.fm-label { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.fm-label em {
    font-style: normal;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 9.5px;
    letter-spacing: 2px;
    color: #a9b8d4;
}
.fm-input {
    padding: 10px 13px;
    border: 1px solid #dbe4f3;
    border-radius: 10px;
    font-size: 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, .85);
    transition: border-color .15s, box-shadow .15s;
}
.fm-input:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .14);
}
.fm-roles { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.fm-role-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fm-role-chip span {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid #dbe4f3;
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink-2);
    background: rgba(255, 255, 255, .8);
    cursor: pointer;
    transition: all .15s;
}
.fm-role-chip input:checked + span {
    border-color: rgba(47, 107, 255, .4);
    background: rgba(47, 107, 255, .1);
    color: var(--blue);
    font-weight: 600;
}
.fm-role-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 107, 255, .18); }

.fm-switch { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.fm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.fm-switch-ui {
    width: 40px; height: 22px;
    border-radius: 999px;
    background: #cfd9ec;
    position: relative;
    flex-shrink: 0;
    transition: background .15s;
}
.fm-switch-ui::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    transition: transform .15s;
}
.fm-switch input:checked + .fm-switch-ui { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.fm-switch input:checked + .fm-switch-ui::after { transform: translateX(18px); }

.fm-err { min-height: 20px; margin-top: 12px; color: #e5484d; font-size: 13px; }

/* ---- 个人信息 ---- */
.pf-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.pf-name { font-size: 18px; font-weight: 800; color: var(--ink); }
.pf-role {
    margin-top: 5px;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(47, 107, 255, .09);
    border: 1px solid rgba(47, 107, 255, .16);
    color: var(--blue);
}
.pf-rows { display: flex; flex-direction: column; gap: 12px; }
.pf-rows > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 14px;
    background: rgba(47, 107, 255, .05);
    border-radius: 10px;
}
.pf-rows dt { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); }
.pf-rows dt em {
    font-style: normal;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 9.5px;
    letter-spacing: 1.5px;
    color: #a9b8d4;
}
.pf-rows dd { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; text-align: right; }

/* ============ 无权限面板 ============ */
.adm-forbidden {
    position: relative;
    z-index: 1;
    width: min(460px, calc(100% - 40px));
    margin: 16vh auto 0;
    padding: 34px 36px 30px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 18px;
    box-shadow: 0 24px 54px rgba(38, 70, 160, .14);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.adm-forbidden-title { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: 2px; }
.adm-forbidden-text { color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.adm-forbidden .adm-btn-primary { margin-top: 8px; min-width: 140px; }

/* ============ 轻提示 ============ */
.adm-toast {
    position: fixed;
    left: 50%; bottom: 30px;
    z-index: 1200;
    transform: translate(-50%, 14px);
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(22, 36, 74, .92);
    color: #fff;
    font-size: 13.5px;
    box-shadow: 0 12px 30px rgba(20, 40, 100, .3);
    opacity: 0;
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}
.adm-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.adm-toast-err { background: rgba(200, 48, 55, .95); }
.adm-toast-info { background: rgba(47, 107, 255, .95); }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
    .admin-shell { flex-direction: column; }
    .adm-side {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 14px 18px;
        border-right: none;
        border-bottom: 1px solid rgba(47, 107, 255, .12);
    }
    .ad-nav { flex-direction: row; overflow-x: auto; }
    .ad-nav-item { white-space: nowrap; }
    .ad-nav-item.is-active::before { top: auto; bottom: 0; left: 9px; right: 9px; width: auto; height: 3px; }
    .ad-soon-tag { display: none; }
    .ad-side-foot { flex-direction: row; align-items: center; }
    .ad-user-meta { display: none; }
    .ad-logout span { display: none; }
    .ad-logout { padding: 9px 11px; }
    .ov-stats, .ov-links-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .fm-grid { grid-template-columns: 1fr; }
    .adm-top-title h1 { font-size: 17px; }
    .adm-me-btn span { display: none; }
}

/* ============ 文件中心 ============ */
.fc-stats { display: flex; gap: 12px; margin-left: auto; }
.fc-stat {
    padding: 8px 18px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid #dbe4f3;
    border-radius: 12px;
}
.fc-stat-label {
    font-size: 11px; color: var(--ink-3); white-space: nowrap;
}
.fc-stat-label em {
    font-style: normal; font-family: ui-monospace, Consolas, monospace;
    font-size: 9.5px; letter-spacing: 1.5px; margin-left: 6px; color: #b3c1da;
}
.fc-stat-value { font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }

.fc-thumb {
    width: 44px; height: 44px; border-radius: 9px; object-fit: cover;
    border: 1px solid #dbe4f3; background: #f4f7fd; display: block;
}
.fc-icon {
    width: 44px; height: 44px; border-radius: 9px;
    border: 1px solid #dbe4f3; background: #f4f7fd;
    display: flex; align-items: center; justify-content: center;
    color: #9db1d4;
}
.fc-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fc-icon-lg { width: 84px; height: 84px; border-radius: 16px; }
.fc-icon-lg svg { width: 34px; height: 34px; }

.fc-name { font-weight: 600; color: var(--ink); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-sub { font-size: 11.5px; color: var(--ink-3); font-family: ui-monospace, Consolas, monospace; }
.fc-mono { font-family: ui-monospace, Consolas, monospace; }
.fc-break { word-break: break-all; }
.fc-preview { display: flex; justify-content: center; margin-bottom: 14px; }
.fc-preview img {
    max-width: 100%; max-height: 320px; border-radius: 12px;
    border: 1px solid #dbe4f3; background: #f4f7fd;
}
.fc-link { color: var(--blue); text-decoration: none; font-size: 13.5px; }
.fc-link:hover { text-decoration: underline; }

/* ============ 减动效偏好 ============ */
@media (prefers-reduced-motion: reduce) {
    .admin-page *, .admin-page *::before, .admin-page *::after,
    .adm-overlay *, .adm-overlay *::before, .adm-overlay *::after,
    .adm-toast {
        animation: none !important;
        transition: none !important;
    }
}
