/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.admin-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation */
.admin-nav {
    background: white;
    border-bottom: 1px solid #e1e8ed;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.filter-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-refresh,
.btn-export {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-export {
    background: #17a2b8;
}

.btn-refresh:hover {
    background: #218838;
}

.btn-export:hover {
    background: #138496;
}

.btn-back {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: #495057;
    border-color: #adb5bd;
    background: #f8f9fa;
}

/* Main content */
.admin-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 20px;
    width: 100%;
}

.reports-container {
    display: grid;
    gap: 20px;
}

/* Loading placeholder */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-content h3 {
    color: #6c757d;
    margin-bottom: 10px;
    font-size: 20px;
}

.empty-content p {
    color: #adb5bd;
    font-size: 16px;
}

/* Report cards */
.report-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.report-card.pending {
    border-left-color: #ffc107;
}

.report-card.approved {
    border-left-color: #28a745;
}

.report-card.rejected {
    border-left-color: #dc3545;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 15px;
}

.report-title {
    flex: 1;
}

.report-title h3 {
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 600;
}

.report-subtitle {
    color: #6c757d;
    font-size: 14px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.status-badge.approved {
    background: rgba(40, 167, 69, 0.15);
    color: #155724;
}

.status-badge.rejected {
    background: rgba(220, 53, 69, 0.15);
    color: #721c24;
}

.status-badge.published {
    background: rgba(40, 167, 69, 0.15);
    color: #155724;
}

.report-content {
    margin-bottom: 16px;
}

.report-type-badge {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.report-description {
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.report-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.reporter-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #adb5bd;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #6c757d;
}

.modal-body {
    padding: 30px;
}

.review-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f3f4;
}

.review-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.review-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
}

.info-grid {
    display: grid;
    gap: 16px;
}

.info-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    align-items: start;
}

.info-row.full-width {
    grid-template-columns: 1fr;
}

.info-row label {
    font-weight: 600;
    color: #6c757d;
    font-size: 14px;
}

.info-row span {
    color: #495057;
}

.type-badge {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.correct-info-display,
.description-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    color: #495057;
    white-space: pre-wrap;
    line-height: 1.5;
}

#adminNotes {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#adminNotes:focus {
    outline: none;
    border-color: #3498db;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 24px 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.btn-reject,
.btn-approve {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-reject {
    background: #dc3545;
    color: white;
}

.btn-reject:hover {
    background: #c82333;
}

.btn-approve {
    background: #28a745;
    color: white;
}

.btn-approve:hover {
    background: #218838;
}

/* Confirm dialog */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.confirm-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: modalSlideIn 0.3s ease-out;
}

.confirm-content h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 18px;
}

.confirm-content p {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-cancel,
.btn-confirm {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-confirm {
    background: #dc3545;
    color: white;
}

.btn-confirm:hover {
    background: #c82333;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-stats {
        gap: 20px;
    }

    .nav-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav-filters {
        flex-wrap: wrap;
    }

    .nav-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .admin-main {
        padding: 20px 15px;
    }

    .report-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .report-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 20px;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-reject,
    .btn-approve {
        width: 100%;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

/* Status indicators */
.priority-high {
    border-left-color: #dc3545 !important;
}

.priority-medium {
    border-left-color: #ffc107 !important;
}

.priority-low {
    border-left-color: #28a745 !important;
}

/* 通知樣式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
    word-wrap: break-word;
}

.notification-success {
    background: #27ae60;
}

.notification-error {
    background: #e74c3c;
}

.notification-warning {
    background: #f39c12;
}

.notification-info {
    background: #3498db;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
} 