/* Dashboard Styles - Extracted from Index.cshtml */

.dashboard-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.dashboard-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
}

.dashboard-header .timestamp {
    font-size: 0.8rem;
    opacity: 0.9;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-card.auto-height {
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.stat-card .stat-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
    text-align: center;
}

.stat-label {
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    text-align: center;
    line-height: 1.2;
    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plant-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #ddd;
}

.plant-card.status-healthy {
    border-left-color: #28a745;
}

.plant-card.status-warning {
    border-left-color: #ffc107;
}

.plant-card.status-error {
    border-left-color: #dc3545;
}

.plant-card h5 {
    font-size: 1.1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: help;
}

.status-badge.compact {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.status-badge.healthy {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

.status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

.status-icon.healthy {
    background: #28a745;
}

.status-icon.warning {
    background: #ffc107;
}

.status-icon.error {
    background: #dc3545;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.bms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.bms-unit {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.bms-unit .unit-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 0.75rem;
    color: #6c757d;
}

.metric-value {
    font-weight: 600;
    font-size: 0.8rem;
}

.production-highlight {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    margin-top: 0.75rem;
}

.production-highlight.actual {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    margin-top: 0;
}

.production-highlight .highlight-title {
    font-size: 0.7rem;
    opacity: 0.9;
}

.production-highlight .highlight-grid {
    display: flex;
    justify-content: space-around;
    margin-top: 0.25rem;
}

.production-highlight .highlight-item-label {
    font-size: 0.65rem;
    opacity: 0.8;
}

.production-highlight .highlight-item-value {
    font-size: 1rem;
    font-weight: 700;
}

.production-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.check-icon {
    color: #28a745;
}

.warning-icon {
    color: #ffc107;
}

.error-icon {
    color: #dc3545;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
}

.info-item i {
    margin-right: 0.4rem;
    font-size: 0.95rem;
}

/* BMS Unit metric rows */
.bms-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    border-top: 1px solid;
    padding-top: 0.25rem;
    margin-top: 0.25rem;
}

.bms-metric-row.actual {
    color: #10b981;
    border-top-color: #10b981;
}

.bms-metric-row.forecast {
    color: #f59e0b;
    border-top-color: #f59e0b;
}

.bms-metric-row.battery {
    color: #6366f1;
    border-top-color: #6366f1;
}
