/* ============================================================================
   Solidarity Impact Dashboard & Report Styles
   Prefix: si- (solidarity impact)
   ============================================================================ */

/* Container */
.si-container {
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
}

/* Header Banner */
.si-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 25px 30px;
    background: linear-gradient(135deg, #1A6355 0%, #b9475e 100%);
    border-radius: 10px;
    color: #fff;
}
.si-header h1 {
    margin: 0;
    font-size: 28px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 12px;
}
.si-header .si-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
}
.si-header-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.si-header-filters select,
.si-header-filters input[type="date"] {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 13px;
}
.si-header-filters select option {
    color: #333;
    background: #fff;
}
.si-header-filters input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}
.si-btn-filter {
    padding: 8px 18px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
}
.si-btn-filter:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
    text-decoration: none;
}

/* Hero Stats Cards - 4 column grid */
.si-hero-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.si-hero-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.si-hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.si-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.si-hero-card.portions::before { background: #e79275; }
.si-hero-card.rural::before { background: #1A6355; }
.si-hero-card.network::before { background: #bf833a; }
.si-hero-card.fulfillment::before { background: #3b82f6; }

.si-hero-card .si-card-icon {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
}
.si-hero-card .si-card-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin: 8px 0;
    font-family: 'Barlow Condensed', sans-serif;
}
.si-hero-card.portions .si-card-value { color: #e79275; }
.si-hero-card.rural .si-card-value { color: #1A6355; }
.si-hero-card.network .si-card-value { color: #bf833a; }
.si-hero-card.fulfillment .si-card-value { color: #3b82f6; }

.si-hero-card .si-card-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.si-hero-card .si-card-desc {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
    line-height: 1.4;
}

/* Progress Bar (fulfillment card) */
.si-progress-bar {
    width: 100%;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    margin-top: 12px;
    overflow: hidden;
}
.si-progress-bar .si-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.6s ease;
}

/* Section Panels */
.si-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    overflow: hidden;
}
.si-section-header {
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.si-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.si-section-body {
    padding: 24px;
}

/* Timeline Bar Chart (CSS-only) */
.si-timeline-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding: 0 10px;
}
.si-timeline-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}
.si-timeline-bar .si-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(180deg, #1A6355, #2a8a77);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.4s ease;
    position: relative;
}
.si-timeline-bar .si-bar:hover {
    opacity: 0.85;
}
.si-timeline-bar .si-bar-value {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #1A6355;
    white-space: nowrap;
}
.si-timeline-bar .si-bar-label {
    margin-top: 8px;
    font-size: 11px;
    color: #888;
    text-align: center;
}

/* Partner Breakdown Table */
.si-partner-table {
    width: 100%;
    border-collapse: collapse;
}
.si-partner-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8f8f8;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}
.si-partner-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #444;
}
.si-partner-table tr:hover td {
    background: #fafafa;
}
.si-partner-table .si-partner-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
}

/* Quick Links */
.si-quick-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.si-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #1A6355;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.si-quick-link:hover {
    background: #1A6355;
    color: #fff;
    border-color: #1A6355;
}

/* Category Tags */
.si-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.si-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f0f7f5;
    border: 1px solid #d4e8e2;
    border-radius: 20px;
    font-size: 13px;
    color: #1A6355;
}
.si-category-tag .si-tag-count {
    background: #1A6355;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Coefficient Table */
.si-coeff-table {
    width: 100%;
    border-collapse: collapse;
}
.si-coeff-table th {
    text-align: left;
    padding: 10px 14px;
    background: #f8f8f8;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #eee;
}
.si-coeff-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.si-coeff-table input[type="number"] {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}
.si-coeff-table .si-btn-save {
    padding: 5px 14px;
    background: #1A6355;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.si-coeff-table .si-btn-save:hover {
    background: #145248;
}
.si-coeff-table .si-btn-delete {
    padding: 5px 14px;
    background: #d63e2e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* Delivery Gallery */
.si-delivery-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.si-delivery-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    aspect-ratio: 4/3;
}
.si-delivery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.si-delivery-thumb .si-thumb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 12px;
}
.si-delivery-thumb .si-thumb-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(214,62,46,0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.si-pdf-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #eee;
}
.si-pdf-file i {
    font-size: 24px;
    color: #d63e2e;
}

/* ============================================================================
   PUBLIC REPORT STYLES
   ============================================================================ */

.si-public-report {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Fira Sans', sans-serif;
    color: #333;
    background: #fff;
}
.si-public-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}
.si-public-header img.si-logo {
    max-height: 50px;
    margin-bottom: 20px;
}
.si-public-header h1 {
    font-size: 32px;
    font-family: 'Barlow Condensed', sans-serif;
    color: #1A6355;
    margin: 0 0 8px;
}
.si-public-header .si-date-range {
    font-size: 15px;
    color: #888;
}

.si-public-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.si-public-card {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}
.si-public-card.portions {
    background: linear-gradient(135deg, #fff5f2, #ffe8e0);
    border: 1px solid #f5d5cb;
}
.si-public-card.rural {
    background: linear-gradient(135deg, #f0faf7, #ddf2ec);
    border: 1px solid #c5e4da;
}
.si-public-card.network {
    background: linear-gradient(135deg, #fdf8f0, #f8eddb);
    border: 1px solid #ecdcc3;
}
.si-public-card.fulfillment {
    background: linear-gradient(135deg, #f0f5ff, #dde7ff);
    border: 1px solid #c3d4f5;
}
.si-public-card .si-pub-value {
    font-size: 56px;
    font-weight: 700;
    font-family: 'Barlow Condensed', sans-serif;
    line-height: 1;
    margin: 10px 0;
}
.si-public-card.portions .si-pub-value { color: #e79275; }
.si-public-card.rural .si-pub-value { color: #1A6355; }
.si-public-card.network .si-pub-value { color: #bf833a; }
.si-public-card.fulfillment .si-pub-value { color: #3b82f6; }

.si-public-card .si-pub-label {
    font-size: 14px;
    color: #666;
    margin-top: 6px;
    line-height: 1.4;
}

.si-public-photos {
    margin-bottom: 40px;
}
.si-public-photos h2 {
    font-size: 22px;
    font-family: 'Barlow Condensed', sans-serif;
    color: #1A6355;
    margin-bottom: 20px;
}
.si-public-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.si-public-photo-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.si-public-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    color: #888;
    font-size: 13px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1050px) {
    .si-hero-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 670px) {
    .si-header {
        flex-direction: column;
        text-align: center;
    }
    .si-hero-cards {
        grid-template-columns: 1fr;
    }
    .si-hero-card .si-card-value {
        font-size: 36px;
    }
    .si-header-filters {
        flex-direction: column;
        width: 100%;
    }
    .si-header-filters select,
    .si-header-filters input[type="date"] {
        width: 100%;
    }
    .si-public-cards {
        grid-template-columns: 1fr;
    }
    .si-public-card .si-pub-value {
        font-size: 40px;
    }
    .si-timeline-chart {
        height: 120px;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .si-public-report {
        max-width: 100%;
        padding: 20px;
    }
    .si-public-card {
        break-inside: avoid;
        border: 1px solid #ddd !important;
    }
    .si-public-photos img {
        max-height: 150px;
    }
    .si-public-footer {
        margin-top: 30px;
    }
    .si-no-print {
        display: none !important;
    }
}
