:root{--color-bg:#f8fafc;--color-surface:#fff;--color-border:#e2e8f0;--color-text:#0f172a;--color-text-muted:#64748b;--color-primary:#f59e0b;--color-primary-dark:#d97706;--color-success:#16a34a;--color-error:#dc2626;--color-inactive:#94a3b8;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}body{background:var(--color-bg);color:var(--color-text);margin:0}h1,h2{margin:0 0 .75rem}.page-loading{height:100vh;color:var(--color-text-muted);justify-content:center;align-items:center;font-size:1.2rem;display:flex}.auth-page{justify-content:center;align-items:center;min-height:100vh;padding:1rem;display:flex}.auth-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:12px;flex-direction:column;gap:1rem;width:100%;max-width:380px;padding:2rem;display:flex;box-shadow:0 4px 16px #0f172a0f}.auth-card h1{text-align:center;font-size:1.5rem}.auth-card__subtitle{text-align:center;color:var(--color-text-muted);margin:-.5rem 0 0}.auth-card__footer{text-align:center;color:var(--color-text-muted);margin:0;font-size:.9rem}.app-shell{flex-direction:column;min-height:100vh;display:flex}.app-header{z-index:40;background:var(--color-surface);border-bottom:1px solid var(--color-border);align-items:center;gap:2rem;padding:.75rem 1.5rem;display:flex;position:sticky;top:0}.app-header__brand{font-size:1.1rem;font-weight:700}.app-header__nav{flex-wrap:wrap;flex:1;gap:1.25rem;min-width:0;display:flex}.app-header__nav a{color:var(--color-text-muted);white-space:nowrap;border-bottom:2px solid #0000;padding:.4rem 0;font-weight:500;text-decoration:none}.app-header__nav a.active{color:var(--color-text);border-bottom-color:var(--color-primary)}.app-header__user{color:var(--color-text-muted);align-items:center;gap:.75rem;min-width:0;font-size:.9rem;display:flex}.app-header__user>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.badge{background:var(--color-primary);color:#fff;vertical-align:middle;border-radius:4px;margin-left:.4rem;padding:.1rem .4rem;font-size:.7rem}.app-content{flex:1;width:100%;max-width:1100px;margin:0 auto;padding:1.5rem}.app-header__toggle{width:2.5rem;height:2.5rem;color:var(--color-text);cursor:pointer;touch-action:manipulation;background:0 0;border:none;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:.45rem;display:none}.app-header__toggle-bar{background:currentColor;border-radius:2px;width:100%;height:2px;transition:transform .2s,opacity .2s;display:block}@media (width<=800px){.app-header{grid-template-columns:1fr auto;gap:.25rem 1rem;padding:.75rem 1rem;display:grid}.app-header__brand{grid-column:1}.app-header__toggle{grid-column:2;display:flex}.app-header__toggle[aria-expanded=true] .app-header__toggle-bar:first-child{transform:translateY(7px)rotate(45deg)}.app-header__toggle[aria-expanded=true] .app-header__toggle-bar:nth-child(2){opacity:0}.app-header__toggle[aria-expanded=true] .app-header__toggle-bar:nth-child(3){transform:translateY(-7px)rotate(-45deg)}.app-header__nav{border-top:1px solid var(--color-border);flex-flow:column;grid-column:1/-1;gap:0;padding:.25rem 0;display:none}.app-header__nav.is-open{display:flex}.app-header__nav a{border-bottom:1px solid var(--color-border);padding:.85rem 0}.app-header__nav a.active{border-bottom-width:2px;border-bottom-color:var(--color-primary)}.app-header__user{border-top:1px solid var(--color-border);flex-direction:column;grid-column:1/-1;padding:.75rem 0 .25rem;display:none}.app-header__user.is-open{align-items:stretch;display:flex}.app-header__user>span{text-overflow:clip;white-space:normal;overflow:visible}.app-header__user .btn{width:100%}}.btn{cursor:pointer;border:none;border-radius:8px;padding:.6rem 1.1rem;font-size:.95rem;font-weight:600}.btn:disabled{opacity:.6;cursor:not-allowed}.btn--primary{background:var(--color-primary);color:#fff}.btn--primary:hover:not(:disabled){background:var(--color-primary-dark)}.btn--ghost{border:1px solid var(--color-border);color:var(--color-text);background:0 0}.btn--small{padding:.3rem .6rem;font-size:.8rem}.btn--icon{border:1px solid var(--color-border);color:var(--color-text);background:0 0;border-radius:8px;justify-content:center;align-items:center;width:2.4rem;height:2.4rem;padding:0;font-size:1.1rem;line-height:1;display:inline-flex}.button-row{align-items:center;gap:.75rem;display:flex}.page-header-row{justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.75rem;display:flex}.page-header-row h1{margin:0}label{color:var(--color-text);flex-direction:column;gap:.3rem;font-size:.9rem;font-weight:500;display:flex}input,select{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .6rem;font-family:inherit;font-size:.95rem}.checkbox-label{flex-direction:row;align-items:center;gap:.5rem}small{color:var(--color-text-muted);font-weight:400}.alert{border-radius:8px;padding:.6rem .9rem;font-size:.9rem}.alert--error{color:var(--color-error);background:#fef2f2;border:1px solid #fecaca}.alert--success{color:var(--color-success);background:#f0fdf4;border:1px solid #bbf7d0}.card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:12px;flex-direction:column;gap:1rem;margin-bottom:1.5rem;padding:1.5rem;display:flex}.card--muted{color:var(--color-text-muted)}.shutters-grid{grid-template-columns:repeat(5,1fr);gap:1rem;display:grid}@media (width<=1400px){.shutters-grid{grid-template-columns:repeat(4,1fr)}}@media (width<=1100px){.shutters-grid{grid-template-columns:repeat(3,1fr)}}@media (width<=800px){.shutters-grid{grid-template-columns:repeat(2,1fr)}}@media (width<=520px){.shutters-grid{grid-template-columns:1fr}}.shutter-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:12px;flex-direction:column;align-items:center;gap:.6rem;padding:1.25rem;display:flex}.shutter-card__name{text-align:center;margin:0;font-size:1.05rem}.shutter-visual{justify-content:center;align-items:stretch;gap:.85rem;height:180px;display:flex}.shutter-visual__slider{writing-mode:vertical-lr;cursor:pointer;width:22px;accent-color:var(--color-primary);touch-action:none;direction:rtl}.shutter-visual__slider:disabled{cursor:not-allowed;opacity:.4}.shutter-visual__window{border:2px solid var(--color-border);background:linear-gradient(#bfe3ff,#eef8ff);border-radius:4px;width:84px;position:relative;overflow:hidden}.shutter-visual__slat{background:repeating-linear-gradient(#8a8f98 0 6px,#6d7178 6px 8px);width:100%;transition:height .4s;position:absolute;top:0;left:0}.shutter-visual__label{text-align:center;color:var(--color-text);text-shadow:0 0 4px var(--color-surface), 0 0 4px var(--color-surface);font-size:.75rem;font-weight:600;position:absolute;bottom:4px;left:0;right:0}.shutter-card__controls{justify-content:center;gap:.5rem}.shutter-card__controls .btn{justify-content:center;align-items:center;width:40px;height:40px;padding:0;display:inline-flex}.shutter-card__secondary{justify-content:center;gap:.5rem}.section-hint{color:var(--color-text-muted);margin:-.5rem 0 0;font-size:.9rem}.form-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;display:grid}.inline-form{border-top:1px solid var(--color-border);flex-wrap:wrap;align-items:end;gap:1rem;padding-top:1rem;display:flex}.inline-form label{flex:1;min-width:140px}.equipment-ev-row td{background:#fffbeb;padding:.75rem .6rem}.ev-profile{flex-wrap:wrap;align-items:end;gap:1rem;display:flex}.ev-profile label{min-width:140px}.ev-profile .section-hint{flex-basis:100%;margin:0}.amperage-checkboxes{border:none;flex-wrap:wrap;flex-basis:100%;align-items:center;gap:.25rem 1rem;margin:0;padding:0;display:flex}.amperage-checkboxes legend{flex-basis:100%;margin-bottom:.3rem;padding:0;font-size:.9rem;font-weight:500}.amperage-checkbox{white-space:nowrap;font-size:.9rem;font-weight:400}.off-peak-ranges{flex-direction:column;gap:.5rem;display:flex}.off-peak-ranges__label{font-size:.9rem;font-weight:500}.off-peak-range-row{align-items:center;gap:.5rem;display:flex}.automation-status__headline{margin:0;font-size:1.15rem;font-weight:700}.enphase-status{background:var(--card-muted-bg,#7f7f7f14);border-radius:8px;margin-top:1rem;padding:.75rem 1rem}.enphase-status__label{margin-bottom:.4rem;font-size:.85rem;font-weight:500;display:block}.enphase-status__grid{flex-wrap:wrap;gap:.5rem 1.5rem;font-size:.9rem;display:flex}.weather-strip{flex-wrap:wrap;gap:.75rem;margin-top:.5rem;display:flex}.weather-strip__hour{flex-direction:column;align-items:center;gap:.15rem;min-width:3.5rem;display:flex}.weather-strip__icon{font-size:1.4rem}.weather-strip__percent{color:var(--text-muted,currentColor);font-size:.85rem}.weather-strip__label{font-size:.8rem;font-weight:500}.weather-strip__summary-label{margin-top:.75rem}.pool-schedule{flex-wrap:wrap;gap:.5rem;margin:.5rem 0;padding:0;list-style:none;display:flex}.pool-schedule li{background:var(--card-muted-bg,#7f7f7f14);border-radius:6px;padding:.3rem .7rem;font-size:.9rem}.discovered-devices{flex-direction:column;align-items:flex-start;gap:.5rem;margin-top:.5rem;display:flex}.data-table{border-collapse:collapse;width:100%;font-size:.9rem}.data-table th,.data-table td{text-align:left;border-bottom:1px solid var(--color-border);padding:.5rem .6rem}.data-table th{color:var(--color-text-muted);text-transform:uppercase;font-size:.8rem;font-weight:600}.table-input{width:90px}.muted{color:var(--color-text-muted);font-size:.85rem}.week-nav{justify-content:space-between;align-items:center;margin-bottom:1.5rem;display:flex}.day-toggle{gap:.75rem;margin-bottom:1.5rem;display:flex}.week-nav__label{font-weight:600}.day-tabs{grid-template-columns:repeat(7,1fr);gap:.5rem;margin-bottom:1.5rem;display:grid}.day-tab{cursor:pointer;background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;flex-direction:column;align-items:center;gap:.2rem;padding:.6rem .4rem;display:flex}.day-tab--active{border-color:var(--color-primary);background:#fffbeb}.day-tab--today .day-tab__date{color:var(--color-primary)}.day-tab__weekday{color:var(--color-text-muted);text-transform:uppercase;font-size:.75rem}.day-tab__date{font-size:1.2rem;font-weight:700}.day-tab__cost{color:var(--color-text-muted);font-size:.75rem}.equipment-tiles{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.75rem;margin-bottom:1rem;display:grid}.equipment-tile{cursor:pointer;background:var(--color-surface);border:2px solid var(--color-border);text-align:left;border-radius:12px;flex-direction:column;gap:.3rem;min-height:90px;padding:1.1rem .9rem;transition:border-color .15s,background .15s;display:flex}.equipment-tile:hover{border-color:var(--color-primary)}.equipment-tile--selected{background:#f0fdf4;border-color:#16a34a}.equipment-tile__name{font-size:1.05rem;font-weight:700}.equipment-tile__type{color:var(--color-text-muted);font-size:.8rem}.equipment-tile__schedule{color:#16a34a;margin-top:auto;font-size:.85rem;font-weight:600}.prevision-row{border-bottom:1px solid var(--color-border);padding:.9rem 0}.prevision-row:last-of-type{border-bottom:none}.prevision-row__toggle{font-size:1rem}.prevision-row__details{background:#fffbeb;border-radius:8px;flex-wrap:wrap;align-items:end;gap:1rem;margin-top:.75rem;padding:.75rem;display:flex}.prevision-row__details label{min-width:120px}.resale-banner{color:var(--color-text-muted);flex-wrap:wrap;gap:.5rem 1.5rem;margin-top:-.5rem;font-size:.9rem;display:flex}.balance-positive{color:#16a34a;font-weight:600}.balance-negative{color:#ca8a04;font-weight:600}.status-banner{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem;margin-bottom:1.5rem;display:grid}.status-banner__metric{background:var(--color-surface);border:1px solid var(--color-border);border-radius:12px;flex-direction:column;gap:.25rem;padding:1rem 1.1rem;display:flex}.status-banner__label{color:var(--color-text-muted);font-size:.8rem}.status-banner__value{font-size:1.6rem;font-weight:700}.status-banner__value--negative{color:var(--color-error)}.status-banner__value--positive{color:var(--color-success)}.trend-arrow{vertical-align:middle;margin-left:.35rem}.trend-arrow--positive{color:var(--color-success)}.trend-arrow--negative{color:var(--color-error)}.status-tiles{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:1rem;display:grid}.status-tile{cursor:pointer;background:var(--color-surface);border:2px solid var(--color-border);text-align:center;border-radius:16px;flex-direction:column;align-items:center;gap:.5rem;padding:1.25rem .75rem;transition:border-color .15s,background .15s,transform .1s;display:flex}.status-tile:hover{transform:translateY(-2px)}.status-tile:disabled{cursor:default}.status-tile:disabled:hover{transform:none}.status-tile--active{border-color:var(--color-success);background:#f0fdf4}.status-tile--inactive{border-color:var(--color-border)}.status-tile__icon{font-size:2.5rem;line-height:1}.status-tile__dot{background:var(--color-inactive);border-radius:50%;width:10px;height:10px}.status-tile--active .status-tile__dot{background:var(--color-success)}.status-tile__name{font-size:.95rem;font-weight:600}.status-tile__state,.status-tile__plug{color:var(--color-text-muted);font-size:.8rem}.status-tile__plug--unplugged{text-decoration:line-through}.status-tile__battery{color:var(--color-text-muted);font-size:.8rem}.status-action-overlay{z-index:50;background:#0f172a66;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.status-action-panel{background:var(--color-surface);border-radius:16px 16px 0 0;flex-direction:column;gap:.6rem;width:100%;max-width:420px;padding:1.25rem;display:flex}.status-action-panel__title{margin-bottom:.25rem;font-weight:700}@media (width>=640px){.status-action-overlay{align-items:center}.status-action-panel{border-radius:16px}}@media (width<=480px){.status-banner{grid-template-columns:1fr 1fr}.status-tiles{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}.status-tile__icon{font-size:2rem}}.log-entry__date{white-space:nowrap;color:var(--color-text-muted);font-size:.85rem}.log-badge{white-space:nowrap;background:var(--color-bg);border:1px solid var(--color-border);color:var(--color-text-muted);border-radius:999px;padding:.15rem .6rem;font-size:.75rem;font-weight:600;display:inline-block}.log-badge--mail{color:#1d4ed8;background:#eff6ff;border-color:#bfdbfe}.log-badge--error{color:var(--color-error);background:#fef2f2;border-color:#fecaca}.log-badge--car_auto_start{color:var(--color-success);background:#f0fdf4;border-color:#bbf7d0}.log-badge--car_auto_stop{color:#b45309;background:#fffbeb;border-color:#fde68a}.log-badge--equipment_start{color:#6d28d9;background:#f5f3ff;border-color:#ddd6fe}.log-badge--shutter_move{color:#0369a1;background:#f0f9ff;border-color:#bae6fd}.log-badge--blind_auto_open{color:#047857;background:#ecfdf5;border-color:#a7f3d0}.log-badge--blind_auto_close{color:#c2410c;background:#fff7ed;border-color:#fed7aa}.log-badge--scenario_action{color:#4338ca;background:#eef2ff;border-color:#c7d2fe}.log-badge--pool_manual{color:#15803d;background:#f0fdf4;border-color:#bbf7d0}.log-badge--pool_cover_manual{color:#0e7490;background:#ecfeff;border-color:#a5f3fc}.log-badge--config_snapshot_saved{color:#6d28d9;background:#f5f3ff;border-color:#ddd6fe}.log-badge--config_snapshot_restored{color:#a21caf;background:#fdf4ff;border-color:#f5d0fe}
