/* Page-specific styles for parent-core (overview, children, child, devices, device). Shared tokens live in styles.css. */

/* Overview: enrolled / online / compliant / protected strip */
.ov-strip { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.ov-strip-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--fg-muted); cursor: help; border-radius: 6px; }
.ov-strip-item b { font-family: var(--font-display); font-size: 15px; color: var(--fg); }
.ov-strip-item.is-protected b { color: var(--good); }
.ov-strip-info { color: var(--fg-subtle); }
.ov-children { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ov-child { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); color: inherit; min-width: 0; }
.ov-child:hover { border-color: var(--accent); text-decoration: none; }
.ov-child-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.ov-spark { width: 120px; max-width: 100%; height: 32px; }
.ov-spark .sparkline { height: 32px; }
.ov-actions { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-actions .btn { justify-content: flex-start; white-space: normal; text-align: left; height: auto; min-height: 36px; padding-block: 6px; }
.ov-devices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ov-device { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: inherit; min-width: 0; }
.ov-device:hover { border-color: var(--accent); text-decoration: none; }

/* Children */
.children-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.child-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); color: inherit; min-width: 0; }
.child-card:hover { border-color: var(--accent); text-decoration: none; }
.child-card-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.child-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.child-card-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--warn-soft-fg); padding-top: 10px; border-top: 1px solid var(--border); }
.child-card-note svg { color: var(--warn); }
.child-card-note.good { color: var(--fg-muted); }
.child-card-note.good svg { color: var(--good); }
@media (max-width: 420px) { .child-card-grid { grid-template-columns: 1fr 1fr; } .child-card-grid > :last-child { grid-column: 1 / -1; } }

/* Child and device detail headers */
.child-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.child-head h1 { font-size: 24px; }
.sched-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }

/* Devices list */
.dev-search { flex: 1; min-width: 200px; max-width: 320px; }
.dev-list { display: flex; flex-direction: column; }
.dev-row { display: grid; grid-template-columns: 36px minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr) auto 130px; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); color: inherit; min-width: 0; }
.dev-row:first-child { border-top: 0; }
.dev-row:hover { background: var(--surface-2); text-decoration: none; }
.dev-main, .dev-child, .dev-sync { min-width: 0; }
.dev-trail { display: flex; justify-content: flex-end; }
@media (max-width: 899px) {
  .dev-row { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "icon main status" "icon child child" "icon sync trail"; row-gap: 4px; padding: 12px 14px; }
  .dev-row > .icon-box { grid-area: icon; align-self: start; }
  .dev-main { grid-area: main; }
  .dev-child { grid-area: child; }
  .dev-sync { grid-area: sync; }
  .dev-status { grid-area: status; justify-self: end; }
  .dev-trail { grid-area: trail; align-self: end; }
}

/* Device detail */
.dev-hero-icon { width: 52px; height: 52px; border-radius: 14px; }
.why-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--fg-muted); }
.why-list li { display: flex; gap: 8px; align-items: flex-start; }
.why-list svg { flex: none; margin-top: 2px; }
.why-list b { color: var(--fg); font-weight: 600; }
.tone-warn { color: var(--warn); }
.tone-muted { color: var(--fg-subtle); }
.action-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.action-grid .btn { justify-content: flex-start; white-space: normal; text-align: left; height: auto; min-height: 36px; padding-block: 6px; }

/* Let 1fr grid tracks shrink below their content's min-content width on narrow screens. */
.grid-main > *, .grid-side > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
.panel { min-width: 0; }

/* Overview: first-run onboarding */
.ov-onboard { display: flex; flex-direction: column; gap: 14px; }
.ov-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ov-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.ov-step.done { opacity: .72; }
.ov-step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--accent-soft); color: var(--accent); }
.ov-step.done .ov-step-n { background: var(--good); color: #fff; }
.ov-step-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ov-step-action { margin-top: 6px; }
.hero.neutral::before { background: var(--fg-subtle); }

/* Child color picker */
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; transition: transform .12s ease; }
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.selected { border-color: var(--surface); box-shadow: 0 0 0 2px var(--fg); }
.color-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
