/* Scoped visual analytics, sharing the management console's light green palette. */
.td-root.analytics-panel { padding: 24px; border: 1px solid #dbe5df; border-radius: 12px; background: #f6f9f7; color: #213e34; font-size: 14px; line-height: 1.6; }
.td-root * { box-sizing: border-box; }
.td-root h3, .td-root h4, .td-root p { margin: 0; }
.td-root a { color: inherit; text-decoration: none; }
.td-root button, .td-root select { font: inherit; }
.td-root a:focus-visible, .td-root button:focus-visible, .td-root select:focus-visible { outline: 3px solid #488e74; outline-offset: 3px; }
.td-root select { max-width: 100%; min-width: 0; min-height: 38px; padding: 7px 10px; background: #fff; border: 1px solid #c8d7ce; border-radius: 6px; color: #244739; }
.td-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.td-section-heading > div { flex: 1; min-width: 120px; }
.td-root .td-snapshot { margin-left: auto; font-size: 12px; }
.td-root > .td-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.td-root .td-method { font-size: 12px; line-height: 1.7; color: #64796e; margin-top: 12px; }
.td-section { margin-top: 28px; }
.td-section > header { margin-bottom: 13px; }
.td-section > header h3 { font-size: 17px; font-weight: 650; }
.td-section > header p, .td-detail-chart header p, .td-detail-table header p { color: #64796e; font-size: 12px; margin-top: 3px; }
.td-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.td-metric-card { display: flex; flex-direction: column; min-width: 0; padding: 18px 18px 14px; border: 1px solid #d3e0d7; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.td-metric-card:hover { border-color: #408467; box-shadow: 0 4px 14px #2148360d; }
.td-card-label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 14px; }
.td-card-label > span { color: #7c9587; }
.td-value { display: block; font-variant-numeric: tabular-nums; font-size: 34px; line-height: 1.2; font-weight: 650; letter-spacing: -.035em; margin-top: 12px; overflow-wrap: anywhere; }
.td-value small { display: inline-block; margin-left: 6px; font-weight: 400; font-size: 12px; letter-spacing: 0; white-space: nowrap; }
.td-value.td-value-missing { font-size: 21px; line-height: 40px; color: #829087; letter-spacing: 0; }
.td-card-note { color: #64796e; font-size: 11px; margin-top: 5px; }
.td-spark { width: 100%; height: 46px; margin: 12px 0 7px; color: #2d8465; }
.td-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.td-point { fill: currentColor; }
.td-delta { font-size: 11px; color: #657b6e; margin-top: auto; }
.td-spark-empty { display: grid; place-items: center; height: 65px; color: #8b9990; font-size: 11px; }
.td-room-section { padding-top: 24px; border-top: 1px solid #dce5de; }
.td-room-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: #65796e; font-size: 11px; margin: 18px 0; }
.td-temperature-scale { width: 90px; height: 7px; border-radius: 4px; background: linear-gradient(90deg,#b9dce9,#d6e6dd,#efdabb,#e6bc9f); }
.td-room-date { margin-left: auto; }
.td-room-group { margin-top: 22px; }
.td-room-group h4 { font-size: 13px; font-weight: 600; color: #526a5d; margin-bottom: 12px; }
.td-room-group h4 small { margin-left: 12px; font-size: 11px; font-weight: 400; color: #7a8a80; }
.td-room-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(165px,1fr)); align-items: stretch; gap: 16px; }
.td-room { --room-fill: #f0f4f1; --room-roof: #e2eae5; --room-line: #c8d6ce; --room-ink: #375b49; display: flex; min-width: 0; flex-direction: column; position: relative; border-radius: 5px; }
.td-room-0 { --room-fill: #f0f7fa; --room-roof: #cce4ed; --room-line: #b1d0dd; --room-ink: #336878; }
.td-room-1 { --room-fill: #f1f7f6; --room-roof: #d2e5e0; --room-line: #b8d3cb; --room-ink: #37645a; }
.td-room-2 { --room-fill: #f5f7f0; --room-roof: #e0e7d2; --room-line: #cbd7b9; --room-ink: #526747; }
.td-room-3 { --room-fill: #fbf7f0; --room-roof: #eee0c7; --room-line: #deceb1; --room-ink: #836538; }
.td-room-4 { --room-fill: #fcf5ef; --room-roof: #ecd2bd; --room-line: #d9bda5; --room-ink: #895c37; }
.td-roof { display: block; height: 33px; width: 100%; overflow: visible; }
.td-roof path { fill: var(--room-roof); stroke: var(--room-line); stroke-width: 1.5; stroke-linejoin: round; }
.td-room-body { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 10px 13px; margin-top: -1px; border: 1px solid var(--room-line); border-top: 0; border-radius: 0 0 6px 6px; background: var(--room-fill); }
.td-room-name { display: block; min-height: 38px; max-width: 100%; font-size: 13px; line-height: 1.5; font-weight: 600; }
.td-room .td-value { color: var(--room-ink); font-size: 29px; margin-top: 6px; }
.td-room .td-value-missing { color: #7b8981; font-size: 20px; }
.td-room-meta { display: block; font-size: 10px; color: #74877a; margin-top: 7px; }
.td-room-link { display: block; padding-top: 11px; font-size: 11px; color: var(--room-ink); margin-top: auto; }
.td-room:hover .td-room-body { outline: 2px solid var(--room-line); outline-offset: -2px; }
.td-detail-nav { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; justify-content: space-between; padding-bottom: 19px; border-bottom: 1px solid #d8e3dc; }
.td-root .td-back { color: #21674c; font-size: 13px; font-weight: 600; }
.td-detail-nav label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #637b6d; font-size: 12px; min-width: 0; }
.td-detail-nav select { max-width: min(360px,100%); }
.td-detail-heading { margin: 24px 0; }
.td-detail-heading p { color: #64796e; font-size: 12px; }
.td-detail-heading h3 { font-size: 26px; letter-spacing: -.03em; font-weight: 650; margin: 5px 0; }
.td-detail-heading > span { color: #64796e; font-size: 12px; }
.td-detail-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: #fff; border: 1px solid #d4e1d8; border-radius: 10px; overflow: hidden; }
.td-detail-metrics > div { min-width: 0; padding: 20px; border-right: 1px solid #e0e9e3; }
.td-detail-metrics > div:last-child { border-right: 0; }
.td-detail-metrics span { color: #607668; font-size: 12px; }
.td-detail-metrics strong { display: block; font-size: 30px; font-weight: 650; line-height: 1.4; margin-top: 9px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.td-detail-metrics small { font-size: 12px; font-weight: 400; margin-left: 5px; }
.td-detail-chart { padding: 22px; background: #fff; border: 1px solid #d4e1d8; border-radius: 10px; margin-top: 22px; }
.td-detail-chart h3, .td-detail-table h3 { font-size: 17px; font-weight: 600; }
.td-chart { display: block; width: 100%; height: auto; max-height: 420px; margin-top: 18px; color: #287859; }
.td-chart text { fill: #6c8074; font: 12px system-ui,sans-serif; }
.td-gridline { stroke: #e8eeea; stroke-width: 1; }
.td-detail-table { margin-top: 25px; }
.td-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #d4e1d8; border-radius: 8px; margin-top: 13px; background: #fff; }
.td-root table { width: 100%; min-width: 420px; border-collapse: collapse; }
.td-root th, .td-root td { padding: 13px 18px; text-align: left; font-size: 13px; border-bottom: 1px solid #e5ebe7; white-space: nowrap; }
.td-root th { color: #63776b; font-weight: 500; background: #edf3ef; }
.td-root tr:last-child td { border-bottom: 0; }
.td-pagination { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; color: #62786b; font-size: 12px; }
.td-pagination > div { display: flex; gap: 8px; }
.td-pagination button, .td-empty button { background: #fff; border: 1px solid #c5d6cb; padding: 7px 12px; color: #285b42; border-radius: 5px; cursor: pointer; }
.td-pagination button:disabled { opacity: .4; cursor: default; }
.td-empty, .td-loading { padding: 45px 20px; text-align: center; color: #60786a; background: #fff; border: 1px dashed #c6d8cc; border-radius: 10px; }
.td-empty h3 { font-size: 18px; margin-bottom: 6px; }
.td-empty p { margin-bottom: 15px; }
@media (max-width:1150px) { .td-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .td-detail-metrics > div { padding: 16px; } }
@media (max-width:680px) {
  .td-root.analytics-panel { padding: 16px; border-radius: 9px; }
  .td-metric-grid { gap: 10px; }
  .td-metric-card { padding: 13px 12px; }
  .td-value { font-size: 28px; }
  .td-value small { font-size: 10px; margin-left: 3px; }
  .td-card-label { font-size: 12px; }
  .td-spark { height: 38px; }
  .td-delta { font-size: 10px; }
  .td-room-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .td-room-name { font-size: 12px; }
  .td-room .td-value { font-size: 26px; }
  .td-room-date { width: 100%; margin-left: 0; }
  .td-detail-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .td-detail-metrics > div { border-bottom: 1px solid #e0e9e3; }
  .td-detail-metrics > div:nth-child(2n) { border-right: 0; }
  .td-detail-metrics > div:nth-last-child(-n+2) { border-bottom: 0; }
  .td-detail-metrics strong { font-size: 26px; }
  .td-detail-heading h3 { font-size: 23px; }
  .td-detail-chart { padding: 15px 10px; }
  .td-chart { min-height: 160px; }
  .td-root th, .td-root td { padding: 10px 12px; }
}
@media (prefers-reduced-motion:reduce) { .td-metric-card { transition: none; } }
@media print { .td-detail-nav, .td-pagination { display: none; } .td-root.analytics-panel { padding: 0; border: 0; } .td-room, .td-metric-card { break-inside: avoid; } }
.data-global-filters .temperature-filter-layout { grid-template-columns: repeat(2, minmax(105px, 1fr)) minmax(150px, 1fr) minmax(240px, 1.2fr); }
.data-global-filters .temperature-time-slots > div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.data-global-filters .temperature-time-slots button { padding: 0 5px; font-variant-numeric: tabular-nums; }
.data-global-filters .temperature-time-slots button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width:1100px) { .data-global-filters .temperature-filter-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width:700px) { .data-global-filters .temperature-filter-layout > .date-presets { grid-column: 1 / -1; } }
