#pdmSheet, #pdmSheet *, #pdmSheet *::before, #pdmSheet *::after { box-sizing: border-box; }
#pdmSheet { overflow-x: hidden; }
/* Demo Home — Reef Maintenance (power health), 2026-11-18. C2 dark/sky style, 52px+ targets. */
.pdm-side { padding: 6px 0 4px; border-top: 1px solid var(--line, rgba(114,217,248,.12)); margin-top: 6px; }
.pdm-side-btn {
  appearance: none; border: 0; background: transparent; color: var(--muted, #99a8b8); width: 100%;
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 0 16px; border-radius: 14px;
  font-family: "Montserrat", sans-serif; font-size: 15px; font-weight: 650; min-height: 56px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; position: relative;
}
.pdm-side-btn:active { background: rgba(114,217,248,.08); }
.pdm-side-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pdm-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; background: transparent; flex: none; }
.pdm-dot.sev-watch { background: #e0b44a; box-shadow: 0 0 8px #e0b44a; }
.pdm-dot.sev-service { background: #ff9f43; box-shadow: 0 0 8px #ff9f43; }
.pdm-dot.sev-critical { background: var(--alert, #ff3d4f); box-shadow: 0 0 10px var(--alert, #ff3d4f); animation: pdmPulse 1.4s ease-in-out infinite; }
.pdm-dot.sev-stale { background: #6b7a8a; }
@keyframes pdmPulse { 50% { opacity: .35; } }

#pdmOverlay > #pdmSheet { width: min(1120px, calc(100% - 36px)); min-height: min(860px, calc(100dvh - 60px)); max-height: calc(100dvh - 24px);
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.pdm-head { display: flex; align-items: center; gap: 12px; }
.pdm-head .titles { flex: 1; min-width: 0; }
.pdm-x, .pdm-back { min-width: 52px; min-height: 52px; }
.pdm-back { appearance: none; border: 1px solid var(--line-strong, rgba(114,217,248,.22)); background: rgba(114,217,248,.06); color: var(--sky, #72d9f8);
  border-radius: 14px; padding: 0 14px; font: 700 13px "Montserrat", sans-serif; cursor: pointer; }
.pdm-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.pdm-kpi { background: linear-gradient(135deg, rgba(16,24,36,.95), rgba(11,16,24,.82)); border: 1px solid var(--line, rgba(114,217,248,.12)); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.pdm-kpi.pdm-hero { border-color: rgba(114,217,248,.32); box-shadow: 0 0 22px rgba(114,217,248,.08) inset; }
.pdm-kpi span { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted, #99a8b8); }
.pdm-kpi b { display: block; font-family: "Oswald", sans-serif; font-size: 26px; font-weight: 600; line-height: 1.15; color: var(--text, #edf4fa); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdm-kpi b small { font-size: 13px; color: var(--muted, #99a8b8); font-family: "Montserrat", sans-serif; }
.pdm-kpi em { display: block; font-style: normal; font-size: 11px; color: var(--muted, #99a8b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdm-kpi .rd, .vx-src.rd, .pdm-row .rd { color: #ff8a96; }
.pdm-kpi .am, .vx-src.am { color: #e0b44a; }
.pdm-strips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.pdm-strip { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; min-width: 0; background: rgba(11,16,24,.6); border: 1px solid var(--line, rgba(114,217,248,.12)); border-radius: 14px; padding: 6px 8px 6px 10px; min-height: 64px; }
.pdm-map { font-size: 12.5px; color: var(--muted, #99a8b8); flex: 1; }
.pdm-map b { color: var(--text, #edf4fa); }
.pdm-btn { appearance: none; min-height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid rgba(114,217,248,.45); background: linear-gradient(135deg, rgba(13,148,136,.40), rgba(14,116,144,.22)); color: var(--text, #edf4fa);
  font: 700 13.5px "Montserrat", sans-serif; cursor: pointer; touch-action: manipulation; }
.pdm-btn.ghost { background: transparent; border-color: var(--line-strong, rgba(114,217,248,.22)); color: var(--sky, #72d9f8); }
.pdm-btn:active { transform: scale(.98); }
.pdm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pdm-confirm { background: rgba(224,180,74,.07); border: 1px solid rgba(224,180,74,.45); border-radius: 16px; padding: 12px 14px; margin: 0 0 10px; }
.pdm-confirm p { margin: 0 0 8px; font-size: 13px; }
.pdm-map-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; font-size: 12px; }
.pdm-map-list li { background: rgba(11,16,24,.6); border-radius: 10px; padding: 6px 8px; }
.pdm-map-list li span { color: var(--sky, #72d9f8); font-weight: 800; margin-right: 6px; }
.pdm-tabs { margin-bottom: 10px; }
.pdm-tabs .vx-tab { min-height: 52px; }

.pdm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pdm-card { appearance: none; text-align: left; color: var(--text, #edf4fa); cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 52px;
  background: linear-gradient(160deg, rgba(18,26,37,.98), rgba(11,16,24,.9)); border: 1px solid var(--line, rgba(114,217,248,.12)); border-radius: 20px; padding: 12px;
  font-family: "Montserrat", sans-serif; transition: border-color .25s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.pdm-card:active { transform: scale(.99); }
.pdm-card.sev-watch { border-color: rgba(224,180,74,.55); }
.pdm-card.sev-service { border-color: rgba(255,159,67,.6); box-shadow: 0 0 18px rgba(255,159,67,.12); }
.pdm-card.sev-critical { border-color: rgba(255,61,79,.7); box-shadow: 0 0 22px rgba(255,61,79,.18); }
.pdm-card.sev-waiting { opacity: .78; }
.pdm-card-top { display: flex; gap: 10px; align-items: center; min-width: 0; }
.pdm-id { display: flex; flex-direction: column; min-width: 0; }
.pdm-id b { font-family: "Oswald", sans-serif; font-size: 18px; font-weight: 600; letter-spacing: .02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdm-id span { font-size: 11px; color: var(--muted, #99a8b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdm-id .pdm-did { font-size: 10px; letter-spacing: .06em; color: rgba(153,168,184,.8); }
.pdm-id.lg b { font-size: 28px; }
.pdm-id.lg { gap: 2px; }
.pdm-id.lg .pdm-chip { margin-top: 6px; align-self: flex-start; }
.pdm-live { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.pdm-live b { font-family: "Oswald", sans-serif; font-size: 30px; font-weight: 600; line-height: 1; }
.pdm-live small { font-size: 12px; color: var(--muted, #99a8b8); margin-right: 4px; }
.pdm-live span { font-size: 11px; color: var(--muted, #99a8b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdm-live span + span::before { content: "· "; }
.pdm-spark { width: 100%; height: 52px; display: block; }
.pdm-spark .ln, .pdm-big .ln { fill: none; stroke: var(--sky, #72d9f8); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pdm-spark .band, .pdm-big .band { fill: rgba(34,224,122,.10); stroke: rgba(34,224,122,.28); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pdm-spark .band.prov { fill: rgba(114,217,248,.07); stroke: rgba(114,217,248,.25); stroke-dasharray: 4 4; }
.pdm-spark .med { stroke: rgba(34,224,122,.45); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.pdm-spark .none { fill: #6b7a8a; font: 600 11px "Montserrat", sans-serif; }
.pdm-card-foot { margin-top: auto; min-width: 0; }
.pdm-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 28px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  border: 1px solid rgba(114,217,248,.25); background: rgba(114,217,248,.06); color: var(--sky, #72d9f8); }
.pdm-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pdm-chip i { font-style: normal; flex: none; }
.pdm-chip.sev-ok { color: #a0e68c; border-color: rgba(160,230,140,.45); background: rgba(160,230,140,.06); }
.pdm-chip.sev-watch { color: #e0b44a; border-color: rgba(224,180,74,.55); background: rgba(224,180,74,.07); }
.pdm-chip.sev-service { color: #ffb36b; border-color: rgba(255,159,67,.6); background: rgba(255,159,67,.08); }
.pdm-chip.sev-critical { color: #ff8a96; border-color: rgba(255,61,79,.7); background: rgba(255,61,79,.10); }
.pdm-chip.sev-waiting, .pdm-chip.sev-stale { color: var(--muted, #99a8b8); border-color: rgba(153,168,184,.3); background: rgba(153,168,184,.05); }
.pdm-ring { flex: none; }
.pdm-ring .trk { fill: none; stroke: rgba(153,168,184,.16); stroke-width: 6; }
.pdm-ring .arc { fill: none; stroke: #a0e68c; stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .8s var(--ease, ease); }
.pdm-ring .arc.learn { stroke: var(--sky, #72d9f8); stroke-dasharray: none; }
.pdm-ring.sev-learning .arc { stroke: var(--sky, #72d9f8); }
.pdm-ring.sev-watch .arc { stroke: #e0b44a; }
.pdm-ring.sev-service .arc { stroke: #ff9f43; }
.pdm-ring.sev-critical .arc { stroke: var(--alert, #ff3d4f); }
.pdm-ring.sev-waiting .arc, .pdm-ring.sev-stale .arc { stroke: #6b7a8a; }
.pdm-ring .v { fill: var(--text, #edf4fa); font: 600 18px "Oswald", sans-serif; text-anchor: middle; dominant-baseline: middle; }
.pdm-ring .s { fill: var(--muted, #99a8b8); font: 700 8px "Montserrat", sans-serif; letter-spacing: .1em; text-transform: uppercase; text-anchor: middle; dominant-baseline: middle; }
.pdm-pred { margin-top: 10px; }
.pdm-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 2px; border-bottom: 1px solid var(--line, rgba(114,217,248,.12)); font-size: 13px; }
.pdm-row:last-child { border-bottom: 0; }
.pdm-row span { color: var(--muted, #99a8b8); }
.pdm-row.sev-critical b { color: #ff8a96; }
.pdm-row.sev-service b { color: #ffb36b; }
.pdm-detail-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.pdm-reasons { margin: 0 0 10px; padding: 10px 14px 10px 30px; border-radius: 14px; background: rgba(224,180,74,.06); border: 1px solid rgba(224,180,74,.3); font-size: 13px; }
.pdm-reasons li { margin: 2px 0; }
.pdm-ranges { display: flex; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.pdm-rng { appearance: none; min-width: 64px; min-height: 52px; border-radius: 12px; border: 1px solid var(--line-strong, rgba(114,217,248,.22)); background: transparent; color: var(--muted, #99a8b8); font: 700 13px "Montserrat", sans-serif; cursor: pointer; }
.pdm-rng.on { color: var(--sky, #72d9f8); border-color: rgba(114,217,248,.6); background: rgba(114,217,248,.08); }
.pdm-big { width: 100%; height: 220px; display: block; }
.pdm-big .env { fill: rgba(114,217,248,.10); stroke: none; }
.pdm-big .ax { fill: #7f8fa0; font: 600 10px "Montserrat", sans-serif; }
.pdm-big .mk { stroke: #e0b44a; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.pdm-big .mkl { fill: #e0b44a; font: 700 10px "Montserrat", sans-serif; }
.pdm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.pdm-stat { background: rgba(11,16,24,.6); border: 1px solid var(--line, rgba(114,217,248,.12)); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.pdm-stat span { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted, #99a8b8); }
.pdm-stat b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdm-stat em { display: block; font-style: normal; font-size: 11px; color: var(--muted, #99a8b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdm-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pdm-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #99a8b8); flex: 1; min-width: 0; }
.pdm-form textarea, .pdm-form select { font: 500 15px "Montserrat", sans-serif; color: var(--text, #edf4fa); background: rgba(11,16,24,.85); border: 1px solid var(--line-strong, rgba(114,217,248,.22)); border-radius: 12px; padding: 10px 12px; min-height: 52px; text-transform: none; letter-spacing: 0; }
.pdm-form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pdm-check { flex-direction: row !important; align-items: center; gap: 10px !important; min-height: 52px; text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; font-weight: 600 !important; }
.pdm-check input { width: 24px; height: 24px; }

@media (max-width: 1180px) { .pdm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pdm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .pdm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pdm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pdm-map-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  #pdmOverlay { padding: 0 !important; }
  #pdmSheet .pdm-tabs { max-width: 100%; margin-left: 0; margin-right: 0; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  #pdmSheet .pdm-tabs > button { padding-left: 14px; padding-right: 14px; flex: 0 0 auto; }
  .pdm-strip { flex-wrap: wrap; }
  .pdm-strip > button, .pdm-strip .pdm-btn { flex: 1 1 100%; }
  .pdm-kpi.pdm-hero b { font-size: 30px; }
  #pdmOverlay > #pdmSheet { width: 100%; max-height: 100dvh; min-height: 100dvh; border-radius: 0; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); padding-top: max(10px, env(safe-area-inset-top, 0px)); }
  .pdm-grid { grid-template-columns: minmax(0, 1fr); }
  .pdm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdm-kpi.pdm-hero { grid-column: span 2; }
  .pdm-id.lg b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .pdm-dot.sev-critical { animation: none; } .pdm-ring .arc { transition: none; } }
