.pos-comparator-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  padding: 18px 0;
}

.pos-comparator-form label,
.pos-tariff-table label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.pos-comparator-form input,
.pos-comparator-form select,
.pos-tariff-table input,
.pos-tariff-table select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  padding: 8px 10px;
}

.pos-comparator-form .pos-comparator-check {
  grid-column: span 3;
  grid-template-columns: 20px 1fr;
  align-items: center;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  padding: 10px 12px;
}

.pos-comparator-form .pos-comparator-check input {
  min-height: auto;
}

.pos-comparator-results {
  display: grid;
  gap: 16px;
  padding-top: 8px;
}

.pos-comparator-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pos-comparator-summary article {
  display: grid;
  gap: 7px;
  border: 1px solid #dbe4ee;
  border-left: 4px solid #2dd4bf;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.pos-comparator-summary article.cheapest {
  border-left-color: #f59e0b;
}

.pos-comparator-summary span {
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}

.pos-comparator-summary b {
  color: #070b16;
  font-size: 22px;
}

.pos-comparator-summary small,
.pos-tariff-table small {
  display: block;
  color: #64748b;
  line-height: 1.4;
}

.pos-verification {
  display: inline-flex;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
}

.pos-verification.verified { background: #ccfbf1; color: #115e59; }
.pos-verification.publica { background: #dbeafe; color: #1e40af; }
.pos-verification.estimada { background: #fef3c7; color: #92400e; }
.pos-verification.to_quote,
.pos-verification.conflict,
.pos-verification.expired { background: #fee2e2; color: #991b1b; }

.pos-tariff-table table { min-width: 1180px; }
.pos-tariff-table td { vertical-align: top; }
.pos-tariff-table td > label + label { margin-top: 8px; }
.pos-rate-grid { display: grid; grid-template-columns: repeat(2, minmax(70px, 1fr)); gap: 6px; }

.pos-comparator-history {
  margin-top: 16px;
  border-top: 1px solid #cbd5e1;
  padding-top: 12px;
}

.pos-comparator-history summary {
  cursor: pointer;
  color: #0f172a;
  font-weight: 800;
}

.pos-history-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 0;
}

.pos-history-line span { color: #64748b; font-size: 12px; }
.pos-comparator-results tr.is-incomplete { background: #fff7ed; }

.pos-competitor-detail { scroll-margin-top: 90px; }

.pos-guided-comparison {
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #fff;
}

.pos-guided-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  padding: 20px;
}

.pos-guided-head span { color: #1746ff; font-size: 11px; font-weight: 900; }
.pos-guided-head h3 { margin: 5px 0; }
.pos-guided-head p { margin: 0; max-width: 720px; color: #475569; }
.pos-guided-head > strong { border-radius: 999px; padding: 8px 12px; white-space: nowrap; }
.pos-guided-head .connect-saves { background: #ccfbf1; color: #115e59; }
.pos-guided-head .competitor-cheaper { background: #fef3c7; color: #92400e; }

.pos-guided-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #e2e8f0;
}

.pos-guided-grid section { background: #fff; padding: 18px 20px; }
.pos-guided-grid section.connect-script { grid-column: 1 / -1; background: #f8fafc; }
.pos-guided-grid h4 { margin: 0 0 10px; color: #0f172a; }
.pos-guided-grid ul { margin: 0; padding-left: 20px; }
.pos-guided-grid li + li { margin-top: 7px; }

.pos-comparator-audits {
  margin-top: 28px;
  border-top: 1px solid #cbd5e1;
  padding-top: 20px;
}

.pos-audit-list {
  display: grid;
  gap: 10px;
}

.pos-audit-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(420px, 2fr) auto;
  align-items: end;
  gap: 16px;
  border: 1px solid #dbe4ee;
  border-left: 4px solid #1746ff;
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
}

.pos-audit-card div { display: grid; gap: 4px; }
.pos-audit-card span,
.pos-audit-card small { color: #64748b; font-size: 12px; }
.pos-audit-card button { white-space: nowrap; }
.pos-audit-followup { display: grid !important; grid-template-columns: 160px 160px minmax(220px, 1fr); gap: 8px !important; }
.pos-audit-followup label { display: grid; gap: 5px; font-size: 11px; font-weight: 800; }
.pos-audit-followup input,
.pos-audit-followup select { min-width: 0; width: 100%; min-height: 38px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #0f172a; padding: 7px 9px; }
.pos-audit-actions { display: flex !important; gap: 6px !important; }
.pos-audit-card > .source-status { grid-column: 1 / -1; margin: 0; min-height: 0; padding: 0; border: 0; background: transparent; }

.pos-team-dashboard {
  margin-top: 30px;
  border-top: 1px solid #cbd5e1;
  padding-top: 22px;
}

.pos-team-kpis article.is-alert {
  border-color: #fca5a5;
  background: #fff1f2;
}

.pos-team-kpis article.is-alert strong { color: #be123c; }

body[data-theme="dark"] .pos-comparator-summary article,
body[data-theme="dark"] .pos-audit-card,
body[data-theme="dark"] .pos-guided-comparison,
body[data-theme="dark"] .pos-guided-grid section,
body[data-theme="dark"] .pos-audit-followup input,
body[data-theme="dark"] .pos-audit-followup select,
body[data-theme="dark"] .pos-comparator-form input,
body[data-theme="dark"] .pos-comparator-form select,
body[data-theme="dark"] .pos-tariff-table input,
body[data-theme="dark"] .pos-tariff-table select {
  border-color: #334155;
  background: #111827;
  color: #f8fafc;
}

body[data-theme="dark"] .pos-comparator-summary b,
body[data-theme="dark"] .pos-comparator-history summary,
body[data-theme="dark"] .pos-guided-grid h4 { color: #f8fafc; }

body[data-theme="dark"] .pos-guided-head { background: linear-gradient(135deg, #172554, #134e4a); }
body[data-theme="dark"] .pos-guided-head p { color: #cbd5e1; }

@media (max-width: 980px) {
  .pos-comparator-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-comparator-form .pos-comparator-check { grid-column: span 2; }
  .pos-audit-card { grid-template-columns: 1fr; align-items: stretch; }
  .pos-audit-followup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-audit-note { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .pos-comparator-form,
  .pos-comparator-summary { grid-template-columns: 1fr; }
  .pos-comparator-form .pos-comparator-check { grid-column: span 1; }
  .pos-history-line { display: grid; gap: 3px; }
  .pos-audit-card { align-items: stretch; display: grid; }
  .pos-audit-card button { width: 100%; }
  .pos-audit-followup { grid-template-columns: 1fr; }
  .pos-audit-note { grid-column: auto; }
  .pos-audit-actions { display: grid !important; }
  .pos-guided-head { display: grid; }
  .pos-guided-head > strong { justify-self: start; }
  .pos-guided-grid { grid-template-columns: 1fr; }
  .pos-guided-grid section.connect-script { grid-column: auto; }
}
