/* =========================================
   A2H EMS - ZENTRALE VIEW STYLES
   ========================================= */

/* --- LAYOUTS --- */
.split-layout { display: flex; flex-direction: column; gap: 20px; width: 100%; }
@media (min-width: 900px) {
    .split-layout { flex-direction: row; align-items: flex-start; }
    .form-side { flex: 2; min-width: 0; }
    .list-side { flex: 1; min-width: 320px; position: sticky; top: 20px; display: flex; flex-direction: column; gap: 20px; }
}

/* --- FORMS & CARDS --- */
.form-card { background: #1e212b; border-radius: 12px; padding: 20px; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; }
.form-h { font-size: 0.8rem; color: #0a84ff; font-weight: bold; margin-bottom: 15px; letter-spacing: 1px; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.form-f { margin-bottom: 10px; }
.form-f label { display: block; font-size: 0.8rem; color: #aaa; margin-bottom: 5px; }
.form-control { width: 100%; background: #2c3240; border: 1px solid #444; color: #fff; padding: 8px 12px; border-radius: 4px; box-sizing: border-box; }
.form-hint { font-size: 0.75rem; color: #666; margin-top: 4px; }

/* --- LISTS & TABLES --- */
.wb-list-card, .a2h-card { background: #1e212b; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; }
.wb-item, .gw-item { padding: 12px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.2s; }
.wb-item:hover, .gw-item:hover { background: rgba(255,255,255,0.02); }
.wb-name, .gw-name { font-weight: bold; color: #fff; font-size: 0.95rem; }
.wb-sub, .gw-ip { font-size: 0.8rem; color: #aaa; margin-top: 2px; }

/* --- STATUS PILLS --- */
.status-pill-container { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.status-item { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 6px 15px; font-size: 0.85rem; color: #ccc; display: flex; align-items: center; white-space: nowrap; }
.status-item strong { margin-left: 5px; color: #fff; }
.limit-ok { border-color: rgba(48, 209, 88, 0.3); color: #30d158; }
.limit-err { border-color: rgba(255, 69, 58, 0.5); color: #ff453a; background: rgba(255, 69, 58, 0.1); }

/* --- BUTTONS --- */
..btn-icon {
    background: orange;
    border: none;
    color: black;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-new, .btn-primary, .btn-action { background: linear-gradient(135deg, #0a84ff, #0077ea); color: #fff; padding: 8px 16px; border-radius: 6px; font-weight: bold; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; justify-content: center; }
.btn-new:disabled, .btn-disabled { background: #444 !important; color: #888 !important; cursor: not-allowed !important; }
.btn-cancel { background: transparent; border: 1px solid #555; color: #fff; padding: 8px 16px; border-radius: 6px; cursor: pointer; }

/* --- TOGGLES --- */
.toggle-switch, .nr-toggle { position: relative; width: 40px; height: 20px; display:inline-block; }
.toggle-switch input, .nr-toggle input { opacity: 0; width: 0; height: 0; }
.slider, .nr-toggle span { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #444; transition: .4s; border-radius: 20px; }
.slider:before, .nr-toggle span:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider, input:checked + span { background-color: #30d158; }
input:checked + .slider:before, input:checked + span:before { transform: translateX(20px); }
.toggle-line { display: flex; justify-content: space-between; align-items: center; width: 100%; }

/* --- PREMIUM / INFO BOXES --- */
.a2h-card--ocpp { background: rgba(10, 132, 255, 0.05); border: 1px solid rgba(10, 132, 255, 0.2); border-radius: 10px; padding: 15px; margin-top: 20px; }
.a2h-list { padding-left: 20px; color: #ccc; font-size: 0.85rem; line-height: 1.6; margin: 5px 0; }

.premium-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10, 12, 16, 0.92); backdrop-filter: blur(8px); z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; padding: 20px; text-align: center; }
.premium-card { background: #161920; border: 1px solid #2a2e3b; border-top: 3px solid #ff9f0a; border-radius: 12px; padding: 40px; max-width: 600px; width: 90%; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.lock-icon-glow { font-size: 40px; color: #ff9f0a; margin-bottom: 20px; text-shadow: 0 0 20px rgba(255, 159, 10, 0.6); }
.upgrade-btn-orange { background: linear-gradient(90deg, #ff9f0a, #ffcc00); color: #000; padding: 12px 30px; border-radius: 30px; font-weight: bold; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: transform 0.2s; }
.upgrade-btn-orange:hover { transform: scale(1.05); }

/* --- RESPONSIVE TABLE (USER MANAGER) --- */
@media (max-width: 768px) {
    .dbtable thead { display: none; }
    .dbtable tbody tr { display: flex; flex-direction: column; background: #1e212b; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 15px; border-radius: 12px; padding: 15px; }
    .dbtable tbody td { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); text-align: right; }
    .dbtable tbody td:last-child { border-bottom: none; justify-content: flex-end; gap: 10px; }
    .dbtable tbody td::before { content: attr(data-label); font-weight: bold; color: #aaa; font-size: 0.85rem; margin-right: 15px; }
}
/* LOKALES CSS FÜR DIESE VIEW */
.split-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Desktop Layout */
@media (min-width: 1100px) {
    .split-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .list-side {
        flex: 1;
        min-width: 350px;
        max-width: 1000px; /* Begrenzen damit Detail mehr Platz hat */
    }
    .detail-side {
        flex: 2;
        min-width: 0; /* Wichtig für Chart.js Resizing */
    }
}

/* Device List Item Style */
.dev-item {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.dev-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.dev-item.active {
    background: rgba(48, 209, 88, 0.15); /* Grünlicher Hintergrund */
    border-color: #30d158;
}

.dev-icon {
    font-size: 28px;
    color: #aaa;
    margin-right: 15px;
    background: rgba(255,255,255,0.05);
    padding: 8px;
    border-radius: 50%;
}

.dev-item.active .dev-icon {
    color: #fff;
    background: #30d158;
}

.dev-val { font-weight: bold; color: #fff; font-size: 1rem; }
.dev-sub { font-size: 0.8rem; color: #888; margin-top: 4px; }

/* Temp Badge */
.temp-badge {
    display: none;
    background: rgba(255, 159, 10, 0.15);
    color: #ff9f0a;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 159, 10, 0.3);
    align-items: center;
}

.chart-container-temp { display: none; margin-bottom: 20px; }
