/* =========================================================
   TrackServe - Served Beneficiaries Module Stylesheet (Compact Vertical Layout)
   ========================================================= */

/* Desktop Horizontal Layout for Summary Stats & Filters */
.served-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

@media (max-width: 1200px) {
    .served-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .served-stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card.served-total {
    border-top: 3px solid #10b981;
}
.stat-card.served-total .stat-icon {
    background: #ecfdf5;
    color: #059669;
}

.stat-card.served-health {
    border-top: 3px solid #059669;
}
.stat-card.served-health .stat-icon {
    background: #e6f9ed;
    color: #047857;
}

.stat-card.served-edu {
    border-top: 3px solid #0284c7;
}
.stat-card.served-edu .stat-icon {
    background: #f0f9ff;
    color: #0284c7;
}

.stat-card.served-livelihood {
    border-top: 3px solid #f59e0b;
}
.stat-card.served-livelihood .stat-icon {
    background: #fffbeb;
    color: #d97706;
}

.stat-card.served-social {
    border-top: 3px solid #8b5cf6;
}
.stat-card.served-social .stat-icon {
    background: #f5f3ff;
    color: #7c3aed;
}

/* Accomplished Tag / Date Served */
.served-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 800;
}

/* Agency Accomplishment Card Header */
.agency-card.served-agency {
    border-left: 3px solid #10b981;
}

.agency-avatar.served {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.22);
    overflow: hidden;
    position: relative;
}

.agency-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn-agency-report {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    background: #059669;
    color: #ffffff;
    border: 1px solid #059669;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-agency-report:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.25);
}

.btn-agency-report.icon-only {
    width: 27px;
    height: 27px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 6px;
}



.btn-revert-sm {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    background: #fff8e6;
    color: #b45309;
    border: 1px solid #fde68a;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-revert-sm:hover {
    background: #f59e0b;
    color: #ffffff;
    border-color: #d97706;
}

/* Accomplishment Report Sheet */
.served-report-sheet {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    padding: 32px 38px;
    max-width: 860px;
    margin: 0 auto;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #0f172a;
    line-height: 1.4;
}

@media print {
    body * {
        visibility: hidden;
    }
    .served-report-sheet, .served-report-sheet * {
        visibility: visible;
    }
    .served-report-sheet {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        border: none;
        box-shadow: none;
    }
    .slip-modal-header, .slip-modal-footer, .side-panel-backdrop, .app-shell {
        display: none !important;
    }
}
