/* THALO IFRAMES — SHARED STYLES
   <link rel="stylesheet" href="shared.css" /> before per-file <style>
   Per-file keeps: zoom, html/body layout, phone-screen height,
   app-shell height, app-main bg, page-specific components.
*/

/* ── Variables (superset across all iframes) ── */
:root {
  --navy: #1a1f6e;
  --body-bg: #edf0f8;
  --white: #ffffff;
  --border: #dde2ef;
  --border-mid: #c8cedf;
  --text-h: #111827;
  --text-body: #374151;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --orange: #e8601a;
  --orange-dim: rgba(232, 96, 26, 0.08);
  --orange-border: rgba(232, 96, 26, 0.22);
  --green: #16a34a;
  --green-dim: rgba(22, 163, 74, 0.08);
  --green-border: rgba(22, 163, 74, 0.22);
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.06);
  --red-border: rgba(220, 38, 38, 0.2);
  --yellow: #ca8a04;
  --yellow-dim: rgba(202, 138, 4, 0.09);
  --yellow-border: rgba(202, 138, 4, 0.28);
  --blue: #1d6ef5;
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════
   PHONE SHELL  (electrical-phone · filter-phone · refrigerant-phone)
   ══════════════════════════════════════════════ */

.phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone {
  width: 300px;
  background: #1c1c1e;
  border-radius: 50px;
  padding: 12px;
  box-shadow:
    0 0 0 1px #2a2a2c,
    0 0 0 2px #3a3a3c,
    0 30px 80px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
}
.phone::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 100px;
  width: 3px;
  height: 36px;
  background: #3a3a3c;
  border-radius: 2px 0 0 2px;
  box-shadow:
    0 46px 0 #3a3a3c,
    0 86px 0 #3a3a3c;
}
.phone::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 140px;
  width: 3px;
  height: 60px;
  background: #3a3a3c;
  border-radius: 0 2px 2px 0;
}
.dynamic-island {
  width: 110px;
  height: 32px;
  background: #000;
  border-radius: 20px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.di-camera {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  position: relative;
}
.di-camera::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0a2a4a;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.di-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a1a1a;
}

.phone-screen {
  background: #f2f2f7;
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* height set per-file */
}

.status-bar {
  background: #fff;
  padding: 10px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sb-time {
  font-size: 13px;
  font-weight: 700;
  color: #111;
}
.sb-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.sb-icons svg {
  width: 14px;
  height: 14px;
  fill: #111;
}

.nav-bar {
  background: #fff;
  border-bottom: 0.5px solid #e5e7eb;
  padding: 6px 16px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-back {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
}
.nav-back svg {
  width: 16px;
  height: 16px;
  stroke: var(--blue);
}
.nav-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-right: 32px;
}

.screen-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}
.screen-content::-webkit-scrollbar {
  display: none;
}

.unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.unit-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-h);
  letter-spacing: -0.02em;
}
.unit-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.metric-pill {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.mp-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px;
}
.mp-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.mp-val.green {
  color: var(--green);
}
.mp-val.red {
  color: var(--red);
}
.mp-val.yellow {
  color: var(--yellow);
}
.mp-sub {
  font-size: 9px;
  color: var(--text-light);
  margin-top: 3px;
}

.chart-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.chart-card-header {
  padding: 10px 12px 6px;
  border-bottom: 0.5px solid #e5e7eb;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.cc-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-h);
}
.cc-sub {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 1px;
}
.chart-card-body {
  padding: 8px 12px 10px;
  height: 120px;
  position: relative;
}

.legend-row {
  display: flex;
  gap: 10px;
  padding: 0 12px 6px;
}
.lr-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
}
.lr-line {
  width: 12px;
  height: 2px;
  border-radius: 1px;
}

.home-bar {
  height: 28px;
  background: #f2f2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-indicator {
  width: 100px;
  height: 4px;
  background: #c7c7cc;
  border-radius: 2px;
}

/* ══════════════════════════════════════════════
   LAPTOP SHELL  (compressor-ts · operational-ts · thalo-health)
   ══════════════════════════════════════════════ */

.laptop-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
.laptop-shell {
  background: #2a2a2e;
  border-radius: 14px 14px 0 0;
  padding: 10px 10px 0;
  width: 100%;
  box-shadow:
    0 0 0 1px #1a1a1e,
    0 24px 60px rgba(0, 0, 0, 0.28);
}
.laptop-cam {
  width: 6px;
  height: 6px;
  background: #3a3a3e;
  border-radius: 50%;
  margin: 0 auto 6px;
}
.laptop-screen {
  background: #f9fafb;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
}
.laptop-base {
  background: linear-gradient(to bottom, #c0c0c4, #b0b0b4);
  height: 12px;
  border-radius: 0 0 6px 6px;
  width: 112%;
  margin-left: -6%;
}
.laptop-hinge {
  background: #a0a0a4;
  height: 3px;
  width: 72%;
  border-radius: 0 0 3px 3px;
}

.browser-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.browser-dots {
  display: flex;
  gap: 5px;
}
.bd {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.bd-r {
  background: #ff5f57;
}
.bd-y {
  background: #febc2e;
}
.bd-g {
  background: #28c840;
}
.browser-url {
  flex: 1;
  background: #f3f4f6;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-url span {
  color: #374151;
  font-weight: 500;
}

.app-shell {
  display: flex; /* height set per-file */
}

.app-nav {
  width: 44px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 6px;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 24px;
  height: 24px;
  background: var(--orange);
  border-radius: 6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-mark svg {
  width: 12px;
  height: 12px;
}
.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
}
.nav-icon.active {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}
.nav-icon svg {
  width: 15px;
  height: 15px;
  stroke: #fff;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* background set per-file */
}

.breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-light);
  flex-shrink: 0;
}
.bc-sep {
  color: var(--border-mid);
}
.bc-item {
  color: var(--text-muted);
  font-weight: 500;
}
.bc-item.active {
  color: var(--text-h);
  font-weight: 700;
}

.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Laptop detail (compressor-ts · operational-ts) ── */
.unit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.unit-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-h);
  letter-spacing: -0.02em;
}
.status-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red-border);
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.orange {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--orange-dim);
  color: var(--orange);
  border: 1px solid var(--orange-border);
}

.alert {
  background: #fff5f5;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-left: 3px solid var(--red);
  border-radius: 0 7px 7px 0;
  padding: 8px 11px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-icon svg {
  width: 13px;
  height: 13px;
  stroke: var(--red);
}
.alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}
.alert-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 1px;
}
.alert-title.orange {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 1px;
}
.alert-body {
  font-size: 10px;
  color: #7f1d1d;
  line-height: 1.5;
}
.alert-body-orange {
  font-size: 10px;
  color: #a14919;
  line-height: 1.5;
}
