/* ==========================================================================
   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; }
.tf-c-code { width: 1%; white-space: nowrap; }
.tf-c-model { font-weight: 700; min-width: 140px; }
.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: 1%; }
.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); }

/* ---------- 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); }
.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--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-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--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-badge { font: 500 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.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); }
.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); }

.pp-table { display: grid; }
.pp-tr { display: grid; grid-template-columns: minmax(170px, 1.6fr) minmax(90px, .8fr) 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; }

.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; }

/* Talleres con dirección: mapa real (Leaflet + OpenStreetMap, en oscuro) y ruta en Google Maps */
.pp-pins { margin-bottom: 22px; }
.pp-pins__head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pp-pins__head .pp-map-title { margin: 0; }
.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(.85) contrast(.9) saturate(.4); }
.pp-leaflet .leaflet-popup-content { font: 13px/1.45 var(--font); color: #16171a; }
.pp-leaflet .leaflet-control-attribution { background: rgba(0,0,0,.55); color: #aaa; }
.pp-leaflet .leaflet-control-attribution a { color: #ccc; }

/* 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; }
.pp-route { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 0 0 10px; }
.pp-route .pp-field input { width: min(320px, 72vw); }
.pp-route .pp-btn { height: 38px; }
.pp-route__res { font-size: .88rem; color: var(--ink-soft); padding-bottom: 9px; }
.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; }

@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; }
}
