/* ui2.css — la interfaz nueva de Merlin (10-nov-2026). TODO va bajo html[data-ui="2"]: con la bandera apagada no cambia nada.
   Lenguaje: estado primero y en grande; el color vive en el icono y, al encender, llena el azulejo; sin bordes, dos sombras,
   radios 14 y 22; cápsulas; mucho aire. Colores y tipografía, los de siempre (styles.css). Ver ui2.js. */
html[data-ui="2"] { --u2-r: 22px; --u2-s1: 0 1px 2px rgba(0,0,0,.2), 0 10px 28px -14px rgba(0,0,0,.5); }
html[data-ui="2"][data-theme="light"] { --u2-s1: 0 1px 2px rgba(60,60,67,.08), 0 12px 28px -16px rgba(60,60,67,.3); }
.ui2-resumen, .ui2-barra { display: none; }

/* ── Inicio: la casa de un vistazo ── */
html[data-ui="2"] .home-strip { display: none; }
html[data-ui="2"] .ui2-resumen:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; margin-bottom: 30px; }
.u2-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 128px; padding: 16px 16px 15px; border: 0; border-radius: var(--u2-r);
  background: var(--m-bg-2); color: var(--m-text); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--u2-s1); transition: transform .2s, background .2s; --u2-c: var(--m-text-soft); }
[data-theme="light"] .u2-tile { background: #fff; }
.u2-tile:hover { transform: translateY(-2px); }
.u2-tile:active { transform: scale(.97); }
.u2-tile:focus-visible, .u2-fila:focus-visible, .ui2-barra button:focus-visible { outline: 2px solid var(--m-brand); outline-offset: 2px; }
.u2-ic { font-size: 28px; line-height: 1; margin-bottom: auto; color: var(--u2-c); }
.u2-et { font-size: 13px; color: var(--m-text-soft); margin-top: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.u2-es { font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* El color de cada función: siempre en el icono; con algo encendido, tiñe el azulejo entero. */
.u2-luz { --u2-c: #E0A800; } .u2-clima { --u2-c: #F0822A; } .u2-persiana { --u2-c: var(--m-brand); } .u2-musica { --u2-c: #A45DE8; }
.u2-energia { --u2-c: #19A7E0; } .u2-enchufe { --u2-c: #30B15A; } .u2-alarma { --u2-c: var(--m-brand); } .u2-exterior { --u2-c: #5AA9E6; }
.u2-tile:not(.on):not(.aviso) .u2-ic { color: var(--m-text-soft); }
.u2-tile.on { background: color-mix(in srgb, var(--u2-c) 20%, var(--m-bg-2)); }
[data-theme="light"] .u2-tile.on { background: color-mix(in srgb, var(--u2-c) 16%, #fff); }
.u2-tile.aviso { --u2-c: var(--m-orange); background: color-mix(in srgb, var(--m-orange) 20%, var(--m-bg-2)); }
[data-theme="light"] .u2-tile.aviso { background: color-mix(in srgb, var(--m-orange) 16%, #fff); }

/* ── El mismo aire en lo que ya había en Inicio ── */
html[data-ui="2"] .topbar-greeting h1, html[data-ui="2"] .topbar h1 { font-size: 28px; letter-spacing: -.03em; }
html[data-ui="2"] .hk-tile { border-radius: 18px; border-color: transparent; min-height: 104px; }
html[data-ui="2"] .hk-nombre { font-size: 14px; }
html[data-ui="2"] .hk-estado { font-size: 12.5px; }
html[data-ui="2"] .hk-head .room-name { font-size: 20px; letter-spacing: -.02em; }

/* ── Estancias y Funciones: filas grandes ── */
.ui2-lista { display: grid; gap: 10px; max-width: 760px; }
.u2-fila { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 68px; padding: 12px 18px; border: 0; border-radius: 18px; background: var(--m-bg-2); color: var(--m-text);
  font: inherit; text-align: left; cursor: pointer; box-shadow: var(--u2-s1); transition: transform .2s; }
[data-theme="light"] .u2-fila { background: #fff; }
.u2-fila:active { transform: scale(.985); }
.u2-fi { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 24px; color: var(--m-text-soft); }
.u2-fi .room-icon-box, .u2-fi img { width: 40px; height: 40px; }
.u2-fila.on .u2-fi { color: var(--m-brand-txt); }
.u2-fn { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u2-fe { font-size: 14px; color: var(--m-text-soft); white-space: nowrap; }
.u2-fila.on .u2-fe { color: var(--m-brand-txt); font-weight: 600; }
.u2-fch { color: var(--m-text-dim); font-size: 18px; }
.u2-grupo { font-size: 13px; font-weight: 600; color: var(--m-text-soft); margin: 18px 4px 2px; }
.u2-vacio { color: var(--m-text-soft); padding: 28px 4px; }

/* ── Barra flotante del móvil: Inicio · Estancias · Merlin · Funciones ── */
@media (max-width: 600px) {
  html[data-ui="2"] { --tabbar-h: calc(88px + var(--m-sab)); }
  html[data-ui="2"] .ui2-barra:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 4px; position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + var(--m-sab)); z-index: 60; width: min(340px, calc(100vw - 32px)); height: 64px; padding: 6px 10px; border-radius: 999px;
    background: color-mix(in srgb, var(--m-bg-2) 88%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 10px 34px -8px rgba(0,0,0,.55), 0 0 0 1px var(--m-border); }
  .ui2-barra button { flex: 1; height: 52px; border: 0; background: none; color: var(--m-text-dim); font: inherit; font-size: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; cursor: pointer; }
  .ui2-barra button i { font-size: 23px; }
  .ui2-barra button[aria-current="page"] { color: var(--m-brand-txt); }
  .ui2-barra button[aria-current="page"] span { font-weight: 600; }
  .ui2-barra .u2-merlin { flex: 0 0 60px; height: 60px; margin: 0 4px; background: var(--m-brand); color: #fff; box-shadow: 0 8px 20px -6px var(--m-brand); }
  .ui2-barra .u2-merlin i { font-size: 27px; }
  .ui2-barra .u2-merlin span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ui2-barra .u2-merlin[aria-current="page"] { color: #fff; box-shadow: 0 0 0 3px var(--m-bg), 0 0 0 5px var(--m-brand); }
  html[data-ui="2"] .ui2-resumen:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .u2-tile { min-height: 118px; padding: 14px; }
  .u2-es { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .u2-tile, .u2-fila { transition: none; } .u2-tile:hover { transform: none; } }
@media (max-width: 600px) {
  html[data-ui="2"] .topbar-greeting h1, html[data-ui="2"] .topbar h1 { font-size: 22px; }
  .u2-tile { min-height: 100px; padding: 13px 14px; }
  .u2-ic { font-size: 24px; }
  .u2-et { margin-top: 10px; }
}


/* ══ Fase 2: la hoja de control — un aparato, un control protagonista ══ */
.u2-hoja { width: min(440px, 100vw); max-width: 100vw; max-height: min(92dvh, 860px); margin: auto auto 0; padding: 0; border: 0; border-radius: 28px 28px 0 0; background: var(--m-bg-2); color: var(--m-text); overflow: hidden; }
[data-theme="light"] .u2-hoja { background: #F7F7FA; }
.u2-hoja[open] { display: flex; flex-direction: column; animation: u2-sube .26s cubic-bezier(.2,.8,.2,1); }
.u2-hoja::backdrop { background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes u2-sube { from { transform: translateY(26px); opacity: 0; } }
@media (min-width: 720px) { .u2-hoja { margin: auto; border-radius: 28px; } }
.u2-hoja-cuerpo { overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.u2-hc { display: flex; align-items: center; gap: 14px; }
.u2-hi { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 23px; background: var(--m-bg-3); color: var(--m-text-soft); }
.u2-hi.on { background: var(--m-brand-soft); color: var(--m-brand-txt); }
.u2-ht { flex: 1; min-width: 0; }
.u2-hn { font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u2-hs { font-size: 13px; color: var(--m-text-soft); margin-top: 2px; }
.u2-hx { width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; background: var(--m-bg-3); color: var(--m-text-soft); font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.u2-hx:focus-visible, .u2-cap:focus-visible, .u2-pm:focus-visible, .u2-pot:focus-visible, .u2-chip:focus-visible, .u2-vs:focus-visible { outline: 2px solid var(--m-brand); outline-offset: 3px; }
.u2-heroe { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 6px 0 2px; }
/* Luz: una barra vertical que se llena. Se arrastra entera, no solo un tirador. */
.u2-vs { --u2-h: 300px; position: relative; width: 132px; height: var(--u2-h); border-radius: 38px; background: var(--m-bg-3); overflow: hidden; cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; --u2-c: #F2C230; }
[data-theme="light"] .u2-vs { background: #E6E6EC; }
.u2-vf { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; overflow: hidden; height: var(--p, 0%); background: linear-gradient(180deg, #FFE27A, var(--u2-c)); transition: height .12s linear; }
.u2-vs > i { position: absolute; z-index: 2; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 30px; color: var(--m-text-soft); pointer-events: none; }
.u2-vs.on > i { color: #3a2c00; }
.u2-vv { position: absolute; left: 0; right: 0; top: 20px; height: 28px; line-height: 28px; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -.02em; pointer-events: none; color: var(--m-text); }
/* 20-nov: la cifra va dos veces en el mismo sitio. La de fuera, clara, sobre el fondo; la de dentro del relleno, oscura y recortada
   por él. Entre el 84 y el 94 % el borde del amarillo la cruzaba y, del 80 al 84 %, salía oscura sobre el fondo oscuro. */
.u2-vf > .u2-vv { top: auto; bottom: calc(var(--u2-h) - 48px); color: #3a2c00; }
/* Encender y apagar a lo grande, para lo que solo sabe eso. */
.u2-pot { width: 150px; height: 150px; border-radius: 50%; border: 0; background: var(--m-bg-3); color: var(--m-text-soft); font-size: 58px; cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s, transform .1s; }
.u2-pot.on { background: var(--m-brand); color: #fff; box-shadow: 0 16px 36px -14px var(--m-brand); }
.u2-pot:active, .u2-pm:active, .u2-cap:active { transform: scale(.95); }
/* Clima: la consigna en grande entre − y +. */
.u2-dial { gap: 16px; padding: 18px 0 8px; }
.u2-dc { min-width: 150px; text-align: center; }
.u2-dt { font-size: 64px; font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.u2-dial.on .u2-dt { color: #F0822A; }
.u2-da { font-size: 13px; color: var(--m-text-soft); margin-top: 8px; }
.u2-pm { width: 62px; height: 62px; flex: none; border-radius: 50%; border: 0; background: var(--m-bg-3); color: var(--m-text); font-size: 26px; cursor: pointer; display: grid; place-items: center; transition: transform .1s; }
[data-theme="light"] .u2-pm, [data-theme="light"] .u2-pot:not(.on), [data-theme="light"] .u2-hx, [data-theme="light"] .u2-hi:not(.on) { background: #E6E6EC; }
.u2-pm:disabled { opacity: .35; cursor: default; }
/* Cápsulas: rellena la principal, tintada la secundaria; chips para elegir entre pocos. */
.u2-acc { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.u2-cap { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 160px; height: 50px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--m-bg-3); color: var(--m-text); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform .1s, background .2s; }
[data-theme="light"] .u2-cap { background: #E6E6EC; }
.u2-cap.on { background: var(--m-brand); color: #fff; }
.u2-cap.sec { background: var(--m-brand-soft); color: var(--m-brand-txt); }
.u2-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.u2-chip { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--m-bg-3); color: var(--m-text-soft); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
[data-theme="light"] .u2-chip { background: #E6E6EC; }
.u2-chip.on { background: var(--m-brand); color: #fff; }
.u2-mas { border-top: 1px solid var(--m-border); padding-top: 12px; }
.u2-mas summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--m-text-soft); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.u2-mas summary::-webkit-details-marker { display: none; }
.u2-mas summary::after { content: '+'; font-size: 20px; font-weight: 400; }
.u2-mas[open] summary::after { content: '−'; }
.u2-mas[open] summary { margin-bottom: 10px; }
/* Persiana y reproductor: su tarjeta de siempre, a lo grande dentro de la hoja. */
.u2-solo .cv-card, .u2-solo .media-caja { background: none; box-shadow: none; padding: 0; margin: 0; }
.u2-solo .cv-cab { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.u2-solo .cv-ventana { width: 170px; height: 218px; border-radius: 16px; }
.u2-solo .cv-ventana.cv-acceso { width: 220px; height: 190px; }
.u2-solo .cv-info .device-name { font-size: 20px; font-weight: 700; white-space: normal; }
.u2-solo .cv-botones { justify-content: center; gap: 12px; margin-top: 16px; }
.u2-solo .cv-btn { width: 64px; height: 56px; border-radius: 18px; font-size: 24px; }
.u2-solo .cv-pre { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .u2-hoja[open] { animation: none; } .u2-vf { transition: none; } }


/* ══ Fase 3: el reproductor a lo grande y la barra «suena ahora» ══ */
.u2-mp { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.u2-mp-art { width: min(240px, 62vw); aspect-ratio: 1; border-radius: 26px; object-fit: cover; margin-bottom: 14px; box-shadow: 0 22px 44px -22px rgba(0,0,0,.75); }
.u2-mp-vacia { display: grid; place-items: center; font-size: 76px; color: #fff; background: linear-gradient(145deg, #A45DE8, #5B3FD6 55%, #2A6EDD); }
.u2-mp:not(.suena) .u2-mp-vacia { background: var(--m-bg-3); color: var(--m-text-dim); box-shadow: none; }
[data-theme="light"] .u2-mp:not(.suena) .u2-mp-vacia { background: #E6E6EC; }
.u2-mp-tit { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.u2-mp-sub { font-size: 14px; color: var(--m-text-soft); min-height: 20px; }
.u2-mp-prog { width: 100%; margin-top: 10px; font-size: 12px; }
.u2-mp-prog .media-barra { height: 6px; border-radius: 3px; background: var(--m-bg-3); }
.u2-mp-directo { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 13px; color: var(--m-text-soft); }
.u2-mp-tr { display: flex; align-items: center; justify-content: center; gap: 26px; }
.u2-mp-tr button { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--m-bg-3); color: var(--m-text); font-size: 24px; cursor: pointer; display: grid; place-items: center; transition: transform .1s; }
[data-theme="light"] .u2-mp-tr button, [data-theme="light"] .u2-mp-prog .media-barra { background: #E6E6EC; }
.u2-mp-tr button.pral { width: 78px; height: 78px; font-size: 34px; background: var(--m-brand); color: #fff; box-shadow: 0 16px 32px -14px var(--m-brand); }
[data-theme="light"] .u2-mp-tr button.pral { background: var(--m-brand); }
.u2-mp-tr button:active, .u2-su-p:active { transform: scale(.93); }
.u2-mp-tr button:focus-visible, .u2-su-abre:focus-visible, .u2-su-p:focus-visible { outline: 2px solid var(--m-brand); outline-offset: 3px; }
.u2-mp-vol { display: flex; align-items: center; gap: 10px; }
.u2-mp-vol .brightness-slider { flex: 1; height: 8px; }
.u2-mp-vol .luz-val { min-width: 48px; text-align: right; font-size: 13px; color: var(--m-text-soft); }
.u2-sel { width: 100%; height: 44px; border: 0; border-radius: 14px; background: var(--m-bg-3); font-size: 15px; }
[data-theme="light"] .u2-sel { background: #E6E6EC; }

.u2-suena { position: fixed; z-index: 59; right: 24px; bottom: 22px; width: min(360px, calc(100vw - 32px)); height: 60px; padding: 6px 8px 6px 6px; display: flex; align-items: center; gap: 6px; border-radius: 20px;
  background: color-mix(in srgb, var(--m-bg-2) 90%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 12px 34px -10px rgba(0,0,0,.55), 0 0 0 1px var(--m-border); }
.u2-suena[hidden] { display: none; }
.u2-su-abre { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--m-text); font: inherit; text-align: left; cursor: pointer; border-radius: 14px; padding: 0; }
.u2-su-abre img, .u2-su-ic { width: 48px; height: 48px; flex: none; border-radius: 13px; object-fit: cover; }
.u2-su-ic { display: grid; place-items: center; font-size: 22px; color: #fff; background: linear-gradient(145deg, #A45DE8, #2A6EDD); }
.u2-su-txt { min-width: 0; display: flex; flex-direction: column; }
.u2-su-txt b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u2-su-txt small { font-size: 12px; color: var(--m-text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u2-su-p { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--m-bg-3); color: var(--m-text); font-size: 20px; cursor: pointer; display: grid; place-items: center; transition: transform .1s; }
[data-theme="light"] .u2-su-p { background: #E6E6EC; }
@media (max-width: 600px) {
  .u2-suena { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(86px + var(--m-sab)); width: min(340px, calc(100vw - 32px)); }
  html.u2-con-suena[data-ui="2"] { --tabbar-h: calc(158px + var(--m-sab)); }
}
.u2-hoja .u2-sel { background: var(--m-bg-3); border: 0; }
[data-theme="light"] .u2-hoja .u2-sel { background: #E6E6EC; }

/* ══ Fase 4: los gestos de la casa, la estancia, seguridad y energía ══ */
/* Los títulos de pantalla y de sección, en el mismo tono que Inicio: grandes, en redonda, sin versalitas. */
html[data-ui="2"] .view-header h2 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
html[data-ui="2"] .view-subtitle { font-size: 15px; }
html[data-ui="2"] .main .card, html[data-ui="2"] .metric-card, html[data-ui="2"] .security-row, html[data-ui="2"] .alarm-card { border: 0; border-radius: var(--u2-r); box-shadow: var(--u2-s1); }
html[data-ui="2"][data-theme="light"] .main .card, html[data-ui="2"][data-theme="light"] .metric-card, html[data-ui="2"][data-theme="light"] .security-row, html[data-ui="2"][data-theme="light"] .alarm-card { background: #fff; }

/* Apagar luces · Cerrar persianas: en Inicio (toda la casa) y arriba de cada estancia. */
.u2-acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.u2-acciones .u2-cap { min-width: 0; height: 44px; padding: 0 18px; font-size: 14.5px; white-space: nowrap; }
html[data-ui="2"] .ui2-resumen .u2-acciones { grid-column: 1 / -1; margin-top: 6px; }

/* Estancia: nombre grande, sus dos gestos y los azulejos. Lo que ya tiene hoja no se repite debajo como sección. */
html[data-ui="2"] .sala-cab h2 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
html[data-ui="2"] .sala-cab { margin-bottom: 14px; }
html[data-ui="2"] .sala-cab + .u2-acciones { margin: 0 0 20px; }
html[data-ui="2"] .sala-baldosas { margin-bottom: 28px; }
html[data-ui="2"] .modal-section h4, html[data-ui="2"] #security-list h4 { font-size: 17px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: -.01em !important; color: var(--m-text) !important; margin-bottom: 12px !important; }

/* Seguridad: cómo está la alarma, en grande; sus órdenes, en cápsulas; y lo que está saltando, lo primero. */
html[data-ui="2"] .alarm-card { padding: 22px; }
html[data-ui="2"] .alarm-card.armed { background: color-mix(in srgb, var(--m-red) 12%, var(--m-bg-2)); }
html[data-ui="2"][data-theme="light"] .alarm-card.armed { background: color-mix(in srgb, var(--m-red) 9%, #fff); }
html[data-ui="2"] .alarm-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 18px; }
html[data-ui="2"] .alarm-title { font-size: 13px; font-weight: 500; color: var(--m-text-soft); }
html[data-ui="2"] .alarm-state { padding: 0; background: none; border-radius: 0; font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: var(--m-text); }
html[data-ui="2"] .alarm-state.armed { background: none; color: var(--m-red); }
html[data-ui="2"] .alarm-state.disarmed { background: none; color: var(--m-text); }
html[data-ui="2"] .alarm-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
html[data-ui="2"] .alarm-mode-btn { height: 48px; padding: 0 20px; border: 0; border-radius: 999px; font-size: 15px; font-weight: 600; transition: transform .1s, background .2s, color .2s; }
html[data-ui="2"][data-theme="light"] .alarm-mode-btn:not(.disarm) { background: #E6E6EC; }
html[data-ui="2"] .alarm-mode-btn:active { transform: scale(.96); }
html[data-ui="2"] .security-row { min-height: 66px; padding: 12px 18px; border-radius: 18px; }

/* Energía: la cifra es la noticia. */
html[data-ui="2"] .metric-card { padding: 18px 20px; }
html[data-ui="2"] .metric-label { font-size: 13px; margin-bottom: 8px; }
html[data-ui="2"] .metric-value { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
html[data-ui="2"] .energy-period-tabs { border: 0; border-radius: 999px; padding: 5px; box-shadow: var(--u2-s1); }
html[data-ui="2"][data-theme="light"] .energy-period-tabs { background: #fff; }
html[data-ui="2"] .energy-tab { border-radius: 999px; font-size: 14px; }
html[data-ui="2"][data-theme="light"] .energy-tab.active { background: #E6E6EC; }
@media (prefers-reduced-motion: reduce) { html[data-ui="2"] .alarm-mode-btn { transition: none; } }

/* ══ 11-nov-2026 · Cascarón de Team (casco.css): lo propio del panel ══
   Escritorio: el usuario va al pie del lateral y su menú se abre junto a él; el botón de arriba se esconde.
   Móvil: el lateral va oculto y manda la barra inferior, así que todo sigue como estaba (usuario arriba). */
@media (min-width:901px){
  .topbar .user-badge{display:none}
  .user-dropdown.desde-lateral{position:fixed;top:auto;right:auto;left:16px;bottom:96px;z-index:60}
  body.plegada .user-dropdown.desde-lateral{left:84px;bottom:60px}
  .sb .sidebar-label{margin-top:2px}
}
@media (max-width:900px){.sb-escritorio{display:none}}
.sb .nav-item .badge-pro,.sb .nav-item .badge-ok{flex:0 0 auto;margin-left:auto}
body.plegada .sb .nav-item .badge-pro,body.plegada .sb .nav-item .badge-ok{display:none}
/* plegado: la tarjeta de acceso remoto queda en su punto de estado */
body.plegada .sb-pie .remote-status:not(.sb-user){justify-content:center;padding:10px 0}
body.plegada .sb-pie .remote-status:not(.sb-user)>div{display:none}
