*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh;color:#333}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}::-webkit-scrollbar-thumb{background:#888;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#555}.fade-in{animation:fadeIn .3s ease-in}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.status-indicator{padding:4px 8px;border-radius:12px;font-size:.8em;font-weight:500}.status-indicator.connected,.status-indicator.on,.status-indicator.open{background-color:#d4edda;color:#155724}.status-indicator.disconnected,.status-indicator.off,.status-indicator.closed{background-color:#f8d7da;color:#721c24}.card{background:#fff;border-radius:12px;padding:20px;margin-bottom:20px;box-shadow:0 4px 6px #0000001a;border:1px solid rgba(255,255,255,.2);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:transform .2s ease,box-shadow .2s ease}.card:hover{transform:translateY(-2px);box-shadow:0 8px 15px #00000026}.btn{padding:10px 20px;border:none;border-radius:8px;cursor:pointer;font-size:1em;font-weight:500;transition:all .2s ease;display:inline-flex;align-items:center;gap:8px}.btn:hover{transform:translateY(-1px);box-shadow:0 4px 8px #00000026}.btn:active{transform:translateY(0)}.btn-primary{background:#007bff;color:#fff}.btn-primary:hover{background:#0056b3}.btn-success{background:#28a745;color:#fff}.btn-success:hover{background:#1e7e34}.btn-danger{background:#dc3545;color:#fff}.btn-danger:hover{background:#c82333}.btn-warning{background:#ffc107;color:#212529}.btn-warning:hover{background:#e0a800}input[type=range]{-webkit-appearance:none;width:100%;height:6px;border-radius:3px;background:#ddd;outline:none;opacity:.7;transition:opacity .2s}input[type=range]:hover{opacity:1}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:#007bff;cursor:pointer;transition:background .2s}input[type=range]::-webkit-slider-thumb:hover{background:#0056b3}input[type=range]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#007bff;cursor:pointer;border:none}.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px}.grid-3{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px}.grid-4{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:20px}@media(max-width:768px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}.card{padding:15px;margin-bottom:15px}.btn{padding:12px 16px;font-size:.9em}}.App{min-height:100vh;display:flex;flex-direction:column;padding:1.5rem}@media(max-width:768px){.App{padding:1rem}}.app-header{background:#fffffff2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:1rem 2rem;display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 4px #0000001a;border-bottom:1px solid rgba(255,255,255,.2);margin:-1.5rem -1.5rem 1.5rem;position:sticky;top:0;z-index:100}.header-left{display:flex;align-items:center;gap:2rem}.menu-toggle{display:none;flex-direction:column;justify-content:space-around;width:24px;height:20px;background:transparent;border:none;cursor:pointer;padding:0;z-index:102}.menu-toggle span{width:100%;height:2px;background:#2c3e50;border-radius:10px;transition:all .3s linear;position:relative;transform-origin:1px}.nav-backdrop{display:none}.main-nav{display:flex;gap:1rem}.nav-link{color:#6c757d;text-decoration:none;font-weight:500;padding:.5rem 1rem;border-radius:8px;transition:all .2s ease}.nav-link:hover{background:#0000000d;color:#2c3e50}.app-header h1{color:#2c3e50;font-size:1.5rem;font-weight:700;margin:0;background:linear-gradient(135deg,#2c3e50,#3498db);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.user-controls{display:flex;align-items:center;gap:1.5rem}.user-info{display:flex;align-items:center;gap:.8rem;background:#00000008;padding:.4rem .8rem;border-radius:20px}.username{font-weight:600;color:#2c3e50;font-size:.95rem}.role-badge{font-size:.7rem;background-color:#e9ecef;color:#495057;padding:.2rem .6rem;border-radius:10px;text-transform:uppercase;font-weight:700;letter-spacing:.5px;border:1px solid rgba(0,0,0,.05)}.logout-button{background-color:transparent;border:1px solid #ff6b6b;color:#ff6b6b;padding:.5rem 1.2rem;border-radius:20px;font-size:.9rem;font-weight:600;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem}.logout-button:hover{background-color:#ff6b6b;color:#fff;transform:translateY(-1px);box-shadow:0 4px 12px #ff6b6b33}.logout-button:active{transform:translateY(0)}@media(max-width:768px){.app-header{padding:.8rem 1rem;margin:-1rem -1rem 1rem}.header-left{gap:1rem}.menu-toggle{display:flex}.menu-toggle.open span:first-child{transform:rotate(45deg)}.menu-toggle.open span:nth-child(2){opacity:0;transform:translate(20px)}.menu-toggle.open span:nth-child(3){transform:rotate(-45deg)}.main-nav{position:fixed;top:0;left:0;height:100vh;width:250px;background:#fff;flex-direction:column;padding:5rem 1.5rem 2rem;box-shadow:4px 0 15px #0000001a;transform:translate(-100%);transition:transform .3s cubic-bezier(.4,0,.2,1);z-index:101;gap:1rem}.main-nav.open{transform:translate(0)}.nav-backdrop.open{display:block;position:fixed;top:0;left:0;width:100vw;height:100vh;background:#0006;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:100}.nav-link{font-size:1.1rem;padding:.8rem;border-radius:8px;background:#f8f9fa}.nav-link:hover{background:#e9ecef}.app-header h1{font-size:1.2rem}.user-controls{gap:.8rem}.user-info{padding:.3rem .6rem}.username{display:none}.logout-button{padding:.4rem .8rem;font-size:.8rem}}.App-main{flex:1;padding:2rem;max-width:1400px;margin:0 auto;width:100%}.App-footer{background:#ffffffe6;padding:1rem;text-align:center;color:#666;font-size:.9rem;border-top:1px solid rgba(255,255,255,.2);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.schedules-container{margin-top:2rem}.schedules-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));gap:1rem;margin-bottom:1rem}.schedule-item{padding:1rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a}.schedule-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.schedule-header .time{font-size:1.2rem;font-weight:700}.schedule-header .days{color:#666;font-size:.9rem}.schedule-action{margin-bottom:1rem;font-family:monospace;font-size:.9rem;color:#444}.schedule-controls{display:flex;gap:.5rem}.schedule-controls button{padding:.3rem .8rem;border:none;border-radius:4px;cursor:pointer;background:#eee}.schedule-controls button.danger{background:#ffebee;color:#c62828}.add-schedule-btn{padding:.8rem 1.5rem;background:#3498db;color:#fff;border:none;border-radius:4px;cursor:pointer;font-weight:700}.schedule-form{display:flex;flex-direction:column;gap:1rem}.form-group{display:flex;flex-direction:column;gap:.3rem}.form-group label{font-weight:700;font-size:.9rem}.days-selector{display:flex;flex-wrap:wrap;gap:.3rem}.day-btn{padding:.3rem .6rem;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer;font-size:.8rem}.day-btn.active{background:#3498db;color:#fff;border-color:#3498db}.form-actions{display:flex;gap:.5rem;margin-top:.5rem}.form-actions button{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer}.system-page{display:flex;flex-direction:column;gap:2rem}.service-links-container h2{color:#2c3e50;margin-bottom:1rem;font-size:1.25rem}.service-links{display:flex;gap:1.5rem;flex-wrap:wrap}.service-link-card{background:#fff;padding:1.5rem;border-radius:12px;box-shadow:0 4px 6px #0000000d;text-decoration:none;color:#2c3e50;display:flex;flex-direction:column;align-items:center;gap:.5rem;transition:all .2s ease;min-width:200px;border:1px solid rgba(0,0,0,.05)}.service-link-card:hover{transform:translateY(-4px);box-shadow:0 12px 20px #0000001a;border-color:#3498db33}.service-link-card h3{margin:0;color:#2c3e50;font-size:1.1rem}.service-link-card p{margin:0;color:#7f8c8d;font-size:.9rem;font-family:monospace;background:#f8f9fa;padding:.2rem .5rem;border-radius:4px}.log-viewer-container{display:flex;height:calc(100vh - 100px);gap:20px;background:var(--bg-secondary);border-radius:12px;overflow:hidden}.log-sidebar{width:320px;background:var(--bg-card);border-right:1px solid var(--border-color);display:flex;flex-direction:column;padding:10px}.log-sidebar h3{margin:0 0 10px;padding:10px;font-size:1.1em}.refresh-btn{margin-bottom:10px;padding:5px;cursor:pointer}.log-list{list-style:none;padding:0;margin:0;overflow-y:auto;flex:1}.log-list li{padding:10px;cursor:pointer;border-bottom:1px solid var(--border-color);display:flex;flex-direction:column;gap:4px}.log-list li:hover{background:#0000000d}.log-list li.active{background:var(--primary-color);color:#fff}.log-list li.active .log-size{color:#fffc}.log-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.log-size{font-size:.8em;color:#666}.log-content-area{flex:1;display:flex;flex-direction:column;min-width:0}.log-toolbar{padding:10px;display:flex;justify-content:space-between;align-items:center;background:var(--bg-card);border-bottom:1px solid var(--border-color)}.log-toolbar h3{margin:0;font-size:1em}.terminal-window{flex:1;background:#1e1e1e;color:#d4d4d4;font-family:Consolas,Monaco,Courier New,monospace;font-size:14px;padding:10px;overflow-y:auto;white-space:pre-wrap;word-wrap:break-word}.log-line{line-height:1.4;border-bottom:1px solid #333}@media(max-width:768px){.log-viewer-container{flex-direction:column;height:calc(100vh - 65px);margin:-1rem;border-radius:0}.log-sidebar{width:100%;height:180px;border-right:none;border-bottom:1px solid rgba(0,0,0,.1)}.log-content-area{height:calc(100% - 180px)}.log-toolbar{flex-wrap:wrap;gap:.5rem}.log-toolbar h3{width:100%;font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.terminal-window{padding:.5rem;font-size:12px}}.dashboard{animation:fadeIn .5s ease-in;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:auto auto auto auto;gap:1.5rem}.lights-card{grid-column:1 / 3;grid-row:1}.scenarios-card{grid-column:1 / 3;grid-row:2}.music-card{grid-column:1 / 3;grid-row:3}.heaters-card{grid-column:3;grid-row:1 / 4}.wifi-card{grid-column:4;grid-row:1}.rolladen-card{grid-column:4;grid-row:2}.vacuum-card{grid-column:4;grid-row:3}.dashboard-row-1,.dashboard-row-2{display:contents}.dashboard-grid{display:grid;grid-template-columns:1fr;gap:1.5rem;grid-column:1 / -1}.chart-card{grid-column:1 / -1;grid-row:4}.dashboard-card{background:#fffffff2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:20px;padding:1.5rem;box-shadow:0 8px 24px #00000014;border:1px solid rgba(255,255,255,.3);position:relative;overflow:hidden}.dashboard-card:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,#667eea,#764ba2,#f093fb);border-radius:20px 20px 0 0}.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.card-header h3{color:#2c3e50;font-size:1.1rem;font-weight:600;margin:0;display:flex;align-items:center;gap:8px}.card-content{color:#4a5568}.temperature-card .temp-display{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.current-temp{font-size:2rem;font-weight:700;color:#e74c3c}.target-temp{font-size:1rem;color:#7f8c8d;font-weight:500}.temp-status{display:flex;align-items:center;gap:8px}.mode-indicator{padding:4px 12px;border-radius:12px;font-size:.8rem;font-weight:500}.mode-indicator.auto{background:#e3f2fd;color:#1976d2}.mode-indicator.heating{background:#ffebee;color:#c62828}.mode-indicator.cooling{background:#e8f5e8;color:#2e7d32}.sensors-preview{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(0,0,0,.1)}.sensors-count{font-size:.8rem;color:#7f8c8d;margin-bottom:.5rem;text-transform:uppercase;font-weight:500}.sensors-list{display:flex;flex-direction:column;gap:.3rem}.sensor-preview{display:flex;justify-content:space-between;align-items:center;font-size:.85rem}.sensor-name{color:#34495e;font-weight:500}.sensor-temp{color:#e74c3c;font-weight:600}.sensor-preview.more{color:#95a5a6;font-style:italic;justify-content:center}.lights-card .lights-summary{text-align:center;margin-bottom:1rem}.lights-count{font-size:2rem;font-weight:700;color:#f39c12}.lights-label{display:block;font-size:.9rem;color:#7f8c8d;margin-top:4px}.lights-preview{display:flex;flex-direction:column;gap:8px}.light-indicator{padding:6px 12px;border-radius:8px;font-size:.8rem;font-weight:500;text-align:center}.light-indicator.on{background:#fff3cd;color:#856404;border:1px solid #ffeaa7}.light-indicator.off{background:#f8f9fa;color:#6c757d;border:1px solid #dee2e6}.rolladen-card .rolladen-summary{text-align:center;margin-bottom:1rem}.rolladen-count{font-size:2rem;font-weight:700;color:#3498db}.rolladen-label{display:block;font-size:.9rem;color:#7f8c8d;margin-top:4px}.rolladen-preview{display:flex;justify-content:space-between;gap:8px}.rolladen-indicator{flex:1;text-align:center}.rolladen-name{display:block;font-size:.7rem;color:#7f8c8d;margin-bottom:4px}.rolladen-bar{width:20px;height:60px;background:#ecf0f1;border:2px solid #bdc3c7;border-radius:4px;position:relative;margin:0 auto}.rolladen-fill{position:absolute;bottom:0;left:0;right:0;background:#3498db;border-radius:2px;transition:height .3s ease}.spotify-card .spotify-status{text-align:center;margin-bottom:1rem}.play-status{padding:8px 16px;border-radius:20px;font-size:.9rem;font-weight:600}.play-status.playing{background:#d4edda;color:#155724}.play-status.paused{background:#f8d7da;color:#721c24}.current-track{text-align:center}.track-name{display:block;font-weight:600;color:#2c3e50;margin-bottom:4px}.track-artist{display:block;font-size:.8rem;color:#7f8c8d}.system-card .system-info{display:flex;flex-direction:column;gap:8px}.info-item{display:flex;justify-content:space-between;align-items:center;padding:4px 0}.info-label{font-size:.9rem;color:#7f8c8d}.info-value{font-weight:500;color:#2c3e50}.info-value.status-ok{color:#27ae60}.actions-card .quick-actions{display:flex;flex-direction:column;gap:8px}.quick-action{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:12px 16px;border-radius:8px;font-size:.9rem;font-weight:500;cursor:pointer;transition:all .2s ease;text-align:left}@media(max-width:768px){.dashboard-grid{grid-template-columns:1fr;gap:1rem}.dashboard-card{padding:1rem}.current-temp,.lights-count,.rolladen-count{font-size:1.5rem}.rolladen-preview{flex-wrap:wrap}.rolladen-bar{height:40px;width:16px}}@media(max-width:480px){.dashboard-card{padding:.75rem}.card-header h3{font-size:1rem}.temp-display{flex-direction:column;gap:8px;text-align:center}.info-item{flex-direction:column;align-items:flex-start;gap:2px}}.light-control{margin-bottom:1.5rem;padding:1rem;background:#f8f9facc;border-radius:12px;border:1px solid rgba(0,0,0,.05)}.light-control:last-child{margin-bottom:0}.light-control-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;padding-bottom:.5rem;border-bottom:2px solid rgba(102,126,234,.2)}.light-control-header .device-name{font-weight:600;color:#2c3e50;font-size:1rem}.light-control-header .device-protocol{font-size:.75rem;padding:.25rem .75rem;background:#667eea1a;color:#667eea;border-radius:12px;text-transform:uppercase;font-weight:600}.light-control-section{margin-top:1rem}.light-control-section:first-of-type{margin-top:0}.section-title{font-size:.75rem;font-weight:600;color:#7f8c8d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:.5rem}.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:.5rem}.color-button{width:100%;aspect-ratio:1;border:2px solid rgba(0,0,0,.15);border-radius:8px;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 4px #0000001a;position:relative}.color-button:hover{transform:scale(1.1);box-shadow:0 4px 12px #0003;border-color:#0000004d;z-index:1}.color-button:active{transform:scale(1.05)}.color-button.active{border-width:3px;border-color:#667eea;box-shadow:0 0 0 3px #667eea4d}.color-button.active:after{content:"✓";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#ffffffe6;font-size:1.5rem;font-weight:700;text-shadow:0 0 4px rgba(0,0,0,.5)}.mode-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}.mode-button{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:.75rem .5rem;border:2px solid rgba(0,0,0,.1);border-radius:10px;background:#fff;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 4px #0000000d;gap:.25rem}.mode-button:hover{transform:translateY(-2px);box-shadow:0 4px 12px #00000026;border-color:#667eea}.mode-button:active{transform:translateY(0);box-shadow:0 2px 4px #0000001a}.mode-button.active{border-color:#667eea;background:linear-gradient(135deg,#667eea,#764ba2);box-shadow:0 4px 12px #667eea66}.mode-icon{font-size:1.5rem}.mode-label{font-size:.75rem;font-weight:500;color:#2c3e50}.mode-button.active .mode-label{color:#fff}@media(max-width:768px){.color-grid{grid-template-columns:repeat(4,1fr);gap:.4rem}.mode-grid{grid-template-columns:repeat(2,1fr);gap:.4rem}.mode-button{padding:.6rem .4rem}.mode-icon{font-size:1.25rem}.mode-label{font-size:.7rem}}.light-control-compact{padding:.75rem;background:#f8f9fa99;border-radius:10px;border:1px solid rgba(0,0,0,.05)}.light-compact-header{margin-bottom:.6rem;padding-bottom:.4rem;border-bottom:1px solid rgba(102,126,234,.15)}.device-name-compact{font-weight:600;color:#2c3e50;font-size:.85rem}.light-controls-wrapper{display:grid;grid-template-columns:1fr;gap:.6rem}.color-grid-compact{display:grid;grid-template-columns:repeat(auto-fit,minmax(32px,1fr));gap:.35rem}.color-button-compact{width:100%;aspect-ratio:1;border:2px solid rgba(0,0,0,.15);border-radius:6px;cursor:pointer;transition:all .2s ease;box-shadow:0 1px 3px #0000001a;position:relative;min-width:28px}.color-button-compact:hover{transform:scale(1.1);box-shadow:0 3px 8px #0003;border-color:#0000004d;z-index:1}.color-button-compact:active{transform:scale(1.05)}.color-button-compact.active{border-width:3px;border-color:#667eea;box-shadow:0 0 0 2px #667eea4d}.color-button-compact.active:after{content:"✓";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fffffff2;font-size:1.1rem;font-weight:700;text-shadow:0 0 3px rgba(0,0,0,.6)}.mode-grid-compact{display:grid;grid-template-columns:repeat(auto-fit,minmax(40px,1fr));gap:.35rem}.mode-button-compact{aspect-ratio:1;border:2px solid rgba(0,0,0,.1);border-radius:6px;background:#fff;cursor:pointer;transition:all .2s ease;box-shadow:0 1px 3px #0000000d;font-size:1.25rem;display:flex;align-items:center;justify-content:center}.mode-button-compact:hover{transform:translateY(-1px);box-shadow:0 3px 8px #0000001f;border-color:#667eea}.mode-button-compact:active{transform:translateY(0);box-shadow:0 1px 3px #0000001a}.mode-button-compact.active{border-color:#667eea;background:linear-gradient(135deg,#667eea,#764ba2);box-shadow:0 3px 10px #667eea66}@media(max-width:1200px){.light-controls-wrapper{flex-direction:column}.color-grid-compact{grid-template-columns:repeat(11,1fr)}.mode-grid-compact{grid-template-columns:repeat(7,1fr)}}@media(max-width:768px){.light-control-compact{padding:.6rem}.color-grid-compact{grid-template-columns:repeat(6,1fr);gap:.3rem}.mode-grid-compact{grid-template-columns:repeat(4,1fr);gap:.3rem}.mode-button-compact{font-size:1.1rem}.color-button-compact.active:after{font-size:.85rem}}.music-control{margin-bottom:1.5rem;padding:1rem;background:#f8f9facc;border-radius:12px;border:1px solid rgba(0,0,0,.05)}.music-control:last-child{margin-bottom:0}.music-control-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;padding-bottom:.5rem;border-bottom:2px solid rgba(102,126,234,.2)}.music-control-header .device-name{font-weight:600;color:#2c3e50;font-size:1rem}.music-control-header .device-protocol{font-size:.75rem;padding:.25rem .75rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border-radius:12px;font-weight:500}.music-control-section{margin-top:1rem}.music-control-section:first-of-type{margin-top:0}.music-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem}.music-button{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:.75rem .5rem;border:2px solid rgba(0,0,0,.1);border-radius:10px;background:#fff;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 4px #0000000d;gap:.25rem}.music-button:hover{transform:translateY(-2px);box-shadow:0 4px 12px #00000026;border-color:#e74c3c}.music-button:active{transform:translateY(0);box-shadow:0 2px 4px #0000001a}.music-button.active{border-color:#e74c3c;background:linear-gradient(135deg,#e74c3c,#c0392b);box-shadow:0 4px 12px #e74c3c66}.music-icon{font-size:1.5rem}.music-label{font-size:.75rem;font-weight:500;color:#2c3e50;text-align:center}.music-button.active .music-label{color:#fff}@media(max-width:768px){.music-grid{grid-template-columns:repeat(3,1fr);gap:.4rem}.music-button{padding:.6rem .4rem}.music-icon{font-size:1.25rem}.music-label{font-size:.7rem}}.music-control-compact{padding:.75rem;background:#f8f9fa99;border-radius:10px;border:1px solid rgba(0,0,0,.05)}.music-compact-header{margin-bottom:.6rem;padding-bottom:.4rem;border-bottom:1px solid rgba(231,76,60,.15)}.music-grid-compact{display:grid;grid-template-columns:repeat(auto-fit,minmax(45px,1fr));gap:.45rem}.music-button-compact{aspect-ratio:1;border:2px solid rgba(0,0,0,.1);border-radius:8px;background:#fff;cursor:pointer;transition:all .2s ease;box-shadow:0 1px 3px #0000000d;display:flex;align-items:center;justify-content:center;padding:.5rem;min-width:45px}.music-button-compact:hover{transform:translateY(-1px);box-shadow:0 3px 8px #0000001f;border-color:#e74c3c}.music-button-compact:active{transform:translateY(0);box-shadow:0 1px 3px #0000001a}.music-button-compact.active{border-color:#e74c3c;background:linear-gradient(135deg,#e74c3c,#c0392b);box-shadow:0 3px 10px #e74c3c66}.music-icon-compact{font-size:1.6rem}@media(max-width:768px){.music-control-compact{padding:.6rem}.music-grid-compact{grid-template-columns:repeat(4,1fr);gap:.35rem}.music-button-compact{padding:.4rem}.music-icon-compact{font-size:1.3rem}}.heaters-control{display:flex;flex-direction:column;gap:1.25rem}.sync-control{padding:1.25rem 1.5rem;background:#fff;border-radius:12px;border:1px solid #e0e0e0;display:flex;justify-content:center;align-items:center}.sync-toggle-label{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:400px;cursor:pointer;-webkit-user-select:none;user-select:none}.sync-label{font-size:1rem;font-weight:500;color:#2c3e50;letter-spacing:0}.toggle-switch{position:relative;width:51px;height:31px;flex-shrink:0}.toggle-checkbox{opacity:0;width:0;height:0;position:absolute}.toggle-slider{position:absolute;cursor:pointer;inset:0;background-color:#e5e5ea;transition:background-color .3s ease;border-radius:31px}.toggle-slider:before{position:absolute;content:"";height:27px;width:27px;left:2px;bottom:2px;background-color:#fff;transition:transform .3s ease;border-radius:50%;box-shadow:0 2px 4px #00000026,0 1px 2px #0000000f}.toggle-checkbox:checked+.toggle-slider{background-color:#3498db}.toggle-checkbox:checked+.toggle-slider:before{transform:translate(20px)}.toggle-checkbox:focus+.toggle-slider{outline:2px solid rgba(52,152,219,.3);outline-offset:2px}.individual-heaters{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:.75rem}.heater-item{padding:.75rem;background:#fff;border:1px solid #e0e0e0;border-radius:10px;transition:all .2s ease}.heater-item.synced{border-color:#3498db;background:linear-gradient(135deg,#3498db0d,#2ecc710d)}.heater-item:hover{box-shadow:0 3px 10px #00000014;border-color:#e74c3c}.heater-item.synced:hover{border-color:#3498db}.heater-item-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.6rem;padding-bottom:.5rem;border-bottom:1px solid #f0f0f0}.heater-item-name{font-size:.9rem;font-weight:600;color:#2c3e50}.heater-item-temp-display{font-size:1.1rem;font-weight:700;color:#e74c3c}.heater-item-slider{padding:.5rem 0}.temp-slider-individual{width:100%;height:8px;border-radius:4px;background:linear-gradient(to right,#95a5a6,#3498db 20%,#e74c3c);outline:none;-webkit-appearance:none;appearance:none;cursor:pointer}.temp-slider-individual::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:22px;height:22px;border-radius:50%;background:#fff;border:3px solid #e74c3c;cursor:pointer;box-shadow:0 2px 6px #0003;transition:all .2s ease}.temp-slider-individual::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 3px 10px #e74c3c66}.temp-slider-individual::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:#fff;border:3px solid #e74c3c;cursor:pointer;box-shadow:0 2px 6px #0003;transition:all .2s ease}.temp-slider-individual::-moz-range-thumb:hover{transform:scale(1.1);box-shadow:0 3px 10px #e74c3c66}@media(max-width:1200px){.individual-heaters{grid-template-columns:1fr}}@media(max-width:768px){.master-control{padding:1rem}.master-temp-display-large{font-size:2rem}.slider-label-left,.slider-label-right{font-size:.75rem;min-width:30px}.temp-slider-large{height:8px}.temp-slider-large::-webkit-slider-thumb{width:24px;height:24px}.temp-slider-large::-moz-range-thumb{width:24px;height:24px}.heater-item{padding:.6rem}.heater-item-name{font-size:.85rem}.heater-item-temp-display{font-size:1rem}}.scenarios-control{width:100%}.scenario-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}.scenario-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;border:2px solid transparent;border-radius:16px;background:linear-gradient(135deg,#ffffffe6,#ffffffb3);cursor:pointer;transition:all .3s ease;position:relative;overflow:hidden}.scenario-btn:before{content:"";position:absolute;inset:0;opacity:0;transition:opacity .3s ease;z-index:0}.scenario-btn.fire:before{background:linear-gradient(135deg,#ff6b6b,#ee5a6f)}.scenario-btn.ice:before{background:linear-gradient(135deg,#74b9ff,#0984e3)}.scenario-btn.ambient:before{background:linear-gradient(135deg,#fdcb6e,#e17055)}.scenario-btn:hover:before{opacity:.1}.scenario-btn.active:before{opacity:.2}.scenario-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px #00000026}.scenario-btn.fire:hover,.scenario-btn.fire.active{border-color:#ff6b6b}.scenario-btn.ice:hover,.scenario-btn.ice.active{border-color:#74b9ff}.scenario-btn.ambient:hover,.scenario-btn.ambient.active{border-color:#fdcb6e}.scenario-btn.active{border-width:3px;transform:translateY(-2px);box-shadow:0 6px 20px #0003}.scenario-icon{font-size:2.5rem;position:relative;z-index:1}.scenario-name{font-size:1rem;font-weight:600;color:#2c3e50;position:relative;z-index:1}.scenario-desc{font-size:.75rem;color:#7f8c8d;position:relative;z-index:1}@media(max-width:768px){.scenario-buttons{grid-template-columns:1fr;gap:.75rem}.scenario-btn{padding:1rem .75rem}.scenario-icon{font-size:2rem}.scenario-name{font-size:.9rem}.scenario-desc{font-size:.7rem}}.sensor-history{width:100%}.history-controls{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}.time-range-btn{flex:1;min-width:100px;padding:.6rem 1rem;border:2px solid rgba(102,126,234,.2);border-radius:8px;background:#fff;color:#667eea;font-weight:600;font-size:.9rem;cursor:pointer;transition:all .2s ease}.time-range-btn:hover{border-color:#667eea;background:#667eea0d}.time-range-btn.active{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border-color:#667eea}.loading-spinner{text-align:center;padding:2rem;display:flex;flex-direction:column;align-items:center;gap:1rem}.loading-spinner:before{content:"";width:40px;height:40px;border:4px solid #e0e0e0;border-top-color:#3498db;border-radius:50%;animation:spin 1s linear infinite}.loading-spinner:after{content:"Lade Daten...";color:#7f8c8d;font-style:italic;animation:pulse 1.5s ease-in-out infinite}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{0%,to{opacity:.6}50%{opacity:1}}.no-chart-data{text-align:center;padding:3rem;color:#95a5a6;font-size:1.1rem;font-style:italic}.error-message{padding:1rem;background:#fee;border:1px solid #fcc;border-radius:8px;color:#c33;text-align:center}.no-history-data{text-align:center;padding:2rem;color:#7f8c8d;font-style:italic}.history-table-container{overflow-x:auto;border-radius:8px;border:1px solid rgba(0,0,0,.1)}.history-table{width:100%;border-collapse:collapse;font-size:.85rem}.history-table thead{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.history-table th{padding:.75rem .5rem;text-align:left;font-weight:600;text-transform:capitalize;font-size:.8rem;white-space:nowrap}.history-table td{padding:.6rem .5rem;border-bottom:1px solid rgba(0,0,0,.05);color:#2c3e50}.history-table tbody tr:hover{background:#667eea0d}.history-table tbody tr:last-child td{border-bottom:none}.timestamp-cell{font-weight:500;color:#667eea;white-space:nowrap}.table-footer{padding:.75rem;text-align:center;background:#f8f9facc;color:#7f8c8d;font-size:.8rem;border-top:1px solid rgba(0,0,0,.1)}.history-card{grid-column:1 / -1}.sensor-chart{width:100%}.chart-controls{display:flex;gap:.5rem;margin-bottom:1.5rem;flex-wrap:wrap}.chart-section{margin-bottom:2rem}.chart-section:last-child{margin-bottom:0}.chart-title{font-size:1rem;font-weight:600;color:#2c3e50;margin-bottom:1rem;padding-bottom:.5rem;border-bottom:2px solid rgba(102,126,234,.2)}.chart-card{width:100%}.live-sensors-section{margin-bottom:2rem;padding-bottom:1.5rem;border-bottom:2px solid rgba(102,126,234,.1)}.live-sensors-section .section-title{font-size:1rem;font-weight:600;color:#2c3e50;margin-bottom:1rem;display:flex;align-items:center;gap:8px}.live-sensors-section .sensors-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}.live-sensors-section .sensor-item{background:#667eea0d;border-radius:12px;padding:1rem;border:1px solid rgba(102,126,234,.1);transition:all .3s ease}.live-sensors-section .sensor-item:hover{background:#667eea14;border-color:#667eea33;transform:translateY(-2px);box-shadow:0 4px 12px #667eea1a}.live-sensors-section .sensor-name{display:block;font-weight:600;color:#2c3e50;margin-bottom:.5rem;font-size:.9rem}.live-sensors-section .sensor-readings{display:flex;flex-wrap:wrap;gap:.75rem}.live-sensors-section .sensor-temp,.live-sensors-section .sensor-humidity,.live-sensors-section .sensor-battery{display:flex;align-items:center;gap:4px;font-size:.85rem;font-weight:500;padding:4px 8px;border-radius:6px;background:#fffc}.live-sensors-section .sensor-temp{color:#e74c3c;border:1px solid rgba(231,76,60,.2)}.live-sensors-section .sensor-humidity{color:#3498db;border:1px solid rgba(52,152,219,.2)}.live-sensors-section .sensor-battery{color:#27ae60;border:1px solid rgba(39,174,96,.2)}.live-sensors-section .weather-description{color:#3498db;background:#3498db1a;padding:4px 10px;border-radius:12px;font-size:.85rem;border:1px solid rgba(52,152,219,.2);white-space:nowrap}.live-sensors-section .sensor-item.weather-sensor{background:linear-gradient(135deg,#3498db0d,#9b59b60d);border-left:3px solid #3498db}.live-sensors-section .sensor-item.weather-sensor:hover{background:linear-gradient(135deg,#3498db1a,#9b59b61a);transform:translate(4px)}.live-sensors-section .no-data{color:#95a5a6;font-style:italic;font-size:.85rem}.no-chart-data{text-align:center;padding:2rem;color:#7f8c8d;font-style:italic}.spotify-widget{width:100%;min-height:352px}.spotify-widget iframe{border-radius:12px;box-shadow:0 4px 12px #0000001a}.spotify-card{width:100%}.dashboard-media-section .spotify-card{max-width:600px;margin:0 auto}.wifi-qr-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1rem}.wifi-qr-container svg{border:4px solid #f0f0f0;border-radius:12px;padding:1rem;background:#fff}.wifi-info{margin-top:1rem;color:#7f8c8d;font-size:.9rem;font-style:italic}@media(max-width:1200px)and (min-width:1025px){.dashboard{grid-template-columns:repeat(4,1fr);gap:1rem}}@media(max-width:1024px)and (min-width:769px){.dashboard{grid-template-columns:repeat(2,1fr);grid-template-rows:auto auto auto auto auto auto}.lights-card{grid-column:1 / 3;grid-row:1}.scenarios-card{grid-column:1 / 3;grid-row:2}.music-card{grid-column:1 / 3;grid-row:3}.heaters-card{grid-column:1 / 3;grid-row:4}.wifi-card{grid-column:1;grid-row:5}.rolladen-card{grid-column:2;grid-row:5}.chart-card{grid-column:1 / 3;grid-row:6}.vacuum-card{grid-column:1 / 3;grid-row:7}}@media(max-width:768px){.dashboard{grid-template-columns:1fr;grid-template-rows:auto;gap:1rem}.lights-card,.scenarios-card,.music-card,.heaters-card,.wifi-card,.vacuum-card,.rolladen-card,.chart-card{grid-column:1;grid-row:auto}.dashboard-top-section,.dashboard-control-section{grid-template-columns:1fr;gap:1rem}.time-range-btn{min-width:80px;padding:.5rem .75rem;font-size:.8rem}.history-table{font-size:.75rem}.history-table th,.history-table td{padding:.5rem .4rem}.chart-section{margin-bottom:1.5rem}.chart-title{font-size:.9rem}.dashboard-card{padding:1.25rem}.wifi-qr-container svg{width:160px;height:160px}.live-sensors-section .sensors-list{grid-template-columns:1fr;gap:.75rem}.live-sensors-section .sensor-item{padding:.75rem}.live-sensors-section .sensor-readings{gap:.5rem}.live-sensors-section .sensor-temp,.live-sensors-section .sensor-humidity,.live-sensors-section .sensor-battery{font-size:.8rem;padding:3px 6px}}.heater-item-status{display:flex;align-items:center;gap:8px}.heater-local-temp{font-size:.9rem;color:#7f8c8d;background:#0000000d;padding:2px 6px;border-radius:4px}.heater-battery-low{font-size:1rem;animation:pulse 2s infinite}@keyframes pulse{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.shades-control{display:flex;flex-direction:column;gap:10px;padding:10px;background:#ffffff0d;border-radius:12px;margin-bottom:10px}.shades-header{display:flex;align-items:center;justify-content:center;margin-bottom:5px}.shades-device-name{font-weight:500;color:#ffffffe6;font-size:.9rem}.shades-buttons{display:flex;justify-content:space-between;gap:8px}.shades-btn{flex:1;padding:12px 0;border:none;border-radius:8px;font-size:1.2rem;cursor:pointer;transition:all .2s ease;background:#ffffff1a;display:flex;align-items:center;justify-content:center;color:#fff}.shades-btn:hover{background:#fff3;transform:translateY(-2px)}.shades-btn:active{transform:translateY(0)}.shades-btn.up:hover{background:#4caf5033}.shades-btn.stop:hover{background:#ffc10733}.shades-btn.down:hover{background:#2196f333}.vacuum-control{display:flex;flex-direction:column;gap:1rem;padding:.5rem}.vacuum-header{display:flex;justify-content:space-between;align-items:center}.vacuum-actions{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.vacuum-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1rem;border:none;border-radius:12px;background:#fff;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 8px #0000000d;font-weight:500;color:#2c3e50}.vacuum-button:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001a}.vacuum-button:active{transform:translateY(0)}.vacuum-button .icon{font-size:1.5rem}.vacuum-button.start{color:#2e7d32}.vacuum-button.start:hover{background:#f1f8e9}.vacuum-button.home{color:#1565c0}.vacuum-button.home:hover{background:#e3f2fd}.pwa-install-prompt{position:fixed;bottom:20px;left:50%;transform:translate(-50%);z-index:9999;animation:slideUp .4s ease-out;max-width:90%;width:450px}@keyframes slideUp{0%{transform:translate(-50%,100%);opacity:0}to{transform:translate(-50%);opacity:1}}.pwa-install-content{background:linear-gradient(135deg,#667eea,#764ba2);border-radius:16px;padding:20px;display:flex;align-items:center;gap:15px;box-shadow:0 10px 40px #0000004d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.pwa-install-icon{font-size:40px;flex-shrink:0}.pwa-install-text{flex:1;color:#fff}.pwa-install-text h3{margin:0 0 5px;font-size:16px;font-weight:600}.pwa-install-text p{margin:0;font-size:13px;opacity:.9}.pwa-install-actions{display:flex;gap:10px;align-items:center;flex-shrink:0}.pwa-install-btn{background:#fff;color:#667eea;border:none;padding:10px 20px;border-radius:50px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s;box-shadow:0 4px 12px #00000026}.pwa-install-btn:hover{transform:translateY(-2px);box-shadow:0 6px 16px #0003}.pwa-install-btn:active{transform:translateY(0)}.pwa-dismiss-btn{background:#fff3;color:#fff;border:none;width:32px;height:32px;border-radius:50%;font-size:16px;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center}.pwa-dismiss-btn:hover{background:#ffffff4d}@media(max-width:768px){.pwa-install-prompt{bottom:10px;width:calc(100% - 20px)}.pwa-install-content{padding:15px;gap:12px}.pwa-install-icon{font-size:32px}.pwa-install-text h3{font-size:14px}.pwa-install-text p{font-size:12px}.pwa-install-btn{padding:8px 16px;font-size:13px}}.service-status-container{background:#fff;border-radius:12px;padding:1.5rem;box-shadow:0 4px 6px #0000000d;border:1px solid rgba(0,0,0,.05)}.service-status-container h3{margin:0 0 1.5rem;color:#2c3e50;font-size:1.25rem;font-weight:600;display:flex;align-items:center;gap:.5rem}.service-list{display:flex;flex-direction:column;gap:.8rem}.service-item{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.2rem;border-radius:8px;background:#f8f9fa;border:1px solid transparent;transition:all .2s ease}.service-item:hover{transform:translate(4px);background:#fff;border-color:#0000001a;box-shadow:0 2px 8px #0000000d}.service-info{display:flex;align-items:center;gap:1rem;flex:1}.service-name{font-weight:600;color:#2c3e50;font-size:1rem}.service-status-badge{font-size:.75rem;padding:.2rem .6rem;border-radius:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px}.service-item.up .service-status-badge,.service-item.running .service-status-badge{background-color:#d4edda;color:#155724}.service-item.down .service-status-badge{background-color:#f8d7da;color:#721c24}.service-item.up,.service-item.running{border-left:4px solid #28a745}.service-item.down{border-left:4px solid #dc3545}.action-btn{background-color:#fff;border:1px solid #dee2e6;color:#495057;padding:.4rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;text-decoration:none}.action-btn:hover{background-color:#f8f9fa;border-color:#ced4da;transform:translateY(-1px)}.action-btn:active{transform:translateY(1px)}.restart-btn:hover{border-color:#ccedff;color:#0056b3;background-color:#f0f7ff}.gateway-btn{border-color:#fff3cd;color:#856404}.gateway-btn:hover{background-color:#fff3cd;border-color:#ffeeba;color:#856404}.log-btn:hover{border-color:#ccc;background-color:#eee;color:#333}.service-actions{display:flex;align-items:center;gap:8px}@media(max-width:768px){.service-status-container{padding:1rem}.service-item{flex-direction:column;align-items:stretch;gap:1rem;padding:1rem}.service-item:hover{transform:none}.service-info{justify-content:space-between;width:100%}.service-actions{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(80px,1fr));gap:.5rem}.action-btn{width:100%;padding:.6rem;justify-content:center}}.user-management-container{background:#fff;border-radius:12px;padding:1.5rem;box-shadow:0 4px 6px #0000000d;border:1px solid rgba(0,0,0,.05);margin-top:2rem}.user-management-container h3{margin:0 0 1.5rem;color:#2c3e50;font-size:1.25rem;font-weight:600;border-bottom:2px solid #f1f3f5;padding-bottom:.5rem}.user-management-container h4{margin:1rem 0;color:#495057;font-size:1rem}.user-list{display:flex;flex-direction:column;gap:.8rem;margin-bottom:2rem}.user-item{display:flex;justify-content:space-between;align-items:center;padding:.8rem 1rem;background:#f8f9fa;border-radius:8px;border:1px solid #e9ecef}.user-details{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}.user-name{font-weight:600;color:#2c3e50}.user-role-badge{font-size:.75rem;padding:.2rem .6rem;border-radius:12px;font-weight:700;text-transform:uppercase}.user-role-badge.admin{background-color:#e3f2fd;color:#1565c0}.user-role-badge.user{background-color:#f3e5f5;color:#7b1fa2}.user-created{font-size:.8rem;color:#868e96}.btn-delete{background-color:#fff;border:1px solid #ffc9c9;color:#e03131;padding:.3rem .8rem;border-radius:4px;cursor:pointer;font-weight:500;transition:all .2s}.btn-delete:hover{background-color:#fff5f5;border-color:#ffa8a8}.current-user-badge{color:#868e96;font-size:.9rem;font-style:italic}.add-user-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;align-items:end;background:#f8f9fa;padding:1.5rem;border-radius:8px;border:1px solid #e9ecef}.form-group{display:flex;flex-direction:column;gap:.5rem}.form-group label{font-size:.9rem;font-weight:500;color:#495057}.form-group input,.form-group select{padding:.5rem;border:1px solid #ced4da;border-radius:4px;font-size:.95rem}.btn-add{padding:.5rem 1rem;background-color:#339af0;color:#fff;border:none;border-radius:4px;font-weight:600;cursor:pointer;white-space:nowrap}.btn-add:hover{background-color:#228be6}.alert{padding:.8rem;border-radius:6px;margin-bottom:1rem;font-size:.9rem}.alert-error{background-color:#fff5f5;color:#c92a2a;border:1px solid #ffc9c9}.alert-success{background-color:#e6fcf5;color:#087f5b;border:1px solid #b2f2bb}@media(max-width:600px){.user-item{flex-direction:column;align-items:flex-start;gap:.5rem}.user-actions{width:100%;display:flex;justify-content:flex-end}.add-user-form{grid-template-columns:1fr}}
