/* Lite 控制台 · 深色玻璃拟态设计系统
   所有页面（官网 / 管理后台 / 用户后台）共用这一份样式。 */

:root {
    color-scheme: light;
    --bg: #f4f6fb;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #f7f9fd;
    --surface-3: #eef2f9;
    --line: rgba(15, 23, 42, 0.08);
    --line-strong: rgba(15, 23, 42, 0.16);
    --text: #0f172a;
    --muted: #5b6478;
    --faint: #8b93a7;
    --accent: #6d4df6;
    --accent-2: #0ea5b7;
    --accent-soft: rgba(109, 77, 246, 0.12);
    --success: #0f9f6e;
    --danger: #d92d4b;
    --warn: #b45309;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
    --mono: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -2;
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
}

body::before {
    width: 780px;
    height: 780px;
    top: -360px;
    left: -220px;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.16), transparent 65%);
}

body::after {
    width: 720px;
    height: 720px;
    bottom: -380px;
    right: -220px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 65%);
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: rgba(124, 92, 255, 0.4);
}

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

::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
}

/* ── 品牌 / 图标 ── */
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 30px rgba(124, 92, 255, 0.16);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-size: 15px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text b {
    font-size: 16px;
    letter-spacing: 0.12em;
}

.brand-text span {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ── 外壳：侧栏 + 主区域 ── */
.shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.012));
    border-right: 1px solid var(--line);
    backdrop-filter: blur(22px);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 2px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-label {
    padding: 0 12px;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faint);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted);
    border: 1px solid transparent;
    transition: 0.18s ease;
    background: transparent;
    text-align: left;
    width: 100%;
}

.nav-item svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    opacity: 0.9;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(15, 23, 42, 0.040);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(100deg, rgba(124, 92, 255, 0.28), rgba(34, 211, 238, 0.1));
    border-color: rgba(124, 92, 255, 0.35);
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.07);
}

.sidebar-foot {
    margin-top: auto;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 12px;
    color: var(--muted);
}

.sidebar-foot b {
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.topbar-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.topbar-title h1 {
    font-size: 18px;
    line-height: 1.2;
    margin: 0;
    letter-spacing: 0.01em;
}

.topbar-title span {
    font-size: 12px;
    color: var(--muted);
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.content {
    padding: 26px 28px 44px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.view {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.view.active {
    display: flex;
    animation: view-in 0.28s ease;
}

@keyframes view-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ── 卡片 / 网格 ── */
.card {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.02));
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
}

.card-head .sub {
    font-size: 12px;
    color: var(--muted);
}

.card-head .spacer {
    margin-left: auto;
}

.card-body {
    padding: 20px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.main-aside {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
}

/* ── 统计卡 ── */
.stat {
    position: relative;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(150deg, rgba(15, 23, 42, 0.064), rgba(15, 23, 42, 0.02));
    overflow: hidden;
}

.stat::after {
    content: "";
    position: absolute;
    inset: auto -30% -60% auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 70%);
    pointer-events: none;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.stat-value {
    margin-top: 8px;
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--faint);
}

.stat.hot {
    border-color: rgba(124, 92, 255, 0.16);
    background: linear-gradient(150deg, rgba(124, 92, 255, 0.22), rgba(34, 211, 238, 0.05));
}

/* ── 按钮 / 表单 ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: 0.16s ease;
}

.btn:hover {
    background: var(--surface-2);
    border-color: rgba(15, 23, 42, 0.16);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    border: none;
    background: linear-gradient(120deg, var(--accent), #5b8cff 60%, var(--accent-2));
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(92, 110, 255, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-danger {
    border-color: rgba(251, 113, 133, 0.4);
    background: rgba(251, 113, 133, 0.12);
    color: #b91c1c;
}

.btn-ghost {
    background: transparent;
}

.btn-sm {
    height: 30px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 12px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
}

.icon-btn:hover {
    color: var(--text);
    background: var(--surface-2);
}

.input,
.select,
.textarea {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
    outline: none;
    transition: 0.16s ease;
}

.textarea {
    height: auto;
    min-height: 110px;
    padding: 11px 12px;
    resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--faint);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: rgba(124, 92, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}

.select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 32px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.label {
    font-size: 12px;
    color: var(--muted);
}

.hint {
    font-size: 12px;
    color: var(--faint);
}

.error {
    color: var(--danger);
    font-size: 12px;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.toolbar .input {
    width: 220px;
}

.toolbar .select {
    width: 140px;
}

.toolbar .spacer {
    margin-left: auto;
}

/* ── 标签 / 状态 ── */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.chip.vip {
    color: #92400e;
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.12);
}

.chip.role-admin {
    color: #4338ca;
    border-color: rgba(124, 92, 255, 0.16);
    background: rgba(124, 92, 255, 0.16);
}

.chip.role-agent {
    color: #0e7490;
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.1);
}

.state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--faint);
}

.state.active {
    color: var(--success);
}

.state.active::before {
    background: var(--success);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
}

.state.banned {
    color: var(--danger);
}

.state.banned::before {
    background: var(--danger);
}

.online {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--faint);
}

.online::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--faint);
}

.online.is-on {
    color: var(--success);
}

.online.is-on::before {
    background: var(--success);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.9);
}

/* ── 表格 ── */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

table.data th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

table.data td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.03);
    vertical-align: middle;
    color: #334155;
}

table.data tr:hover td {
    background: rgba(15, 23, 42, 0.02);
}

table.data td.mono,
.mono {
    font-family: var(--mono);
    font-size: 12px;
}

table.data td.actions {
    text-align: right;
    white-space: nowrap;
}

.empty {
    padding: 34px 16px !important;
    text-align: center;
    color: var(--faint);
}

.pager {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 20px;
    color: var(--muted);
    font-size: 12px;
}

.pager .btn {
    height: 30px;
    padding: 0 11px;
}

/* ── 弹窗 ── */
.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 4, 10, 0.68);
    backdrop-filter: blur(8px);
    animation: fade-in 0.18s ease;
}

.modal {
    width: min(560px, 100%);
    max-height: min(84vh, 820px);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(160deg, rgba(22, 28, 46, 0.98), rgba(9, 13, 24, 0.98));
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: pop-in 0.2s ease;
}

.modal.wide {
    width: min(860px, 100%);
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.modal-head h3 {
    margin: 0;
    font-size: 16px;
}

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.02);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
}

/* ── 提示 ── */
.toast-stack {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 44px));
}

.toast {
    padding: 13px 16px;
    border-radius: 13px;
    border: 1px solid var(--line-strong);
    background: rgba(18, 24, 40, 0.96);
    box-shadow: var(--shadow);
    font-size: 13px;
    animation: toast-in 0.2s ease;
}

.toast.ok {
    border-color: rgba(52, 211, 153, 0.4);
}

.toast.err {
    border-color: rgba(251, 113, 133, 0.5);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* ── 登录页 ── */
.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-card {
    width: min(430px, 100%);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.02));
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(26px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-brand h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.login-brand p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.login-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
}

/* ── 开关 ── */
.switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
}

.switch input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    border: 1px solid var(--line-strong);
    transition: 0.18s ease;
}

.switch span::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: 0.18s ease;
}

.switch input:checked + span {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    border-color: transparent;
}

.switch input:checked + span::after {
    transform: translateX(20px);
}

/* ── 设备 / 日志 / 壁纸 ── */
.device-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.device-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.028);
}

.device-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(124, 92, 255, 0.16);
    color: #4f46e5;
    flex: 0 0 38px;
}

.device-info {
    min-width: 0;
    flex: 1;
}

.device-info b {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-info span {
    font-size: 12px;
    color: var(--muted);
}

.log-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
}

.log-content {
    margin: 0;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(2, 4, 10, 0.55);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    color: #334155;
    max-height: 420px;
    overflow: auto;
}

.log-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.024);
    cursor: pointer;
    transition: 0.15s ease;
}

.log-row:hover {
    background: rgba(15, 23, 42, 0.035);
}

.log-row .log-text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    word-break: break-word;
}

.log-row .log-time {
    font-size: 11px;
    color: var(--faint);
    white-space: nowrap;
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.wallpaper-card {
    position: relative;
    aspect-ratio: 9 / 13;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.032);
}

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

.wallpaper-card.is-current {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.4);
}

.wallpaper-actions {
    position: absolute;
    inset: auto 8px 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: 0.15s ease;
}

.wallpaper-card:hover .wallpaper-actions {
    opacity: 1;
}

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 130px;
    padding: 18px;
    border-radius: 14px;
    border: 1px dashed var(--line-strong);
    background: rgba(15, 23, 42, 0.02);
    text-align: center;
    cursor: pointer;
    transition: 0.16s ease;
}

.upload-box:hover {
    border-color: var(--accent);
    background: rgba(124, 92, 255, 0.07);
}

.upload-box svg {
    width: 28px;
    height: 28px;
    color: var(--muted);
}

/* ── 官网 ── */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px clamp(20px, 5vw, 64px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
}

.landing-nav .links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
}

.landing-nav .links a:hover {
    color: var(--text);
}

.hero {
    padding: clamp(48px, 9vw, 110px) clamp(20px, 5vw, 64px) 40px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
    align-items: center;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: 12px;
    color: var(--muted);
    width: fit-content;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.hero h1 .grad {
    background: linear-gradient(110deg, #4338ca, #0891b2 60%, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    margin: 0;
    max-width: 560px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-panel {
    position: relative;
    min-height: 320px;
    border-radius: 26px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.016));
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(24px);
    overflow: hidden;
    padding: 22px;
}

.hero-panel::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    top: -130px;
    right: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.55), transparent 70%);
}

.mini-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
    font-size: 12px;
    color: var(--muted);
}

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

.mini-row b {
    color: var(--text);
    font-size: 13px;
}

.section {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 34px clamp(20px, 5vw, 64px) 56px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.02em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

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

.feature {
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.035), rgba(15, 23, 42, 0.014));
    backdrop-filter: blur(16px);
    transition: 0.18s ease;
}

.feature:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 92, 255, 0.35);
}

.feature h3 {
    margin: 14px 0 8px;
    font-size: 15px;
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(124, 92, 255, 0.16);
    color: #4f46e5;
}

.landing-foot {
    margin-top: auto;
    padding: 26px clamp(20px, 5vw, 64px);
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 12px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* ── 响应式 ── */
@media (max-width: 1100px) {
    .grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.main-aside,
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        padding: 12px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar-brand {
        flex: 0 0 auto;
    }

    .nav-group {
        flex-direction: row;
        gap: 6px;
    }

    .nav-label,
    .sidebar-foot {
        display: none;
    }

    .nav-item {
        width: auto;
        white-space: nowrap;
        padding: 8px 11px;
    }

    .nav-item svg {
        display: none;
    }

    .topbar {
        padding: 14px 18px;
    }

    .content {
        padding: 18px;
    }

    .grid.cols-2,
    .grid.cols-3,
    .grid.cols-4,
    .feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .toolbar .input,
    .toolbar .select {
        width: 100%;
    }

    .toolbar .spacer {
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .topbar {
        flex-wrap: wrap;
    }

    .topbar-actions {
        width: 100%;
    }

    .modal {
        border-radius: 16px;
    }

    .login-card {
        padding: 24px;
    }
}


/* ══════════════ 亮色功能补丁（验证码 / 操作列 / 审计 / 封禁） ══════════════ */

.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row .input { flex: 1 1 auto; }
.captcha-img {
    width: 120px; height: 40px; border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    cursor: pointer; background: #f3f4f8; object-fit: cover;
}

table.data th:last-child,
table.data td.actions {
    width: 120px; min-width: 120px; text-align: center !important; white-space: nowrap;
}
table.data td.actions .cell-actions {
    display: flex; justify-content: center; align-items: center; gap: 6px; width: 100%;
}
table.data td.actions .btn-sm { min-width: 74px; justify-content: center; }

.log-alert-row td { color: #d92d4b !important; font-weight: 600; }
.log-alert-row { background: rgba(217, 45, 75, 0.05) !important; }

.ban-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.ban-box .ban-select { width: 110px; }
.ban-box .ban-reason { flex: 1 1 160px; min-width: 140px; }

.sig-preview {
    background: #ffffff !important; border: 1px solid rgba(15, 23, 42, 0.10) !important;
    color: #0f172a !important; border-radius: 10px;
}
.sig-preview.is-empty { color: #8b93a7 !important; }

.upload-zone { background: #ffffff !important; border: 1px dashed rgba(15, 23, 42, 0.16) !important; color: #5b6478 !important; }


/* ══════════════════ 亮色收口（卡片 / 输入 / 表格 / 弹窗） ══════════════════ */

.login-card,
.card,
.panel,
.auth-card,
.modal,
.modal-card,
.sheet,
.ticket-item,
.device-card,
.user-card {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
}

.input,
.select,
.textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
textarea {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

.input::placeholder,
.textarea::placeholder,
input::placeholder,
textarea::placeholder {
    color: #98a0b3 !important;
}

.input:focus,
.select:focus,
.textarea:focus,
input:focus,
textarea:focus {
    border-color: rgba(109, 77, 246, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(109, 77, 246, 0.14) !important;
    outline: none !important;
}

table.data thead th {
    background: #f7f9fd !important;
    color: #5b6478 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

table.data tbody tr { background: #ffffff !important; }
table.data tbody tr:hover { background: #f7f9fd !important; }
table.data td { border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important; color: #1f2937 !important; }

.sidebar {
    background: #ffffff !important;
    border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.nav-item { color: #475069 !important; }
.nav-item.active,
.nav-item:hover { background: rgba(109, 77, 246, 0.10) !important; color: #4f46e5 !important; }

.toast { background: #ffffff !important; color: #0f172a !important; border: 1px solid rgba(15, 23, 42, 0.1) !important; }

.btn-ghost { background: #ffffff !important; border: 1px solid rgba(15, 23, 42, 0.12) !important; color: #374151 !important; }


/* ══════════════════ 记住登录：用原生对勾，不用滑块 ══════════════════ */

/* 登录/注册表单里的开关统一退回成方形复选框 */
.remember-row .switch,
.login-form .switch,
form .remember-row .switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0 !important;
    background: none !important;
    border-radius: 0;
    position: static;
    flex: 0 0 18px;
}

.remember-row .switch > input[type="checkbox"],
.login-form .switch > input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    position: static !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    opacity: 1 !important;
    accent-color: #6d4df6;
    cursor: pointer;
}

/* 隐藏滑块那个圆点/轨道 */
.remember-row .switch > span,
.login-form .switch > span {
    display: none !important;
}

.remember-row {
    gap: 8px;
    color: #475069;
}

.remember-row > span:last-child {
    font-size: 12px;
    line-height: 1.4;
}


/* ══════════════════ 性能兜底（避免长时间停留卡死） ══════════════════ */
body::before,
body::after {
    filter: none !important;
    display: none !important;
}

* {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.card, .login-card, .panel, .modal, .sidebar {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}


/* ══════════════ 液态玻璃 · 光影明暗 · 星屑拖尾 ══════════════ */

.fx-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
}

html.fx-off .fx-canvas { display: none !important; }

/* 光标跟随的光斑：整页一层暖白 + 品牌紫晕 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    display: block !important;
    filter: none !important;
    width: auto;
    height: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    background:
        radial-gradient(520px 520px at var(--fx-x, 50%) var(--fx-y, 30%),
            rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 62%),
        radial-gradient(680px 680px at calc(var(--fx-x, 50%) + 120px) calc(var(--fx-y, 30%) + 90px),
            rgba(124, 92, 255, 0.10), rgba(124, 92, 255, 0) 70%);
    mix-blend-mode: normal;
    transition: background 0.12s linear;
}

html.fx-off body::after { display: none !important; }

/* 玻璃卡片：半透明 + 高光边 + 内阴影，跟随光标产生明暗 */
.card,
.login-card,
.panel,
.modal,
.modal-card,
.sidebar,
.device-card,
.user-card,
.ticket-item {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 -18px 40px rgba(124, 92, 255, 0.06) inset,
        0 20px 44px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
}

html.fx-off .card,
html.fx-off .login-card,
html.fx-off .panel,
html.fx-off .modal,
html.fx-off .modal-card,
html.fx-off .sidebar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #ffffff !important;
}

/* 卡片顶部一道细高光，模拟玻璃厚边 */
.card::before,
.login-card::before,
.panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
    pointer-events: none;
}

/* 按钮：带顶部高光的玻璃质感 */
.btn {
    position: relative;
    transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active { transform: translateY(0); filter: brightness(0.98); }

.btn-primary {
    background: linear-gradient(180deg, #7c5cff, #5b3ff0) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 10px 24px rgba(109, 77, 246, 0.28) !important;
}

/* 输入框聚焦时的光晕更明显 */
.input:focus,
.select:focus,
.textarea:focus {
    box-shadow:
        0 0 0 3px rgba(109, 77, 246, 0.16),
        0 0 24px rgba(124, 92, 255, 0.18) !important;
}

/* 侧栏导航选中：玻璃胶囊 */
.nav-item.active {
    background: linear-gradient(180deg, rgba(124, 92, 255, 0.16), rgba(124, 92, 255, 0.08)) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 6px 16px rgba(124, 92, 255, 0.12) !important;
}


/* ══════════════════ 按钮可见性兜底 ══════════════════ */
.btn { color: #24303f; background: #ffffff; }

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(120deg, #6d4df6, #5b8cff 60%, #12a5b7) !important;
    background-image: linear-gradient(120deg, #6d4df6, #5b8cff 60%, #12a5b7) !important;
    color: #ffffff !important;
    border: none !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-danger { color: #b91c1c !important; }

.btn-sm { color: inherit; }


/* ══════════════════ 用户中心：管理员式侧边栏 ══════════════════ */
.portal-shell {
    display: grid !important;
    grid-template-columns: 236px minmax(0, 1fr);
    align-items: start;
    min-height: 100vh;
}

.portal-side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 14px;
    border-right: 1px solid rgba(15, 23, 42, 0.07);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    overflow-y: auto;
}

.portal-side .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 14px;
    text-decoration: none;
}

.portal-side .sidebar-brand .brand-text b { display: block; font-size: 15px; color: #0f172a; }
.portal-side .sidebar-brand .brand-text span { font-size: 11px; color: #8b93a7; letter-spacing: 0.1em; }

.sidebar-label {
    margin: 14px 10px 6px;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #98a0b3;
}

.portal-side .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 11px;
    font-size: 13px;
    color: #475069;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.portal-side .nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; }

.portal-side .nav-item:hover { background: rgba(15, 23, 42, 0.04); color: #0f172a; }

.portal-side .nav-item.active {
    background: rgba(109, 77, 246, 0.10);
    border-color: rgba(109, 77, 246, 0.16);
    color: #4f46e5;
    font-weight: 600;
}

.sidebar-foot {
    margin-top: auto;
    display: grid;
    gap: 2px;
    padding: 12px;
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.035);
    border: 1px solid rgba(15, 23, 42, 0.05);
    font-size: 12px;
    color: #5b6478;
}

.sidebar-foot b { color: #0f172a; font-size: 13px; }
.sidebar-foot span { color: #8b93a7; font-size: 11.5px; word-break: break-all; }

.portal-main { min-width: 0; }

.portal-shell .content { padding: 22px clamp(16px, 3vw, 34px) 48px !important; }

.portal-shell .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
}

@media (max-width: 900px) {
    .portal-shell { grid-template-columns: 1fr !important; }
    .portal-side {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.07);
        padding: 10px 12px;
    }
    .portal-side .sidebar-label,
    .portal-side .sidebar-foot { display: none; }
    .portal-side .sidebar-brand { padding: 0 8px 0 0; }
    .portal-side .nav-item { white-space: nowrap; }
}


/* ══════════════════ 用户中心：单视图切换（一次只显示一页） ══════════════════ */
.portal-main .content > [data-view] { display: none; }
.portal-main .content > [data-view].is-shown { display: block; animation: portalViewIn 0.22s ease both; }

@keyframes portalViewIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 单卡片时网格占满 */
.portal-main .content > .grid.is-single { grid-template-columns: minmax(0, 1fr) !important; }

/* 顶部小标题跟随当前视图 */
.portal-view-title {
    margin: 0 0 14px;
    font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}


/* ══════════════ 单视图-强制（用户中心） ══════════════ */
.portal-shell [data-view] { display: none !important; }
.portal-shell [data-view].is-shown { display: block !important; }
.portal-shell .grid.is-single { grid-template-columns: minmax(0, 1fr) !important; }


/* ══════════════ 上传进度条 ══════════════ */
.progress-wrap { margin-top: 12px; }

/* M3 Expressive wavy：轨道和填充都是同一段正弦波（28px 一个波长，与客户端 WavyProgress 对齐），
   用 SVG data URI 平铺；容器只留出振幅高度，线宽保持细 */
.progress-bar {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' viewBox='0 0 28 8'%3E%3Cpath d='M0 4 Q7 1 14 4 T28 4' fill='none' stroke='%23D9E6FF' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 28px 8px;
}

.progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' viewBox='0 0 28 8'%3E%3Cpath d='M0 4 Q7 1 14 4 T28 4' fill='none' stroke='%232F8BFF' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 28px 8px;
    transition: width 0.18s ease;
}

.progress-text {
    margin: 6px 0 0;
    font-size: 12px;
    color: #5b6478;
    font-variant-numeric: tabular-nums;
}


/* ══════════════ 文件选择器（自定义 UI） ══════════════ */
.file-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border: 1px dashed rgba(15, 23, 42, 0.16);
    border-radius: 12px;
    background: #ffffff;
}

.file-input {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    border-radius: 9px;
    background: linear-gradient(120deg, #6d4df6, #5b8cff 60%, #12a5b7);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 6px 16px rgba(109, 77, 246, 0.22);
    transition: transform 0.14s ease, filter 0.14s ease;
}

.file-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.file-btn:active { transform: translateY(0); filter: brightness(0.97); }

.file-input:focus-visible + .file-btn {
    box-shadow: 0 0 0 3px rgba(109, 77, 246, 0.22), 0 6px 16px rgba(109, 77, 246, 0.22);
}

.file-name {
    font-size: 12.5px;
    color: #8b93a7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.file-name.has-file { color: #334155; }

/* 账号操作菜单：一行一个功能 */
.action-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0 4px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: 100%;
    text-align: left;
    padding: 11px 14px;
    border-radius: 12px;
    line-height: 1.4;
}

.action-item b {
    font-size: 13.6px;
    font-weight: 600;
}

.action-item span {
    font-size: 12.2px;
    color: var(--muted, #8b93a7);
}

/* 权限勾选：一行一个功能 */
.perm-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 4px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13.4px;
    line-height: 1.4;
    cursor: pointer;
}

.perm-item:hover {
    background: var(--surface-2, rgba(0, 0, 0, .035));
}

.perm-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--accent, #6b4ef2);
    flex: 0 0 auto;
}

/* ── 间距放宽：表格、卡片、弹窗文字不再挤在一起 ── */
table.data th {
    padding: 15px 18px;
    line-height: 1.5;
}

table.data td {
    padding: 16px 18px;
    line-height: 1.6;
    font-size: 13.6px;
}

table.data td.actions {
    padding-right: 20px;
}

.card-body {
    padding: 22px 22px 24px;
}

.field {
    gap: 9px;
}

.field + .field {
    margin-top: 14px;
}

.label {
    font-size: 12.4px;
    line-height: 1.5;
}

.hint {
    line-height: 1.7;
}

.form-msg {
    margin-top: 10px;
    line-height: 1.6;
}

/* 弹窗内的操作列表 / 权限列表再松一点 */
.action-list {
    gap: 9px;
    margin: 4px 0 6px;
}

.action-item {
    padding: 13px 16px;
    gap: 5px;
}

.action-item b {
    line-height: 1.45;
}

.action-item span {
    line-height: 1.55;
}

.perm-grid {
    gap: 7px;
    margin: 12px 0 6px;
}

.perm-item {
    padding: 10px 14px;
    font-size: 13.6px;
    line-height: 1.55;
    gap: 11px;
}

/* ── 账号操作弹窗：加宽 + 每条操作独立成行 ── */
.modal-body:has(.action-list),
.modal:has(.action-list) {
    width: min(600px, 100%);
}

.modal:has(.action-list) .modal-body {
    padding: 18px 22px 20px;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    min-height: 58px;
    padding: 14px 18px;
    text-align: left;
    border: 1px solid rgba(15, 23, 42, .07);
    background: #fff;
    border-radius: 14px;
    transition: border-color .15s ease, background .15s ease, transform .12s ease;
}

.action-item:hover {
    border-color: rgba(107, 78, 242, .38);
    background: rgba(107, 78, 242, .035);
}

.action-item:active {
    transform: translateY(1px);
}

.action-item b {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #1f2937;
}

.action-item span {
    font-size: 12.6px;
    line-height: 1.7;
    color: #7b8494;
}

.action-item span:empty {
    display: none;
}

.action-item.btn-danger {
    border-color: rgba(220, 38, 38, .22);
    color: #b91c1c;
    background: rgba(254, 242, 242, .6);
}

.action-item.btn-danger b {
    color: #b91c1c;
}

/* ── 账号操作：单个框内滚动 ── */
.modal:has(.action-list) .modal-body {
    padding: 16px 18px 18px;
}

.action-list {
    display: block;
    max-height: min(56vh, 460px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 14px;
    background: #fff;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 13px 17px;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    border-radius: 0;
    min-height: 0;
    transition: background .14s ease;
}

.action-item:last-child {
    border-bottom: 0;
}

.action-item:hover {
    background: rgba(107, 78, 242, .055);
}

.action-item:active {
    background: rgba(107, 78, 242, .09);
}

.action-item b {
    font-size: 13.8px;
    font-weight: 600;
    line-height: 1.5;
    color: #1f2937;
}

.action-item span {
    font-size: 12.4px;
    line-height: 1.65;
    color: #7b8494;
}

.action-item span:empty {
    display: none;
}

.action-item.btn-danger b {
    color: #b91c1c;
}

.action-item.btn-danger:hover {
    background: rgba(220, 38, 38, .06);
}

/* 框内滚动条收窄，浅色 */
.action-list::-webkit-scrollbar {
    width: 8px;
}

.action-list::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .16);
    border-radius: 8px;
}

.action-list::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, .28);
}

.action-list::-webkit-scrollbar-track {
    background: transparent;
}

/* ── 全站统一：所有列表都进「一个框里滚动」 ── */

/* 数据表格：自身成为滚动框，表头吸顶 */
table.data {
    display: block;
    width: 100%;
    max-height: min(62vh, 560px);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 14px;
    background: #fff;
}

table.data thead,
table.data tbody {
    display: table;
    width: 100%;
    table-layout: fixed;
}

table.data thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, .08);
}

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

/* 权限勾选：同样一个框里滚动 */
.perm-grid {
    display: block;
    max-height: min(46vh, 380px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 14px;
    background: #fff;
    padding: 0;
    margin: 12px 0 6px;
}

.perm-item {
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    border-radius: 0;
    padding: 11px 15px;
}

.perm-item:last-child {
    border-bottom: 0;
}

.perm-item:hover {
    background: rgba(107, 78, 242, .055);
}

/* 统一窄滚动条 */
table.data::-webkit-scrollbar,
.perm-grid::-webkit-scrollbar,
.action-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

table.data::-webkit-scrollbar-thumb,
.perm-grid::-webkit-scrollbar-thumb,
.action-list::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .16);
    border-radius: 8px;
}

table.data::-webkit-scrollbar-thumb:hover,
.perm-grid::-webkit-scrollbar-thumb:hover,
.action-list::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, .28);
}

table.data::-webkit-scrollbar-track,
.perm-grid::-webkit-scrollbar-track,
.action-list::-webkit-scrollbar-track {
    background: transparent;
}

/* ── 修正：表格保持原生布局，滚动交给外层容器（避免表头错位） ── */
table.data {
    display: table;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

table.data thead,
table.data tbody {
    display: table-header-group;
    width: auto;
    table-layout: auto;
}

table.data tbody {
    display: table-row-group;
}

table.data thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

/* 含表格/列表的卡片内容区统一成一个滚动框 */
.card-body:has(table.data) {
    max-height: min(64vh, 600px);
    overflow: auto;
    overscroll-behavior: contain;
}

.card-body:has(table.data)::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.card-body:has(table.data)::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .16);
    border-radius: 8px;
}

.card-body:has(table.data)::-webkit-scrollbar-track {
    background: transparent;
}

/* ── 审计日志等 .table-wrap 容器：同样一个框里滚动 ── */
.table-wrap {
    max-height: min(64vh, 600px);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 12px;
    background: #fff;
}

.table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .16);
    border-radius: 8px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, .28);
}

.table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.table-wrap table.data thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, .08);
}

.card:has(.table-wrap) {
    display: flex;
    flex-direction: column;
}

/* ── 账号操作弹窗：再放宽一档（4.9.6） ── */
.modal:has(.action-list) {
    width: min(680px, 100%);
}

.modal:has(.action-list) .modal-head {
    padding: 20px 24px;
}

.modal:has(.action-list) .modal-head h3 {
    font-size: 16.5px;
}

.modal:has(.action-list) .modal-body {
    padding: 18px 24px 22px;
}

.action-list {
    max-height: min(60vh, 520px);
}

.action-item {
    gap: 7px;
    padding: 17px 20px;
    min-height: 66px;
}

.action-item b {
    font-size: 14.6px;
    line-height: 1.55;
    letter-spacing: .01em;
}

.action-item span {
    font-size: 13px;
    line-height: 1.8;
    color: #6b7280;
}

.modal:has(.action-list) .modal-foot {
    padding: 14px 24px 18px;
}

/* ── 账号操作：每条独立成框（不要连在一起） ── */
.action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: min(60vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    width: 100%;
    min-height: 66px;
    padding: 16px 20px;
    text-align: left;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .12);
    border-bottom: 1px solid rgba(15, 23, 42, .12);
    border-radius: 14px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.action-item:hover {
    border-color: rgba(107, 78, 242, .55);
    background: #fff;
    box-shadow: 0 6px 18px rgba(107, 78, 242, .10);
}

.action-item:last-child {
    border-bottom: 1px solid rgba(15, 23, 42, .12);
}

.action-item b {
    font-size: 14.6px;
    font-weight: 600;
    line-height: 1.55;
    color: #111827;
}

.action-item span {
    font-size: 13px;
    line-height: 1.75;
    color: #6b7280;
}

/* 危险操作：红框 */
.action-item.btn-danger {
    border-color: rgba(220, 38, 38, .38);
    background: #fff7f7;
}

.action-item.btn-danger:hover {
    border-color: rgba(220, 38, 38, .7);
    box-shadow: 0 6px 18px rgba(220, 38, 38, .10);
}

.action-item.btn-danger b {
    color: #b91c1c;
}

/* ── 账号操作：缩小框间距（操作 / 特权 挨近点） ── */
.action-list {
    gap: 8px;
    padding: 0;
}

.action-item {
    min-height: 56px;
    padding: 12px 16px;
    gap: 5px;
}

.action-item b {
    font-size: 14.2px;
    line-height: 1.5;
}

.action-item span {
    font-size: 12.8px;
    line-height: 1.65;
}

/* 同一行的按钮之间也不要拉太开 */
table.data td.actions .cell-actions {
    gap: 5px;
}

table.data td.actions .btn-sm {
    min-width: 64px;
}

/* ── 操作列：恢复居中 + 固定宽度 ── */
table.data td.actions {
    width: 120px;
    min-width: 120px;
    text-align: center !important;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 16px;
}

table.data td.actions .cell-actions {
    justify-content: center;
    gap: 6px;
}

table.data td.actions .btn-sm {
    min-width: 74px;
}

table.data td.perm-cell {
    width: auto;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    color: inherit;
    font-size: inherit;
}

/* ── 操作列：居中 120px（保持原样，不再随表头漂移） ── */
table.data td.actions {
    width: 120px;
    min-width: 120px;
    text-align: center !important;
    padding-left: 16px;
    padding-right: 16px;
    vertical-align: middle;
}

table.data td.actions .cell-actions {
    justify-content: center;
    gap: 6px;
}

table.data td.actions .btn-sm {
    min-width: 74px;
}

table.data th:last-child {
    text-align: center !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* ── 账号操作里的 ROM 点数弹窗 ── */
.rom-points-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #111827;
}

.rom-points-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rom-points-log {
    margin-top: 14px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 12px;
    padding: 8px 12px;
    background: #fff;
}

.rom-points-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(15, 23, 42, .07);
    font-size: 12.6px;
}

.rom-points-line:last-child { border-bottom: 0; }
.rom-points-line b { min-width: 46px; }
.rom-points-line .hint { flex: 1; text-align: right; }

/* ── 用户列表：操作右边显示现有点数 ── */
.rom-points-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(107, 78, 242, .10);
    color: #4C1D95;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.rom-points-inline::before {
    content: "点";
    margin-right: 3px;
    font-size: 10px;
    color: #8B93A7;
    font-family: inherit;
    font-weight: 400;
}

/* 操作列要能放下「按钮 + 点数」 */
table.data td.actions {
    width: auto;
    min-width: 150px;
}

/* ── 账号操作：标题与说明横向排（左标题 / 右说明） ── */
.action-item {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    min-height: 52px;
    padding: 13px 18px;
}

.action-item b {
    flex: 0 0 auto;
    font-size: 14.2px;
    line-height: 1.5;
    white-space: nowrap;
}

.action-item span {
    flex: 1 1 auto;
    margin: 0;
    text-align: right;
    font-size: 12.6px;
    line-height: 1.5;
    color: #7B8494;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ROM 点数弹窗里的说明也横过来 */
.rom-points-row + .hint,
.rom-points-hint {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── 审计日志：每行压成一行（说明不再竖排换行） ── */
#logsBody td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    line-height: 1.5;
}

#logsBody td:nth-child(1) { max-width: 150px; }   /* 时间 */
#logsBody td:nth-child(2) { max-width: 120px; }   /* 操作者 */
#logsBody td:nth-child(3) { max-width: 130px; }   /* 来源 IP */
#logsBody td:nth-child(4) { max-width: 150px; }   /* 动作 */
#logsBody td:nth-child(5) { max-width: 140px; }   /* 对象 */
#logsBody td:nth-child(6) { max-width: 320px; }   /* 说明 */
#logsBody td:nth-child(7) {
    max-width: 110px;
    white-space: nowrap;
}

/* ── 点数胶囊：放「操作 ▾」左边，同一行 ── */
table.data td.actions {
    width: auto;
    min-width: 168px;
    white-space: nowrap;
    vertical-align: middle;
}

table.data td.actions > .rom-points-inline {
    margin: 0 8px 0 0;
    vertical-align: middle;
}

table.data td.actions .cell-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    vertical-align: middle;
}

/* 点数胶囊本身 */
.rom-points-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(107, 78, 242, .10);
    color: #4C1D95;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* ── 「操作」表头与下方「点数胶囊 + 按钮」左边缘对齐 ── */
table.data th:last-child {
    text-align: left !important;
    padding-left: 18px !important;
    padding-right: 14px !important;
}

table.data td.actions {
    text-align: left !important;
    padding-left: 18px !important;
    padding-right: 14px !important;
    width: auto;
    min-width: 168px;
}

table.data td.actions > .rom-points-inline {
    margin-left: 0;
    margin-right: 8px;
}

table.data td.actions .cell-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

/* ── 充值页面 ── */
.pay-provider-row,
.pay-amount-row,
.pay-custom-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pay-provider {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 12px;
    font-size: 13.4px;
    cursor: pointer;
    background: #fff;
}

.pay-amount {
    padding: 10px 18px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 12px;
    background: #fff;
    font-size: 13.4px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.pay-amount:hover {
    border-color: rgba(107, 78, 242, .5);
}

.pay-amount.active {
    border-color: #6B4EF2;
    box-shadow: 0 6px 18px rgba(107, 78, 242, .16);
    color: #4C1D95;
    font-weight: 600;
}

.pay-custom-row .input {
    width: 200px;
}

/* ── 后台通知铃铛 / 通知列表（提权审批结果、到期提醒）── */
.notif-btn { position: relative; }
.notif-badge { position: absolute; top: -7px; right: -7px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #1b0710; font-size: 10px; font-weight: 800; line-height: 17px; text-align: center; }
.notif-list { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow: auto; }
.notif-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 11px 13px; }
.notif-item.unread { border-color: rgba(124, 92, 255, 0.45); background: var(--accent-soft); }
.notif-item h4 { margin: 0 0 4px; font-size: 13px; font-weight: 650; }
.notif-item p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.55; word-break: break-word; }
.notif-item .meta { margin-top: 8px; display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--faint); }
.notif-item .meta .spacer { margin-left: auto; }