body {
    margin: 0;
    background: #1e1e1e;
    font-family: Arial, sans-serif;
    color: #e0e0e0;
}

header {
    background: #111;
    padding: 15px;
    font-size: 20px;
    border-bottom: 2px solid #00ff9c;
    position: relative;
}

.container {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: #2a2a2a;
    border: 1px solid #00ff9c;
    border-radius: 6px;
    padding: 15px;
}

.card h3 {
    margin-top: 0;
    color: #00ff9c;
    display:inline;
}
.card h5 {
    margin-top: 0;
    margin-left:10px;
    color: #b9b9b9;
    display:inline;
}

.value {
    font-size: 28px;
    margin: 10px 0;
}

.binary{
    font-size: 12px;
    margin-left: 7px; 
    text-overflow: ellipsis;
}

input {
    width: 100%;
    padding: 8px;
    background: #111;
    border: 1px solid #555;
    color: #fff;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.input-group input {
    flex: 1;
    margin-bottom: 0;
}

.input-group button {
    flex-shrink: 0;
}

button {
    width: auto;
    padding: 8px;
    background: #00ff9c;
    border: none;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    box-sizing: border-box;
}

button:hover {
    background: #00cc7a;
}

summary{
    cursor:pointer;
}

.status {
    margin-top: 10px;
    font-size: 14px;
}
.ok { color: #00ff9c; }
.error { color: #ff5555; }

.counter {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 14px;
    color: #00ff9c;
}

.tabs {
    display: flex;
    background: #111;
    border-bottom: 2px solid #00ff9c;
    margin: 0;
    padding: 0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: #1a1a1a;
    border: none;
    color: #b9b9b9;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #252525;
}

.tab-btn.active {
    background: #00ff9c;
    color: #000;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* SCADA Styles */
.scada-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.scada-title {
    color: #00ff9c;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.scada-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.scada-panel {
    background: #2a2a2a;
    border: 2px solid #00ff9c;
    border-radius: 8px;
    padding: 15px;
}

.scada-panel-title {
    color: #00ff9c;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px solid #00ff9c;
    padding-bottom: 8px;
}

.scada-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #444;
}

.scada-value:last-child {
    border-bottom: none;
}

.scada-label {
    color: #b9b9b9;
    font-size: 14px;
}

.scada-data {
    color: #00ff9c;
    font-size: 18px;
    font-weight: bold;
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-on {
    background-color: #00ff9c;
    box-shadow: 0 0 10px #00ff9c;
}

.status-off {
    background-color: #555;
}

.status-error {
    background-color: #9e1d1d;
}

.scada-schematic {
    background: #2a2a2a;
    border: 2px solid #00ff9c;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
}

.heat-pump-diagram {
    font-size: 14px;
}

.heat-pump-layout {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    flex-direction: row;
}

.pump-status {
    color: #00ff9c;
    font-weight: bold;
    font-size: 18px;
    margin: 15px 0;
}

/* Chart style */
canvas{
  height:400px !important;
}

.chart-container {
    background: #1a1a1a;
    border: 2px solid #00ff9c;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.chart-container h3 {
    color: #00ff9c;
    margin-bottom: 20px;
    font-size: 20px;
}

#historyChart {
    max-height: 500px;
}

.chart-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.chart-controls select {
    padding: 8px 12px;
    background: #0f0f0f;
    border: 1px solid #333;
    color: #00ff9c;
    border-radius: 4px;
    cursor: pointer;
}

.chart-controls select:focus {
    outline: none;
    border-color: #00ff9c;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .scada-grid {
        grid-template-columns: 1fr;
    }
    
    .scada-title {
        font-size: 20px;
    }
    
    .scada-panel {
        padding: 12px;
    }
    
    .scada-panel-title {
        font-size: 14px;
    }
    
    .scada-data {
        font-size: 16px;
    }
    
    .heat-pump-layout {
        flex-direction: column;
    }

    header {
        padding: 10px;
        font-size: 18px;
    }

    .container {
        padding: 10px;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card {
        padding: 12px;
    }

    .card h3 {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .card h5 {
        font-size: 12px;
        margin-left: 5px;
    }

    .value {
        font-size: 22px;
    }

    input {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }

    button {
        width: 100%;
        padding: 10px;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .binary {
        font-size: 11px;
        margin-left: 5px;
    }

    .input-group input {
        flex: 1;
    }

    .input-group button {
        flex: 1;
    }

    canvas{
        height:300px !important;
    }
}

@media (max-width: 480px) {
    header {
        padding: 8px;
        font-size: 16px;
    }

    .container {
        padding: 8px;
        gap: 10px;
    }

    .card {
        padding: 10px;
    }

    .card h3 {
        display: block;
        font-size: 14px;
        margin-bottom: 2px;
    }

    .card h5 {
        display: block;
        font-size: 11px;
        margin-left: 0;
        margin-top: 2px;
    }

    .value {
        font-size: 18px;
        margin: 8px 0;
    }

    button {
        padding: 8px;
        font-size: 12px;
    }

    .input-group input {
        flex: 1;
    }

    .input-group button {
        flex: 1;
    }

    canvas{
        height:300px !important;
    }
}
