/* ==========================================================================
   Page & Body Overrides
   ========================================================================== */
body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    display: block;
    background-color: var(--gray-light, #f8fafc);
}

.reports-page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 20px 60px 20px;
}

.reports-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: var(--dark-blue, #0d254c);
}

.reports-header p {
    color: var(--gray, #64748b);
    margin: 0 0 24px 0;
    font-size: 15px;
}

/* ==========================================================================
   Search, Filters & Badges
   ========================================================================== */
.search-box {
    margin-bottom: 12px;
}

.filter-row {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.filter-dropdown {
    padding: 8px 12px;
    border: 1px solid var(--gray-border, #cbd5e1);
    border-radius: 6px;
    background-color: var(--white, #ffffff);
    font-size: 14px;
}

.count-badge {
    display: inline-block;
    background: #e2e8f0;
    color: var(--gray, #475569);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ==========================================================================
   Reports List & Grid
   ========================================================================== */
.reports-list {
    height: auto;
    overflow: visible;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .reports-page-wrapper {
        padding: 20px 16px 40px 16px;
    }
    .reports-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Report Cards
   ========================================================================== */
.report-card {
    background-color: var(--white, #ffffff);
    border: 1px solid var(--gray-border, #e2e8f0);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.report-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

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

.card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.low { background-color: #10b981; }
.status-dot.medium { background-color: #f59e0b; }
.status-dot.critical { background-color: #ef4444; }

.card-title-row h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--black, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    margin: 0 0 12px 0;
    font-size: 13.5px;
    color: var(--gray, #64748b);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-outline,
.badge-severity,
.badge-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-outline {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-severity.low { background-color: #dcfce7; color: #15803d; }
.badge-severity.medium { background-color: #fef3c7; color: #b45309; }
.badge-severity.critical { background-color: #fee2e2; color: #b91c1c; }

.badge-status { background-color: #dbeafe; color: #1d4ed8; }
.badge-status.in-review { background-color: #f3e8ff; color: #6b21a8; }
.badge-status.resolved { background-color: #dcfce7; color: #15803d; }

.card-thumb {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #e2e8f0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--gray-border, #e2e8f0);
    padding-top: 12px;
    font-size: 12px;
    color: var(--gray, #64748b);
}

.card-footer i {
    margin-right: 4px;
}

/* ==========================================================================
   Report Detail Modal Layout & Styling
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--white, #ffffff);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background-color: var(--dark-blue, #0d254c);
    color: #ffffff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.header-title-group h2 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.header-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.15s ease;
    padding: 0;
}

.close-btn:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-image-wrapper {
    width: 100%;
    max-height: 250px;
    background-color: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image-wrapper img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    display: block;
}

.modal-body p#detail-description {
    font-size: 14px;
    color: var(--black, #0f172a);
    line-height: 1.55;
    margin: 0;
}

.like-row {
    border-top: 1px solid var(--gray-border, #e2e8f0);
    padding-top: 14px;
    margin-top: 4px;
}

.submit-form-btn {
    width: 100%;
    padding: 10px 16px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--black, #0f172a);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.15s ease;
}

.submit-form-btn:hover:not(:disabled) {
    background-color: #e2e8f0;
}

.submit-form-btn.btn-success {
    background-color: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}