/* public/styles/therm-mep-studio.css — Studio ThermMEP Fluent Win11 (Strict CSP) */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
}

.tm-topbar {
  height: 54px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.tm-brand { display: flex; align-items: center; gap: 10px; }
.tm-brand-icon { font-size: 22px; }
.tm-brand-title { font-weight: 700; font-size: 14px; color: #0f172a; }
.tm-brand-sub { font-size: 11px; color: #64748b; }
.tm-proj-select { max-width: 210px; padding: 4px 8px; font-size: 11.5px; font-weight: 600; }
.tm-side-hdr { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 10px; }
.tm-btn-xs {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.tm-btn-xs:hover { background: #dbeafe; }

.tm-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
}

.tm-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.tm-tab.is-active {
  background: #ffffff;
  color: #0369a1;
  border-color: #cbd5e1;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.tm-actions { display: flex; align-items: center; gap: 6px; }
.tm-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tm-btn:hover { background: #f8fafc; border-color: #94a3b8; }
.tm-btn-primary { background: #0284c7; color: #ffffff; border-color: #0284c7; font-weight: 600; }
.tm-btn-primary:hover { background: #0369a1; }

.tm-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 12px 16px;
}

.tm-kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
}
.tm-kpi-lbl { font-size: 11px; color: #64748b; }
.tm-kpi-val { font-size: 18px; font-weight: 700; color: #0369a1; margin-top: 2px; font-family: Consolas, "Segoe UI", monospace; }
.tm-kpi-sub { font-size: 11px; color: #475569; margin-top: 2px; }

.tm-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 12px;
  padding: 0 16px 24px 16px;
  align-items: start;
}

.tm-sidebar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  position: sticky;
  top: 66px;
}
.tm-side-hdr { font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 10px; }
.tm-tree { display: flex; flex-direction: column; gap: 8px; }
.tm-tree-zone { font-size: 11px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.tm-tree-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  margin-bottom: 4px;
}
.tm-tree-item.is-active { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; font-weight: 600; }
.tm-badge {
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: Consolas, monospace;
  font-weight: 700;
}

.tm-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tm-status { font-size: 12px; color: #0f766e; min-height: 18px; }
.tm-pane.is-hidden { display: none; }
.tm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }

.tm-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}
.tm-card-title { margin: 0 0 10px 0; font-size: 13.5px; font-weight: 700; color: #0f172a; }
.tm-sub-title { margin: 14px 0 8px 0; font-size: 12.5px; font-weight: 700; color: #334155; }

.tm-table-wrap { overflow-x: auto; }
.tm-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tm-table th {
  text-align: left;
  background: #f8fafc;
  color: #334155;
  padding: 8px;
  border-bottom: 1px solid #cbd5e1;
  font-size: 11px;
}
.tm-table td { padding: 7px 8px; border-bottom: 1px solid #f1f5f9; }
.tm-table tr:hover td { background: #f8fafc; }
.tm-num { font-family: Consolas, "Segoe UI", monospace; font-weight: 600; }
.tm-input-sm {
  width: 68px;
  padding: 3px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 12px;
}

.tm-svg-wrap { width: 100%; min-height: 170px; display: flex; align-items: center; justify-content: center; }
.tm-wall-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; font-weight: 600; }
.tm-select { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: 12px; flex: 1; background: #ffffff; }
.tm-wall-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.tm-wall-layers { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; }
.tm-layer-row {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 8px;
}

.tm-catalog-list { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }
.tm-climate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tm-climate-override { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.tm-space-editor { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }

@media (max-width: 1100px) {
  .tm-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .tm-layout { grid-template-columns: 1fr; }
  .tm-grid-2 { grid-template-columns: 1fr; }
}
