/* ==========================================================================
   Zona privada de tarifas (/tarifas) — comerciales
   Hoja propia: no carga styles.css de la web pública.

   Dos temas, según la marca que se está viendo (clase en <body>):
   - .tf--efitaller → claro, verde #c2d500, Figtree + JetBrains Mono
   - .tf--fcar      → oscuro #0B0B0D, rojo #E4000E, Sora + IBM Plex Mono,
                      con el motivo de ondas de radar de FCAR
   Todos los colores salen de las variables de :root; el tema FCAR solo
   las redefine. Si añades una regla, usa variables, no colores sueltos.
   ========================================================================== */

:root {
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --bg: #f4f7f0;
  --surface: #ffffff;        /* tarjetas */
  --surface-2: #f4f7f0;      /* campos, chips apagados */
  --surface-3: #eceee8;      /* cabecera de tabla */
  --zebra: #f8faf5;
  --ink: #1f1f1f;
  --ink-soft: #4a4a4a;
  --muted: #6b6b6b;
  --line: #e2e5dc;
  --line-soft: #eef1ea;

  --top-bg: #1f1f1f;
  --top-ink: #ffffff;
  --top-line: rgba(255,255,255,.14);

  --accent: #c2d500;
  --accent-2: #d2e62d;
  --accent-soft: rgba(194, 213, 0, .16);
  --accent-ink: #1f1f1f;     /* texto sobre el acento */
  --accent-text: #5b6400;    /* acento legible sobre la tarjeta */

  --sheet-bg: #1f1f1f;   --sheet-ink: #ffffff;
  --section-bg: #c2d500; --section-ink: #1f1f1f;
  --block-bg: #2a2a2a;   --block-ink: #ffffff;

  --fav: #e0a100;
  --fav-soft: #fff4d0;
  --fav-ink: #6a4c00;
  --err: #b3261e;

  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(15,15,17,.05), 0 8px 24px -14px rgba(15,15,17,.18);
  --top-h: 60px;
  --max: 1320px;
  color-scheme: light;
}

/* ---------- Tema FCAR ---------- */
.tf--fcar {
  --font: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --bg: #0b0b0d;
  --surface: #141417;
  --surface-2: #1a1a1e;
  --surface-3: #1f1f24;
  --zebra: #17171b;
  --ink: #ffffff;
  --ink-soft: #cbcdd3;
  --muted: #8b8e96;
  --line: #33333a;
  --line-soft: #242429;

  --top-bg: #000000;
  --top-ink: #ffffff;
  --top-line: rgba(255,255,255,.16);

  --accent: #e4000e;
  --accent-2: #ff2a38;
  --accent-soft: rgba(228, 0, 14, .16);
  --accent-ink: #ffffff;
  --accent-text: #ff4d58;

  --sheet-bg: transparent; --sheet-ink: #ffffff;
  --section-bg: #e4000e;   --section-ink: #ffffff;
  --block-bg: #1f1f24;     --block-ink: #cbcdd3;

  --fav: #ffb020;
  --fav-soft: rgba(255, 176, 32, .14);
  --fav-ink: #ffc85a;

  --shadow: 0 0 0 1px #242429, 0 18px 40px -24px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.tf {
  margin: 0;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
.tf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barra superior ---------- */
.tf-top {
  position: sticky; top: 0; z-index: 30;
  background: var(--top-bg);
  color: var(--top-ink);
  height: var(--top-h);
}
.tf--fcar .tf-top { border-bottom: 1px solid var(--line-soft); }
.tf-top__inner {
  max-width: var(--max); height: 100%;
  margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.tf-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.tf-brand img { height: 28px; width: auto; display: block; }
.tf-brand img.tf-brand__fcar { height: 34px; }
.tf-brand__area {
  font-weight: 700; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent);
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.tf-top__right { display: flex; align-items: center; gap: 8px; }

.tf-menu { position: relative; }
.tf-menu > summary {
  list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--top-line);
  color: var(--top-ink); cursor: pointer; user-select: none;
  transition: background .15s ease, border-color .15s ease;
}
.tf-menu > summary::-webkit-details-marker { display: none; }
.tf-menu > summary:hover, .tf-menu[open] > summary { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
.tf-menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px; padding: 6px;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r); box-shadow: 0 18px 40px -16px rgba(0,0,0,.45), 0 0 0 1px var(--line);
  display: flex; flex-direction: column;
}
.tf-menu__panel a, .tf-menu__panel button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; border: 0; background: none; text-align: left;
  border-radius: 8px; text-decoration: none; font-size: .92rem;
}
.tf-menu__panel a:hover, .tf-menu__panel button:hover { background: var(--surface-2); }
.tf-menu__panel a.is-active { background: var(--accent-soft); font-weight: 700; }
.tf-menu__panel form { margin: 0; }
.tf-menu__email { display: block; padding: 8px 10px 10px; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; word-break: break-all; }
.tf-lang__code { font: 500 .78rem var(--mono); letter-spacing: .04em; min-width: 22px; }
.tf-menu__panel .tf-lang__code { color: var(--muted); }
.tf-user__avatar {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .8rem;
}
.tf-user__name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }

/* ---------- Contenido ---------- */
.tf-main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 24px 20px 56px; }
.tf-foot {
  max-width: var(--max); width: 100%; margin: 0 auto; padding: 18px 20px 28px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line);
}

.tf-eyebrow { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 4px; }
.tf-h1 { margin: 0; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.tf-h1 span { color: var(--muted); font-weight: 600; }
.tf-meta { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.tf-note { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r); font-size: .88rem; }
.tf-note--admin { background: var(--fav-soft); border: 1px solid var(--fav); color: var(--fav-ink); }

/* Cabecera: marca → banderas → canal → título → herramientas → pestañas */
.tf-head {
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 20px 20px 0; margin-bottom: 14px;
}
.tf-head > * { position: relative; }
/* Firma de FCAR: ondas concéntricas de radar, en rojo muy tenue */
.tf--fcar .tf-head::before {
  content: ""; position: absolute; right: -180px; top: -220px;
  width: 620px; height: 620px; pointer-events: none;
  background: repeating-radial-gradient(circle, rgba(228,0,14,.10) 0 1px, transparent 1px 38px);
  -webkit-mask-image: radial-gradient(circle, #000 0 45%, transparent 70%);
          mask-image: radial-gradient(circle, #000 0 45%, transparent 70%);
}
.tf-head__title { margin: 4px 0 16px; }

/* Selector de marca: cada opción lleva su propio fondo de marca */
.tf-brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; max-width: 520px; }
.tf-brand-opt {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 64px; padding: 0 18px; border-radius: 14px;
  text-decoration: none;
  border: 2px solid transparent;
  opacity: .72;
  transition: opacity .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.tf-brand-opt:hover { opacity: 1; transform: translateY(-1px); }
.tf-brand-opt.is-active { opacity: 1; transform: none; }
.tf-brand-opt img { height: 30px; width: auto; display: block; }
.tf-brand-opt--efitaller { background: #ffffff; border-color: #e2e5dc; }
.tf-brand-opt--efitaller.is-active { border-color: #c2d500; box-shadow: 0 0 0 4px rgba(194,213,0,.22); }
.tf-brand-opt--fcar { background: #0b0b0d; border-color: #242429; }
.tf-brand-opt--fcar img { height: 38px; }
.tf-brand-opt--fcar.is-active { border-color: #e4000e; box-shadow: 0 0 0 4px rgba(228,0,14,.22); }
.tf-brand-opt.is-active::after {
  content: ""; position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
}
.tf-brand-opt--efitaller.is-active::after { color: #c2d500; }
.tf-brand-opt--fcar.is-active::after { color: #e4000e; }

/* Banderas: un país = una tarifa (o varias, ver canales) */
.tf-flags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tf-flag {
  display: inline-flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 14px 0 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-soft); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.tf-flag:hover { border-color: var(--ink-soft); color: var(--ink); }
.tf-flag .flag { border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.tf-flag.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

/* Canales del país (España: Distribuidor · CEAPI · BAPT) */
.tf-channels { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.tf-channel {
  padding: 7px 12px; border-radius: 9px;
  font-weight: 700; font-size: .85rem; color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.tf-channel small { font-weight: 500; opacity: .75; }
.tf-channel:hover { color: var(--ink); }
.tf-channel.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 0 0 1px var(--line); }

.tf-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.tf-search {
  flex: 1 1 320px; position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 12px 0 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--muted);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.tf-search:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tf-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 1rem; color: var(--ink); }
.tf-search input::placeholder { color: var(--muted); }
.tf-search input::-webkit-search-cancel-button { cursor: pointer; }
.tf-kbd { font: 500 .72rem var(--mono); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }

.tf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid transparent; font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.tf-btn:active { transform: translateY(1px); }
.tf-btn--primary { background: var(--accent); color: var(--accent-ink); }
.tf-btn--primary:hover { background: var(--accent-2); }
.tf-btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink-soft); }
.tf-btn--ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.tf-btn--block { width: 100%; }

.tf-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); font-weight: 700; font-size: .95rem;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.tf-chip:hover { border-color: var(--ink-soft); color: var(--ink); }
.tf-chip--fav svg { color: var(--muted); transition: color .15s ease; }
.tf-chip--fav[aria-pressed="true"] { background: var(--fav-soft); border-color: var(--fav); color: var(--fav-ink); }
.tf-chip--fav[aria-pressed="true"] svg, .tf-chip--fav:hover svg { color: var(--fav); }
.tf-chip__n { font: 500 .78rem var(--mono); background: var(--surface-2); padding: 1px 7px; border-radius: 20px; }

/* Pestañas: como las del Excel, abajo de la tarjeta */
.tf-tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin;
  margin: 0 -20px; padding: 0 20px; border-top: 1px solid var(--line-soft);
}
.tf-tab {
  flex: none; position: relative;
  padding: 13px 14px; border: 0; background: none;
  font-weight: 700; font-size: .84rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.tf-tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.tf-tab:hover { color: var(--ink); }
.tf-tab.is-active { color: var(--ink); }
.tf-tab.is-active::after { background: var(--accent); }

.tf-count { display: flex; align-items: center; gap: 12px; margin: 0 4px 14px; font-size: .85rem; color: var(--muted); }
.tf-link { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

/* ---------- Hoja ---------- */
.tf-sheet { margin-bottom: 28px; }
.tf-sheet__title {
  display: inline-block; margin: 0 0 12px;
  font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  background: var(--sheet-bg); color: var(--sheet-ink); padding: 6px 12px; border-radius: 8px;
}
.tf--fcar .tf-sheet__title { padding-left: 0; }
.tf--fcar .tf-sheet__title::before { content: ""; display: inline-block; width: 18px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--accent); }
.tf-section {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 16px;
}
.tf-section__title {
  margin: 0; padding: 14px 18px;
  background: var(--section-bg); color: var(--section-ink);
  font-size: 1rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
}
.tf-block + .tf-block { border-top: 1px solid var(--line); }
.tf-block__title {
  margin: 0; padding: 10px 18px;
  background: var(--block-bg); color: var(--block-ink);
  font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

.tf-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tf-table th {
  position: sticky; top: var(--top-h); z-index: 2;
  background: var(--surface-3); color: var(--ink-soft);
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tf-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tf-table tbody tr:nth-child(even) td { background: var(--zebra); }
.tf-table tbody tr:hover td { background: var(--accent-soft); }
.tf-table tbody tr:last-child td { border-bottom: 0; }
.tf-table tbody tr.is-fav td:first-child { box-shadow: inset 3px 0 0 var(--fav); }

.tf-c-fav { width: 44px; padding-left: 10px !important; padding-right: 0 !important; }
/* Anchos fijos de código, modelo y precios: así la descripción empieza en el mismo
   sitio en todas las tablas y no baila al buscar o filtrar (09/11/2026). Si un texto
   no cabe, la columna crece igual que antes. */
.tf-c-code { width: 120px; white-space: nowrap; }
.tf-c-model { font-weight: 700; width: 240px; }
.tf-c-desc { color: var(--ink-soft); min-width: 220px; }
.tf-c-price { text-align: right !important; white-space: nowrap; font-family: var(--mono); font-size: .88rem; font-variant-numeric: tabular-nums; width: 112px; }
@media screen and (max-width: 1300px) { .tf-c-model { width: 170px; } .tf-c-desc { min-width: 160px; } }
@media screen and (max-width: 1100px) { .tf-c-model { width: 130px; } .tf-c-desc { min-width: 140px; } }
.tf-table th.tf-c-price { font-family: var(--font); }
/* IBM Plex Mono tacha el cero y en un precio parece un importe tachado: en FCAR, cifras en Sora */
.tf--fcar .tf-c-price { font-family: var(--font); font-size: .9rem; }
td.tf-t-pvr, td.tf-t-pvt { font-weight: 700; color: var(--ink); }
td.tf-t-neto { color: var(--accent-text); font-weight: 700; }
td.tf-c-price[title] { text-decoration: underline dotted var(--muted); text-underline-offset: 4px; cursor: help; }

.tf-star {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: none; color: var(--line);
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
.tf--efitaller .tf-star { color: #c9cbc4; }
.tf-star svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.tf-star:hover { color: var(--fav); background: var(--fav-soft); }
.tf-star[aria-pressed="true"] { color: var(--fav); }
.tf-star[aria-pressed="true"] svg { fill: currentColor; }
.tf-star.is-pop { transform: scale(1.25); }

.tf-code {
  border: 0; background: none; padding: 2px 6px; margin: -2px -6px;
  font: 500 .82rem var(--mono); color: var(--ink-soft); border-radius: 6px;
}
.tf-code:hover { background: var(--surface-3); color: var(--ink); }
.tf-code.is-copied { background: var(--accent); color: var(--accent-ink); }

.tf-untr {
  display: inline-block; margin-left: 6px; vertical-align: 1px;
  font: 500 .66rem var(--mono); padding: 1px 5px; border-radius: 4px;
  background: var(--line-soft); color: var(--muted); cursor: help;
}

/* Estados vacíos */
.tf-empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.tf-empty h1 { color: var(--ink); margin: 0 0 8px; }
.tf-empty--inline { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 40px 20px; }
.tf-empty p { margin: 0 auto; max-width: 460px; }

/* ---------- Acceso ---------- */
.tf-auth { display: grid; place-items: center; padding: 6vh 0; }
.tf-auth__card {
  width: 100%; max-width: 420px;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 32px 28px;
}
.tf-auth__title { margin: 0 0 8px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.tf-auth__intro { margin: 0 0 22px; color: var(--ink-soft); }
.tf-auth__alt { display: inline-block; margin-top: 18px; font-size: .9rem; }
/* «¿Aún no eres distribuidor?» bajo el formulario de acceso */
.tf-join { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.tf-join__title { margin: 0 0 4px; font-weight: 800; }
.tf-join__text { margin: 0 0 14px; color: var(--ink-soft); font-size: .92rem; }
.tf-form { display: grid; gap: 14px; }
.tf-field { display: grid; gap: 6px; }
.tf-field span { font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.tf-field input {
  height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tf-field input:focus { outline: 0; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Ojo de los campos de contraseña (assets/js/tarifas.js) */
.tf .tf-pw { position: relative; display: block; font: inherit; color: inherit; }
.tf .tf-pw input { width: 100%; padding-right: 50px; }
.tf .tf-pw input::-ms-reveal { display: none; }
.tf .tf-pw__btn { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: calc(var(--r) - 2px); background: transparent; color: var(--muted); cursor: pointer; }
.tf .tf-pw__btn:hover { color: var(--ink); }
.tf .tf-pw__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--ink); }
.tf .tf-pw__btn[aria-pressed="true"] { color: var(--ink); }

/* ---------- Aviso flotante ---------- */
.tf-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: var(--r);
  background: #1f1f1f; color: #fff; font-weight: 600; font-size: .92rem;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.45);
  animation: tf-toast-in .25s ease-out both, tf-toast-out .3s ease-in 6s forwards;
}
.tf-toast--error { background: var(--err); }
.tf-toast--success { border-left: 4px solid var(--accent); }
@keyframes tf-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes tf-toast-out { to { opacity: 0; transform: translate(-50%, 8px); visibility: hidden; } }

/* ---------- v2: ver como distribuidor, cambios, condiciones, fichas ---------- */
.tf-imp { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tf-imp form { margin: 0; }
.tf-imp .tf-link { color: inherit; }

.tf-changes {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 0 0 14px; padding: 10px 14px;
  border: 1px solid var(--accent); border-radius: var(--r);
  background: var(--accent-soft); font-size: .9rem; color: var(--ink);
}
.tf-changes__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.tf-changes .tf-chip { margin-left: auto; flex: none; }
.tf-chip--changes[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.tf-conditions { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); font-size: .9rem; }
.tf-conditions > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; color: var(--ink-soft); list-style: none; display: flex; align-items: center; gap: 8px; }
.tf-conditions > summary::-webkit-details-marker { display: none; }
.tf-conditions > summary::before { content: "›"; display: inline-block; font-size: 1.2em; line-height: 1; transition: transform .15s ease; color: var(--accent-text); }
.tf-conditions[open] > summary::before { transform: rotate(90deg); }
.tf-conditions__body { padding: 0 14px 12px 32px; color: var(--ink-soft); line-height: 1.55; }

.tf-sheetlink {
  display: inline-block; margin-left: 6px; vertical-align: 1px;
  font: 600 .72rem var(--font); letter-spacing: .02em; white-space: nowrap;
  color: var(--accent-text); text-decoration: none;
  padding: 1px 7px; border: 1px solid var(--line); border-radius: 20px;
}
.tf-sheetlink:hover { border-color: var(--accent); background: var(--accent-soft); }
.tf-badge {
  display: inline-block; margin-left: 6px; vertical-align: 1px;
  font: 700 .64rem var(--font); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  padding: 2px 7px; border-radius: 20px;
}
.tf-badge--changed { background: var(--fav-soft); color: var(--fav-ink); border: 1px solid var(--fav); }
.tf-badge--new { background: var(--accent); color: var(--accent-ink); }

/* ---------- v2: pedido ---------- */
.tf-c-fav { white-space: nowrap; }
.tf-c-fav:has(.tf-cartbtn) { width: 80px; }
.tf-c-fav .tf-star, .tf-c-fav .tf-cartbtn { display: inline-grid; vertical-align: middle; }
.tf-cartbtn {
  width: 32px; height: 32px; place-items: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft);
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
.tf-cartbtn:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.tf-cartbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tf-cartbtn[aria-pressed="true"] svg { transform: rotate(45deg); }   /* el «+» pasa a «×»: quitar */
.tf-cartbtn svg { transition: transform .15s ease; }
.tf-cartbtn.is-pop { transform: scale(1.2); }
.tf-table tbody tr.is-incart td { background: var(--accent-soft); }

.tf-cartbar {
  position: fixed; left: 50%; bottom: 20px; z-index: 40; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 18px; border-radius: 40px;
  background: var(--top-bg); color: var(--top-ink); border: 1px solid var(--top-line);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.5);
  animation: tf-toast-in .2s ease-out both;
}
.tf-cartbar[hidden] { display: none; }
.tf-cartbar__label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tf-cartbar__label strong { font-family: var(--mono); }
.tf-cartbar .tf-btn { border-radius: 30px; }
body:has(.tf-cartbar:not([hidden])) .tf-foot { padding-bottom: 88px; }

.tf-drawer { position: fixed; inset: 0; z-index: 60; }
.tf-drawer[hidden] { display: none; }
.tf-drawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: tf-fade .2s ease-out both; }
.tf-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw);
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px -20px rgba(0,0,0,.4);
  animation: tf-slide .22s ease-out both;
}
@keyframes tf-fade { from { opacity: 0; } }
@keyframes tf-slide { from { transform: translateX(24px); opacity: 0; } }
.tf-drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-soft); }
.tf-drawer__head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.tf-drawer__x { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 1.3rem; line-height: 1; }
.tf-drawer__x:hover { border-color: var(--ink-soft); }
.tf-drawer__body { flex: 1; overflow-y: auto; padding: 14px 20px; display: grid; align-content: start; gap: 14px; }
.tf-drawer__empty { margin: 8px 0; color: var(--muted); }
.tf-drawer__empty[hidden] { display: none; }
.tf-drawer__note { margin: 0; font-size: .82rem; color: var(--muted); }
.tf-drawer__msg { margin: 0; font-weight: 600; font-size: .9rem; }
.tf-drawer__msg:empty { display: none; }
.tf-drawer__msg.is-ok { padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--accent); }
.tf-drawer__msg.is-err { color: var(--err); }
.tf-drawer__foot { display: flex; gap: 10px; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.tf-drawer__foot .tf-btn--primary { flex: 1; justify-content: center; }
.tf-drawer__foot .tf-btn:disabled { opacity: .5; cursor: not-allowed; }
.tf-drawer .tf-field textarea {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  font: inherit; font-size: .95rem; color: var(--ink); resize: vertical; min-height: 76px;
}
.tf-drawer .tf-field textarea:focus { outline: 0; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
body.tf-noscroll { overflow: hidden; }

.tf-cartlines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tf-cartlines:empty { display: none; }
.tf-cartline {
  display: grid; grid-template-columns: 1fr 76px 32px; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--surface-2);
}
.tf-cartline__info { display: grid; gap: 2px; min-width: 0; }
.tf-cartline__code { font: 500 .74rem var(--mono); color: var(--muted); }
.tf-cartline__code:empty { display: none; }
.tf-cartline__model { font-size: .92rem; overflow-wrap: anywhere; }
.tf-cartline__desc { font-size: .8rem; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tf-cartline__desc:empty { display: none; }
.tf-cartline__qty {
  width: 100%; height: 38px; padding: 0 8px; text-align: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
  font: 600 .95rem var(--mono);
}
.tf-cartline__qty:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tf-cartline__rm { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.tf-cartline__rm:hover { background: var(--line-soft); color: var(--err); }

/* ---------- Móvil: cada fila pasa a ser una tarjeta ---------- */
@media screen and (max-width: 760px) {
  :root { --top-h: 56px; }
  .tf-top__inner { padding: 0 16px; gap: 10px; }
  .tf-brand img { height: 22px; }
  .tf-brand img.tf-brand__fcar { height: 28px; }
  .tf-brand__area { display: none; }
  .tf-user__name { display: none; }
  .tf-main { padding: 16px 16px 40px; }
  .tf-head { padding: 14px 14px 0; border-radius: var(--r); }
  .tf-brands { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .tf-brand-opt { height: 54px; padding: 0 10px; }
  .tf-brand-opt img { height: 22px; }
  .tf-brand-opt--fcar img { height: 30px; }
  /* Banderas y canales: una fila que se desliza */
  .tf-flags, .tf-channels { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .tf-channels { display: flex; background: none; border: 0; padding-top: 0; padding-bottom: 0; gap: 6px; }
  .tf-channel { background: var(--surface-2); border: 1px solid var(--line); }
  .tf-channel.is-active { border-color: var(--accent); box-shadow: none; }
  .tf-flags::-webkit-scrollbar, .tf-channels::-webkit-scrollbar { display: none; }
  .tf-tabs { margin: 0 -14px; padding: 0 14px; }
  #tf-print { display: none; }   /* imprimir no tiene sentido en el móvil */
  .tf-tools #tf-export { flex: 1; justify-content: center; }
  .tf-changes .tf-chip { margin-left: 0; flex: 1; }
  .tf-c-fav { display: flex !important; flex-direction: column; gap: 4px; width: auto !important; }
  .tf-cartbar { left: 12px; right: 12px; bottom: 12px; transform: none; justify-content: space-between; animation: none; }
  .tf-chip { flex: 1; justify-content: center; }
  .tf-kbd { display: none; }
  .tf-section { border-radius: var(--r); }
  .tf-section__title { padding: 12px 14px; font-size: .92rem; }
  .tf-block__title { padding: 9px 14px; }

  .tf-table thead { display: none; }
  .tf-table, .tf-table tbody { display: block; }
  .tf-table tr {
    display: grid;
    position: relative;
    grid-template-columns: 1fr 1fr;
    column-gap: 8px;
    row-gap: 6px;
    padding: 12px 14px 12px 48px;
    border-bottom: 1px solid var(--line-soft);
  }
  .tf-table tbody tr:nth-child(even) td { background: none; }
  .tf-table tbody tr:nth-child(even) { background: var(--zebra); }
  .tf-table tbody tr:last-child { border-bottom: 0; }
  .tf-table td { display: block; padding: 0; border: 0; min-width: 0 !important; width: auto !important; }
  .tf-table tbody tr.is-fav td:first-child { box-shadow: none; }
  .tf-table tbody tr.is-fav { box-shadow: inset 3px 0 0 var(--fav); }
  .tf-table tbody tr.is-incart td { background: none; }
  .tf-table tbody tr.is-incart { background: var(--accent-soft); }
  .tf-c-fav { position: absolute; left: 8px; top: 8px; padding: 0 !important; }
  .tf-c-code, .tf-c-model, .tf-c-desc { grid-column: 1 / -1; }
  .tf-c-model { font-size: 1rem; order: -1; }
  .tf-c-code { order: -2; }
  .tf-c-desc { margin-bottom: 4px; font-size: .9rem; }
  /* Precios en rejilla de dos: etiqueta encima, importe debajo */
  .tf-c-price {
    display: flex !important; flex-direction: column; align-items: flex-start; gap: 1px;
    padding: 6px 10px !important;
    background: var(--surface-2) !important; border-radius: 8px;
    text-align: left !important;
  }
  .tf-c-price::before {
    content: attr(data-label);
    font: 700 .66rem var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  }
}

/* ---------- Impresión / PDF (siempre en claro, ahorra tinta) ---------- */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .tf--fcar {
    --bg: #fff; --surface: #fff; --surface-2: #f4f4f5; --surface-3: #ececee; --zebra: #f8f8f9;
    --ink: #111; --ink-soft: #333; --muted: #666; --line: #d8d8dc; --line-soft: #ececee;
    --block-bg: #ececee; --block-ink: #111; --sheet-ink: #111; --accent-text: #b3000b;
  }
  body.tf { background: #fff; font-size: 10pt; }
  .tf-top, .tf-tools, .tf-tabs, .tf-count, .tf-toast, .tf-note, .tf-c-fav, .tf-kbd,
  .tf-brands, .tf-flags, .tf-channels, .tf-changes, .tf-cartbar, .tf-drawer, .tf-sheetlink, .tf-cartbtn { display: none !important; }
  .tf-conditions { border: 0; background: none; }
  .tf-head::before { display: none; }
  .tf-main { padding: 0; max-width: none; }
  .tf-head { box-shadow: none; padding: 0; margin-bottom: 8mm; }
  .tf-section { box-shadow: none; border: 1px solid #ccc; border-radius: 0; break-inside: auto; }
  .tf-section__title, .tf-block__title, .tf-sheet__title, .tf-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tf-table th { position: static; }
  .tf-table tr { break-inside: avoid; }
  .tf-sheet { break-before: page; }
  .tf-sheet:first-of-type { break-before: auto; }
  .tf-untr, .tf-code { background: none !important; }
  .tf-foot { border: 0; padding: 4mm 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}

/* ==========================================================================
   v3: tarifa que aún no se aplica, edición de precios en la tabla y PDF
   con portada y contraportada
   ========================================================================== */

/* ---------- Tarifa que aún no se aplica (2027 durante 2026) ---------- */
.tf-soon {
  display: inline-block; margin-left: 4px; vertical-align: 1px;
  font: 700 .62rem var(--font); letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 20px;
  border: 1px dashed var(--muted); color: var(--muted);
}
.tf-channel.is-active .tf-soon { border-color: var(--ink-soft); color: var(--ink-soft); }

.tf-upcoming {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin: 0 0 14px; padding: 12px 14px;
  border: 1px dashed var(--muted); border-radius: var(--r);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px);
  color: var(--ink-soft); font-size: .9rem;
}
.tf-upcoming > svg { flex: none; color: var(--muted); }
.tf-upcoming__text { flex: 1 1 320px; display: grid; gap: 2px; }
.tf-upcoming__text strong { color: var(--ink); font-size: .98rem; }
.tf-upcoming__go { height: 40px; flex: none; }

/* Precios en gris y con trama: se ven, pero se nota que aún no valen */
.tf-sheets.is-upcoming td.tf-c-price {
  color: var(--muted) !important;
  font-weight: 500 !important;
  background-image: repeating-linear-gradient(135deg, transparent 0 7px, var(--line-soft) 7px 8px);
}
.tf-sheets.is-upcoming td.tf-t-neto { font-weight: 600; }
.tf-sheets.is-upcoming .tf-table th.tf-c-price { color: var(--muted); }
.tf-editing .tf-sheets.is-upcoming td.tf-c-price { color: var(--ink) !important; background-image: none; }

/* ---------- Editar precios ---------- */
.tf-btn--edit { background: var(--surface); border-color: var(--accent); color: var(--ink); }
.tf-btn--edit:hover { background: var(--accent-soft); }
.tf-btn--edit[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.tf-chip--locked { height: 46px; gap: 6px; color: var(--muted); font-size: .85rem; cursor: help; }

.tf-editbar {
  margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid var(--accent); border-radius: var(--r); background: var(--accent-soft);
  display: grid; gap: 10px;
}
.tf-editbar[hidden] { display: none; }
.tf-editbar__msg { margin: 0; font-size: .9rem; font-weight: 600; color: var(--ink); }
.tf-bulk > summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--ink-soft); }
.tf-bulk__help { margin: 8px 0 10px; font-size: .84rem; color: var(--ink-soft); }
.tf-bulk__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tf-bulk__row .tf-field { gap: 4px; }
.tf-bulk__row select, .tf-bulk__row input {
  height: 42px; padding: 0 10px; min-width: 140px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
}
.tf-bulk__row input { width: 120px; min-width: 0; font-family: var(--mono); }
.tf-bulk__row .tf-btn { height: 42px; }
.tf-bulk__msg { margin: 8px 0 0; font-size: .85rem; font-weight: 600; }
.tf-bulk__msg:empty { display: none; }

.tf-pin {
  width: 100%; min-width: 92px; height: 34px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  font: inherit; text-align: right; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tf-pin:hover { border-color: var(--ink-soft); }
.tf-pin:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tf-editing td.tf-c-price { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.tf-editing .tf-table tbody tr:hover td { background: inherit; }
td.tf-c-price.is-dirty { background: var(--fav-soft) !important; }
td.tf-c-price.is-dirty .tf-pin { border-color: var(--fav); font-weight: 700; }
.tf-was { display: block; margin-top: 2px; font-size: .72rem; color: var(--muted); text-decoration: line-through; text-align: right; }
td.tf-c-price.is-invalid .tf-pin { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179,38,30,.15); }
td.tf-c-price.is-conflict { background: rgba(179,38,30,.12) !important; }

.tf-savebar {
  position: fixed; left: 50%; bottom: 20px; z-index: 41; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 18px; border-radius: 40px;
  background: var(--top-bg); color: var(--top-ink); border: 1px solid var(--top-line);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.5);
  animation: tf-toast-in .2s ease-out both;
}
.tf-savebar[hidden] { display: none; }
.tf-savebar__label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tf-savebar__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fav); box-shadow: 0 0 0 4px rgba(224,161,0,.25); }
.tf-savebar .tf-btn { height: 40px; border-radius: 30px; }
.tf-savebar .tf-btn--ghost { background: transparent; color: var(--top-ink); border-color: var(--top-line); }
body.tf-editing .tf-cartbar { display: none; }
body:has(.tf-savebar:not([hidden])) .tf-foot { padding-bottom: 88px; }

/* ---------- Ventanas centradas (revisar cambios, preparar PDF) ---------- */
.tf-modal { display: grid; place-items: center; padding: 16px; }
.tf-modal[hidden] { display: none; }
.tf-modal__panel {
  position: relative; width: min(760px, 100%); max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-lg); box-shadow: 0 30px 70px -20px rgba(0,0,0,.5), 0 0 0 1px var(--line);
  animation: tf-pop .2s cubic-bezier(.23, 1, .32, 1) both;
}
.tf-modal__panel--sm { width: min(520px, 100%); }
@keyframes tf-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.tf-modal .tf-drawer__head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.tf-modal .tf-field input {
  height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); font-size: .95rem; color: var(--ink);
}
.tf-modal .tf-field input:focus { outline: 0; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tf-check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; cursor: pointer; }
.tf-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.tf-check small { color: var(--muted); }
.tf-fieldset { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 8px; }
.tf-fieldset legend { padding: 0 6px; font-weight: 700; font-size: .88rem; }

/* ---------- Registro de cambios ---------- */
.tf-log {
  margin: 8px 0 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.tf-log > summary { cursor: pointer; padding: 14px 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.tf-log__empty { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: .9rem; }
.tf-log__scroll { overflow-x: auto; }
.tf-log > .tf-log__scroll { padding: 0 8px 12px; max-height: 480px; overflow-y: auto; }
.tf-log__table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tf-log__table th { text-align: left; padding: 8px 10px; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; }
.tf-log__table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tf-log__table code { font: 500 .78rem var(--mono); color: var(--ink-soft); }
.tf-log__table .tf-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tf-log__table tr.is-up td:last-child { color: var(--accent-text); font-weight: 700; }
.tf-log__table tr.is-down td:last-child { color: var(--err); font-weight: 700; }
.tf-log__tag { display: inline-block; font: 700 .62rem var(--font); letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 20px; background: var(--surface-3); color: var(--muted); }
.tf-nowrap { white-space: nowrap; }

@media screen and (max-width: 760px) {
  .tf-savebar { left: 12px; right: 12px; bottom: 12px; transform: none; justify-content: space-between; animation: none; padding-left: 14px; }
  .tf-savebar__label span:last-child { white-space: normal; font-size: .82rem; }
  .tf-tools #tf-edit-toggle { flex: 1; }
  .tf-pin { min-width: 0; }
  .tf-modal { padding: 0; place-items: end stretch; }
  .tf-modal__panel { width: 100%; max-height: 92dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
}

/* ---------- Portada y contraportada del PDF (solo al imprimir) ---------- */
.tf-cover, .tf-back { display: none; }

@media print {
  @page cover { size: A4 landscape; margin: 0; }

  .tf-foot, .tf-meta, .tf-badge, .tf-untr, .tf-log, .tf-savebar, .tf-editbar, .tf-modal, .tf-upcoming, .tf-chip--locked { display: none !important; }
  .tf-print-nocond .tf-conditions { display: none !important; }
  .tf-print-all .tf-sheets tr[hidden] { display: table-row !important; }
  .tf-print-all .tf-sheets .tf-sheet[hidden],
  .tf-print-all .tf-sheets .tf-section[hidden],
  .tf-print-all .tf-sheets .tf-block[hidden] { display: block !important; }
  .tf-sheets.is-upcoming td.tf-c-price { color: inherit !important; font-weight: inherit !important; background-image: none; }
  .tf-sheets.is-upcoming td.tf-t-pvr, .tf-sheets.is-upcoming td.tf-t-pvt { font-weight: 700 !important; }
  .tf-sheets.is-upcoming td.tf-t-neto { color: var(--accent-text) !important; }
  .tf-conditions > summary { padding-left: 0; }
  .tf-conditions > summary::before { display: none; }
  .tf-conditions__body { padding-left: 0; }

  .tf-cover, .tf-back {
    page: cover;
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
    width: 297mm; height: 209mm; padding: 20mm 22mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    color: #fff; font-family: var(--font);
  }
  .tf-cover { break-after: page; }
  .tf-back { break-before: page; justify-content: center; align-items: flex-start; }

  .tf-cover > *, .tf-back > * { position: relative; }
  .tf-cover__art { position: absolute !important; inset: 0; pointer-events: none; }
  .tf-cover__logo, .tf-back__logo { align-self: flex-start; }
  .tf-cover__logo { height: 15mm; width: auto; }
  .tf-cover--fcar .tf-cover__logo { height: 24mm; margin: -4mm 0 0 -3mm; }
  .tf-cover__main { margin-top: auto; max-width: 58%; }
  .tf-cover__eyebrow { margin: 0 0 4mm; font-size: 11pt; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
  .tf-cover__title { margin: 0; font-size: 30pt; line-height: 1.08; font-weight: 800; letter-spacing: -.01em; }
  .tf-cover__period { margin: 4mm 0 0; font-size: 17pt; font-weight: 600; opacity: .85; }
  .tf-cover__valid {
    display: inline-block; margin: 6mm 0 0; padding: 2mm 4mm; border-radius: 2mm;
    font-size: 11pt; font-weight: 700;
  }
  .tf-cover__client { margin: 7mm 0 0; font-size: 12pt; opacity: .85; }
  .tf-cover__client strong { display: block; margin-top: 1mm; font-size: 16pt; opacity: 1; }
  .tf-cover__foot {
    display: flex; justify-content: space-between; gap: 10mm;
    margin-top: 12mm; padding-top: 4mm; border-top: .3mm solid rgba(255,255,255,.25);
    font-size: 9.5pt; letter-spacing: .04em; color: rgba(255,255,255,.7);
  }

  /* EfiTaller: negro de marca con un gran bloque verde en diagonal */
  .tf-cover--efitaller, .tf-back--efitaller { background: #1f1f1f; }
  .tf-cover--efitaller .tf-cover__art {
    background:
      linear-gradient(115deg, transparent 0 63%, #c2d500 63% 100%),
      linear-gradient(115deg, transparent 0 59.5%, rgba(194,213,0,.35) 59.5% 60.5%, transparent 60.5%);
  }
  .tf-cover--efitaller .tf-cover__eyebrow { color: #c2d500; }
  .tf-cover--efitaller .tf-cover__valid { background: #c2d500; color: #1f1f1f; }
  .tf-cover--efitaller .tf-cover__foot span:first-child { color: #c2d500; font-weight: 700; }
  .tf-cover--efitaller .tf-cover__foot span:last-child { color: #1f1f1f; font-weight: 600; }   /* cae sobre el bloque verde */
  .tf-back--efitaller .tf-cover__art { background: linear-gradient(115deg, #c2d500 0 9%, transparent 9%); }

  /* FCAR: negro con las ondas de radar en rojo */
  .tf-cover--fcar, .tf-back--fcar { background: #0b0b0d; }
  .tf-cover--fcar .tf-cover__art {
    background:
      repeating-radial-gradient(circle at 88% 22%, rgba(228,0,14,.55) 0 .35mm, transparent .35mm 9mm),
      linear-gradient(90deg, transparent 0 70%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 88% 22%, #000 0 30%, transparent 62%);
            mask-image: radial-gradient(circle at 88% 22%, #000 0 30%, transparent 62%);
  }
  .tf-cover--fcar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3mm; background: #e4000e; }
  .tf-cover--fcar .tf-cover__eyebrow { color: #ff2a38; }
  .tf-cover--fcar .tf-cover__valid { background: #e4000e; color: #fff; }
  .tf-back--fcar .tf-cover__art {
    background: repeating-radial-gradient(circle at 100% 100%, rgba(228,0,14,.45) 0 .35mm, transparent .35mm 9mm);
    -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 0 25%, transparent 55%);
            mask-image: radial-gradient(circle at 100% 100%, #000 0 25%, transparent 55%);
  }

  .tf-back { padding-left: 34mm; }
  .tf-back__logo { height: 16mm; width: auto; }
  .tf-back--fcar .tf-back__logo { height: 28mm; margin-left: -3mm; }
  .tf-back__slogan { margin: 5mm 0 0; font-size: 15pt; font-weight: 700; color: #c2d500; }
  .tf-back__contact { margin: 14mm 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 95mm)); gap: 7mm 14mm; }
  .tf-back__contact dt { font-size: 8.5pt; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }
  .tf-back__contact dd { margin: 1.5mm 0 0; font-size: 12.5pt; font-weight: 600; }
  .tf-back__legal { position: absolute !important; left: 34mm; bottom: 14mm; margin: 0; font-size: 8.5pt; color: rgba(255,255,255,.5); }
}

/* ---------- Presupuesto para cliente ---------- */
.tf-qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-qgrid--3 { grid-template-columns: repeat(3, 1fr); grid-column: 1 / -1; }
.tf-modal select, .tf-modal input[type="number"] {
  height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font-size: .95rem;
}
.tf-modal textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  font: inherit; font-size: .92rem; color: var(--ink); resize: vertical;
}
.tf-modal textarea:focus, .tf-modal select:focus, .tf-modal input[type="number"]:focus { outline: 0; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tf-qrecent { font-size: .85rem; color: var(--ink-soft); }
.tf-qrecent > summary { cursor: pointer; font-weight: 700; }
.tf-qrecent ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.tf-qrecent a { color: var(--accent-text); font-weight: 700; }
.tf-drawer__foot .tf-btn:disabled { opacity: .5; cursor: not-allowed; }
@media screen and (max-width: 760px) {
  .tf-qgrid, .tf-qgrid--3 { grid-template-columns: 1fr; }
  .tf-modal .tf-drawer__foot { flex-wrap: wrap; }
}

/* ---------- Seguimiento para Dirección ---------- */
.tf-dir__back { display: inline-block; margin-bottom: 10px; font-size: .9rem; }
.tf-dir__filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.tf-dir__filters select { height: 42px; min-width: 180px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); }
.tf-dir .tf-tab { text-decoration: none; }
.tf-dir__list { display: grid; gap: 10px; }
.tf-dir__card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.tf-dir__card > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 14px 18px; font-size: .92rem; }
.tf-dir__card[open] > summary { border-bottom: 1px solid var(--line-soft); }
.tf-dir__card .tf-log__scroll { padding: 4px 8px; }
.tf-dir__who { font-weight: 700; }
.tf-dir__foot { margin: 0; padding: 8px 18px 14px; font-size: .85rem; color: var(--muted); }
.tf-dir__st { margin-left: auto; font: 700 .68rem var(--font); letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; background: var(--surface-3); color: var(--ink-soft); }
.tf-dir__st--nuevo { background: var(--accent); color: var(--accent-ink); }
.tf-dir__st--anulado { background: rgba(179,38,30,.12); color: var(--err); }
.tf-dir__block { margin-bottom: 18px; padding: 6px 8px; }
.tf-dir__h2 { margin: 8px 4px 10px; font-size: 1rem; font-weight: 800; }
.tf-muted { color: var(--muted); }
.tf-btn--sm { height: 34px; padding: 0 12px; font-size: .85rem; }
.tf-log__tag--err { background: rgba(179,38,30,.12); color: var(--err); }

/* Pie del carrito con «Presupuesto para cliente»: no cabían los 4 botones en una fila
   y el último se salía del panel. El presupuesto pasa a una fila propia, abajo. */
.tf-drawer__foot { flex-wrap: wrap; }
.tf-drawer__foot #tf-quote-open { order: 10; flex: 1 1 100%; justify-content: center; }

/* Casilla «Mantener la sesión iniciada» en el acceso */
.tf-form .tf-check { font-size: .88rem; color: var(--ink-soft); }

/* Presupuesto: paso de confirmación antes de enviar */
.tf-qconfirm { border: 2px solid var(--accent); border-radius: var(--r); padding: 14px 16px; background: var(--accent-soft); }
.tf-qconfirm[hidden] { display: none; }
.tf-qconfirm h3 { margin: 0 0 10px; font-size: 1.05rem; }
.tf-qconfirm dl { margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.tf-qconfirm dt { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tf-qconfirm dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.tf-qconfirm dl > div:first-child { grid-column: 1 / -1; }
.tf-qconfirm p { margin: 0; font-size: .85rem; color: var(--ink-soft); }
.tf-modal [hidden] { display: none !important; }
#tf-cart-send.is-armed { background: var(--err); border-color: var(--err); color: #fff; }
.tf-drawer__msg.is-ask { padding: 10px 12px; border-radius: var(--r); background: rgba(179,38,30,.08); border: 1px solid var(--err); color: var(--ink); font-weight: 600; }

/* ---------- Impresión compacta: un producto por línea, como la lista ---------- */
@media print {
  body.tf { font-size: 8pt; }
  .tf-head { margin-bottom: 4mm; }
  .tf-h1 { font-size: 13pt; }
  .tf-sheet { margin-bottom: 3mm; }
  .tf-sheet__title { font-size: 7.5pt; padding: 2px 8px; margin: 0 0 2mm; }
  .tf-section { margin-bottom: 3mm; }
  .tf-section__title { padding: 3px 8px; font-size: 8.5pt; }
  .tf-block__title { padding: 2px 8px; font-size: 7pt; }
  .tf-table { font-size: 7.5pt; table-layout: auto; }
  .tf-table th { padding: 2px 6px; font-size: 6.3pt; }
  .tf-table td { padding: 1.6px 6px; line-height: 1.25; vertical-align: middle; }
  .tf-c-code { font-size: 7pt; }
  .tf-code { font-size: 7pt !important; padding: 0 !important; margin: 0 !important; }
  .tf-c-model { min-width: 0; width: 22%; white-space: nowrap; }
  .tf-c-desc { min-width: 0; font-size: 7pt; color: #555 !important; }
  /* La descripción, en una sola línea (recortada con «…» si no cabe) */
  .tf-desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .tf-c-price { font-size: 7.5pt; width: 1%; }
  .tf-table tbody tr:nth-child(even) td { background: #f7f7f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media print {
  /* Lo marcado en pantalla (carrito, favoritos, cambios) no se imprime */
  .tf-table tbody tr.is-incart td, .tf-table tbody tr.is-fav td { background: transparent !important; box-shadow: none !important; }
  .tf-table tbody tr.is-incart:nth-child(even) td { background: #f7f7f5 !important; }
}
@media print {
  /* El subrayado de puntos («importe exacto» al pasar el ratón) no sirve en papel */
  td.tf-c-price[title] { text-decoration: none; cursor: auto; }
}

/* Mi cuenta: bloque de GitLab */
.tf-sep { border: 0; border-top: 1px solid var(--line); margin: 26px 0 18px; }
.tf-auth__title--sm { font-size: 1.2rem; }

/* Presupuesto: datos del cliente para el issue de GitLab */
.tf-qextra { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
.tf-qextra > summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--ink-soft); margin-bottom: 4px; }
.tf-qextra .tf-qgrid { margin-top: 10px; }
.tf-qextra input[type="text"], .tf-qextra input[type="tel"] { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font-size: .92rem; }

/* ---------- Leads del distribuidor (29/10/2026, Core/DistLeads) ---------- */
.tf-nav { display: flex; gap: 4px; margin: 0 auto 0 4px; }
.tf-nav a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 9px;
  color: var(--top-ink); text-decoration: none; font-weight: 700; font-size: .9rem; opacity: .72;
  transition: opacity .15s ease, background .15s ease;
}
.tf-nav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.tf-nav a.is-active { opacity: 1; background: rgba(255,255,255,.1); box-shadow: inset 0 -2px 0 var(--accent); }
/* «← Admin» (25/11/2026): vuelta al inicio del admin, separada de Tarifas | Leads */
.tf-nav a.tf-nav__admin { position: relative; margin-right: 9px; }
.tf-nav a.tf-nav__admin::after { content: ""; position: absolute; right: -7px; top: 10px; bottom: 10px; width: 1px; background: currentColor; opacity: .35; }
.tf-muted { color: var(--muted); }

.tf-ld__filters { align-items: flex-end; }
.tf-ld__search { flex: 1 1 240px; }
.tf-ld__search input { height: 42px; width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font-size: .95rem; }
.tf-ld__search input:focus { outline: 0; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tf-ld__go { height: 42px; }
.tf-ld__n { font: 500 .74rem var(--mono); background: var(--surface-2); color: var(--ink-soft); padding: 1px 7px; border-radius: 20px; margin-left: 4px; letter-spacing: 0; }
.tf-ld .tf-tab { text-decoration: none; }

.tf-ld__banner { margin: 0 0 14px; padding: 11px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); font-size: .92rem; color: var(--ink-soft); }
.tf-ld__banner--demo { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; box-shadow: none; }
.tf-ld__banner--error { background: rgba(179, 38, 30, .1); color: var(--err); font-weight: 600; box-shadow: none; }

.tf-ld__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tf-ld__row {
  display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(140px, 1fr) minmax(140px, 1.2fr) 130px minmax(150px, auto);
  gap: 6px 18px; align-items: center; padding: 14px 18px;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; font-size: .92rem;
  transition: box-shadow .15s ease;
}
.tf-ld__row:hover { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.tf-ld__who { display: grid; min-width: 0; }
.tf-ld__who strong, .tf-ld__who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-ld__who span { font-size: .85rem; }
.tf-ld__where { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tf-ld__where span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-ld__where svg, .tf-ld__dl svg { flex: none; border-radius: 2px; vertical-align: -2px; }
.tf-ld__what { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-ld__when { font-size: .85rem; white-space: nowrap; }
.tf-ld__tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }

.tf-ld__st, .tf-ld__notes, .tf-ld__brand, .tf-ld__zone {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 20px;
  font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.tf-ld__notes { background: var(--surface-2); color: var(--ink-soft); font-weight: 600; }
.tf-ld__brand { background: #1f1f1f; color: #fff; }
.tf-ld__brand--fcar { background: #e4000e; }
.tf-ld__brand--efitaller { background: #c2d500; color: #1f1f1f; }
.tf-ld__zone { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); font-weight: 600; }
.tf-ld__st--nuevo { background: var(--accent-soft); color: var(--accent-text); }
.tf-ld__st--llamado { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
.tf-ld__st--presentacion { background: rgba(124, 58, 237, .12); color: #6d28d9; }   /* 16/11/2026 */
.tf-ld__st--no_contesta, .tf-ld__st--espera_presupuesto { background: rgba(234, 88, 12, .13); color: #b4460a; }
.tf-ld__st--presupuesto_enviado { background: rgba(202, 138, 4, .16); color: #855d00; }
.tf-ld__st--mas_adelante { background: rgba(100, 100, 100, .13); color: #4a4a4a; }
.tf-ld__st--venta { background: rgba(22, 163, 74, .14); color: #15703a; }
.tf-ld__st--no_interesa { background: rgba(179, 38, 30, .11); color: #b3261e; }

/* Ficha */
.tf-ld__title { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; padding-bottom: 18px; }
.tf-ld--ficha .tf-dir__back { text-decoration: none; }
.tf-ld__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tf-ld__col { display: grid; gap: 16px; }
.tf-ld__card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px; }
.tf-ld__h2 { margin: 0 0 12px; font-size: 1rem; }
.tf-ld__h3 { margin: 18px 0 8px; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tf-ld__help { margin: -4px 0 12px; font-size: .88rem; }
.tf-ld__dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: .93rem; }
.tf-ld__dl dt { color: var(--muted); }
.tf-ld__dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tf-ld__dl a { color: var(--ink); font-weight: 600; }
.tf-ld__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tf-ld__actions .tf-btn { height: 42px; }
.tf-ld__reqs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tf-ld__reqs li + li { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.tf-ld__reqhead, .tf-ld__prods, .tf-ld__nomsg { margin: 0 0 6px; font-size: .92rem; }
.tf-ld__msg { margin: 6px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--r) var(--r) 0; font-size: .93rem; color: var(--ink-soft); }
.tf-ld__states { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tf-ld__stbtn {
  height: 36px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line);
  font-weight: 700; font-size: .84rem; cursor: pointer;
  transition: border-color .15s ease, transform .1s ease;
}
.tf-ld__stbtn:not(.is-on) { background: var(--surface); color: var(--ink-soft); }
.tf-ld__stbtn:not(.is-on):hover { border-color: var(--ink-soft); color: var(--ink); }
.tf-ld__stbtn:active { transform: scale(.97); }
.tf-ld__stbtn.is-on { border-color: transparent; cursor: default; box-shadow: inset 0 0 0 2px currentColor; opacity: 1; }
.tf-ld__reset { font-size: .85rem; margin-left: 4px; cursor: pointer; }
.tf-ld__hist, .tf-ld__notelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tf-ld__hist li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; }
.tf-ld__noteform { display: grid; gap: 10px; margin-bottom: 16px; }
.tf-ld__noteform textarea {
  width: 100%; min-height: 84px; padding: 10px 14px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font: inherit; font-size: .95rem;
}
.tf-ld__noteform textarea:focus { outline: 0; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tf-ld__noteform .tf-btn { justify-self: start; height: 42px; }
.tf-ld__notelist li { padding: 10px 14px; background: var(--surface-2); border-radius: var(--r); }
.tf-ld__notehead { margin: 0 0 4px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tf-ld__notetext { margin: 0; font-size: .93rem; overflow-wrap: anywhere; }

@media screen and (max-width: 1100px) {
  .tf-ld__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tf-ld__tags { justify-content: flex-start; }
}
@media screen and (max-width: 860px) {
  .tf-ld__grid { grid-template-columns: 1fr; }
}
/* En el móvil, Tarifas | Leads no cabe en la barra: va arriba de la página */
.tf-nav-m { display: none; }
@media screen and (max-width: 760px) {
  .tf-nav { display: none; }
  .tf-nav-m {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px;
    background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow);
  }
  .tf-nav-m a {
    display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 9px;
    color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: .92rem;
  }
  .tf-nav-m a.is-active { background: var(--accent); color: var(--accent-ink); }
  .tf-nav-m:has(.tf-nav__admin) { grid-template-columns: auto 1fr 1fr; }
  .tf-nav-m:has(.tf-nav__admin):not(:has(a:nth-child(2))) { grid-template-columns: auto; justify-content: start; }
  .tf-nav-m a.tf-nav__admin { padding: 0 14px; }
  .tf-ld__row { grid-template-columns: 1fr; gap: 6px; padding: 14px; }
  .tf-ld__card { padding: 16px; }
  .tf-ld__dl { grid-template-columns: 1fr; gap: 2px; }
  .tf-ld__dl dd { margin-bottom: 8px; }
}

/* Ficha: recorrido del flujo y llamada programada (03/11/2026) */
.tf-ld__timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 10px; font-size: .9rem; }
.tf-ld__timeline li { position: relative; display: grid; gap: 2px; }
.tf-ld__timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.tf-ld__cita { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.tf-ld__citanext { margin: 0 0 10px; font-weight: 700; }
.tf-ld__citaform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tf-ld__citaform input { height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font: inherit; }
.tf-ld__citaform .tf-btn { height: 42px; }

/* Fichas de lead con el tema oscuro (Grunert): los colores de estado, legibles sobre negro */
.tf--fcar .tf-ld__st--llamado { background: rgba(91, 155, 255, .16); color: #8fbaff; }
.tf--fcar .tf-ld__st--presentacion { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
.tf--fcar .tf-ld__st--no_contesta, .tf--fcar .tf-ld__st--espera_presupuesto { background: rgba(240, 164, 58, .16); color: #f5bd6b; }
.tf--fcar .tf-ld__st--presupuesto_enviado { background: rgba(227, 194, 75, .16); color: #ecd27a; }
.tf--fcar .tf-ld__st--mas_adelante { background: rgba(142, 144, 153, .18); color: #cbcdd3; }
.tf--fcar .tf-ld__st--venta { background: rgba(53, 196, 122, .16); color: #6ee0a3; }
.tf--fcar .tf-ld__st--no_interesa { background: rgba(255, 77, 87, .15); color: #ff8088; }
.tf--fcar .tf-ld__dl a { color: var(--ink); }

/* ---------- Partner-Panel de Grunert (03/11/2026, tarifas/partner.php) ----------
   El aspecto de la demo del flujo: oscuro FCAR, cifras, Leads · Llamadas · Mapa. */
.pp { --ok: #35c47a; --warn: #f0a43a; --wait: #e3c24b; --info: #5b9bff; --idle: #8e9099; --bad: #ff4d57;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 22px 24px 26px;
  position: relative; overflow: hidden; }
.pp::before { content: ""; position: absolute; right: -160px; top: -200px; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, transparent 0 40px, rgba(228, 0, 14, .16) 40px 41px);
  -webkit-mask-image: radial-gradient(circle, #000 0 30%, transparent 70%); mask-image: radial-gradient(circle, #000 0 30%, transparent 70%); }
.pp > * { position: relative; }
.pp-head { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pp-head__id { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pp-head__logo { height: 34px; width: auto; display: block; }
.pp-head__title { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.pp-head__who { margin: 0; color: var(--muted); font-size: .88rem; }
.pp-paises { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.pp-paises a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; font: 500 .72rem var(--mono); letter-spacing: .08em;
  color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.pp-paises a + a { border-left: 1px solid var(--line); }
.pp-paises a:hover { color: var(--ink); background: var(--surface-2); }
.pp-paises a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pp-paises a.is-active { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pp-head__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-head__filters select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .88rem; }
.pp-banner { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--ink-soft); font-size: .9rem; }
.pp-banner--bad { background: rgba(255, 77, 87, .12); color: #ff8088; font-weight: 600; }

.pp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.pp-kpi { background: var(--surface-2); padding: 12px 16px; display: grid; gap: 4px; }
.pp-kpi span { font-size: .74rem; color: var(--muted); }
.pp-kpi strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }

.pp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.pp-tabs a { position: relative; padding: 10px 14px; color: var(--muted); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.pp-tabs a:hover { color: var(--ink); }
.pp-tabs a.is-active { color: var(--ink); }
.pp-tabs a.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--accent); }

.pp-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pp-states { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-state { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink-soft); font-size: .8rem; font-weight: 600; text-decoration: none; }
.pp-state span { font: 500 .72rem var(--mono); color: var(--muted); }
.pp-state:hover { border-color: var(--muted); }
.pp-state.is-active { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.pp-search input { height: 34px; width: min(320px, 100%); padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .88rem; }
.pp-search input:focus, .pp-head__filters select:focus { outline: 0; border-color: var(--accent); }
/* Provincia y equipo junto al buscador; «Por hacer» destacado (10/11/2026). */
.pp-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Móvil: marca, provincia y equipo plegados tras «Filtros» (11/11/2026) */
.pp-filtros-btn { display: none; }
@media (max-width: 640px) {
  .pp-filtros-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; margin: 0 0 10px; border: 1px solid var(--line);
    border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
  .pp-filtros-btn::after { content: "▾"; margin-left: 7px; font-size: .8rem; }
  .pp-filtros-on .pp-filtros-btn::after { content: "▴"; }
  .pp-filtros-btn.has-items { border-color: var(--accent); background: var(--accent-soft); }
  body:not(.pp-filtros-on) .pp-marcas, body:not(.pp-filtros-on) .pp-search select { display: none; }
  .pp-search { width: 100%; }
  .pp-search input, .pp-search select { width: 100%; }
}
.pp-search select { height: 34px; max-width: 220px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .84rem; }
.pp-search select:focus { outline: 0; border-color: var(--accent); }
.pp-state--hacer.has-items { border-color: #e08a1e; color: var(--ink); }
.pp-state--hacer.has-items span { color: #e08a1e; font-weight: 700; }
.pp-state--hacer.is-active { border-color: #e08a1e; background: rgba(224, 138, 30, .14); }
.pp-filter { margin: 0 0 10px; font-size: .88rem; color: var(--ink-soft); }
.pp-filter a { color: var(--accent-text); margin-left: 8px; }
.pp-empty { margin: 18px 0; color: var(--muted); }

/* Las dos marcas en el Partner-Panel (10/11/2026): filtro y etiqueta de cada lead. */
.pp-marcas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.pp-marca { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink-soft); font-size: .84rem; font-weight: 700; text-decoration: none; }
.pp-marca::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.pp-marca--fcar::before { background: #E4000E; }
.pp-marca--efitaller::before { background: #C2D500; }
.pp-marca span { font: 500 .74rem var(--mono); color: var(--muted); }
.pp-marca:hover { border-color: var(--muted); }
.pp-marca.is-active { color: var(--ink); background: var(--surface-2); border-color: var(--ink-soft); }
.pp-marca--fcar.is-active { border-color: #E4000E; background: rgba(228,0,14,.12); }
.pp-marca--efitaller.is-active { border-color: #C2D500; background: rgba(194,213,0,.18); }
.pp-mk { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; margin-right: 7px; border-radius: 999px; vertical-align: 1px;
  font: 800 .64rem/1 var(--font); letter-spacing: .05em; text-transform: uppercase; }
.pp-mk--fcar { background: #E4000E; color: #fff; }
.pp-mk--efitaller { background: #C2D500; color: #111; }

.pp-table { display: grid; }
.pp-tr { display: grid; grid-template-columns: minmax(170px, 1.6fr) minmax(130px, 1fr) minmax(150px, 1.2fr) 110px minmax(110px, 1fr);
  gap: 4px 14px; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; font-size: .88rem; }
.pp-tr--head { padding-top: 0; padding-bottom: 8px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
a.pp-tr:hover { background: var(--surface-2); }
a.pp-tr.is-new { box-shadow: inset 2px 0 0 var(--accent); }
.pp-lead { display: grid; min-width: 0; }
.pp-lead strong, .pp-lead small, .pp-region, .pp-mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-lead small { color: var(--muted); font-size: .78rem; }
.pp-mono { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); }
.pp-region { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.pp-region svg { flex: none; border-radius: 2px; }
.pp-notes { color: var(--muted); font-size: .75rem; }
.pp-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pp-chip--nuevo { background: var(--accent-soft); color: #ff6b74; }
.pp-chip--info { background: rgba(91, 155, 255, .14); color: #8fbaff; }
.pp-chip--warn { background: rgba(240, 164, 58, .14); color: #f5bd6b; }
.pp-chip--wait { background: rgba(227, 194, 75, .14); color: #ecd27a; }
.pp-chip--ok { background: rgba(53, 196, 122, .14); color: #6ee0a3; }
.pp-chip--bad { background: rgba(255, 77, 87, .13); color: #ff8088; }
.pp-chip--idle { background: rgba(142, 144, 153, .16); color: #cbcdd3; }
/* En el tema claro de EfiTaller (Canarias, Gran Vía: 10/11/2026), los mismos colores más oscuros para que se lean. */
.tf--efitaller .pp-chip--nuevo { background: rgba(228, 0, 14, .1); color: #b3261e; }
.tf--efitaller .pp-chip--info { background: #e3edfb; color: #1f5fa8; }
.tf--efitaller .pp-chip--warn { background: #fff0dc; color: #a85a00; }
.tf--efitaller .pp-chip--wait { background: #f1e9fb; color: #6c3fb0; }
.tf--efitaller .pp-chip--ok { background: #e2f5e9; color: #1f7a45; }
.tf--efitaller .pp-chip--bad { background: #fde8e8; color: #b3261e; }
.tf--efitaller .pp-chip--idle { background: #ececf0; color: #4b4d55; }
.tf--efitaller .pp-btn--red { color: #1f1f1f; }   /* texto oscuro sobre el verde */
.tf--efitaller .pp-free__h { background: #e3edfb; color: #1f5fa8; }
.tf--efitaller .pp-slot input { color-scheme: light; }
.tf--efitaller .pp-ev--distribuidor { background: rgba(194, 213, 0, .28); border-color: #a9ba00; }

.pp-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--ink); font-size: .84rem; font-weight: 600; text-decoration: none; }
.pp-btn:hover { border-color: var(--muted); }
.pp-cal-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.pp-cal-head strong { margin-right: auto; order: -1; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pp-cal { display: grid; grid-template-columns: 54px repeat(var(--dias), minmax(0, 1fr)); grid-template-rows: auto calc(var(--horas) * 46px);
  border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.pp-cal__corner, .pp-cal__day { padding: 8px 10px; font-size: .8rem; font-weight: 700; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); }
.pp-cal__day { border-left: 1px solid var(--line-soft); }
.pp-cal__day.is-today { color: var(--accent-text); }
.pp-cal__hours { display: grid; grid-template-rows: repeat(var(--horas), 1fr); font: 500 .7rem var(--mono); color: var(--muted); }
.pp-cal__hours span { padding: 2px 8px 0; border-top: 1px solid var(--line-soft); }
.pp-cal__col { position: relative; border-left: 1px solid var(--line-soft);
  background-image: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px 46px); }
.pp-ev { position: absolute; left: 4px; right: 4px; min-height: 40px; padding: 4px 8px; border-radius: 8px; font-size: .74rem; line-height: 1.3;
  color: var(--ink); text-decoration: none; overflow: hidden; border: 1px solid; }
.pp-ev b { font-family: var(--mono); font-weight: 500; display: block; }
.pp-ev--distribuidor { background: rgba(228, 0, 14, .2); border-color: rgba(255, 42, 56, .6); }
.pp-ev--cliente { background: rgba(91, 155, 255, .18); border-color: rgba(91, 155, 255, .55); }
.pp-empty--cal { margin-top: 12px; }
.pp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 12px 0 0; font-size: .78rem; color: var(--muted); }
.pp-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: -8px; }
.pp-dot--distribuidor { background: var(--accent); }
.pp-dot--cliente { background: var(--info); }
.pp-dot--de { background: rgba(228, 0, 14, .7); }
.pp-dot--at { background: rgba(228, 0, 14, .7); border-radius: 2px; }

.pp-map-wrap { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 24px; align-items: start; }
.pp-map-title { margin: 0 0 10px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pp-map { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(7, auto); gap: 5px; }
.pp-tile { aspect-ratio: 1; display: grid; place-content: center; text-align: center; gap: 0; border-radius: 6px; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--muted); font-size: .72rem;
  transition: transform .15s ease, border-color .15s ease; }
.pp-tile b { font-weight: 700; color: var(--ink-soft); }
.pp-tile span { font: 500 .66rem var(--mono); }
.pp-tile.at { border-style: dashed; }
.pp-tile.has { background: rgba(228, 0, 14, var(--a)); border-color: rgba(255, 42, 56, .5); color: #fff; }
.pp-tile.has b, .pp-tile.has span { color: #fff; }
.pp-tile:hover { transform: scale(1.06); border-color: var(--ink-soft); }
.pp-map-side { display: grid; gap: 12px; justify-items: start; color: var(--ink-soft); font-size: .9rem; }
.pp-map-side p { margin: 0; }

/* Mapa real del planificador de visitas (Leaflet + OpenStreetMap, en oscuro) */
.pp-btn--red { background: var(--accent); border-color: var(--accent); color: #fff; }
.pp-btn--red:hover { background: var(--accent-2); border-color: var(--accent-2); }
.pp-leaflet { height: 380px; border-radius: 12px; border: 1px solid var(--line-soft); background: #111; }
.pp-leaflet .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(2.1) contrast(.72) saturate(.5); }
.pp-leaflet .leaflet-popup-content { font: 13px/1.45 var(--font); color: #16171a; }
.pp-leaflet.leaflet-container .leaflet-control-attribution { background: rgba(0,0,0,.55); color: #aaa; }
.pp-leaflet.leaflet-container .leaflet-control-attribution a { color: #ccc; }
.pp-leaflet .leaflet-popup-content button { font: inherit; }

/* Planificador de visitas del Partner-Panel (05/11/2026; assets/js/pp-planificador.js) */
.rp { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.rp-sub { margin: 0 0 16px; color: var(--ink-soft); font-size: .9rem; max-width: 72ch; }
.rp-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.rp-side { display: grid; gap: 12px; min-width: 0; }
.rp-box { display: grid; gap: 10px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; min-width: 0; }
.rp-lbl { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rp-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.rp-row--tight { justify-content: space-between; flex-wrap: wrap; }
.rp input[type=text], .rp input[type=time], .rp input[type=number] { height: 36px; padding: 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; font-size: .88rem; color-scheme: dark; }
.rp input[type=text] { width: 100%; min-width: 0; }
.rp input[type=number] { width: 72px; }
.rp input:focus { outline: 0; border-color: var(--accent); }
.rp input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.rp .pp-btn { white-space: nowrap; cursor: pointer; flex: none; }
.rp .pp-btn[disabled] { opacity: .5; cursor: default; }
.rp-link { padding: 0; background: none; border: 0; color: var(--accent-2); font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pp-leaflet .rp-link { color: #b5000b; }
.rp-hint { color: var(--muted); font-size: .8rem; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chips button { padding: 5px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: .8rem; cursor: pointer; }
.rp-chips button:hover, .rp-chips button.on { border-color: var(--accent); color: var(--ink); }
.rp-checks { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.rp-checks label, .rp-check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.rp-listhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: .82rem; color: var(--ink-soft); }
.rp-list { display: grid; gap: 4px; max-height: 320px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.rp-list li label { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.rp-list li label:hover { background: var(--surface); }
.rp-list li.sel label { background: var(--surface); border-color: var(--line); }
.rp-list .n { font-size: .85rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.rp-list .m { font-size: .76rem; color: var(--muted); overflow-wrap: anywhere; }
.rp-empty { padding: 8px; color: var(--muted); font-size: .84rem; }
.rp-st { padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: .68rem; white-space: nowrap; }
.rp-st.neu { color: #5b9bff; } .rp-st.curso { color: #e3c24b; } .rp-st.angebot { color: #f0a43a; } .rp-st.kunde { color: #35c47a; }
.rp-st.descartado { color: #8e9099; } .rp-st.besucht { color: #8e9099; }
.rp-mapcol { display: grid; gap: 12px; min-width: 0; }
.rp-map.leaflet-container { height: 540px; background: #111; }
.rp-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; color: var(--ink-soft); font-size: .86rem; }
.rp-opts label { display: inline-flex; gap: 8px; align-items: center; }
.rp-opts .pp-btn--red { margin-left: auto; height: 38px; }
.rp-pin { width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(0,0,0,.65); opacity: .55; box-sizing: border-box; }
.rp-pin.sel { opacity: 1; border-color: #fff; }
.rp-pin.aprox { border-style: dashed; }
.rp-num, .rp-home { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.rp-num { background: #e4000e; border: 2px solid #fff; box-sizing: border-box; }
.rp-home { background: #16171a; border: 2px solid #fff; box-sizing: border-box; }
.rp-result { display: grid; gap: 14px; margin-top: 16px; padding: 16px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; }
.rp-result[hidden] { display: none; }
.rp-sum { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-sum span { padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: .86rem; color: var(--ink-soft); }
.rp-sum b { margin-right: 4px; color: var(--ink); }
.rp-stops { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rp-stops li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; }
.rp-stops li.done { opacity: .55; }
.rp-stops .no { display: grid; place-items: center; width: 28px; height: 28px; background: var(--accent); border-radius: 50%; color: #fff; font-size: .8rem; font-weight: 700; }
.rp-stops li.home .no { background: var(--surface-2); border: 1px solid var(--line); }
.rp-stops .t { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.rp-stops .d { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.rp-stops .acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; font-size: .8rem; }
.rp-stops .acts a { color: var(--ink-soft); }
.rp-gm { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-gm .pp-btn--red { text-decoration: none; }
#rp-note { margin: 0; }
.rp-credit { margin: 10px 0 0; }
.rp-credit a { color: inherit; }
@media (max-width: 900px) {
  .rp-grid { grid-template-columns: minmax(0, 1fr); }
  .rp-map.leaflet-container { height: 400px; }
}
@media (max-width: 600px) {
  .rp-opts .pp-btn--red { width: 100%; margin-left: 0; justify-content: center; }
  .rp-stops li { grid-template-columns: 30px minmax(0, 1fr); }
  .rp-stops .acts { grid-column: 2; justify-content: flex-start; }
}

/* Ficha: dirección del taller (propuesta de Google, confirmar o escribirla) */
.tf-ld__addr { margin: 0 0 8px; font-weight: 600; }
.tf-ld__proposal { margin: 12px 0 8px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r); }
.tf-ld__proposal p { margin: 0 0 8px; }
.tf-ld__proposal .tf-btn { height: 40px; }
.tf-ld__addredit { margin-top: 10px; }
.tf-ld__addredit > summary { cursor: pointer; color: var(--accent-text); font-weight: 700; font-size: .9rem; }
.tf-ld__addrform { display: grid; gap: 10px; margin-top: 10px; }
.tf-ld__addrrow { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.tf-ld__addrform input { height: 42px; }
.tf-ld__addrform .tf-btn { justify-self: start; height: 42px; }

/* Fase 2 de Grunert (03/11/2026): Rückruf-Zeiten, ruta y presupuesto */
.pp-muted { color: var(--muted); }
.pp-help { margin: 0 0 14px; color: var(--ink-soft); font-size: .9rem; }
.pp-field { display: grid; gap: 5px; font-size: .84rem; }
.pp-field > span { color: var(--muted); font-weight: 600; }
.pp-field input, .pp-field select, .pp-field textarea, .pp-slot input {
  height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .88rem; }
.pp-field textarea { height: auto; padding: 8px 10px; resize: vertical; }
.pp-field input:focus, .pp-field select:focus, .pp-field textarea:focus, .pp-slot input:focus { outline: 0; border-color: var(--accent); }
.pp-field input:disabled, .pp-field select:disabled, .pp-field textarea:disabled, .pp-slot input:disabled { opacity: .6; }
.pp-hours-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.pp-hours { display: grid; gap: 16px; }
.pp-hours .pp-btn--red { justify-self: start; height: 40px; }
.pp-week { display: grid; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.pp-week__day { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line-soft); }
.pp-week__day:first-child { border-top: 0; }
.pp-week__day.is-closed strong { color: var(--muted); }
.pp-week__slots { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.pp-slot { display: inline-flex; align-items: center; gap: 4px; }
.pp-slot input { width: 104px; height: 34px; padding: 0 6px; color-scheme: dark; }
.pp-week__closed { font-size: .8rem; }
.pp-hours__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pp-hours-side { border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.pp-free { margin: 0 0 10px; font-size: .84rem; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pp-free strong { width: 100%; font-size: .8rem; color: var(--ink-soft); }
.pp-free__h { font: 500 .72rem var(--mono); padding: 2px 6px; border-radius: 6px; background: rgba(91, 155, 255, .14); color: #8fbaff; }
.tf-ld__offer { display: grid; gap: 10px; }
.tf-ld__offer textarea, .tf-ld__offer input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font: inherit; font-size: .95rem; }
.tf-ld__offer input { height: 42px; padding: 0 12px; }
.tf-ld__offer input[type="date"] { color-scheme: light dark; }
.tf-ld__offerrow { grid-template-columns: 1fr 170px; }
.tf-ld__offer .tf-btn { justify-self: start; height: 42px; }
.tf-ld__paneles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: .86rem; color: var(--ink-soft); }
.tf-ld__paneles a.tf-ld__zone { text-decoration: none; }
/* Ficha: accesos rápidos, solo en pantallas estrechas (11/11/2026) */
.tf-ld__quick { display: none; }
@media (max-width: 860px) {
  .tf-ld__quick { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 2px; scrollbar-width: none; }
  .tf-ld__quick .tf-btn { flex: none; height: 40px; }
}
.tf-ld__card[id] { scroll-margin-top: 80px; }
/* Producto y precio de la tarifa en el presupuesto (11/11/2026) */
.tf-ld__cat { grid-template-columns: 1fr 190px; }
.tf-ld__cat select { width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font: inherit; font-size: .92rem; }
.tf-ld__cathelp { margin: -4px 0 2px; font-size: .82rem; }
@media (max-width: 640px) { .tf-ld__cat { grid-template-columns: 1fr; } }
/* Vista previa del presupuesto (11/11/2026) */
.tf-ld__offerbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-previa { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; }
.tf-previa[open] { display: flex; flex-direction: column; }
.tf-previa::backdrop { background: rgba(10,10,12,.55); }
.tf-previa__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; }
.tf-previa__top strong { display: block; font-size: 1.02rem; }
.tf-previa__asunto { display: block; margin-top: 3px; color: var(--ink-soft); font-size: .86rem; }
.tf-previa__asunto b { color: var(--ink); font-weight: 600; }
.tf-previa__x { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink-soft);
  font-size: 1.3rem; line-height: 1; cursor: pointer; }
.tf-previa__x:hover { color: var(--ink); border-color: var(--ink-soft); }
.tf-previa__nota { margin: 0 18px 10px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); color: var(--ink-soft); font-size: .84rem; }
.tf-previa__marco { flex: 1 1 auto; width: 100%; min-height: 0; height: 62vh; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f4f4f5; }
.tf-previa__pie { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; }
.tf-previa__pie .tf-btn { height: 42px; }

@media screen and (max-width: 900px) {
  .pp-hours-wrap { grid-template-columns: 1fr; }
  .pp-hours__opts { grid-template-columns: 1fr; }
  .pp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-map-wrap { grid-template-columns: 1fr; }
  .pp-tr { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .pp-tr--head { display: none; }
}
@media screen and (max-width: 760px) {
  .pp { padding: 16px 14px 20px; border-radius: var(--r); }
  .pp-tr { grid-template-columns: 1fr; gap: 4px; }
  .pp-cal { grid-template-columns: 44px repeat(var(--dias), minmax(64px, 1fr)); overflow-x: auto; }
}

/* Ficha: el equipo que le interesa, cambiable (12/11/2026) */
.tf-ld__equipo { margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--line-soft); }
.tf-ld__equipo .tf-ld__help { margin: 0 0 4px; font-size: .84rem; }

/* «Mi empresa» del Partner-Panel (12/11/2026): datos con los que firma sus correos al cliente */
.pp-company .pp-hours__opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pp-company input[type=file] { height: auto; padding: 8px 10px; }
.pp-company__logo { justify-self: start; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff; }
.pp-company__logo img { display: block; max-height: 56px; max-width: 220px; }
.pp-company__del { display: flex; gap: 8px; align-items: center; font-size: .84rem; color: var(--ink-soft); }
.pp-company__firma { display: grid; gap: 2px; justify-items: start; padding: 16px 18px; border-radius: 12px; background: #fff; color: #2B2D33; font-size: .9rem; }
.pp-company__firma p { margin: 0 0 8px; }
.pp-company__firma img { max-height: 48px; max-width: 180px; margin: 0 0 8px; }
.pp-company__firma strong { color: #0B0B0D; }
.pp-company__firma span { font-size: .8rem; color: #7A7C82; }
.pp-company__firma .pp-company__contacto { color: #2B2D33; }
.pp-company__nota { margin: 10px 0 0; font-size: .8rem; }
@media (max-width: 760px) { .pp-company .pp-hours__opts { grid-template-columns: 1fr; } }

/* «Asignado a» y «Cita cerrada» (12/11/2026, Grunert) */
.pp-lead small.pp-resp { color: var(--ink-soft); }
.pp-ev--termin { background: rgba(53, 196, 122, .2); border-color: rgba(53, 196, 122, .6); }
.pp-dot--termin { background: #35c47a; }
.tf-ld__resp { margin: 0 0 4px; font-size: 1rem; }
.tf-ld__asig { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 6px; }
.tf-ld__asig select, .tf-ld__tmform select { height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); font: inherit; font-size: .92rem; }
.tf-ld__asig select { flex: 1 1 180px; min-width: 0; }
.tf-ld__tmform select { width: 100%; }
.tf-ld__asig select:focus, .tf-ld__tmform select:focus { outline: 0; border-color: var(--accent); }
.tf-ld__termin { margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(53, 196, 122, .45); background: rgba(53, 196, 122, .08); }
.tf-ld__termin.is-past { border-color: var(--line-soft); background: transparent; }
.tf-ld__termin p { margin: 0 0 6px; }
.tf-ld__termin-when { font-size: 1.1rem; }
.tf-ld__termin-nota { white-space: normal; color: var(--ink-soft); }
.tf-ld__tmform [hidden] { display: none !important; }
.tf-ld__check { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 4px; cursor: pointer; }
.tf-ld__check input { margin-top: 4px; }
.tf-tmok { max-width: 460px; }
.tf-tmok__body { padding: 4px 18px 8px; }
.tf-tmok__body p { margin: 0 0 8px; }
.tf-tmok__quien { font-weight: 700; }
.tf-tmok__cuando { font-size: 1.15rem; font-weight: 700; }
.tf-ld__tmform .tf-ld__addrrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Foto de la tarjeta de visita en la ficha del lead (13/11/2026, Grunert) */
.tf-ld__tarjeta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.tf-ld__tjfoto { display: inline-block; margin-bottom: 6px; }
.tf-ld__tjfoto img { display: block; max-width: 240px; max-height: 150px; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.tf-ld__tjbtn { margin-top: 4px; }
.tf-ld__tarjeta .tf-ld__help { margin: 10px 0 0; line-height: 1.45; }   /* separado del botón (13/11/2026, Manuel) */
.tf-tj { max-width: 560px; }
.tf-tj__estado { margin: 6px 18px 18px; }
.tf-tj__estado.is-error { color: #e34948; font-weight: 600; }
.tf-tj__form { display: flex; flex-direction: column; min-height: 0; }
.tf-tj__form[hidden], .tf-tj__estado[hidden] { display: none; }
.tf-tj__filas { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 18px; }
.tf-tj__fila { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tf-tj__fila:last-child { border-bottom: 0; }
.tf-tj__k { color: var(--ink-soft); font-size: .85rem; font-weight: 700; }
.tf-tj__ya { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.tf-tj__igual { margin: 0; color: var(--ink-soft); font-size: .9rem; overflow-wrap: anywhere; }
.tf-tj__ops { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; }
.tf-tj__ops label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tf-tj__in:disabled { opacity: .45; }
.tf-tj__nada { margin: 4px 0 12px; }

/* =====================================================================================
   MÓVIL (13/11/2026): repaso de todo el panel en el móvil (lo pidieron los distribuidores).
   Solo pantallas estrechas; en el ordenador todo sigue igual salvo la agenda/regiones nuevas.
   ===================================================================================== */

/* -- Ficha: nada puede ensanchar la página (la fila «CP + Ciudad» la ensanchaba a 399 px en un móvil de 375) -- */
.tf-ld__col { min-width: 0; }
.tf-ld__addrrow { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); }
.tf-ld__addrrow > *, .tf-ld__addrrow input { min-width: 0; }
.tf-ld__addrform input:not([type=checkbox]):not([type=radio]), .tf-ld__tmform select { width: 100%; min-width: 0; }
.tf-ld__tmform .tf-ld__addrrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tf-ld__offerrow { grid-template-columns: minmax(0, 1fr) minmax(0, 170px); }
@media screen and (max-width: 860px) { .tf-ld__grid { grid-template-columns: minmax(0, 1fr); } }

/* -- Ficha: accesos rápidos con icono (en tableta, en línea; en el móvil, barra fija abajo) -- */
.tf-ld__quick .tf-btn svg { flex: none; }
.tf-previa { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }

/* -- Agenda de llamadas y regiones con leads (la agenda solo se ve en el móvil) -- */
.pp-agenda { display: none; }
.pp-reglist { display: grid; gap: 4px; width: 100%; max-width: 360px; }
.pp-reglist .pp-map-title { margin-bottom: 4px; }
.pp-reglist a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 0 14px;
  border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .9rem; }
.pp-reglist a:hover { border-color: var(--muted); }
.pp-reglist b { font: 700 .85rem var(--mono); }
.pp-rw { position: relative; }
.pp-call { display: none; }
.tf-ld__fbtn { display: none; }
.pp-dias-m { display: none; }

@media screen and (max-width: 760px) {
  /* Ninguna casilla con letra de menos de 16 px: el iPhone ampliaba la pantalla al tocarlas */
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=hidden]), select, textarea { font-size: 16px !important; }

  /* ---- Partner-Panel: cabecera compacta ---- */
  .pp { padding: 14px 12px 18px; }
  .pp::before { width: 360px; height: 360px; right: -140px; top: -150px; }
  .pp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id" "pais" "filt"; gap: 10px; align-items: center; margin-bottom: 12px; }
  .pp-head__id { display: contents; }
  .pp-head__id > div:first-child { grid-area: id; min-width: 0; }
  .pp-head__title { font-size: 1.05rem; }
  .pp-head__who { font-size: .86rem; }
  .pp-paises { grid-area: pais; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
  .pp-paises a { justify-content: center; min-height: 40px; padding: 0 8px; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; }
  .pp-head__filters { grid-area: filt; }
  .pp-head__filters select { height: 40px; flex: 1 1 auto; }
  .pp-head__filters select[name=dias] { display: none; }   /* el periodo, en «Filtros» (.pp-dias-m) */
  .pp-head__filters:not(:has(select[name=z])) { display: none; }
  .pp-legend { display: block; line-height: 2; }
  .pp-legend .pp-dot { margin: 0 6px 0 12px; }
  .pp-legend .pp-dot:first-child { margin-left: 0; }

  /* Las cifras: una fila de cuatro, sin ocupar media pantalla */
  .pp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; border-radius: 10px; }
  .pp-kpi { padding: 8px 8px 9px; gap: 2px; align-content: start; }
  .pp-kpi strong { font-size: 1.15rem; order: -1; }
  .pp-kpi span { font-size: .72rem; line-height: 1.2; }

  /* Las pestañas: todas a la vista (antes «Mapa» quedaba escondida a la derecha) */
  .pp-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; margin-bottom: 14px;
    border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); overflow: visible; }
  .pp-tabs a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 4px; border-radius: 9px;
    font-size: .8rem; line-height: 1.15; text-align: center; white-space: normal; overflow-wrap: anywhere; hyphens: auto; }
  .pp-tabs a.is-active { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
  .pp-tabs a.is-active::after { display: none; }

  /* Filtros y estados: más fáciles de tocar */
  .pp-filtros-btn { height: 40px; font-size: .9rem; }
  .pp-state { height: 36px; padding: 0 12px; font-size: .86rem; }
  .pp-state span { font-size: .78rem; }
  .pp-marca { height: 38px; }
  .pp-search input, .pp-search select { height: 42px; max-width: none; }
  .pp-dias-m { display: block; }
  .pp-head { grid-template-columns: minmax(0, 1fr); }
  .pp-btn { height: 40px; }

  /* La lista: cada lead, una tarjeta de tres líneas con su botón de llamar */
  .pp-table { gap: 8px; }
  .pp-tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lead fecha" "int int" "st reg"; gap: 6px 10px;
    padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
  a.pp-tr.is-new { box-shadow: inset 3px 0 0 var(--accent); }
  .pp-tr > :nth-child(1) { grid-area: lead; }
  .pp-tr > :nth-child(2) { grid-area: int; }
  .pp-tr > :nth-child(3) { grid-area: st; min-width: 0; }
  .pp-tr > :nth-child(4) { grid-area: fecha; align-self: start; font-size: .8rem; }
  .pp-tr > :nth-child(5) { grid-area: reg; justify-content: flex-end; min-width: 0; font-size: .84rem; }
  .pp-lead strong { font-size: .98rem; }
  .pp-lead small { font-size: .84rem; }
  .pp-chip { height: 26px; font-size: .8rem; }
  .pp-rw.has-call .pp-tr { padding-right: 66px; }
  .pp-call { display: grid; place-items: center; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
  .tf--efitaller .pp-call { color: #1f1f1f; }
  .pp-call:active { transform: translateY(-50%) scale(.94); }

  /* Llamadas: agenda por días en vez de la rejilla de la semana */
  .pp-cal { display: none; }
  .pp-cal-head { gap: 8px; }
  .pp-cal-head strong { width: 100%; }
  .pp-cal-head .pp-btn { flex: 1 1 0; justify-content: center; }
  .pp-agenda { display: grid; gap: 6px; }
  .pp-agenda__dia { margin: 10px 0 2px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .pp-agenda__dia.is-today { color: var(--ink); }
  .pp-agenda__item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 52px; padding: 8px 12px;
    border: 1px solid var(--line-soft); border-left: 3px solid var(--info); border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
  .pp-agenda__item--distribuidor { border-left-color: var(--accent); }
  .pp-agenda__item--termin { border-left-color: #35c47a; }
  .pp-agenda__item b { font: 600 .95rem var(--mono); }
  .pp-agenda__item span { display: grid; min-width: 0; }
  .pp-agenda__item strong, .pp-agenda__item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pp-agenda__item small { color: var(--muted); font-size: .84rem; }
  .pp-legend { font-size: .84rem; }

  /* Horario de llamadas: cada franja a lo ancho */
  .pp-week__day { grid-template-columns: 44px minmax(0, 1fr); padding: 10px; }
  .pp-week__slots { display: grid; gap: 6px; }
  .pp-slot { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
  .pp-slot input { width: 100%; min-width: 0; height: 40px; }
  .pp-free__h { font-size: .8rem; }

  /* Mapa: casillas un poco más grandes y la lista de regiones para tocar */
  .pp-map { gap: 3px; }
  .pp-tile b { font-size: .74rem; }
  .pp-tile span { font-size: .74rem; }
  .pp-map-side { margin-top: 4px; }
  .pp-reglist { max-width: none; }
  .rp-checks label { min-height: 36px; }
  .rp input[type=checkbox] { width: 20px; height: 20px; }
  .rp-chips button { min-height: 36px; padding: 6px 12px; }
  .rp-link { min-height: 36px; font-size: .9rem; }

  /* ---- Lista normal (zonas sin Partner-Panel): filtros plegados, tarjetas compactas ---- */
  .tf-ld__fbtn { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
  .tf-ld__fbtn::after { content: "▾"; margin-left: 7px; font-size: .8rem; }
  .tf-filtros-on .tf-ld__fbtn::after { content: "▴"; }
  .tf-ld__fbtn.has-items { border-color: var(--accent); background: var(--accent-soft); }
  .tf-ld__filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .tf-ld__filters > .tf-field:not(.tf-ld__search) { grid-column: 1 / -1; }
  .tf-ld__filters select { width: 100%; min-width: 0; }
  body:not(.tf-filtros-on) .tf-ld__filters > .tf-field:not(.tf-ld__search) { display: none; }
  .tf-ld__search > span { display: none; }
  .tf-ld__go { padding: 0 14px; }
  .tf-ld__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who when" "what what" "where tags"; gap: 6px 10px; }
  .tf-ld__who { grid-area: who; min-width: 0; }
  .tf-ld__when { grid-area: when; align-self: start; font-size: .8rem; }
  .tf-ld__when .tf-muted { display: none; }
  .tf-ld__what { grid-area: what; }
  .tf-ld__where { grid-area: where; min-width: 0; }
  .tf-ld__row .tf-ld__tags { grid-area: tags; justify-content: flex-end; }

  /* ---- Ficha del lead ---- */
  .tf-ld__dl a { display: inline-block; padding: 4px 0; }
  .tf-ld__addredit > summary { display: flex; align-items: center; min-height: 44px; }
  .tf-ld__stbtn { height: 40px; font-size: .88rem; }
  .tf-ld__offerrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tf-ld__cat { grid-template-columns: minmax(0, 1fr); }
  .tf-ld__cat select { min-width: 0; }
  .tf-ld__check input { width: 20px; height: 20px; flex: none; }
  .tf-ld__card[data-plegar] > .tf-ld__h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; cursor: pointer; }
  .tf-ld__card[data-plegar] > .tf-ld__h2::after { content: ""; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .15s ease; flex: none; }
  .tf-ld__card.is-plegada > .tf-ld__h2 { margin: 0; }
  .tf-ld__card.is-plegada > .tf-ld__h2::after { transform: rotate(-45deg); }
  .tf-ld__card.is-plegada > :not(.tf-ld__h2) { display: none !important; }
  /* La barra de acciones, fija abajo */
  .tf-ld__quick { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); gap: 0; overflow: visible;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0, 0, 0, .18); }
  .tf-ld__quick .tf-btn { flex-direction: column; gap: 3px; height: auto; min-height: 52px; padding: 6px 2px; border: 0; border-radius: 10px;
    background: none; box-shadow: none; color: var(--ink-soft); font-size: .7rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
  .tf-ld__quick .tf-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tf-ld__quick .tf-btn:active { background: var(--surface-2); }
  .tf-ld__quick .tf-btn--primary { color: var(--accent-text, var(--accent)); }
  .tf--fcar .tf-ld__quick .tf-btn--primary { color: #ff4d57; }
  body:has(.tf-ld__quick) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .tf-ld__card[id] { scroll-margin-top: 70px; }
  /* Ventanas (foto de la tarjeta, cita, vista previa): a lo ancho del móvil */
  .tf-previa { width: calc(100vw - 16px); max-width: none; }

  /* ---- Tarifas: botones de favorito y pedido más grandes ---- */
  .tf-table tr { padding-left: 56px; }
  .tf-star, .tf-cartbtn { width: 40px; height: 40px; }
  .tf-code { padding: 6px 8px; }
}

/* 18/11/2026 (Manuel, viendo el panel de Gran Vía en el móvil):
   1) la pastilla de la zona con varias provincias («Murcia · Alicante · …») salía cortada: si es una sola, que baje de línea;
   2) en «Crear presupuesto», la fecha de «Válido hasta» se salía de su caja en el iPhone. */
.tf-field input[type=date] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; display: block; }
.tf-field input[type=date]::-webkit-date-and-time-value { text-align: left; }
@media screen and (max-width: 760px) {
  .pp-paises:has(> a:only-child) { border-radius: 14px; }
  .pp-paises a:only-child { white-space: normal; overflow: visible; text-overflow: clip; text-align: center; line-height: 1.45;
    padding: 8px 12px; letter-spacing: .04em; }
  .tf-ld__offerrow { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 760px) {
  .pp-head__filters--admin { display: none !important; }   /* 18/11/2026: ver partner.php */
}
