/* ============================================================
   BIOAUREA - Biodiversity & Carbon Credits Module (Feature #7)
   GLASSMORPHISM LUXURY EDITION
   Accent: Teal-Cyan #00bfa5 → #2dd4bf
   ============================================================ */

@keyframes bioReveal {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bioShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes bio-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
@keyframes bio-slide-in {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Modal Base ===== */
#biodiversity-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
#biodiversity-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
}

.bio-modal-content {
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    max-width: 780px;
    width: 100%;
    border-radius: 24px;
    border: 1px solid rgba(0, 191, 165, 0.1);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 1px 0 rgba(255,255,255,0.05) inset;
    position: relative;
    padding: 0;
    overflow: hidden;
    animation: bioReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bio-modal-header {
    padding: 24px 28px 18px;
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.06), rgba(45, 212, 191, 0.03));
    border-bottom: 1px solid rgba(0, 191, 165, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
.bio-modal-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00bfa5, #2dd4bf, transparent);
    background-size: 200% 100%;
    animation: bioShimmer 4s ease infinite;
}
.bio-modal-title {
    font-size: 1.3em;
    color: #ffffff;
    font-weight: 700;
    margin: 0;
}
.bio-modal-close {
    width: 32px; height: 32px;
    cursor: pointer;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
    color: rgba(176, 176, 176, 0.6);
    padding: 0;
}
.bio-modal-close svg {
    width: 16px; height: 16px;
    stroke: currentColor;
}
.bio-modal-close:hover {
    background: rgba(255,68,68,0.12);
    border-color: rgba(255,68,68,0.25);
    color: #ff4444;
    transform: rotate(90deg);
}

/* ===== Tabs ===== */
.bio-tab-container {
    display: flex;
    flex-direction: column;
}
.bio-tab-buttons {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    overflow: visible;
    border: none;
}
.bio-tab-button {
    flex: 1;
    padding: 14px 16px;
    text-align: center;
    cursor: pointer;
    background: transparent;
    color: rgba(176, 176, 176, 0.6);
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    font-size: 0.85em;
    font-family: 'Inter', sans-serif;
    position: relative;
}
.bio-tab-button::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 2px;
    background: linear-gradient(90deg, #00bfa5, #2dd4bf);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px 2px 0 0;
}
.bio-tab-button:hover:not(.bio-tab-active) {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
}
.bio-tab-button.bio-tab-active {
    background: rgba(0, 191, 165, 0.04);
    color: #00bfa5;
    border-bottom: none;
}
.bio-tab-button.bio-tab-active::after { left: 10%; right: 10%; }

.bio-tab-content { display: none; padding: 24px 28px; }
.bio-tab-content.active { display: block; }

/* ===== Form ===== */
.bio-form-group { margin-bottom: 14px; }
.bio-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.bio-form-label {
    display: block;
    color: rgba(176, 176, 176, 0.6);
    font-size: 0.78em;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.bio-form-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 191, 165, 0.12);
    border-radius: 12px;
    color: var(--text-primary, #fff);
    font-size: 0.88em;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(8px);
    box-sizing: border-box;
}
.bio-form-input:focus {
    outline: none;
    border-color: rgba(0, 191, 165, 0.4);
    box-shadow: 0 0 20px rgba(0, 191, 165, 0.08);
    background: rgba(0, 191, 165, 0.03);
}
.bio-form-input::placeholder { color: rgba(176, 176, 176, 0.3); }

.bio-button {
    padding: 14px 24px;
    background: linear-gradient(135deg, #00bfa5, #009688);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92em;
    transition: all 0.3s;
    width: 100%;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}
.bio-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    background-size: 200% 200%;
    animation: bioShimmer 3s ease infinite;
}
.bio-button:hover {
    box-shadow: 0 8px 32px rgba(0, 191, 165, 0.2);
    transform: translateY(-2px);
}
.bio-button:active { transform: translateY(0); }

/* ===== Score Cards — Glass ===== */
.bio-score-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.bio-score-card {
    padding: 22px;
    border-radius: 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s;
}
.bio-score-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 60%);
    pointer-events: none;
}
.bio-score-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.bio-card-bio {
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.06), rgba(45, 212, 191, 0.03));
    border: 1px solid rgba(0, 191, 165, 0.15);
}
.bio-card-carbon {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.06), rgba(100, 181, 246, 0.03));
    border: 1px solid rgba(33, 150, 243, 0.15);
}
.bio-card-nature {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.06), rgba(129, 199, 132, 0.03));
    border: 1px solid rgba(76, 175, 80, 0.15);
}
.bio-score-value {
    font-size: 2.8em;
    font-weight: 800;
    margin-bottom: 8px;
    color: #00bfa5;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    text-shadow: 0 0 30px rgba(0, 191, 165, 0.2);
}
.bio-card-carbon .bio-score-value { color: #64b5f6; text-shadow: 0 0 30px rgba(33, 150, 243, 0.2); }
.bio-card-nature .bio-score-value { color: #81c784; text-shadow: 0 0 30px rgba(76, 175, 80, 0.2); }

.bio-score-label {
    font-size: 0.82em;
    color: rgba(176, 176, 176, 0.6);
    margin-bottom: 14px;
    line-height: 1.3;
}
.bio-score-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}
.bio-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.bio-score-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: bioShimmer 2s ease infinite;
    background-size: 200% 100%;
}

/* ===== Indicators — Glass Progress ===== */
.bio-indicators-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.bio-indicators-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,191,165,0.1), transparent);
}
.bio-indicator-item { margin-bottom: 14px; }
.bio-indicator-item:last-child { margin-bottom: 0; }
.bio-indicator-label {
    font-size: 0.82em;
    color: rgba(176, 176, 176, 0.6);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}
.bio-indicator-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.bio-indicator-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.bio-indicator-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: bioShimmer 2s ease infinite;
    background-size: 200% 100%;
}
.bio-indicator-value {
    font-size: 0.78em;
    color: #2dd4bf;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ===== Habitat Assessment — Glass ===== */
.bio-habitat-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}
.bio-habitat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.bio-habitat-item {
    background: rgba(0, 191, 165, 0.03);
    backdrop-filter: blur(8px);
    padding: 14px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(0, 191, 165, 0.08);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.bio-habitat-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,191,165,0.1), transparent);
}
.bio-habitat-item:hover {
    background: rgba(0, 191, 165, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.bio-habitat-icon { font-size: 1.6em; margin-bottom: 8px; }
.bio-habitat-label {
    font-size: 0.75em;
    color: rgba(176, 176, 176, 0.5);
    margin-bottom: 6px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.bio-habitat-value {
    font-size: 1.3em;
    font-weight: 800;
    color: #2dd4bf;
    font-variant-numeric: tabular-nums;
}
.bio-habitat-class {
    font-size: 0.82em;
    color: #00bfa5;
    font-weight: 600;
    margin-top: 4px;
}

/* ===== Frameworks — Glass ===== */
.bio-frameworks-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}
.bio-frameworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.bio-framework-card {
    background: rgba(0, 191, 165, 0.03);
    backdrop-filter: blur(8px);
    padding: 14px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(0, 191, 165, 0.08);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.bio-framework-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,191,165,0.08), transparent);
}
.bio-framework-card:hover {
    background: rgba(0, 191, 165, 0.08);
    border-color: rgba(0, 191, 165, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.bio-framework-icon { font-size: 1.8em; margin-bottom: 8px; }
.bio-framework-name {
    font-size: 0.72em;
    color: rgba(176, 176, 176, 0.6);
    line-height: 1.3;
    font-weight: 600;
}

/* ===== Credits Breakdown — Glass ===== */
.bio-credits-breakdown { margin-bottom: 24px; }
.bio-credits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}
.bio-credit-type {
    padding: 20px;
    border-radius: 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s;
}
.bio-credit-type::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent 60%);
    pointer-events: none;
}
.bio-credit-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.bio-credit-carbon {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.06), rgba(100, 181, 246, 0.03));
    border: 1px solid rgba(33, 150, 243, 0.12);
}
.bio-credit-bio {
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.06), rgba(45, 212, 191, 0.03));
    border: 1px solid rgba(0, 191, 165, 0.12);
}
.bio-credit-icon { font-size: 1.8em; margin-bottom: 10px; }
.bio-credit-label {
    font-size: 0.78em;
    color: rgba(176, 176, 176, 0.5);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bio-credit-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #2dd4bf;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.bio-credit-carbon .bio-credit-value { color: #64b5f6; }
.bio-credit-price {
    font-size: 0.75em;
    color: rgba(176, 176, 176, 0.4);
    margin-bottom: 10px;
}
.bio-credit-amount {
    font-size: 1.1em;
    color: #4ade80;
    font-weight: 800;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-variant-numeric: tabular-nums;
}

/* ===== Total Value — Glass Banner ===== */
.bio-total-value {
    padding: 24px;
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.06), rgba(33, 150, 243, 0.04));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 191, 165, 0.15);
    border-radius: 18px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.bio-total-value::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent 60%);
    pointer-events: none;
}
.bio-total-label {
    font-size: 0.78em;
    color: rgba(176, 176, 176, 0.5);
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}
.bio-total-amount {
    font-size: 2.6em;
    font-weight: 800;
    color: #4ade80;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.2);
}
.bio-total-credits {
    font-size: 0.82em;
    color: rgba(176, 176, 176, 0.5);
}
.bio-total-breakdown {
    font-size: 0.82em;
    color: rgba(176, 176, 176, 0.5);
    margin-bottom: 6px;
}

/* ===== Revenue — Glass ===== */
.bio-revenue-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}
.bio-revenue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.bio-revenue-item {
    background: rgba(0, 191, 165, 0.03);
    backdrop-filter: blur(8px);
    padding: 14px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(0, 191, 165, 0.08);
    transition: all 0.3s;
}
.bio-revenue-item:hover {
    background: rgba(0, 191, 165, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.bio-revenue-label {
    font-size: 0.72em;
    color: rgba(176, 176, 176, 0.5);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bio-revenue-value {
    font-size: 1.5em;
    font-weight: 800;
    color: #4ade80;
    font-variant-numeric: tabular-nums;
}
.bio-revenue-note {
    font-size: 0.75em;
    color: rgba(176, 176, 176, 0.4);
    line-height: 1.4;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 12px;
}

/* ===== Species Richness — Glass ===== */
.bio-species-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}
.bio-species-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 191, 165, 0.04);
    backdrop-filter: blur(8px);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 191, 165, 0.1);
}
.bio-species-icon { font-size: 2em; }
.bio-species-info { flex: 1; }
.bio-species-category {
    font-size: 1.05em;
    color: #2dd4bf;
    font-weight: 700;
}
.bio-species-description {
    font-size: 0.78em;
    color: rgba(176, 176, 176, 0.5);
    margin-top: 3px;
}

/* ===== Ecoregion — Glass ===== */
.bio-ecoregion-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}
.bio-ecoregion-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: rgba(0, 191, 165, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(0, 191, 165, 0.08);
}
.bio-ecoregion-icon { font-size: 2em; flex-shrink: 0; }
.bio-ecoregion-info { flex: 1; }
.bio-ecoregion-name {
    font-size: 0.95em;
    color: #2dd4bf;
    font-weight: 700;
    margin-bottom: 4px;
}
.bio-ecoregion-desc {
    font-size: 0.78em;
    color: rgba(176, 176, 176, 0.6);
    margin-bottom: 8px;
    line-height: 1.5;
}
.bio-ecoregion-refs {
    font-size: 0.72em;
    color: rgba(176, 176, 176, 0.4);
    line-height: 1.5;
}

/* ===== Ecosystem Services — Glass ===== */
.bio-services-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}
.bio-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.bio-service-item {
    background: rgba(0, 191, 165, 0.03);
    backdrop-filter: blur(8px);
    padding: 12px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(0, 191, 165, 0.08);
    transition: all 0.3s;
}
.bio-service-item:hover {
    background: rgba(0, 191, 165, 0.06);
    transform: translateY(-2px);
}
.bio-service-icon { font-size: 1.5em; margin-bottom: 6px; }
.bio-service-label {
    font-size: 0.68em;
    color: rgba(176, 176, 176, 0.5);
    margin-bottom: 4px;
    line-height: 1.3;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.bio-service-value {
    font-size: 0.9em;
    color: #4ade80;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.bio-services-total {
    text-align: center;
    padding: 12px;
    background: rgba(76, 175, 80, 0.04);
    border-radius: 12px;
    font-size: 0.82em;
    color: rgba(176, 176, 176, 0.5);
    border: 1px solid rgba(76, 175, 80, 0.08);
}

/* ===== Ecosystem Value Banner ===== */
.bio-ecosystem-value-section {
    background: rgba(76, 175, 80, 0.04);
    backdrop-filter: blur(12px);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(76, 175, 80, 0.1);
    margin-bottom: 20px;
}
.bio-ecosystem-banner {
    text-align: center;
    font-size: 0.88em;
    color: #81c784;
    font-weight: 500;
}

/* ===== Uplift Potential — Glass ===== */
.bio-uplift-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}
.bio-uplift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.bio-uplift-item {
    background: rgba(0, 191, 165, 0.03);
    backdrop-filter: blur(8px);
    padding: 14px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(0, 191, 165, 0.08);
    transition: all 0.3s;
}
.bio-uplift-item:hover {
    background: rgba(0, 191, 165, 0.06);
    transform: translateY(-2px);
}
.bio-uplift-label {
    font-size: 0.72em;
    color: rgba(176, 176, 176, 0.5);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bio-uplift-value {
    font-size: 1.4em;
    color: #2dd4bf;
    font-weight: 800;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}
.bio-uplift-note {
    font-size: 0.72em;
    color: rgba(176, 176, 176, 0.4);
}
.bio-uplift-note-full {
    text-align: center;
    font-size: 0.78em;
    color: rgba(176, 176, 176, 0.4);
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 10px;
}

/* ===== Stacking & Framework Matrix — Glass ===== */
.bio-stacking-section,
.bio-framework-matrix-section {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}
.bio-stacking-matrix,
.bio-framework-matrix {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bio-stacking-row,
.bio-framework-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(0, 191, 165, 0.03);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    border: 1px solid rgba(0, 191, 165, 0.06);
    transition: all 0.25s;
}
.bio-stacking-row:hover,
.bio-framework-row:hover {
    background: rgba(0, 191, 165, 0.06);
    transform: translateX(4px);
}
.bio-stacking-row.ineligible,
.bio-framework-row.ineligible {
    background: rgba(244, 67, 54, 0.03);
    border-color: rgba(244, 67, 54, 0.08);
    opacity: 0.7;
}
.bio-stacking-row.eligible,
.bio-framework-row.eligible {
    background: rgba(0, 191, 165, 0.05);
    border-color: rgba(0, 191, 165, 0.12);
    border-left: 3px solid rgba(0, 191, 165, 0.4);
}
.bio-stacking-framework,
.bio-framework-icon {
    font-size: 0.88em;
    font-weight: 700;
    color: #2dd4bf;
    min-width: 140px;
}
.bio-framework-icon { font-size: 1.4em; color: inherit; }
.bio-stacking-status,
.bio-framework-info {
    flex: 1;
    font-size: 0.82em;
    color: rgba(176, 176, 176, 0.6);
}
.bio-framework-info { display: flex; flex-direction: column; }
.bio-framework-name { font-weight: 700; color: #2dd4bf; margin-bottom: 2px; font-size: 0.9em; }
.bio-framework-note { font-size: 0.78em; color: rgba(176, 176, 176, 0.4); }
.bio-stacking-stack,
.bio-framework-stack {
    white-space: nowrap;
    font-size: 0.75em;
    padding: 4px 10px;
    background: rgba(0, 191, 165, 0.08);
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(0, 191, 165, 0.1);
}
.bio-stacking-row.ineligible .bio-stacking-stack,
.bio-framework-row.ineligible .bio-framework-stack {
    background: rgba(244, 67, 54, 0.08);
    border-color: rgba(244, 67, 54, 0.1);
}

/* ===== Loading & Alerts ===== */
.bio-loading {
    text-align: center;
    padding: 50px;
    color: #2dd4bf;
    font-size: 1em;
    animation: bio-pulse 1.5s ease-in-out infinite;
}
.bio-error {
    background: rgba(244, 67, 54, 0.06);
    border: 1px solid rgba(244, 67, 54, 0.15);
    color: #ff6b6b;
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    backdrop-filter: blur(8px);
}
.bio-alert {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 0.88em;
    z-index: 10001;
    animation: bio-slide-in 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.bio-alert-info {
    background: rgba(33, 150, 243, 0.12);
    border: 1px solid rgba(33, 150, 243, 0.2);
    color: #64b5f6;
}
.bio-alert-success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.2);
    color: #81c784;
}
.bio-alert-error {
    background: rgba(244, 67, 54, 0.12);
    border: 1px solid rgba(244, 67, 54, 0.2);
    color: #ff6b6b;
}

/* ===== Section Headers (injected by JS) ===== */
.bio-section-title {
    font-size: 0.88em;
    font-weight: 700;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #biodiversity-modal.active { padding-top: 30px; }
    .bio-modal-content { max-width: 100%; border-radius: 16px; }
    .bio-tab-content { padding: 18px 20px; }
}
@media (max-width: 600px) {
    .bio-modal-content { margin: 10px; }
    .bio-form-row,
    .bio-score-container,
    .bio-habitat-grid,
    .bio-credits-grid,
    .bio-revenue-grid,
    .bio-frameworks-grid { grid-template-columns: 1fr; }
    .bio-tab-button { font-size: 0.78em; padding: 12px; }
    .bio-modal-title { font-size: 1.1em; }
    .bio-score-value { font-size: 2em; }
    .bio-total-amount { font-size: 1.8em; }
    .bio-alert { bottom: 10px; right: 10px; left: 10px; }
}
