:root {
  --bg: #fbf7f9;
  --surface: #ffffff;
  --surface-2: #fdf6f9;
  --ink: #2d2329;
  --muted: #6f5a65;
  --field-line: #b39aa6;
  --line: #f0e3e9;
  --pink-50: #fff6fa;
  --pink-100: #ffe8f1;
  --pink-200: #fdd5e5;
  --pink-300: #f9b9d3;
  --pink-text: #a8326a;
  --green-bg: #dcf5e7;
  --green-text: #13663f;
  --amber-bg: #fff1d9;
  --amber-text: #8a5300;
  --grey-bg: #f2eef0;
  --grey-text: #75686f;
  --red-bg: #fde6e6;
  --red-text: #b0262f;
  --shadow: 0 1px 2px rgba(80, 30, 55, .04), 0 4px 16px rgba(80, 30, 55, .05);
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #161115;
  --surface: #201920;
  --surface-2: #261d25;
  --ink: #f6eaf0;
  --muted: #c4abb8;
  --field-line: #6d5566;
  --line: #3a2c36;
  --pink-50: #2a1f27;
  --pink-100: #3a2432;
  --pink-200: #4d2c40;
  --pink-300: #6b3958;
  --pink-text: #ffb6d4;
  --green-bg: #183a2a;
  --green-text: #7fe0ac;
  --amber-bg: #3a2c14;
  --amber-text: #f3c374;
  --grey-bg: #2d252b;
  --grey-text: #ad9fa6;
  --red-bg: #43201f;
  --red-text: #ff9a9a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .2);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: var(--pink-text);
}
:focus-visible {
  outline: 2px solid var(--pink-text);
  outline-offset: 2px;
}
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Barra superior */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
}
.brand i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--pink-200);
  color: var(--pink-text);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 15px;
}
.brand small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}
.nav button {
  border: 0;
  background: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav button[aria-current="page"] {
  background: var(--pink-100);
  color: var(--pink-text);
}
.nav svg {
  width: 18px;
  height: 18px;
}
.spacer {
  flex: 1;
}
.proto {
  font-size: 12px;
  font-weight: 700;
  color: var(--amber-text);
  background: var(--amber-bg);
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
.icon-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  flex: none;
}
@media (max-width: 760px) {
  /* backdrop-filter haría que la barra inferior fija se pegara a la cabecera. */
  .topbar {
    backdrop-filter: none;
    background: var(--surface);
  }
  .topbar .wrap {
    height: 56px;
  }
  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    z-index: 6;
  }
  .nav button {
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    padding: 6px 18px;
    flex: 1;
  }
  .proto {
    display: none;
  }
  .brand small {
    display: none;
  }
  main {
    padding-bottom: 90px;
  }
}

/* Botones */
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  transition: background .15s, border-color .15s;
}
.btn:hover {
  border-color: var(--pink-300);
}
.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.btn.pink {
  background: var(--pink-200);
  border-color: var(--pink-200);
  color: var(--pink-text);
}
.btn.pink:hover {
  background: var(--pink-300);
  border-color: var(--pink-300);
}
.btn.green {
  background: var(--green-bg);
  border-color: var(--green-bg);
  color: var(--green-text);
}
.btn.green:hover {
  filter: brightness(.97);
}
.btn.ghost-red:hover {
  border-color: var(--red-text);
  color: var(--red-text);
}
.btn.small {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 14px;
}
.btn.block {
  width: 100%;
}
.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--pink-text);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 14px;
  min-height: 36px;
}

/* Cabecera de vista */
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 14px;
  flex-wrap: wrap;
}
.view-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.view-head .sub {
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Indicadores */
.kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.kpi .n {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.kpi .l {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.kpi.hl {
  background: var(--pink-100);
  border-color: var(--pink-100);
}
.kpi.hl .n {
  color: var(--pink-text);
}
.kpi .bar {
  height: 5px;
  border-radius: 99px;
  background: var(--surface);
  margin-top: 8px;
  overflow: hidden;
}
.kpi .bar i {
  display: block;
  height: 100%;
  background: var(--pink-300);
}
@media (max-width: 760px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .kpi {
    padding: 10px 12px;
  }
  .kpi .n {
    font-size: 20px;
  }
  .kpi:first-child {
    grid-column: span 2;
  }
  .kpis.five .kpi:nth-child(n + 4) {
    display: none;
  }
}

/* Pestañas y filtros */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0 12px;
}
.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.tabs button {
  border: 0;
  background: none;
  padding: 10px 12px;
  border-radius: 9px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.tabs button[aria-selected="true"] {
  background: var(--pink-100);
  color: var(--pink-text);
}
.tabs .c {
  font-weight: 600;
  opacity: .75;
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}
.field {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--field-line);
  background: var(--surface);
  min-height: 40px;
}
.search {
  flex: 1 1 220px;
  min-width: 0;
}
select.field {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 600;
}
.chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 40px;
}
.chk input {
  accent-color: #e5739f;
  width: 17px;
  height: 17px;
  margin: 0;
}
@media (max-width: 760px) {
  select.field {
    flex: 1 1 140px;
  }
}

/* Tarjetas de llamada */
.list {
  display: grid;
  gap: 10px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  gap: 12px;
}
@media (min-width: 1000px) {
  .card {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.2fr) minmax(0, 1.35fr) minmax(0, 1.3fr);
    align-items: start;
    padding: 16px 18px;
  }
}
.card.done {
  background: var(--surface-2);
  box-shadow: none;
}
.card.done .main,
.card.done .reach {
  filter: grayscale(1);
  opacity: .55;
}
.name {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--grey-bg);
  color: var(--grey-text);
}
.chip.pink {
  background: var(--pink-100);
  color: var(--pink-text);
}
.chip.red {
  background: var(--red-bg);
  color: var(--red-text);
}
.chip.amber {
  background: var(--amber-bg);
  color: var(--amber-text);
}
details.more {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
details.more summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--pink-text);
  list-style: none;
}
details.more summary::-webkit-details-marker {
  display: none;
}
details.more summary::before {
  content: "▸ ";
}
details.more[open] summary::before {
  content: "▾ ";
}
details.more dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin: 8px 0;
}
details.more dt {
  font-weight: 700;
  color: var(--ink);
}
details.more dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--pink-200);
  color: var(--pink-text);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.call:hover {
  background: var(--pink-300);
}
.call svg {
  width: 18px;
  height: 18px;
}
.card.done .call {
  background: var(--grey-bg);
  color: var(--grey-text);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 700;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 99px;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status.open {
  background: var(--green-bg);
  color: var(--green-text);
}
.status.soon,
.status.maybe {
  background: var(--amber-bg);
  color: var(--amber-text);
}
.status.closed,
.status.unknown {
  background: var(--grey-bg);
  color: var(--grey-text);
}
.hours {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.hours b {
  color: var(--ink);
  font-weight: 700;
}
.hours .note {
  font-style: italic;
}
.add-phone {
  display: flex;
  gap: 6px;
}
.add-phone input {
  flex: 1;
  min-width: 0;
}

.actions {
  display: grid;
  gap: 8px;
}
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.result {
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}
.result.yes {
  background: var(--green-bg);
  color: var(--green-text);
}
.result.no {
  background: var(--grey-bg);
  color: var(--grey-text);
}
.result small {
  display: block;
  font-weight: 600;
  opacity: .9;
}
.tries {
  font-size: 13px;
  color: var(--amber-text);
  font-weight: 700;
}

.notes label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.notes textarea,
textarea.field {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  line-height: 1.4;
}
.saved {
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
  margin-top: 2px;
}
.section-title {
  margin: 22px 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  font-weight: 600;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty b {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 4px;
}

/* Seguimiento */
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
table.pipe {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pipe th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 800;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.pipe td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.pipe tbody tr {
  cursor: pointer;
}
.pipe tbody tr:hover {
  background: var(--pink-50);
}
.pipe tbody tr.lost {
  opacity: .55;
}
.pipe .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pipe tfoot td {
  font-weight: 800;
  background: var(--surface-2);
  border-bottom: 0;
}
.pipe .firm b {
  display: block;
}
.pipe .firm span {
  color: var(--muted);
  font-size: 13px;
}
.stage {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--pink-100);
  color: var(--pink-text);
  white-space: nowrap;
}
.stage.won {
  background: var(--green-bg);
  color: var(--green-text);
}
.stage.lost {
  background: var(--grey-bg);
  color: var(--grey-text);
}
.dots {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}
.dots i {
  width: 14px;
  height: 5px;
  border-radius: 99px;
  background: var(--line);
}
.dots i.on {
  background: var(--pink-300);
}
.won .dots i.on,
.dots.won i.on {
  background: #6cc79a;
}
.next {
  font-weight: 600;
}
.next small {
  display: block;
  color: var(--muted);
  font-weight: 600;
}
.next small.late {
  color: var(--red-text);
}
.saving.pos {
  color: var(--green-text);
  font-weight: 800;
}
@media (max-width: 760px) {
  .pipe thead {
    display: none;
  }
  .pipe,
  .pipe tbody,
  .pipe tr,
  .pipe td,
  .pipe tfoot {
    display: block;
    width: 100%;
  }
  .pipe tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .pipe td {
    border: 0;
    padding: 3px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  .pipe td.num {
    text-align: right;
  }
  .pipe td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
  }
  .pipe td.firm {
    display: block;
    margin-bottom: 4px;
  }
  .pipe tfoot td:empty {
    display: none;
  }
}

/* Diálogos y panel lateral */
dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(40, 10, 30, .25);
  width: min(640px, calc(100% - 24px));
  max-height: calc(100% - 24px);
}
dialog::backdrop {
  background: rgba(40, 20, 32, .35);
  backdrop-filter: blur(2px);
}
dialog.drawer {
  margin: 0 0 0 auto;
  height: 100%;
  max-height: 100%;
  width: min(620px, 100%);
  border-radius: 18px 0 0 18px;
}
@media (max-width: 760px) {
  dialog.drawer {
    border-radius: 0;
  }
}
.dlg {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
}
dialog {
  overflow: hidden;
}
dialog.drawer .dlg {
  height: 100dvh;
  max-height: 100dvh;
}
.dlg-head {
  padding: 18px 20px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.dlg-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}
.dlg-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.dlg-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  flex: 1;
}
.dlg-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.form-grid .full {
  grid-column: 1 / -1;
}
label.lbl {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
label.lbl .field {
  color: var(--ink);
  font-weight: 500;
  width: 100%;
}
.hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.error {
  background: var(--red-bg);
  color: var(--red-text);
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
}
.notice {
  background: var(--amber-bg);
  color: var(--amber-text);
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
}
.preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 12px 14px;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
  max-height: 340px;
  overflow-y: auto;
}
.preview .subj {
  font-weight: 800;
  margin-bottom: 8px;
  white-space: normal;
}
.preview mark {
  background: var(--pink-100);
  color: var(--pink-text);
  border-radius: 4px;
  padding: 0 2px;
}
.preview .foot {
  color: var(--muted);
  font-size: 12px;
}
.steps {
  display: grid;
  gap: 6px;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 700;
}
.step input {
  accent-color: #e5739f;
  width: 18px;
  height: 18px;
  margin: 0;
}
.step.on {
  background: var(--pink-50);
  border-color: var(--pink-200);
}
.step small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
}
.policies {
  display: grid;
  gap: 10px;
}
.policy {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.policy .c2 {
  grid-column: span 2;
}
.policy .c3 {
  grid-column: span 3;
}
.policy label.lbl {
  font-size: 12px;
}
.policy .field {
  padding: 7px 9px;
  min-height: 36px;
}
@media (max-width: 560px) {
  .policy {
    grid-template-columns: 1fr 1fr;
  }
  .policy .c2,
  .policy .c3 {
    grid-column: span 2;
  }
}
.totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.totals div {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 8px 10px;
}
.totals b {
  display: block;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.totals span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
h3.sec {
  margin: 4px 0 -4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, calc(100% + 60px));
  background: var(--ink);
  color: var(--bg);
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform .25s;
  z-index: 20;
  max-width: calc(100% - 32px);
  display: flex;
  gap: 14px;
  align-items: center;
}
.toast.show {
  transform: translate(-50%, 0);
}
.toast button {
  background: none;
  border: 0;
  color: var(--pink-300);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
@media (max-width: 760px) {
  .toast {
    bottom: 84px;
  }
}
footer.foot {
  margin: 26px 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

/* Aviso de prototipo en el móvil (en el portátil va en la barra de arriba). */
.proto-strip {
  display: none;
  margin: -6px 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--amber-text);
  background: var(--amber-bg);
  padding: 6px 10px;
  border-radius: 10px;
}
details.later {
  font-size: 14px;
}
details.later summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--pink-text);
  padding: 6px 0;
}
details.later form {
  margin-top: 6px;
}
details.more summary {
  padding: 6px 0;
}
.notes textarea,
textarea.field,
.add-phone .field {
  border-color: var(--field-line);
}
@media (max-width: 760px) {
  .proto-strip {
    display: block;
  }
  /* En el móvil las pestañas pasan a dos líneas en vez de esconderse. */
  .tabs {
    flex-wrap: wrap;
    overflow: visible;
  }
  .tabs button {
    flex: 1 1 auto;
  }
}

/* Acceso */
body.logged-out .nav,
body.logged-out .proto {
  display: none;
}
.login {
  max-width: 420px;
  margin: 48px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 14px;
}
.login h1 {
  margin: 0;
  font-size: 24px;
}
.login p {
  margin: 0;
  color: var(--muted);
}
.login-form {
  display: grid;
  gap: 12px;
}

/* Cabecera de Llamadas con dos botones */
.head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 560px) {
  .head-actions {
    width: 100%;
  }
  .head-actions .btn {
    flex: 1 1 auto;
  }
}

/* Buscar con ChatGPT */
textarea.prompt {
  font: 13px/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace;
  min-height: 220px;
}
.howto {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.imp-table {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.imp-table td ul {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 13px;
  color: var(--muted);
}
.imp-table tbody tr {
  cursor: default;
}
.imp-table tr.imp-skip {
  opacity: .8;
}
