/* ══════════════════════════════════════════════════════════════════════════
   oss.css — OSS dedicated page styles
   Referenced by index.html and preview.html
   ══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════════
   OSS dedicated page — Figma-faithful design
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page wrapper + card ────────────────────────────────────────────────── */
.oss-page-wrap {
  display: flex;
  justify-content: center;
}
.oss-card {
  width: 100%;
  max-width: 520px;
  background: #1c2231;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.oss-card--wide {
  max-width: none;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.oss-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.oss-hdr-l { display: flex; align-items: center; gap: 12px; }
.oss-hdr-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #2a3a2a;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.oss-hdr-title {
  font-size: 15px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.oss-hdr-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.oss-floor-running-badge {
  font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: #1a3a2a; color: #4ECDA4; border: 1px solid #4ECDA430;
}
.oss-hdr-r { display: flex; align-items: center; gap: 8px; }
.oss-active-lbl {
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  background: #2a3a2a; color: #4ECDA4;
}

/* ── Toggle (shared) ────────────────────────────────────────────────────── */
.oss-toggle {
  position: relative; width: 40px; height: 24px;
  border-radius: 12px; border: none; cursor: pointer;
  background: #374151; transition: background 0.2s;
}
.oss-toggle.on { background: #4ECDA4; }
.oss-toggle-knob {
  position: absolute; top: 2px;
  width: 20px; height: 20px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: left 0.2s;
  left: 2px;
}
.oss-toggle.on .oss-toggle-knob { left: calc(100% - 22px); }

/* ── Tab bar ────────────────────────────────────────────────────────────── */
.oss-tabbar {
  display: flex; gap: 4px; padding: 4px;
  background: #141a27; border-radius: 12px;
}
.oss-tab {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 0; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  color: #6b7280; background: transparent; border: none; cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.oss-tab:hover { color: var(--text); }
.oss-tab.active { background: #252d3d; color: #e2e8f0; }

/* ── 시간 스케줄 tab ────────────────────────────────────────────────────── */
.oss-time-tab { display: flex; flex-direction: column; gap: 16px; }
.oss-sched-list { display: flex; flex-direction: column; gap: 10px; }
.oss-sched-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.oss-sched-lbl { display: flex; align-items: center; gap: 6px; width: 72px; flex-shrink: 0; justify-content: flex-end; }
.oss-sched-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.oss-sched-time {
  font-size: 22px; font-weight: 700; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.oss-arrow { font-size: 18px; margin: 0 6px; }
.oss-ch-toggle-wrap { display: flex; gap: 6px; margin-left: 4px; }
.oss-ch-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: #1c2231; color: #4b5563;
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer; transition: all 0.15s;
}
.oss-ch-badge.on { background: #3a2e0a; color: #C9A84C; border-color: #C9A84C60; }
.oss-release-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  background: #7c2020; color: #f87171; border: none; cursor: pointer;
  transition: opacity 0.15s;
}
.oss-release-btn:hover { opacity: 0.85; }
.oss-gantt { display: flex; flex-direction: column; gap: 8px; }
.oss-gantt-row { display: flex; align-items: center; gap: 12px; }
.oss-gantt-lbl { width: 52px; text-align: right; font-size: 12px; color: #9ca3af; flex-shrink: 0; }
.oss-gantt-bar { flex: 1; }
.oss-gantt-times {
  display: flex; justify-content: space-between; margin-left: 64px; margin-top: 4px;
}
.oss-gantt-times span { font-size: 10px; color: #6b7280; }
.oss-info-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.oss-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: #252d3d; border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
}
.oss-chip-lbl { color: #6b7280; }
.oss-chip-val { font-weight: 600; color: #d1d5db; }
.oss-run-sched-btn {
  width: 100%; padding: 10px;
  border-radius: 12px; font-size: 14px; font-weight: 700;
  background: #14532d; color: #86efac; border: 1px solid #166534;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.15s;
}
.oss-run-sched-btn:hover { opacity: 0.85; }

/* ── SP input (inline compact) ──────────────────────────────────────────── */
.oss-sp-inline {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 8px;
  background: #252d3d; border: 1px solid rgba(78,205,164,0.25);
}
.oss-sp-in2 {
  width: 46px; background: transparent; border: none;
  font-size: 13px; font-weight: 700; text-align: center; outline: none;
  -moz-appearance: textfield;
}
.oss-sp-in2::-webkit-outer-spin-button,
.oss-sp-in2::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── DeviceBlock ────────────────────────────────────────────────────────── */
.oss-dblock {
  background: #141a27;
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  transition: background 0.2s, border-color 0.2s;
}
.oss-dblock.db-on { }
.oss-dblock-head { display: flex; align-items: center; justify-content: space-between; }
.oss-dblock-info { display: flex; align-items: center; gap: 12px; }
.oss-dblock-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.oss-dblock-name { font-size: 14px; font-weight: 700; }
.oss-dblock-status { font-size: 12px; margin-top: 2px; }
.oss-dblock-acts { display: flex; gap: 6px; }
.oss-dblock-body { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.oss-dblock-sp-row { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.oss-mini-btn {
  padding: 4px 10px; border-radius: 8px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  border: 1px solid; transition: opacity 0.15s;
}
.oss-mini-btn:hover:not(:disabled) { opacity: 0.85; }
.oss-ch-pair { display: flex; gap: 8px; }
.oss-ch-unit {
  flex: 1; padding: 12px;
  background: #1c2231; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; display: flex; flex-direction: column; gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.oss-ch-unit.ch-on { }
.oss-ch-unit-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.oss-ch-unit-btns { display: flex; gap: 4px; }
.oss-ch-on, .oss-ch-off {
  flex: 1; padding: 6px 0; border-radius: 8px;
  font-size: 11px; font-weight: 700; cursor: pointer; transition: opacity 0.15s; border: 1px solid;
}
.oss-ch-on  { background: #14532d; color: #86efac; border-color: #166534; }
.oss-ch-off { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }
.oss-ch-on:hover, .oss-ch-off:hover { opacity: 0.85; }

/* ── Floor Selector ─────────────────────────────────────────────────────── */
.oss-floor-sel {
  background: #141a27; border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.oss-fsel-head { display: flex; align-items: center; gap: 8px; }
.oss-fsel-title { font-size: 14px; font-weight: 700; color: #fff; }
.oss-sel-cnt {
  font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: #253545; color: #6AADDB;
}
.oss-filter-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: #1c2231; border-radius: 10px;
}
.oss-ftab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 4px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; background: transparent;
  transition: all 0.15s;
}
.oss-quick-btns { display: flex; gap: 6px; }
.oss-quick-btn {
  flex: 1; padding: 8px 4px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
  background: #252d3d; color: #9ca3af; border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer; transition: all 0.15s;
}
.oss-quick-btn.active { background: #1b3040; color: #6AADDB; border-color: #6AADDB50; }
.oss-quick-btn:hover { opacity: 0.85; }
/* Legacy toggle row (kept for backwards compat) */
.oss-vacant-toggle-row {
  display: flex; align-items: center; justify-content: space-between; padding: 0 4px;
}
.oss-mini-toggle {
  position: relative; width: 32px; height: 20px;
  border-radius: 10px; background: #374151; border: none; cursor: pointer; transition: background 0.2s;
}
.oss-mini-toggle.on { background: #4ECDA4; }
.oss-mtog-knob {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: left 0.2s;
}
.oss-mini-toggle.on .oss-mtog-knob { left: calc(100% - 18px); }

/* ── AHU grid ───────────────────────────────────────────────────────────── */
.oss-ahu-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.oss-zcell {
  position: relative;
  min-height: 40px; border-radius: 8px;
  padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid; transition: all 0.15s;
}
.oss-zcell:hover { opacity: 0.85; }

/* ── FCU grid (10-column, individual L/R cells) ─────────────────────────── */
.oss-fcu-grid-10 {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}
.oss-fcu-cell {
  position: relative;
  min-height: 44px;
  border-radius: 8px;
  padding: 4px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; border: 1px solid; transition: all 0.15s;
}
.oss-fcu-cell:hover { opacity: 0.85; }

/* Legacy LR cell styles (kept for backwards compat) */
.oss-lr-cell { display: flex; flex-direction: column; gap: 3px; }
.oss-lr-lbl { font-size: 9px; font-weight: 700; text-align: center; line-height: 1; }
.oss-lr-wrap {
  display: flex; border-radius: 8px; overflow: hidden;
  border: 1px solid; min-height: 32px;
}
.oss-lr-btn {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 4px 0;
  border: none; cursor: pointer; transition: all 0.15s;
}
.oss-lr-btn:hover { opacity: 0.85; }

/* ── Control rows (inline in floor selector) ────────────────────────────── */
.oss-ctrl-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.06);
}
.oss-ctrl-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.oss-ctrl-lbl { font-size: 11px; font-weight: 700; width: 34px; flex-shrink: 0; }
.oss-fire-btn {
  flex: 1; padding: 6px 8px; border-radius: 8px;
  font-size: 11px; font-weight: 700; cursor: pointer; border: 1px solid;
  min-width: 60px; transition: opacity 0.15s;
}
.oss-fire-btn:hover { opacity: 0.85; }

/* ── Legend row ─────────────────────────────────────────────────────────── */
.oss-legend-row { display: flex; align-items: center; justify-content: space-between; }

/* ── 즉시실행 tab ────────────────────────────────────────────────────────── */
.oss-run-tab { display: flex; flex-direction: column; gap: 16px; }
.oss-sel-hint { font-size: 12px; color: #6b7280; padding: 0 4px; }

/* ── 장치 설정 tab ───────────────────────────────────────────────────────── */
.oss-settings-tab { display: flex; flex-direction: column; gap: 16px; }
.oss-empty-hint {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 32px 0; color: #4b5563;
}
.oss-apply-btn {
  width: 100%; padding: 12px;
  border-radius: 12px; font-size: 14px; font-weight: 700;
  background: #14532d; color: #86efac; border: 1px solid #166534;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
}
.oss-apply-btn.applied { background: #1a3a2a; color: #4ECDA4; border-color: #4ECDA440; }
.oss-apply-btn:hover { opacity: 0.85; }

/* ── Confirm dialog ─────────────────────────────────────────────────────── */
.oss-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.oss-dialog {
  width: 100%; max-width: 300px;
  background: #1c2231; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.oss-dlg-msg { font-size: 14px; font-weight: 700; color: #fff; }
.oss-dlg-detail { font-size: 12px; color: #6b7280; margin-top: -8px; }
.oss-dlg-btns { display: flex; gap: 8px; }
.oss-dlg-cancel {
  flex: 1; padding: 10px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  background: #252d3d; color: #9ca3af;
  border: 1px solid rgba(255,255,255,0.07); cursor: pointer;
  transition: opacity 0.15s;
}
.oss-dlg-cancel:hover { opacity: 0.85; }
.oss-dlg-confirm {
  flex: 1; padding: 10px; border-radius: 12px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  border: 1px solid; transition: opacity 0.15s;
}
.oss-dlg-confirm:hover { opacity: 0.85; }

/* ── 층 현황 — building cross-section view ─────────────────────── */
.oss-status-tab { display: flex; flex-direction: column; gap: 10px; }

/* View selector */
.oss-vs-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.oss-vs-group {
  display: flex; gap: 3px;
  background: #141b27; border-radius: 10px; padding: 3px;
}
.oss-vs-btn {
  padding: 7px 16px; border-radius: 8px;
  font-size: 12px; font-weight: 600; border: none; cursor: pointer;
  background: transparent; color: #6b7280; transition: all 0.15s;
}
.oss-vs-btn.active { background: #252d3d; color: #e2e8f0; }
.oss-vs-btn:hover { opacity: 0.85; }
.oss-vs-layout {
  padding: 7px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 600; border: 1px solid #374151; cursor: pointer;
  background: transparent; color: #6b7280; transition: all 0.15s; white-space: nowrap;
}
.oss-vs-layout.active { background: #252d3d; color: #e2e8f0; border-color: #4b5563; }
.oss-vs-layout:hover { opacity: 0.85; }

/* Building — 1-column layout */
.oss-building-1col { display: flex; flex-direction: column; gap: 7px; }

/* Building — 2-column layout */
.oss-building-2col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start;
}
.oss-building-col { display: flex; flex-direction: column; gap: 7px; }

/* Floor row */
.oss-bfloor {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid rgba(255,255,255,0.07); border-radius: 10px;
  padding: 7px 10px;
}
.oss-bvacant { opacity: 0.45; }
.oss-bfloor-lbl {
  font-size: 13px; font-weight: 700; color: #9ca3af;
  min-width: 36px; text-align: right; flex-shrink: 0; padding-top: 8px;
}
.oss-bfloor-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }

/* AHU bar */
.oss-bahu-bar {
  display: flex; align-items: flex-end; justify-content: space-between;
  background: #252d3d; border-radius: 8px; padding: 7px 14px;
  border: 1px solid transparent;
}
.oss-bahu-on {
  background: rgba(78,205,164,0.10);
  border-color: rgba(78,205,164,0.28);
}
.oss-bahu-val {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 15px; font-weight: 700; line-height: 1;
}
.oss-bval-lbl { font-size: 9px; font-weight: 400; color: #6b7280; margin-top: 2px; }
.oss-bahu-supply { color: #6AADDB; }
.oss-bahu-sp     { color: #e2e8f0; }
.oss-bahu-return { color: #f97316; }

/* FCU row */
.oss-bfcu-row { display: flex; gap: 5px; }
.oss-bfcu-empty { flex: 1; }
.oss-bfcu-zone { flex: 1; }
.oss-bfcu-pill {
  display: flex; align-items: center; width: 100%;
  background: #252d3d; border-radius: 20px; padding: 5px 10px;
  border: 1px solid #374151;
}
.oss-bfcu-on {
  background: rgba(78,205,164,0.12);
  border-color: rgba(78,205,164,0.30);
}
.oss-bfcu-temp {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 12px; font-weight: 500; color: #d1d5db; line-height: 1;
}
.oss-bfcu-sp-val {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 12px; font-weight: 700; color: #e2e8f0; line-height: 1;
}
.oss-bfcu-div {
  width: 1px; height: 20px; background: #4b5563; margin: 0 4px; flex-shrink: 0;
}
.oss-bvacant-bar {
  padding: 8px 14px; font-size: 11px; color: #c2410c;
  background: #1a120a; border-radius: 8px; text-align: center;
  border: 1px solid #c2410c30;
}

/* ── Column headers ──────────────────────────────────────────────────── */
.oss-col-header {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0 11px; margin-bottom: 6px;
}
.oss-col-hlbl { min-width: 36px; flex-shrink: 0; }
.oss-hsection {
  font-size: 11px; font-weight: 700; color: #6b7280; text-align: center;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}
.oss-hahu-bar {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
}
.oss-hcol {
  font-size: 12px; font-weight: 600; color: #9ca3af;
  text-align: center; min-width: 36px;
}
.oss-hcol-sp { cursor: pointer; transition: color 0.12s; }
.oss-hcol-sp:hover { color: #e2e8f0; }
.oss-hfcu-row { flex: 1; display: flex; gap: 5px; }
.oss-hfcu-zone {
  flex: 1; display: flex; align-items: center; padding: 0 10px;
  justify-content: space-between;
}
.oss-hfcu-zone .oss-hcol { flex: 1; }
.oss-hfcu-sep { width: 1px; height: 14px; background: #374151; flex-shrink: 0; margin: 0 2px; }

/* ── Simplified 전체-tab setpoint header ─────────────────────────────── */
.oss-col-header-all { margin-bottom: 8px; }
.oss-hsp-bar { width: 100%; }
.oss-hsp-title {
  font-size: 11px; font-weight: 700; color: #6b7280; text-align: center;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.oss-hsp-row { display: flex; gap: 5px; }
.oss-hsp-zone {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 30px;
}
.oss-hsp-lbl {
  font-size: 13px; font-weight: 700; color: #6b7280;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; padding: 5px 14px; border-radius: 8px;
  transition: background 0.12s, color 0.12s; border: 1px solid transparent;
}
.oss-hsp-lbl:hover { color: #e2e8f0; background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
.oss-hsp-edit-lbl { font-size: 11px; font-weight: 700; color: #9ca3af; letter-spacing: 0.04em; white-space: nowrap; flex-shrink: 0; }

/* ── Setpoint batch edit ─────────────────────────────────────────────── */
.oss-sp-edit {
  display: flex; align-items: center; gap: 7px; flex: 1; justify-content: center;
  flex-wrap: nowrap;
}
.oss-sp-input {
  width: 68px; background: #252d3d; border: 1px solid #4b5563; border-radius: 6px;
  padding: 4px 8px; color: #e2e8f0; font-size: 15px; font-weight: 700;
  text-align: center; outline: none; -moz-appearance: textfield; flex-shrink: 0;
}
.oss-sp-input::-webkit-outer-spin-button,
.oss-sp-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.oss-sp-input:focus { border-color: #4ecda4; }
.oss-sp-apply {
  padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: rgba(78,205,164,0.14); border: 1px solid rgba(78,205,164,0.38);
  color: #4ecda4; cursor: pointer; white-space: nowrap; transition: background 0.14s;
}
.oss-sp-apply:hover { background: rgba(78,205,164,0.26); }
.oss-sp-cancel {
  background: none; border: none; color: #6b7280; cursor: pointer;
  font-size: 12px; padding: 2px 4px; border-radius: 4px; line-height: 1;
}
.oss-sp-cancel:hover { color: #e2e8f0; }
.oss-sp-ok  { font-size: 10px; color: #4ecda4; white-space: nowrap; }
.oss-sp-err { font-size: 10px; color: #f97316; white-space: nowrap; }

/* ── Clickable temp values ──────────────────────────────────────────── */
.oss-temp-btn {
  cursor: pointer; border-radius: 5px;
  padding: 2px 5px; margin: -2px -5px;
  transition: background 0.12s;
}
.oss-temp-btn:hover  { background: rgba(255,255,255,0.08); }
.oss-temp-active     { background: rgba(255,255,255,0.13) !important; outline: 1px solid currentColor; outline-offset: 2px; }

/* ── Status tab main layout ─────────────────────────────────────────── */
.oss-status-main  { display: flex; gap: 14px; align-items: flex-start; }
.oss-building-wrap { flex: 1; min-width: 0; }

/* ── Graph panel ────────────────────────────────────────────────────── */
.oss-graph-panel {
  width: 360px; flex-shrink: 0;
  background: #141b27; border-radius: 14px; padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  position: sticky; top: 20px;
}
.oss-graph-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.oss-graph-title { font-size: 13px; font-weight: 700; }
.oss-graph-close {
  background: none; border: none; color: #6b7280; cursor: pointer;
  font-size: 14px; padding: 2px 8px; border-radius: 5px; line-height: 1; flex-shrink: 0;
}
.oss-graph-close:hover { color: #e2e8f0; background: #252d3d; }
.oss-gr-tabbar { display: flex; gap: 4px; margin-bottom: 12px; }
.oss-gr-tab {
  flex: 1; padding: 6px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  border: 1px solid #2d3748; cursor: pointer;
  background: transparent; color: #6b7280; transition: all 0.14s;
}
.oss-gr-tab.active { background: #252d3d; color: #e2e8f0; border-color: #4b5563; }
.oss-gr-tab:hover  { opacity: 0.85; }
.oss-graph-body {
  min-height: 140px; display: flex; align-items: center; justify-content: center;
}
.oss-graph-msg { color: #4b5563; font-size: 12px; }

/* ── Average stats ──────────────────────────────────────────────────── */
.oss-graph-stats {
  display: flex; align-items: stretch;
  background: #1a2236; border-radius: 10px; margin-top: 12px;
  border: 1px solid rgba(255,255,255,0.06); overflow: hidden;
}
.oss-gstat {
  flex: 1; padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.oss-gstat-sep { width: 1px; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.oss-gstat-val { font-size: 17px; font-weight: 700; color: #e2e8f0; }
.oss-gstat-lbl { font-size: 10px; color: #6b7280; text-align: center; }

/* ── Calendar picker ────────────────────────────────────────────────── */
.oss-graph-cal      { margin-top: 12px; }
.oss-graph-cal-lbl  { font-size: 10px; color: #6b7280; font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Month navigation */
.oss-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.oss-cal-title { font-size: 11px; font-weight: 600; color: #cbd5e1; }
.oss-cal-nav-btn {
  background: none; border: none; color: #6b7280; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; transition: color 0.12s;
}
.oss-cal-nav-btn:hover:not(:disabled) { color: #e2e8f0; }
.oss-cal-nav-btn:disabled { opacity: 0.25; cursor: default; }

/* Day-of-week header */
.oss-cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 3px; }
.oss-cal-dow-lbl { text-align: center; font-size: 9px; color: #4b5563; font-weight: 600; padding: 2px 0; }

/* Day grid */
.oss-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  user-select: none; -webkit-user-select: none;
}
.oss-cal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3px 0; border-radius: 5px; cursor: pointer; min-height: 28px;
  transition: background 0.1s;
}
.oss-cal-empty { cursor: default; }
.oss-cal-dn { font-size: 10px; color: #9ca3af; line-height: 1.2; }
.oss-cal-avg { font-size: 8px; color: #4ecda4; line-height: 1.2; font-weight: 600; }

/* States */
.oss-cal-day:not(.oss-cal-empty):not(.oss-cal-future):hover { background: rgba(255,255,255,0.06); }
.oss-cal-today .oss-cal-dn { color: #60a5fa; font-weight: 700; }
.oss-cal-future { cursor: default; opacity: 0.3; }
.oss-cal-sel { background: rgba(78,205,164,0.18); }
.oss-cal-sel .oss-cal-dn { color: #4ecda4; font-weight: 600; }
.oss-cal-dragging { background: rgba(78,205,164,0.10); }
.oss-cal-dragging .oss-cal-dn { color: #a7f3d0; }

/* Summary row */
.oss-cal-summary {
  margin-top: 8px; padding: 7px 10px; background: #1a2236; border-radius: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; color: #9ca3af;
}
.oss-cal-summary strong { color: #e2e8f0; }
.oss-cal-clear {
  background: none; border: 1px solid #374151; color: #6b7280; border-radius: 5px;
  font-size: 10px; padding: 2px 8px; cursor: pointer; transition: color 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.oss-cal-clear:hover { color: #e2e8f0; border-color: #6b7280; }

/* ── Per-floor setpoint inline edit ─────────────────────────────────── */
.oss-sp-fl-editable { cursor: text; }
.oss-sp-fl-editable:hover { color: #e2e8f0 !important; text-decoration: underline dotted; }
.oss-sp-fl-wrap {
  display: flex; flex-direction: row !important; align-items: center; gap: 3px;
  flex: 1; justify-content: center;
}
.oss-sp-fl-input {
  width: 56px; background: #0f172a; border: 1px solid #4b5563; border-radius: 5px;
  color: #e2e8f0; font-size: 15px; font-weight: 700; text-align: center;
  padding: 2px 5px; outline: none; -moz-appearance: textfield; flex-shrink: 0;
}
.oss-sp-fl-input::-webkit-outer-spin-button,
.oss-sp-fl-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.oss-sp-fl-input:focus { border-color: #4ecda4; }
.oss-sp-fl-btn {
  background: none; border: none; cursor: pointer; font-size: 12px;
  padding: 2px 4px; border-radius: 4px; line-height: 1; flex-shrink: 0;
}
.oss-sp-fl-ok-btn  { color: #4ecda4; }
.oss-sp-fl-ok-btn:hover  { background: rgba(78,205,164,0.15); }
.oss-sp-fl-x-btn   { color: #6b7280; }
.oss-sp-fl-x-btn:hover   { color: #e2e8f0; }
.oss-sp-fl-ok  { color: #4ecda4; font-weight: 700; font-size: 14px; }
.oss-sp-fl-err { color: #f97316; font-size: 10px; }
