/* =========================================================
   YOYO LAND — HEALTH PAGE LOWER SECTION EXTENSION
   Strictly scoped to .health-lower-root and its children.
   Preserves top hero, top KPIs, and top website cards 100%.
   Theme: Pastel / Soft Violet / Indigo / Clean SaaS Dashboard
   ========================================================= */

.health-lower-root {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin-top: 28px;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e293b;
}

/* =========================================================
   SECTION A: PERIOD FILTER BAR
   ========================================================= */
.health-filter-bar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.health-filter-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.health-period-pill-group {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

.health-period-pill-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.health-period-pill-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.health-period-pill-btn.active {
  background: #6366f1;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.28);
}

.health-filter-divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
}

.health-filter-meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}

.health-filter-meta-tz {
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
}

.health-filter-meta-update {
  font-size: 12px;
  color: #64748b;
}

.health-filter-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 9999px;
  padding: 6px 16px;
  color: #047857;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.health-filter-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseLiveDot 2.2s infinite ease-in-out;
}

@keyframes pulseLiveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

/* =========================================================
   SECTION B: UPTIME TIMELINE (7 วันล่าสุด) — SOFT & ROUNDED
   ========================================================= */
.health-uptime-timeline-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

.health-timeline-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.health-timeline-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.health-timeline-sparkle-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #e9d5ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7c3aed;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.08);
}

.health-timeline-heading {
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Mini soft chips for legends */
.health-timeline-legend-list {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  flex-wrap: wrap;
}

.health-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

.health-legend-chip--green {
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  color: #065f46;
}

.health-legend-chip--red {
  background: #fff1f2;
  border: 1px solid #ffe4e6;
  color: #be123c;
}

.health-legend-chip--orange {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #b45309;
}

.health-legend-chip--gray {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

.health-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.health-legend-dot--green { background: #10b981; }
.health-legend-dot--red { background: #f43f5e; }
.health-legend-dot--orange { background: #f59e0b; }
.health-legend-dot--gray { background: #94a3b8; }

.health-timeline-actions-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-timeline-period-select {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}

.health-timeline-period-select:hover {
  border-color: #cbd5e1;
}

.health-timeline-fullscreen-btn {
  background: #ffffff;
  border: 1.5px solid #8b5cf6;
  color: #7c3aed;
  border-radius: 12px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(139, 92, 246, 0.1);
}

.health-timeline-fullscreen-btn:hover {
  background: #f5f3ff;
  border-color: #6d28d9;
}

/* Timeline Layout Grid */
.health-timeline-chart-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.health-timeline-dates-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 8px;
}

.health-timeline-site-col-head {
  width: 140px;
  min-width: 140px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  padding-left: 4px;
}

.health-timeline-days-track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  gap: 8px;
}

.health-timeline-day-header-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 6px 8px;
}

.health-timeline-day-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.health-timeline-day-subhours {
  display: flex;
  width: 100%;
  justify-content: space-between;
  font-size: 9.5px;
  font-weight: 500;
  color: #94a3b8;
  padding: 0 2px;
}

/* Rows per site */
.health-timeline-site-row {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  transition: background 0.15s ease;
}

.health-timeline-site-row:hover {
  background: rgba(99, 102, 241, 0.04);
}

.health-timeline-site-info {
  width: 140px;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.health-timeline-site-info .website-icon-container,
.health-timeline-site-info .health-timeline-site-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: transparent !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.health-timeline-site-info .website-icon-container .website-3d-icon-img,
.health-timeline-site-info .health-timeline-site-icon img {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  border-radius: 6px !important;
  object-fit: contain !important;
  display: block !important;
  user-select: none !important;
  pointer-events: none !important;
}

.health-timeline-blocks-track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  gap: 8px;
}

/* Day quarter capsule grouping */
.health-timeline-day-quarter-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 4px;
  gap: 3.5px;
  width: 100%;
  box-sizing: border-box;
}

/* Status Cells — Soft Capsule / Pill with depth */
.health-timeline-block {
  flex: 1;
  height: 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  box-sizing: border-box;
}

/* Hover feedback */
.health-timeline-block:hover {
  filter: brightness(1.1);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12), inset 0 1px 0.5px rgba(255, 255, 255, 0.4);
}

.health-timeline-block--green {
  background: #10b981;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.28), inset 0 1px 0.5px rgba(255, 255, 255, 0.35);
}

.health-timeline-block--orange {
  background: #f59e0b;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.35), inset 0 1px 0.5px rgba(255, 255, 255, 0.35);
}

.health-timeline-block--red {
  background: #f43f5e;
  box-shadow: 0 1px 3px rgba(244, 63, 94, 0.35), inset 0 1px 0.5px rgba(255, 255, 255, 0.35);
}

.health-timeline-block--gray {
  background: #cbd5e1;
  box-shadow: 0 1px 2px rgba(148, 163, 184, 0.2), inset 0 1px 0.5px rgba(255, 255, 255, 0.5);
}

/* =========================================================
   TIMELINE HOVER TOOLTIP — SOFT & ROUNDED
   ========================================================= */
.health-timeline-tooltip {
  position: fixed;
  background: #0f172a;
  color: #ffffff;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 20px 30px -8px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', 'Prompt', -apple-system, sans-serif;
}

.health-timeline-tooltip.active {
  opacity: 1;
  transform: translateY(0);
}

.health-timeline-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.health-timeline-tooltip.arrow-top::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent #0f172a transparent;
}

.health-tooltip-header {
  font-weight: 700;
  font-size: 13.5px;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.health-tooltip-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.health-tooltip-badge--green { background: rgba(16, 185, 129, 0.22); color: #34d399; }
.health-tooltip-badge--orange { background: rgba(245, 158, 11, 0.22); color: #fbbf24; }
.health-tooltip-badge--red { background: rgba(244, 63, 94, 0.22); color: #fb7185; }
.health-tooltip-badge--gray { background: rgba(148, 163, 184, 0.22); color: #cbd5e1; }

.health-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  font-size: 11.5px;
  margin-top: 3px;
}

.health-tooltip-row strong {
  color: #ffffff;
}

.health-tooltip-hint {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 8px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
}

/* =========================================================
   SECTION C & D: LOWER 2-COLUMN SPLIT
   ========================================================= */
.health-lower-grid-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  width: 100%;
}

/* Incident History Card */
.health-incident-history-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.025);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.health-incident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.health-incident-heading {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.health-btn-view-all-incidents {
  background: #ffffff;
  border: 1.5px solid #8b5cf6;
  color: #6d28d9;
  border-radius: 10px;
  padding: 5px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.health-btn-view-all-incidents:hover {
  background: #f5f3ff;
  border-color: #7c3aed;
}

.health-table-responsive {
  width: 100%;
  overflow-x: auto;
}

.health-incident-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.health-incident-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  white-space: nowrap;
}

.health-incident-table th:first-child { border-radius: 8px 0 0 8px; }
.health-incident-table th:last-child { border-radius: 0 8px 8px 0; }

.health-incident-table td {
  padding: 14px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.health-incident-table tr:last-child td {
  border-bottom: none;
}

.health-incident-time {
  font-family: monospace;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}

.health-incident-duration {
  color: #dc2626;
  font-weight: 700;
  white-space: nowrap;
}

.health-incident-site-name {
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}

.health-incident-cause-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dc2626;
  font-weight: 600;
  white-space: nowrap;
}

.health-incident-cause-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.health-incident-detail-text {
  color: #475569;
  font-size: 12px;
}

.health-btn-detail-outline {
  background: #ffffff;
  border: 1.5px solid #c7d2fe;
  color: #6366f1;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.health-btn-detail-outline:hover {
  background: #eff6ff;
  border-color: #818cf8;
}

/* SECTION D: Cause Summary Card */
.health-cause-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.025);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.health-cause-summary-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.health-cause-summary-body {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 4px;
}

.health-donut-box {
  width: 140px;
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.health-donut-svg-graphic {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.health-donut-inner-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.health-donut-sub-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.health-donut-main-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.health-cause-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.health-cause-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.health-cause-item-left {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #475569;
}

.health-cause-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.health-cause-item-count {
  font-weight: 700;
  color: #0f172a;
}

/* =========================================================
   TIMELINE DETAIL MODAL — SOFT & ROUNDED
   ========================================================= */
.health-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.health-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.health-modal-card {
  width: 600px;
  max-width: 92%;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.health-modal-overlay.active .health-modal-card {
  transform: translateY(0) scale(1);
}

.health-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.health-modal-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6366f1;
}

.health-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 4px 0 0 0;
}

.health-modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.health-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.health-modal-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.health-tag-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.health-tag-pill--id { background: #f1f5f9; color: #475569; font-family: monospace; }
.health-tag-pill--resolved { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.health-tag-pill--degraded { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.health-tag-pill--down { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.health-tag-pill--nodata { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

.health-modal-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.health-modal-info-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.health-modal-info-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.health-modal-info-val {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

/* Checkpoints Timeline Progression Box */
.health-checkpoints-card {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.health-checkpoints-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.health-checkpoint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e2e8f0;
}

.health-checkpoint-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.health-checkpoint-name {
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.health-checkpoint-time {
  font-family: monospace;
  font-weight: 600;
  color: #0f172a;
}

.health-root-cause-box {
  background: #fff1f2;
  border: 1px solid #ffe4e6;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.health-root-cause-box--degraded {
  background: #fffbeb;
  border-color: #fef3c7;
}

.health-root-cause-box--nodata {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.health-root-cause-box-title {
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
  display: flex;
  align-items: center;
  gap: 6px;
}

.health-root-cause-box--degraded .health-root-cause-box-title {
  color: #d97706;
}

.health-root-cause-box--nodata .health-root-cause-box-title {
  color: #64748b;
}

.health-root-cause-box-desc {
  font-size: 12px;
  color: #9f1239;
  line-height: 1.5;
}

.health-root-cause-box--degraded .health-root-cause-box-desc {
  color: #92400e;
}

.health-root-cause-box--nodata .health-root-cause-box-desc {
  color: #475569;
}

.health-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.health-modal-btn-close {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 12px;
  padding: 8px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.health-modal-btn-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Responsive adjustments */
@media (max-width: 1280px) {
  .health-lower-grid-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ADD WEBSITE BUTTON & PREVIEW MODAL (#health)
   ========================================================= */
.health-v2-hero-actions-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.health-btn-add-website {
  background: #ffffff;
  color: #4f46e5;
  border: 1.5px solid #c7d2fe;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
  transition: all 0.2s ease;
  font-family: inherit;
}

.health-btn-add-website:hover {
  background: #f5f3ff;
  border-color: #818cf8;
  color: #3730a3;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.16);
}

.health-btn-add-website:active {
  transform: translateY(0);
}

.health-add-web-modal-card {
  max-width: 580px !important;
  width: 95% !important;
  max-height: 90vh;
  overflow-y: auto;
  gap: 18px;
}

.health-add-web-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.health-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.health-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-form-group--full {
  grid-column: 1 / -1;
}

.health-form-label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.health-req {
  color: #ef4444;
  margin-left: 2px;
}

.health-label-with-hint {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.health-form-hint {
  font-size: 11.5px;
  color: #64748b;
}

.health-form-input,
.health-form-select {
  width: 100%;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 13px;
  color: #0f172a;
  font-family: inherit;
  transition: all 0.15s ease;
  outline: none;
}

.health-form-input:focus,
.health-form-select:focus {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Logo Mode Tabs */
.health-logo-mode-tabs {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.health-logo-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.health-logo-tab-btn.active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Existing Assets Grid */
.health-asset-picker-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health-asset-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  padding: 4px 2px;
}

.health-asset-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 4px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.health-asset-item:hover {
  background: #f5f3ff;
  border-color: #c7d2fe;
}

.health-asset-item.active {
  background: #eef2ff;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.health-asset-thumb {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.health-asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.health-asset-name {
  font-size: 10.5px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75px;
  text-align: center;
}

.health-asset-selected-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid #f1f5f9;
}

.health-asset-selected-bar strong {
  color: #4f46e5;
}

/* Upload Dropzone (Future UI) */
.health-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  background: #fafafa;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  text-align: center;
  transition: all 0.15s ease;
  cursor: pointer;
}

.health-upload-dropzone:hover {
  border-color: #818cf8;
  background: #f5f3ff;
}

.health-upload-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ede9fe;
  display: flex;
  align-items: center;
  justify-content: center;
}

.health-upload-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.health-upload-text strong {
  font-size: 13px;
  color: #1e293b;
}

.health-upload-text span {
  font-size: 11.5px;
  color: #64748b;
}

.health-upload-future-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

/* Feature Toggles Card */
.health-toggles-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.health-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.health-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.health-toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.health-toggle-desc {
  font-size: 11.5px;
  color: #64748b;
}

.health-toggle-divider {
  height: 1px;
  background: #e2e8f0;
}

/* iOS/SaaS Switch Slider */
.health-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.health-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.health-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 24px;
}

.health-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.health-switch input:checked + .health-switch-slider {
  background-color: #6366f1;
}

.health-switch input:checked + .health-switch-slider:before {
  transform: translateX(18px);
}

/* Preview Notice Banner */
.health-preview-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 14px;
}

.health-preview-notice-icon {
  font-size: 15px;
  line-height: 1.3;
}

.health-preview-notice-text {
  font-size: 11.5px;
  color: #1e40af;
  line-height: 1.45;
}

.health-preview-notice-text strong {
  font-weight: 700;
}

/* Modal Footer Buttons */
.health-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.health-btn-cancel {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  border-radius: 12px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.health-btn-cancel:hover {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.health-btn-submit {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: #ffffff;
  border-radius: 12px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
  transition: all 0.2s ease;
  font-family: inherit;
}

.health-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.38);
}
