/* ============================================
   小悟学伴 - 管理后台样式
   ============================================ */

.admin-page {
    min-height: calc(100vh - 60px);
    background: #f1f5f9;
    padding: 40px 24px;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* === 管理员子导航 === */
.admin-subnav {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
}

.admin-subnav-item {
    flex: 1;
    text-align: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
}

.admin-subnav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.admin-subnav-item.active {
    background: #0ea5e9;
    color: #fff;
    font-weight: 600;
}

.admin-header {
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.admin-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

/* === 侧边栏 === */
.admin-sidebar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.admin-sidebar h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.pending-item {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.pending-item:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.pending-item.active {
    border-color: #0ea5e9;
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(14,165,233,0.15);
}

.pending-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.pending-item .pending-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}

/* === 审核主面板 === */
.admin-main {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    min-height: 500px;
}

/* 作品信息 */
.review-submission-info {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.review-submission-info h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.review-meta-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 12px;
}

.review-file-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    font-size: 3rem;
}

.review-file-preview img,
.review-file-preview video {
    max-width: 100%;
    max-height: 360px;
    border-radius: 6px;
}

/* AI评分区域 */
.review-ai-section {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.review-ai-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-score-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.ai-score-item {
    text-align: center;
    background: #fff;
    border-radius: 8px;
    padding: 12px 8px;
}

.ai-score-item .dim-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.ai-score-item .dim-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f59e0b;
}

.ai-total {
    text-align: center;
    font-weight: 600;
    color: #92400e;
    font-size: 0.9rem;
}

.ai-comment {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(251,191,36,0.3);
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.6;
}

/* 管理员评分表单 */
.review-form {
    margin-bottom: 24px;
}

.review-form h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.score-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.score-input {
    text-align: center;
}

.score-input label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
}

.score-input input {
    width: 80px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
}

.score-input input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}

.total-score {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 20px;
}

/* 评语 */
.review-comment-area {
    margin-bottom: 20px;
}

.review-comment-area label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
}

.review-comment-area textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    line-height: 1.6;
}

.review-comment-area textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}

/* 操作按钮 */
.review-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

/* 勋章选择器 */
.badge-selector {
    margin-bottom: 20px;
}

.badge-selector-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 10px;
}

.badge-selector-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.badge-group-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    min-width: 36px;
}

.badge-option {
    padding: 6px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
    background: #fff;
    font-family: inherit;
    white-space: nowrap;
}

.badge-option:hover { border-color: #94a3b8; }

.badge-option.selected {
    border-color: #f59e0b;
    background: #fffbeb;
    font-weight: 700;
    color: #92400e;
}

.badge-option-none {
    color: #94a3b8;
    border-style: dashed;
}

.badge-option-none.selected {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #64748b;
}

.badge-tier-gold { border-left: 3px solid #f59e0b; }
.badge-tier-silver { border-left: 3px solid #94a3b8; }
.badge-tier-bronze { border-left: 3px solid #d97706; }

/* === 挑战管理表格 === */
.challenge-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

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

.challenge-table-wrap th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.challenge-table-wrap td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.challenge-table-wrap tbody tr:hover {
    background: #f8fafc;
}

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

/* 响应式 */
@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar { position: static; max-height: none; }
    .score-inputs { grid-template-columns: repeat(3, 1fr); }
    .ai-score-display { grid-template-columns: repeat(3, 1fr); }
}

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