/* ============================================================
   管理端样式系统
   品牌主色 #2563eb · 深靛蓝侧栏 · 浅灰蓝底 + 白色浮层卡片
   ============================================================ */

:root {
    /* 品牌 */
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-deep: #0e7490;
    --brand-ink: #1e3a8a;
    --brand-soft: #eff6ff;
    --brand-soft-2: #dbeafe;
    --gradient: linear-gradient(160deg, #2563eb 0%, #1d4ed8 40%, #0e7490 100%);
    --gradient-btn: linear-gradient(180deg, #3b76f6 0%, #2563eb 100%);

    /* 中性色 */
    --text: #0f172a;
    --text-sub: #52607a;
    --text-muted: #94a3b8;
    --line: #e6eaf2;
    --line-soft: #f1f4fa;
    --line-strong: #d8dfec;

    /* 语义色 */
    --danger: #e5484d;
    --danger-soft: #fef1f1;
    --success: #0f9d76;
    --success-soft: #ecfdf5;
    --warn: #d97706;
    --warn-soft: #fffbeb;

    /* 面 */
    --bg: #f4f7fc;
    --card: #ffffff;
    --sidebar-bg: #0b1730;

    /* 圆角 */
    --radius-xl: 18px;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 7px;

    /* 阴影 */
    --e1: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(30, 58, 138, .05);
    --e2: 0 2px 8px rgba(15, 23, 42, .07), 0 16px 36px rgba(30, 58, 138, .10);
    --e3: 0 24px 64px rgba(15, 23, 42, .22);
    --shadow: var(--e1);
    --shadow-lg: var(--e3);
    --ring: 0 0 0 3px rgba(37, 99, 235, .18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(1100px 480px at 10% -10%, rgba(37, 99, 235, .07), transparent 60%),
        radial-gradient(900px 440px at 100% 0%, rgba(14, 116, 144, .06), transparent 55%),
        var(--bg);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
}

::selection {
    background: rgba(37, 99, 235, .18);
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* 细滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: content-box;
}

/* ---------------- 通用控件 ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
    transition: background .16s ease, border-color .16s ease,
        color .16s ease, box-shadow .16s ease, transform .16s ease;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.btn-primary {
    background: var(--gradient-btn);
    color: #fff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, .35), 0 6px 16px rgba(37, 99, 235, .22);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #4a80f7 0%, #1d4ed8 100%);
    box-shadow: 0 2px 6px rgba(37, 99, 235, .4), 0 10px 22px rgba(37, 99, 235, .26);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-color: rgba(37, 99, 235, .14);
}

.btn-ghost:hover {
    background: var(--brand-soft-2);
    border-color: rgba(37, 99, 235, .3);
}

.btn-plain {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--text-sub);
}

.btn-plain:hover {
    border-color: var(--brand);
    color: var(--brand);
    box-shadow: var(--e1);
}

.btn-danger-ghost {
    background: var(--danger-soft);
    color: #c62a30;
    border-color: rgba(229, 72, 77, .16);
}

.btn-danger-ghost:hover {
    background: #fde2e3;
    border-color: rgba(229, 72, 77, .32);
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: var(--radius-xs);
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
}

.field .req {
    color: var(--danger);
    margin-left: 2px;
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 9px 13px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .16s, box-shadow .16s;
}

.input::placeholder,
.textarea::placeholder {
    color: #b6c0d0;
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: #c3cddf;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.textarea {
    resize: vertical;
    min-height: 78px;
    line-height: 1.7;
}

.hint {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------------- 登录页 ---------------- */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(900px 520px at 8% 0%, rgba(255, 255, 255, .16), transparent 60%),
        radial-gradient(760px 520px at 100% 100%, rgba(14, 116, 144, .5), transparent 62%),
        var(--gradient);
}

.login-card {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 500px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(8, 30, 70, .42);
}

.login-brand {
    position: relative;
    flex: 0 0 46%;
    padding: 44px 40px;
    color: #fff;
    background: var(--gradient);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 78% 12%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 78% 12%, #000 0%, transparent 72%);
    pointer-events: none;
}

.login-brand::before {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 68%);
    pointer-events: none;
}

.login-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .6px;
}

.login-logo .mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .26);
    backdrop-filter: blur(4px);
}

.login-brand h1 {
    position: relative;
    z-index: 1;
    font-size: 28px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -.4px;
}

.login-brand p {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .84);
    max-width: 290px;
}

.login-points {
    position: relative;
    z-index: 1;
    list-style: none;
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.login-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, .92);
}

.login-points svg {
    flex: 0 0 auto;
    padding: 3px;
    box-sizing: content-box;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
}

.login-brand .foot {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, .62);
}

.login-form {
    flex: 1;
    padding: 54px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form h2 {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.3px;
    margin-bottom: 6px;
}

.login-form .sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 28px;
}

.login-form .input {
    height: 46px;
    padding: 0 15px;
}

.login-form .btn-primary {
    height: 46px;
    margin-top: 10px;
    font-size: 15px;
    letter-spacing: 2px;
    border-radius: var(--radius-sm);
}

.login-error {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 11px 13px;
    background: var(--danger-soft);
    color: #c62a30;
    border: 1px solid rgba(229, 72, 77, .18);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.login-error.show {
    display: flex;
}

/* 登录卡片底部的正能量小语（随机轮播） */
.login-motto {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 12px 15px;
    background: var(--brand-soft);
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: var(--radius-sm);
    min-height: 44px;
    box-sizing: border-box;
}

.login-motto-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #16a34a;
}

.login-motto-text {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--brand-ink);
    transition: opacity .26s ease, transform .26s ease;
}

.login-motto-text.is-fade {
    opacity: 0;
    transform: translateY(4px);
}

@media (max-width: 720px) {
    .login-brand {
        display: none;
    }

    .login-card {
        min-height: 0;
        max-width: 420px;
    }

    .login-form {
        padding: 40px 28px;
    }
}

/* ---------------- 主控台布局 ---------------- */

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 244px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #b8c4da;
    background: linear-gradient(180deg, #0b1730 0%, #0d1c39 55%, #0a1a33 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(440px 280px at 90% -8%, rgba(37, 99, 235, .45), transparent 62%);
    pointer-events: none;
}

.sidebar .brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 20px 20px 18px;
    color: #fff;
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: .3px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sidebar .brand .mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .45);
}

.nav {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 12px 12px 16px;
    overflow-y: auto;
}

.nav-group {
    padding: 14px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: #5f7091;
}

.nav-group:first-child {
    padding-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    margin-bottom: 3px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: #b8c4da;
    transition: background .16s, color .16s, box-shadow .16s;
}

.nav-item svg {
    flex: 0 0 auto;
    opacity: .8;
    transition: opacity .16s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.nav-item:hover svg {
    opacity: 1;
}

.nav-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 58%, #1d4ed8 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .42);
}

.nav-item.active svg {
    opacity: 1;
}

.sidebar .side-foot {
    position: relative;
    z-index: 1;
    padding: 14px 20px;
    font-size: 11.5px;
    letter-spacing: .4px;
    color: #5f7091;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 68px;
    padding: 11px 28px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg,
            rgba(37, 99, 235, .5) 0%,
            rgba(14, 116, 144, .3) 38%,
            transparent 72%);
    pointer-events: none;
}

.topbar .page-title {
    position: relative;
    padding-left: 14px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.2px;
}

.topbar .page-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    border-radius: 999px;
    background: var(--gradient);
}

.topbar .page-title small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-muted);
}

.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--e1);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .32);
}

.user-chip .name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.user-chip .role {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.content {
    flex: 1;
    padding: 26px 28px 48px;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: viewIn .22s ease both;
}

@keyframes viewIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

/* ---------------- 卡片 / 工具条 ---------------- */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--e1);
    overflow: hidden;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 15px 18px;
    background: linear-gradient(180deg, #fdfeff 0%, #fafbff 100%);
    border-bottom: 1px solid var(--line-soft);
}

.toolbar .tools-left,
.toolbar .tools-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    min-width: 250px;
    transition: border-color .16s, box-shadow .16s;
}

.search svg {
    flex: 0 0 auto;
    color: var(--text-muted);
}

.search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
}

.search input::placeholder {
    color: #b6c0d0;
}

.search:focus-within {
    border-color: var(--brand);
    box-shadow: var(--ring);
}

/* ---------------- 表格 ---------------- */

.table-wrap {
    overflow-x: auto;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

table.data th {
    text-align: left;
    padding: 12px 18px;
    background: #f7f9fd;
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}

table.data td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}

table.data tbody tr {
    transition: background .14s;
}

table.data tbody tr:hover {
    background: #f8fbff;
}

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

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

.row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cell-strong {
    font-weight: 600;
    color: var(--text);
}

.cell-muted {
    color: var(--text-muted);
}

.cell-code {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--radius-xs);
    background: var(--brand-soft);
    color: var(--brand-ink);
    border: 1px solid rgba(37, 99, 235, .14);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .6px;
}

.cell-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.tag-admin {
    background: #eef2ff;
    color: #4338ca;
}

.tag-user {
    background: #f1f5f9;
    color: #475569;
}

.tag-on {
    background: var(--success-soft);
    color: #047857;
}

.tag-off {
    background: var(--danger-soft);
    color: #b91c1c;
}

.ellipsis {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}


/* ---------------- 空状态 / 加载 ---------------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 64px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.empty svg {
    padding: 15px;
    box-sizing: content-box;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 10px;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 56px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border: 3px solid var(--brand-soft-2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------------- 弹窗 ---------------- */

.modal-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(11, 23, 48, .52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 24px;
    overflow-y: auto;
}

.modal-mask.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal {
    width: 100%;
    max-width: 560px;
    margin: auto;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--e3);
    animation: pop .2s cubic-bezier(.2, .9, .3, 1.1);
}

.modal.modal-lg {
    max-width: 720px;
}

@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #fdfeff 0%, #fafbff 100%);
}

.modal-head h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.1px;
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--text-muted);
    transition: background .16s, color .16s;
}

.modal-close:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.modal-body {
    padding: 22px;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--line-soft);
    background: #fcfdff;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.form-grid .span2 {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------- 轻提示 ---------------- */

.toast-wrap {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}

.toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 18px 12px 20px;
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--e2);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
    animation: drop .22s ease;
}

.toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
}

.toast.ok {
    color: #047857;
}

.toast.ok::before {
    background: var(--success);
}

.toast.err {
    color: #b91c1c;
}

.toast.err::before {
    background: var(--danger);
}

@keyframes drop {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
}

/* ---------------- 规则说明文档 ---------------- */

.doc {
    padding: 28px 32px 36px;
    max-width: 960px;
}

.doc-lead {
    padding: 16px 18px;
    margin-bottom: 28px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #f5f9ff 0%, var(--brand-soft) 100%);
    border: 1px solid rgba(37, 99, 235, .14);
    border-left: 4px solid var(--brand);
    font-size: 13px;
    color: var(--brand-ink);
    line-height: 1.85;
}

.doc-section {
    margin-bottom: 34px;
}

.doc-section:last-child {
    margin-bottom: 0;
}

.doc-section > h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.1px;
    color: var(--text);
    margin-bottom: 15px;
    padding-left: 12px;
    border-left: 4px solid var(--brand);
    line-height: 1.2;
}

.doc-section > h2 .idx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: var(--radius-xs);
    background: var(--gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.doc p {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.95;
    margin-bottom: 10px;
}

.doc h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 8px;
}

.doc code {
    padding: 1.5px 6px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid var(--line);
    color: #0f766e;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12.5px;
}

/* 流程条 */
.flow {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0 18px;
}

.flow-node {
    flex: 1 1 150px;
    min-width: 130px;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    background: #fafbff;
    border: 1px solid var(--line);
    text-align: center;
    transition: border-color .16s, box-shadow .16s;
}

.flow-node:hover {
    border-color: rgba(37, 99, 235, .3);
    box-shadow: var(--e1);
}

.flow-node .t {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-dark);
}

.flow-node .d {
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.flow-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 15px;
    padding: 0 1px;
}

/* 公式块 */
.formula {
    padding: 13px 17px;
    margin: 8px 0 16px;
    border-radius: var(--radius-sm);
    background: var(--sidebar-bg);
    color: #e2e8f0;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.95;
    overflow-x: auto;
    white-space: pre;
    border: 1px solid rgba(255, 255, 255, .06);
}

.formula .k {
    color: #7dd3fc;
}

.formula .c {
    color: #94a3b8;
}

/* 列表 */
.doc ul {
    margin: 6px 0 14px;
    padding-left: 20px;
}

.doc li {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.95;
}

.doc li b {
    color: var(--text);
}

/* 表格补充 */
.doc .table-wrap {
    margin: 8px 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.doc table.data th,
.doc table.data td {
    padding: 10px 14px;
}

/* 提示条 */
.callout {
    display: flex;
    gap: 10px;
    padding: 12px 15px;
    margin: 12px 0 16px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.8;
    border: 1px solid transparent;
}

.callout svg {
    flex: 0 0 auto;
    margin-top: 2px;
}

.callout.info {
    background: var(--brand-soft);
    border-color: rgba(37, 99, 235, .16);
    color: var(--brand-ink);
}

.callout.warn {
    background: var(--warn-soft);
    border-color: rgba(217, 119, 6, .2);
    color: #92400e;
}

.callout.danger {
    background: var(--danger-soft);
    border-color: rgba(229, 72, 77, .18);
    color: #b91c1c;
}

.callout b {
    font-weight: 700;
}

/* 示例卡 */
.example {
    padding: 16px 18px;
    margin: 10px 0 4px;
    border-radius: var(--radius);
    background: #fafbff;
    border: 1px dashed #c7d2fe;
}

.example .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}

.example .row:last-of-type {
    border-bottom: none;
}

.example .dim {
    color: var(--text-sub);
}

.example .val {
    font-weight: 600;
    color: var(--text);
}

.example .val em {
    font-style: normal;
    color: var(--brand);
}

.example .result {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--text-sub);
}

.example .result b {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-xs);
    background: var(--gradient);
    color: #fff;
    font-size: 13px;
    letter-spacing: 1px;
}

@media (max-width: 860px) {
    .doc {
        padding: 20px 16px 26px;
    }

    .flow-arrow {
        display: none;
    }
}

/* ---------------- 测评结果详情 ---------------- */

.rd-hero {
    padding: 24px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    background: var(--gradient);
    color: #fff;
    text-align: center;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .28);
}

.rd-hero .rd-code {
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.rd-hero .rd-name {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.rd-hero .rd-tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, .9);
}

.rd-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.rd-chip {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    border: 1px solid rgba(37, 99, 235, .14);
    color: var(--brand-ink);
    font-size: 12px;
    font-weight: 600;
}

.rd-hero .rd-chip {
    margin: 0;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
}

/* 双极命名条（报告详情：管理理念 / 优势才干） */

.pole-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pole-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sub);
    background: #f4f6fb;
    border: 1px solid var(--line-soft);
}

.pole-chip.on {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-color: transparent;
}

.pole-chip.right.on {
    background: linear-gradient(135deg, #0e7490, #0891b2);
}

.pole-sep {
    font-size: 12px;
    color: var(--text-muted);
}

/* 子维度极名编辑弹窗 */

.dim-lead {
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--text-sub);
    background: var(--brand-soft);
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 14px;
}

.dim-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dim-row {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: #fafbff;
    border: 1px solid var(--line-soft);
}

.dim-row-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 9px;
}

.dim-row-code {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-ink);
    background: var(--brand-soft);
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 999px;
    padding: 1px 8px;
}

.dim-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dim-input {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.dim-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.dim-arrow {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.rd-block {
    margin-bottom: 20px;
}

.rd-block:last-child {
    margin-bottom: 0;
}

.rd-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 3px solid var(--brand);
}

.rd-text {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.95;
}

.rd-group {
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    background: #fafbff;
    border: 1px solid var(--line-soft);
}

.rd-group:last-child {
    margin-bottom: 0;
}

.rd-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 6px;
}

.rd-li {
    font-size: 12.5px;
    color: var(--text-sub);
    line-height: 1.95;
}

/* ---------------- 题库管理 ---------------- */

/* 题库视图占满可视区高度: 左栏固定, 右栏题目独立滚动 */
#view-bank.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 142px);
    min-height: 460px;
}

.bank-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.bank-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--e1);
    overflow: hidden;
}

.bank-side-head {
    flex: 0 0 auto;
    padding: 15px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .8px;
    color: #64748b;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #fdfeff 0%, #fafbff 100%);
}

.bank-sections {
    flex: 1;
    min-height: 0;
    padding: 8px;
    overflow-y: auto;
}

.bank-module {
    padding: 14px 10px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--text-muted);
}

.bank-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: background .15s, border-color .15s;
}

.bank-item:hover {
    background: #f7faff;
}

.bank-item.active {
    background: var(--brand-soft);
    border-color: rgba(37, 99, 235, .32);
}

.bank-item .bi-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.bank-item.active .bi-name {
    color: var(--brand-dark);
}

.bank-item .bi-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.bank-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.bank-main .toolbar {
    flex: 0 0 auto;
}

/* 仅右侧题目区独立滚动, 表头吸顶 */
.bank-main .table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.bank-main table.data th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.bank-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bank-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.1px;
    color: var(--text);
}

.bank-sub {
    font-size: 12.5px;
    color: var(--text-muted);
}

table.data th.col-no,
table.data td.col-no {
    width: 64px;
    white-space: nowrap;
}

/* 词语分组 */
.wb-group {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin: 14px 16px;
    overflow: hidden;
    transition: border-color .16s, box-shadow .16s;
}

.wb-group:hover {
    border-color: rgba(37, 99, 235, .24);
    box-shadow: var(--e1);
}

.wb-group:last-child {
    margin-bottom: 16px;
}

.wb-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: linear-gradient(180deg, #fdfeff 0%, #fafbff 100%);
    border-bottom: 1px solid var(--line-soft);
}

.wb-group-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.wb-group-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wb-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.wb-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
}

.wb-word {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    border: 1px solid rgba(37, 99, 235, .18);
}

.wb-word b {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-ink);
}

.wb-word-act {
    font-style: normal;
    font-size: 12px;
    color: var(--brand);
    cursor: pointer;
    opacity: .7;
    transition: opacity .15s;
}

.wb-word-act:hover {
    opacity: 1;
    text-decoration: underline;
}

.wb-word-act.del {
    color: var(--danger);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
    .bank-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .sidebar {
        flex-basis: 68px;
    }

    .sidebar .brand {
        justify-content: center;
        padding: 18px 0;
    }

    .sidebar .brand .brand-text,
    .nav-item span,
    .nav-group,
    .sidebar .side-foot {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 12px 0;
    }

    .content {
        padding: 18px 14px 36px;
    }

    .topbar {
        padding: 10px 14px;
    }

    .user-chip .name,
    .user-chip .role {
        display: none;
    }

    .user-chip {
        padding: 5px;
    }

    .bank-layout {
        grid-template-columns: 1fr;
    }

    /* 窄屏改为纵向堆叠, 恢复自然流式滚动 */
    #view-bank.active {
        display: block;
        height: auto;
        min-height: 0;
    }

    .bank-side {
        display: block;
    }

    .bank-sections {
        max-height: 260px;
    }

    .bank-main {
        display: block;
    }

    .bank-main .table-wrap {
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
/* ===== 系统设置 ===== */
.sec-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 14px;
}

.cfg-group+.cfg-group {
    margin-top: 22px;
}

.cfg-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--text-muted);
}

.cfg-group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line-soft);
}

.cfg-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.cfg-body {
    padding: 18px 22px 22px;
}

/* 配置项沿用全站 .field 结构：标签在上、控件在下、说明与键名在下方换行展示 */
.cfg-field label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cfg-field.is-modified .input,
.cfg-field.is-modified .select {
    border-color: #fcd34d;
    background: #fffdf6;
}

.cfg-hint {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.cfg-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 9px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.cfg-meta code {
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--line-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.cfg-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    color: #b45309;
    background: #fef3c7;
}

.cfg-reset {
    margin-left: auto;
    border: none;
    background: none;
    padding: 0;
    font-size: 11.5px;
    color: var(--brand);
    cursor: pointer;
}

.cfg-reset:hover {
    text-decoration: underline;
}

.cfg-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    color: var(--text-sub);
    cursor: pointer;
    transition: border-color .16s, box-shadow .16s;
}

.cfg-switch:hover {
    border-color: #c3cddf;
}

.cfg-switch input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

@media (max-width: 640px) {
    .cfg-body {
        padding: 16px;
    }

    .cfg-reset {
        margin-left: 0;
    }
}

/* ===== 维度管理 ===== */
.dim-group-row td {
    background: var(--line-soft);
    padding: 12px 14px;
    border-top: 1px solid var(--line);
}

.dim-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dim-module {
    font-size: 12px;
    color: var(--text-muted);
}

.dim-section {
    font-size: 13.5px;
    font-weight: 600;
}

.dim-type {
    padding: 1px 7px;
    border-radius: 4px;
    background: var(--line);
    color: var(--text-muted);
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.dim-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.dim-note {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.dim-warn {
    color: #b45309;
}

table.data th.col-count,
table.data td.col-count {
    width: 82px;
    text-align: center;
}

.dim-ok {
    color: #047857;
}

.dim-pole {
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(37, 99, 235, .1);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
}

.dim-pole-off {
    background: var(--line);
    color: var(--text-muted);
    font-weight: 500;
}

.btn-link {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

.btn-link:hover {
    background: rgba(37, 99, 235, .08);
}

.tag-info {
    background: rgba(37, 99, 235, .1);
    color: #1d4ed8;
}

.tag-mute {
    background: var(--line);
    color: var(--text-muted);
}

.tag-warn {
    background: rgba(245, 158, 11, .16);
    color: #b45309;
}

/* 维度来源图例 */
.dim-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 20px;
    padding: 10px 16px 12px;
    border-bottom: 1px solid var(--line);
}

.dim-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.dim-legend-item code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--line-soft);
    font-size: 11.5px;
}

/* 模版原文 vs AI 文案 对比 */
.cmp-wrap {
    overflow-x: auto;
}

.cmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cmp-table th,
.cmp-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
}

.cmp-table thead th {
    background: var(--line-soft);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    position: sticky;
    top: 0;
}

.cmp-table td.cmp-field,
.cmp-table th.cmp-field {
    width: 108px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text);
    background: var(--line-soft);
}

.cmp-table tbody tr:nth-child(even) td:not(.cmp-field) {
    background: rgba(0, 0, 0, .012);
}

.cmp-table tr.cmp-diff td:not(.cmp-field) {
    background: rgba(37, 99, 235, .05);
}

.cmp-flag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(37, 99, 235, .12);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
}

.cmp-list {
    margin: 0;
    padding-left: 18px;
}

.cmp-list li {
    margin-bottom: 2px;
}

.cmp-tip {
    margin-right: auto;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------------- AI 分析等待遮罩 ---------------- */

.ai-wait {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(11, 23, 48, .46);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.ai-wait.show {
    display: flex;
}

.ai-wait-card {
    width: 100%;
    max-width: 340px;
    padding: 34px 26px 26px;
    text-align: center;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--e3);
    animation: pop .22s cubic-bezier(.2, .9, .3, 1.1);
}

.ai-wait-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 4px solid var(--brand-soft-2);
    border-top-color: var(--brand);
    animation: spin .8s linear infinite;
}

.ai-wait-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.ai-wait-hint {
    margin-top: 8px;
    min-height: 19px;
    font-size: 13px;
    color: var(--text-muted);
    animation: aiHintIn .35s ease;
}

.ai-wait-time {
    margin-top: 14px;
    font-size: 12px;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}

@keyframes aiHintIn {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
}

/* ---------------- 移动端浏览器兼容 ---------------- */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 720px) {

    /* 手机上弹窗铺满可用宽度，避免左右留白过多 */
    .modal-mask {
        padding: 12px;
    }

    .modal {
        max-width: 100%;
    }

    /* 触屏滚动更顺滑 */
    .modal-mask,
    .cmp-wrap,
    .table-wrap {
        -webkit-overflow-scrolling: touch;
    }

    /* 内容区在手机上适当收边 */
    .content {
        padding: 14px 12px 32px;
    }
}

/* ---------------- 注册二维码弹窗 ---------------- */

.invite-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.invite-form .field {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.invite-form .input {
    height: 40px;
}

.invite-form .btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 18px;
}

.invite-hint {
    margin: 8px 0 2px;
}

.invite-qr {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--brand-soft);
}

.invite-qr img {
    width: 156px;
    height: 156px;
    flex-shrink: 0;
    padding: 6px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--e1);
}

.invite-qr-side {
    min-width: 0;
}

.invite-qr-title {
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--text);
}

.invite-link {
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--brand);
    word-break: break-all;
}

.invite-qr-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* 「实时 · hh:mm:ss 更新」——让自动刷新这件事看得见 */
.invite-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: #0f766e;
    background: rgba(16, 185, 129, .12);
    white-space: nowrap;
}

.invite-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.invite-qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.invite-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 10px;
    font-weight: 700;
    color: var(--text);
}

.invite-list-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.invite-list-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

.invite-list-more {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.invite-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invite-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s, background .15s;
}

.invite-item:hover {
    border-color: var(--brand-soft-2);
    background: #fbfdff;
}

.invite-item-main {
    min-width: 0;
}

.invite-item-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.invite-token {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .6px;
    color: var(--text);
}

.invite-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.invite-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.invite-item-actions .btn {
    white-space: nowrap;
}

.cell-tag {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .invite-form {
        flex-direction: column;
        align-items: stretch;
    }

    .invite-form .btn {
        width: 100%;
    }

    .invite-qr {
        flex-direction: column;
        text-align: center;
    }

    .invite-item {
        flex-direction: column;
        align-items: stretch;
    }

    .invite-item-actions {
        justify-content: flex-end;
    }
}

/* 用户备注：弹窗内文本域 + 列表里的省略展示 */
.textarea {
    height: auto;
    min-height: 72px;
    padding: 10px 12px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.cell-remark {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
}

/* 测评结果：从用户管理点「查看报告」带过来的筛选标签 */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #1d4ed8;
    background: rgba(37, 99, 235, .10);
    border: 1px solid rgba(37, 99, 235, .22);
    white-space: nowrap;
}

.filter-chip button {
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(37, 99, 235, .14);
    color: #1d4ed8;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.filter-chip button:hover {
    background: rgba(37, 99, 235, .28);
}
