.owner-insights-panel {
  display: grid;
  gap: 1rem;
}

.owner-insights-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 0.85rem;
}

.owner-insight-kpi {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  padding: 1rem 1.05rem;
  min-height: 104px;
  border: 1px solid rgba(118, 139, 219, 0.22);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 255, 0.76));
  box-shadow: 0 18px 36px rgba(91, 112, 194, 0.1);
}

.owner-insight-kpi span {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: rgba(47, 88, 207, 0.1);
  border: 1px solid rgba(47, 88, 207, 0.15);
}

.owner-insight-kpi-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.owner-insight-kpi small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.owner-insight-kpi strong {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  color: var(--surface-ink);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.05;
}

.owner-insight-kpi p {
  margin: 0;
  color: #556483;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
}

.owner-insight-kpi.tone-green span {
  color: #16845d;
  background: rgba(47, 201, 128, 0.13);
  border-color: rgba(47, 201, 128, 0.22);
}

.owner-insight-kpi.tone-indigo span {
  color: #4b5bdc;
  background: rgba(111, 99, 255, 0.13);
  border-color: rgba(111, 99, 255, 0.22);
}

.owner-insight-kpi.tone-cyan span {
  color: #167c9a;
  background: rgba(56, 189, 248, 0.13);
  border-color: rgba(56, 189, 248, 0.22);
}

.owner-insight-kpi.tone-orange span {
  color: #b86210;
  background: rgba(255, 168, 74, 0.14);
  border-color: rgba(255, 168, 74, 0.25);
}

.owner-insight-kpi.tone-violet span {
  color: #6a40d9;
  background: rgba(139, 92, 246, 0.13);
  border-color: rgba(139, 92, 246, 0.23);
}

.owner-insights-toolbar {
  align-items: flex-start;
}

.owner-public-links-card {
  padding: 0;
  overflow: hidden;
}

.owner-public-links-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  min-height: 5.5rem;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}

.owner-public-links-summary::-webkit-details-marker {
  display: none;
}

.owner-public-links-summary:hover {
  background: rgba(247, 249, 255, 0.7);
}

.owner-public-links-summary:focus-visible {
  outline: 3px solid rgba(49, 84, 212, 0.24);
  outline-offset: -3px;
}

.owner-public-links-summary-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(49, 84, 212, 0.17);
  border-radius: 13px;
  color: #3154d4;
  background: rgba(49, 84, 212, 0.09);
}

.owner-public-links-summary-icon i {
  font-size: 1.2rem;
}

.owner-public-links-summary-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.owner-public-links-summary-copy .eyebrow {
  margin: 0;
}

.owner-public-links-summary-copy > strong {
  color: var(--surface-ink);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.owner-public-links-summary-copy .helper-text {
  margin: 0;
}

.owner-public-links-summary-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.owner-public-links-summary-arrow {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #3154d4;
  background: rgba(49, 84, 212, 0.09);
  transition: transform 0.2s ease, background 0.2s ease;
}

.owner-public-links-card[open] .owner-public-links-summary {
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.owner-ai-samples-card[open] .owner-public-links-summary {
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.owner-public-links-card[open] .owner-public-links-summary-arrow {
  transform: rotate(180deg);
  background: rgba(49, 84, 212, 0.15);
}

.owner-ai-samples-card[open] .owner-public-links-summary-arrow {
  transform: rotate(180deg);
  background: rgba(49, 84, 212, 0.15);
}

.owner-public-links-content {
  padding: 1rem;
}

.owner-public-links-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 0.75rem;
}

.owner-public-link-item {
  --owner-public-link-accent: #3154d4;
  --owner-public-link-soft: rgba(49, 84, 212, 0.1);
  --owner-public-link-border: rgba(49, 84, 212, 0.18);
  --owner-public-link-surface: rgba(247, 249, 255, 0.76);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.85rem;
  overflow: hidden;
  border: 1px solid var(--owner-public-link-border);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), var(--owner-public-link-surface));
}

.owner-public-link-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--owner-public-link-accent);
}

.owner-public-link-tone-indigo {
  --owner-public-link-accent: #5b5fdd;
  --owner-public-link-soft: rgba(91, 95, 221, 0.12);
  --owner-public-link-border: rgba(91, 95, 221, 0.24);
  --owner-public-link-surface: rgba(246, 246, 255, 0.88);
}

.owner-public-link-tone-orange {
  --owner-public-link-accent: #d97706;
  --owner-public-link-soft: rgba(217, 119, 6, 0.12);
  --owner-public-link-border: rgba(217, 119, 6, 0.22);
  --owner-public-link-surface: rgba(255, 249, 239, 0.88);
}

.owner-public-link-tone-green {
  --owner-public-link-accent: #16845d;
  --owner-public-link-soft: rgba(22, 132, 93, 0.12);
  --owner-public-link-border: rgba(22, 132, 93, 0.22);
  --owner-public-link-surface: rgba(241, 252, 247, 0.88);
}

.owner-public-link-tone-teal {
  --owner-public-link-accent: #0f8b8d;
  --owner-public-link-soft: rgba(15, 139, 141, 0.12);
  --owner-public-link-border: rgba(15, 139, 141, 0.22);
  --owner-public-link-surface: rgba(239, 253, 253, 0.88);
}

.owner-public-link-tone-violet {
  --owner-public-link-accent: #7c3aed;
  --owner-public-link-soft: rgba(124, 58, 237, 0.12);
  --owner-public-link-border: rgba(124, 58, 237, 0.22);
  --owner-public-link-surface: rgba(249, 245, 255, 0.88);
}

.owner-public-link-tone-amber {
  --owner-public-link-accent: #b7791f;
  --owner-public-link-soft: rgba(183, 121, 31, 0.12);
  --owner-public-link-border: rgba(183, 121, 31, 0.22);
  --owner-public-link-surface: rgba(255, 251, 235, 0.9);
}

.owner-public-link-tone-rose {
  --owner-public-link-accent: #d9487a;
  --owner-public-link-soft: rgba(217, 72, 122, 0.12);
  --owner-public-link-border: rgba(217, 72, 122, 0.22);
  --owner-public-link-surface: rgba(255, 246, 250, 0.88);
}

.owner-public-link-tone-cyan {
  --owner-public-link-accent: #167c9a;
  --owner-public-link-soft: rgba(22, 124, 154, 0.12);
  --owner-public-link-border: rgba(22, 124, 154, 0.22);
  --owner-public-link-surface: rgba(240, 250, 255, 0.9);
}

.owner-public-link-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  min-width: 0;
}

.owner-public-link-title-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  min-width: 0;
}

.owner-public-link-icon {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--owner-public-link-accent);
  background: var(--owner-public-link-soft);
  border: 1px solid var(--owner-public-link-border);
}

.owner-public-link-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}

.owner-public-link-title-row strong {
  color: var(--surface-ink);
  font-size: 0.98rem;
}

.owner-public-link-body {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin-left: calc(2.1rem + 0.7rem);
}

.owner-public-link-body .helper-text {
  margin: 0;
}

.owner-public-link-type {
  color: var(--owner-public-link-accent);
  background: var(--owner-public-link-soft);
  padding: 0.18rem 0.45rem;
  font-size: 0.68rem;
}

.owner-public-link-url {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0.42rem 0.5rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--owner-public-link-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: #1b2f6f;
  font-size: 0.78rem;
}

.owner-public-link-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 0.42rem;
  margin: 0;
}

.owner-public-link-metrics span,
.owner-public-link-metric-btn {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.45rem;
  border: 1px solid var(--owner-public-link-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.owner-public-link-metric-btn {
  width: 100%;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.owner-public-link-metric-btn:hover,
.owner-public-link-metric-btn:focus-visible {
  background: var(--owner-public-link-soft);
  outline: 2px solid rgba(49, 84, 212, 0.18);
  outline-offset: 2px;
}

.owner-public-link-metrics small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.owner-public-link-metrics strong {
  color: var(--surface-ink);
  font-size: 0.98rem;
}

.owner-public-link-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.owner-public-link-actions .owner-public-link-btn {
  height: auto;
  min-height: 2.2rem;
  padding: 0.42rem 0.68rem;
  border-radius: 9px;
  font-size: 0.82rem;
  line-height: 1.1;
  white-space: nowrap;
}

.owner-public-link-foot {
  display: grid;
  gap: 0.18rem;
  line-height: 1.35;
}

.owner-public-link-history-dialog {
  width: min(720px, 100%);
}

.owner-public-link-history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.55rem 0 0.7rem;
}

.owner-public-link-history-summary span {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
  padding: 0.56rem 0.64rem;
  border: 1px solid rgba(49, 84, 212, 0.16);
  border-radius: 8px;
  background: rgba(248, 250, 255, 0.84);
}

.owner-public-link-history-summary small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.owner-public-link-history-summary strong {
  color: var(--surface-ink);
  font-size: 0.9rem;
}

.owner-public-link-history-list {
  display: grid;
  gap: 0.58rem;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 0.2rem;
}

.owner-public-link-history-entry {
  display: grid;
  gap: 0.5rem;
  padding: 0.68rem;
  border: 1px solid rgba(49, 84, 212, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.owner-public-link-history-entry-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.52rem;
  align-items: start;
}

.owner-public-link-history-entry-head strong,
.owner-public-link-history-entry-head small {
  display: block;
}

.owner-public-link-history-entry-head strong {
  color: var(--surface-ink);
  font-size: 0.9rem;
}

.owner-public-link-history-entry-head small {
  margin-top: 0.14rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.owner-public-link-history-index {
  width: 1.72rem;
  height: 1.72rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #3154d4;
  background: rgba(49, 84, 212, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
}

.owner-public-link-history-address {
  padding-left: 2.24rem;
}

.owner-public-link-history-address p {
  margin: 0;
  color: #263350;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.owner-public-link-history-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding-left: 2.24rem;
}

.owner-public-link-history-fields span {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
  padding: 0.52rem 0.6rem;
  border: 1px solid rgba(49, 84, 212, 0.12);
  border-radius: 8px;
  background: rgba(248, 250, 255, 0.68);
}

.owner-public-link-history-fields small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.owner-public-link-history-fields strong {
  min-width: 0;
  color: #263350;
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.owner-public-link-history-empty-address {
  color: var(--muted) !important;
  font-style: italic;
}

.owner-public-link-history-empty {
  margin: 0;
}

.owner-insights-table-card {
  display: grid;
}

.owner-insights-table-head {
  display: grid;
  grid-template-columns: auto minmax(260px, 320px) minmax(160px, auto);
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.owner-insights-table-head h3 {
  margin: 0;
  color: var(--surface-ink);
  font-size: 1.05rem;
  line-height: 1.2;
}

.owner-insights-table-head .search-control,
.owner-insights-table-head .search-control input {
  width: 100%;
  min-width: 0;
}

.owner-insights-table-head .user-form-status {
  justify-self: end;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.owner-insights-table table {
  min-width: 1120px;
  table-layout: fixed;
}

.owner-insights-table th:nth-child(1),
.owner-insights-table td:nth-child(1) {
  width: 280px;
}

.owner-insights-table th:nth-child(2),
.owner-insights-table td:nth-child(2) {
  width: 220px;
}

.owner-insights-table th:nth-child(3),
.owner-insights-table td:nth-child(3) {
  width: 360px;
}

.owner-insights-table th:nth-child(4),
.owner-insights-table td:nth-child(4) {
  width: 280px;
}

.owner-insights-table th:nth-child(5),
.owner-insights-table td:nth-child(5) {
  width: 130px;
}

.owner-insights-table th:nth-child(6),
.owner-insights-table td:nth-child(6) {
  width: 48px;
}

.owner-insights-table td {
  vertical-align: top;
}

.owner-insight-user-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.68rem;
  align-items: start;
  min-width: 0;
}

.owner-insight-user-cell strong,
.owner-insight-user-cell .muted {
  overflow-wrap: anywhere;
}

.owner-insight-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 0.45rem;
  align-items: stretch;
}

.owner-insight-metric {
  display: grid;
  align-content: start;
  gap: 0.12rem;
  min-height: 3.7rem;
  padding: 0.52rem 0.58rem;
  border: 1px solid rgba(121, 142, 202, 0.22);
  border-radius: 8px;
  background: rgba(248, 250, 255, 0.78);
}

.owner-insight-metric.is-latest-activity {
  border-color: rgba(50, 175, 112, 0.54);
  background: linear-gradient(180deg, #eafff3 0%, #f8fffb 100%);
  box-shadow: 0 10px 24px rgba(31, 166, 107, 0.12);
}

.owner-insight-metric small {
  color: #657091;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.owner-insight-metric strong {
  color: var(--surface-ink);
  font-size: 1.02rem;
  line-height: 1.15;
}

.owner-insight-metric em {
  color: #5f6d91;
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1.2;
}

.owner-insight-metric.is-latest-activity small,
.owner-insight-metric.is-latest-activity strong {
  color: #087342;
}

.owner-insight-metric .owner-insight-latest-note {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 0.12rem;
  padding: 0.16rem 0.36rem;
  border-radius: 999px;
  background: rgba(25, 135, 84, 0.1);
  color: #087342;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.owner-insight-last-activity {
  display: inline-block;
  color: var(--surface-ink);
  font-weight: 700;
  line-height: 1.28;
}

.owner-insight-user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #6d7df2, #9b7cff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.owner-insight-user-avatar.tone-green {
  background: linear-gradient(135deg, #4ac987, #1fa66b);
}

.owner-insight-user-avatar.tone-blue {
  background: linear-gradient(135deg, #57b8e9, #347bd6);
}

.owner-insight-user-avatar.tone-orange {
  background: linear-gradient(135deg, #ffbd71, #f09532);
}

.owner-insight-user-avatar.tone-pink {
  background: linear-gradient(135deg, #f58ab2, #d95a91);
}

.owner-insight-action-cell {
  width: 2.8rem;
  text-align: right;
}

.owner-insight-row-action {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3154d4;
}

.owner-insight-row-action:disabled {
  cursor: default;
  opacity: 1;
}

.owner-audit-toolbar {
  align-items: center;
}

.owner-audit-actions {
  margin-left: auto;
  gap: 0.55rem;
  align-items: center;
}

.owner-audit-limit-label {
  display: inline-grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.owner-audit-limit-label select {
  min-width: 88px;
}

.owner-audit-table table {
  min-width: 1080px;
}

.owner-audit-table td {
  vertical-align: top;
}

.audit-outcome-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.audit-outcome-success {
  color: #0d7c57;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.audit-outcome-failure {
  color: #b63838;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.audit-outcome-blocked {
  color: #8f5e09;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.33);
}

.audit-outcome-info {
  color: #36508f;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.27);
}

@media (max-width: 1180px) {
  .owner-insights-kpis {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .owner-public-links-list {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .owner-ai-samples-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 900px) {
  .owner-insights-kpis {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .owner-public-links-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-ai-samples-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-public-link-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-public-link-actions {
    justify-content: flex-end;
  }

  .owner-public-link-history-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-audit-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .owner-insights-table-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-insights-table-head .user-form-status {
    justify-self: start;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .owner-public-links-summary {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .owner-public-links-summary-meta {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-left: calc(2.75rem + 0.9rem);
  }

  .owner-public-link-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-public-link-body {
    margin-left: 0;
  }

  .owner-public-link-actions {
    justify-content: flex-start;
  }

  .owner-public-link-history-entry-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-public-link-history-address {
    padding-left: 0;
  }

  .owner-public-link-history-fields {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 0;
  }
}
@media (max-width: 820px) {
  .owner-insights-kpis {
    grid-template-columns: 1fr;
  }
}
