/* ==================== MONITORING GRID ==================== */

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

/* Base Asset Card */
.asset-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.asset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.asset-card-header {
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.asset-card-type {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.asset-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-card-footer {
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.asset-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.asset-metric:not(:last-child) {
    margin-bottom: 6px;
}

.asset-metric span:last-child {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== TANK CARD ==================== */

.tank-visual-compact {
    padding: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.tank-container-compact {
    position: relative;
    width: 100px;
    height: 140px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tank-fill-compact {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.9) 0%, rgba(14, 165, 233, 0.6) 100%);
    transition: height 0.3s ease;
}

.tank-percentage-compact {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    z-index: 10;
    font-family: var(--font-sans);
}

.tank-volume-compact {
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

/* ==================== WEATHER CARD ==================== */

.weather-metrics {
    padding: 24px 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.weather-metric-large {
    text-align: center;
    padding: 16px 0;
}

.weather-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.weather-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.weather-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 14px;
}

.weather-metric span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== POWER CARD ==================== */

.power-metrics {
    padding: 24px 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.power-metric-large {
    text-align: center;
    padding: 16px 0;
}

.power-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--warning);
    line-height: 1;
}

.power-unit {
    font-size: 18px;
    color: var(--text-muted);
    margin-top: 4px;
}

.power-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.power-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 14px;
}

.power-metric span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== FLOW CARD ==================== */

.flow-metrics {
    padding: 24px 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.flow-metric-large {
    text-align: center;
    padding: 16px 0;
}

.flow-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.flow-unit {
    font-size: 18px;
    color: var(--text-muted);
    margin-top: 4px;
}

.flow-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.flow-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 14px;
}

.flow-metric span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== PUMP CARD ==================== */

.pump-metrics {
    padding: 24px 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.pump-status {
    text-align: center;
    padding: 20px;
}

.pump-status-icon {
    font-size: 48px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.pump-status.on .pump-status-icon {
    color: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.pump-status-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}

.pump-status.on .pump-status-text {
    color: var(--success);
}

.pump-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.pump-metric span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.pump-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==================== METER CARD ==================== */

.meter-metrics {
    padding: 24px 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meter-metric-large {
    text-align: center;
    padding: 16px 0;
}

.meter-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.meter-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.meter-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 14px;
}

.meter-metric span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== GENERIC CARD ==================== */

.generic-metrics {
    padding: 24px 20px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== ASSETS TOOLBAR ==================== */

.assets-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .monitoring-grid {
        grid-template-columns: 1fr;
    }

    .assets-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .assets-toolbar>div {
        width: 100%;
    }

    .assets-toolbar input,
    .assets-toolbar select {
        width: 100% !important;
    }
}