/* =========================================================
   SMART NURSERY TRACKING
   SNT INTELLIGENCE STYLES
   ========================================================= */


/* =========================================================
   MAIN INTELLIGENCE SECTION
   ========================================================= */

.snt-intelligence-section {
    width: 100%;
    margin: 30px 0;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-sizing: border-box;
}


/* =========================================================
   INTELLIGENCE HEADER
   ========================================================= */

.snt-intelligence-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}


.snt-section-kicker {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #16803c;
    text-transform: uppercase;
}


.snt-intelligence-header h2,
.snt-growth-performance-header h2,
.snt-positive-insights-header h2 {
    margin: 0 0 6px;
    color: #17251c;
    font-size: 23px;
    font-weight: 700;
}


.snt-intelligence-header p,
.snt-growth-performance-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   PRIORITY COUNT
   ========================================================= */

.snt-intelligence-count {
    min-width: 75px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    text-align: center;
}


.snt-intelligence-count strong {
    display: block;
    color: #15803d;
    font-size: 22px;
    line-height: 1;
}


.snt-intelligence-count span {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   PRIORITY ACTIONS
   ========================================================= */

.snt-intelligence-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.snt-intelligence-action {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 17px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #94a3b8;
    border-radius: 12px;
    box-sizing: border-box;
}


.snt-intelligence-action.critical {
    border-left-color: #dc2626;
    background: #fff7f7;
}


.snt-intelligence-action.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}


.snt-intelligence-action.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}


/* =========================================================
   ACTION NUMBER
   ========================================================= */

.snt-action-number {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 50%;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}


.snt-intelligence-action.critical .snt-action-number {
    background: #fee2e2;
    color: #b91c1c;
}


.snt-intelligence-action.warning .snt-action-number {
    background: #fef3c7;
    color: #b45309;
}


.snt-intelligence-action.info .snt-action-number {
    background: #dbeafe;
    color: #1d4ed8;
}


/* =========================================================
   ACTION CONTENT
   ========================================================= */

.snt-action-content {
    flex: 1;
    min-width: 0;
}


.snt-action-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}


.snt-action-title-row h4 {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
}


.snt-action-description {
    margin: 7px 0 9px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}


.snt-action-recommendation {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}


.snt-action-recommendation strong {
    color: #1f2937;
}


/* =========================================================
   SEVERITY BADGES
   ========================================================= */

.snt-severity-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}


.snt-severity-badge.critical {
    background: #fee2e2;
    color: #b91c1c;
}


.snt-severity-badge.warning {
    background: #fef3c7;
    color: #b45309;
}


.snt-severity-badge.info {
    background: #dbeafe;
    color: #1d4ed8;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.snt-intelligence-empty {
    padding: 35px 20px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
}


.snt-intelligence-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    border-radius: 50%;
    color: #15803d;
    font-size: 22px;
}


.snt-intelligence-empty h3 {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 16px;
}


.snt-intelligence-empty p {
    max-width: 520px;
    margin: 0 auto;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   GROWTH PERFORMANCE SECTION
   ========================================================= */

.snt-growth-performance-section {
    width: 100%;
    margin: 30px 0;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-sizing: border-box;
}


.snt-growth-performance-header {
    margin-bottom: 22px;
}


.snt-growth-performance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}


/* =========================================================
   GROWTH PERFORMANCE CARD
   ========================================================= */

.snt-growth-performance-card {
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #94a3b8;
    border-radius: 13px;
    box-sizing: border-box;
}


.snt-growth-performance-card.declining {
    border-left-color: #dc2626;
    background: #fff7f7;
}


.snt-growth-performance-card.poor {
    border-left-color: #f59e0b;
    background: #fffbeb;
}


.snt-growth-performance-card.moderate {
    border-left-color: #eab308;
    background: #fefce8;
}


.snt-growth-performance-card.good {
    border-left-color: #16a34a;
    background: #f0fdf4;
}


.snt-growth-performance-card.excellent {
    border-left-color: #15803d;
    background: #f0fdf4;
}


/* =========================================================
   PERFORMANCE CARD HEADER
   ========================================================= */

.snt-growth-performance-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}


.snt-growth-performance-species {
    display: block;
    color: #1f2937;
    font-size: 16px;
    font-weight: 700;
}


.snt-growth-performance-id {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}


.snt-growth-performance-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}


.snt-growth-performance-status.declining {
    background: #fee2e2;
    color: #b91c1c;
}


.snt-growth-performance-status.poor {
    background: #fef3c7;
    color: #b45309;
}


.snt-growth-performance-status.moderate {
    background: #fef9c3;
    color: #a16207;
}


.snt-growth-performance-status.good {
    background: #dcfce7;
    color: #15803d;
}


.snt-growth-performance-status.excellent {
    background: #dcfce7;
    color: #166534;
}


/* =========================================================
   PERFORMANCE METRICS
   ========================================================= */

.snt-growth-performance-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}


.snt-growth-metric {
    padding: 11px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 9px;
}


.snt-growth-metric span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
}


.snt-growth-metric strong {
    display: block;
    color: #1f2937;
    font-size: 13px;
}


/* =========================================================
   ASSESSMENT
   ========================================================= */

.snt-growth-performance-assessment {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 9px;
}


.snt-growth-performance-assessment strong,
.snt-growth-performance-recommendation strong {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-size: 12px;
}


.snt-growth-performance-assessment p,
.snt-growth-performance-recommendation p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}


/* =========================================================
   RECOMMENDATION
   ========================================================= */

.snt-growth-performance-recommendation {
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 9px;
}


/* =========================================================
   PERFORMANCE DATES
   ========================================================= */

.snt-growth-performance-dates {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(203, 213, 225, 0.7);
}


.snt-growth-performance-dates span {
    color: #64748b;
    font-size: 10px;
}


/* =========================================================
   SYSTEM NOTE
   ========================================================= */

.snt-growth-performance-note {
    margin-top: 18px;
    padding: 13px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}


.snt-growth-performance-note strong {
    color: #475569;
}


/* =========================================================
   POSITIVE INSIGHTS
   ========================================================= */

.snt-positive-insights-section {
    width: 100%;
    margin: 30px 0;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-sizing: border-box;
}


.snt-positive-insights-header {
    margin-bottom: 18px;
}


.snt-positive-insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.snt-positive-insight {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 10px;
}


.snt-positive-insight-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    border-radius: 50%;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
}


.snt-positive-insight p {
    margin: 2px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .snt-growth-performance-grid {
        grid-template-columns: 1fr;
    }

    .snt-growth-performance-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .snt-intelligence-section,
    .snt-growth-performance-section,
    .snt-positive-insights-section {
        padding: 20px 16px;
        margin: 20px 0;
        border-radius: 13px;
    }


    .snt-intelligence-header {
        align-items: flex-start;
    }


    .snt-intelligence-header h2,
    .snt-growth-performance-header h2,
    .snt-positive-insights-header h2 {
        font-size: 19px;
    }


    .snt-intelligence-count {
        min-width: 60px;
        padding: 9px 12px;
    }


    .snt-intelligence-action {
        padding: 14px;
        gap: 10px;
    }


    .snt-action-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }


    .snt-growth-performance-card {
        padding: 16px;
    }


    .snt-growth-performance-card-header {
        flex-direction: column;
        align-items: flex-start;
    }


    .snt-growth-performance-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .snt-growth-performance-dates {
        flex-direction: column;
        gap: 5px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .snt-intelligence-header {
        flex-direction: column;
    }


    .snt-intelligence-count {
        align-self: flex-start;
    }


    .snt-growth-performance-metrics {
        grid-template-columns: 1fr 1fr;
    }


    .snt-action-number {
        flex: 0 0 26px;
        width: 26px;
        height: 26px;
        font-size: 11px;
    }


    .snt-action-title-row h4 {
        font-size: 14px;
    }
}

/* =========================================================
   NURSERY STATUS / DECISION SUMMARY
   ========================================================= */

.snt-nursery-status {
    width: 100%;
    margin: 30px 0;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-sizing: border-box;
}


.snt-nursery-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}


.snt-nursery-status-header h2 {
    margin: 0 0 6px;
    color: #17251c;
    font-size: 23px;
    font-weight: 700;
}


.snt-nursery-status-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}


.snt-nursery-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
}


.snt-nursery-status-icon {
    font-size: 16px;
}


/* Status colours */

.snt-nursery-status.critical {
    border-top: 4px solid #dc2626;
}


.snt-nursery-status.attention {
    border-top: 4px solid #f59e0b;
}


.snt-nursery-status.performing {
    border-top: 4px solid #16a34a;
}


.snt-nursery-status.healthy {
    border-top: 4px solid #15803d;
}


.snt-nursery-status.critical
.snt-nursery-status-badge {
    background: #fee2e2;
    color: #b91c1c;
}


.snt-nursery-status.attention
.snt-nursery-status-badge {
    background: #fef3c7;
    color: #b45309;
}


.snt-nursery-status.performing
.snt-nursery-status-badge,
.snt-nursery-status.healthy
.snt-nursery-status-badge {
    background: #dcfce7;
    color: #15803d;
}


/* Assessment */

.snt-nursery-status-message {
    padding: 15px 17px;
    margin-bottom: 16px;
    background: #f8fafc;
    border-radius: 10px;
}


.snt-nursery-status-message strong {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-size: 12px;
}


.snt-nursery-status-message p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}


/* Metrics */

.snt-nursery-status-metrics {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 10px;
}


.snt-status-metric {
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}


.snt-status-metric span {
    display: block;
    margin-bottom: 7px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
}


.snt-status-metric strong {
    display: block;
    font-size: 21px;
    line-height: 1;
}


/* Metric colours */

.snt-status-metric.critical span,
.snt-status-metric.critical strong {
    color: #dc2626;
}


.snt-status-metric.warning span,
.snt-status-metric.warning strong {
    color: #d97706;
}


.snt-status-metric.declining span,
.snt-status-metric.declining strong {
    color: #dc2626;
}


.snt-status-metric.poor span,
.snt-status-metric.poor strong {
    color: #b45309;
}


.snt-status-metric.excellent span,
.snt-status-metric.excellent strong {
    color: #15803d;
}


/* Recommendation */

.snt-nursery-status-recommendation {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 10px;
}


.snt-nursery-status-recommendation strong {
    display: block;
    margin-bottom: 5px;
    color: #166534;
    font-size: 12px;
}


.snt-nursery-status-recommendation p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .snt-nursery-status-metrics {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .snt-nursery-status {
        padding: 20px 16px;
        margin: 20px 0;
    }


    .snt-nursery-status-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .snt-nursery-status-header h2 {
        font-size: 19px;
    }


    .snt-nursery-status-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 420px) {

    .snt-nursery-status-metrics {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   INTELLIGENCE HISTORY
========================================================= */

.snt-intelligence-history {
    margin-top: 24px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5ebe7;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(20, 60, 40, 0.05);
}

.snt-intelligence-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.snt-intelligence-history-header h3 {
    margin: 4px 0 4px;
    color: #173b29;
    font-size: 20px;
    font-weight: 700;
}

.snt-intelligence-history-header p {
    margin: 0;
    color: #718078;
    font-size: 13px;
}

.snt-history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 8px 12px;
    border-radius: 20px;
    background: #f0f7f2;
    color: #2f7d4b;
    font-size: 12px;
    font-weight: 700;
}

.snt-history-timeline-container {
    display: flex;
    flex-direction: column;
}

.snt-history-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    min-height: 120px;
}

.snt-history-timeline {
    position: relative;
    display: flex;
    justify-content: center;
}

.snt-history-dot {
    position: relative;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f7f2;
    border: 2px solid #dce9df;
    font-size: 15px;
}

.snt-history-dot.critical {
    background: #fff1f1;
    border-color: #f0bcbc;
}

.snt-history-dot.attention {
    background: #fff7e8;
    border-color: #efd39b;
}

.snt-history-dot.performing {
    background: #eef9f0;
    border-color: #b9dfc0;
}

.snt-history-dot.healthy {
    background: #eef9f0;
    border-color: #b9dfc0;
}

.snt-history-line {
    position: absolute;
    top: 34px;
    bottom: -8px;
    width: 2px;
    background: #e3ebe5;
}

.snt-history-content {
    padding: 0 0 24px;
}

.snt-history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.snt-history-date {
    display: inline-block;
    margin-right: 8px;
    color: #6d7b73;
    font-size: 12px;
    font-weight: 600;
}

.snt-history-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
}

.snt-history-status.critical {
    color: #b42318;
    background: #fff0ef;
}

.snt-history-status.attention {
    color: #9a6700;
    background: #fff7df;
}

.snt-history-status.performing {
    color: #287a45;
    background: #edf8ef;
}

.snt-history-status.healthy {
    color: #287a45;
    background: #edf8ef;
}

.snt-history-message {
    margin: 0 0 12px;
    color: #34443b;
    font-size: 14px;
    line-height: 1.6;
}

.snt-history-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.snt-history-metrics span {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    background: #f7f9f8;
    border: 1px solid #e7ece9;
    border-radius: 8px;
    color: #59675f;
    font-size: 11px;
    font-weight: 600;
}

.snt-history-recommendation {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f7faf8;
    border-left: 3px solid #4d9565;
    border-radius: 0 8px 8px 0;
    color: #536159;
    font-size: 12px;
    line-height: 1.6;
}

.snt-history-recommendation strong {
    color: #315b40;
}


/* =========================================================
   HISTORY EMPTY STATE
========================================================= */

.snt-history-empty {
    padding: 40px 20px;
    text-align: center;
    border: 1px dashed #d8e3dc;
    border-radius: 12px;
    background: #fafcfb;
}

.snt-history-empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef7f0;
    font-size: 22px;
}

.snt-history-empty h4 {
    margin: 0 0 6px;
    color: #304438;
    font-size: 15px;
}

.snt-history-empty p {
    max-width: 480px;
    margin: 0 auto;
    color: #758179;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   HISTORY RESPONSIVE
========================================================= */

@media (max-width: 650px) {

    .snt-intelligence-history {
        padding: 18px;
        border-radius: 13px;
    }

    .snt-intelligence-history-header {
        flex-direction: column;
        gap: 10px;
    }

    .snt-history-item {
        grid-template-columns: 34px 1fr;
        gap: 10px;
    }

    .snt-history-dot {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .snt-history-line {
        top: 30px;
    }

    .snt-history-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .snt-history-date {
        margin-right: 4px;
    }

    .snt-history-metrics {
        flex-direction: column;
        align-items: flex-start;
    }

    .snt-history-metrics span {
        width: 100%;
    }
}