/* Scoped thermostat card; uses the existing dashboard light/dark tokens. */
.th-card { box-sizing:border-box; min-width:0; padding:16px; color:var(--ink,#12302c); background:var(--card,#fff); border:1px solid var(--line,#e4edeb); border-radius:12px; font:inherit; display:flex; flex-direction:column; gap:12px; }
.th-card *, .th-card *::before, .th-card *::after { box-sizing:border-box; }
.th-card [hidden] { display:none !important; }
.th-card .th-header,.th-card .th-enabled-row,.th-card .th-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.th-card .th-name { margin:0; font-size:1.05rem; font-weight:650; overflow-wrap:anywhere; flex:1 1 160px; }
.th-card .th-channel { color:var(--teal-d,#005d59); background:var(--teal-50,#eef7f6); border-radius:6px; padding:4px 8px; font-size:.8rem; overflow-wrap:anywhere; }
.th-card .th-reading { padding:12px; border-radius:9px; background:var(--tile,#f4f8f7); display:flex; flex-direction:column; gap:4px; }
.th-card .th-temperature { font-size:2rem; font-weight:600; font-variant-numeric:tabular-nums; }
.th-card .th-subtle,.th-card .th-label { color:var(--ink-2,#537571); font-size:.875rem; line-height:1.45; overflow-wrap:anywhere; }
.th-card .th-field { display:flex; flex-direction:column; gap:6px; margin:0; min-width:0; }
.th-card .th-target-form,.th-card .th-settings-form { display:flex; flex-direction:column; gap:9px; }
.th-card .th-stepper { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:8px; }
.th-card input,.th-card select { min-width:0; width:100%; min-height:44px; border:1px solid var(--line-2,#d6e2df); border-radius:7px; padding:8px 10px; color:var(--ink,#12302c); background:var(--card,#fff); font:inherit; }
.th-card .th-stepper input { text-align:center; font-size:1.25rem; font-variant-numeric:tabular-nums; }
.th-card .th-button { border:1px solid var(--line-2,#d6e2df); border-radius:7px; padding:9px 12px; min-height:44px; min-width:44px; color:var(--ink,#12302c); background:var(--tile,#f4f8f7); font:inherit; font-size:.9rem; line-height:1.3; cursor:pointer; overflow-wrap:anywhere; }
.th-card .th-primary { background:var(--teal-d,#005d59); border-color:var(--teal-d,#005d59); color:var(--card,#fff); }
.th-card button:disabled,.th-card input:disabled,.th-card select:disabled { cursor:default; opacity:.6; }
.th-card :focus-visible { outline:3px solid var(--teal,#007d79); outline-offset:3px; }
.th-card input[aria-invalid=true] { border-color:var(--red,#c13646); }
.th-card p { margin:0; line-height:1.45; overflow-wrap:anywhere; }
.th-card .th-notice:empty,.th-card .th-subtle:empty { display:none; }
.th-card .th-notice,.th-card .th-conflict { border-radius:7px; background:var(--amber-50,#f8f0dc); padding:9px; color:var(--ink,#12302c); }
.th-card .th-conflict { display:flex; flex-direction:column; gap:6px; }
.th-card .th-error { color:var(--red-d,#9a2a38); }
.th-card .th-output { font-size:.9rem; }
.th-card .th-settings { border-top:1px solid var(--line,#e4edeb); padding-top:4px; }
.th-card summary { min-height:44px; padding:12px 0; cursor:pointer; color:var(--teal-d,#005d59); }
@media (max-width:380px) { .th-card { padding:12px; } .th-card .th-actions { align-items:stretch; } .th-card .th-actions button { flex:1 1 110px; } }
