/* ===== Admin Styles ===== */

/* Admin tab content transition */
.admin-tab-content {
    animation: fadeIn 0.35s ease-out;
}

/* Draft card in admin */
.draft-card {
    position: relative;
}

.draft-card .draft-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.draft-status.new { background: #E3F2FD; color: #1565C0; }
.draft-status.reviewed { background: #FFF3E0; color: #E65100; }
.draft-status.used { background: #E8F5E9; color: #2E7D32; }
.draft-status.discarded { background: #FFEBEE; color: #C62828; }

/* Compose question item */
.compose-q-item {
    background: white;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid #E5E7EB;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.2s;
}

.compose-q-item:hover {
    border-color: #D1D5DB;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.compose-q-item .drag-handle {
    cursor: grab;
    color: #9CA3AF;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.compose-q-item .drag-handle:hover {
    color: #6B7280;
}

.compose-q-item .drag-handle:active {
    cursor: grabbing;
}

.compose-q-item .q-content {
    flex: 1;
    min-width: 0;
}

.compose-q-item .q-content .q-text {
    font-size: 14px;
    font-weight: 500;
    color: #1A1A2E;
    margin-bottom: 6px;
    word-wrap: break-word;
    line-height: 1.4;
}

.compose-q-item .q-content .q-meta {
    font-size: 11px;
    color: #9CA3AF;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.compose-q-item .q-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.compose-q-item .q-actions button {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.compose-q-item .q-actions .btn-edit {
    background: #E3F2FD;
    color: #1565C0;
}

.compose-q-item .q-actions .btn-delete {
    background: #FFEBEE;
    color: #C62828;
}

.compose-q-item .q-actions button:hover {
    transform: scale(1.1);
}

/* Difficulty bar chart */
.diff-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.diff-bar-label {
    width: 65px;
    font-size: 12px;
    color: #666;
    text-align: left;
}

.diff-bar {
    flex: 1;
    height: 24px;
    background: #F3F4F6;
    border-radius: 12px;
    overflow: hidden;
}

.diff-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    min-width: 28px;
}

.diff-bar-fill.d-1 { background: linear-gradient(90deg, #4CAF50, #2E7D32); }
.diff-bar-fill.d-2 { background: linear-gradient(90deg, #8BC34A, #689F38); }
.diff-bar-fill.d-3 { background: linear-gradient(90deg, #FFC107, #F57F17); }
.diff-bar-fill.d-4 { background: linear-gradient(90deg, #FF9800, #E65100); }
.diff-bar-fill.d-5 { background: linear-gradient(90deg, #F44336, #C62828); }

/* Difficulty alert */
.diff-alert {
    padding: 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.diff-alert.balanced {
    background: #E8F5E9;
    color: #2E7D32;
}

.diff-alert.too-easy {
    background: #E3F2FD;
    color: #1565C0;
}

.diff-alert.too-hard {
    background: #FFEBEE;
    color: #C62828;
}

/* User card in admin */
.user-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.user-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.user-card .user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

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

.user-card .user-info .user-name {
    font-weight: 600;
    font-size: 15px;
}

.user-card .user-info .user-email {
    font-size: 12px;
    color: #9CA3AF;
}

.user-card .user-badge {
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.user-badge.admin {
    background: #EDE7F6;
    color: #1B3A5C;
}

.user-badge.user {
    background: #F3F4F6;
    color: #666;
}

/* Quiz manage card */
.quiz-manage-card {
    position: relative;
    transition: all 0.2s;
}

.quiz-manage-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.quiz-manage-card .quiz-status {
    display: inline-flex;
    padding: 3px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.quiz-status.draft { background: #FFF3E0; color: #E65100; }
.quiz-status.published { background: #E8F5E9; color: #2E7D32; }
.quiz-status.archived { background: #F3F4F6; color: #666; }
.quiz-status.scheduled { background: #FFF8E1; color: #F57F17; }

/* AI suggestion cards */
.ai-suggestion {
    background: linear-gradient(135deg, #F8F7FF, #EEF0FF);
    border: 1px solid #E0DDFF;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.ai-suggestion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1B3A5C, #2A5580, #B0AEFF);
}

.ai-suggestion:hover {
    border-color: #1B3A5C;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.15);
}

.ai-suggestion .ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #1B3A5C, #2A5580);
    color: white;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ai-suggestion .ai-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 6px;
}

.ai-suggestion .ai-meta {
    font-size: 11px;
    color: #9CA3AF;
}

/* Auto-save indicator */
.auto-save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9CA3AF;
    transition: all 0.3s;
}

.auto-save-indicator.saving {
    color: #FFC107;
}

.auto-save-indicator.saved {
    color: #C9A84C;
}

/* Tags input */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    min-height: 44px;
    cursor: text;
    transition: all 0.2s;
}

.tags-container:focus-within {
    border-color: #1B3A5C;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #F3F4F6;
    border-radius: 8px;
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}

.tag-item .tag-remove {
    cursor: pointer;
    color: #9CA3AF;
    font-size: 10px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.tag-item .tag-remove:hover {
    background: #E5E7EB;
    color: #B5432A;
}

/* Admin section divider */
.admin-section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.admin-section-divider::before,
.admin-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.admin-section-divider span {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 500;
    white-space: nowrap;
}
