.tv-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.tv-heading h2{margin:0 0 7px}
.tv-heading p{margin:0}
.tv-grid{margin-bottom:28px}
.tv-card{display:block;color:inherit;text-decoration:none;border-top:5px solid #98a7b6;transition:box-shadow .15s}
.tv-card:hover{box-shadow:0 5px 20px #19233018}
.tv-active{border-color:#c96816;background:linear-gradient(145deg,#fff,#fff5e9)}
.tv-off{border-color:#7399ae}
.tv-unknown{border-color:#bd8a35;background:#fffcf5}
.tv-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.tv-symbol{font-size:34px;color:#12668c}
.tv-badge{padding:7px 10px;border-radius:999px;background:#eaf0f4;font-size:12px;font-weight:700}
.tv-active .tv-badge{background:#ffdfb4;color:#7c3900}
.tv-unknown .tv-badge{background:#fff0cc;color:#704600}
.tv-home{font-size:12px;color:#68737c;margin-top:12px;text-transform:uppercase;letter-spacing:.08em}
.tv-title{font-size:21px;font-weight:800;margin:5px 0}
.tv-temperature{font-size:48px;font-weight:800;line-height:1.2;margin:16px 0 5px;color:#12668c}
.tv-temperature small{font-size:22px}
.tv-caption{font-size:13px;color:#596775}
.tv-state{display:flex;align-items:center;gap:8px;font-weight:750;margin-top:20px}
.tv-dot{width:10px;height:10px;border-radius:50%;background:#7399ae;flex-shrink:0}
.tv-active .tv-dot{background:#c96816}
.tv-unknown .tv-dot{background:#bd8a35}
.tv-footer{font-size:12px;color:#596775;margin-top:18px}
.tv-warning{font-size:12px;color:#795000}
.tv-zone-pills{display:flex;gap:8px;flex-wrap:wrap;margin-top:22px}
.tv-zone{background:#edf2f6;padding:9px;border-radius:9px;font-size:13px}
.tv-zone.is-on{background:#ffdfb4;color:#7c3900}
.tv-detail{border-top-width:5px;margin-bottom:18px}
.tv-temperature-large{text-align:center;font-size:76px;margin-top:25px}
.tv-temperature-large small{font-size:30px}
.tv-centered{text-align:center}
.tv-setpoint{text-align:center;font-size:21px;font-weight:700;padding:14px;background:#ffffffa0;border-radius:12px;margin:18px 0}
.tv-zone-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}
.tv-zone-detail{padding:18px;background:#ffffffb0;border:1px solid #dde5eb;border-radius:12px}
.tv-zone-status{font-size:19px;margin-top:12px}
.tv-update-warning{font-size:13px;color:#795000;margin:8px 0}
@media(max-width:600px){.tv-zone-grid{grid-template-columns:1fr}.tv-temperature-large{font-size:62px}}

/* Dispositivos: controles integrados y presentación compacta */
.tv-compact{padding:16px}
.tv-compact .tv-symbol{font-size:27px}
.tv-climate-row{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin:16px 0}
.tv-compact .tv-temperature-large{font-size:52px;text-align:left;margin:0;line-height:1.1}
.tv-compact .tv-temperature-large small{font-size:23px}
.tv-climate-controls{display:flex;flex-direction:column;gap:10px}
.tv-compact .tv-setpoint{font-size:18px;text-align:left;margin:0;padding:0;background:none}
.tv-inline-actions{margin:0;gap:7px}
.tv-inline-actions .button{padding:9px 13px}
.tv-compact .tv-zone-grid{margin:14px 0;gap:10px}
.tv-compact .tv-zone-detail{padding:13px}
.tv-zone-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.tv-zone-header .tv-title{font-size:18px;margin:0}
.tv-compact .tv-zone-status{font-size:16px;margin-top:13px}
.tv-bottom-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid #e1e8ee;margin-top:14px;padding-top:12px}
.tv-bottom-bar .tv-footer{margin:0}
.tv-refresh-button{font-size:13px;padding:8px 11px}
@media(max-width:600px){
  .tv-climate-row{gap:16px}
  .tv-compact .tv-temperature-large{font-size:46px}
  .tv-timestamp{display:block;margin-top:3px}
}

/* Consigna de calefacción */
.tv-temperature-form{margin:5px 0}
.tv-temperature-form label{font-size:12px;color:#596775}
.tv-temperature-input{display:flex;align-items:center;gap:8px;margin-top:5px}
.tv-temperature-input select{width:125px;margin:0;padding:9px}
.tv-temperature-input .button{padding:10px 13px}

/* Selector compacto con botones + y − */
.tv-stepper{flex-wrap:wrap;gap:7px}
.tv-stepper > button[type="button"]{min-width:42px;min-height:42px;font-size:23px;padding:6px 12px}
.tv-temperature-value{display:flex;align-items:center;gap:4px}
.tv-temperature-value input{width:83px;margin:0;padding:9px 5px;text-align:center;font-size:20px;font-weight:750}
.tv-temperature-value span{font-size:16px;font-weight:700}
.tv-temperature-hint{margin-top:7px;font-size:12px}

/* Favoritos móviles */
.fav-card{background:#fff;border:1px solid #dbe3ea;border-radius:16px;padding:16px;margin-bottom:16px}
.fav-card header{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.fav-card h2{margin:0;font-size:20px}
.fav-status{font-weight:750;margin:10px 0}
.fav-status.active{color:#12734a}
.fav-status.off{color:#596775}
.fav-status.unknown{color:#a16207}
.fav-actions,.fav-temperature,.fav-links{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.fav-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:12px}
.fav-grid form{display:contents}
.button.big{min-height:58px;font-size:18px;font-weight:750;padding:14px 18px;border-radius:14px;width:100%}
.fav-temperature input{width:92px;text-align:center;font-size:22px;font-weight:750;padding:12px 6px}
.fav-temperature .button.big{width:auto}
.fav-links{margin-top:22px}
@media (max-width:520px){
  .fav-grid{grid-template-columns:1fr}
  .button.big{width:100%}
  .fav-temperature .button.big{width:auto}
}

/* Reordenar favoritos */
.drag-handle{cursor:grab;touch-action:none;font-size:22px;color:#6b7280;line-height:1}
.drag-ghost{opacity:.45}
.drag-chosen{box-shadow:0 8px 24px rgba(18,102,140,.22)}
