:root {
    --bg: #f3f5f4;
    --card: #ffffff;
    --text-main: #39443f;
    --text-soft: #7b8781;
    --border: #e6ece8;
    --green: #0d7a42;
    --green-soft: #eaf7ee;
    --green-mid: #d6efdc;
    --blue: #3372cf;
    --yellow-soft: #fff3c9;
    --yellow-text: #8a6b00;
    --danger: #ef5350;
}

.active-box {
    background: #cfead39e;
    border: 1px solid #b4e0ba;
    border-radius: 8px;
    min-height: 40px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.active-box-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #476151;
    margin-bottom: 2px;
}

.active-box-sub {
    font-size: 0.72rem;
    color: #7a8c82;
}

.form-switch .form-check-input {
    width: 2.5em;
    height: 1.35em;
    margin-top: 0;
    cursor: pointer;
    background-color: #28c840;
    border-color: #28c840;
}

    .form-switch .form-check-input:checked {
        background-color: #28c840;
        border-color: #28c840;
    }

.btn-add {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-add:hover {
        background: #2f74e5;
        color: #fff;
    }

.saved-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.saved-card {
    border-radius: 10px;
    background: linear-gradient(90deg,#eef9f06b, #d8f0dc 100%);
    border: 1px solid #d5ead8;
    padding: 12px;
    position: relative;
    overflow: hidden;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    /*.saved-card::after {
        content: "";
        position: absolute;
        right: -10px;*/ /* push slightly outside for better look */
        /*bottom: -10px;
        width: 160px;*/ /* increase size */
        /*height: 160px;
        background: url('_content/SPIC.MauiBlazorApp.Shared/images/FormIcons/Backgroundbuilding.svg') no-repeat bottom right;
        background-size: contain;
        opacity: 0.12;
        pointer-events: none;
        z-index: 0;
    }*/

.saved-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 8px;
    margin-bottom: 10px;
}

.saved-company {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.saved-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: #dbf3df;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.saved-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: #3f4b45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.saved-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.badge-active {
    background: #17c64a;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    border-radius: 3px;
    padding: 2px 6px;
}

.action-link {
    color: #4ba3ff;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
}

    .action-link.delete {
        color: #ff6c63;
    }

.year-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--yellow-soft);
    color: var(--yellow-text);
    border-radius: 5px;
    font-size: 0.62rem;
    padding: 3px 8px;
    margin-bottom: 14px;
    /* border: 1px solid #f3df97; */
}

.Exp-saved-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    position: relative;
    z-index: 1;
    margin-top: 12px; 
}

.stat-box {
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid #dbe6dd;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-label {
    font-size: 0.75rem !important;
    color: #809088 !important;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--green) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere; 
}

    .stat-value small {
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        color: #6c7a73 !important;
        margin-left: 2px;
    }

.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.btn-prev {
    background: #f6f7f7;
    border: 1px solid #dfe5e1;
    color: #8a958f;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 0.76rem;
    font-weight: 600;
}

.btn-next {
    background: #197b2f;
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-next:hover {
        background: #146626;
        color: #fff;
    }
.saved-card-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 124px;
    /* opacity: 0.12; */
    pointer-events: none;
    z-index: 0;
}
.form-label-custom-Outer {
    font-size: 1.0rem;
    font-weight: 600;
    color: #4B5563;
    margin-bottom: 6px;
}
.form-control-custom-Outer {
    /*  background-color: var(--bs-white);*/
    background: linear-gradient(90deg, #dbeafe38, #dbeafe 100%);
    border: 1px solid #0000001a;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 0.85rem;
    color: #374151;
    box-shadow: none;
}
    .form-control-custom-Outer:focus {
        outline: none;
        border-color: #059669; /* green highlight */
        box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
    }

.form-control-custom-outer::placeholder {
    color: #9CA3AF;
}

/* --- RESPONSIVE FIXES --- */

/* Tablets & Small Laptops (1024px iPad Pro view from your screenshot) */
@media (max-width: 1199.98px) {
    .saved-grid {
        /* Drop to 2 columns here instead of 3 to give text more horizontal space */
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-box {
        padding: 10px;
    }

    .stat-value {
        font-size: 0.95rem !important;
    }
}

/* Standard Mobile View */
@media (max-width: 767.98px) {
    .page-wrap {
        padding: 12px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .footer-nav {
        gap: 10px;
    }

    .saved-grid {
        /* Drop to 1 single column for the cards */
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1rem !important;
    }

    .stat-label {
        font-size: 0.7rem !important;
    }
}

/* Extremely Small Screens (320px view from your screenshot) */
@media (max-width: 480px) {
    .Exp-saved-stats {
        /* Stacks the "Total Quantity" and "Annual Turnover" boxes vertically */
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-box {
        padding: 10px 12px;
        /* Aligns label left and value right on mobile for a much cleaner look */
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .stat-label {
        margin-bottom: 0 !important; /* Remove margin since they are side-by-side */
    }

    .stat-value {
        text-align: right;
    }
}

