﻿:root {
  --ink: #0f172a;
  --panel: #ffffff;
  --panel-1: #ffffff;
  --panel-2: #f8fafc;
  --muted: #4b5563;
  --muted-2: #6b7280;
  --line: rgba(15, 23, 42, 0.08);
  --accent: #111827;
  --accent-2: #22c55e;
  --danger: #ef4444;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  color-scheme: light;
}

html.theme-dark {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: #0f172a;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  letter-spacing: 0.01em;
  padding-top: 76px;
}

body.admin-preview {
  padding-top: 12px;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
  margin: 0;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
  color: #464646;
}

code {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
  color: #111827;
  font-size: 0.9rem;
}

.shell {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

body.admin-preview .shell {
  width: min(1100px, 96vw);
}

header.shell.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 0 18px;
  gap: 12px;
}

body.admin-preview header.shell.hero,
body.admin-preview .topbar,
body.admin-preview .panel.devices {
  display: none !important;
}

header.shell.hero h1 {
  margin: 2px 0;
  font-size: 2rem;
  font-weight: 700;
}

header.shell.hero p.lede {
  margin-top: 8px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.brand-mark {
  display: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: #a1a1a1;
  margin-bottom: 6px;
}

body.theme-dark .eyebrow {
  color: #cbd5e1;
}

.lede {
  margin-top: 4px;
  color: #4b5563;
  max-width: 640px;
}

body.theme-dark .lede {
  color: #cbd5e1;
}

.hint {
  margin-top: 6px;
  color: #4b5563;
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  gap: 10px;
}

button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #0f172a;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: box-shadow 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}

button:hover:not(:disabled) {
  border-color: rgba(15, 23, 42, 0.16);
}

button:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

button.primary {
  background: #ffffff;
  color: #000000;
  border-color: #334155;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.14);
}

button.primary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #000000;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.14);
}

button.ghost {
  background: transparent;
}

button.ghost:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.16);
}

button.small {
  padding: 8px 12px;
  font-size: 0.92rem;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-bottom: 36px;
}

header.shell.hero h1 {
  margin: 6px 0 0;
  font-size: 2.2rem;
  font-weight: 700;
}

header.shell.hero p.lede {
  margin-top: 6px;
}

.topbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 68px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  z-index: 20;
  display: flex;
  align-items: center;
  padding-inline: 16px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-left img {
  height: 26px;
  width: auto;
  object-fit: contain;
}

body.theme-dark .topbar-left img {
  content: url("assets/Puffco-Logo_White.png");
}

.topbar-title {
  font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 1rem;
}

.topbar-right {
  display: flex;
  gap: 10px;
}

.icon-toggle {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1rem;
  border-radius: 50%;
  border: none;
  box-shadow: none;
}

.icon-toggle img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

body.theme-dark .icon-toggle img {
  filter: brightness(0) invert(1);
}


body[data-stage="devices"] .panel.devices,
body[data-stage="issues"] .panel.devices,
body[data-stage="issues"] .panel.issues,
body[data-stage="detail"] .panel.devices,
body[data-stage="detail"] .panel.issues,
body[data-stage="detail"] .panel.detail {
  grid-column: 1 / -1;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  transition: opacity 260ms ease, transform 260ms ease, max-height 320ms ease, padding 260ms ease, margin 260ms ease;
  scroll-margin-top: 90px;
}

.panel.devices {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.panel.devices .panel-head {
  text-align: center;
  justify-content: center;
  margin-bottom: 24px;
}

body[data-stage="devices"] .panel.issues,
body[data-stage="devices"] .panel.detail {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  pointer-events: none;
  transform: translateY(16px);
}

body[data-stage="issues"] .panel.detail {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  pointer-events: none;
  transform: translateY(16px);
}

body[data-stage="issues"] .panel.devices {
  opacity: 0.8;
}

body[data-stage="detail"] .panel.devices {
  opacity: 0.6;
}

body[data-stage="detail"] .panel.issues {
  opacity: 0.9;
}

.animate-in {
  animation: rise 260ms ease forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.panel-head.center {
  justify-content: center;
  text-align: center;
}

.panel-head.between {
  align-items: center;
}

.panel h2 {
  margin-bottom: 4px;
}

.device-row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  align-items: stretch;
  width: min(1194px, 100%);
  margin: 0 auto;
}

.device-card {
  border: none;
  border-radius: 0;
  padding: 16px 0 12px;
  background: transparent;
  position: relative;
  overflow: visible;
  transition: transform 140ms ease, box-shadow 140ms ease;
  min-height: 360px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 200px;
  text-decoration: none;
  color: inherit;
}

.device-thumb {
  width: 180px;
  height: 280px;
  border-radius: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 14px;
}

.device-thumb.placeholder {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.08));
}

.device-card::before {
  display: none;
}

.device-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12), 0 0 0 2px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

.device-card.active {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 0 0 2px rgba(15, 23, 42, 0.18);
}

.device-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  white-space: pre-line;
}

.device-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.device-tagline {
  display: none;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #0f172a;
  font-size: 0.85rem;
}

.issue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.issue-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  text-decoration: none;
  color: inherit;
}

.issue-card:hover {
  border-color: rgb(185, 185, 185);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  background: #f5f5f5;
}

.issue-card.active {
  border-color: rgba(15, 23, 42, 0.35);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.issue-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.issue-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.issue-title {
  margin: 0;
  font-size: 1.02rem;
  color: #0f172a;
}

.title-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3a3a3a;
  border: 1px solid rgba(51, 65, 85, 0.24);
  background: rgba(107, 107, 107, 0.05);
  white-space: nowrap;
}

.issue-summary {
  margin: 8px 0 0;
  color: #4b5563;
}

body.theme-dark .issue-summary {
  color: #cbd5e1;
}

.meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #464646
}

.issue-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.70rem;
  line-height: 1.25;
  color: #6b7280;
}

.issue-footer .tags-text {
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 180px;
  font-weight: 500;
}

.issue-footer .meta-text {
  color: #6b7280;
  flex: 0 0 auto;
  font-weight: 500;
}

.detail-body {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 18px;
  min-height: 240px;
  background: #ffffff;
}

.empty-state {
  display: grid;
  place-items: center;
  color: var(--muted-2);
  min-height: 120px;
  text-align: center;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-head-copy {
  min-width: 0;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-issue-title {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  min-width: max(88px, 9ch);
  border-radius: 9px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.02);
  color: #4d4d4d;
  border: 1px solid var(--line);
  justify-content: center;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.symptoms {
  margin: 14px 0;
  display: wrap;
  flex-direction: column;
  gap: 8px;
}

.symptom-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.symptom {
  background: rgba(15, 23, 42, 0.03);
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: #0f172a;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.steps-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.step-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  min-width: 120px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted-2);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

body.theme-dark .step-counter {
  color: #d6dde8;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.step-counter-row {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 2px;
}

.escalation-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  margin-top: 10px;
}

body.theme-dark .escalation-card {
  background: #161616;
  border-color: rgba(255, 255, 255, 0.08);
}

.escalation-card .warranty-btn {
  display: block;
  margin: 14px auto 4px;
}

.hidden {
  display: none !important;
}

.step {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.step input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--accent);
}

.step.inline-layout {
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 12px;
}

.step-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.inline-media {
  display: grid;
  gap: 8px;
  grid-auto-rows: auto;
}

.step-main-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 8px;
}

.step-text {
  flex: 1;
  min-width: 220px;
}

.step-main-row .inline-media.side-media {
  flex: 0 0 200px;
}

@media (max-width: 700px) {
  .step-main-row {
    flex-direction: column;
  }
  .step-main-row .inline-media.side-media {
    width: 100%;
    flex: 1;
  }
}

.media-card.mini {
  width: 170px;
  border-radius: 10px;
  overflow: hidden;
}

.media-card.mini img,
.media-card.mini iframe {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border: 0;
}

.media-card.mini .thumb-overlay {
  height: 110px; /* keep overlay centered over mini thumbs even when labels add height */
}

.media-card.mini .label {
  font-size: 0.85rem;
}

.step-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.step-body {
  color: #414141;
  line-height: 1.55;
}

body.theme-dark .step-body {
  color: #cbd5e1;
}

.step-body a {
  color: #0f172a;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  font-weight: 600;
}

body.theme-dark .step-body a {
  color: rgba(75, 225, 195, 0.5);
}

body.theme-dark .meta,
body.theme-dark .hint,
body.theme-dark .duration {
  color: #9fb3c8;
}

.duration {
  font-size: 0.9rem;
  color: #464646;
}

.step-duration {
  margin-top: 2px;
}

.caution {
  color: var(--danger);
  font-weight: 600;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.media-grid.single {
  grid-template-columns: 1fr;
}

.media-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.media-card img,
.media-card video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.media-card iframe {
  width: 100%;
  height: 120px;
  border: 0;
  display: block;
}

.media-card .label {
  padding: 8px;
  font-size: 0.92rem;
  color: var(--muted-2);
}

.media-card.no-label img,
.media-card.no-label video,
.media-card.no-label iframe {
  height: 170px;
}

.video-thumb {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.14));
  min-height: 120px;
  cursor: pointer;
}

.video-thumb-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.14));
}

.video-thumb-img.no-thumb {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.16));
}
.video-thumb .thumb-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb .play-icon,
.video-thumb .open-icon {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  position: absolute;
  transition: opacity 160ms ease;
}

.video-thumb .open-icon img {
  width: 16px;
  height: 16px;
}

.video-thumb .open-icon {
  opacity: 0;
}

.video-thumb:hover .play-icon {
  opacity: 0;
}

.video-thumb:hover .open-icon {
  opacity: 0.9;
}
.media-grid.single .media-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.media-grid.single .media-card img,
.media-grid.single .media-card video,
.media-grid.single .media-card iframe {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
}

.inline-media .video-thumb {
  min-height: 110px;
}

#videoModal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}

#videoModal.open {
  display: block;
}

#videoModal .video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

#videoModal .video-modal-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80vw;
  height: 80vh;
  max-width: 1200px;
  max-height: 800px;
  transform: translate(-50%, -50%);
  background: var(--panel-1, #0f172a);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#videoModal .close-modal {
  align-self: flex-end;
  color: #0f172a;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.15));
}

body.theme-dark #videoModal .close-modal {
  color: #e8f0fb;
  filter: none;
}

#videoModal .video-modal-body {
  flex: 1;
  background: var(--panel-2, #0b1021);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#imageModal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}

#imageModal.open {
  display: block;
}

#imageModal .video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

#imageModal .image-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80vw;
  height: 80vh;
  max-width: 1200px;
  max-height: 800px;
  transform: translate(-50%, -50%);
  background: var(--panel-1, #0f172a);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#imageModal .close-modal {
  align-self: flex-end;
  color: #0f172a;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.15));
}

body.theme-dark #imageModal .close-modal {
  color: #e8f0fb;
  filter: none;
}

#claimModal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}

#claimModal.open {
  display: block;
}

#claimModal .video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

#claimModal .claim-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80vw;
  max-width: 960px;
  height: 90vh;
  transform: translate(-50%, -50%);
  background: var(--panel-1, #0f172a);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.theme-dark #claimModal .claim-dialog {
  background: #1b1b1b;
}

.claim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.claim-embed {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  background: var(--panel-2, #0b1021);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  overflow: auto;
}

.claim-embed.formstack-frame {
  overflow: hidden;
}

.claim-embed.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 2;
}

body.theme-dark .claim-embed.is-loading::before {
  background: rgb(58, 58, 58);
}

.claim-embed.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(15, 23, 42, 0.22);
  border-top-color: rgba(15, 23, 42, 0.72);
  border-radius: 50%;
  animation: claimSpin 0.75s linear infinite;
  z-index: 3;
}

body.theme-dark .claim-embed.is-loading::after {
  border-color: rgba(226, 232, 240, 0.22);
  border-top-color: rgba(226, 232, 240, 0.78);
}

@keyframes claimSpin {
  to {
    transform: rotate(360deg);
  }
}

.claim-embed > * {
  width: 100%;
  height: 100%;
  flex: 1;
}

.wufoo-form-container {
  width: 100% !important;
  min-height: max(850px, calc(92vh - 96px)) !important;
  border: none !important;
}

.claim-embed.formstack-frame .wufoo-form-container {
  height: 100% !important;
  min-height: 100% !important;
}

/* Dark-mode soften for embed container only (iframe stays Wufoo colors) */
body.theme-dark .claim-embed {
  background: rgb(58, 58, 58);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.claim-dialog .iframe-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 10px;
  display: flex;
}

.claim-dialog .claim-embed {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.claim-dialog .claim-embed.formstack-frame {
  overflow: hidden;
}

.claim-dialog .iframe-wrap::-webkit-scrollbar {
  width: 10px;
}

.claim-dialog .iframe-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

body.theme-dark .claim-dialog .iframe-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
}

#imageModal .image-body {
  flex: 1;
  background: var(--panel-2, #0b1021);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#imageModal .image-dialog {
  max-width: 90vw;
  max-height: 90vh;
}

#imageModal .image-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.search input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: #0f172a;
  padding: 10px 12px;
  border-radius: 10px;
  min-width: 220px;
}

.timeline {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.timeline .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.resources {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resources .resource-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
}

.resource:hover {
  border-color: rgba(15, 23, 42, 0.18);
  color: #0b1224;
  background: rgba(15, 23, 42, 0.04);
}

.resolution-links a {
  color: var(--danger);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.caution {
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.caution .warning-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

body.theme-dark .resolution-links a {
  color: #fa6d6d; /* lighter red in dark mode */
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Detail view layout */
.detail-body .quick-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-actions .pill {
  display: none;
}

.quick-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #0f172a;
}

.quick-list li {
  list-style: disc;
}

@media (max-width: 960px) {
  .device-row {
    justify-content: center;
  }
}

@media (max-width: 960px) {
  header.shell {
    flex-direction: column;
    align-items: flex-start;
  }
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-body {
    padding: 14px;
  }
}

/* Dark theme overrides */
body.theme-dark {
  background: #111111;
  color: #e6e6e6;
  --panel-1: #161616;
  --panel-2: #111111;
  --line: rgba(255, 255, 255, 0.12);
  color-scheme: dark;
}


body.theme-dark .topbar {
  background: #161616;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

body.theme-dark .topbar-title {
  color: #e8f0fb;
}

body.theme-dark button {
  background: #1c1c1e;
  color: #f0f0f0;
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark button:hover:not(:disabled) {
  box-shadow: none;
  background: #252528;
  border-color: rgba(255, 255, 255, 0.2);
}

body.theme-dark button.primary {
  color: #ffffff;
  border-color: rgba(75, 225, 195, 0.5);
  box-shadow: none;
}

body.theme-dark button.primary:hover:not(:disabled) {
  background: #232325;
  border-color: rgba(75, 225, 195, 0.65);
}

body.theme-dark button.ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

/* keep device cards neutral; they are buttons in markup */
body.theme-dark .device-card {
  background: transparent;
  border: none;
  box-shadow: none;
}

body.theme-dark .panel {
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .panel.devices {
  background: transparent;
  border: none;
  box-shadow: none;
}

body.theme-dark .device-card:hover {
  box-shadow: 0 0 0 2px rgba(75, 225, 195, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

body.theme-dark .device-card.active {
  box-shadow: 0 0 0 2px rgba(75, 225, 195, 0.35);
}

body.theme-dark .device-name {
  color: #f7fbff;
}

body.theme-dark .issue-card {
  background: #1b1b1d;
  border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .issue-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  background: #202022;
}

body.theme-dark .issue-card.active {
  border-color: rgba(75, 225, 195, 0.5);
  box-shadow: 0 0 0 1px rgba(75, 225, 195, 0.35);
}

body.theme-dark .issue-card.active:hover {
  box-shadow: 0 0 0 1px rgba(75, 225, 195, 0.35);
}

body.theme-dark .issue-title {
  color: #f7fbff;
}

body.theme-dark .title-badge {
  color: #cbd5e1;
  border-color: rgba(203, 213, 225, 0.24);
  background: rgba(148, 163, 184, 0.14);
}

body.theme-dark .issue-footer .tags-text,
body.theme-dark .issue-footer .meta-text {
  color: #8d97a6;
}

body.theme-dark .detail-body {
  background: rgba(255, 255, 255, 0.02);
}

body.theme-dark .badge {
  background: rgba(255, 255, 255, 0.04);
  color: #9bb3cc;
  border-color: rgba(255, 255, 255, 0.07);
}

body.theme-dark .symptom {
  background: rgba(255, 255, 255, 0.06);
  color: #e8f0fb;
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .step {
  background: #161616;
  border-color: rgba(255, 255, 255, 0.08);
}

.inline-media .media-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.media-card.image-clickable {
  cursor: pointer;
}

.image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.image-overlay img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

.media-grid.single .image-overlay img {
  width: 28px;
  height: 28px;
}

.inline-media .image-overlay img {
  width: 28px;
  height: 28px;
}

.media-card.image-clickable:hover .image-overlay {
  opacity: 1;
}

.inline-media .media-card.image-clickable .image-overlay {
  background: rgba(0, 0, 0, 0.2);
}

body.theme-dark .step-title {
  color: #f7fbff;
}

body.theme-dark .pill {
  background: rgba(255, 255, 255, 0.06);
  color: #e8f0fb;
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .quick-actions .pill {
  display: none;
}

body.theme-dark .quick-list {
  color: #e8f0fb;
}

body.theme-dark .media-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .media-card .label {
  color: #e8f0fb;
}

body.theme-dark .search input {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e6e6e6;
}

body.theme-dark .resource {
  color: #e8f0fb;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.escalate-text a {
  color: #f26b6b;
  text-decoration: underline;
}

.escalate-text a:hover {
  color: #ff8585;
}
/* Step slider */
.step-slider {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 14px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

body.theme-dark .step-slider {
  background: #1b1b1d;
  border-color: rgba(255, 255, 255, 0.1);
}

.step-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.step-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--line);
  font-weight: 700;
  color: #0f172a;
}
.step-title {
  max-width: none;
}

body.theme-dark .step-meta .pill {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.08);
}

.slide-content {
  position: relative;
  padding-top: 0;
  padding-right: 0;
}

.step-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 10px;
  align-items: flex-start;
  margin-top: 4px;
}

.step-main-row.with-media {
  grid-template-columns: minmax(0, 1fr) 170px;
}

.step-main-row .inline-media.side-media {
  width: 170px;
  max-width: 170px;
  margin-top: 0;
  justify-self: end;
  align-self: flex-start;
}

.inline-media.inline-gallery {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 170px));
  gap: 10px;
  justify-content: start;
}

.inline-media.inline-gallery .media-card.mini {
  width: 170px;
  max-width: 100%;
}

.step-main-row.with-media::after {
  content: none;
  display: none;
}

@media (max-width: 900px) {
  .step-meta {
    grid-template-columns: 1fr;
  }

  .step-main-row.with-media {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-main-row .inline-media.side-media {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  .inline-media.inline-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-media.inline-gallery .media-card.mini {
    width: 100%;
  }
}

.step-actions-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 6px;
}

.step-actions-inline .solved-btn {
  padding-inline: 14px;
  border-radius: 10px;
}

.step-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.step-nav button:disabled {
  opacity: 1;
  cursor: default;
  transform: none;
  box-shadow: none;
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.12);
  color: #94a3b8;
}

.step-nav button:disabled:hover {
  transform: none;
  box-shadow: none;
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.12);
  color: #94a3b8;
}

body.theme-dark .step-nav button:disabled,
body.theme-dark .step-nav button.primary:disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #7f8a99;
  box-shadow: none;
}

body.theme-dark .step-nav button:disabled:hover,
body.theme-dark .step-nav button.primary:disabled:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #7f8a99;
}

.step-nav .next.persist-btn {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: none;
}

.step-nav .next.persist-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
}

body.theme-dark .step-nav .next.persist-btn {
  background: #8b4a55;
  border-color: #8b4a55;
  color: #fff5f5;
}

body.theme-dark .step-nav .next.persist-btn:hover {
  background: #7a3f49;
  border-color: #7a3f49;
  color: #ffffff;
}

.step-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.step-progress .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--line);
  padding: 0;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.step-progress .dot.active {
  background: #1f2937; /* dark slate to match light theme neutrals */
  border-color: #1f2937;
  transform: scale(1.08);
}

body.theme-dark .step-progress .dot.active {
  background: rgba(75, 225, 195, 0.5);
  border-color: rgba(75, 225, 195, 0.5);
}

.solved-msg {
  padding: 10px 12px;
  margin-top: 14px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.14);
  color: #065f46;
  font-weight: 700;
}

body.theme-dark .solved-msg {
  background: rgba(79, 255, 210, 0.12);
  color: #c7ffee;
}

.escalation-card .warranty-btn {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.escalation-card .warranty-btn:hover:not(:disabled) {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.14);
}

body.theme-dark .escalation-card .warranty-btn {
  background: #8b4a55;
  border-color: #8b4a55;
  color: #fff5f5;
}

body.theme-dark .escalation-card .warranty-btn:hover:not(:disabled) {
  background: #7a3f49;
  border-color: #7a3f49;
  color: #fff5f5;
  box-shadow: none;
}
.slide-content {
  animation: slideFadeIn 220ms ease;
}
.slide-content.dir-forward {
  animation: slideLeftIn 240ms ease;
}
.slide-content.dir-back {
  animation: slideRightIn 240ms ease;
}

@keyframes slideLeftIn {
  from {opacity: 0; transform: translateX(14px);}
  to {opacity: 1; transform: translateX(0);}
}
@keyframes slideRightIn {
  from {opacity: 0; transform: translateX(-14px);}
  to {opacity: 1; transform: translateX(0);}
}
@keyframes slideFadeIn {
  from {opacity: 0.6;}
  to {opacity: 1;}
}

