/**
 * admin.css — Admin hub, notices, banners, emoji picker extras, PWA dots, and kbd chrome.
 * Split from style.css with rule order preserved.
 */
/* ==================== Task 4.1 & 4.2: Admin & Notices ==================== */
.important-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: #e67e22;
    color: white;
    z-index: 10000;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* 优雅的公告常规文档流自适应偏移 */
.important-banner ~ .app-layout {
    padding-top: 36px;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    cursor: pointer;
}

.banner-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

@media (max-width: 600px) {
    .important-banner {
        font-size: 12px;
        padding: 8px 10px;
    }
    .banner-more span {
        display: none; /* 极窄屏幕隐藏“查看更多”文字，仅留箭头 */
    }
    .banner-close {
        padding: 2px 6px;
    }
}

.banner-more {
    font-size: 11px;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: background 0.2s;
}

.banner-content:hover .banner-more {
    background: rgba(255,255,255,0.3);
}

.banner-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    margin-left: 10px;
}

.notice-center-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.2s;
}

.notice-center-btn:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.notice-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    display: none;
    border: 2px solid #1a1a1a;
}

.notice-dot.active {
    display: block;
    animation: dotPulse 1.5s infinite;
}

@keyframes dotPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* 公告中心弹窗样式 */
.notice-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.notice-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-theme .notice-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.notice-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notice-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.notice-tag.important { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.notice-tag.info { background: rgba(52, 152, 219, 0.2); color: #3498db; }

.notice-time {
    font-size: 12px;
    color: var(--text-dim);
    opacity: 0.6;
}

.notice-item-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text);
}

.notice-item-content {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

.admin-hub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.hub-tab {
    background: none;
    border: none;
    color: #888;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 2px solid transparent;
}

.hub-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.hub-pane {
    display: none;
}

.hub-pane.active {
    display: block;
}

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

.admin-table th, .admin-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.code-font {
    font-family: monospace;
    font-weight: bold;
    color: var(--primary-color);
}

.role-badge, .status-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.role-badge.admin { background: #e74c3c; color: white; }
.role-badge.user { background: #3498db; color: white; }
.status-badge.active { background: #2ecc71; color: white; }
.status-badge.frozen { background: #95a5a6; color: white; }

.action-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.action-link:hover {
    background: rgba(57, 157, 255, 0.1);
    text-decoration: none;
}

.action-link.danger:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #888;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus, .form-group textarea:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(57, 157, 255, 0.2);
}

/* Task CR.2: 图标预览预览方块样式 */
.icon-preview-box {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.icon-preview-box:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.icon-preview-box:active {
    transform: translateY(0);
}

body.light-theme .icon-preview-box {
    background: rgba(0,0,0,0.03) !important;
    border-color: #ddd !important;
}

body.light-theme .icon-preview-box:hover {
    background: rgba(0,0,0,0.05) !important;
    border-color: var(--primary) !important;
}

body.light-theme .form-group input, 
body.light-theme .form-group textarea,
body.light-theme .form-group select,
body.light-theme .admin-search-body select {
    background: #fff !important;
    color: #2c3e50 !important;
    border-color: #ddd !important;
}

/* Task 6.4: 针对公告管理编辑器的深度兼容性修复 - 增加原生媒体查询支持 */
.admin-announce-editor textarea,
.admin-announce-editor input {
    color: #ffffff;
}

@media (prefers-color-scheme: light) {
    body:not(.dark-theme) .admin-announce-editor textarea,
    body:not(.dark-theme) .admin-announce-editor input {
        color: #2c3e50 !important;
        background-color: #ffffff !important;
        border: 1px solid #ced4da !important;
    }
}

body.light-theme .admin-announce-editor textarea,
body.light-theme .admin-announce-editor input {
    color: #2c3e50 !important;
    background-color: #ffffff !important;
    border: 1px solid #ced4da !important;
}

body.light-theme .admin-announce-editor textarea::placeholder,
body.light-theme .admin-announce-editor input::placeholder {
    color: #adb5bd;
}

/* ==================== Task 3.5: Monaco Editor Modal ==================== */
#monaco-container {
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.monaco-editor, .monaco-editor .margin, .monaco-editor-background {
    background-color: transparent !important;
}

body.light-theme #monaco-container {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}

/* Task 6.8: 公告中心列表样式 */
.notice-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 5px 2px;
}

.notice-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-mark-all-read {
    font-size: 12px;
    color: var(--primary);
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mark-all-read:hover {
    background: var(--primary);
    color: #fff;
}

body.light-theme .notice-center-header {
    border-bottom-color: #eee;
}

.notice-list-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 0; /* Changed for accordion */
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    margin-bottom: 10px;
    overflow: hidden;
    cursor: pointer;
}

.notice-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.notice-list-item.is-top {
    border-left: 3px solid #f1c40f;
    background: rgba(241, 196, 15, 0.08);
}

.notice-list-item.is-expanded .notice-item-content {
    max-height: 1000px;
    padding: 15px;
    opacity: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.notice-list-item.is-read {
    opacity: 0.6;
}

.notice-list-item.is-read.hide-read {
    display: none;
}

.notice-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    user-select: none;
}

.notice-item-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.notice-item-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.is-expanded .notice-item-arrow {
    transform: rotate(180deg);
}

.notice-item-content {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-dim);
    word-break: break-word;
    max-height: 0;
    padding: 0 15px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.1);
}

.notice-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notice-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toggle-hide-read {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    opacity: 0.7;
    cursor: pointer;
}

.toggle-hide-read input {
    cursor: pointer;
}

/* Task 6.10: 未读标签与置顶标签 */
.notice-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-top {
    background: #f1c40f;
    color: #000;
}

.badge-new {
    background: var(--primary, #3498db);
    color: #fff;
    margin-left: 5px;
    animation: badgeFade 1.5s infinite alternate;
}

@keyframes badgeFade {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

body.light-theme .notice-list-item.is-top {
    background: #fffdf0;
    border-color: #f1c40f;
}

body.light-theme .badge-top {
    color: #000;
}

.notice-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notice-item-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.notice-item-date {
    font-size: 11px;
    opacity: 0.4;
}

.notice-item-content {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-dim);
    word-break: break-all;
}

body.light-theme .notice-list-item {
    background: #f8f9fa;
    border-color: #eee;
}

body.light-theme .notice-item-content {
    color: #444;
}

.empty-notice {
    text-align: center;
    padding: 50px 0;
    opacity: 0.4;
    font-size: 13px;
}

.error-text {
    color: #e74c3c;
    padding: 20px;
    text-align: center;
    font-weight: bold;
}

/* ==================== Admin Hub 模块化样式 (Task 4.4) ==================== */
.admin-hub-tabs {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.hub-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.hub-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(57, 157, 255, 0.3);
}

.hub-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.hub-pane.active {
    display: block;
}

.admin-hub-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
}

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

/* ==================== 管理员高亮状态栏 ==================== */
.admin-active-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 10000;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: slideDown 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* 适配顶栏开启后的布局偏移 */
body.admin-mode {
    padding-top: 36px;
}

body.admin-mode .sidebar {
    top: 36px;
}

body.admin-mode .sidebar-toggle {
    top: 56px; /* 电脑端 20px + 36px */
}

body.admin-mode .summon-search-btn {
    top: 56px; /* 电脑端 20px + 36px */
}

@media (max-width: 768px) {
    body.admin-mode .sidebar-toggle,
    body.admin-mode .summon-search-btn {
        top: 51px; /* 移动端 15px + 36px */
    }
}

/* 适配重要公告顶栏（.important-banner）开启后的布局偏移 */
.important-banner ~ .sidebar-toggle,
.important-banner ~ .summon-search-btn {
    top: 56px; /* 电脑端 20px + 公告栏约 36px */
}

@media (max-width: 768px) {
    .important-banner ~ .sidebar-toggle,
    .important-banner ~ .summon-search-btn {
        top: 51px; /* 移动端 15px + 公告栏约 36px */
    }
}

/* 当管理员状态栏与重要公告顶栏同时存在时的极佳防护层 */
body.admin-mode .important-banner ~ .sidebar-toggle,
body.admin-mode .important-banner ~ .summon-search-btn {
    top: 92px; /* 电脑端 20px + 状态栏 36px + 公告栏 36px */
}

@media (max-width: 768px) {
    body.admin-mode .important-banner ~ .sidebar-toggle,
    body.admin-mode .important-banner ~ .summon-search-btn {
        top: 87px; /* 移动端 15px + 状态栏 36px + 公告栏 36px */
    }
}

/* ==================== 快捷导航增强 ==================== */
/* 平常普通显示，但未触发时：向右收缩，保持一半遮挡在屏幕右侧边缘 */
.quick-nav-group.visible {
    opacity: 0.45; /* 默认未触发时半透 */
    pointer-events: auto;
    transform: translateX(25px); /* 电脑端平时退缩 25px */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 激发态（悬浮在按钮组上，或者正在滚动激活时）：恢复全显，并丝滑向左弹回原位 */
.quick-nav-group.visible:hover,
.quick-nav-group.visible.active {
    opacity: 1;
    transform: translateX(0) !important;
}

@media (max-width: 768px) {
    /* 移动端平时往右收进屏幕边缘，完全隐藏 (15px间距 + 40px宽度 = 55px，设为 60px 彻底藏好) */
    .quick-nav-group.visible {
        transform: translateX(60px);
    }
    
    /* 移动端触碰或滚动滑出 */
    .quick-nav-group.visible:hover,
    .quick-nav-group.visible.active {
        opacity: 1;
        transform: translateX(0) !important;
    }
}

/* ==================== Task UM.2: 用户管理 Dashboard 增强样式 ==================== */

/* 1. 搜索与筛选面板 */
.admin-search-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.admin-search-header {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
}

.admin-search-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-search-body {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    border-top: 1px solid var(--glass-border);
}

.admin-search-body.collapsed {
    display: none;
}

/* 2. 表格视觉优化 */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

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

.admin-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dim);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text);
    vertical-align: middle;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* 3. 分页组件 */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5px;
    flex-wrap: wrap;
    gap: 10px;
}

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

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 4. 多选模式适配 */
.admin-table th.col-checkbox,
.admin-table td.col-checkbox {
    width: 40px;
    text-align: center;
    padding: 12px 0;
}

.admin-table tr.selected {
    background: rgba(57, 157, 255, 0.1) !important;
}

/* 用户端悬浮批量工具栏 */
.user-batch-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2500;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90vw;
    flex-wrap: wrap;
    justify-content: center;
}

.user-batch-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.batch-action-btn, 
.user-batch-bar .batch-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white !important;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.batch-action-btn:hover, 
.user-batch-bar .batch-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.user-batch-bar .batch-btn.danger {
    background: rgba(231, 76, 60, 0.85);
    color: white !important;
}

.user-batch-bar .batch-btn.danger:hover {
    background: rgba(231, 76, 60, 1);
}

/* 后台管理一体化批量工具卡片 (Task NT-V2.5) */
.admin-batch-bar {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
    padding: 0 15px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
    box-sizing: border-box;
}

.admin-batch-bar.visible {
    max-height: 100px;
    opacity: 1;
    padding: 10px 15px;
    margin-bottom: 15px;
}

.admin-batch-bar span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.admin-batch-bar .batch-btn {
    background: var(--primary);
    color: white !important;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.admin-batch-bar .batch-btn:hover {
    background: var(--primary-hover, rgba(57, 157, 255, 0.8));
    transform: translateY(-1px);
}

.admin-batch-bar .batch-btn.danger {
    background: #e74c3c;
}

.admin-batch-bar .batch-btn.danger:hover {
    background: #c0392b;
}

body.light-theme .admin-batch-bar {
    background: rgba(0, 0, 0, 0.03);
}

/* 状态标签增强 */
.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.status-badge.frozen { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.status-badge.pending { background: rgba(241, 196, 15, 0.2); color: #f1c40f; }

/* 公告状态样式适配 (Task NT.4) */
.status-badge.published { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.status-badge.draft { background: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.status-badge.archived { background: rgba(149, 165, 166, 0.2); color: #95a5a6; }

/* 邀请码状态样式适配 */
.status-badge.unused { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.status-badge.used { background: rgba(149, 165, 166, 0.2); color: #95a5a6; }

/* 用户角色与账户状态样式适配 */
.status-badge.admin { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.status-badge.super_user { background: rgba(52, 152, 219, 0.2); color: #3498db; }
.status-badge.user { background: rgba(255, 255, 255, 0.1); color: var(--text-dim); }

/* 亮色模式适配 */
body.light-theme .admin-search-panel { background: rgba(0, 0, 0, 0.02); }
body.light-theme .admin-table th { background: rgba(0, 0, 0, 0.03); }
body.light-theme .admin-table tr:hover { background: rgba(0, 0, 0, 0.01); }
body.light-theme .page-btn { background: rgba(0, 0, 0, 0.04); }

/* ==================== Emoji 选择器增强 ==================== */
.emoji-picker-container {
    margin-top: 12px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px;
    background: rgba(15, 15, 15, 0.4);
    backdrop-filter: blur(10px);
    display: none; 
    flex-direction: column;
    gap: 8px;
    min-height: 260px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2), 0 10px 30px rgba(0,0,0,0.3);
    animation: fadeInDown 0.3s ease;
}

/* 搜索框增强 */
.emoji-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0 12px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.emoji-search-wrapper:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(57, 157, 255, 0.2);
}

.emoji-search-wrapper i {
    color: var(--text-dim);
    font-size: 14px;
    margin-right: 8px;
}

.emoji-search-wrapper input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: var(--text) !important;
    font-size: 13px;
    padding: 8px 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.emoji-picker-tabs {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.emoji-picker-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.emoji-picker-tabs::-webkit-scrollbar {
    display: none;
}

.emoji-tab-btn {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.emoji-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.emoji-tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(57, 157, 255, 0.3);
    transform: translateY(-1px);
}

/* 优化 Emoji 选择器滚动条 - 复用 Modal 规范 */
.emoji-grid::-webkit-scrollbar {
    width: 6px;
}
.emoji-grid::-webkit-scrollbar-track {
    background: transparent;
}
.emoji-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.emoji-grid {
    display: grid !important;
    grid-template-columns: repeat(10, 1fr) !important;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px 5px;
    scrollbar-width: thin;
}

@media (max-width: 600px) {
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 6px;
    }
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    overflow: hidden;
}

.emoji-item:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(57, 157, 255, 0.4);
    z-index: 2;
}

.emoji-item:active {
    transform: scale(0.95);
}

.emoji-picker-trigger {
    background: rgba(57, 157, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(57, 157, 255, 0.3);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    margin-left: 10px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.emoji-picker-trigger:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(57, 157, 255, 0.3);
}

/* ==================== Task 2 & Task 3: PWA 离线感知与高斯呼吸焦点环 ==================== */
.network-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-left: 8px;
    display: inline-block;
    flex-shrink: 0;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
    cursor: help;
}
.network-status-dot.online {
    background-color: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.7);
    animation: online-pulse 1.8s infinite;
}
.network-status-dot.offline {
    background-color: #e67e22;
    box-shadow: 0 0 8px rgba(230, 126, 34, 0.7);
    animation: offline-pulse 1.8s infinite;
}
@keyframes online-pulse {
    0% { transform: scale(1); box-shadow: 0 0 4px rgba(46, 204, 113, 0.4); }
    50% { transform: scale(1.2); box-shadow: 0 0 10px rgba(46, 204, 113, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 4px rgba(46, 204, 113, 0.4); }
}
@keyframes offline-pulse {
    0% { transform: scale(1); box-shadow: 0 0 4px rgba(230, 126, 34, 0.4); }
    50% { transform: scale(1.2); box-shadow: 0 0 10px rgba(230, 126, 34, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 4px rgba(230, 126, 34, 0.4); }
}

/* 极客无障碍高斯呼吸灯焦点环 */
*:focus-visible {
    outline: 2px solid var(--primary-color, #3498db) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 12px var(--primary-color, #3498db) !important;
    transition: outline-offset 0.15s, box-shadow 0.15s !important;
}

/* 键盘快捷键 kbd 视觉美化 - 自适应亮暗双重主题 */
kbd {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text) !important; /* 👈 自适应文字颜色，暗黑为纯白，明亮为深灰，100% 可见 */
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: monospace;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    text-shadow: none !important;
}

body.light-theme kbd {
    background-color: rgba(0, 0, 0, 0.06) !important; /* 👈 明亮模式下改用半透明淡黑色背景，避免白底白字 */
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

.keyboard-shortcuts-list span {
    color: var(--text) !important; /* 👈 强力确保在所有模式下左侧按键文本或连字符都是清晰可见的主文字颜色 */
}
