.provider-page {
  background:
    linear-gradient(180deg, #fff 0%, var(--bee-off) 42%, #fff 100%);
}

.provider-hero {
  position: relative;
  overflow: hidden;
  background: var(--bee-blue);
}

.provider-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 440px at 16% 4%, rgba(250, 215, 65, .24), transparent 62%),
    radial-gradient(680px 460px at 96% 86%, rgba(245, 90, 120, .30), transparent 58%),
    linear-gradient(135deg, #1e28a5 0%, #18218c 54%, #0e1457 100%);
}

.provider-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 44px;
  align-items: center;
  padding: 64px 0 56px;
}

.provider-hero h1 {
  max-width: 820px;
  color: #fff;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.02;
  font-weight: 900;
}

.provider-hero h1 span {
  color: var(--bee-yellow);
}

.provider-console {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 32px;
  padding: 24px;
  background: rgba(255, 255, 255, .13);
  color: #fff;
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(18px);
}

.provider-console::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -80px;
  width: 230px;
  height: 180px;
  background: rgba(250, 215, 65, .22);
  transform: rotate(-13deg);
}

.console-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.console-head span {
  color: var(--bee-yellow);
  font-size: 36px;
}

.console-head strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.console-head small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, .72);
  font-weight: 700;
}

.session-pulse {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--bee-yellow);
  box-shadow: 0 0 0 8px rgba(250, 215, 65, .16);
}

.session-pulse.off {
  background: var(--bee-coral);
  box-shadow: 0 0 0 8px rgba(245, 90, 120, .18);
}

.console-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
}

.console-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 20px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, .13);
}

.console-list b {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.console-list small {
  color: rgba(255, 255, 255, .74);
  font-weight: 750;
}

.provider-shell {
  padding: 54px 0 88px;
}

.provider-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.provider-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.status-panel,
.upload-panel,
.provider-card,
.upload-card,
.drop-zone,
.result-panel {
  border: 1px solid var(--bee-line);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow-1);
}

.status-panel {
  overflow: hidden;
  padding: 22px;
}

.status-panel h2,
.upload-panel h2,
.provider-section h2 {
  color: var(--bee-blue);
  font-size: 27px;
  line-height: 1.08;
  font-weight: 900;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(30, 40, 165, .09);
  color: var(--bee-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status-pill.ready {
  background: rgba(30, 40, 165, .10);
}

.status-pill.warn {
  background: rgba(245, 90, 120, .12);
  color: var(--bee-coral);
}

.identity-stack {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.identity-stack article {
  border-radius: 18px;
  padding: 13px 14px;
  background: var(--bee-off);
}

.identity-stack small {
  display: block;
  color: var(--bee-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.identity-stack strong {
  display: block;
  margin-top: 5px;
  color: var(--bee-blue);
  overflow-wrap: anywhere;
}

.provider-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.provider-main {
  display: grid;
  gap: 24px;
}

.provider-section {
  display: grid;
  gap: 18px;
}

.provider-section > p {
  max-width: 780px;
  margin: 0;
  color: var(--bee-muted);
  line-height: 1.7;
  font-weight: 650;
}

.provider-request-form {
  border: 1px solid var(--bee-line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-1);
}

.provider-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-radius: 8px;
  padding: 12px;
  background: var(--bee-off);
  color: var(--bee-muted);
  font-size: 13px;
  font-weight: 800;
}

.provider-check input {
  width: auto;
  margin-top: 2px;
}

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

.provider-request-item {
  border: 1px solid var(--bee-line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-1);
}

.provider-request-item strong,
.provider-request-item small {
  display: block;
  overflow-wrap: anywhere;
}

.provider-request-item strong {
  color: var(--bee-blue);
  font-size: 18px;
  font-weight: 900;
}

.provider-request-item small {
  margin-top: 4px;
  color: var(--bee-muted);
  font-size: 12px;
  font-weight: 850;
}

.provider-request-item p {
  margin: 12px 0 0;
  color: var(--bee-muted);
  line-height: 1.55;
  font-weight: 650;
}

.provider-request-item.is-approved {
  border-color: rgba(56, 161, 105, .30);
  background: rgba(56, 161, 105, .06);
}

.provider-request-item.is-rejected {
  border-color: rgba(245, 90, 120, .30);
  background: rgba(245, 90, 120, .06);
}

.request-reason {
  color: var(--bee-coral) !important;
  font-weight: 850 !important;
}

.org-status {
  margin: 12px 0 0;
  color: var(--bee-muted);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.org-status[data-tone="ok"] {
  color: #1f7a3f;
}

.org-status[data-tone="error"] {
  color: #a61b3d;
}

.permission-grid,
.journey-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.provider-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 20px;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.provider-card::after {
  content: "";
  position: absolute;
  inset: auto -28% -44% 22%;
  height: 128px;
  border-radius: 999px;
  background: rgba(250, 215, 65, .22);
  transform: rotate(-7deg);
  transition: transform .24s ease;
}

.provider-card:hover {
  transform: translateY(-7px);
  border-color: rgba(30, 40, 165, .28);
  box-shadow: var(--shadow-3);
}

.provider-card:hover::after {
  transform: translateY(-22px) rotate(-7deg);
}

.provider-card > * {
  position: relative;
  z-index: 1;
}

.provider-card span.material-symbols-outlined {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: rgba(30, 40, 165, .09);
  color: var(--bee-blue);
}

.provider-card h3 {
  margin-top: 15px;
  color: var(--bee-blue);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

.provider-card p {
  margin: 10px 0 0;
  color: var(--bee-muted);
  line-height: 1.55;
  font-weight: 650;
}

.provider-card .card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(30, 40, 165, .08);
  color: var(--bee-blue);
  font-size: 11px;
  font-weight: 900;
}

.tag.good {
  background: rgba(56, 161, 105, .12);
  color: #207849;
}

.tag.missing {
  background: rgba(245, 90, 120, .12);
  color: var(--bee-coral);
}

.provider-band {
  overflow: hidden;
  border-radius: 34px;
  padding: 28px;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(250, 215, 65, .38), transparent 62%),
    linear-gradient(135deg, var(--bee-blue), var(--bee-blue-deep));
  color: #fff;
}

.provider-band h2 {
  color: #fff;
}

.provider-band p {
  color: rgba(255, 255, 255, .82);
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

.flow-shell {
  background:
    radial-gradient(740px 360px at 100% 18%, rgba(250, 215, 65, .20), transparent 58%),
    linear-gradient(180deg, #fff 0%, var(--bee-off) 100%);
}

.provider-flow-hero .provider-hero-grid {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.flow-score-console .console-head strong {
  font-size: 46px;
  line-height: 1;
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
}

.flow-rail {
  grid-column: 1 / -1;
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(210px, .38fr));
  gap: 16px;
}

.flow-preview-panel {
  grid-column: 2;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.flow-preview-panel .upload-card {
  overflow: hidden;
}

.flow-preview-panel .preview-table-wrap {
  max-width: 100%;
}

.flow-preview-panel .preview-table {
  width: max-content;
  min-width: 100%;
}

.flow-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--bee-line);
  border-radius: 16px;
  padding: 10px;
  background: #fff;
  color: var(--bee-muted);
  box-shadow: var(--shadow-1);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.flow-steps li b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: rgba(30, 40, 165, .08);
  color: var(--bee-blue);
  font-weight: 900;
}

.flow-steps li span {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.flow-steps li.active {
  transform: translateY(-2px);
  border-color: rgba(30, 40, 165, .34);
  color: var(--bee-blue);
  box-shadow: var(--shadow-2);
}

.flow-steps li.active b {
  background: var(--bee-yellow);
  color: var(--bee-blue-deep);
}

.flow-steps li.done b {
  background: rgba(56, 161, 105, .15);
  color: #207849;
}

.flow-mini-panel,
.flow-card {
  border: 1px solid var(--bee-line);
  border-radius: 30px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-1);
}

.flow-mini-panel {
  min-height: 100%;
  padding: 16px;
  color: var(--bee-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.flow-mini-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--bee-blue);
  font-size: 15px;
  font-weight: 900;
}

#authGate {
  grid-column: 1;
}

.flow-mini-panel p {
  margin: 0 0 12px;
}

.flow-workbench {
  display: grid;
  min-width: 0;
}

.flow-card {
  display: none;
  overflow: hidden;
  min-height: 620px;
  padding: 26px;
}

.flow-card.active {
  display: block;
  animation: flowPanelIn .28s ease both;
}

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

.flow-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.flow-card-head h2 {
  color: var(--bee-blue);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  font-weight: 900;
}

.flow-card-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--bee-muted);
  line-height: 1.65;
  font-weight: 650;
}

.flow-medal {
  display: grid;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 32% 22%, rgba(250, 215, 65, .75), transparent 42%),
    rgba(30, 40, 165, .08);
  color: var(--bee-blue);
}

.flow-medal span {
  font-size: 34px;
}

.flow-drop-zone {
  min-height: 260px;
}

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

.flow-insight-grid.compact {
  margin-top: 0;
}

.flow-insight,
.quality-card {
  overflow: hidden;
  border: 1px solid var(--bee-line);
  border-radius: 22px;
  padding: 16px;
  background:
    radial-gradient(180px 120px at 100% 0%, rgba(251, 232, 223, .50), transparent 62%),
    #fff;
  box-shadow: var(--shadow-1);
}

.flow-insight span {
  color: var(--bee-blue);
  font-size: 28px;
}

.flow-insight b,
.quality-card strong {
  display: block;
  margin-top: 8px;
  color: var(--bee-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.flow-insight strong,
.quality-card b {
  display: block;
  margin-top: 7px;
  color: var(--bee-blue);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.flow-insight small,
.quality-card p {
  display: block;
  margin-top: 7px;
  color: var(--bee-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.quality-card.good {
  border-color: rgba(56, 161, 105, .28);
  background: rgba(56, 161, 105, .08);
}

.quality-card.warn {
  border-color: rgba(250, 215, 65, .54);
  background: rgba(250, 215, 65, .13);
}

.quality-card.bad {
  border-color: rgba(245, 90, 120, .32);
  background: rgba(245, 90, 120, .08);
}

.flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.flow-actions .button[disabled] {
  opacity: .45;
  pointer-events: none;
}

.flow-table-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.flow-table-picker button {
  border: 1px solid var(--bee-line);
  border-radius: 18px;
  padding: 11px 13px;
  background: #fff;
  color: var(--bee-blue);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-1);
}

.flow-table-picker button.active {
  border-color: rgba(30, 40, 165, .42);
  background: var(--bee-yellow);
}

.flow-table-picker span,
.flow-table-picker small {
  display: block;
  font-weight: 900;
}

.flow-table-picker small {
  margin-top: 3px;
  color: var(--bee-muted);
  font-size: 11px;
}

.flow-results {
  min-height: 180px;
}

.column-match-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.column-match-list article {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(180px, 1fr) 110px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--bee-line);
  border-radius: 18px;
  padding: 12px 14px;
  background: #fff;
}

.column-match-list span {
  color: var(--bee-blue);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.column-match-list strong {
  color: var(--bee-muted);
  font-size: 13px;
  font-weight: 800;
}

.column-match-list small {
  color: var(--bee-coral);
  font-weight: 900;
}

/* Rótulos de fase (paso 5 y 6) + informes desplegables + tarjetas finales */
.phase-lead {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 4px solid var(--bee-yellow);
  border-radius: 0 12px 12px 0;
  background: rgba(250, 215, 65, .14);
  color: #17365f;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.5;
}

.quality-report {
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1.5px dashed rgba(30, 40, 165, .28);
  border-radius: 14px;
  background: rgba(255, 255, 255, .75);
}

.quality-report summary {
  cursor: pointer;
  color: var(--bee-blue);
  font-size: 13px;
  font-weight: 950;
}

.quality-report summary:hover { color: var(--bee-coral); }

.qr-line {
  margin: 10px 0 0;
  color: #33445f;
  font-size: 13px;
  font-weight: 750;
}

.qr-overall { color: var(--bee-blue); font-weight: 900; }
.qr-human { color: #6b5200; }

.qr-list {
  margin: 8px 0 0;
  padding: 0 0 0 4px;
  list-style: none;
  display: grid;
  gap: 6px;
}

.qr-list li {
  color: var(--bee-muted);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
}

.qr-list li b { color: var(--bee-blue); }

.qr-technical { margin-top: 10px; }
.qr-technical summary { font-size: 12px; color: var(--bee-muted); cursor: pointer; }
.qr-technical pre {
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(30, 40, 165, .05);
  font-size: 11px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.finish-lead {
  margin: 18px 0 10px;
  color: var(--bee-blue);
  font-size: 15px;
  font-weight: 950;
}

.finish-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.finish-card {
  display: grid;
  gap: 5px;
  padding: 16px 15px;
  border: 1px solid var(--bee-line);
  border-radius: 18px;
  background: #fff;
  color: var(--bee-blue);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.finish-card:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 40, 165, .38);
  box-shadow: 0 16px 36px rgba(15, 40, 78, .16);
}

.finish-card > span { font-size: 26px; line-height: 1; }

.finish-card strong { font-size: 14px; font-weight: 950; }

.finish-card small {
  color: var(--bee-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

/* Siguiente paso recomendado tras guardar: completar la ficha del dataset. */
.finish-card.finish-card-primary {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  padding: 18px 20px;
  border: 2px solid #b58300;
  /* La capa de marca fuerza con !important el borde de todo *-card. */
  border-color: #b58300 !important;
  box-shadow: 0 10px 28px rgba(181, 131, 0, .18) !important;
  background: linear-gradient(120deg, #fff6cc 0%, #fffdf3 100%);
}
.finish-card.finish-card-primary .finish-next-copy { display: grid; gap: 4px; font-size: inherit; line-height: normal; }
.finish-card.finish-card-primary strong { font-size: 16px; color: #17365f; }
.finish-card.finish-card-primary small { font-size: 12.5px; color: #5b5235; }
.finish-card.finish-card-primary > .material-symbols-outlined { font-size: 24px; color: #17365f; }
@media (max-width: 560px) {
  .finish-card.finish-card-primary { grid-template-columns: auto 1fr; }
  .finish-card.finish-card-primary > .material-symbols-outlined { display: none; }
}

/* Botones de operación en marcha: su icono gira mientras trabajan. */
#runColumnAnalysis:disabled .material-symbols-outlined,
#runRepair:disabled .material-symbols-outlined,
#runQuality:disabled .material-symbols-outlined {
  display: inline-block;
  animation: opButtonSpin 1.1s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  #runColumnAnalysis:disabled .material-symbols-outlined,
  #runRepair:disabled .material-symbols-outlined,
  #runQuality:disabled .material-symbols-outlined {
    animation: none;
  }
}

/* ===== Campos de chips normalizados (cobertura y años) ===== */
.tag-field {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 46px;
  padding: 7px 10px;
  border: 1px solid var(--bee-line);
  border-radius: 14px;
  background: #fff;
  cursor: text;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.tag-field:focus-within {
  border-color: rgba(30, 40, 165, .45);
  box-shadow: 0 0 0 3px rgba(30, 40, 165, .12);
}

.tag-field.tag-invalid {
  border-color: #f55a78;
  box-shadow: 0 0 0 3px rgba(245, 90, 120, .18);
  animation: tagShake .3s ease;
}

@keyframes tagShake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
}

.tag-chips {
  display: contents;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 11px;
  border: 1px solid rgba(30, 40, 165, .22);
  border-radius: 999px;
  background: rgba(250, 215, 65, .22);
  color: var(--bee-blue);
  font-style: normal;
  font-size: 12.5px;
  font-weight: 850;
}

.tag-chip button {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 40, 165, .12);
  color: var(--bee-blue);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.tag-chip button:hover {
  background: #f55a78;
  color: #fff;
}

.tag-field > input[type="text"] {
  flex: 1 1 120px;
  min-width: 90px;
  border: 0;
  outline: none;
  padding: 6px 4px;
  background: transparent;
  color: var(--bee-blue);
  font: 700 14px inherit;
  font-family: inherit;
}

/* Sugerencias como FILA COMPACTA de píldoras EN FLUJO: aparecen al teclear
   (≈40px, sin hinchar la maqueta), se esfuman al elegir y jamás tapan el
   campo siguiente ni pierden un clic — nada flota, nada se superpone. */
.tag-suggest {
  flex: 1 1 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 2px 2px;
}

.tag-suggest button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border: 1.5px dashed rgba(30, 40, 165, .35);
  border-radius: 999px;
  background: rgba(250, 215, 65, .14);
  color: var(--bee-blue);
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.tag-suggest button:hover {
  background: var(--bee-yellow);
  border-color: #b58300;
  transform: translateY(-1px);
}

.tag-hint {
  display: block;
  margin-top: 6px;
  color: var(--bee-muted);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}

.column-journey {
  margin: 18px 0 16px;
  padding: 16px;
  border: 1px solid var(--bee-line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .9)),
    radial-gradient(320px 130px at 0 0, rgba(250, 215, 65, .2), transparent 70%);
}

.column-journey.complete {
  border-color: rgba(56, 161, 105, .4);
  box-shadow: 0 0 0 3px rgba(56, 161, 105, .09);
}

.column-journey-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}

.column-journey-count {
  color: var(--bee-blue);
  font-size: 14px;
  font-weight: 800;
}

.column-journey-count b {
  font-size: 17px;
  font-weight: 950;
}

.column-journey-bar {
  flex: 1 1 180px;
  height: 10px;
  border-radius: 999px;
  background: rgba(30, 40, 165, .1);
  overflow: hidden;
}

.column-journey-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fad741, #f5a623);
  transition: width .5s cubic-bezier(.22, .9, .26, 1);
}

.column-journey.complete .column-journey-bar > span {
  background: linear-gradient(90deg, #38a169, #2c7a53);
}

.column-journey-help {
  margin: 10px 0 12px;
  color: var(--bee-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.column-review-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.column-decision-list {
  display: grid;
  gap: 14px;
}

/* Grupo colapsable de columnas NO reconocidas: mensaje idéntico → un solo
   bloque con los nombres a la vista, revisión una a una a un clic y botón
   masivo (reversible tarjeta a tarjeta). */
.unrecognised-group {
  margin-top: 14px;
  border: 1.5px dashed rgba(30, 40, 165, .28);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, .75);
}

.unrecognised-group.complete {
  border-color: rgba(56, 161, 105, .4);
  background: rgba(56, 161, 105, .06);
}

.unrecognised-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
}

.unrecognised-copy { min-width: 0; flex: 1 1 320px; }

.unrecognised-copy strong {
  display: block;
  color: var(--bee-blue);
  font-size: 15px;
  font-weight: 950;
}

.unrecognised-names {
  margin: 6px 0 0;
  color: var(--bee-blue);
  font-size: 12.5px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.unrecognised-copy small {
  display: block;
  margin-top: 6px;
  color: var(--bee-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.unrecognised-bulk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 12px 18px;
  border: 1px solid #0e5a36;
  border-radius: 999px;
  background: #167246;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.unrecognised-bulk:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(22, 114, 70, .3);
}

.unrecognised-done {
  flex: none;
  color: #1f7a49;
  font-size: 13px;
  font-weight: 950;
}

.unrecognised-details {
  margin-top: 12px;
}

.unrecognised-details summary {
  cursor: pointer;
  color: var(--bee-blue);
  font-size: 13px;
  font-weight: 950;
}

.unrecognised-details summary:hover { color: var(--bee-coral); }

.unrecognised-details > .column-decision-list { margin-top: 12px; }

/* Barra de remate al FINAL de la lista: con 80 tarjetas, el atajo de
   confirmación global debe estar junto al botón Continuar, no solo arriba. */
.column-journey-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--bee-line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .9)),
    radial-gradient(320px 130px at 100% 0, rgba(250, 215, 65, .2), transparent 70%);
}

.column-journey-foot.complete {
  border-color: rgba(56, 161, 105, .4);
  background: rgba(56, 161, 105, .07);
}

.column-decision-card {
  border: 1px solid var(--bee-line);
  border-radius: 24px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .86)),
    radial-gradient(260px 120px at 100% 0, rgba(250, 215, 65, .18), transparent 72%);
  box-shadow: var(--shadow-1);
}

.column-decision-card.reviewed {
  border-color: rgba(56, 161, 105, .38);
  box-shadow: 0 0 0 3px rgba(56, 161, 105, .08), var(--shadow-1);
}

/* Anatomía en dos mitades, como las fichas del centro de curación:
   izquierda = TU columna con tus valores; derecha = la propuesta razonada. */
.column-split {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 1.6fr);
  gap: 18px;
}

.column-yours {
  padding-right: 18px;
  border-right: 1px solid rgba(30, 40, 165, .12);
}

.column-sample-label {
  display: block;
  margin-top: 12px;
  color: #6a739b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sample-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.sample-chips i {
  padding: 4px 10px;
  border: 1px solid rgba(30, 40, 165, .18);
  border-radius: 999px;
  background: #fff;
  color: var(--bee-blue);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.sample-chips i.empty {
  color: var(--bee-muted);
  border-style: dashed;
}

.column-propose-label {
  display: block;
  color: #6a739b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.column-propose-name {
  display: block;
  margin: 4px 0 10px;
  color: var(--bee-blue);
  font-size: 22px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.dict-box {
  padding: 12px 14px;
  border: 1.5px dashed rgba(30, 40, 165, .3);
  border-radius: 14px;
  background: rgba(255, 255, 255, .7);
}

.dict-box > small {
  display: block;
  margin-bottom: 6px;
  color: var(--bee-blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.dict-box p {
  margin: 6px 0 0;
  color: var(--bee-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.dict-box .dict-examples-label i {
  display: inline-block;
  margin: 2px 3px;
  padding: 2px 9px;
  border: 1px solid rgba(30, 40, 165, .18);
  border-radius: 999px;
  background: #fff;
  color: var(--bee-blue);
  font-style: normal;
  font-size: 11.5px;
  font-weight: 800;
}

.dict-box .dict-vocab b { color: var(--bee-blue); }

.dict-box .column-why {
  margin-top: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(250, 215, 65, .18);
  color: #6b5200;
  font-weight: 750;
}

.conf-meter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.conf-meter {
  flex: 0 0 130px;
  height: 9px;
  border-radius: 999px;
  background: rgba(30, 40, 165, .1);
  overflow: hidden;
}

.conf-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width .5s ease;
}

.conf-fill.good { background: #38a169; }
.conf-fill.warn { background: #f5a623; }
.conf-fill.bad { background: #f55a78; }

.conf-word { font-size: 12.5px; font-weight: 950; }
.conf-word.good { color: #1f7a49; }
.conf-word.warn { color: #8a5f00; }
.conf-word.bad { color: #bd3150; }

.column-review-toolbar[hidden] { display: none; }
.column-assessment-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.column-assessment-dot.good { background: #38a169; }
.column-assessment-dot.warn { background: #f5a623; }
.column-assessment-dot.bad { background: #bd3150; }
.column-decision-card.assessment-warn:not(.reviewed) { border-left: 4px solid #f5a623; }
.column-decision-card.assessment-bad:not(.reviewed) { border-left: 4px solid #bd3150; }
.column-group-title { font: inherit; font-weight: 800; margin: 20px 0 8px; }
.resolved-columns { border: 1px solid #b8d8c8; border-radius: 16px; padding: 16px; margin-top: 16px; }
.resolved-columns > summary { cursor: pointer; color: #176440; font-weight: 800; }
.resolved-columns > p { color: var(--bee-muted); font-size: 13px; }
.declared-mapping-group { border: 1px solid #dcc36f; border-radius: 16px; padding: 16px; margin: 16px 0; }
.declared-mapping-group > p { font-size: 13px; color: var(--bee-muted); }
.declared-mapping-row { border-top: 1px solid var(--bee-line); }
.declared-mapping-row > summary { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 4px; cursor: pointer; font-size: 13px; overflow-wrap: anywhere; }
.declared-mapping-row > summary strong { flex: 1 1 150px; }
.declared-mapping-row > summary span { flex: 2 1 220px; }
.declared-mapping-row > summary small { flex: 2 1 180px; color: var(--bee-muted); }
.declared-mapping-row > summary::before { content: '▸'; }
.declared-mapping-row[open] > summary::before { content: '▾'; }
.declared-confirm { margin-top: 14px; background: var(--bee-yellow); color: #17365f; border: 1px solid #b58300; }

.conf-advice {
  margin: 6px 0 0;
  color: var(--bee-muted);
  font-size: 12px;
  font-weight: 700;
}

.column-decision-actions .btn-accept {
  background: #167246;
  border-color: #0e5a36;
  color: #fff;
}

.column-decision-actions .btn-accept:hover {
  background: #1f7a49;
  border-color: #0e5a36;
}

.column-decision-actions .btn-accept.active {
  background: #0e5a36;
  color: #fff;
  border-color: #0e5a36;
  box-shadow: 0 6px 16px rgba(22, 114, 70, .3);
}

.btn-rec-tag {
  margin-left: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  font-style: normal;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.conf-advice-alert {
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(245, 90, 120, .1);
  color: #a52747;
  font-weight: 800;
}

@media (max-width: 760px) {
  .column-split { grid-template-columns: 1fr; }
  .column-yours { padding-right: 0; border-right: 0; padding-bottom: 12px; border-bottom: 1px solid rgba(30, 40, 165, .12); }
}

.column-decision-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.column-your-label {
  display: block;
  color: #8a93b8;
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.column-source-name {
  display: block;
  margin-top: 2px;
  color: var(--bee-blue);
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.column-decision-card header small.column-sample {
  display: block;
  margin-top: 5px;
  color: var(--bee-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.column-decision-card header b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 950;
}

.column-decision-card header b i {
  margin-left: 5px;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  opacity: .7;
}

.column-decision-card header b.good {
  background: rgba(56, 161, 105, .13);
  color: #1f7a49;
}

.column-decision-card header b.warn {
  background: rgba(250, 215, 65, .28);
  color: #8a5f00;
}

.column-decision-card header b.bad {
  background: rgba(245, 90, 120, .13);
  color: #bd3150;
}

.column-best {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(30, 40, 165, .055);
}

.column-best.no-match {
  background: rgba(245, 90, 120, .06);
}

.column-best .column-bee {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  font-size: 21px;
  box-shadow: inset 0 0 0 1px rgba(30, 40, 165, .1);
}

.column-best small {
  display: block;
  color: #6a739b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.column-best strong {
  display: block;
  margin-top: 2px;
  color: var(--bee-blue);
  font-size: 17px;
  font-weight: 950;
}

.column-best p {
  display: block;
  margin: 7px 0 0;
  color: var(--bee-muted);
  line-height: 1.5;
  font-size: 13px;
  font-weight: 650;
}

.column-best p.column-why {
  margin-top: 8px;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(250, 215, 65, .18);
  color: #6b5200;
  font-weight: 750;
}

.column-decided {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(56, 161, 105, .1);
  color: #1f7a49;
  font-size: 12.5px;
  font-weight: 850;
}

.column-decided .material-symbols-outlined {
  font-size: 17px;
}

.column-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.column-decision-actions button,
.column-suggestions button {
  border: 1px solid var(--bee-line);
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  color: var(--bee-blue);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.column-decision-actions button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.column-decision-actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 40, 165, .35);
  box-shadow: var(--shadow-2);
}

.column-decision-actions button .material-symbols-outlined {
  font-size: 17px;
}

.column-decision-actions button.active {
  background: var(--bee-yellow);
  color: #17365f;
  border-color: #b58300;
  box-shadow: 0 6px 16px rgba(181, 131, 0, .25);
}

.column-suggestions {
  margin-top: 12px;
}

.column-suggestions summary {
  cursor: pointer;
  color: var(--bee-blue);
  font-size: 13px;
  font-weight: 950;
}

.column-suggestions summary:hover {
  color: var(--bee-coral);
}

.column-suggestions > div {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.column-suggestions button {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(0, 1fr) minmax(90px, auto);
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  text-align: left;
}

.column-suggestions button:hover {
  border-color: rgba(30, 40, 165, .35);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.column-suggestions button em {
  color: var(--bee-muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-suggestions span {
  color: var(--bee-muted);
  font-weight: 950;
  text-align: right;
}

.column-next-move { padding: 16px; margin-bottom: 18px; border-radius: 14px; background: #fff8db; border: 1px solid #dfc576; }
.column-next-move > p { font-size: 13px; line-height: 1.5; margin: 8px 0; }
.column-prepared-name { font-weight: 850; }
.column-confirm-choice { border: 1px solid #b58300; background: var(--bee-yellow); color: #17365f; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 800; cursor: pointer; }
.column-confirm-choice.recommended { background: #167246; color: white; border-color: #0e5a36; }
.column-decision-actions .btn-review { background: #fff2bd; color: #654600; border-color: #c49a2b; }
.column-original-evidence { margin: 12px 0; }
.column-original-evidence > summary { cursor: pointer; color: #785300; font-size: 13px; font-weight: 800; }
.column-suggestions .column-choice small { display: block; color: var(--bee-muted); font-weight: 650; font-size: 12px; margin-top: 4px; }
.column-suggestions .column-choice { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(180px, 1.4fr) minmax(160px, 1fr); width: 100%; border-radius: 14px; gap: 12px; }
.column-suggestions [role="radiogroup"] { display: grid; gap: 8px; }
@media (max-width: 700px) {
  .column-suggestions .column-choice { grid-template-columns: 1fr; gap: 6px; }
  .column-suggestions .column-choice > span { text-align: left; }
}
.column-suggestions .column-choice em { white-space: normal; line-height: 1.45; }
.column-suggestions .column-choice.recommended { border-color: #167246; background: #f0faf4; }
.column-suggestions .column-choice.recommended > span { color: #176440; }
.column-suggestions .column-choice[aria-checked="true"] { border-width: 2px; border-color: #987017; background: #fff8db; }
.column-suggestions .column-choice.recommended[aria-checked="true"] { border-color: #167246; background: #e8f5ed; }
.column-confirm-choice:focus-visible, .column-choice:focus-visible { outline: 3px solid var(--bee-blue); outline-offset: 3px; }

.column-advanced {
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px dashed var(--bee-line);
  border-radius: 14px;
  background: rgba(30, 40, 165, .03);
}

.column-advanced label {
  display: block;
  margin-bottom: 7px;
  color: #6a739b;
  font-size: 11.5px;
  font-weight: 850;
}

.column-advanced-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.column-advanced-row input {
  flex: 1 1 160px;
  min-width: 0;
  border: 1px solid var(--bee-line);
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--bee-blue);
  font: 850 13px var(--public-font-data);
}

.column-advanced-row button {
  flex: none;
  border: 1px solid var(--bee-line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  color: var(--bee-blue);
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.column-advanced-row button.active {
  background: var(--bee-yellow);
  color: #17365f;
  border-color: #b58300;
}

.submission-summary {
  display: grid;
  gap: 16px;
}

.flow-help-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--bee-muted);
  line-height: 1.7;
  font-weight: 700;
}

.upload-panel,
.upload-card {
  padding: 22px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.wizard-steps article {
  border-radius: 18px;
  padding: 13px;
  background: rgba(30, 40, 165, .08);
  color: var(--bee-blue);
  font-size: 12px;
  font-weight: 900;
}

.wizard-steps b {
  display: block;
  color: var(--bee-coral);
  font-size: 20px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--bee-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.field > span {
  color: var(--bee-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--bee-line);
  border-radius: 18px;
  padding: 13px 14px;
  background: #fff;
  color: var(--bee-muted);
  outline: 0;
  font-weight: 700;
}

.field textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(30, 40, 165, .45);
  box-shadow: 0 0 0 4px rgba(30, 40, 165, .09);
}

.upload-database-page .provider-flow-hero .provider-hero-grid {
  padding: 38px 0 34px;
}

.upload-database-page .provider-flow-hero h1 {
  max-width: 720px;
  font-size: clamp(36px, 4.2vw, 56px);
}

.upload-database-page .provider-flow-hero .hero-lead {
  max-width: 720px;
}

.public-tool-upload-previous .provider-flow-hero .provider-hero-grid {
  padding: 64px 0 56px;
}

.public-tool-upload-previous .provider-flow-hero h1 {
  max-width: 820px;
  font-size: clamp(38px, 5vw, 66px);
}

.public-tool-upload-previous .provider-flow-hero .hero-lead {
  max-width: none;
}

.provider-owner {
  min-width: 0;
  margin: 8px 0 2px;
  border: 0;
  border-top: 1px solid var(--bee-line);
  padding: 24px 0 0;
}

.provider-owner > legend {
  float: left;
  width: 100%;
  margin: 0 0 7px;
  padding: 0;
  color: var(--bee-blue);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 900;
  letter-spacing: -.025em;
}

.provider-owner-lead {
  clear: both;
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--bee-muted);
  line-height: 1.55;
  font-weight: 650;
}

.provider-owner-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.provider-owner-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--bee-line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  color: var(--bee-muted);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.provider-owner-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding-right: 28px;
}

.provider-owner-option .licence-perms { margin: 0; }
.provider-owner-option .licence-example { margin-top: auto; }
.provider-owner-option.is-selected .licence-check { opacity: 1; transform: scale(1); }

.provider-owner-option:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 40, 165, .28);
}

.provider-owner-option.is-selected {
  border-color: rgba(30, 40, 165, .46);
  background: linear-gradient(145deg, rgba(30, 40, 165, .08), rgba(250, 215, 65, .13));
  box-shadow: 0 12px 28px rgba(20, 27, 107, .10);
}

.provider-owner-option:focus-within {
  outline: 3px solid rgba(30, 40, 165, .16);
  outline-offset: 2px;
}

.provider-owner-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.provider-owner-head > .material-symbols-outlined {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(30, 40, 165, .08);
  color: var(--bee-blue);
}

.provider-owner-option.is-selected .provider-owner-head > .material-symbols-outlined {
  background: var(--bee-yellow);
  color: var(--bee-blue-deep);
}

.provider-owner-option strong,
.provider-owner-option small {
  display: block;
}

.provider-owner-option strong {
  color: var(--bee-blue);
  font-size: 14px;
  font-weight: 900;
}

.provider-owner-option small {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

.provider-owner-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
  border: 1px solid rgba(30, 40, 165, .14);
  border-radius: 20px;
  padding: 17px;
  background: rgba(247, 248, 255, .82);
}

.provider-owner-panel[hidden] {
  display: none !important;
}

.provider-owner-panel > .material-symbols-outlined {
  color: #21804d;
}

.provider-owner-panel p {
  margin: 4px 0 0;
  color: var(--bee-muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
}

.provider-owner-panel-head {
  display: flex;
  grid-column: 1 / -1;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.provider-owner-panel-head strong {
  color: var(--bee-blue);
  font-size: 17px;
  font-weight: 900;
}

.provider-owner-panel-head a {
  color: var(--bee-blue);
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.provider-owner-select-grid,
.provider-request-inline-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.provider-owner-count {
  grid-column: 1 / -1;
  margin: 0 !important;
  font-size: 11px !important;
}

.provider-owner-empty {
  grid-column: 1 / -1;
  border-radius: 16px;
  padding: 14px;
  background: rgba(250, 215, 65, .16);
}

.provider-owner-empty[hidden] {
  display: none;
}

.provider-owner-empty .button {
  margin-top: 10px;
}

.provider-new-panel {
  grid-template-columns: 1fr;
  background: linear-gradient(145deg, rgba(251, 232, 223, .45), rgba(255, 255, 255, .96));
}

.provider-inline-details,
.provider-guidance {
  grid-column: 1 / -1;
  border: 1px solid var(--bee-line);
  border-radius: 16px;
  background: #fff;
}

.provider-inline-details summary,
.provider-guidance summary {
  padding: 13px 15px;
  color: var(--bee-blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.provider-inline-details[open] summary,
.provider-guidance[open] summary {
  border-bottom: 1px solid var(--bee-line);
}

.provider-inline-details .provider-request-inline-grid {
  padding: 14px;
}

.provider-owner-confirm {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--bee-muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.provider-owner-confirm input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.provider-request-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.provider-owner-status {
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

.provider-owner-status[data-tone="ok"] {
  color: #1f7a3f;
}

.provider-owner-status[data-tone="error"] {
  color: #a61b3d;
}

.provider-guidance {
  margin-top: 12px;
}

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

.provider-guidance-grid p {
  margin: 0;
  border-radius: 14px;
  padding: 12px;
  background: var(--bee-off);
}

.provider-guidance-grid strong,
.provider-guidance-grid span {
  display: block;
}

.provider-guidance-grid strong {
  color: var(--bee-blue);
  font-size: 13px;
  font-weight: 900;
}

.provider-guidance-grid span {
  margin-top: 4px;
  color: var(--bee-muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

.provider-owner .provider-request-list {
  padding: 14px;
}

.provider-owner .provider-request-item {
  box-shadow: none;
}

.drop-zone {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-top: 18px;
  padding: 26px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(251, 232, 223, .52), rgba(255, 255, 255, .94));
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.drop-zone.dragging,
.drop-zone:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 40, 165, .36);
  box-shadow: var(--shadow-2);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-zone span {
  color: var(--bee-blue);
  font-size: 46px;
}

.drop-zone strong {
  display: block;
  margin-top: 10px;
  color: var(--bee-blue);
  font-size: 22px;
  font-weight: 900;
}

.drop-zone small {
  display: block;
  margin-top: 8px;
  color: var(--bee-muted);
  font-weight: 700;
}

.preview-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  border: 1px solid var(--bee-line);
  border-radius: 22px;
  background: #fff;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  color: var(--bee-muted);
  font-size: 13px;
}

.preview-table th,
.preview-table td {
  border-bottom: 1px solid var(--bee-line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.preview-table th {
  position: sticky;
  top: 0;
  background: var(--bee-off);
  color: var(--bee-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.upload-summary {
  display: grid;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--bee-off);
  color: var(--bee-muted);
  font-weight: 750;
}

.summary-row strong {
  color: var(--bee-blue);
  text-align: right;
  overflow-wrap: anywhere;
}

.result-panel {
  display: none;
  margin-top: 18px;
  padding: 18px;
}

.result-panel.open {
  display: block;
}

.result-panel.success {
  border-color: rgba(56, 161, 105, .26);
  background: rgba(56, 161, 105, .08);
}

.result-panel.error {
  border-color: rgba(245, 90, 120, .30);
  background: rgba(245, 90, 120, .08);
}

.result-panel h3 {
  color: var(--bee-blue);
  font-size: 20px;
  font-weight: 900;
}

.result-panel p {
  color: var(--bee-muted);
  line-height: 1.55;
  font-weight: 650;
}

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

.muted-note {
  color: var(--bee-muted);
  line-height: 1.6;
  font-size: 13px;
  font-weight: 650;
}

.empty-block {
  border: 1px dashed rgba(30, 40, 165, .28);
  border-radius: 24px;
  padding: 20px;
  color: var(--bee-muted);
  background: rgba(255, 255, 255, .70);
  font-weight: 700;
}

@media (max-width: 980px) {
  .provider-hero-grid,
  .provider-grid,
  .upload-layout,
  .flow-layout,
  .provider-flow-hero .provider-hero-grid {
    grid-template-columns: 1fr;
  }

  .provider-sidebar,
  .flow-rail,
  .flow-preview-panel {
    position: static;
  }

  .flow-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-steps {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #authGate {
    grid-column: auto;
  }

  .flow-preview-panel {
    grid-column: auto;
  }

  .permission-grid,
  .journey-grid,
  .tool-grid,
  .flow-insight-grid,
  .quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .provider-hero-grid {
    padding: 46px 0;
  }

  .provider-console,
  .status-panel,
  .upload-panel,
  .upload-card {
    border-radius: 24px;
  }

  .permission-grid,
  .journey-grid,
  .tool-grid,
  .flow-insight-grid,
  .quality-grid,
  .form-grid,
  .wizard-steps {
    grid-template-columns: 1fr;
  }

  .flow-card {
    min-height: auto;
    padding: 20px;
  }

  .flow-rail,
  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-steps {
    gap: 8px;
  }

  .flow-steps li {
    padding: 9px;
  }

  .flow-mini-panel {
    grid-column: 1 / -1;
  }

  .flow-card-head {
    display: grid;
  }

  .column-match-list article {
    grid-template-columns: 1fr;
  }

  .provider-actions,
  .next-links {
    align-items: stretch;
  }

  .provider-actions .button,
  .next-links .button {
    width: 100%;
  }

  .provider-owner-options,
  .provider-owner-select-grid,
  .provider-request-inline-grid,
  .provider-guidance-grid {
    grid-template-columns: 1fr;
  }

  .provider-owner-panel-head {
    display: grid;
  }

  .provider-request-actions {
    align-items: stretch;
  }

  .provider-request-actions .button {
    width: 100%;
  }
}

/* ==========================================================================
   Botón de avance listo (upload-database): cuando un paso queda completo su
   botón Continuar se habilita — y desde ese instante late con halo miel para
   que nadie se quede sin saber cuál es el siguiente clic. Independiente del
   asistente opcional: lo ve todo el mundo.
   ========================================================================== */
.flow-actions .button[data-next]:not(:disabled),
.flow-actions #submitDataset:not(:disabled),
.public-tool-floating-next:not(.is-disabled):not([aria-disabled="true"]) {
  outline: 4px solid #fad741;
  outline-offset: 3px;
  animation: flowNextPulse 1.9s ease-in-out infinite;
}
@keyframes flowNextPulse {
  0% { box-shadow: 0 0 0 0 rgba(250, 215, 65, .7); outline-color: #fad741; }
  50% { outline-color: #f5a623; }
  70% { box-shadow: 0 0 0 18px rgba(250, 215, 65, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 215, 65, 0); outline-color: #fad741; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-actions .button.primary[data-next]:not(:disabled),
  .flow-actions #submitDataset:not(:disabled) {
    animation: none;
  }
}

/* ==========================================================================
   Selector de licencia por tarjetas didácticas (upload-database)
   ========================================================================== */
.licence-intro {
  margin: 4px 0 14px;
  color: #5a6086;
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 72ch;
}
.licence-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.licence-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 14px;
  border: 2px solid rgba(31, 36, 147, .14);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.licence-card:hover {
  border-color: rgba(31, 36, 147, .35);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(31, 36, 147, .1);
}
.licence-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.licence-card:focus-within {
  outline: 3px solid rgba(31, 36, 147, .3);
  outline-offset: 2px;
}
.licence-card.selected {
  border-color: #1f2493;
  background: linear-gradient(180deg, rgba(238, 242, 255, .7), #fff);
  box-shadow: 0 14px 34px rgba(31, 36, 147, .16);
}
.licence-badge {
  position: absolute;
  top: -11px;
  left: 14px;
  padding: 3px 11px;
  border-radius: 999px;
  background: #fad741;
  color: #1f2493;
  font-size: 10.5px;
  font-weight: 900;
}
.licence-head { display: grid; gap: 2px; padding-right: 30px; }
.licence-head b { font-size: 16px; color: #1f2493; }
.licence-head small { color: #5a6086; font-size: 12px; font-weight: 800; }
.licence-perms {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.licence-perms li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.45;
  color: #33406b;
  font-weight: 650;
}
.licence-perms li i {
  flex: none;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
  margin-top: 1px;
}
.licence-perms li[data-perm="yes"] i { background: rgba(22, 114, 70, .14); color: #167246; }
.licence-perms li[data-perm="ask"] i { background: rgba(196, 138, 0, .16); color: #8a5f00; }
.licence-perms li[data-perm="no"] i { background: rgba(195, 54, 88, .14); color: #b02a4c; }
.licence-example {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin: auto 0 0;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(250, 215, 65, .16);
  color: #4d3d29;
  font-size: 12px;
  line-height: 1.5;
  font-style: italic;
}
.licence-example .material-symbols-outlined { flex: none; font-size: 16px; color: #b58300; margin-top: 1px; }
.licence-check {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 24px;
  color: #1f2493;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .18s ease, transform .18s ease;
}
.licence-card.selected .licence-check { opacity: 1; transform: scale(1); }
.licence-card-pending { border-style: dashed; }

/* ===== Tres estados de tarjeta: reposo discreto → hover encendido =====
   En reposo las tarjetas se apagan un poco; al pasar el ratón cobran color,
   brillo y potencia — así se entiende al instante que son elegibles. */
.licence-card,
.provider-owner-option {
  opacity: .62;
  filter: saturate(.85);
}

.licence-card:hover,
.provider-owner-option:hover {
  opacity: 1;
  filter: saturate(1.08) brightness(1.02);
  border-color: rgba(30, 40, 165, .5);
  transform: translateY(-3px);
  box-shadow: 0 0 0 3px rgba(250, 215, 65, .35), 0 16px 34px rgba(15, 40, 78, .16);
}

.licence-card:focus-within,
.provider-owner-option:focus-within {
  opacity: 1;
  filter: none;
}

/* ===== Selección ROTUNDA en todas las familias de tarjetas =====
   Nada parece elegido al llegar; al elegir, la tarjeta se marca de forma
   inconfundible (anillo azul interior + halo miel + check grande) y sus
   hermanas se atenúan. El anillo va en box-shadow para que ninguna piel
   pueda pisarlo vía border-color. */
.licence-card.selected,
.provider-owner-option.is-selected {
  opacity: 1 !important;
  filter: none !important;
  background: linear-gradient(180deg, rgba(250, 215, 65, .30), rgba(250, 215, 65, .08) 55%, #fff) !important;
  box-shadow:
    inset 0 0 0 3px #1e28a5,
    0 0 0 4px rgba(250, 215, 65, .8),
    0 16px 36px rgba(20, 27, 107, .18) !important;
  transform: translateY(-3px);
}

.licence-card.selected .licence-check,
.provider-owner-option.is-selected .licence-check {
  opacity: 1;
  transform: scale(1.3);
  color: #167246;
  filter: drop-shadow(0 2px 6px rgba(22, 114, 70, .35));
}

.licence-cards:has(.licence-card.selected) .licence-card:not(.selected),
.provider-owner-options:has(.is-selected) .provider-owner-option:not(.is-selected) {
  opacity: .55;
  filter: saturate(.7);
}

.licence-cards:has(.licence-card.selected) .licence-card:not(.selected):hover,
.provider-owner-options:has(.is-selected) .provider-owner-option:not(.is-selected):hover {
  opacity: 1;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .licence-card.selected,
  .provider-owner-option.is-selected,
  .licence-card:hover,
  .provider-owner-option:hover {
    transform: none;
  }
}

/* Narrow screens must shrink cards rather than crop their contents. */
.licence-cards { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.licence-card, .provider-owner-option, .licence-head, .provider-owner-head > *,
.licence-perms li > span, .licence-example > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .provider-owner-options, .licence-cards { grid-template-columns: minmax(0, 1fr); }
  .licence-card, .provider-owner-option { padding: 14px; }
  .licence-badge { max-width: calc(100% - 28px); white-space: normal; }
}

/* The brand's broad '-card' rule also matches this grid container. */
body.upload-database-page .licence-cards { padding: 0 !important; border: 0; }
@media (max-width: 600px) {
  body.upload-database-page .flow-layout.container { width: 100%; padding-inline: 0; }
  body.upload-database-page .flow-card { padding: 16px !important; }
  body.upload-database-page .licence-card,
  body.upload-database-page .provider-owner-option { padding: 14px !important; }
}

body.upload-database-page .licence-card input[type="radio"] { width: 1px; height: 1px; margin: 0; }
