:root {
    color-scheme: light dark;
    --admin-bg: #fafafa;
    --admin-menu: #ffffff;
    --admin-menu-hover: #f5f5f5;
    --admin-menu-active: #ebebeb;
    --admin-surface: #ffffff;
    --admin-surface-subtle: #fafafa;
    --admin-surface-hover: #f5f5f5;
    --admin-text: #262626;
    --admin-text-strong: #171717;
    --admin-text-muted: #737373;
    --admin-border: #e5e5e5;
    --admin-border-hover: #d4d4d4;
    --admin-focus: #171717;
    --admin-danger-border: #fecaca;
    --admin-danger-border-hover: #ef4444;
    --admin-danger-text: #b91c1c;
    --admin-danger-text-hover: #dc2626;
    --admin-success: #16a34a;
    --admin-warning: #d97706;
    --admin-primary: #171717;
    --admin-primary-hover: #000000;
    --admin-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    --admin-skeleton-base: #e5e5e5;
    --admin-skeleton-shine: rgba(255, 255, 255, .72);
    --admin-btn-bg: #ffffff;
    --admin-btn-bg-hover: #f5f5f5;
    --admin-btn-border: #e5e5e5;
    --admin-btn-border-hover: #d4d4d4;
    --admin-btn-text: #262626;
    --admin-btn-text-hover: #171717;
    --admin-btn-primary-bg: #171717;
    --admin-btn-primary-bg-hover: #000000;
    --admin-btn-primary-border: #171717;
    --admin-btn-primary-border-hover: #000000;
    --admin-btn-primary-text: #ffffff;
    --admin-btn-info-bg: #fafafa;
    --admin-btn-info-bg-hover: #f5f5f5;
    --admin-btn-info-border: #e5e5e5;
    --admin-btn-info-border-hover: #d4d4d4;
    --admin-btn-info-text: #404040;
    --admin-btn-success-bg: #ecfdf3;
    --admin-btn-success-bg-hover: #dcfce7;
    --admin-btn-success-border: #bbf7d0;
    --admin-btn-success-border-hover: #86efac;
    --admin-btn-success-text: #15803d;
    --admin-btn-warning-bg: #fff7ed;
    --admin-btn-warning-bg-hover: #ffedd5;
    --admin-btn-warning-border: #fed7aa;
    --admin-btn-warning-border-hover: #fdba74;
    --admin-btn-warning-text: #b45309;
    --admin-btn-danger-bg: #fef2f2;
    --admin-btn-danger-bg-hover: #fee2e2;
    --admin-btn-danger-border: #fecaca;
    --admin-btn-danger-border-hover: #fca5a5;
    --admin-btn-danger-text: #b91c1c;
}

@media (prefers-color-scheme: dark) {
    :root {
        --admin-bg: #0a0a0a;
        --admin-menu: #171717;
        --admin-menu-hover: #262626;
        --admin-menu-active: #2a2a2a;
        --admin-surface: #171717;
        --admin-surface-subtle: #1f1f1f;
        --admin-surface-hover: #262626;
        --admin-text: #ededed;
        --admin-text-strong: #ffffff;
        --admin-text-muted: #a3a3a3;
        --admin-border: #2a2a2a;
        --admin-border-hover: #404040;
        --admin-focus: #ededed;
        --admin-danger-border: #542f2e;
        --admin-danger-border-hover: #ef4444;
        --admin-danger-text: #983836;
        --admin-danger-text-hover: #e54343;
        --admin-success: #4ade80;
        --admin-warning: #fbbf24;
        --admin-shadow: 0 1px 3px rgba(0, 0, 0, .35);
        --admin-skeleton-base: #303030;
        --admin-skeleton-shine: rgba(255, 255, 255, .10);
        --admin-btn-bg: #1f1f1f;
        --admin-btn-bg-hover: #262626;
        --admin-btn-border: #2a2a2a;
        --admin-btn-border-hover: #404040;
        --admin-btn-text: #ededed;
        --admin-btn-text-hover: #ffffff;
        --admin-btn-primary-bg: #ededed;
        --admin-btn-primary-bg-hover: #ffffff;
        --admin-btn-primary-border: #ededed;
        --admin-btn-primary-border-hover: #ffffff;
        --admin-btn-primary-text: #0a0a0a;
        --admin-btn-info-bg: #1f1f1f;
        --admin-btn-info-bg-hover: #262626;
        --admin-btn-info-border: #2a2a2a;
        --admin-btn-info-border-hover: #404040;
        --admin-btn-info-text: #d4d4d4;
        --admin-btn-success-bg: #223429;
        --admin-btn-success-bg-hover: #294033;
        --admin-btn-success-border: #355340;
        --admin-btn-success-border-hover: #41694f;
        --admin-btn-success-text: #b7f0c7;
        --admin-btn-warning-bg: #3a2e1f;
        --admin-btn-warning-bg-hover: #463726;
        --admin-btn-warning-border: #5b4830;
        --admin-btn-warning-border-hover: #72593a;
        --admin-btn-warning-text: #f5d69f;
        --admin-btn-danger-bg: #3a2525;
        --admin-btn-danger-bg-hover: #452c2c;
        --admin-btn-danger-border: #613b3b;
        --admin-btn-danger-border-hover: #7b4a4a;
        --admin-btn-danger-text: #ffc0c0;
    }
}

html:has(body.admin-ui),
body.admin-ui {
    max-width: 100%;
    background: var(--admin-bg);
    color: var(--admin-text);
}

body.admin-ui {
    overflow-x: hidden;
}

.admin-ui :is(h1, h2, h3, h4, .h1, .page-title, .panel-title, .section-title, .device-name, .agent-name, .user-name, .stat-value, .stat-info p, .info-value) {
    color: var(--admin-text-strong);
}

.admin-ui :is(p, label, .muted, .text-muted, .text-small, .sub-message, .user-role, .user-label, .datetime, .info-text, .small, .stat-label, .stat-info h3, .agent-qq, .agent-meta, .row, .update-time, .footer) {
    color: var(--admin-text-muted);
}

.admin-ui a {
    color: #18181b;
}

.admin-ui hr {
    border: 0;
    border-top: 1px solid var(--admin-border);
}

.admin-ui :is(.btn, .login-btn, .refresh-btn, .action-btn, .notice-action) {
    background: var(--admin-btn-bg);
    border: 1px solid var(--admin-btn-border);
    color: var(--admin-btn-text);
    box-shadow: none;
    filter: none;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.admin-ui :is(.btn, .login-btn, .refresh-btn, .action-btn, .notice-action):hover:not(:disabled) {
    background: var(--admin-btn-bg-hover);
    border-color: var(--admin-btn-border-hover);
    color: var(--admin-btn-text-hover);
    filter: none;
    transform: none;
}

.admin-ui :is(.btn, .login-btn, .refresh-btn, .action-btn, .notice-action):focus-visible {
    outline: 2px solid var(--admin-focus);
    outline-offset: 2px;
}

.admin-ui :is(.btn-primary, .btn.primary, .login-btn-primary, .login-btn-success) {
    background: var(--admin-btn-primary-bg);
    border-color: var(--admin-btn-primary-border);
    color: var(--admin-btn-primary-text);
}

.admin-ui :is(.btn-primary, .btn.primary, .login-btn-primary, .login-btn-success):hover:not(:disabled) {
    background: var(--admin-btn-primary-bg-hover);
    border-color: var(--admin-btn-primary-border-hover);
    color: var(--admin-btn-primary-text);
}

.admin-ui :is(.btn-info) {
    background: var(--admin-btn-info-bg);
    border-color: var(--admin-btn-info-border);
    color: var(--admin-btn-info-text);
}

.admin-ui :is(.btn-info):hover:not(:disabled) {
    background: var(--admin-btn-info-bg-hover);
    border-color: var(--admin-btn-info-border-hover);
    color: var(--admin-btn-info-text);
}

.admin-ui :is(.btn-success, .btn.success, .btn-ok, .btn.ok) {
    background: var(--admin-btn-success-bg);
    border-color: var(--admin-btn-success-border);
    color: var(--admin-btn-success-text);
}

.admin-ui :is(.btn-success, .btn.success, .btn-ok, .btn.ok):hover:not(:disabled) {
    background: var(--admin-btn-success-bg-hover);
    border-color: var(--admin-btn-success-border-hover);
    color: var(--admin-btn-success-text);
}

.admin-ui :is(.btn-warning, .btn.warn) {
    background: var(--admin-btn-warning-bg);
    border-color: var(--admin-btn-warning-border);
    color: var(--admin-btn-warning-text);
}

.admin-ui :is(.btn-warning, .btn.warn):hover:not(:disabled) {
    background: var(--admin-btn-warning-bg-hover);
    border-color: var(--admin-btn-warning-border-hover);
    color: var(--admin-btn-warning-text);
}

.admin-ui :is(.btn-danger, .btn.danger, .login-btn-danger, .action-btn.delete, .notice-action.danger) {
    background: var(--admin-btn-danger-bg);
    border-color: var(--admin-btn-danger-border);
    color: var(--admin-btn-danger-text);
}

.admin-ui :is(.btn-danger, .btn.danger, .login-btn-danger, .action-btn.delete, .notice-action.danger):hover:not(:disabled) {
    background: var(--admin-btn-danger-bg-hover);
    border-color: var(--admin-btn-danger-border-hover);
    color: var(--admin-btn-danger-text);
}

.admin-ui button:disabled,
.admin-ui .btn.disabled {
    opacity: .48;
    cursor: not-allowed;
    transform: none;
}


.admin-ui :is(input:not([type="checkbox"]):not([type="radio"]):not([is="ui-switch"]), textarea, select, .form-control, .topbar-search, .command-input-wrap) {
    background-color: var(--admin-surface);
    border-color: var(--admin-border-hover);
    color: var(--admin-text);
}

.admin-ui :is(input:not([type="checkbox"]):not([type="radio"]):not([is="ui-switch"]), textarea, select, .form-control):focus,
.admin-ui :is(input:not([type="checkbox"]):not([type="radio"]):not([is="ui-switch"]), textarea, select, .form-control):focus-visible {
    border-color: var(--admin-focus);
    box-shadow: 0 0 0 3px rgba(23, 23, 23, .16);
    outline: none;
}

.admin-ui ::placeholder {
    color: var(--admin-text-muted);
    opacity: .75;
}

.admin-ui input[is="ui-switch"] {
    color: #5a5a5a;
    background-color: currentColor;
    border-color: currentColor;
}

.admin-ui input[is="ui-switch"]:checked {
    color: var(--admin-focus);
    background-color: currentColor;
    border-color: currentColor;
}

.admin-ui input[is="ui-switch"]::after {
    background: #f0f0f0;
}

.admin-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.admin-table-scroll > table {
    min-width: max-content;
}

.admin-ui table {
    background: var(--admin-surface);
    color: var(--admin-text);
}

.admin-ui table th {
    background: var(--admin-surface-subtle);
    color: var(--admin-text-muted);
    border-color: var(--admin-border);
}

.admin-ui table td {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.admin-ui table tbody tr:hover > td {
    background: var(--admin-surface-hover);
    color: var(--admin-text-strong);
}


.admin-ui table :is(.table-empty, .table-error) {
    padding: 30px;
    text-align: center;
}

.admin-ui table .table-empty {
    color: var(--admin-text-muted);
}

.admin-ui table .table-error {
    color: var(--admin-danger-text-hover);
}

.admin-shell :is(.admin-panel, .modal-content, .modal-box, .command-box, #user_popover),
.admin-home :is(.welcome-box, .user-card, .stat-card),
.admin-people :is(.header, .stat-item, .toolbar, .agent-card, .empty-state, .modal-content),
.admin-feedback :is(.welcome-box, .card, .empty, .modal-content),
.admin-robot :is(.welcome-box, .card, .modal-content),
.admin-gen-card :is(.welcome-card, .card),
.admin-cards :is(.stat-card, .action-area, .preview-area, .table-container),
.admin-session admin-session-card,
.admin-session .empty,
.admin-plugins admin-plugin-card,
.admin-plugins .empty,
.admin-settings :is(.card, .section-card, .modal-content, .passkey-item, .email-status),
.admin-backup :is(.card, .backup-item, .backup-row, .modal-content),
.admin-website :is(.card, .system-item, .modal-content) {
    background:  var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.admin-home .user-card,
.admin-home .stat-card,
.admin-people :is(.stat-icon, .agent-avatar, .agent-note, .keyword-badge, .search-box),
.admin-feedback :is(.pill, .code, .content, .contact),
.admin-robot :is(.robot-info, .stat-item, .bar-track, .ad-card),
.admin-gen-card .card-display,
.admin-cards :is(.creator-tag, .preview-list, .preview-item),
.admin-session :is(.device i, .badge),
.admin-plugins :is(.device i, .badge),
.admin-shell :is(.option-badge, .command-item, .notice-item),
.admin-backup :is(.welcome-box, .pill),
.admin-website :is(.tabs, .checkbox-item, .detail-tag, .fixed-footer),
.admin-feedback :is(.tabs, .tab),
.admin-settings :is(.password-strength, .secret-display, .qr-container, #qq-info, .settings-hint-card) {
    background: var(--admin-surface-subtle);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.admin-home .user-value,
.admin-home .stat-value,
.admin-session .row > :last-child,
.admin-plugins .row > :last-child,
.admin-people .agent-name {
    color: var(--admin-text-strong);
}

.admin-home .sub-message,
.admin-home .datetime,
.admin-home .user-label,
.admin-home .info-text,
.admin-home .small,
.admin-session .row > :first-child,
.admin-session .device-detail,
.admin-plugins .row > :first-child,
.admin-feedback :is(.muted, .text-small),
.admin-people :is(.agent-qq, .agent-meta),
.admin-robot :is(.label, .text-muted) {
    color: var(--admin-text-muted);
}

.admin-home .section-heading {
    margin-bottom: 8px;
    color: var(--admin-text-strong);
    font-weight: 500;
}

.admin-home .icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--admin-text-muted);
    cursor: pointer;
}

.admin-home .icon-button:hover {
    border-color: var(--admin-border-hover);
    color: var(--admin-text);
}

.admin-people .search-box {
    border: 1px solid var(--admin-border);
    border-radius: 6px;
}

.admin-people :is(.form-hint, .form-hint-inline, .modal-tip) {
    color: var(--admin-text-muted);
    font-weight: 400;
}

.admin-people .form-hint {
    margin-top: 4px;
    font-size: 11px;
}

.admin-people .modal-tip {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid var(--admin-border);
    font-size: 11px;
}

.admin-people .search-box:focus-within {
    border-color: var(--admin-focus);
    box-shadow: 0 0 0 3px rgba(23, 23, 23, .16);
}

.admin-people .search-box input {
    border: 0;
    box-shadow: none;
}

.admin-people .stat-icon,
.admin-cards .stat-icon,
.admin-session .device i {
    background: var(--admin-surface-subtle);
    color: #a1a1aa;
    border: 1px solid var(--admin-border);
}

.admin-people .modal-header,
.admin-feedback .modal-header,
.admin-gen-card :is(.card-header, .stats-row),
.admin-cards :is(.filter-section, .delete-section, .preview-header, .preview-item),
.admin-robot .list-item,
.admin-shell :is(.panel-header, .modal-header, .modal-footer, .notice-footer),
.admin-settings :is(.modal-header, .section-divider, .card-header),
.admin-backup :is(.modal-header, .backup-row),
.admin-website :is(.modal-header, .system-details, .card-header, .fixed-footer) {
    border-color: var(--admin-border);
}

.admin-backup .welcome-box,
.admin-feedback .welcome-box,
.admin-website .tabs,
.admin-website .fixed-footer,
.admin-settings .modal-box {
    background: var(--admin-surface);
}

.admin-backup :is(.pill, .brand),
.admin-website .detail-tag,
.admin-settings #qq-info,
.admin-settings .qr-container,
.admin-settings .secret-display,
.admin-settings .password-strength,
.admin-settings .settings-hint-card {
    background: var(--admin-surface-subtle);
}

.admin-website .tab,
.admin-feedback .tab {
    background: transparent;
    color: var(--admin-text-muted);
    border: 1px solid transparent;
}

.admin-website .tab:hover:not(.active),
.admin-feedback .tab:hover:not(.active) {
    background: var(--admin-surface-hover);
    color: var(--admin-text);
}

.admin-website .tab.active,
.admin-feedback .tab.active {
    background: var(--admin-menu-active);
    color: var(--admin-text-strong);
    border-color: var(--admin-border);
}

.admin-website .checkbox-item,
.admin-website .detail-tag,
.admin-backup .pill,
.admin-feedback .pill {
    color: var(--admin-text);
}

.admin-website .checkbox-item i,
.admin-website .detail-tag i,
.admin-backup .pill i,
.admin-feedback .pill i {
    color: #737373;
}

.admin-settings .password-strength {
    overflow: hidden;
    border: 1px solid var(--admin-border);
}

.admin-settings :is(.settings-switch-title, .settings-switch-desc, .countdown, .resend-btn, .password-tip, .settings-muted-copy, .settings-status-muted, .settings-modal-intro) {
    color: var(--admin-text-muted);
}

.admin-settings .settings-switch-title {
    color: var(--admin-text-strong);
}

.admin-settings .modal-close {
    color: var(--admin-text-muted);
}

.admin-settings .modal-close:hover {
    color: var(--admin-text);
}

.admin-settings .settings-hint-row {
    color: var(--admin-text-muted);
}

.admin-settings .settings-passkey-btn {
    background: #18181b;
    border-color: #18181b;
    color: #fff;
}

.admin-settings .settings-passkey-btn:hover:not(:disabled) {
    background: #000000;
    border-color: #000000;
    color: #fff;
}

.admin-settings .sensitive-option-btn {
    width: 100%;
    justify-content: center;
}

.admin-settings .sensitive-option-qq {
    background: #18181b;
    border-color: #18181b;
    color: #fff;
}

.admin-settings .sensitive-option-qq:hover:not(:disabled) {
    background: #000000;
    border-color: #000000;
    color: #fff;
}

.admin-feedback .code,
.admin-feedback .content {
    background: var(--admin-surface-subtle);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.admin-feedback .content.bad {
    background: var(--admin-surface-subtle);
    border-left-color: var(--admin-danger-border-hover);
}

.admin-feedback .contact {
    background: var(--admin-surface-subtle);
    border-color: var(--admin-border);
    color: var(--admin-success);
}

.admin-feedback .bad-detail-meta,
.admin-feedback .bad-detail-content {
    padding: 15px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: var(--admin-surface-subtle);
}

.admin-feedback .bad-detail-meta {
    margin-bottom: 15px;
}

.admin-feedback .bad-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-feedback .bad-detail-row:last-child {
    margin-bottom: 0;
}

.admin-feedback .bad-detail-row code {
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--admin-surface);
    color: var(--admin-text);
}

.admin-feedback .bad-detail-content {
    border-color: var(--admin-danger-border);
}

.admin-feedback .bad-detail-label {
    margin-bottom: 8px;
    color: var(--admin-danger-text-hover);
    font-weight: 500;
}

.admin-feedback .bad-detail-value {
    color: var(--admin-text);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.admin-feedback .bad-detail-error {
    padding: 15px;
    color: var(--admin-danger-text-hover);
    text-align: center;
}

.admin-robot .table tbody tr:hover td {
    background: var(--admin-surface-hover);
}

.admin-robot .stat-chart .bar-track {
    background: var(--admin-surface-subtle);
    border: 1px solid var(--admin-border);
}

.admin-robot .stat-chart .bar-fill {
    background: #52525b;
}

.admin-robot .stat-chart .bar-fill.secondary {
    background: #71717a;
}

.admin-robot .list-item {
    border-bottom: 1px solid var(--admin-border);
}

.admin-robot :is(.table-empty, .table-error) {
    padding: 20px;
    text-align: center;
}

.admin-robot .table-empty,
.admin-robot :is(.list-empty, .stats-empty) {
    color: var(--admin-text-muted);
}

.admin-robot .table-error,
.admin-robot .stats-error {
    color: var(--admin-danger-text-hover);
}

.admin-robot :is(.list-empty, .stats-empty, .stats-error) {
    padding: 12px;
    text-align: center;
    font-size: 12px;
}

.admin-robot .chart-title {
    margin-bottom: 6px;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 500;
}

.admin-robot .chart-title.user-ranking {
    margin-top: 10px;
}

.admin-robot .chart-title i {
    margin-right: 5px;
    color: #737373;
}

.admin-robot .ad-card:hover {
    background: var(--admin-surface-hover);
    border-color: var(--admin-border-hover);
}

.admin-gen-card .stats-row {
    color: var(--admin-text-muted);
}

.admin-gen-card .card-display {
    color: var(--admin-text);
}

.admin-cards .delete-tips {
    background: var(--admin-surface-subtle);
    color: var(--admin-text-muted);
    border: 1px solid var(--admin-danger-border);
    border-left: 3px solid var(--admin-danger-border-hover);
}

.admin-cards :is(.btn-warning, .btn-info) {
    background: var(--admin-surface-subtle);
    border-color: var(--admin-border);
    color: #9b9b9b;
}

.admin-cards :is(.btn-warning, .btn-info):hover {
    background: var(--admin-surface-subtle);
    border-color: var(--admin-border-hover);
    color: var(--admin-text);
}

.admin-cards .table-summary {
    margin-top: 15px;
    color: var(--admin-text-muted);
    font-size: 12px;
    text-align: right;
}

.admin-session .meta,
.admin-plugins .meta {
    background: transparent;
}

.admin-session .device-detail {
    margin-top: 2px;
    font-size: 12px;
    overflow-wrap: anywhere;
}


.admin-shell .sidebar,
.admin-shell .sidebar-header,
.admin-shell .user-info,
.admin-shell .nav-menu {
    background: var(--admin-menu);
    border-color: var(--admin-border);
}

.admin-shell .nav-item {
    background: transparent;
    color: var(--admin-text-muted);
}

.admin-shell .nav-item:hover {
    background: var(--admin-menu-hover);
    color: var(--admin-text);
}

.admin-shell .nav-item.active {
    background: var(--admin-menu-active);
    color: var(--admin-text-strong);
}

.admin-shell .nav-menu::after {
    background: linear-gradient(to bottom, transparent, var(--admin-menu));
}

.admin-shell :is(.main-content, .content-area, .local-content, #content-frame, .topbar) {
    background: var(--admin-bg);
    color: var(--admin-text);
}

.admin-shell .toggle-sidebar {
    background: transparent;
    border-color: transparent;
    color: var(--admin-text);
}

.admin-shell .topbar-search-kbd {
    background: var(--admin-surface);
    color: var(--admin-text-muted);
    border-color: var(--admin-border);
}

.admin-shell .notice-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--admin-border);
}

.admin-shell .user-popover {
    background: var(--admin-surface);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

.admin-shell .notice-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-shell .notice-profile-name {
    color: var(--admin-text-strong);
    font-size: 16px;
    font-weight: 600;
}

.admin-shell .notice-profile-role,
.admin-shell .notice-content,
.admin-shell .notice-meta {
    color: var(--admin-text-muted);
}

.admin-shell .notice-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--admin-danger-text);
    cursor: pointer;
}

.admin-shell .notice-delete:hover {
    border-color: var(--admin-danger-border-hover);
    color: var(--admin-danger-text-hover);
}

.admin-shell .notice-publish {
    position: absolute;
    top: 14px;
    right: 14px;
    display: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: var(--admin-surface-subtle);
    color: #737373;
    cursor: pointer;
    font-size: 16px;
}

.admin-shell .notice-empty {
    padding: 40px 20px;
    color: var(--admin-text-muted);
    text-align: center;
}

.admin-shell .notice-content {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.admin-shell .notice-content :is(p, div, blockquote, pre, ul, ol) {
    margin: 0 0 8px;
}

.admin-shell .notice-content :is(p, div, li, blockquote, code, pre, span, a, strong, em, b, i, u, s, small) {
    color: inherit;
}

.admin-shell .notice-content :is(ul, ol) {
    padding-left: 18px;
}

.admin-shell .notice-content a {
    color: #737373;
}

.admin-shell .notice-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 8px;
    border-radius: 6px;
}

.admin-shell .notice-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
}

.admin-shell .notice-public-badge {
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: #737373;
    font-size: 10px;
}

.admin-shell .page-load-skeleton {
    display: grid;
    gap: 12px;
    width: min(680px, calc(100% - 40px));
    margin: 28px auto;
    padding: 20px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
}

.admin-shell .content-area {
    position: relative;
    overflow: hidden;
}

.admin-shell .content-area > :is(#content-frame, .page-stage, .local-content) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    outline: 0;
    background: var(--admin-bg);
}

.admin-shell .content-area > .page-stage {
    z-index: 2;
    opacity: 0;
    transform: none;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .14s ease, visibility 0s linear .14s;
}

.admin-shell .content-area > .page-stage.is-ready {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.admin-shell .content-area.is-page-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    width: 28%;
    height: 2px;
    background: var(--admin-focus);
    animation: adminPageLoading 1s ease-in-out infinite alternate;
    pointer-events: none;
}

.admin-shell .toast-item {
    overflow: hidden;
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

.admin-shell #publish_modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    opacity: 0;
    transform: scale(.96);
    transition: opacity .15s ease, transform .15s ease;
}

.admin-shell #publish_modal .modal-box {
    width: min(440px, calc(100vw - 28px));
    padding: 22px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.admin-shell #user_profile {
    transition: transform .2s ease;
}

.admin-shell .bell-shake {
    animation: adminBellShake 1.2s ease-in-out infinite;
    transform-origin: top center;
}

.admin-shell .notify-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--admin-text-strong);
    font-size: 15px;
    font-weight: 600;
}

.admin-shell .notify-description {
    padding-left: 26px;
    color: var(--admin-text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.admin-shell .close-toast {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--admin-text-muted);
    cursor: pointer;
}

.admin-shell .close-toast:hover {
    border-color: var(--admin-border-hover);
    color: var(--admin-text);
}

.admin-shell .login-divider {
    margin: 15px 0;
    color: var(--admin-text-muted);
    text-align: center;
}

.admin-shell .command-empty {
    padding: 22px;
    color: var(--admin-text-muted);
    text-align: center;
}

.admin-shell .remember-device {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--admin-text-muted);
    font-size: 12px;
    cursor: pointer;
}

.admin-shell :is(.login-btn-primary, .login-btn-success) {
    background: #18181b;
    border-color: #18181b;
    color: #fff;
}

.admin-shell :is(.login-btn-primary, .login-btn-success):hover:not(:disabled) {
    background: #000000;
    border-color: #000000;
    color: #fff;
}

.admin-shell .login-btn-qq {
    background: #18181b;
    border: 1px solid #18181b;
    color: #fff;
}

.admin-shell .login-btn-qq:hover:not(:disabled) {
    background: #000000;
    border-color: #000000;
    color: #fff;
}

.admin-shell .notice-action {
    flex: 1;
    justify-content: center;
    min-width: 0;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.admin-shell .notice-item {
    margin: 8px 12px;
    padding: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    cursor: pointer;
}

.admin-shell .notice-item.unread {
    border-color: #18181b;
}

.modal.admin-modal-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    overscroll-behavior: contain;
    transition: opacity .18s ease, visibility 0s linear .18s;
}

.modal.admin-modal-enhanced.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.modal.admin-modal-enhanced .modal-content {
    max-width: calc(100vw - 28px);
    max-height: calc(100dvh - 28px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(var(--admin-modal-x, 0), var(--admin-modal-y, 0), 0) scale(.96);
    opacity: .96;
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
    will-change: transform;
}

.modal.admin-modal-enhanced.active .modal-content {
    transform: translate3d(var(--admin-modal-x, 0), var(--admin-modal-y, 0), 0) scale(1);
    opacity: 1;
}

.modal.admin-modal-enhanced.admin-modal-dragging .modal-content {
    transition: none;
    user-select: none;
}

.modal.admin-modal-enhanced .modal-header {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.modal.admin-modal-enhanced.admin-modal-dragging .modal-header {
    cursor: grabbing;
}

body.admin-modal-open {
    overflow: hidden;
    touch-action: none;
}

.admin-skeleton {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 14px;
    border-radius: 6px;
    background: var(--admin-skeleton-base);
    color: transparent;
}

.admin-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--admin-skeleton-shine), transparent);
    animation: adminSkeletonShimmer 1.15s infinite;
}

.admin-skeleton-row {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 12px;
}

.admin-skeleton-line {
    height: 14px;
    border-radius: 999px;
}

.admin-skip-enter-animations :is(admin-session-card, admin-plugin-card, .notice-item, table tbody tr) {
    animation: none !important;
}

.admin-swap-exit {
    animation: adminContentUp .12s ease both;
    pointer-events: none;
}

.admin-swap-enter {
    animation: adminContentDown .18s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes adminSkeletonShimmer {
    to { transform: translateX(100%); }
}

@keyframes adminContentUp {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes adminContentDown {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes adminPageLoading {
    from { transform: translateX(-100%); opacity: .35; }
    to { transform: translateX(360%); opacity: .9; }
}

@keyframes notifySlideIn {
    from { opacity: 0; transform: translateX(120%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes notifySlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(120%); }
}

@keyframes avatarShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@keyframes adminBellShake {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(-12deg); }
    30% { transform: rotate(12deg); }
    45% { transform: rotate(-8deg); }
    60% { transform: rotate(8deg); }
    75% { transform: rotate(-4deg); }
    90% { transform: rotate(4deg); }
}

@media (prefers-color-scheme: dark) {
    .admin-ui [style*="color: #000"],
    .admin-ui [style*="color:#000"],
    .admin-ui [style*="color: black"],
    .admin-ui [style*="color:black"],
    .admin-ui [style*="color: #333"],
    .admin-ui [style*="color:#333"] {
        color: var(--admin-text) !important;
    }

    .admin-ui [style*="color: #666"],
    .admin-ui [style*="color:#666"],
    .admin-ui [style*="color: #999"],
    .admin-ui [style*="color:#999"] {
        color: var(--admin-text-muted) !important;
    }

    .admin-ui [style*="background: white"],
    .admin-ui [style*="background:white"],
    .admin-ui [style*="background: #fff"],
    .admin-ui [style*="background:#fff"],
    .admin-ui [style*="background: #f8f9fa"],
    .admin-ui [style*="background:#f8f9fa"],
    .admin-ui [style*="background: #f9f9f9"],
    .admin-ui [style*="background:#f9f9f9"],
    .admin-ui [style*="background-color: white"],
    .admin-ui [style*="background-color:white"],
    .admin-ui [style*="background-color: #fff"],
    .admin-ui [style*="background-color:#fff"] {
        background: var(--admin-surface-subtle) !important;
    }

    .admin-ui [style*="border-color: #ddd"],
    .admin-ui [style*="border-color:#ddd"],
    .admin-ui [style*="border-color: #eee"],
    .admin-ui [style*="border-color:#eee"],
    .admin-ui [style*="border-top: 1px solid #eee"],
    .admin-ui [style*="border-top:1px solid #eee"] {
        border-color: var(--admin-border) !important;
    }
}

@media (max-width: 640px) {
    .admin-ui {
        max-width: 100vw;
    }

    .admin-table-scroll {
        margin-inline: 0;
    }

    .admin-shell .notice-footer {
        flex-wrap: wrap;
    }

    .admin-shell .notice-action {
        flex: 1 1 calc(50% - 4px);
    }

    .modal.admin-modal-enhanced {
        align-items: flex-start;
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .modal.admin-modal-enhanced .modal-content {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-skeleton::after,
    .admin-swap-exit,
    .admin-swap-enter,
    .admin-ui table tbody tr,
    .admin-session admin-session-card,
    .admin-plugins admin-plugin-card {
        animation: none;
    }

    .admin-shell .content-area > .page-stage {
        transition: none;
    }

    .admin-shell .content-area.is-page-loading::after {
        animation: none;
    }
}
