.civi-import-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: auto;
  color: #172d47;
  background: rgba(8, 31, 57, .64);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.civi-import-review {
  width: min(1120px, 100%);
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(25, 69, 111, .18);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(3, 24, 45, .28), 0 3px 12px rgba(3, 24, 45, .12);
}

.civi-import-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 29px 34px 23px;
  border-bottom: 1px solid #e2e9f0;
  background: linear-gradient(135deg, #f8fbfe 0%, #fff 60%, #f0fbf8 100%);
}

.civi-import-kicker {
  display: block;
  margin-bottom: 7px;
  color: #176f65;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
}

.civi-import-head h1 {
  margin: 0;
  color: #123f70;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -.025em;
}

.civi-import-head p {
  max-width: 750px;
  margin: 9px 0 0;
  color: #5b6e82;
  font-size: 15px;
  line-height: 1.55;
}

.civi-import-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #cbd7e3;
  border-radius: 50%;
  color: #234865;
  background: rgba(255, 255, 255, .9);
  font-size: 28px;
  line-height: 38px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(14, 47, 77, .08);
}

.civi-import-file {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 18px 34px 0;
  padding: 14px 16px;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #f9fbfd;
  box-shadow: 0 5px 18px rgba(16, 57, 91, .055);
}

.civi-import-file > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  color: #fff;
  background: #123f70;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.civi-import-file div { min-width: 0; }
.civi-import-file b,
.civi-import-file small { display: block; }
.civi-import-file b {
  overflow: hidden;
  color: #173a5b;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.civi-import-file small {
  margin-top: 4px;
  color: #6a7c8e;
  font-size: 12px;
}

.civi-import-overlay .civi-confidence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.civi-import-overlay .civi-confidence i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px currentColor;
  opacity: .82;
}
.civi-import-overlay .civi-confidence.high { color: #177567; background: #e8f8f4; }
.civi-import-overlay .civi-confidence.review { color: #9a6416; background: #fff3dd; }

/* Los estados de importación pueden ser largos: nunca deben ensanchar ni salirse de una ficha. */
.civi-import-file > .civi-confidence {
  grid-column: 3;
  justify-self: end;
  min-width: 178px;
  max-width: none;
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.civi-import-file small,
.civi-import-pipeline small,
.civi-import-pipeline em,
.civi-import-honesty b,
.civi-import-honesty p,
.civi-import-message,
.civi-import-review > footer span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* El estado queda siempre a la derecha en escritorio, también cuando está pendiente. */
.civi-import-review.pending .civi-import-file {
  grid-template-columns: 54px minmax(0, 1fr) minmax(90px, auto);
}
.civi-import-review.pending .civi-import-file > .civi-confidence {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  min-width: 96px;
  max-width: none;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.civi-import-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr);
  gap: 22px;
  align-items: end;
  padding: 18px 34px 15px;
}
.civi-import-name label {
  color: #35536d;
  font-size: 12px;
  font-weight: 800;
}
.civi-import-name input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid #bfcfdd;
  border-radius: 10px;
  outline: none;
  color: #153b5e;
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}
.civi-import-name input:focus {
  border-color: #277968;
  box-shadow: 0 0 0 3px rgba(39, 121, 104, .13);
}
.civi-import-name > div {
  padding: 11px 14px;
  border-left: 3px solid #56cdb4;
  border-radius: 0 8px 8px 0;
  background: #f2faf8;
}
.civi-import-name small,
.civi-import-name b { display: block; }
.civi-import-name small { color: #628076; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.civi-import-name b { margin-top: 3px; color: #235b54; font-size: 12px; }

.civi-import-tabs {
  display: flex;
  gap: 4px;
  padding: 0 34px;
  overflow-x: auto;
  border-bottom: 1px solid #dce5ed;
}
.civi-import-tabs button {
  position: relative;
  flex: 0 0 auto;
  padding: 13px 13px 12px;
  border: 0;
  color: #617386;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.civi-import-tabs button::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.civi-import-tabs button.active { color: #123f70; }
.civi-import-tabs button.active::after { background: #45bfa6; }
.civi-import-tabs em {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin-left: 5px;
  border-radius: 7px;
  color: #516d87;
  background: #eaf0f5;
  font-size: 10px;
  font-style: normal;
}
.civi-import-tabs .active em { color: #fff; background: #123f70; }

.civi-import-panel {
  min-height: 250px;
  padding: 22px 34px 25px;
  overflow: auto;
  background: #fff;
}
.civi-import-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  gap: 19px;
}
.civi-import-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.civi-import-kpis article,
.civi-import-audit,
.civi-import-floor,
.civi-import-chapters article,
.civi-import-issues article {
  border: 1px solid #dce5ed;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(14, 50, 81, .055);
}
.civi-import-kpis article { padding: 15px 16px; }
.civi-import-kpis small { display: block; color: #708192; font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.civi-import-kpis b { display: block; margin: 3px 0 1px; color: #123f70; font-size: 26px; line-height: 1; }
.civi-import-kpis span { color: #65798b; font-size: 11px; }
.civi-import-audit { padding: 5px 17px; background: #f9fbfd; }
.civi-import-audit header,
.civi-import-audit > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 0;
  border-bottom: 1px solid #e0e8ef;
}
.civi-import-audit > div:last-child { border-bottom: 0; }
.civi-import-audit header div small,
.civi-import-audit header div b { display: block; }
.civi-import-audit header div small { color: #758697; font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.civi-import-audit header div b { margin-top: 2px; color: #173d60; font-size: 13px; }
.civi-import-audit > div span { color: #5f7487; font-size: 11px; }
.civi-import-audit > div b,
.civi-import-audit > div code { color: #173d60; font-size: 11px; font-weight: 800; }

.civi-import-structure { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.civi-import-floor { overflow: hidden; }
.civi-import-floor > header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(118px, auto);
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-bottom: 1px solid #dfe7ee;
  background: #f7fafc;
}
.civi-import-floor > header > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #fff;
  background: #123f70;
  font-size: 18px;
}
.civi-import-floor header b,
.civi-import-floor header small { display: block; }
.civi-import-floor > header .civi-confidence {
  min-width: 118px;
  justify-self: end;
}
.civi-import-floor header b { color: #193c5c; font-size: 13px; }
.civi-import-floor header small { margin-top: 2px; color: #718294; font-size: 10px; }
.civi-import-unit {
  display: grid;
  grid-template-columns: minmax(105px, .35fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8edf2;
}
.civi-import-unit:last-child { border-bottom: 0; }
.civi-import-unit b { color: #35536d; font-size: 11px; }
.civi-import-unit span { color: #687b8e; font-size: 10px; line-height: 1.45; }

.civi-import-chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.civi-import-chapters article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
}
.civi-import-chapters code {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border-radius: 8px;
  color: #123f70;
  background: #eaf1f7;
  font-size: 11px;
  font-weight: 900;
}
.civi-import-chapters div b,
.civi-import-chapters div small { display: block; }
.civi-import-chapters div b { color: #254761; font-size: 12px; }
.civi-import-chapters div small { margin-top: 2px; color: #718294; font-size: 10px; }

.civi-import-issues { display: grid; gap: 11px; }
.civi-import-issues article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  padding: 14px 16px;
}
.civi-import-issues article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #986116;
  background: #fff1d9;
  font-weight: 900;
}
.civi-import-issues article.source > span { color: #176f63; background: #e6f7f2; }
.civi-import-issues b { color: #284b67; font-size: 12px; }
.civi-import-issues p { margin: 4px 0 0; color: #64788b; font-size: 11px; line-height: 1.5; }

.civi-import-message {
  margin: 0 34px 13px;
  padding: 11px 14px;
  border-radius: 9px;
  color: #255c55;
  background: #ecf8f5;
  font-size: 12px;
  font-weight: 700;
}
.civi-import-message.error { color: #973b3b; background: #fff0f0; }
.civi-import-message[hidden] { display: none; }

.civi-import-review > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 34px;
  border-top: 1px solid #dce5ed;
  background: #f8fafc;
}
.civi-import-review > footer > div { display: flex; align-items: center; gap: 18px; }
.civi-import-review > footer span { color: #687b8e; font-size: 11px; }
.civi-import-review > footer .plain-button,
.civi-import-review > footer .main-action,
.civi-import-loading .plain-button {
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.civi-import-review > footer .plain-button,
.civi-import-loading .plain-button { border: 1px solid #bdcbd8; color: #2f4f6b; background: #fff; }
.civi-import-review > footer .main-action { border: 1px solid #123f70; color: #fff; background: #123f70; box-shadow: 0 6px 14px rgba(18, 63, 112, .18); }
.civi-import-review > footer .main-action:disabled { cursor: wait; opacity: .62; }

.civi-import-pipeline { display: grid; gap: 10px; padding: 22px 34px 9px; overflow: auto; }
.civi-import-pipeline article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid #dce5ed;
  border-radius: 12px;
  background: #fafcfd;
}
.civi-import-pipeline article > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #5d7287;
  background: #e9eff4;
  font-size: 12px;
  font-weight: 900;
}
.civi-import-pipeline article.done > span { color: #fff; background: #23917e; }
.civi-import-pipeline b,
.civi-import-pipeline small { display: block; }
.civi-import-pipeline b { color: #2b4d68; font-size: 12px; }
.civi-import-pipeline small { margin-top: 3px; color: #6e8193; font-size: 10px; }
.civi-import-pipeline em { max-width: 170px; color: #8a641d; font-size: 10px; font-style: normal; font-weight: 900; line-height: 1.3; text-align: right; }
.civi-import-pipeline .done em { color: #197464; }
.civi-import-honesty {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  margin: 11px 34px 22px;
  padding: 15px 17px;
  border: 1px solid #e7d5b0;
  border-radius: 12px;
  background: #fffaf0;
}
.civi-import-honesty > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #9a6416;
  background: #fff0d0;
  font-weight: 900;
}
.civi-import-honesty b { color: #5e4b2d; font-size: 12px; }
.civi-import-honesty p { margin: 4px 0 0; color: #79684e; font-size: 11px; line-height: 1.5; }

.civi-import-overlay.loading { background: rgba(7, 29, 53, .76); }
.civi-import-loading {
  width: min(520px, calc(100vw - 40px));
  padding: 45px 38px;
  box-sizing: border-box;
  border-radius: 20px;
  text-align: center;
  background: #fff;
  box-shadow: 0 30px 80px rgba(2, 20, 38, .32);
}
.civi-import-loading i {
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto 20px;
  border: 4px solid #dce8f1;
  border-top-color: #42bca4;
  border-radius: 50%;
  animation: civi-import-spin .8s linear infinite;
}
.civi-import-loading > span { color: #27796a; font-size: 11px; font-weight: 900; letter-spacing: .11em; }
.civi-import-loading h2 { margin: 8px 0 7px; color: #123f70; font-size: 22px; }
.civi-import-loading p { margin: 0 0 20px; color: #64788b; font-size: 13px; line-height: 1.5; }
.civi-import-loading.error > span { color: #9a4141; }
@keyframes civi-import-spin { to { transform: rotate(360deg); } }

.civi-import-toast {
  position: fixed;
  z-index: 10000;
  right: 24px;
  bottom: 24px;
  max-width: min(410px, calc(100vw - 48px));
  padding: 14px 17px;
  border-left: 4px solid #45c2a8;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(15px);
  color: #fff;
  background: #123f70;
  box-shadow: 0 14px 35px rgba(4, 30, 56, .25);
  transition: .25s ease;
}
.civi-import-toast.visible { opacity: 1; transform: translateY(0); }
.civi-import-toast b,
.civi-import-toast span { display: block; }
.civi-import-toast b { font-size: 13px; }
.civi-import-toast span { margin-top: 3px; color: #dbe8f3; font-size: 11px; }

.civimetra-unified-import {
  min-width: 178px;
  display: inline-grid !important;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  row-gap: 1px !important;
  align-items: center;
  align-content: center;
  justify-items: center;
  text-align: center;
  line-height: 1.1;
}

.civimetra-unified-import::after {
  content: "PDF · DWG · BC3 · .metra";
  grid-column: 1;
  color: #728398;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .04em;
  white-space: nowrap;
}

.civi-import-guide {
  width: min(790px, 100%);
  overflow: hidden;
  border: 1px solid rgba(25, 69, 111, .18);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(3, 24, 45, .28), 0 3px 12px rgba(3, 24, 45, .12);
}
.civi-import-guide > header {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 29px 32px 22px;
  border-bottom: 1px solid #e2e9f0;
  background: linear-gradient(135deg, #f8fbfe 0%, #fff 58%, #edf8f6 100%);
}
.civi-import-guide h1 { margin: 0; color: #123f70; font-size: clamp(23px, 3vw, 30px); line-height: 1.13; letter-spacing: -.025em; }
.civi-import-guide > header p { max-width: 640px; margin: 9px 0 0; color: #5b6e82; font-size: 14px; line-height: 1.5; }
.civi-import-guide-body { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 25px; align-items: center; padding: 25px 32px 19px; }
.civi-import-guide-plan { position: relative; aspect-ratio: 1.08; overflow: hidden; border: 2px solid #174979; border-radius: 7px; background: linear-gradient(90deg, rgba(61, 190, 164, .07) 1px, transparent 1px), linear-gradient(rgba(61, 190, 164, .07) 1px, transparent 1px), #fbfdff; background-size: 16px 16px; }
.civi-import-guide-plan::before, .civi-import-guide-plan::after { content: ""; position: absolute; background: #174979; }
.civi-import-guide-plan::before { top: 0; bottom: 0; left: 54%; width: 2px; }
.civi-import-guide-plan::after { top: 57%; right: 0; left: 0; height: 2px; }
.civi-import-guide-plan i { position: absolute; top: 57%; bottom: 0; left: 25%; width: 2px; background: #174979; }
.guide-room { position: absolute; z-index: 1; color: #244b6c; font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: .04em; }
.guide-room-a { top: 28%; left: 18%; }
.guide-room-b { top: 28%; right: 13%; }
.guide-room-c { bottom: 18%; left: 5%; }
.guide-room-d { right: 6%; bottom: 18%; }
.civi-import-guide-list { display: grid; gap: 12px; }
.civi-import-guide-list article { display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 11px; align-items: start; }
.civi-import-guide-list article > b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: #fff; background: #123f70; font-size: 12px; }
.civi-import-guide-list strong, .civi-import-guide-list span { display: block; }
.civi-import-guide-list strong { color: #234761; font-size: 13px; }
.civi-import-guide-list span { margin-top: 3px; color: #697d8f; font-size: 11px; line-height: 1.42; }
.civi-import-guide-note { margin: 0 32px 19px; padding: 11px 13px; border-left: 3px solid #55c9ae; border-radius: 0 8px 8px 0; color: #587185; background: #f1faf8; font-size: 11px; line-height: 1.45; }
.civi-import-guide-note b { color: #245a53; }
.civi-import-guide > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 32px; border-top: 1px solid #dce5ed; background: #f8fafc; }
.civi-import-guide .plain-button, .civi-import-guide .main-action { min-height: 41px; padding: 10px 17px; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.civi-import-guide .plain-button { border: 1px solid #bdcbd8; color: #2f4f6b; background: #fff; }
.civi-import-guide .main-action { border: 1px solid #123f70; color: #fff; background: #123f70; box-shadow: 0 6px 14px rgba(18, 63, 112, .18); }

.civimetra-unified-import.plan-locked { position: relative; }
.civimetra-unified-import.plan-locked::before { content: attr(data-plan-tooltip); position: absolute; z-index: 80; top: calc(100% + 10px); left: 50%; width: 220px; padding: 9px 11px; border-radius: 8px; transform: translate(-50%, -5px); color: #fff; background: #173f69; box-shadow: 0 10px 22px rgba(13,42,70,.22); font-size: 10px; font-weight: 750; line-height: 1.35; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.civimetra-unified-import.plan-locked:hover::before, .civimetra-unified-import.plan-locked:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }

.civi-plan-points { display: grid; gap: 7px; margin: 15px 0; padding: 0; list-style: none; }
.civi-plan-points li { position: relative; padding-left: 17px; color: #526d84; font-size: 11px; line-height: 1.35; }
.civi-plan-points li::before { content: "✓"; position: absolute; top: 0; left: 0; color: #23917e; font-weight: 900; }
.civi-plan-badge { display: inline-flex; align-items: center; width: fit-content; margin: 0 0 10px; padding: 5px 8px; border-radius: 999px; color: #176f63; background: #e7f7f3; font-size: 8px; font-weight: 900; letter-spacing: .07em; }
.account-plans .civi-plan-points { margin: 13px 0 15px; }
.account-plans article { position: relative; }

.civi-plan-required { width: min(590px, 100%); overflow: hidden; border: 1px solid rgba(25,69,111,.18); border-radius: 20px; background: #fff; box-shadow: 0 30px 80px rgba(3,24,45,.28); }
.civi-plan-required > header { padding: 29px 32px 22px; border-bottom: 1px solid #e2e9f0; background: linear-gradient(135deg,#f8fbfe,#fff 62%,#eef9f6); }
.civi-plan-required h1 { margin: 0; color: #123f70; font-size: 25px; line-height: 1.15; letter-spacing: -.02em; }
.civi-plan-required header p { margin: 9px 0 0; color: #5b6e82; font-size: 13px; line-height: 1.5; }
.civi-plan-required > section { display: grid; gap: 10px; padding: 22px 32px; }
.civi-plan-required > section > div { display: flex; gap: 10px; align-items: center; color: #47647b; font-size: 12px; }
.civi-plan-required > section b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #177567; background: #e8f8f4; font-size: 12px; }
.civi-plan-required > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 32px; border-top: 1px solid #dce5ed; background: #f8fafc; }
.civi-plan-required .plain-button, .civi-plan-required .main-action { min-height: 41px; padding: 10px 16px; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; text-decoration: none; }
.civi-plan-required .plain-button { border: 1px solid #bdcbd8; color: #2f4f6b; background: #fff; }
.civi-plan-required .main-action { border: 1px solid #123f70; color: #fff; background: #123f70; box-shadow: 0 6px 14px rgba(18,63,112,.18); }

.civi-account-form { display: grid; gap: 15px; }
.civi-account-form > section { padding: 21px; border: 1px solid #dce5ed; border-radius: 13px; background: #fff; box-shadow: 0 8px 22px rgba(47,85,127,.045); }
.civi-account-form section > header { display: block; margin-bottom: 16px; }
.civi-account-form section > header b, .civi-account-form section > header small { display: block; }
.civi-account-form section > header b { color: #26445e; font-size: 12px; }
.civi-account-form section > header small { margin-top: 4px; color: #7c8c9e; font-size: 9px; line-height: 1.45; }
.civi-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.civi-account-grid label, .civi-plan-request label { display: block; color: #52667b; font-size: 9px; font-weight: 850; }
.civi-account-grid input, .civi-plan-request input, .civi-plan-request select, .civi-plan-request textarea { box-sizing: border-box; display: block; width: 100%; height: 42px; margin-top: 6px; border: 1px solid #d2dde6; border-radius: 8px; outline: none; background: #fff; color: #263e55; padding: 0 11px; font: inherit; font-size: 11px; }
.civi-account-grid input:focus, .civi-plan-request input:focus, .civi-plan-request select:focus, .civi-plan-request textarea:focus { border-color: #2f557f; box-shadow: 0 0 0 3px rgba(47,85,127,.10); }
.civi-account-grid input:disabled { color: #8492a1; background: #f4f6f8; }
.civi-account-span { grid-column: 1 / -1; }
.civi-account-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 3px 2px; }
.civi-account-form > footer b, .civi-account-form > footer small { display: block; }
.civi-account-form > footer b { color: #24576c; font-size: 10px; }
.civi-account-form > footer small { max-width: 440px; margin-top: 4px; color: #7c8b9b; font-size: 8px; line-height: 1.45; }
.civi-account-feedback { min-height: 16px; margin: 0; color: #237c65; font-size: 9px; font-weight: 800; }
.civi-account-feedback.error { color: #b94152; }
.civi-account-plans article > button { display: inline-block; margin-top: 17px; border: 0; border-radius: 7px; background: #2f557f; color: #fff; padding: 9px 11px; font-size: 8px; font-weight: 850; cursor: pointer; }
.civi-billing-notice { margin-top: 14px; padding: 17px 19px; border: 1px solid #cfe3e1; border-radius: 11px; background: #f2fbf8; }
.civi-billing-notice b { color: #24635d; font-size: 10px; }
.civi-billing-notice p { margin: 6px 0 0; color: #587681; font-size: 9px; line-height: 1.5; }
.civi-overview-profile { position: relative; }
.civi-overview-profile b { font-size: 19px !important; }
.civi-plan-request { max-width: 610px; }
.civi-plan-request form > section { display: grid; gap: 14px; padding: 22px 32px; }
.civi-plan-request textarea { height: 88px; padding: 10px 11px; resize: vertical; }
.civi-plan-request label > small { color: #8a98a6; font-size: 8px; font-weight: 600; }
.civi-plan-request .civi-request-consent { display: flex; gap: 9px; align-items: flex-start; color: #607286; font-size: 10px; font-weight: 600; line-height: 1.45; }
.civi-plan-request .civi-request-consent input { width: 15px; height: 15px; flex: 0 0 15px; margin: 1px 0 0; accent-color: #2f557f; }
.civi-admin-plan-requests { padding: 18px; border: 1px solid #dce3e9; border-radius: 12px; background: #fff; }
.civi-admin-plan-requests > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.civi-admin-plan-requests > header b { font-size: 10px; }
.civi-admin-plan-requests > header span { color: #2f557f; font-size: 8px; font-weight: 850; }
.civi-admin-plan-requests article { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-top: 1px solid #e4e9ed; }
.civi-admin-plan-requests article b, .civi-admin-plan-requests article small { display: block; }
.civi-admin-plan-requests article b { color: #31485e; font-size: 8px; }
.civi-admin-plan-requests article small { margin-top: 4px; color: #8492a2; font-size: 7px; }
.civi-admin-plan-requests article em { align-self: start; padding: 4px 6px; border-radius: 7px; color: #266f64; background: #e8f6f1; font-size: 6px; font-style: normal; font-weight: 850; }
.civi-admin-plan-requests article p { grid-column: 1 / -1; margin: 0; color: #65768a; font-size: 8px; line-height: 1.45; }
.civi-admin-plan-requests article footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.civi-admin-plan-requests article footer button { border: 0; border-radius: 6px; background: #2f557f; color: #fff; padding: 6px 8px; font-size: 7px; font-weight: 850; cursor: pointer; }
.civi-admin-plan-requests article footer button.secondary { color: #526a80; background: #edf2f6; }

@media (max-width: 900px) {
  .civi-import-overlay { padding: 14px; }
  .civi-import-review { max-height: calc(100vh - 28px); }
  .civi-import-summary { grid-template-columns: 1fr; }
  .civi-import-structure,
  .civi-import-chapters { grid-template-columns: 1fr; }
  .civi-import-review > footer > div { align-items: flex-end; flex-direction: column; gap: 7px; }
  .civi-import-guide { width: min(790px, 100%); }
}

@media (max-width: 650px) {
  .civi-import-overlay { padding: 0; place-items: stretch; }
  .civi-import-review { width: 100%; min-height: 100vh; max-height: none; border: 0; border-radius: 0; }
  .civi-import-head { padding: 22px 18px 18px; }
  .civi-import-head p { font-size: 13px; }
  .civi-import-file { grid-template-columns: 46px minmax(0, 1fr); margin: 13px 18px 0; padding: 11px; }
  .civi-import-file > span { width: 46px; height: 46px; }
  .civi-import-overlay .civi-import-file .civi-confidence { grid-column: 1 / -1; justify-self: start; }
  .civi-import-review.pending .civi-import-file > .civi-confidence { grid-column: 1 / -1; }
  .civi-import-name { grid-template-columns: 1fr; gap: 11px; padding: 15px 18px; }
  .civi-import-tabs { padding: 0 13px; }
  .civi-import-panel { padding: 17px 18px; }
  .civi-import-kpis { grid-template-columns: 1fr 1fr; }
  .civi-import-kpis article { padding: 12px; }
  .civi-import-kpis b { font-size: 22px; }
  .civi-import-review > footer { align-items: stretch; flex-direction: column-reverse; padding: 14px 18px; }
  .civi-import-review > footer > div { align-items: stretch; }
  .civi-import-review > footer .plain-button,
  .civi-import-review > footer .main-action { width: 100%; }
  .civi-import-pipeline { padding: 18px 18px 8px; }
  .civi-import-pipeline article { grid-template-columns: 36px minmax(0, 1fr); }
  .civi-import-pipeline em { grid-column: 2; max-width: 100%; text-align: left; }
  .civi-import-honesty { margin: 10px 18px 18px; }
  .civi-import-guide > header { padding: 22px 18px 18px; }
  .civi-import-guide > header p { font-size: 13px; }
  .civi-import-guide-body { grid-template-columns: 1fr; gap: 18px; padding: 19px 18px 14px; }
  .civi-import-guide-plan { width: min(245px, 100%); justify-self: center; }
  .civi-import-guide-note { margin: 0 18px 17px; }
  .civi-import-guide > footer { padding: 13px 18px; }
  .civi-plan-required > header { padding: 22px 18px 18px; }
  .civi-plan-required > section { padding: 19px 18px; }
  .civi-plan-required > footer { padding: 13px 18px; }
  .civi-account-grid { grid-template-columns: 1fr; }
  .civi-account-span { grid-column: auto; }
  .civi-account-form > footer { align-items: flex-start; flex-direction: column; }
  .civi-plan-request form > section { padding: 19px 18px; }
}

/* Solicitudes de acceso y plan: cuadro y acciones siempre centrados. */
.civi-import-overlay .civi-plan-required {
  width: min(610px, calc(100vw - 56px));
  max-width: 610px;
  max-height: calc(100vh - 56px);
  margin: auto;
  justify-self: center;
  align-self: center;
  min-width: 0;
}

.civi-plan-request {
  display: flex;
  flex-direction: column;
}

.civi-plan-request form {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.civi-plan-request form > section {
  min-width: 0;
}

.civi-plan-required form > footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-top: 1px solid #dce5ed;
  background: #f8fafc;
}

.civi-plan-required form > footer .plain-button,
.civi-plan-required form > footer .main-action {
  min-width: 142px;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 650px) {
  .civi-import-overlay:has(.civi-plan-required) {
    display: grid;
    place-items: center;
    padding: 14px;
  }

  .civi-import-overlay .civi-plan-required {
    width: min(610px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    min-height: 0;
    border-radius: 16px;
  }

  .civi-plan-required form > footer {
    padding: 13px 18px;
  }

  .civi-plan-required form > footer .plain-button,
  .civi-plan-required form > footer .main-action {
    min-width: 0;
    flex: 1 1 0;
  }
}
.civi-import-progress{margin:0 28px 18px;padding:13px 15px;border:1px solid #d7e5ee;border-radius:11px;background:#f7fbfd}.civi-import-progress>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#315a7d}.civi-import-progress b{font-size:12px}.civi-import-progress small{font-size:11px;font-weight:850}.civi-import-progress>span{display:block;height:8px;margin-top:9px;overflow:hidden;border-radius:999px;background:#dfeaf1}.civi-import-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2f7fb5,#35b595);transition:width .35s ease}@media(max-width:650px){.civi-import-progress{margin:0 18px 14px}}
