/* Admin Feedback Page Styles */

.admin-feedback-page {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-feedback-header {
    margin-bottom: 2rem;
}

.admin-feedback-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-feedback-header .back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
}

.admin-feedback-header .back-link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.admin-feedback-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Stats */
.admin-feedback-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card-value.warning {
    color: #eab308;
}

.stat-card-value.success {
    color: #22c55e;
}

/* Tabs */
.feedback-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

.feedback-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.feedback-tab:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.feedback-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.feedback-tab .material-icons-outlined {
    font-size: 18px;
}

.tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.feedback-tab:not(.active) .tab-count {
    background: var(--bg-tertiary);
}

/* Archived badge in modal */
.archived-badge {
    display: inline-block;
    background: #22c55e;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Reward badge in list */
.reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
}

.reward-badge .material-icons-outlined {
    font-size: 14px;
}

/* Archived item styling */
.feedback-item.archived {
    opacity: 0.8;
}

/* Filters */
.admin-feedback-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 13px;
    min-width: 150px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn-filter:hover {
    background: var(--accent-hover);
}

.btn-clear {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

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

/* Feedback List */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.feedback-item:hover {
    border-color: var(--accent-primary);
}

.feedback-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.feedback-item-user {
    display: flex;
    flex-direction: column;
}

.feedback-item-user .username {
    font-weight: 500;
    color: var(--text-primary);
}

.feedback-item-user .email {
    font-size: 12px;
    color: var(--text-secondary);
}

.feedback-item-meta {
    display: flex;
    gap: 8px;
}

.category-badge {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.new {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.status-badge.reviewed {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.status-badge.resolved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.feedback-item-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.feedback-item-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feedback-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.attachment-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.attachment-indicator .material-icons-outlined {
    font-size: 16px;
}

.feedback-item-actions {
    margin-left: auto;
}

.btn-view {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.btn-view:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* Empty State */
.admin-feedback-empty {
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
}

.admin-feedback-empty .material-icons-outlined {
    font-size: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Modal Overlay */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Detail Modal */
.admin-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.feedback-detail-modal {
    width: 700px;
    max-width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
}

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section .detail-label {
    margin-bottom: 8px;
}

.detail-message {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.attachment-preview {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.attachment-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
}

.attachment-preview img:hover {
    opacity: 0.9;
}

.attachment-name {
    display: block;
    padding: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-attachments {
    color: var(--text-tertiary);
    font-size: 13px;
    font-style: italic;
}

.detail-section textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.detail-section textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.detail-section select {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.detail-section select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-footer-right {
    display: flex;
    gap: 12px;
}

.btn-close-modal {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

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

.btn-delete {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-save {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn-save:hover {
    background: var(--accent-hover);
}

/* Image Fullscreen Overlay */
.image-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-fullscreen-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-fullscreen-overlay .close-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-fullscreen-overlay .close-fullscreen:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Reward Section */
.reward-section {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
}

.reward-issued {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #22c55e;
    font-size: 14px;
}

.reward-issued .material-icons-outlined {
    font-size: 20px;
}

.reward-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.reward-controls select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    width: auto;
}

.reward-controls select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn-reward {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn-reward:hover {
    background: rgba(34, 197, 94, 0.25);
}

.reward-hint {
    width: 100%;
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 4px 0 0 0;
}

.btn-message {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn-message:hover {
    background: rgba(59, 130, 246, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-feedback-page {
        padding: 1rem;
    }

    .admin-feedback-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
    }

    .feedback-item-header {
        flex-direction: column;
        gap: 8px;
    }

    .feedback-item-meta {
        align-self: flex-start;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .feedback-detail-modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}
