:root {
  --bg: #f5f8ff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 18px 44px rgba(31, 41, 55, 0.08);
  --shadow-soft: 0 10px 26px rgba(79, 70, 229, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --indigo: #4f46e5;
  --sky: #0ea5e9;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #ef4444;
  --violet: #8b5cf6;
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --soft-blue: #eef4ff;
  --soft-indigo: #eef2ff;
  --soft-amber: #fff7ed;
  --soft-emerald: #ecfdf5;
  --soft-rose: #fff1f2;
  --soft-violet: #f5f3ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  color: var(--text);
}

button, input, select, textarea {
  font: inherit;
}

button { cursor: pointer; }

a { color: inherit; }

.app-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px 0 18px;
  background: rgba(251, 253, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.brand-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.brand-mark svg {
  width: 64px;
  height: 64px;
  display: block;
}

.brand-wrap h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.brand-wrap p {
  margin: 4px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: flex-start;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.toolbar::-webkit-scrollbar {
  height: 8px;
}

.toolbar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
}

.action-btn,
.ghost-btn,
.mini-btn,
.table-btn {
  border: 0;
  border-radius: 14px;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.action-btn:hover,
.ghost-btn:hover,
.mini-btn:hover,
.table-btn:hover {
  transform: translateY(-1px);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #fff;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}

.btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.action-sky { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.action-indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
.action-emerald { background: linear-gradient(135deg, #34d399, #059669); }
.action-amber { background: linear-gradient(135deg, #fbbf24, #d97706); }
.action-rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.action-violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); }

.panel,
.agent-card,
.measure-row {
  scroll-margin-top: 170px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.main-layout {
  display: grid;
  gap: 18px;
}

.status-panel {
  display: grid;
  gap: 16px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 18px;
  align-items: stretch;
}

.pill,
.soft-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.pill {
  background: var(--soft-indigo);
  color: var(--indigo);
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: .86rem;
}

.hero-left h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-left p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 14px 0 0;
}

.hero-badges {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.soft-badge {
  padding: 8px 12px;
  font-size: .86rem;
}

.soft-blue { background: var(--soft-blue); color: #2563eb; }
.soft-teal { background: #ecfeff; color: var(--teal); }
.soft-purple { background: var(--soft-violet); color: #7c3aed; }
.soft-amber { background: var(--soft-amber); color: #b45309; }
.soft-rose { background: var(--soft-rose); color: #e11d48; }

.hero-right {
  display: flex;
  align-items: stretch;
}

.hero-kpi-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}

.mini-stat {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.mini-label {
  color: var(--muted);
  font-size: .84rem;
  display: block;
  margin-bottom: 8px;
}

.mini-stat strong {
  font-size: 1.2rem;
  display: block;
}

.mini-stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.section-title-wrap h3,
.section-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.section-subtitle,
.section-head p,
.section-title-wrap p,
.subsection-head p,
.agents-panel .section-head p {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: .94rem;
}

.section-head,
.subsection-head,
.between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.form-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid label,
.storage-toolbar label,
.agent-body-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-grid label > span,
.storage-toolbar label > span,
.agent-body-grid label > span {
  font-size: .87rem;
  color: var(--muted);
  font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(79, 70, 229, .55);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.full-span { grid-column: 1 / -1; }
.grow { flex: 1; }

.checkbox-line {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.checkbox-line span {
  margin: 0;
  color: var(--text) !important;
}

.sample-reco-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reco-card,
.info-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  padding: 16px;
}

.reco-label {
  display: block;
  color: var(--muted);
  font-size: .84rem;
  margin-bottom: 8px;
}

.reco-card strong {
  display: block;
  font-size: 1.3rem;
}

.reco-card small,
.info-block p {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.soft-info {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(238,242,255,0.88), rgba(236,254,255,0.88));
}

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

.ghost-btn,
.mini-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-weight: 700;
}

.ghost-btn.small,
.mini-btn {
  padding: 8px 12px;
  font-size: .9rem;
}

.mini-btn.danger,
.table-btn.danger {
  color: var(--rose);
}

.agents-list {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.agent-card {
  border: 1px solid rgba(79, 70, 229, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,255,0.95));
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.06);
}

.agent-card.selected {
  border-color: rgba(14, 165, 233, .35);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.12);
}

.agent-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.agent-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.agent-select-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  flex: 0 0 auto;
}

.agent-card.selected .agent-select-dot {
  border-color: var(--sky);
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.12);
}

.agent-name-input {
  font-size: 1.04rem;
  font-weight: 700;
}

.agent-result-pill {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  background: #f3f4f6;
  color: #374151;
  white-space: nowrap;
}

.pill-compliant { background: #dcfce7; color: #166534; }
.pill-noncompliant { background: #ffe4e6; color: #be123c; }
.pill-nodecision { background: #fff7ed; color: #b45309; }
.pill-insufficient { background: #eef2ff; color: #4338ca; }
.pill-warning { background: #fef3c7; color: #92400e; }

.agent-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.agent-body-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.measures-wrap {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
}

.table-wrap {
  overflow-x: auto;
}

.measure-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.measure-row {
  transition: background-color .2s ease, box-shadow .2s ease;
}

.measure-table th,
.measure-table td,
.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.measure-table thead th,
.data-table thead th {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

.measure-table tbody tr:last-child td,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.measure-table input[type="text"],
.measure-table input[type="number"] {
  min-width: 110px;
  padding: 10px 12px;
}

.center-cell { text-align: center !important; }
.actions-cell {
  display: flex;
  gap: 8px;
}

.table-btn {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  min-width: 36px;
}

.agent-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-box {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
}

.summary-box span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 8px;
}

.summary-box strong {
  font-size: 1rem;
  display: block;
}

.summary-box small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.kpi-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,252,255,0.98));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.kpi-card span {
  color: var(--muted);
  display: block;
  font-size: .84rem;
}

.kpi-card strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 8px;
  letter-spacing: -0.04em;
}

.kpi-card small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.large-panel {
  grid-column: auto;
}

.chart-host,
.matrix-host {
  min-height: 360px;
}

.chart-host svg,
.matrix-host svg {
  width: 100%;
  height: auto;
  display: block;
}

.matrix-grid {
  display: grid;
  gap: 6px;
}

.risk-matrix-grid {
  grid-template-columns: 90px repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.reeval-matrix-grid {
  grid-template-columns: 180px repeat(4, minmax(0, 1fr));
}

.matrix-label,
.matrix-cell {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  text-align: center;
  padding: 10px;
}

.matrix-label {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}

.matrix-cell {
  color: #111827;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.matrix-cell.active {
  outline: 4px solid rgba(79, 70, 229, .14);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, .18) inset;
}

.legend-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .82rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.app-dialog {
  border: 0;
  padding: 0;
  border-radius: 26px;
  width: min(760px, calc(100vw - 24px));
  box-shadow: 0 30px 80px rgba(15,23,42,.22);
}

.wide-dialog {
  width: min(1040px, calc(100vw - 24px));
}

.app-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.dialog-card {
  margin: 0;
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h3 { margin: 0; }
.dialog-head p { margin: 6px 0 0; color: var(--muted); }

.icon-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.3rem;
}

.dialog-body {
  padding: 20px 22px 24px;
  max-height: min(72vh, 860px);
  overflow: auto;
}

.help-body details {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  margin-bottom: 12px;
}

.help-body summary {
  cursor: pointer;
  font-weight: 800;
}

.help-content {
  color: var(--text);
  line-height: 1.65;
  margin-top: 10px;
}

.help-content p,
.help-content ul,
.help-content ol {
  margin: 10px 0;
}

.storage-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.storage-list {
  display: grid;
  gap: 12px;
}

.storage-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,255,.98));
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.storage-item h4 {
  margin: 0;
  font-size: 1rem;
}

.storage-meta {
  color: var(--muted);
  font-size: .88rem;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .82rem;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.75);
}

.warning-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #92400e;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.small-note {
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 1280px) {
  .hero-card,
  .two-col-grid,
  .dashboard-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .large-panel {
    grid-column: auto;
  }

  .compact-grid,
  .form-grid,
  .agent-body-grid,
  .agent-summary,
  .sample-reco-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell { padding: 0 14px 36px; }
  .topbar { padding: 14px 0 16px; }
  .toolbar { justify-content: flex-start; }
  .form-grid,
  .compact-grid,
  .agent-body-grid,
  .agent-summary,
  .sample-reco-grid,
  .status-grid { grid-template-columns: 1fr; }
  .agent-card-head,
  .section-head,
  .storage-item,
  .hero-card { grid-template-columns: 1fr; display: grid; }
  .agent-title-row { flex-wrap: wrap; }
  .brand-wrap { align-items: flex-start; }
  .measure-table,
  .data-table { min-width: 760px; }
}

/* --- Conformità completa workflow / header fixed / full-width sections --- */
body {
  padding-top: 198px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1400;
  padding: 16px 24px 18px;
  margin-bottom: 0;
}

.topbar .brand-wrap,
.topbar .toolbar {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.app-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.panel,
.agent-card,
.measure-row {
  scroll-margin-top: 230px;
}

.two-col-grid,
.dashboard-grid {
  grid-template-columns: 1fr;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workflow-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #dbe3ee;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,252,0.95));
  box-shadow: var(--shadow-soft);
}

.workflow-label {
  font-size: .79rem;
  color: #64748b;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.workflow-card strong {
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.workflow-card small {
  color: #64748b;
  line-height: 1.45;
}

.workflow-card.state-compliant {
  background: linear-gradient(180deg, rgba(236,253,245,0.98), rgba(220,252,231,0.92));
  border-color: rgba(16,185,129,0.35);
}

.workflow-card.state-noncompliant {
  background: linear-gradient(180deg, rgba(255,241,242,0.98), rgba(255,228,230,0.92));
  border-color: rgba(244,63,94,0.32);
}

.workflow-card.state-nodecision,
.workflow-card.state-warning {
  background: linear-gradient(180deg, rgba(255,247,237,0.98), rgba(254,243,199,0.92));
  border-color: rgba(245,158,11,0.32);
}

.workflow-card.state-insufficient {
  background: linear-gradient(180deg, rgba(238,242,255,0.98), rgba(224,231,255,0.92));
  border-color: rgba(99,102,241,0.26);
}

.accent-info {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(239,246,255,0.94), rgba(238,242,255,0.94));
}

.accent-info strong {
  display: block;
  margin-bottom: 6px;
}

.agent-body-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.agent-body-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-summary {
  margin-top: 18px;
}

.summary-box {
  min-height: 100%;
}

.status-panel .section-head,
.workflow-panel .section-head,
.agents-panel .section-head,
.chart-panel .section-head,
.matrix-panel .section-head,
.table-panel .section-head {
  align-items: flex-start;
}

.measure-table-wrap {
  overflow-x: auto;
}

@media (max-width: 1180px) {
  body {
    padding-top: 216px;
  }

  .workflow-grid,
  .status-grid,
  .agent-body-grid,
  .form-grid,
  .compact-grid,
  .sample-reco-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  body {
    padding-top: 248px;
  }

  .workflow-grid,
  .status-grid,
  .agent-body-grid,
  .form-grid,
  .compact-grid,
  .sample-reco-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== patch conformità avanzata ===== */
.full-width-summary {
  grid-column: 1 / -1;
}

.formula-audit {
  grid-column: 1 / -1;
  border: 1px solid rgba(79,70,229,.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,255,.95));
  padding: 12px 14px;
  margin-top: 10px;
}

.formula-audit summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

.audit-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.audit-grid > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
}

.audit-grid span {
  display: block;
  font-size: .77rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.audit-grid strong {
  display: block;
  font-size: .95rem;
}

.audit-section {
  margin-top: 12px;
}

.blocker-list,
.warning-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.blocker-list li {
  color: #9f1239;
  margin-bottom: 6px;
}

.warning-list li {
  color: #92400e;
  margin-bottom: 6px;
}

.quality-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.state-warning {
  border-color: rgba(245,158,11,.45) !important;
}

.quality-box {
  min-height: 52px;
}

@media (max-width: 980px) {
  .audit-grid,
  .quality-summary-grid {
    grid-template-columns: 1fr;
  }
}
