/* Scoped resets — only inside .schemes-page */
.schemes-page,
.schemes-page * {
    box-sizing: border-box;
}

.schemes-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #364153;
    line-height: 1.5;
}

    .schemes-page img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .schemes-page button {
        cursor: pointer;
        border: none;
        font-family: inherit;
    }

    .schemes-page input,
    .schemes-page select {
        font-family: inherit;
    }

/* Header section */
.header-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-bottom: 24px;
}

.header-top {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 34px;
    color: #47443f;
}

.page-subtitle {
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    color: #364153;
}

.create-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background-color: #3371ce;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

    .create-btn:hover {
        background-color: #2563eb;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(51, 113, 206, 0.3);
    }

    .create-btn:active {
        transform: translateY(0);
    }

/* Statistics cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    border-radius: 16px;
    border: 0 solid;
}

.stat-card-purple {
    background: linear-gradient(135deg, #f5edff 0%, #fffeff 100%);
    border-color: #d8d2e0;
}

.stat-card-blue {
    background: linear-gradient(135deg, #ecf4ff 0%, #fffeff 100%);
    border-color: #d8d2e0;
}

.stat-card-green {
    background: linear-gradient(135deg, #f1fff8 0%, #fffeff 100%);
    border-color: #d2dee0;
}

.stat-card-yellow {
    background: linear-gradient(135deg, #fffbe8 0%, #fffeff 100%);
    border-color: #d2dee0;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    padding: 12px;
    flex-shrink: 0;
}

.stat-icon-purple {
    background-color: #f3e8ff;
}

.stat-icon-blue {
    background-color: #dbeafe;
}

.stat-icon-green {
    background-color: #d8fbe8;
}

.stat-icon-yellow {
    background-color: #fff5ce;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.stat-label {
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: #395a45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    line-height: 30px;
    color: #085726;
}

/* Filter section */
.filter-section {
    background-color: #ffffff;
    border: 1px solid #e6ece9;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 4px 4px 12px rgba(233, 233, 233, 0.25);
    margin-bottom: 24px;
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 16px 44px;
    background-color: #f3f3f3;
    border: 1px solid #f3f3f3;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #a8a7a7;
    width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a8a7a7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}

    .search-input:focus {
        outline: 2px solid #3371ce;
        outline-offset: 2px;
    }

.dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background-color: #f3f3f3;
    border: 1px solid #f3f3f3;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    color: #4d5a55;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234d5a55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 16px) center;
    cursor: pointer;
}

    .dropdown:focus {
        outline: 2px solid #3371ce;
        outline-offset: 2px;
    }

/* Scheme cards grid */
.schemes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

.scheme-card {
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 4px 4px 10px rgba(225, 225, 225, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scheme-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.scheme-title-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.scheme-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    color: #105222;
}

.scheme-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.badge-dark {
    background-color: #232231;
    color: #f7f7f7;
    padding: 4px 10px 4px 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f7f7f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'%3E%3C/path%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}

.badge-green {
    background-color: #dbfce7;
    color: #297f41;
    border: 1px solid #ade3c1;
    padding: 4px 10px 4px 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='4' cy='4' r='4' fill='%23297f41'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}

.scheme-meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.meta-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.meta-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    text-transform: capitalize;
    color: rgba(0, 38, 27, 0.6);
}

.scheme-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background-color: #ffffff;
    border: 1px solid #e6ece9;
    border-radius: 10px;
    box-shadow: 2px 2px 8px rgba(233, 233, 233, 0.25);
}

.stat-item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.stat-item-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
}

.stat-item-label-green {
    color: #788219;
}

.stat-item-label-red {
    color: #996f6e;
}

.stat-item-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 22px;
}

.stat-item-value-green {
    color: #5a630b;
}

.stat-item-value-red {
    color: #71221f;
}

.stat-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    padding: 6px;
    flex-shrink: 0;
}

.stat-item-icon-green {
    background-color: #f9ffc3;
}

.stat-item-icon-red {
    background-color: #fff5ce;
}

/* --- UPDATED REWARD SHOWCASE (Matches Design) --- */
.reward-showcase {
    position: relative;
    background: linear-gradient(100deg, #ffffff 0%, #e6fcf0 100%);
    border: 1px solid #d1fae5;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.reward-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.shape-circle-1 {
    position: absolute;
    top: -40px;
    right: 15%;
    width: 120px;
    height: 120px;
    background-color: rgba(167, 243, 208, 0.3);
    border-radius: 50%;
}

.shape-circle-2 {
    position: absolute;
    bottom: -60px;
    right: 30%;
    width: 200px;
    height: 200px;
    background-color: rgba(167, 243, 208, 0.2);
    border-radius: 50%;
}

.shape-gift {
    position: absolute;
    bottom: -5px;
    right: -10px;
    width: 140px;
    height: auto;
    opacity: 0.9;
}

.reward-curve-overlay {
    position: absolute;
    top: -50%;
    left: 120px; /* Overlaps the image slightly */
    width: 400px;
    height: 200%;
    background-color: #ffffff;
    border-radius: 50%;
    z-index: 1;
    opacity: 0.6;
}

.reward-image-container {
    width: 140px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.reward-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reward-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 24px 24px 32px;
    position: relative;
    z-index: 3;
}

.reward-badge {
    background-color: #10b981;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 12px;
}

.reward-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 700;
    color: #065f46;
}

.reward-description {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
    max-width: 95%;
}

/* View details button */
.view-details-btn {
    width: 100%;
    padding: 10px 24px;
    background-color: #3371ce;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

    .view-details-btn:hover {
        background-color: #2563eb;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(51, 113, 206, 0.3);
    }

    .view-details-btn:active {
        transform: translateY(0);
    }

/* --- RESPONSIVE FIXES --- */
@media (max-width: 640px) {
    .reward-showcase {
        flex-direction: column;
    }

    .reward-image-container {
        width: 100%;
        height: 180px;
    }

    .reward-text {
        padding: 24px;
    }

    .reward-description {
        max-width: 100%;
    }

    .reward-curve-overlay {
        display: none; /* Hide curve on mobile to keep layout clean */
    }
}

@media (min-width: 640px) {
    .page-title {
        font-size: 28px;
    }

    .page-subtitle {
        font-size: 18px;
    }

    .header-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .header-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .create-btn {
        width: auto;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .stat-label {
        font-size: 16px;
    }

    .stat-value {
        font-size: 28px;
    }

    .filter-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .search-input {
        flex: 1 1 100%;
        font-size: 16px;
    }

    .dropdown {
        flex: 1 1 calc(33.333% - 12px);
        width: auto;
    }

    .scheme-title {
        font-size: 18px;
    }

    .meta-text {
        font-size: 13px;
    }

    .scheme-title-row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .meta-row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
    }

    .meta-item {
        width: auto;
    }

    .scheme-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .stat-item {
        flex: 1 1 180px;
    }
}

@media (min-width: 768px) {
    .search-input {
        flex: 1 1 250px;
    }

    .dropdown {
        flex: 1 1 140px;
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .schemes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .filter-container {
        flex-wrap: nowrap;
    }
}

