.forecast-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.forecast-summary .optimo-card {
    transition: 0.2s ease;
}

.forecast-summary .optimo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.forecast-summary .optimo-card:nth-child(1) { border-left: 5px solid #dc2626; }
.forecast-summary .optimo-card:nth-child(2) { border-left: 5px solid #f59e0b; }
.forecast-summary .optimo-card:nth-child(3) { border-left: 5px solid #00bf63; }
.forecast-summary .optimo-card:nth-child(4) { border-left: 5px solid #00609f; }

.forecast-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.forecast-filters label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #334155;
}

.forecast-filters select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
}

.forecast-filters .optimo-btn {
    height: 46px;
    min-height: 46px;
    padding: 0 18px;
    white-space: nowrap;
}

.forecast-priority-list {
    display: grid;
    gap: 12px;
}

.forecast-priority-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 15px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
}

.forecast-priority-item strong {
    display: block;
    font-size: 15px;
    color: #0f172a;
}

.forecast-priority-item small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-weight: 600;
}

.forecast-priority-empty {
    padding: 16px;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
}

.forecast-page .optimo-section {
    overflow-x: auto;
}

.forecast-page .optimo-table {
    min-width: 1280px;
}

.forecast-page .optimo-table th,
.forecast-page .optimo-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.forecast-page .optimo-table td:first-child {
    white-space: normal;
    min-width: 200px;
}

.forecast-page .optimo-table td small {
    display: inline-block;
    margin-top: 6px;
    color: #64748b;
    line-height: 1.5;
}

.forecast-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.forecast-badge.critical {
    background: #fee2e2;
    color: #991b1b;
}

.forecast-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.forecast-badge.monitor {
    background: #dbeafe;
    color: #1d4ed8;
}

.forecast-badge.safe {
    background: #dcfce7;
    color: #166534;
}

@media (max-width: 1100px) {
    .forecast-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .forecast-filters {
        grid-template-columns: 1fr 1fr;
    }

    .forecast-filters .optimo-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .forecast-summary,
    .forecast-filters {
        grid-template-columns: 1fr;
    }

    .forecast-priority-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .forecast-summary {
        gap: 14px;
    }

    .forecast-filters .optimo-btn {
        width: 100%;
    }
}
.forecast-shopping-list {
    width: 100%;
    min-height: 260px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.8;
    resize: vertical;
    background: #f8fafc;
    color: #0f172a;
    box-sizing: border-box;
}