/* ==================== 管理员后台样式 ==================== */

/* 登录界面 */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--darker-bg) 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 50px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.login-logo {
    margin-bottom: 30px;
}

.login-logo .logo-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.login-logo h1 {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.8rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card h2 {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.login-card .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-card .form-group input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-card .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}

.login-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

.login-hint {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 管理面板 */
.admin-panel {
    display: flex;
    min-height: 100vh;
    background: var(--dark-bg);
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: var(--card-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-icon {
    font-size: 2rem;
}

.sidebar-header .logo-text {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.3rem;
    font-weight: 600;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.1);
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(108, 92, 231, 0.15);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-1);
}

.nav-item .icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-item .badge {
    margin-left: auto;
    background: #ff6b6b;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

/* 顶部栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 汉堡菜单按钮（桌面端隐藏，移动端显示） */
.sidebar-toggle {
    display: none;
}

.top-bar h1,
.top-bar h2 {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.5rem;
    color: var(--text-primary);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-name {
    color: var(--text-secondary);
}

.admin-badge {
    background: var(--gradient-1);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* 内容区域 */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 12px;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-number {
    font-family: 'EnglishRegular', monospace;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 最近活动 */
.recent-activity {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.recent-activity h3 {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(108, 92, 231, 0.1);
}

.activity-icon {
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 10px;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    color: var(--text-primary);
    margin-bottom: 3px;
}

.activity-content span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 数据表格 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.3rem;
    color: var(--text-primary);
}

/* 筛选按钮 */
.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
}

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

.filter-bar select {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    cursor: pointer;
}

.data-table-container {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.data-table th,
.data-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    font-family: 'EnglishRegular', 'Chinese';
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.data-table td {
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(108, 92, 231, 0.05);
}

.data-table .type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.type-badge.appeal {
    background: rgba(0, 206, 201, 0.2);
    color: #00cec9;
}

.type-badge.report {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.data-table .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-badge.punished {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.status-badge.accepted {
    background: rgba(0, 206, 201, 0.2);
    color: #00cec9;
}

.status-badge.no-action {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

.status-badge.cancelled {
    background: rgba(117, 117, 117, 0.2);
    color: #757575;
}

.action-btn {
    padding: 8px 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.modal-header h3 {
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1.3rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: 50vh;
}

/* 处理原因输入框 */
.modal-reason-group {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-reason-group label {
    display: block;
    margin-bottom: 10px;
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 0.95rem;
    color: #b0b0b0;
    font-weight: 500;
}

.modal-reason-group label .required-star {
    color: #ff6b6b;
    margin-left: 2px;
}

.modal-reason-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e0e0e0;
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-reason-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.modal-reason-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-family: 'EnglishRegular', 'Chinese';
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.punish {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.modal-btn.accept {
    background: linear-gradient(135deg, #00cec9 0%, #6c5ce7 100%);
    color: white;
}

.modal-btn.no-action {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid #9e9e9e;
}

.modal-btn.cancel {
    background: rgba(117, 117, 117, 0.2);
    color: #757575;
    border: 1px solid #757575;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

/* 详情信息 */
.detail-row {
    display: flex;
    margin-bottom: 15px;
}

.detail-label {
    width: 100px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    flex: 1;
    color: var(--text-primary);
}

.detail-value.code {
    font-family: 'EnglishRegular', monospace;
    background: rgba(108, 92, 231, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.detail-text {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 响应式 */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    /* 防止水平溢出 */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .admin-panel {
        overflow-x: hidden;
    }

    /* 汉堡菜单按钮 */
    .sidebar-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        z-index: 1001;
        margin-right: 15px;
    }

    .sidebar-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .sidebar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .sidebar-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .sidebar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* 侧边栏遮罩 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 998;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* 侧边栏 */
    .sidebar {
        width: 260px;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* 主内容区 */
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
    }

    /* 顶部栏 */
    .top-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

    .top-bar h1 {
        font-size: 1.2rem;
    }

    .user-info {
        font-size: 0.85rem;
    }

    .admin-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* 区块标题 */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    /* 筛选按钮 */
    .filter-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: 60px;
        padding: 8px 12px;
        font-size: 0.85rem;
        text-align: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.3s ease;
    }

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

    /* 表格横向滚动 */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }

    .data-table {
        min-width: 600px;
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }

    .data-table th {
        font-size: 0.8rem;
    }

    /* 操作按钮 */
    .action-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* 最近的动态 */
    .recent-activity {
        padding: 18px;
    }

    .recent-activity h2 {
        font-size: 1.1rem;
    }

    .activity-item {
        padding: 12px;
        gap: 10px;
    }

    .activity-icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .activity-content p {
        font-size: 0.9rem;
    }

    .activity-content span {
        font-size: 0.75rem;
    }

    /* 弹窗全屏 */
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 90vh;
        border-radius: 16px;
    }

    .modal-header {
        padding: 18px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 18px;
        max-height: 55vh;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
        padding: 18px;
    }

    .modal-btn {
        padding: 14px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    /* 详情行垂直排列 */
    .detail-row {
        flex-direction: column;
        gap: 4px;
    }

    .detail-label {
        width: 100%;
    }

    .detail-text {
        font-size: 0.9rem;
        padding: 12px;
    }

    .modal-reason-group textarea {
        min-height: 70px;
        font-size: 0.9rem;
    }

    /* 登录页 */
    .login-card {
        margin: 0 15px;
        padding: 35px 25px;
    }

    .login-card h2 {
        font-size: 1.3rem;
    }

    .login-card .form-group input {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .login-btn {
        padding: 15px;
        font-size: 1rem;
    }

    /* 通知 */
    .notification {
        left: 15px;
        right: 15px;
        bottom: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .admin-panel {
        overflow-x: hidden;
    }

    .main-content {
        padding: 12px 8px;
    }

    .top-bar {
        padding-bottom: 12px;
        margin-bottom: 15px;
    }

    .top-bar h1 {
        font-size: 1rem;
    }

    .user-info {
        font-size: 0.75rem;
    }

    .admin-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    /* 侧边栏在小屏缩小宽度 */
    .sidebar {
        width: 240px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .stat-info h3 {
        font-size: 0.8rem;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .section-header h2 {
        font-size: 1rem;
    }

    /* 表格容器 */
    .table-wrapper {
        border-radius: 8px;
    }

    .data-table {
        min-width: 480px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    .action-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    .type-badge,
    .status-badge {
        padding: 3px 8px;
        font-size: 0.75rem;
    }

    /* 筛选按钮更紧凑 */
    .filter-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* 最近活动 */
    .recent-activity {
        padding: 15px;
    }

    .recent-activity h2 {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .activity-item {
        padding: 10px;
    }

    /* 弹窗 */
    .modal-content {
        width: 100%;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        position: fixed;
        bottom: 0;
    }

    .modal-header {
        padding: 15px 18px;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .modal-body {
        padding: 15px;
        max-height: 50vh;
    }

    .modal-footer {
        padding: 15px;
        gap: 8px;
    }

    .modal-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    /* 登录页 */
    .login-card {
        padding: 25px 20px;
        margin: 0 10px;
    }
}
