/*
 * Jace's visual base: Handy a Bordo's tokens, auth card, buttons and flash
 * (rails/app/assets/stylesheets/application.css in handy-v2-poly), with Jace's
 * own brand color for the mark and the focus ring. The dark theme (Jace #2676)
 * redefines these tokens under `:root[data-theme="dark"]`, below: a rule names
 * a token, never a fixed neutral, so it reads in both themes.
 */

:root {
  --background: #fdf8f3;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --card-foreground: #0a0a0a;
  --muted: #f5f5f4;
  --muted-foreground: #737373;
  --border: #e7e5e4;
  --input: #d6d3d1;
  --ring: #a8a29e;
  --primary: #171717;
  --primary-foreground: #fafafa;
  /* red-700: white on it is 6.52:1 (Handy's AA fix). */
  --destructive: #b91c1c;
  --destructive-foreground: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  /* Jace: teal-700 with white is 5.47:1. */
  --brand: #0f766e;
  --brand-foreground: #ffffff;
  /* The brand as text: the same teal, lighter in the dark theme. */
  --brand-ink: var(--brand);
  /* Jace's light green: the avatar's background when Google has no photo. */
  --brand-soft: color-mix(in srgb, var(--brand) 14%, var(--card));
  /* Shared by the incident lists and the global creation button, and the
     green of every button that creates, saves or confirms (Jace #2718). */
  --creation-green: #2D7A4F;
  --creation-green-hover: #256742;
  --creation-green-foreground: #FFFFFF;
  --creation-ink: #1E2725;
  --creation-beige: #F1EDE6;
  --creation-pressed: var(--creation-ink);
  /* Links: the brand; hover darkens it to teal-800. */
  --link: var(--brand);
  --link-hover: #115e59;
  --radius: 8px;
  --shadow: 0 1px 2px rgb(15 23 42 / 5%), 0 10px 28px rgb(15 23 42 / 6%);
  /* Jace's own neutrals: text inks, surfaces and lines of the lists, panels
     and forms. Each keeps its light value; the dark theme redefines it. */
  --ink-soft: #3D4744;
  --ink-slate: #505A55;
  --ink-muted: #5F6B68;
  --ink-stone: #5F5E5A;
  --ink-gray: #6B6F6A;
  --ink-faint: #8A938F;
  --ink-faintest: #A9B1AE;
  --ink-teal: #2E6E64;
  --ink-green: #2D7A4F;
  --ink-red: #B3261E;
  --surface-mint: #E4EDEA;
  --surface-mint-soft: #F4F8F7;
  --surface-mint-strong: #D6E5E0;
  --surface-sand-soft: #F6F3EE;
  --surface-sand-faint: #FAF7F2;
  --surface-sand-strong: #E6E1D8;
  --surface-cream: #F7F3EC;
  --surface-stone: #F3EFE8;
  --surface-linen: #EFEAE2;
  --surface-gray: #F3F4F6;
  --surface-gray-strong: #E5E7EB;
  --line-sand: #E7E2DA;
  --line-sand-soft: #F0ECE6;
  --line-sand-dim: #E3DDD3;
  --line-sand-strong: #D9D3CA;
  --line-linen: #EEE8DF;
  /* Jace's official tones for badges, tags, status chips and their dots
     (Jace #2718): a light fill, its ink (AA, 5:1 or more) and a solid for
     the dot. A badge or a button names one of these tokens, never a loose
     color. The dark theme keeps them: a pastel chip reads alike. */
  --tone-danger-bg: #FBE3E1;
  --tone-danger-ink: #9B2C24;
  --tone-danger-solid: #B3261E;
  --tone-danger-line: #F2C4C0;
  --tone-warning-bg: #FDF1DC;
  --tone-warning-ink: #8A5A0B;
  --tone-warning-solid: #C7811A;
  --tone-success-bg: #DDF3E6;
  --tone-success-ink: #1F6B41;
  --tone-success-solid: #2D8A55;
  --tone-info-bg: #E3EEFB;
  --tone-info-ink: #1E4E9C;
  --tone-info-solid: #2F6FD6;
  /* «Nuevo» of an escalation (Jace #2397). */
  --tone-new-bg: #E6F1FB;
  --tone-new-ink: #0C447C;
  /* The semáforo's yellow: risk «Media» and the passives. */
  --tone-yellow-bg: #FFF3C4;
  --tone-yellow-ink: #7A5200;
  --tone-yellow-solid: #E0B400;
  --tone-neutral-solid: #8A938F;
  /* Two more statuses of a request (Jace #1842) and «Usabilidad» (Jace #2395). */
  --tone-cyan-bg: #CFFAFE;
  --tone-cyan-ink: #155E75;
  --tone-orange-bg: #FED7AA;
  --tone-orange-ink: #9A3412;
  /* «En desarrollo» of a request (Jace #2958). */
  --tone-amber-bg: #FCEBD5;
  --tone-amber-ink: #8A4B08;
  /* A request sent to Basecamp as «Idea de proyecto» or «Mini-idea» (Jace #2961). */
  --tone-idea-bg: #E6EEF3;
  --tone-idea-ink: #34586F;
  --tone-idea-border: #C9D8E2;
  --tone-mini-idea-bg: #FBF0CF;
  --tone-mini-idea-ink: #7A5A00;
  --tone-mini-idea-border: #EBD9A0;
  --tone-mini-idea-spark: #E0B400;
  --tone-clay-bg: #F9ECE7;
  --tone-clay-ink: #712B13;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* The dark theme (Jace #2676): the «Modo oscuro» button beside the bell sets
   `data-theme="dark"` on <html> and a cookie, so the server draws the next
   page dark from the start. Surfaces go dark green-gray, as Jace's ink; text
   stays over 7:1 and the muted inks over 4.5:1 on a card. Pastel chips (a
   priority, a state) keep their light fill and dark text: they read alike. */
:root[data-theme="dark"] {
  --background: #111614;
  --foreground: #E7ECEA;
  --card: #1A201E;
  --card-foreground: #E7ECEA;
  --muted: #242B28;
  --muted-foreground: #A3ADA9;
  --border: #2F3734;
  --input: #3F4845;
  --ring: #6B7672;
  --primary: #E7ECEA;
  --primary-foreground: #111614;
  --destructive: #C62828;
  /* teal-700 stays: a button's fill with white text. */
  --brand-soft: color-mix(in srgb, var(--brand) 30%, var(--card));
  --creation-ink: #E7ECEA;
  --creation-beige: #262D2A;
  --creation-pressed: #3F4A46;
  /* Links: teal-300 over a dark card, 9:1. */
  --link: #6FD1C3;
  --brand-ink: #6FD1C3;
  --link-hover: #A7EADF;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 28px rgb(0 0 0 / 35%);
  --ink-soft: #CBD3D0;
  --ink-slate: #B6BFBB;
  --ink-muted: #A3ADA9;
  --ink-stone: #AEADA8;
  --ink-gray: #A7ABA6;
  --ink-faint: #8C9692;
  --ink-faintest: #6E7874;
  --ink-teal: #6FC2B4;
  --ink-green: #74CF98;
  --ink-red: #F2958C;
  --surface-mint: #1F2E2A;
  --surface-mint-soft: #1C2523;
  --surface-mint-strong: #27403A;
  --surface-sand-soft: #212724;
  --surface-sand-faint: #1E2421;
  --surface-sand-strong: #313935;
  --surface-cream: #232A27;
  --surface-stone: #242A27;
  --surface-linen: #2A312E;
  --surface-gray: #242A28;
  --surface-gray-strong: #2E3532;
  --line-sand: #333B38;
  --line-sand-soft: #2A312E;
  --line-sand-dim: #39413E;
  --line-sand-strong: #434C48;
  --line-linen: #2E3532;
  color-scheme: dark;

  /* Lexxy's editor and rich text read the same tokens. */
  --lexxy-color-ink: var(--foreground);
  --lexxy-color-ink-medium: var(--ink-soft);
  --lexxy-color-ink-light: var(--ink-faint);
  --lexxy-color-ink-lighter: var(--line-sand-strong);
  --lexxy-color-ink-lightest: var(--muted);
  --lexxy-color-ink-inverted: var(--card);
  --lexxy-color-accent-dark: var(--link);
  --lexxy-color-accent-light: #27403A;
  --lexxy-color-accent-lightest: #1F2E2A;
}


* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  /* dvh: 100vh floors the page taller than a phone's visible area. */
  min-height: 100dvh;
  margin: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--background) 92%, var(--card)) 0, var(--background) 240px);
  color: var(--foreground);
  font-feature-settings: "rlig" 1, "calt" 1;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

/* Links: a link without a class is a text link, in the brand color of the
   "Nuevo" button, visited or not. A link with a class is a component (a
   button, a tab, a metric) and draws itself. */
a:not([class]),
a:not([class]):visited {
  color: var(--link);
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:not([class]):hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

a:not([class]):focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Out of running text (a name in a table or a list card), a link underlines only on hover. */
.table a:not([class]):not(:hover),
.history a:not([class]):not(:hover) {
  text-decoration-line: none;
}

/* External links (Crisp, Basecamp, Canny) open in a new tab and say so. */
a[target="_blank"]::after {
  content: "↗";
  margin-left: 2px;
  font-size: 0.85em;
}

button,
input,
textarea {
  font: inherit;
}

/* A long link in a <code> (a survey's address) breaks instead of widening the page. */
code {
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.icon-12 { width: 12px; height: 12px; }
.icon-16 { width: 16px; height: 16px; }

.muted {
  color: var(--muted-foreground);
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Logo */

.jace-logo {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--logo-size) * 0.3);
}

.jace-logo__mark {
  width: var(--logo-size);
  height: var(--logo-size);
}

.jace-logo__word {
  font-size: calc(var(--logo-size) * 0.62);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Sign-in */

.auth-main {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 420px);
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-card__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
  animation: auth-rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card__brand { animation: none; }
}

.auth-card__copy h1,
.auth-card__copy p {
  margin: 0;
}

.auth-card__copy h1 {
  font-size: 24px;
  line-height: 1.15;
  margin-bottom: 8px;
}

.auth-card__copy p,
.auth-card__footer {
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  margin-top: 20px;
}

.auth-card__footer {
  margin-top: 16px;
  font-size: 12px;
}

/* Buttons */

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 1px rgb(15 23 42 / 3%);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.button .icon {
  width: 14px;
  height: 14px;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button--small {
  min-height: 30px;
  font-size: 12px;
}

.button--small .icon {
  width: 12px;
  height: 12px;
}

.button--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.button--primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, var(--foreground));
}

/* Google's own sign-in button guidance: white, its four-color mark, a border. */
.button--google {
  width: 100%;
  min-height: 42px;
  border-color: var(--input);
  background: var(--card);
  color: var(--foreground);
  font-size: 14px;
}

.button--google:hover {
  background: var(--muted);
}

.button--google .google-mark {
  width: 18px;
  height: 18px;
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 32%, transparent);
}

/* Confetti when an incident closes (Jace #1702) */

.confetti {
  position: fixed;
  inset: 0;
  z-index: 1100;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* Flash (Handy's floating pills) */

.flash-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 1000;
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: min(560px, calc(100vw - 32px));
  pointer-events: none;
  transform: translateX(-50%);
}

.flash {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 8px 32px color-mix(in srgb, black 22%, transparent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  pointer-events: auto;
  text-align: center;
  transition: opacity 160ms ease, transform 160ms ease;
  animation: flash-pop-in 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes flash-pop-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .flash { animation: none; }
}

.flash__icon,
.flash__dismiss {
  display: inline-grid;
  place-items: center;
}

.flash__message {
  min-width: 0;
}

.flash__dismiss {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.flash__dismiss:hover {
  background: color-mix(in srgb, currentColor 14%, transparent);
}

.flash--dismissed {
  opacity: 0;
  transform: translateY(-6px);
}

.flash--notice {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
}

.flash--alert {
  border: 1px solid #b91c1c;
  background: #b91c1c;
  color: #ffffff;
}

/* Signed in: the header, the page and its pieces. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.button--ghost {
  background: transparent;
  color: var(--foreground);
  box-shadow: none;
}

.button--ghost:hover,
.button--outline:hover {
  background: var(--muted);
}

.button--outline {
  border-color: var(--input);
  background: var(--card);
  color: var(--foreground);
}

.button--brand {
  background: var(--brand);
  color: var(--brand-foreground);
}

.button--brand:hover {
  background: color-mix(in srgb, var(--brand) 88%, var(--foreground));
}

/* Jace's green: white on it is 5.24:1. Creating, saving, confirming or
   resolving (Jace #1654, #1933); the Principal color opens, changes or edits,
   and red deletes, merges or churns. The same green as «+» (Jace #2718). */
.button--success {
  background: var(--creation-green);
  color: var(--creation-green-foreground);
}

.button--success:hover {
  background: var(--creation-green-hover);
}

/* Soft green: «Avisar» and «Tomar» on the Tablero (Jace #2143). */
.button--soft-success {
  background: var(--tone-success-bg);
  color: var(--tone-success-ink);
}

.button--soft-success:hover {
  background: color-mix(in srgb, var(--tone-success-solid) 14%, var(--tone-success-bg));
}

.button--danger {
  border-color: color-mix(in srgb, var(--destructive) 40%, transparent);
  background: var(--card);
  color: var(--destructive);
}

/* Solid red: an action with consequences, like joining a request to another
   (Jace #1641). */
.button--destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.button--destructive:hover {
  background: color-mix(in srgb, var(--destructive) 88%, var(--foreground));
}

/* Space colors stay in the header and space choices, away from page actions. */
[data-space-identity="handy"] {
  --space-header: #F3FAF7;
  --space-accent: #5DCAA5;
  --space-background: #E1F5EE;
  --space-border: #9FE1CB;
  --space-text: #085041;
  --space-line: 4px;
}

[data-space-identity="a_bordo"] {
  --space-header: #EEF2F7;
  --space-accent: #1E3A5F;
  --space-background: #DCE4EE;
  --space-border: #A9B9CD;
  --space-text: #1E3A5F;
  --space-line: 4px;
}

[data-space-identity="promo"] {
  --space-header: #EEF7FE;
  --space-accent: #0A92F6;
  --space-background: #DCEFFD;
  --space-border: #9DD0FA;
  --space-text: #0A5FA0;
  --space-line: 4px;
}

/* Handoo (Jace #3020). */
[data-space-identity="handoo"] {
  --space-header: #FEF5EE;
  --space-accent: #E5762E;
  --space-background: #FDE8D7;
  --space-border: #F7C39C;
  --space-text: #8F3F0E;
  --space-line: 4px;
}

/* In the dark theme each space keeps its hue, over a dark header. */
[data-theme="dark"] [data-space-identity="handy"] {
  --space-header: #14211D;
  --space-background: #173A30;
  --space-border: #2C6B58;
  --space-text: #8BE3C6;
}

[data-theme="dark"] [data-space-identity="a_bordo"] {
  --space-header: #151B24;
  --space-accent: #6F94C4;
  --space-background: #1F2C3F;
  --space-border: #3D5677;
  --space-text: #AFC6E4;
}

[data-theme="dark"] [data-space-identity="promo"] {
  --space-header: #121D27;
  --space-background: #12324D;
  --space-border: #1F5F92;
  --space-text: #8FCBFA;
}

[data-theme="dark"] [data-space-identity="handoo"] {
  --space-header: #24180F;
  --space-accent: #F0955A;
  --space-background: #45280F;
  --space-border: #8A4A1E;
  --space-text: #F8C49D;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-top: var(--space-line, 0px) solid var(--space-accent, var(--brand));
  border-bottom: 1px solid var(--border);
  background: var(--space-header, color-mix(in srgb, var(--card) 94%, transparent));
  backdrop-filter: blur(8px);
}

.app-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Tight enough for an Administrador's whole bar on one line at 1280px,
     with «Tratos» and the theme button (Jace #2669), and «Solicitudes»
     (Jace #2940) within the 1200 px (Jace #2938). */
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
}

.app-header__brand {
  text-decoration: none;
}

.app-nav {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  gap: 2px;
}

.app-nav__link {
  border-radius: var(--radius);
  /* 6 px at the sides: see .app-header__inner (Jace #2938). */
  padding: 7px 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.app-nav__link:hover {
  background: var(--muted);
  color: var(--foreground);
}

.app-nav__link--active,
.app-nav__link--active:hover {
  background: var(--space-background, color-mix(in srgb, var(--brand) 12%, transparent));
  color: var(--space-text, var(--brand-ink));
}

.app-search {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 8px;
  color: var(--muted-foreground);
}

/* 72px leaves room for every tab of an Administrador, «Tratos» (Jace #2669)
   and «Solicitudes» (Jace #2940) too, with «Handy A Bordo» or «Handy Promo»
   in the 1200 px of the header at 1280px (Jace #2938). */
.app-search input {
  width: 72px;
  border: 0;
  outline: none;
  background: transparent;
  padding: 7px 0;
  color: var(--foreground);
  font-size: 13px;
}

.app-search:focus-within {
  border-color: var(--brand);
}

/* The header's menu of suggestions: groups by kind, five matches each. */
.search-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: min(440px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 6px;
  color: var(--foreground);
  font-size: 13px;
}

.search-menu[hidden] {
  display: none;
}

.search-menu__group + .search-menu__group {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

.search-menu__label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 4px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.search-menu__empty,
.search-menu__hint {
  margin: 0;
  padding: 8px;
  color: var(--muted-foreground);
}

.search-menu__empty p {
  margin: 0 0 8px;
  color: var(--foreground);
}

.search-menu__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-option,
.search-option:visited {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  border-radius: 6px;
  padding: 7px 8px;
  color: var(--foreground);
  text-decoration: none;
}

.search-option:hover,
.search-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--foreground);
}

.search-option__main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-option__meta {
  flex-basis: 100%;
  order: 1;
  color: var(--muted-foreground);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.search-option strong {
  font-weight: 700;
}

.search-option--action {
  border: 1px solid var(--input);
}

.search-option--all {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  color: var(--brand-ink);
  font-weight: 600;
}

/* The bell beside the photo (Jace #1843). */
.app-header__account {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* «Modo oscuro» beside the bell (Jace #2676): the same round button; a moon
   in the light theme, a sun in the dark one. */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--brand);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.theme-toggle .icon {
  width: 20px;
  height: 20px;
}

.theme-toggle[aria-pressed="true"] .theme-toggle__moon,
.theme-toggle[aria-pressed="false"] .theme-toggle__sun {
  display: none;
}

.bell {
  position: relative;
}

.bell__trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

.bell__trigger:hover,
.bell__trigger[aria-expanded="true"] {
  border-color: var(--brand);
}

.bell__trigger:focus-visible,
.bell__item:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.bell__trigger .icon {
  width: 20px;
  height: 20px;
}

/* The count's Turbo wrapper takes no grid row, so the bell stays centered (Jace #2608). */
#notification-count {
  display: contents;
}

.bell__count {
  position: absolute;
  top: 0;
  right: -2px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  background: var(--destructive);
  box-shadow: 0 0 0 2px var(--card);
  color: var(--destructive-foreground);
  font-size: 11px;
  font-weight: 700;
}

.bell__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 96px));
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 8px;
}

.bell__panel[hidden] {
  display: none;
}

.bell__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 10px;
  font-size: 15px;
}

.bell__head small,
.bell__meta,
.bell__empty {
  color: var(--muted-foreground);
  font-size: 13px;
}

.bell__item {
  display: flex;
  gap: 10px;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.bell__item:hover,
.bell__item:focus-visible {
  background: var(--muted);
  color: var(--foreground);
}

.bell__item--unread {
  background: var(--brand-soft);
}

.bell__item--unread .bell__message {
  font-weight: 700;
}

.bell__dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
}

.bell__item--unread .bell__dot {
  background: var(--brand);
}

.bell__meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.bell__empty {
  margin: 0;
  padding: 4px 12px 12px;
}

/* «Ver mis pendientes» (Jace #2726): the foot of the bell, under its notices. */
.bell__foot {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

.bell__pending {
  display: flex;
  justify-content: center;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.bell__pending:hover,
.bell__pending:focus-visible {
  background: var(--muted);
}

.bell__pending:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* On a phone the list takes the header's width. */
@media (max-width: 640px) {
  .app-header__inner {
    position: relative;
  }

  .bell {
    position: static;
  }

  .bell__panel {
    top: calc(100% + 4px);
    right: 16px;
    left: 16px;
    width: auto;
  }
}

.profile-menu {
  position: relative;
}

.profile-menu__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--space-border, transparent);
  border-radius: 999px;
  background: var(--space-background, transparent);
  padding: 2px 2px 2px 12px;
  color: var(--space-text, var(--foreground));
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.profile-menu__trigger:hover,
.profile-menu__trigger[aria-expanded="true"] {
  border-color: var(--space-text, var(--brand-ink));
}

.profile-menu__space {
  white-space: nowrap;
}

.profile-menu__trigger:focus-visible,
.profile-menu__item:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.profile-menu__item:focus-visible {
  outline-offset: -2px;
}

.profile-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-top: var(--space-line, 1px) solid var(--space-accent, var(--border));
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 8px;
}

.profile-menu__panel[hidden] {
  display: none;
}

.profile-menu__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 8px;
  text-align: center;
}

.profile-menu__profile .avatar {
  margin-bottom: 6px;
}

.profile-menu__name {
  font-size: 15px;
}

.profile-menu__email,
.profile-menu__heading {
  color: var(--muted-foreground);
  font-size: 13px;
}

.profile-menu__email {
  overflow-wrap: anywhere;
}

.profile-menu__divider {
  margin: 8px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.profile-menu__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
}

.profile-menu__form {
  margin: 0;
}

.profile-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  padding: 10px 12px;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.profile-menu__item:hover,
.profile-menu__item:focus-visible {
  background: var(--muted);
}

/* An item with a second line (Jace #2809): «Desconectar Gmail» and its address. */
.profile-menu__item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-menu__item-hint {
  color: var(--muted-foreground);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.profile-menu__space-item {
  border: 1px solid transparent;
}

.profile-menu__space-item.profile-menu__item--active {
  border-color: var(--space-border, transparent);
  background: var(--space-background, var(--muted));
  color: var(--space-text, var(--foreground));
  font-weight: 600;
}

.profile-menu__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--space-accent, var(--brand));
}

.profile-menu__current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 13px;
  white-space: nowrap;
}

.profile-menu__check {
  flex: none;
  width: 16px;
  height: 16px;
  color: inherit;
}

@media (max-width: 640px) {
  .profile-menu {
    position: static;
  }

  .profile-menu__panel {
    top: calc(100% + 4px);
    right: 16px;
    left: 16px;
    width: auto;
    max-height: calc(100dvh - 100% - 20px);
    overflow-y: auto;
  }
}

.avatar {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 700;
}

.avatar--16 { width: 16px; height: 16px; font-size: 7px; }
.avatar--20 { width: 20px; height: 20px; font-size: 9px; }
.avatar--28 { width: 28px; height: 28px; font-size: 11px; }
.avatar--32 { width: 32px; height: 32px; font-size: 12px; }
.avatar--36 { width: 36px; height: 36px; font-size: 13px; }
.avatar--80 { width: 80px; height: 80px; font-size: 26px; }

.avatar__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--fallback .avatar__photo {
  display: none;
}

/* A user's name with their avatar before it, inside a line of text. */
.person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.field select,
.field input,
.field textarea,
.inline-form select,
.inline-form input,
.inline-number input[type="number"] {
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  padding: 7px 9px;
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
}

.app-main {
  max-width: 1200px;
  margin: 0 auto;
  /* 120px free at the end, so the floating button covers no last row (Jace #2010). */
  padding: 24px 16px 120px;
}

/* A page whose wide block takes the window's width, the CRM's Kanban (Jace
   #2938): everything else keeps the 1168 px column of every other page. */
.app-main.wide-page {
  max-width: none;
}
.app-main.wide-page > :not(.wide-page__block, .back-button) {
  max-width: 1168px;
  margin-right: auto;
  margin-left: auto;
}
/* «Regresar» is inline: it keeps its 8 px to the left of that column. */
.app-main.wide-page > .back-button {
  margin-left: max(-8px, calc((100% - 1168px) / 2 - 8px));
}

/* «Regresar» above each screen's head (Jace #1622). */
.back-button {
  margin: -8px 0 12px -8px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

/* The action at the top right, beside the title, when the head is tall. */
.page-head--top {
  align-items: flex-start;
}

.page-head h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 16px;
}

/* Grids stacked one under another keep the same column width, even when one
   has fewer cards (the two blocks of a company's profile, Jace #3060). */
.columns--aligned {
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
}

.panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.panel h2 small {
  color: var(--muted-foreground);
  font-weight: 500;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 14px 16px;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}

/* The whole card is the link: hover tints all of it. */
.metric:hover,
.metric.attention-row:hover {
  border-color: color-mix(in srgb, var(--link) 40%, var(--border));
  background: color-mix(in srgb, var(--link) 6%, var(--card));
}

.metric:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.metric__value {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric__label {
  color: var(--muted-foreground);
  font-size: 13px;
}

.metric--alert .metric__value {
  color: var(--destructive);
}

.metric__value--empty {
  color: var(--muted-foreground);
  font-size: 18px;
  font-weight: 600;
}

.metric__change {
  color: var(--muted-foreground);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Reportes: sections of metrics and charts, in the Tablero's pastel tones
   (Jace #1760). */
:root {
  --chart-amber: #d97706;
}

.report-period {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip,
.chip:visited {
  border: 1px solid var(--input);
  border-radius: 999px;
  background: var(--card);
  padding: 4px 10px;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--brand);
}

.chip--active,
.chip--active:visited {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-foreground);
}

.report-section {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.report-section > h2 {
  margin: 0;
  font-size: 18px;
}

/* Narrower cards than elsewhere: two per row on a phone. */
.report-section .metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  margin-bottom: 0;
}

.chart-note {
  margin: 0 0 10px;
  font-size: 13px;
}

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

.bars__row {
  display: grid;
  grid-template-columns: minmax(90px, 30%) 1fr 3ch;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.bars__label {
  color: var(--muted-foreground);
}

.bars__track {
  height: 14px;
  border-radius: 4px;
  background: var(--muted);
}

.bars__bar {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 4px;
}

.bars__value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

/* The funnel: each stage centered, so the bars narrow down the page. */
.bars--funnel .bars__track {
  display: flex;
  justify-content: center;
  height: 22px;
  background: none;
}

.bars--funnel .bars__bar {
  border-radius: 3px;
}

.stacked {
  display: grid;
  gap: 10px;
}

.stacked__bar {
  display: flex;
  height: 22px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--muted);
}

.stacked__part {
  display: block;
  height: 100%;
}

.lines {
  display: grid;
  gap: 8px;
}

.lines__svg {
  width: 100%;
  height: auto;
}

.lines__grid {
  stroke: var(--border);
  stroke-width: 1;
}

.lines__axis {
  fill: var(--muted-foreground);
  font-size: 11px;
}

.lines__line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  list-style: none;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

@media (max-width: 640px) {
  .report-period {
    justify-items: start;
  }
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
}

.table td {
  border-bottom: 1px solid var(--border);
  padding: 9px 8px;
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* A last column with one icon per row, such as the pencil of Bajas (Jace #2019). */
.table .table__actions {
  width: 1%;
  padding-block: 4px;
  text-align: right;
  white-space: nowrap;
}

/* The row a link opened, such as «Ver seguimiento» in Encuestas. */
.table tr:target td {
  background: var(--brand-soft);
}

/* The filter over a list's table and its sortable headers. */
.list-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(360px, 100%);
  margin-bottom: 12px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 9px;
  color: var(--muted-foreground);
}

.list-filter:focus-within {
  border-color: var(--brand);
}

.list-filter input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 7px 0;
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
}

.table tr[hidden],
.empty[hidden] {
  display: none;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-button::after {
  content: "↕";
  opacity: 0.5;
}

th[aria-sort="ascending"] .sort-button::after {
  content: "↑";
  opacity: 1;
}

th[aria-sort="descending"] .sort-button::after {
  content: "↓";
  opacity: 1;
}

.sort-button:hover,
th[aria-sort] .sort-button {
  color: var(--foreground);
}

.code {
  color: var(--muted-foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge--info { background: var(--tone-info-bg); color: var(--tone-info-ink); }
.badge--warn { background: var(--tone-warning-bg); color: var(--tone-warning-ink); }
.badge--ok { background: var(--tone-success-bg); color: var(--tone-success-ink); }
.badge--danger { background: var(--tone-danger-bg); color: var(--tone-danger-ink); }
/* «Nuevo» of an escalation, in blue: red stays for what is late or urgent (Jace #2397). */
.badge--new { background: var(--tone-new-bg); color: var(--tone-new-ink); }
/* A follow-up past its deadline without contact (Jace #1581). */
.due--overdue { color: var(--destructive); font-weight: 600; }
/* A reminder of Recordatorios past its date, in red (Jace #1938). */
.badge--muted { background: var(--muted); color: var(--muted-foreground); }
/* Two more tones for the statuses of a request (Jace #1842). */
.badge--cyan { background: var(--tone-cyan-bg); color: var(--tone-cyan-ink); }
.badge--orange { background: var(--tone-orange-bg); color: var(--tone-orange-ink); }
.badge--amber { background: var(--tone-amber-bg); color: var(--tone-amber-ink); }

/* A request's status changed at the top right of its page (Jace #1842): the
   badge itself is the select, with its arrow, as tall as the buttons beside it. */
.inline-form select.status-select {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 28px 8px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='currentColor' stroke-width='1.5' opacity='.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.inline-form select.status-select.badge--info { background-color: var(--tone-info-bg); color: var(--tone-info-ink); }
.inline-form select.status-select.badge--warn { background-color: var(--tone-warning-bg); color: var(--tone-warning-ink); }
.inline-form select.status-select.badge--cyan { background-color: var(--tone-cyan-bg); color: var(--tone-cyan-ink); }
.inline-form select.status-select.badge--orange { background-color: var(--tone-orange-bg); color: var(--tone-orange-ink); }
.inline-form select.status-select.badge--ok { background-color: var(--tone-success-bg); color: var(--tone-success-ink); }
.inline-form select.status-select.badge--muted { background-color: var(--muted); color: var(--muted-foreground); }

.inline-form select.status-select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.status-select option {
  background: var(--card);
  color: var(--foreground);
}
.badge--simulated { background: var(--creation-beige); color: var(--ink-soft); }

.empty {
  margin: 0;
  border: 1px dashed var(--input);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--muted-foreground);
  font-size: 13px;
  text-align: center;
}

/* An empty state with its button below (Campañas NPS). */
.empty--action {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 32px 20px;
  font-size: 14px;
}

.empty--action p {
  max-width: 440px;
  margin: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* A tab is a link without a class: :visited and :hover keep it a tab. */
.tabs a,
.tabs a:visited,
.tabs a:hover {
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  padding: 8px 10px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.tabs a[aria-current="page"] {
  border-color: var(--brand);
  color: var(--foreground);
}

/* The marks beside a menu entry, a tab or a filter (Jace #1951): a dot
   without a number, in Jace's color for something new or red for something
   overdue or nobody took; and the counter, a grey number without a bubble.
   Vencidos's counter is the only red one; a chosen filter's takes its text's
   color. */
.indicator-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 999px;
  vertical-align: 2px;
}

.indicator-dot--new { background: var(--brand); }
.indicator-dot--urgent { background: var(--destructive); }

.tab-count {
  margin-left: 6px;
  color: var(--muted-foreground);
  font-size: 0.85em;
  font-weight: 500;
}

.tab-count--overdue { color: var(--destructive); font-weight: 600; }
.chip--active .tab-count { color: inherit; }

/* A row that opens its window on a click (Jace #1951). */
/* Positioned, so its hidden header text stays inside the table's scroll. */
.table--rows-open { position: relative; }
.table--rows-open tbody tr { cursor: pointer; }
.table--rows-open tbody tr:hover > td { background: var(--muted); }

.reminder-window__closing {
  margin-bottom: 16px;
  border-radius: var(--radius);
  padding: 12px;
  background: var(--muted);
}

.reminder-window h3 { margin: 16px 0 8px; font-size: 14px; }
.reminder-window__closing h3 { margin-top: 0; }

/* The filters of the Historial general (Jace #2117): one row, each with its
   label above; on a narrow screen they wrap whole, never shrink. */
.history-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 16px;
}

.history-filters__field { display: grid; gap: 6px; flex: 0 0 auto; max-width: 100%; }
.history-filters__field--author,
.history-filters__field--kind { width: 200px; }
.history-filters__field--period { width: 280px; }
.history-filters__field--q { width: 300px; }

.history-filters__field > label,
.history-filters__label {
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
}

.history-filters select,
.history-filters__period,
.history-filters__search {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
}

.history-filters select { padding: 0 10px; }

.history-filters__period,
.history-filters__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  text-align: left;
}

.history-filters__period { cursor: pointer; }
.history-filters__period > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.history-filters__period .icon,
.history-filters__search .icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--ink-muted); }
.history-filters__period:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 1px; }
.history-filters__search:focus-within { border-color: var(--brand); }

.history-filters__search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
}

.history-filters__actions { display: flex; align-items: center; gap: 8px; }

/* «Pendientes» (Jace #2726): the dates are chips with their box, several at
   once; the chip of a checked one is filled, also before the page reloads. */
.pending-filters__dates { margin: 0; border: 0; padding: 0; min-width: 0; }
.pending-filters__dates .chips { min-height: 40px; align-items: center; }
.pending-filters__dates .chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pending-filters__dates .chip:has(input:checked) { border-color: var(--brand); background: var(--brand); color: var(--brand-foreground); }
.pending-filters__dates .chip:focus-within { outline: 2px solid var(--ink-teal); outline-offset: 1px; }
.pending-filters__dates input { margin: 0; accent-color: var(--brand-foreground); }
/* What the date leaves out, under the list, with «Ver todo». */
.pending-list__hidden { margin: 0; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 13px; }
.pending-list__hidden a { color: var(--brand-ink); font-weight: 600; }

.history-filters__empty {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-sand-soft);
  color: var(--ink-muted);
  font-size: 14px;
}

/* A follow-up's filters and its «Registrar contacto» form (Jace #1582). */
.filters { flex-wrap: wrap; margin-bottom: 12px; }
.contact-form { margin-top: 12px; }
.contact-form > summary { list-style: none; width: fit-content; }
.contact-form > summary::-webkit-details-marker { display: none; }
.contact-form[open] > summary { margin-bottom: 12px; }

/* The semáforo of the Cartera CS (Jace #1586): Jace's green, amber and red,
   beside a company's name. */
.traffic-light {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
  vertical-align: 0;
}

.traffic-light--green { background: var(--success); }
.traffic-light--yellow { background: var(--chart-amber); }
.traffic-light--red { background: var(--destructive); }

.page-head h1 .traffic-light {
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: 2px;
}

/* The tab Customer Success (Jace #1628): the kind of portfolio and of
   operation beside the name, and the summary cards, which are not links. */
.cs-title .badge {
  margin-left: 6px;
  vertical-align: 4px;
}

.metric--static:hover,
.metric.attention-row.metric--static:hover {
  border-color: var(--border);
  background: var(--card);
}

.cs-summary .metric__value {
  font-size: 20px;
}

.metric__change--down {
  color: var(--destructive);
  font-weight: 600;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The support risk under a company's name. */
.support-risk {
  display: block;
}

/* The filters of the Cartera CS (Jace #1588): colors, owner and «Agregar compañía». */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.portfolio-filters__owner {
  font-size: 13px;
  font-weight: 600;
}

.next-call .hint,
.contract-end .badge {
  display: block;
  width: fit-content;
  margin-top: 2px;
}

/* The colors to pick, each a dot with its name. */
.traffic-light-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.traffic-light-choices label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.traffic-light-choices .traffic-light {
  margin-right: 0;
}

/* The dot and its color, in the profile and the company's Customer Success;
   without a pencil since Jace #2073. */
.traffic-light-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.traffic-light-status .traffic-light {
  margin-right: 0;
}

.traffic-light-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
}

/* The statuses of the renewal cycle as buttons, the current one in teal. */
.renewal-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* minmax(0, 1fr): a field never widens its form. Rails gives a text field
   with maxlength the same size (200 characters), which is 1600px wide. */
.form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 720px;
}

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  font-size: 13px;
}

.field input:not([type="checkbox"], [type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
}

.field label,
.field > span {
  font-weight: 600;
}

.field small,
.hint {
  color: var(--muted-foreground);
  font-size: 12px;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field--check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

/* Two fields at half each (Jace #2073), one under the other on a phone. */
.form-row--halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 540px) { .form-row--halves { grid-template-columns: minmax(0, 1fr); } }
.form-row--halves .date-picker { width: 100%; }

/* «Responsable» with the avatar of the person chosen (Jace #2073). */
.owner-select { position: relative; }
.owner-select__avatar { position: absolute; top: 50%; left: 10px; display: flex; transform: translateY(-50%); pointer-events: none; }
.owner-select select { width: 100%; height: 40px; padding-left: 42px; }

/* A group of fields inside a form, such as the user of a new reminder. */
.form fieldset {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.form legend {
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
}

.form-errors {
  border: 1px solid color-mix(in srgb, var(--destructive) 40%, transparent);
  border-radius: var(--radius);
  background: #fef2f2;
  padding: 10px 14px;
  color: #991b1b;
  font-size: 13px;
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Configuración › Guiones (Jace #1645): one card per question, and the
   script of a call to fill in when closing it. */
.call-script__questions {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding-left: 20px;
}

.call-script__question {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

/* The handle a question is dragged by (Jace #1654). */
.call-script__handle {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 18px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.call-script__handle:hover,
.call-script__handle:focus-visible {
  background: var(--muted);
  color: var(--foreground);
}

.call-script__question.is-dragging {
  border-color: var(--ring);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--foreground) 15%, transparent);
  opacity: 0.9;
}

.call-script__question.is-dragging .call-script__handle {
  cursor: grabbing;
}

/* Configuración › Catálogos (Jace #1863): the catalogs on the left, the
   values of the chosen one on the right. One more catalog is one more link. */
.catalogs {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.catalogs__list h2 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.catalogs__list ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalogs__list a,
.catalogs__list a:visited {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 14px;
  text-decoration: none;
}

.catalogs__list a:hover {
  background: var(--muted);
}

.catalogs__list a[aria-current="page"] {
  background: var(--brand-soft);
  font-weight: 600;
}

.catalogs__list small {
  color: var(--muted-foreground);
}

/* The card of a catalog (Jace #2117): title, description, «+ Agregar» and the
   rows, each with ⋮⋮, name, state, switch and pencil. */
.catalogs__values .catalogs__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}

/* Escalamientos (Jace #2215): one block per area, each with its own
   «+ Agregar» and rows. */
.catalogs__area + .catalogs__area {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.catalogs__area-name {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.catalogs__hint {
  max-width: 820px;
  margin: 0 0 16px;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
}

.catalogs__hint .catalog-grip {
  display: inline-block;
  vertical-align: -2px;
  color: var(--ink-faintest);
}

.catalogs__add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.catalogs__add input[type="text"] {
  height: 40px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 12px;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
}

.catalogs__new-field { width: 420px; }
.catalogs__version-field { width: 160px; }

/* The soft green button of Configuración (Jace #2117): «+ Agregar»,
   «Actualizar», «Copiar URL». */
.button-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-mint);
  color: var(--ink-teal);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.button-soft:hover { background: var(--surface-mint-strong); }
.button-soft .icon { width: 16px; height: 16px; }
.button-soft--small { height: 36px; padding: 0 14px; }

.catalogs__version { margin: 0; }

.catalogs__label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
}

.catalog-rows {
  max-width: 820px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 36px 36px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 0;
  border-top: 1px solid var(--line-sand-soft);
}

.catalog-row__handle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-faintest);
  cursor: grab;
  touch-action: none;
}

.catalog-row__handle:hover,
.catalog-row__handle:focus-visible { background: var(--muted); color: var(--ink-muted); }

.catalog-row.is-dragging { background: var(--muted); }
.catalog-row.is-dragging .catalog-row__handle { cursor: grabbing; }

.catalog-row__name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.catalog-row.is-inactive .catalog-row__name { color: var(--ink-faint); }

.catalog-row__rename { min-width: 0; margin: 0; }
.catalog-row__rename[hidden] { display: none; }

.catalog-row__rename input[type="text"] {
  width: 100%;
  height: 36px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 10px;
  color: var(--foreground);
  font: inherit;
  font-size: 15px;
}

.catalog-row__state {
  color: var(--ink-muted);
  font-size: 13px;
}

.catalog-row__toggle { display: flex; margin: 0; }

.catalog-switch {
  position: relative;
  width: 36px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-sand-strong);
  cursor: pointer;
}

.catalog-switch[aria-checked="true"] { background: var(--creation-green); }

.catalog-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 20%);
}

.catalog-switch[aria-checked="true"] .catalog-switch__thumb { transform: translateX(16px); }
.catalog-switch:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; }

.catalog-row__edit {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-mint);
  color: var(--ink-teal);
  cursor: pointer;
}

/* While the name is a field, the pencil keeps its place. */
.catalog-row__edit[hidden] { display: grid; visibility: hidden; }
.catalog-row__edit .icon { width: 16px; height: 16px; }

.catalog-row__dialog .modal__head {
  justify-content: flex-start;
  gap: 12px;
}

.catalog-row__warning {
  flex-shrink: 0;
  color: #b58105;
}

.catalog-row__dialog p {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .catalogs {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-row { gap: 8px; }
  .catalogs__new-field { flex: 1 1 200px; width: auto; }
}

.call-scripts__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

/* «Registrar llamada» (Jace #1646, #2073): what each answer leaves to do,
   as row buttons with their icon. */
.call-register__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.call-register__more {
  flex: 1 1 220px;
}

.call-register__more[open] {
  flex-basis: 100%;
}

.call-register__more[open] summary {
  margin-bottom: 8px;
}

.row-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface-mint);
  padding: 0 14px 0 6px;
  color: var(--ink-teal);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.row-action::-webkit-details-marker { display: none; }
.row-action::marker { content: ""; }

.row-action__icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--creation-beige);
}

.call-register__links {
  font-size: 13px;
}

.history .call-register__links li {
  border: 0;
  padding: 2px 0 0;
}

/* Cards to choose one: «¿A quién llamaste?» and «¿Cómo fue la llamada?» (Jace #2073). */
.call-choices { margin: 0; border: 0; padding: 0; }
.call-choices > legend { margin-bottom: 8px; font-weight: 700; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.choice-cards--2, .choice-cards--3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--line-sand);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.choice-card--center { align-items: center; text-align: center; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--ink-teal); background: var(--surface-mint-soft); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.choice-card__title { font-weight: 700; }
.choice-card__hint { color: var(--ink-muted); font-size: 13px; font-weight: 400; }

/* The script of a call (Jace #2073): a box with its head, bubbles and numbered steps. */
.script-box { border: 1px solid var(--line-sand); border-radius: 14px; overflow: hidden; }
.script-box__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  border-bottom: 1px solid var(--line-sand);
  background: var(--surface-sand-faint);
  padding: 12px 16px;
}
.script-box__choice { display: flex; align-items: center; gap: 10px; }
.script-box__choice select { width: auto; min-width: 180px; }
.field label.script-box__label, .script-box__label { margin: 0; font-weight: 700; }
.script-box__progress { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); font-size: 13px; font-weight: 600; }
.script-box__bar { display: block; width: 120px; height: 6px; border-radius: 3px; background: var(--surface-linen); overflow: hidden; }
.script-box__bar > span { display: block; width: 0; height: 100%; border-radius: 3px; background: #2D7A4F; transition: width .2s; }
.script-box__body { display: grid; gap: 16px; padding: 16px; }
.script-bubble { border-radius: 12px; background: var(--surface-cream); padding: 14px 16px; }
.script-bubble p { margin: 4px 0 0; white-space: pre-line; }
.script-bubble__label { color: var(--ink-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.script-name { border-radius: 6px; background: var(--surface-mint); padding: 0 4px; color: var(--ink-teal); font-weight: 600; }
.script-steps { margin: 0; padding: 0; list-style: none; }
.script-step { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 20px; }
.script-step:not(:last-child)::before {
  position: absolute;
  top: 32px;
  bottom: 4px;
  left: 14px;
  width: 1px;
  background: var(--line-sand);
  content: "";
}
.script-step__number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border: 1.5px solid var(--line-sand-strong);
  border-radius: 50%;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
}
.script-step__number .icon { display: none; width: 16px; height: 16px; color: var(--ink-teal); }
.script-step.is-answered .script-step__number { border-color: var(--surface-mint); background: var(--surface-mint); }
.script-step.is-answered .script-step__number > span { display: none; }
.script-step.is-answered .script-step__number .icon { display: block; }
.script-step__content { display: grid; gap: 6px; min-width: 0; }
.field label.script-step__title { margin: 0; font-size: 16px; font-weight: 600; }
.script-step__phrase { margin: 0; color: var(--ink-muted); font-size: 14px; white-space: pre-line; }

/* «Esta llamada ya se hizo» of «Nuevo seguimiento» (Jace #2073). */
.done-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px dashed var(--line-sand-strong);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.done-check:has(input:checked) { border: 1px solid var(--ink-teal); background: var(--surface-mint-soft); }
.done-check input { position: absolute; opacity: 0; pointer-events: none; }
.done-check__box {
  display: grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  margin-top: 2px;
  border: 1.5px solid var(--line-sand-strong);
  border-radius: 5px;
  background: var(--card);
  color: #fff;
}
.done-check__box .icon { width: 14px; height: 14px; visibility: hidden; }
.done-check:has(input:checked) .done-check__box { border-color: #2D7A4F; background: #2D7A4F; }
.done-check:has(input:checked) .done-check__box .icon { visibility: visible; }
.done-check:has(input:focus-visible) { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.done-check__title { display: block; font-size: 15px; font-weight: 700; }
.done-check__hint { display: block; color: var(--ink-muted); font-size: 13px; }

/* The company finder of a group: a search field over a list of options. */
.combobox__field {
  position: relative;
  width: min(320px, 100%);
}

.field input[readonly] {
  background: var(--muted);
  color: var(--muted-foreground);
}

.combobox__field--wide {
  width: 100%;
}

.combobox__field input {
  width: 100%;
}

.combobox__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 4px;
  list-style: none;
}

.combobox__option,
.combobox__empty {
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 13px;
}

.combobox__option {
  cursor: pointer;
}

.combobox__option:hover,
.combobox__option[aria-selected="true"] {
  background: var(--muted);
}

.combobox__option[hidden],
.combobox__empty[hidden],
.combobox__list[hidden] {
  display: none;
}

.combobox__empty {
  color: var(--muted-foreground);
}

/* The pencil beside a churn's company that opens it for editing (Jace #2019). */
.name-edit__pencil {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}

.name-edit__pencil:hover {
  background: var(--muted);
  color: var(--foreground);
}

.name-edit__pencil:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.group-additions__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.group-additions__list:empty {
  display: none;
}

.group-additions__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted);
  padding: 4px 6px 4px 12px;
  font-size: 13px;
}

/* The panel «Agregar usuario» of an incident: the address, then what Jace
   knows of that user, then those added. */
.contact-panel-frame {
  display: block;
  margin-top: 16px;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 720px;
}

.contact-panel h3,
.contact-panel h4,
.contact-card h4 {
  margin: 0;
  font-size: 15px;
}

.contact-panel h4 {
  font-size: 13px;
}

.contact-panel .combobox__field {
  width: 100%;
}

.contact-panel__notice,
.contact-card__already {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.contact-panel__notice {
  color: #065f46;
}

.field-error {
  margin: 0;
  color: var(--destructive);
  font-size: 12px;
  font-weight: 600;
}

.contact-lookup {
  display: block;
}

.contact-lookup:empty {
  display: none;
}

.contact-card,
.contact-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.contact-card {
  background: var(--muted);
}

.contact-card__edit {
  margin: 0;
  font-size: 13px;
}

.contact-new p {
  margin: 0;
}

/* The company a user counts for, among theirs (Jace #1679). */
.company-choice {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.company-choice legend {
  margin-bottom: 6px;
  font-weight: 600;
}

.company-choice__option {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-weight: 500;
}

.company-choice__option input {
  width: auto;
  margin: 0;
}

.contact-new--reveal {
  animation: contact-reveal 220ms ease-out;
}

@keyframes contact-reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-new--reveal {
    animation: none;
  }
}

.suggestion {
  display: grid;
  gap: 2px;
}

.suggestion__meta {
  color: var(--muted-foreground);
  font-size: 12px;
}

/* The company's «Responsable» of the Cartera CS, only its photo (Jace #3147). */
.suggestion__owner {
  display: inline-flex;
  vertical-align: middle;
}

.contact-panel__added ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.contact-panel__added li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  font-size: 13px;
}

.callout {
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  background: #fffbeb;
  padding: 12px 14px;
  font-size: 13px;
}

/* Configuración › Integraciones (Jace #2117): Crisp, Basecamp and Canny side
   by side, each with its real state. */
/* Five cards since OpenAI (Jace #2361), three per row: in five columns
   Crisp's «Detener avisos automáticos» would break in two. */
.integration-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.integration-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.integration-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.panel .integration-card__head h2 { margin: 0; font-size: 17px; font-weight: 600; }

.integration-card__description {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
}

.integration-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--creation-beige);
  padding: 3px 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.integration-state::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone-neutral-solid);
  content: "";
}

.integration-state--live { background: var(--tone-success-bg); color: var(--tone-success-ink); }
.integration-state--live::before { background: var(--tone-success-solid); }

.integration-card form { margin: 0; }

.integration-card__stop {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-sand);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink-red);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.integration-card__stop:hover { background: #FBF4F3; }

/* Odoo (Jace #2729): its own row, with the key's form and the last test. */
.odoo-card { grid-column: 1 / -1; }
.odoo-card .hint { margin: 0; }
.odoo-card__warning { color: var(--ink-red); }
.odoo-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.odoo-card__form { width: 100%; }
.odoo-card__form summary { cursor: pointer; color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.odoo-card__form .form { margin-top: 12px; max-width: 520px; }
/* Handy Promo (Jace #3041): its own row, one line per client of Promo with
   its key's state, and the key just generated, shown once. */
.promo-card { grid-column: 1 / -1; }
.promo-card .hint { margin: 0; }
.promo-card code { overflow-wrap: anywhere; }
.promo-card__key { width: 100%; display: grid; gap: 6px; }
.promo-card__key p { margin: 0; }
.promo-card__key-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.promo-card__key-value { flex: 1 1 280px; min-width: 0; font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; }
.promo-card__instances { width: 100%; margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.promo-card__instance { display: grid; gap: 6px; border-top: 1px solid var(--line-sand); padding-top: 10px; }
.promo-card__instance-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.promo-card__slug { font-size: 15px; }
.promo-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.promo-card__form { width: 100%; }
.promo-card__form summary { cursor: pointer; color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.promo-card__form .form { margin-top: 12px; max-width: 520px; }
.odoo-probe { width: 100%; }
.odoo-probe:empty { display: none; }
.odoo-probe__title { margin: 4px 0; font-size: 15px; font-weight: 600; }
.odoo-probe__title small { color: var(--ink-muted); font-weight: 400; }
.odoo-probe__status { margin: 0 0 8px; color: var(--tone-success-ink); font-size: 14px; }
.odoo-probe__status--failed { color: var(--ink-red); }
.odoo-probe__lines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px 20px;
  margin: 0;
}
.odoo-probe__line { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-sand); padding: 4px 0; font-size: 14px; }
.odoo-probe__line dt { color: var(--ink-soft); }
.odoo-probe__line dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.odoo-probe__line--failed dd { color: var(--ink-red); }
/* Odoo's test batch (Jace #2772), under «Probar conexión». */
.odoo-imports { width: 100%; display: grid; gap: 10px; border-top: 1px solid var(--line-sand); padding-top: 12px; }
.odoo-import { display: grid; gap: 6px; }
.odoo-import__title { margin: 0; font-size: 14px; font-weight: 600; }
.odoo-import__title small { color: var(--ink-muted); font-weight: 400; }
/* What a batch, or the whole import, added, in a line (Jace #2916). */
.odoo-import__added { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; font-size: 14px; }
.odoo-import__added strong { font-variant-numeric: tabular-nums; }
.odoo-import__added--stages { color: var(--ink-soft); }
/* «¿Por qué no entró este Negocio?» (Jace #3047). */
.odoo-deal-check { display: grid; gap: 10px; }
.odoo-deal-check h2 { margin: 0; }
.odoo-deal-check p { margin: 0; }
.odoo-deal-check__form { max-width: 560px; }
.odoo-deal-check__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.odoo-deal-check__input { flex: 1 1 220px; min-width: 0; }
.odoo-deal-check__result { display: grid; gap: 8px; border-top: 1px solid var(--line-sand); padding-top: 12px; }
.odoo-deal-check__sentence { font-size: 15px; line-height: 1.5; }
.odoo-deal-check__sentence--entered { color: var(--tone-success-ink); }
.odoo-deal-check__facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 13px; }

@media (max-width: 1180px) {
  .integration-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .integration-cards { grid-template-columns: minmax(0, 1fr); }
}

.message-preview {
  margin: 6px 0;
  border-left: 3px solid var(--brand);
  background: var(--muted);
  padding: 8px 10px;
  font-size: 12px;
  white-space: pre-wrap;
}

.notify-all {
  margin-bottom: 12px;
}

.dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 13px;
}

.dl dt {
  color: var(--muted-foreground);
}

.dl dd {
  margin: 0;
}

/* «Contrato» of a company (Jace #1927): «Asignado a» and «Sin datos de
   contrato» in the size of its data. */
.company-contract #company_assigned_to,
.company-contract #contract_unknown {
  margin: 12px 0 0;
  font-size: 13px;
}

.company-contract #contract_unknown {
  margin: 0;
  color: var(--muted-foreground);
}

/* The image itself opens full size in a new tab: no arrow, no underline. */
.evidence-link {
  display: inline-block;
  text-decoration: none;
}

a.evidence-link::after {
  content: none;
}

.evidence-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.evidence-picker__name {
  color: var(--muted-foreground);
  font-size: 12px;
  overflow-wrap: anywhere;
  min-width: 0;
}

/* Field sizing must not expand the visually hidden file control. */
.evidence-picker input.sr-only {
  width: 1px;
  padding: 0;
  border: 0;
}

.field-requirement {
  display: inline-block;
  margin-inline-start: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 400;
}

.field-requirement--required {
  color: var(--brand-ink);
  font-weight: 600;
}

/* The file input is hidden inside its button: the button shows its focus. */
.evidence-picker label:has(:focus-visible) {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 32%, transparent);
}

/* Avatar de Jace (Jace #1707): the current one, its URL and its versions. */
.jace-avatar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.jace-avatar__preview,
.jace-avatar__thumb {
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

.jace-avatar__url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.jace-avatar__versions li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The URLs are long: they wrap anywhere instead of widening the page. */
.jace-avatar__url .code,
.jace-avatar__versions .code {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.evidence-image {
  display: block;
  max-width: min(100%, 480px);
  max-height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  object-fit: contain;
}

.history {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.history li {
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
}

/* A note of several lines keeps them in the history (Jace #2417). */
.history li > strong {
  white-space: pre-line;
}

.history--escalations {
  overflow-wrap: anywhere;
}

/* Configuración › Historial general: the author's photo before each change. */
.history--authors li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history__author {
  display: inline-flex;
  flex: none;
  cursor: default;
}

.history__author .avatar svg {
  width: 16px;
  height: 16px;
}

.history time {
  color: var(--muted-foreground);
  font-size: 12px;
}

.folded-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.folded-panel__header h2 {
  margin: 0;
}

.folded-panel__body {
  margin-top: 12px;
}

/* The head of the list of Compañías (Jace #1706): «‹ 1 de 3 ›» on the
   left and «Mostrar» on the right. */
.table-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted-foreground);
  font-size: 12px;
}
.table-pager__pages { display: flex; align-items: center; gap: 12px; }

.folded-panel__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.score-scale {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
}

.score-scale label {
  display: grid;
  place-items: center;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 8px 0;
  cursor: pointer;
  font-weight: 700;
}

.score-scale input {
  position: absolute;
  opacity: 0;
}

.score-scale label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-foreground);
}

/* Public survey pages (/e/<token>, /n/<token>): Handy's brand, not Jace's.
   The contact opens them from WhatsApp or Crisp on a phone: one centered card
   up to 480px, 16px text at least, 48px buttons at least. Handy's blue is
   #0a92f6 in the logo; text and buttons use a darker blue that keeps 5:1 with
   white. */

.handy-page {
  --background: #f6f8fb;
  --brand: #0670c9;
  --brand-foreground: #ffffff;
  --primary: #0670c9;
  --primary-foreground: #ffffff;
  --link: #0670c9;
  --link-hover: #065fad;
  --ring: #0a92f6;
  --handy-text: #0a0a0a;
  --handy-muted: #525252;
  background: var(--background);
  color: var(--handy-text);
  font-size: 16px;
  line-height: 1.5;
}

.handy-main {
  display: grid;
  min-height: 100dvh;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px 16px;
}

.handy-card {
  width: min(100%, 480px);
  border: 1px solid var(--surface-gray-strong);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%), 0 10px 28px rgb(15 23 42 / 6%);
  padding: 28px 24px;
}

.handy-card__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.handy-logo {
  width: 132px;
  height: auto;
}

.handy-foot {
  max-width: 480px;
  margin: 0;
  color: var(--handy-muted);
  font-size: 16px;
  text-align: center;
}

.handy-title {
  display: block;
  margin: 0 0 12px;
  padding: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.handy-context {
  margin: 0 0 20px;
  border-radius: 10px;
  background: var(--surface-gray);
  color: #1f2937;
  padding: 12px 14px;
}

.handy-question {
  margin: 0 0 12px;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
}

.handy-note {
  margin: 0 0 16px;
  border-left: 3px solid #0a92f6;
  background: #eff7ff;
  padding: 10px 12px;
}

.handy-step {
  display: inline-block;
  margin: 0 0 12px;
  border-radius: 999px;
  background: var(--surface-gray);
  color: var(--handy-muted);
  padding: 2px 12px;
  font-size: 16px;
  font-weight: 600;
}

.handy-form {
  display: grid;
  gap: 12px;
}

.handy-form fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.handy-choices {
  display: grid;
  gap: 12px;
}

.handy-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  border: 2px solid;
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--handy-text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.handy-choice__icon {
  display: grid;
  flex: none;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.handy-choice--yes { border-color: #86efac; background: #effcf4; }
.handy-choice--yes .handy-choice__icon { background: #15803d; }
.handy-choice--partial { border-color: #fcd34d; background: #fff8e6; }
.handy-choice--partial .handy-choice__icon { background: #b45309; }
.handy-choice--no { border-color: #fca5a5; background: #fef2f2; }
.handy-choice--no .handy-choice__icon { background: #b91c1c; }
.handy-choice:hover { filter: brightness(0.97); }

.handy-scale__numbers {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
}

.handy-scale__row {
  display: contents;
}

.handy-score {
  display: inline-grid;
  min-width: 0;
  min-height: 48px;
  place-items: center;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: var(--surface-gray);
  color: var(--handy-text);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

/* Neutral until picked: no colors by range, so nothing nudges the answer. */
.handy-score:hover,
.handy-score:focus-visible,
.handy-score:active,
.handy-score--picked {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-foreground);
}

.handy-score--picked {
  width: 48px;
}

.handy-scale__ends {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0;
  color: var(--handy-muted);
  font-size: 16px;
}

/* A phone: two rows, 0–5 and 6–10, with buttons of the same width. */
@media (max-width: 559px) {
  .handy-scale__numbers {
    display: grid;
    grid-template-columns: none;
    gap: 8px;
  }

  .handy-scale__row {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .handy-scale__row .handy-score {
    flex: 0 0 calc((100% - 40px) / 6);
  }
}

.handy-picked {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}

.handy-label {
  font-weight: 600;
}

.handy-textarea {
  width: 100%;
  min-height: 132px;
  border: 1px solid #9ca3af;
  border-radius: 10px;
  padding: 12px;
  color: var(--handy-text);
  font: inherit;
  resize: vertical;
}

.handy-textarea:focus,
.handy-choice:focus-visible,
.handy-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ring) 45%, transparent);
  outline-offset: 2px;
}

.handy-actions {
  display: grid;
  gap: 8px;
}

.handy-button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-foreground);
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.handy-button:hover {
  background: var(--link-hover);
}

.handy-button--text,
.handy-button--text:hover {
  background: transparent;
  color: var(--brand-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.handy-done {
  display: grid;
  justify-items: center;
  text-align: center;
}

.handy-done p {
  margin: 0;
}

.handy-check {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  fill: #15803d;
}

/* The generic NPS form (/n/<token>) reuses the app's fields at Handy's size. */
.handy-page .form,
.handy-page input,
.handy-page textarea,
.handy-page .button {
  font-size: 16px;
}

.handy-page .button {
  min-height: 48px;
}

.handy-page .muted {
  color: var(--handy-muted);
}

.handy-page .score-scale label {
  min-height: 48px;
}

/* A line over a panel's content with a hint on the left and its main button
   on the right («Nueva campaña»). */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head .hint {
  margin: 0;
}

/* A window over the screen: «Nueva campaña». */
.modal-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  background: rgb(15 23 42 / 45%);
  padding: 32px 16px;
}

.modal {
  width: min(760px, 100%);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 20px 60px rgb(15 23 42 / 25%);
}

/* Only the new reminder window uses this palette; its form and fields stay shared. */
.reminder-create-window .modal__head h2 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.reminder-create-window .modal__head > button { flex-shrink: 0; }
.reminder-create-window .contact-channel__options { display: flex; flex-wrap: wrap; }
.reminder-create-window .contact-channel__option {
  position: relative;
  align-items: center;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-stone);
  padding: 0 16px;
  color: var(--creation-ink);
  font-weight: 400;
  line-height: 16px;
}
.reminder-create-window .contact-channel__option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; border-radius: inherit; background: none; padding: 0; appearance: none; cursor: pointer; }
.reminder-create-window .contact-channel__option:has(input:checked) { background: var(--surface-mint); color: var(--ink-teal); font-weight: 700; box-shadow: none; }
.reminder-create-window .contact-channel__option:has(input:focus-visible) { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.reminder-create-window .contact-channel__hint { color: inherit; }
.reminder-create-window .field :is(input:not([type="radio"], [type="checkbox"]), select, textarea),
.reminder-create-window .rich-text-field lexxy-editor { border: 1px solid var(--line-sand-dim); border-radius: 10px; }
.reminder-create-window .field :is(input:not([type="radio"], [type="checkbox"]), select, textarea):focus,
.reminder-create-window .date-picker__field:focus-within .date-picker__input,
.reminder-create-window .date-picker--open .date-picker__input,
.reminder-create-window .rich-text-field lexxy-editor:focus-within { border-color: var(--ink-teal); outline: none; }
.reminder-create-window .rich-text-field lexxy-editor { --lexxy-color-accent-dark: #2E6E64; }
.reminder-create-window .actions .button--ghost { border: 0; background: none; color: var(--creation-ink); box-shadow: none; }
.reminder-create-window .actions .button--ghost:hover { text-decoration: underline; }
.reminder-create-window .actions .button--success { background: var(--creation-green); color: var(--creation-green-foreground); }
.reminder-create-window .actions .button--success:hover:not(:disabled) { background: var(--creation-green-hover); }
.reminder-create-window .actions .button--success:disabled { background: var(--surface-sand-strong); color: var(--ink-gray); opacity: 1; }

/* A small native <dialog>: the comment of «Otro motivo». */
.modal--small {
  width: min(440px, calc(100% - 32px));
  margin: auto;
  border: 0;
  padding: 0;
  color: inherit;
}

.modal--small::backdrop {
  background: rgb(15 23 42 / 45%);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}

.modal__head h2 {
  margin: 0;
  font-size: 17px;
}

.modal__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px 20px;
}

.modal__body fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.modal__body legend {
  margin-bottom: 5px;
  padding: 0;
  font-weight: 600;
}

.modal__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 14px 14px;
  background: var(--muted);
  padding: 14px 20px;
}

/* «Abrir reincidencia»: the original's description, only to read (Jace #1696). */
.original-description {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--muted);
  color: var(--muted-foreground);
  padding: 10px 12px;
}

/* Two choices as cards: the chosen one in Jace's teal. */
.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
}

.option > span {
  font-weight: 400;
}

.option strong {
  display: block;
  color: var(--foreground);
  font-size: 14px;
}

.option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* «Sigue sucediendo» of «Contactar» (Jace #1699): red like «Abrir reincidencia». */
.option--danger strong {
  color: var(--destructive);
}

.option--danger:has(input:checked) {
  border-color: var(--destructive);
  background: color-mix(in srgb, var(--destructive) 8%, var(--card));
}

.picker {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 6px;
}

.picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-weight: 400;
}

/* Who receives a campaign and who is left out, with the reason. */
.recipients {
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
}

.recipients h3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 13px;
}

.recipients h3 small,
.recipients li small {
  color: var(--muted-foreground);
  font-weight: 400;
}

.recipients ul {
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipients li {
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
}

.recipients li:last-child {
  border-bottom: 0;
}

.recipients__empty {
  margin: 0;
  padding: 12px;
  color: var(--muted-foreground);
}

.recipients__summary {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

/* Promoters, passives and detractors of a campaign. */
.metric__value--promoters { color: var(--brand-ink); }
.metric__value--passives { color: #b45309; }
.metric__value--detractors { color: var(--destructive); }

/* The batches of Configuración › Campañas NPS, three per row: the month's
   in soft teal, never red (Jace #2117). */
.batches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.batch {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
}

.batch--due {
  border-color: var(--ink-teal);
  background: var(--surface-mint-soft);
}

.batch h3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 14px;
}

.batch__month {
  border-radius: 999px;
  background: var(--creation-beige);
  padding: 2px 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.batch__month--due { background: var(--surface-mint); color: var(--ink-teal); }

@media (max-width: 640px) {
  .batches { grid-template-columns: minmax(0, 1fr); }
}

/* A number inside a sentence: «Cada [3] meses». The number and its unit
   never part (Jace #2117). */
.inline-number {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.inline-number__unit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.inline-number input[type="number"] {
  width: 72px;
}

.nps-settings .inline-number input[type="number"] {
  box-sizing: border-box;
  width: 80px;
  height: 40px;
}

/* Its checkboxes in Jace's green (Jace #2117). */
.nps-settings input[type="checkbox"] {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--input);
  border-radius: 5px;
  background: var(--card);
  appearance: none;
  cursor: pointer;
}

.nps-settings input[type="checkbox"]:checked {
  border-color: #2D7A4F;
  background: #2D7A4F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.nps-settings input[type="checkbox"]:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.form.nps-settings { max-width: 820px; }
.nps-settings__template { max-width: 820px; }

/* A text with format: Lexxy (vendor/assets/stylesheets) in Jace's colors,
   and the same text shown on the record's page. The toolbar shows only in
   the last field one wrote in, so a form with several never repeats it
   (Jace #1574); it stays there on leaving, so the buttons below do not move
   under the click. */
.rich-text-field lexxy-editor {
  --lexxy-color-ink: var(--foreground);
  --lexxy-color-ink-lighter: var(--input);
  --lexxy-color-canvas: var(--card);
  --lexxy-color-link: var(--link);
  --lexxy-color-accent-dark: var(--brand);
  --lexxy-color-accent-light: color-mix(in srgb, var(--brand) 24%, var(--card));
  --lexxy-color-accent-lightest: var(--brand-soft);
  --lexxy-font-base: inherit;
  --lexxy-editor-rows: 5lh;
  --lexxy-content-margin: 6px;
  border-radius: var(--radius);
  font-size: 13px;
}

.rich-text-field:not(.rich-text-field--active) lexxy-toolbar {
  display: none;
}

/* Jace's border-box would squash the dropdowns' chevron into a dot. */
.rich-text-field .lexxy-editor__toolbar-button--chevron::after {
  box-sizing: content-box;
}

/* Tailwind's reset takes lists, quotes and tables their look; they get it back
   in the editor and on the page. */
.rich-text {
  --lexxy-content-margin: 6px;
  overflow-wrap: anywhere;
}

.rich-text > :last-child {
  margin-bottom: 0;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) ul,
:is(.rich-text, .rich-text-field .lexxy-editor__content) ol {
  margin: 4px 0;
  padding-left: 20px;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) ul {
  list-style: disc;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) ol {
  list-style: decimal;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) blockquote {
  margin: 4px 0;
  border-left: 3px solid var(--border);
  padding-left: 10px;
  color: var(--muted-foreground);
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) h2 { font-size: 18px; }
:is(.rich-text, .rich-text-field .lexxy-editor__content) h3 { font-size: 16px; }
:is(.rich-text, .rich-text-field .lexxy-editor__content) h4 { font-size: 14px; }

:is(.rich-text, .rich-text-field .lexxy-editor__content) :is(h2, h3, h4) {
  margin: 8px 0 4px;
  font-weight: 600;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) hr {
  width: 100%;
  margin: 10px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) table {
  border-collapse: collapse;
  margin: 6px 0;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) :is(th, td) {
  border: 1px solid var(--input);
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) th {
  background: var(--muted);
  font-weight: 600;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) :is(th, td) p {
  margin: 0;
}

:is(.rich-text, .rich-text-field .lexxy-editor__content) pre {
  border-radius: 6px;
  background: var(--muted);
  padding: 8px 10px;
  overflow-x: auto;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
}

.rich-text a {
  color: var(--link);
  text-decoration: underline;
}

/* Tablero (Jace #1701): Hoy, Esta semana or Este mes at the top right, what
   happened in the period and what is pending today. Its charts use pastel
   tones, soft to the eye; the numbers and labels stay dark. */
:root {
  --pastel-rose: #f4b6b6;
  --pastel-peach: #f7d79c;
  --pastel-mint: #a9dcc8;
  --pastel-sky: #b8d7f1;
  /* Lime took the place of the old pastel, so no tone of Jace is morado (Jace #1842). */
  --pastel-lime: #d6e6a3;
}

.pastel--rose { background: var(--pastel-rose); fill: var(--pastel-rose); }
.pastel--peach { background: var(--pastel-peach); fill: var(--pastel-peach); }
.pastel--mint { background: var(--pastel-mint); fill: var(--pastel-mint); }
.pastel--sky { background: var(--pastel-sky); fill: var(--pastel-sky); }
.pastel--lime { background: var(--pastel-lime); fill: var(--pastel-lime); }
.pastel-stroke--rose { stroke: var(--pastel-rose); }
.pastel-stroke--peach { stroke: var(--pastel-peach); }
.pastel-stroke--mint { stroke: var(--pastel-mint); }
.pastel-stroke--sky { stroke: var(--pastel-sky); }
.pastel-stroke--lime { stroke: var(--pastel-lime); }
.pastel-edge--rose { --metric-edge: var(--pastel-rose); }
.pastel-edge--peach { --metric-edge: var(--pastel-peach); }
.pastel-edge--mint { --metric-edge: var(--pastel-mint); }
.pastel-edge--sky { --metric-edge: var(--pastel-sky); }
.pastel-edge--lime { --metric-edge: var(--pastel-lime); }

.dashboard-period {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.dashboard-period small {
  color: var(--muted-foreground);
  font-size: 12px;
}

/* Seguimiento's selector (.follow-up-segments, Jace #2103); its links have no underline. */
.period-switch a,
.period-switch a:visited {
  text-decoration: none;
}

/* The blocks of the Tablero (Jace #1705): the numbers and «Para atender hoy»
   take the whole width, each panel half of it. */
.dashboard-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 16px;
}

@media (max-width: 720px) {
  .dashboard-board {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The track ignores what its panel holds: a long title that does not wrap
   stays inside its half of the board (Jace #1763). */
.dashboard-widget {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.dashboard-widget--wide {
  grid-column: 1 / -1;
}

/* Two panels side by side keep the same height. */
.dashboard-widget:not(.dashboard-widget--wide) {
  align-content: stretch;
}

.dashboard-widget > h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 16px;
}

.dashboard-widget > h2 small {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}

.dashboard-widget .metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  margin-bottom: 0;
}

/* «Para atender hoy» (Jace #2149): six columns even with fewer cards.
   Narrow screens scroll this one row while keeping the cards readable. */
.dashboard-widget .attention-rows {
  grid-template-columns: repeat(6, minmax(160px, 1fr));
  overflow-x: auto;
}

.metric.attention-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-sand);
  border-radius: 14px;
  background: var(--card);
  padding: 12px 16px;
}

.attention-row__value {
  min-width: 28px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.attention-row__value--zero { color: var(--ink-faint); }
.attention-row__value--pending { color: var(--creation-ink); }
.metric--alert .attention-row__value--alert { color: var(--ink-red); }

.attention-row__label {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.3;
}

/* The numbers of the period (Jace #2143): four to a row, each of one width;
   fewer stay that wide, from the left. */
.dashboard-widget .dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .dashboard-widget .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* «Seguimiento comercial» (Jace #2749): last, below a line across the board. */
.dashboard-separator {
  margin: 4px 0 0;
  border: 0;
  border-top: 1px solid var(--line-sand);
}

/* «Mis llamadas» and the semáforo of the Cartera, as wide as each other. */
.dashboard-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .dashboard-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The company or reason beside the title of a row. */
.dashboard-list__company {
  flex: none;
  max-width: 35%;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list form {
  flex: none;
}

/* A number of the period (Jace #2421): the number with its short change
   beside it, only its name below, about 92px high. */
.metric--period {
  align-content: center;
  min-height: 92px;
}

.metric__line {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 34px;
}

.metric--period .metric__label {
  line-height: 18px;
}

/* Always neutral, never red or green. */
.metric__delta {
  border-radius: 999px;
  background: var(--creation-beige);
  padding: 2px 7px;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
}

/* A pastel edge on the left of each number of the period. */
.metric--toned {
  position: relative;
  overflow: hidden;
}

.metric--toned::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--metric-edge);
  content: "";
}

.panel__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.panel__head a {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.dashboard-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-list li:last-child {
  border-bottom: 0;
}

.dashboard-list__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* «Incidencias abiertas» (Jace #2103): icon, code, title, priority and the
   status of its page, a thin line between rows. */
.open-records li {
  gap: 10px;
  border-bottom: 1px solid var(--line-sand-soft);
}

.open-records li:last-child {
  border-bottom: 0;
}

.open-records .creation-icon {
  width: 16px;
  height: 16px;
}

.open-records__code {
  flex: none;
  color: var(--ink-muted);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
}

.open-records__title a,
.open-records__title a:visited {
  color: var(--ink-teal);
}

.open-records .record-status {
  flex: none;
}

.open-records .record-status__dot,
.open-records .incident-status-dot {
  width: 7px;
  height: 7px;
}

.top-requests__rank {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #44403c;
  font-size: 12px;
  font-weight: 800;
}

.top-requests li:nth-child(1) .top-requests__rank { background: var(--pastel-peach); }
.top-requests li:nth-child(2) .top-requests__rank { background: var(--pastel-sky); }
.top-requests li:nth-child(3) .top-requests__rank { background: var(--pastel-lime); }
.top-requests li:nth-child(4) .top-requests__rank { background: var(--pastel-mint); }
.top-requests li:nth-child(5) .top-requests__rank { background: var(--pastel-rose); }

.top-requests__users {
  white-space: nowrap;
}

.top-requests__users small {
  color: var(--muted-foreground);
}

/* Mis llamadas: a ring of done, to do and overdue, in its middle (Jace
   #2143), and beside it the list of each part with its dot (Jace #2421). */
.calls-card__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

.calls-ring {
  display: grid;
  flex: none;
  place-items: center;
  padding: 4px 0;
}

.calls-ring__chart {
  width: 140px;
  height: 140px;
}

.calls-legend {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 160px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.calls-legend__row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.calls-legend__row:hover {
  background: color-mix(in srgb, var(--link) 6%, var(--card));
}

.calls-legend__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.calls-legend__label {
  flex: 1;
}

.calls-legend__value {
  color: var(--creation-ink);
  font-variant-numeric: tabular-nums;
}

.calls-ring__track {
  fill: none;
  stroke: var(--muted);
  stroke-width: 16;
}

.calls-ring__arc {
  fill: none;
  stroke-width: 16;
}

.calls-ring__percent {
  fill: var(--foreground);
  font-size: 22px;
  font-weight: 800;
}

.calls-ring__caption {
  fill: var(--muted-foreground);
  font-size: 10px;
}

@media (max-width: 640px) {
  .dashboard-period {
    justify-items: start;
  }

  .calls-ring__chart {
    width: 120px;
    height: 120px;
  }
}

/* «Hoy atiende» over the list of escalations (Jace #1783). */
.duty-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.duty {
  position: relative;
  max-width: 100%;
}

/* Shared duty chips: area above the name, with the original green (Jace #2343). */
.duty__current {
  display: inline-flex;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--surface-mint);
  padding: 6px 14px 6px 6px;
  color: var(--ink-teal);
}

details.duty > summary {
  cursor: pointer;
  list-style: none;
}

details.duty > summary::-webkit-details-marker { display: none; }

.duty__current svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--ink-teal);
}

.duty__text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.duty__label {
  color: var(--ink-teal);
  font-size: 12px;
}

.duty__name {
  font-size: 14px;
  font-weight: 700;
}

.duty--empty .duty__current { padding-left: 14px; }
.duty__current .avatar { box-shadow: 0 0 0 2px var(--card); }
.duty__current:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; }

.duty__menu {
  position: absolute;
  right: 0;
  z-index: 20;
  min-width: 220px;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  padding: 4px;
}

.duty__option {
  width: 100%;
  color: inherit;
  font: inherit;
  font-size: 13px;
  border: 0;
  border-radius: var(--radius);
  background: none;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
}

.duty__option:hover {
  background: var(--muted);
}

.escalation-facts {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 14px;
}

.escalation-facts dt {
  color: var(--muted-foreground);
}

.escalation-facts dd {
  margin: 0;
}

/* «Medio de contacto» of a new record of Soporte (Jace #1824). */
.contact-intake { display: grid; gap: 16px; }
.contact-intake [data-contact-intake-target="fields"]:not([hidden]) { display: grid; gap: 16px; }
fieldset.contact-channel { border: 0; margin: 0; padding: 0; }
fieldset.contact-channel legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.contact-channel__options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.contact-channel__option { align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; display: flex; font-weight: 600; gap: 8px; padding: 10px 12px; }
.contact-channel__option:has(input:checked) { border-color: var(--foreground); box-shadow: inset 0 0 0 1px var(--foreground); }
.contact-channel__hint { color: var(--muted-foreground); display: block; font-size: 12px; font-weight: 400; }

/* «⚡ Escalar» (Jace #1825): each section opens with a line and its title. */
fieldset.form-section {
  display: grid;
  gap: 14px;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border);
  padding: 16px 0 0;
}

.modal__body .form-section > legend,
.form .form-section > legend {
  float: left;
  width: 100%;
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 600;
}

.form-section > legend + * {
  clear: both;
}

.options--three {
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
}

.options--four {
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
}

/* A window of one step of an escalation (Jace #1841, #1929). */
.modal--narrow {
  width: min(480px, 100%);
}

/* «¿Cómo quedó?» of the «Mensaje para el cliente» (Jace #1929): «Resuelto»
   and «Continúa», each with what it does. */
.escalation-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.escalation-outcomes > div {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.escalation-facts .evidence-image {
  margin: 0 8px 8px 0;
}

/* Under a long list (Jace #1852): «Ver más», or «‹ Anterior · Página 2 ·
   Siguiente ›» for a list with pages of the server. */
.show-more,
.page-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

/* «Registrar baja» (Jace #1856): the space of the churn, with «Baja de otro espacio» beside it. */
.churn-space {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* The question of «Pedir información», waiting for Soporte (Jace #1841). */
.escalation-question {
  margin: 0;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fef3c7;
  color: #78350f;
  padding: 10px 12px;
}

.escalation-question small {
  display: block;
  color: #92400e;
  font-weight: 400;
}

/* The tabs of Escalamientos in Reportes go apart from the general one (Jace #1864). */
.tabs__gap {
  width: 24px;
}

.repeat-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

/* «Carrera de escalaciones» (Jace #1864): a block of the board on Jace's
   beige, a gray road for each person of Desarrollo, their photo running toward
   the checkered line as far as the escalations they took; the leader reaches it. */
.race {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, #e9d8c4 45%, var(--background));
  padding: 16px;
}

.race__lanes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.race__lane {
  display: grid;
  grid-template-columns: 48px minmax(0, 140px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.race__place {
  border-radius: 999px;
  background: var(--card);
  padding: 4px 0;
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.race__lane--1 .race__place { background: #facc15; box-shadow: none; color: #422006; }
.race__lane--2 .race__place { background: #cbd5e1; box-shadow: none; color: #1e293b; }
.race__lane--3 .race__place { background: #fdba74; box-shadow: none; color: #431407; }
.race__lane--idle { opacity: 0.55; }

.race__name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The road, the only gray: a dashed middle line and the checkered finish. */
.race__track {
  position: relative;
  height: 52px;
  border-top: 3px solid #fff;
  border-bottom: 3px solid #fff;
  border-radius: 6px;
  background:
    linear-gradient(90deg, var(--surface-gray-strong) 50%, transparent 50%) left center / 24px 2px repeat-x,
    #6b7280;
}

.race__finish {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 14px;
  background: repeating-conic-gradient(#1f2937 0 25%, var(--card) 0 50%) 0 0 / 7px 7px;
}

/* The photo and the count move together: 0 at the start, 100 at the finish. */
.race__racer {
  position: absolute;
  top: 50%;
  left: calc((100% - 82px) * var(--progress) / 100);
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateY(-50%);
  transition: left 600ms ease-out;
}

.race__racer .avatar {
  box-shadow: 0 0 0 3px var(--card);
}

.race__count {
  min-width: 26px;
  border-radius: 8px;
  background: var(--card);
  padding: 2px 6px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 640px) {
  .race__lane {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .race__track {
    grid-column: 1 / -1;
  }
}

/* The Cuenta de prueba (Jace #1921): on top of the header, while an Administrador is in it. */
.test-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding: 8px 16px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
  border-bottom: 1px solid #fcd34d;
}

.test-bar__text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.test-bar__form {
  display: inline;
}

.test-bar__back {
  background: var(--tone-warning-ink);
  color: var(--tone-warning-bg);
}

/* Escalations and Bugs share a segmented header and a list card (Jace #2009). */
.app-main.incidents-page {
  max-width: 1296px;
  padding: 32px 48px 120px;
}

.incidents-page .back-button {
  min-height: 20px;
  margin: 0 0 24px;
  border: 0;
  padding: 0;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

.incident-segments.tabs,
.follow-up-segments {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-linen);
  padding: 4px;
}

.incident-segments.tabs a,
.follow-up-segments a,
.follow-up-segments a:visited {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  margin: 0;
  border: 0;
  border-radius: 9px;
  padding: 0 18px;
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 600;
}

.incident-segments.tabs a[aria-current="page"],
.follow-up-segments a[aria-current="page"] {
  background: var(--card);
  color: var(--creation-ink);
  box-shadow: 0 1px 3px rgb(30 39 37 / 14%);
}

.incident-segments.tabs a:hover:not([aria-current="page"]),
.follow-up-segments a:hover:not([aria-current="page"]) {
  background: rgb(255 255 255 / 45%);
}

.incident-segments .indicator-dot,
.follow-up-segments .indicator-dot { margin-left: 0; }
.creation-icon { display: block; width: 17px; height: 17px; flex-shrink: 0; }
.incident-segments .creation-icon--escalation { width: 16px; height: 16px; }

.incident-heading.page-head {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0;
  margin: 28px 0 32px;
}

.incident-heading h1 {
  margin: 0;
  color: var(--creation-ink);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.incident-heading p {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 16px;
}

.incident-heading .incident-create {
  height: 44px;
  gap: 10px;
  margin-top: 20px;
  border: 0;
  border-radius: 10px;
  background: var(--creation-green);
  padding: 0 18px 0 9px;
  color: var(--creation-green-foreground);
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
}

.incident-heading .incident-create:hover { background: var(--creation-green-hover); }
.incident-heading > .badge { margin-top: 20px; }

.creation-icon-circle {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--creation-beige);
}

.incident-create .creation-icon--bug { width: 19px; height: 19px; }

.incident-heading__actions {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}
.incident-heading__actions .incident-create { margin-top: 0; }
.duty-group {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.duty-group__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
}

.duty-group__label .icon { width: 16px; height: 16px; }

.request-heading-title { display: flex; align-items: center; gap: 14px; }
.request-heading-count {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--tone-info-bg);
  padding: 0 8px;
  color: var(--tone-info-ink);
  font-size: 13px;
  font-weight: 600;
}

.incident-list .chips { gap: 4px; }

.incident-list .chip {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.incident-list .chip--active { background: var(--surface-mint); color: var(--ink-teal); }
.incident-list .chip:hover:not(.chip--active) { background: var(--creation-beige); }
.incident-list .chip .tab-count,
.incident-list .chip .indicator-dot { margin-left: 0; }

.incident-status-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; }
.incident-status-dot--open { background: var(--tone-warning-solid); }
.incident-status-dot--in_development { background: var(--tone-info-solid); }
.incident-status-dot--resolved { background: var(--tone-success-solid); }
.incident-status-dot--closed { background: var(--tone-neutral-solid); }

.incident-list.panel {
  border: 1px solid var(--line-sand);
  border-radius: 18px;
  background: var(--card);
  padding: 20px 24px 24px;
  box-shadow: none;
}

.incident-list__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-sand-soft);
  padding-bottom: 16px;
}

.incident-list__bar > .chips { flex: 0 1 auto; max-width: 100%; }
/* Solicitudes: its status filters, a divider and the space ones (Jace #2958). */
.request-filters { align-items: center; }
/* The status of Sugerencias in a dropdown (Jace #3169), as tall as the chips beside it, in the active chip's colors. */
.request-status-filter { display: flex; flex: none; }
.request-status-filter__select {
  position: relative;
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding-left: 14px;
  background: var(--surface-mint);
  color: var(--ink-teal);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.request-status-filter__select > span { color: var(--ink-soft); }
.request-status-filter__select select {
  height: 100%;
  appearance: none;
  field-sizing: content;
  min-width: 0;
  border: 0;
  border-radius: inherit;
  padding: 0 34px 0 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.request-status-filter__select .icon { position: absolute; right: 12px; width: 16px; height: 16px; pointer-events: none; }
.request-status-filter__select:focus-within { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.request-filters__divider { align-self: stretch; width: 1px; margin: 2px 4px; background: var(--input); }
/* On a phone the space filters wrap below the status: no divider is left at the end of a row (Jace #3169). */
@media (max-width: 640px) { .request-filters__divider { display: none; } }
/* Its search stays at the right, on the next line too when it does not fit. */
.request-list .incident-list__bar > .list-filter { margin-left: auto; }
.incident-list__content { padding-top: 8px; }

/* «Incluir compañías sin producto» of Compañías › Todas (Jace #2743). */
.company-product-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 14px;
}

.company-product-switch .catalog-switch { flex: none; }

/* The switch and «Buscar compañía» (Jace #2775) together, at the right of the pills. */
.company-list__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  max-width: 100%;
}
.incident-list__content:has(.table-pager) { padding-top: 16px; }
.incident-list .table-pager { margin-bottom: 8px; }

.incident-list .list-filter {
  width: 300px;
  max-width: 100%;
  height: 40px;
  flex: 0 0 auto;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line-sand-strong);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--ink-muted);
}

.incident-list .list-filter .icon { width: 17px; height: 17px; }
.incident-list .list-filter input { font-size: 14px; }
.incident-list .list-filter input::placeholder { color: var(--ink-muted); opacity: 1; }
.incident-list .list-filter:focus-within { outline: 2px solid var(--ink-teal); outline-offset: 2px; }

.incident-list .table th {
  border-bottom: 1px solid var(--line-sand);
  padding: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.incident-list .table td { border-bottom: 1px solid var(--line-sand-soft); padding: 18px 12px; }

/* Seguimiento's selector is Incidencias's (Jace #2025): 24px under «Regresar», each group's icon at 16px, the title 28px below. */
.follow-up-segments { margin-top: 12px; }
.incidents-page .follow-up-segments { margin-top: 0; }
.follow-up-segments .creation-icon { width: 16px; height: 16px; }
.follow-up-segments a, .follow-up-segments a:hover { text-decoration: none; }
.follow-up-segments a:hover:not([aria-current="page"]) { color: var(--ink-muted); }
.follow-up-heading.page-head { margin-top: 28px; }

/* Seguimiento › Recordatorios keeps its counters and divider in the list bar. */
.reminder-filters { align-items: center; margin: 0; }
.reminder-filters__divider { width: 1px; height: 20px; flex-shrink: 0; margin: 0 6px; background: var(--line-sand); }
.reminder-due-today { margin: 0 0 12px; }
.incidents-page .reminder-filters .chip .tab-count { color: var(--ink-muted); font-size: 14px; font-weight: 600; }
.incidents-page .reminder-filters .chip--active .tab-count { color: var(--ink-teal); }
.incidents-page .reminder-filters .chip .tab-count--overdue,
.incidents-page .reminder-filters .chip--active .tab-count--overdue { color: var(--ink-red); }
.incident-status-dot--overdue { background: var(--tone-danger-solid); }

.reminder-list .table td { vertical-align: top; }
.reminder-list__company,
.reminder-list__company:visited { color: var(--ink-teal); }
.reminder-list__owed,
.reminder-list__owed:visited { color: var(--ink-teal); font-weight: 600; }
.reminder-list__sub { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 14px; }
/* The closing comment of Cerrados, whole, on as many lines as it needs (Jace #3147). */
.reminder-list__closing { white-space: pre-line; overflow-wrap: anywhere; }
.reminder-list__code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.reminder-list__creator { gap: 8px; }

/* «Tomar» and «Atender»: Jace's soft green. */
.reminder-list td .button--brand {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-mint);
  padding: 0 16px;
  color: var(--ink-teal);
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

.reminder-list td .button--brand:hover { background: var(--surface-mint-strong); color: var(--ink-teal); }

/* Kept outside the page content so scrolling never moves the button. */
.create-new { position: fixed; right: 32px; bottom: 32px; z-index: 40; }
.create-new__button {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--creation-green);
  padding: 0;
  color: var(--creation-green-foreground);
  cursor: pointer;
  box-shadow: 0 8px 20px rgb(30 39 37 / 22%);
}

.create-new__button:hover { background: var(--creation-green-hover); }
.create-new__button[aria-pressed="true"] { background: var(--creation-pressed); }
.create-new__plus { width: 24px; height: 24px; }
.create-new__close { display: none; width: 22px; height: 22px; }
.create-new__button[aria-pressed="true"] .create-new__plus { display: none; }
.create-new__button[aria-pressed="true"] .create-new__close { display: block; }

/* «Crear nuevo», the floating button's quick menu (Jace #2010): 14px above it, at its right. */
.create-new__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  box-sizing: border-box;
  width: 280px;
  border: 1px solid var(--line-sand);
  border-radius: 14px;
  background: var(--card);
  padding: 8px;
  box-shadow: 0 12px 32px rgba(30, 39, 37, 0.16);
}

.create-new__menu[hidden] { display: none; }

.create-new__heading {
  margin: 0;
  padding: 8px 10px 6px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 16px;
  text-transform: uppercase;
}

.create-new__option {
  display: flex;
  box-sizing: border-box;
  height: 48px;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 0 10px;
  color: var(--creation-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.create-new__option:hover { background: var(--surface-mint); color: var(--creation-ink); text-decoration: none; }

.create-new__icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--creation-beige);
}

.create-new__icon .creation-icon--bug { width: 19px; height: 19px; }

.incident-list .chip:focus-visible,
.incident-segments a:focus-visible,
.follow-up-segments a:focus-visible,
.create-new__option:focus-visible,
.create-new__button:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 4px; }

@media (max-width: 640px) {
  .app-main.incidents-page { padding-right: 16px; padding-left: 16px; }
  .incident-segments.tabs a,
  .follow-up-segments a { padding-right: 12px; padding-left: 12px; }
  .incident-list.panel { padding-right: 16px; padding-left: 16px; }
}

/* Seguimiento › Soporte (Jace #2043): Recordatorios's card, with a note per
   filter 16px under the bar and the list 12px under it. */
.support-cases .incident-list__content,
.support-cases .incident-list__content:has(.table-pager) { padding-top: 0; }
.support-cases__note { margin: 16px 0 12px; color: var(--ink-muted); font-size: 14px; }
.support-cases .support-cases__user,
.support-cases .support-cases__user:visited { color: var(--ink-teal); }
.support-badge--muted { background: var(--creation-beige); color: var(--ink-soft); }
.support-badge--overdue { background: var(--tone-danger-bg); color: var(--tone-danger-ink); }
.support-cases__due--overdue { color: var(--ink-red); font-weight: 600; }

/* The name of whoever has a case: a click takes it in their place. */
.support-cases__owner {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.support-cases__owner:hover .person span:last-child { text-decoration: underline; }
.support-cases__owner:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; border-radius: 6px; }
.case-contact__results .option--danger strong { color: var(--ink-red); }

/* Reportes › Satisfacción (Jace #2065): one row of CSAT and NPS, as wide as
   each other; stacked on a narrow screen, in the same order. The semáforo of
   the Cartera moved to the Tablero (Jace #2143). */
.satisfaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

@media (max-width: 960px) {
  .satisfaction-row { grid-template-columns: minmax(0, 1fr); }
}

/* A number of the period with its chart 20px below it (the card's gap is
   4px). */
.metric--chart {
  align-content: start;
}

.metric__chart {
  margin-top: 16px;
}

.traffic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 14px 16px;
}

.traffic-card__text p,
.traffic-card__title {
  margin: 0;
}

.traffic-card__title {
  color: var(--creation-ink);
  font-size: 17px;
  font-weight: 600;
}

.traffic-card__hint {
  color: var(--ink-muted);
  font-size: 14px;
}

.traffic-card__total {
  color: var(--creation-ink);
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.traffic-card__text .traffic-card__total {
  margin-top: 22px;
}

.traffic-card__label {
  color: var(--ink-soft);
  font-size: 15px;
}

/* Only the box, no pole or base: three lights, red on top. */
.report-lights {
  display: grid;
  flex: none;
  justify-items: center;
  gap: 10px;
  width: 92px;
  margin: 0;
  border-radius: 24px;
  background: #2b3431;
  padding: 12px 0;
  list-style: none;
}

.report-lights__halo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.report-lights__lamp {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}

.report-lights__halo--red { background: #f7cbc5; }
.report-lights__halo--red .report-lights__lamp { background: #e26b5f; }
.report-lights__halo--yellow { background: #f8e6a6; }
.report-lights__halo--yellow .report-lights__lamp { background: #e3b22b; }
.report-lights__halo--green { background: #c3e5cf; }
.report-lights__halo--green .report-lights__lamp { background: #4fa874; }

/* The shared date editor and its calendar in the browser's top layer. */
.date-picker {
  width: min(100%, 250px);
}

.date-picker__field {
  position: relative;
  height: 40px;
}

.date-picker__field > .icon {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 17px;
  height: 17px;
  color: var(--ink-muted);
  pointer-events: none;
  z-index: 1;
}

.date-picker .date-picker__input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 8px 10px 8px 38px;
  border: 1px solid var(--line-sand-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--creation-ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.date-picker .date-picker__input::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.date-picker__field:focus-within .date-picker__input, .date-picker--open .date-picker__input {
  border: 2px solid var(--ink-teal);
  padding-left: 37px;
  box-shadow: 0 0 0 3px var(--surface-mint);
  outline: none;
}

.date-picker__field:focus-within > .icon, .date-picker--open .date-picker__field > .icon {
  color: var(--ink-teal);
}

.date-picker__toggle {
  position: absolute;
  inset: 0 auto 0 0;
  width: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.date-picker__input:disabled {
  opacity: .6;
  cursor: default;
}

.date-picker__calendar {
  position: fixed;
  inset: auto;
  margin: 0;
  box-sizing: border-box;
  width: 282px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line-sand);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(30,39,37,.14);
  color: var(--creation-ink);
  font: inherit;
}

.date-picker__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.date-picker__heading strong {
  font-size: 15px;
  font-weight: 700;
}

.date-picker__heading button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-sand-soft);
  color: var(--creation-ink);
  cursor: pointer;
}

.date-picker__heading .icon {
  width: 16px;
  height: 16px;
}

.date-picker__week, .date-picker__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.date-picker__week {
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 600;
}

.date-picker__days button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--creation-ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.date-picker__days button:hover:not(:disabled) {
  background: var(--surface-mint);
}

.date-picker__days button.is-today {
  box-shadow: inset 0 0 0 1.5px var(--ink-teal);
  color: var(--ink-teal);
  font-weight: 700;
}

.date-picker__days button.is-selected, .date-picker__days button.is-selected:hover {
  background: var(--creation-green);
  color: var(--creation-green-foreground);
  font-weight: 700;
}

.date-picker__days button:disabled {
  color: var(--ink-faintest);
  cursor: default;
}

.date-picker__calendar button:focus-visible, .date-picker__time-field input:focus-visible {
  outline: 2px solid var(--ink-teal);
  outline-offset: 2px;
}

.date-picker__time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-sand-soft);
}

.date-picker__time-row > label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.date-picker__time-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.date-picker__time-field > .icon {
  position: absolute;
  left: 8px;
  top: 10px;
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
  pointer-events: none;
}

.date-picker__time-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line-sand-strong);
  border-radius: 9px;
  padding: 6px 23px 6px 29px;
  color: var(--creation-ink);
  font: inherit;
  font-size: 14px;
}

.date-picker__time-field button {
  position: absolute;
  right: 0;
  top: 0;
  display: grid;
  place-items: center;
  height: 36px;
  width: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}

.date-picker__time-field button .icon {
  width: 13px;
  height: 13px;
}

.date-picker__done {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: var(--creation-green);
  color: var(--creation-green-foreground);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* The hours open below the «Hora» field, under the days, never over them
   (Jace #2073): the calendar grows and moves to keep them in sight. */
.date-picker__times {
  position: relative;
  margin: 8px 0 0 60px;
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid var(--line-sand);
  border-radius: 14px;
  background: var(--card);
  scrollbar-color: var(--ink-faint) #F6F3EE;
}

.date-picker__times button {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 0;
  background: var(--card);
  color: var(--creation-ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.date-picker__times button:hover {
  background: var(--surface-mint);
}

.date-picker__times button[aria-selected="true"] {
  background: var(--creation-green);
  color: var(--creation-green-foreground);
}


.person-avatar {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  width: 28px;
  height: 28px;
  flex: none;
}

.person-avatar .avatar {
  width: 28px;
  height: 28px;
  background: var(--surface-mint);
  color: var(--ink-teal);
  font-size: 11px;
  font-weight: 700;
}

.person-avatar__tooltip {
  position: fixed;
  inset: auto;
  margin: 0;
  max-width: calc(100vw - 8px);
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: #1E2725;
  color: white;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  pointer-events: none;
}

.person-unassigned {
  color: var(--ink-faint);
}

.call-owner .person-avatar select {
  position: absolute;
  inset: 0;
  width: 28px;
  min-width: 0;
  height: 28px;
  opacity: 0;
  cursor: pointer;
}

.person-avatar:focus-visible, .person-avatar:has(select:focus-visible) {
  outline: 2px solid var(--ink-teal);
  outline-offset: 3px;
  border-radius: 50%;
}

/* Seguimiento › Customer Success (Jace #2072): its head, the semáforo as a
   dot with a halo, the row buttons, «Hecha» and «Cerrado», the dates and
   «Esta semana». */
.cs-heading .cs-heading__side {
  height: 44px;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-mint);
  padding: 0 18px 0 16px;
  color: var(--ink-teal);
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
}
.cs-heading .cs-heading__side:hover { background: var(--surface-mint-strong); color: var(--ink-teal); text-decoration: none; }
.cs-heading .cs-heading__side .creation-icon { width: 17px; height: 17px; }

.traffic-halo {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  vertical-align: middle;
}
.traffic-halo::after {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  content: "";
}
.traffic-halo--green { background: #DDF3E6; }
.traffic-halo--green::after { background: #2D8A55; }
.traffic-halo--yellow { background: #FFF3C4; }
.traffic-halo--yellow::after { background: #E0B400; }
.traffic-halo--red { background: #FBE3E1; }
.traffic-halo--red::after { background: #B3261E; }

/* «¿Cómo sentiste al cliente?» (Jace #2073): 520px, three color cards and only «Guardar». */
.modal.traffic-light-window { width: min(520px, 100%); border-radius: 16px; background: var(--card); }
.traffic-light-window__body { display: grid; gap: 16px; padding: 24px 24px 8px; }
.traffic-light-window__title { margin: 0; font-size: 20px; font-weight: 600; }
.traffic-light-window__who { margin: -12px 0 0; color: var(--ink-muted); font-size: 14px; }
/* «Aplicar a todo el grupo» (Jace #3149): the companies the color also goes to, wrapped whole. */
.traffic-light-window__group { margin: 0; color: var(--ink-muted); font-size: 13px; overflow-wrap: anywhere; }
.traffic-light-window__current { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-muted); font-size: 13px; }
.traffic-light-window__colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; border: 0; padding: 0; }
.traffic-light-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-sand);
  border-radius: 14px;
  padding: 16px 8px;
  cursor: pointer;
}
.traffic-light-choice:has(input:checked) { border: 2px solid var(--ink-teal); background: var(--surface-mint-soft); padding: 15px 7px; }
.traffic-light-choice:has(input:focus-visible) { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.traffic-light-choice__dot { position: relative; width: 52px; height: 52px; border-radius: 50%; }
.traffic-light-choice__dot::after { position: absolute; inset: 12px; border-radius: 50%; content: ""; }
.traffic-light-choice__dot--green { background: var(--tone-success-bg); }
.traffic-light-choice__dot--green::after { background: var(--tone-success-solid); }
.traffic-light-choice__dot--yellow { background: var(--tone-yellow-bg); }
.traffic-light-choice__dot--yellow::after { background: var(--tone-yellow-solid); }
.traffic-light-choice__dot--red { background: var(--tone-danger-bg); }
.traffic-light-choice__dot--red::after { background: var(--tone-danger-solid); }
.traffic-light-choice__name { font-size: 14px; font-weight: 600; }

.button.cs-row-button {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-mint);
  padding: 0 16px;
  color: var(--ink-teal);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: none;
}
.button.cs-row-button:hover { background: var(--surface-mint-strong); color: var(--ink-teal); text-decoration: none; }

.cs-done-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--tone-success-bg);
  padding: 3px 10px;
  color: var(--tone-success-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cs-date { display: inline-flex; flex-direction: column; gap: 2px; }
.cs-date__day { color: var(--creation-ink); }
.cs-date__date { color: var(--ink-muted); font-size: 13px; }
.cs-date--late .cs-date__day { color: var(--ink-red); font-weight: 600; }

.cs-company { display: flex; align-items: flex-start; gap: 10px; }
.cs-company .traffic-halo { margin-top: 1px; }
.cs-empty { color: var(--ink-faint); }
.cs-list .cs-list__action { text-align: right; }

/* The Cartera: red first, its «+» only on the row under the mouse, with its label. */
/* Anchor the hidden heading inside the table's scroll container (Jace #2097). */
.cs-portfolio th.new-follow-up { position: relative; }
.cs-portfolio th[aria-sort] .sort-button { color: var(--creation-ink); }
.cs-portfolio th[aria-sort] .sort-button::after { color: var(--ink-teal); }
.cs-portfolio tbody tr:hover > td { background: var(--surface-sand-faint); }
.cs-portfolio td.new-follow-up { width: 60px; text-align: right; }
/* «Responsable» (Jace #3123, #3147): only its photo, which an Administrador clicks to change it; the filter sits at the bar's right. */
.cs-portfolio td.cs-owner .person,
.cs-portfolio td.churned-by .person { white-space: nowrap; }
/* «Buscar compañía…» of the Cartera CS (Jace #3197): its suggestions open under it. */
.incident-list .cs-portfolio-search { position: relative; }
.cs-portfolio-search input::-webkit-search-cancel-button { display: none; }
.cs-portfolio-search__clear { display: inline-flex; color: var(--ink-muted); }
.cs-portfolio-search__clear:hover { color: var(--foreground); }
.cs-portfolio-search .combobox__list { border: 1px solid var(--line-sand); border-radius: 12px; background: var(--card); box-shadow: 0 8px 24px rgb(30 39 37 / 10%); padding: 6px; max-height: 280px; }
.button.cs-portfolio__add {
  position: relative;
  width: 44px;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  visibility: hidden;
}
/* A group of companies (Jace #3127): one row, «Ver más» opens its companies under it, indented. */
.cs-portfolio__group-name { color: var(--creation-ink); overflow-wrap: anywhere; }
.cs-portfolio__group-count { display: block; }
.cs-portfolio__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink-teal);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.cs-portfolio__toggle:hover { text-decoration: underline; }
.cs-portfolio__chevron { width: 14px; height: 14px; transition: transform 0.15s; }
.cs-portfolio__toggle[aria-expanded=true] .cs-portfolio__chevron { transform: rotate(180deg); }
.cs-portfolio__member > td { background: var(--surface-sand-faint); }
.cs-portfolio__member > td.cs-portfolio__company { padding-left: 32px; }
.cs-portfolio tbody tr:hover .cs-portfolio__add,
.cs-portfolio .cs-portfolio__add:focus-visible { visibility: visible; }
.cs-portfolio__add[data-tooltip]:hover::after,
.cs-portfolio__add[data-tooltip]:focus-visible::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  border-radius: 6px;
  background: #1E2725;
  padding: 4px 8px;
  color: white;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* «Responsable» of Llamadas: the avatar opens the people of Customer Success. */
.owner-picker { position: relative; display: inline-block; }
.owner-picker > summary { list-style: none; cursor: pointer; }
.owner-picker > summary::-webkit-details-marker { display: none; }
/* It opens inside the cell: the table's scroll would cut a floating menu. */
.owner-picker__menu {
  min-width: 220px;
  margin: 6px 0 0;
  border: 1px solid var(--line-sand);
  border-radius: 12px;
  background: var(--card);
  padding: 6px;
  list-style: none;
  box-shadow: 0 12px 32px rgba(30, 39, 37, 0.16);
}
.owner-picker__menu form { margin: 0; }
.owner-picker__option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  padding: 6px 8px;
  color: var(--creation-ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.owner-picker__option:hover,
.owner-picker__option--current { background: var(--surface-mint); }

/* «Esta semana»: «Tu semana» and its progress, then each section's rows in four columns. */
.cs-week__title { margin: 0; font-size: 16px; font-weight: 700; }
.cs-week__progress { display: flex; align-items: center; gap: 12px; color: var(--ink-muted); font-size: 13px; font-weight: 600; }
.cs-week__bar-track { position: relative; width: 140px; height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-linen); }
.cs-week__bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: #2D7A4F; }
.cs-week .empty { margin: 16px 0 0; }
.cs-week__section { padding-top: 16px; }
.cs-week__heading { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.cs-week__heading .tab-count { margin-left: 0; color: var(--ink-muted); font-size: 14px; font-weight: 600; }
.cs-week__heading .creation-icon--contract { width: 16px; height: 16px; }
.cs-week__rows { margin: 0; padding: 0; list-style: none; }
.cs-week__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 140px 170px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-sand-soft);
  padding: 14px 0;
}
.cs-week__row:last-child { border-bottom: 0; }
.cs-week__row--done { opacity: 0.55; }
.cs-week__company { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.cs-week__company .traffic-halo { margin-top: 1px; }
.cs-week__code { color: var(--ink-muted); }
.cs-week__action { text-align: right; }

@media (max-width: 760px) {
  .cs-week__row { grid-template-columns: minmax(0, 1fr) auto; }
  .cs-week__third { display: none; }
  .cs-week__action { grid-column: 1 / -1; text-align: left; }
}

/* Customer identities are readable; compact avatar tooltips belong to Equipo. */
.customer-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  vertical-align: middle;
  color: var(--creation-ink);
}
.table .customer-identity { min-width: 180px; }
.customer-identity .avatar { width: 28px; height: 28px; flex: none; background: var(--surface-mint); color: var(--ink-teal); }
.customer-identity__text { display: flex; min-width: 0; flex-direction: column; text-align: left; }
.customer-identity__name { font-size: 15px; font-weight: 600; line-height: 1.4; }
.customer-identity__email { color: var(--ink-muted); font-size: 13px; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }

/* Bug and escalation details (Jace #2089), using the list's palette. */
.record-heading.page-head { display: block; }
.record-heading__identifier { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-muted); font-family: var(--font-mono, ui-monospace, monospace); font-size: 14px; }
.record-heading__identifier .creation-icon { width: 18px; height: 18px; }
.record-heading h1 { max-width: 1000px; margin: 8px 0 0; color: var(--creation-ink); font-size: 30px; font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.record-heading p.record-heading__meta { margin-top: 12px; line-height: 1.8; }
.record-heading__actions { gap: 12px; margin-top: 20px; }
.record-heading__actions:empty { display: none; }
.record-status, .record-tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 3px 9px; font-size: 13px; font-weight: 600; line-height: 1.4; vertical-align: middle; }
.record-tag, .record-status--closed, .record-status--escalation.badge--muted { background: var(--creation-beige); color: var(--ink-soft); }
.record-status--open { background: var(--tone-warning-bg); color: var(--tone-warning-ink); }
.record-status--in_development { background: var(--tone-info-bg); color: var(--tone-info-ink); }
.record-status--resolved { background: var(--tone-success-bg); color: var(--tone-success-ink); }
.record-tag--danger { background: var(--tone-danger-bg); color: var(--tone-danger-ink); }
.record-status__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
.record-status--escalation.badge--muted .record-status__dot { background: var(--tone-neutral-solid); }
.record-status--escalation.badge--info { background: var(--tone-info-bg); color: var(--tone-info-ink); }
.record-status--escalation.badge--info .record-status__dot { background: var(--tone-info-solid); }
.record-status--escalation.badge--new { background: var(--tone-new-bg); color: var(--tone-new-ink); }
.button.record-action, .record-heading--escalation .record-heading__actions .button { min-height: 44px; border: 0; border-radius: 10px; background: var(--surface-mint); padding: 0 16px; color: var(--ink-teal); font-size: 15px; font-weight: 600; box-shadow: none; }
.button.record-action:hover, .record-heading--escalation .record-heading__actions .button:hover { background: var(--surface-mint-strong); }
.button.record-action--small { min-height: 36px; border-radius: 9px; padding: 0 12px; font-size: 14px; }
.record-action .icon { width: 16px; height: 16px; }
/* Red trash beside Editar: an Administrador erases the incident (Jace #2253). */
.button.record-action--danger, .record-heading--escalation .record-heading__actions .button--danger { min-width: 44px; padding: 0 12px; background: color-mix(in srgb, var(--destructive) 12%, transparent); color: var(--destructive); }
.button.record-action--danger:hover, .record-heading--escalation .record-heading__actions .button--danger:hover { background: color-mix(in srgb, var(--destructive) 20%, transparent); }
.incident-description h2, .affected-users-heading h2, .escalation-detail h2 { font-size: 17px; font-weight: 600; }
.incident-description .incident-description__text { max-width: 820px; color: var(--creation-ink); overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.incident-description .incident-description__text :is(p, ul, ol, blockquote, pre) { margin: 0 0 12px; }
.incident-description .incident-description__text :is(h1, h2, h3, h4, h5, h6) { margin: 22px 0 6px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.incident-description .incident-description__text :is(.rich-text, .lexxy-content) > :first-child { margin-top: 0; }
.incident-description .incident-description__text :is(.rich-text, .lexxy-content) > :last-child { margin-bottom: 0; }
.incident-description .incident-description__text code { border-radius: 5px; background: var(--surface-sand-soft); padding: 1px 5px; font-family: ui-monospace, monospace; font-size: 13px; }
.incident-description .incident-description__text pre { max-width: 100%; border: 0; border-radius: 10px; background: var(--surface-sand-soft); padding: 12px 14px; font-family: ui-monospace, monospace; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.incident-description .incident-description__text pre code { padding: 0; white-space: inherit; }
/* «Detalle» of a bug (Jace #2357): label and content in two columns, as in an
   escalation and a request; one column on a phone. */
.incident-facts { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px 16px; margin: 0; color: var(--creation-ink); font-size: 15px; line-height: 1.6; }
.incident-facts dt { color: var(--ink-gray); }
.incident-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
/* Its links keep the underline and hover of running text, in #2E6E64. */
.incident-facts a:not([class]):not(:hover) { color: var(--ink-teal); }
.incident-facts .hint { color: var(--ink-gray); font-size: 14px; }
.incident-facts__clamp.is-clamped { max-height: 6.4em; overflow: hidden; }
.incident-facts__files { display: flex; flex-wrap: wrap; gap: 8px; }
.incident-facts__files > div { flex-basis: 100%; }
@media (max-width: 600px) {
  .incident-facts { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .incident-facts dd + dt { margin-top: 10px; }
}
/* The emails of the escalation with no profile in Jace, under the table. */
.affected-users-note { margin: 16px 0 0; border-top: 1px solid var(--line-linen); padding-top: 12px; color: var(--creation-ink); font-size: 14px; overflow-wrap: anywhere; }
.affected-users-note span { color: var(--ink-gray); }
.affected-users-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.affected-users-heading h2 { margin: 0; }
.affected-users-heading h2 small { color: var(--ink-muted); font-size: 13px; font-weight: 400; }
.affected-users-actions { justify-content: flex-end; }
.button.remove-contact { width: 36px; min-height: 36px; flex: none; border: 1px solid var(--line-sand); border-radius: 9px; background: var(--card); padding: 0; color: var(--ink-muted); box-shadow: none; }
.button.remove-contact .icon { width: 16px; height: 16px; }
.button.remove-contact:hover, .button.remove-contact:focus-visible { border-color: var(--ink-red); background: var(--card); color: var(--ink-red); }
.integration-label { display: inline-block; border-radius: 6px; background: var(--surface-mint); padding: 2px 7px; color: var(--ink-teal); font-size: 12px; font-weight: 600; }
.history-toggle { border: 0; background: none; padding: 4px 0; color: var(--ink-teal); font-size: 14px; font-weight: 600; cursor: pointer; }
.history-toggle:hover { text-decoration: underline; }
.history-toggle:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 3px; border-radius: 2px; }
.escalation-detail .escalation-facts { grid-template-columns: 190px minmax(0, 1fr); gap: 14px 16px; color: var(--creation-ink); font-size: 15px; }
.escalation-detail .escalation-facts dt { color: var(--ink-muted); }
.escalation-detail .escalation-facts dd { min-width: 0; overflow-wrap: anywhere; }
.escalation-detail .escalation-facts a { color: var(--ink-teal); font-weight: 500; text-decoration: none; }
.escalation-detail .escalation-facts a:hover { text-decoration: underline; }
.escalation-detail .escalation-facts .hint { color: var(--ink-muted); font-size: 14px; }
/* How it ended, first on the page (Jace #2236): a bar, the note below over white.
   Every bar is pastel with dark text of its color, over 6.5:1 (Jace #2288):
   green when it was resolved, blue when it became a bug and red for «No
   resuelto» after «Continúa». */
.escalation-closing { margin-bottom: 20px; overflow: hidden; border: 2px solid #A8D5B8; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.escalation-closing__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 18px; background: #DCF0E3; color: #1E5C3A; }
.escalation-closing__head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.escalation-closing__head time { margin-left: auto; font-size: 14px; opacity: .9; }
.escalation-closing__check { display: inline-grid; flex: none; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--card); }
/* The note keeps the format it was written with (Jace #3129): rich_note_format draws its lines. */
.escalation-closing__note { margin: 0; padding: 18px; color: var(--creation-ink); font-size: 18px; line-height: 1.55; overflow-wrap: anywhere; }
@media (max-width: 640px) { .escalation-closing__head time { width: 100%; margin-left: 34px; } }
.escalation-closing--converted { border-color: #A9C4EA; }
.escalation-closing--converted .escalation-closing__head { background: #DCE8F8; color: #1E4E8C; }
.escalation-closing--converted .escalation-closing__check .creation-icon { width: 16px; height: 16px; }
.escalation-closing--not-resolved { border-color: #EDB0B0; }
.escalation-closing--not-resolved .escalation-closing__head { background: #FBE1E1; color: #8F1D1D; }
.escalation-closing__link { color: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.escalation-closing__link:hover { color: inherit; opacity: .85; }
/* The buttons of an escalation (Jace #2092): «Marcar como resuelto» is the main one. */
.record-action .creation-icon { width: 16px; height: 16px; }
.record-heading--escalation .button.record-action--primary, .button.record-action--primary { background: var(--creation-green); color: var(--creation-green-foreground); }
.record-heading--escalation .button.record-action--primary:hover, .button.record-action--primary:hover { background: var(--creation-green-hover); }
/* The window «Tomar» opens from the list (Jace #2092). */
.modal.escalation-window { position: relative; width: min(820px, 100%); border-radius: 16px; background: var(--card); box-shadow: 0 20px 50px rgba(30, 39, 37, .25); }
.escalation-window__close { position: absolute; top: 14px; right: 14px; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: none; color: var(--ink-muted); cursor: pointer; }
.escalation-window__close:hover { background: var(--creation-beige); color: var(--creation-ink); }
.escalation-window__close .icon { width: 18px; height: 18px; }
.escalation-window__body { padding: 24px 24px 20px; }
.escalation-window__body > div:first-child { padding-right: 40px; }
.escalation-window #escalation-window-title { max-width: 1000px; margin: 8px 0 0; color: var(--creation-ink); font-size: 26px; font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.escalation-window p.record-heading__meta { margin: 12px 0 0; line-height: 1.8; }
.escalation-window__notice { margin: 16px 0 0; border-radius: 10px; background: var(--surface-mint-soft); padding: 10px 14px; color: var(--ink-teal); font-size: 14px; }
.escalation-window .escalation-detail { margin-top: 20px; }
.escalation-window__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-sand); border-radius: 0 0 16px 16px; background: var(--surface-sand-soft); padding: 14px 24px; }
.escalation-window__foot-start, .escalation-window__foot-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.escalation-window__foot-end { margin-left: auto; }
.escalation-window__foot .button.record-action { min-height: 40px; border: 0; border-radius: 10px; padding: 0 16px; font-size: 15px; font-weight: 600; box-shadow: none; }
.escalation-window__foot .button.record-action:not(.record-action--primary) { background: var(--surface-mint); color: var(--ink-teal); }
.escalation-window__foot .button.record-action:not(.record-action--primary):hover { background: var(--surface-mint-strong); }
@media (max-width: 600px) {
  .escalation-detail .escalation-facts { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .escalation-detail .escalation-facts dd + dt { margin-top: 10px; }
}

.escalation-detail { margin-bottom: 16px; }
/* The company profile and its contract and Customer Success windows. */
.company-header.page-head { display: block; margin-bottom: 24px; }
.company-header__title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.company-header__title h1 { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; font-size: 40px; font-weight: 400; overflow-wrap: anywhere; }
.company-header .traffic-halo { flex: 0 0 26px; width: 26px; height: 26px; }
.company-header .traffic-halo::after { inset: 6px; width: 14px; height: 14px; }
.company-operation { flex-shrink: 0; padding: 6px 10px; border-radius: 8px; background: var(--creation-beige); color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.company-header__data { margin-top: 12px; color: var(--ink-muted); font-size: 16px; }
.company-header__data p { margin: 0; font-size: inherit; color: inherit; }
/* Its country, city and address (Jace #2556), under its data. */
.company-header__data .company-location { margin-top: 4px; font-size: 15px; }
.company-header__data .company-account { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; }
.company-header__actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.company-header__secondary { margin-left: auto; }
.company-edit { height: 44px; border: 0; border-radius: 10px; padding: 0 16px; background: var(--surface-mint); color: var(--ink-teal); font-size: 15px; font-weight: 600; }
.company-edit:hover { background: #D4E4DF; }
.company-edit svg { width: 15px; height: 15px; }
.company-menu { position: relative; }
.company-menu__trigger { width: 44px; padding: 0; font-size: 24px; }
.company-menu__panel { position: absolute; z-index: 15; top: calc(100% + 8px); right: 0; min-width: 230px; border: 1px solid var(--line-sand); border-radius: 12px; padding: 6px; background: var(--card); box-shadow: 0 8px 20px rgb(30 39 37 / 10%); }
.company-menu__panel a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.company-menu__panel a:hover { background: var(--surface-mint-soft); }
/* «Borrar compañía» is a form's button among the links (Jace #2285). */
.company-menu__panel form { margin: 0; }
.company-menu__panel button[role="menuitem"] { display: block; width: 100%; border: 0; padding: 10px 12px; border-radius: 6px; background: none; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.company-menu__panel button[role="menuitem"]:hover { background: var(--surface-mint-soft); }
.company-menu__panel .company-menu__danger { color: var(--ink-red); }
.company-text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-teal); font-size: 14px; font-weight: 600; }
.company-text-link svg { width: 14px; height: 14px; }
/* The calls of a company out of the Cartera CS, in its profile (Jace #2092). */
.company-calls__out { display: inline-flex; align-items: center; border-radius: 999px; background: var(--creation-beige); padding: 3px 10px; color: var(--ink-muted); font-size: 13px; font-weight: 600; line-height: 1.4; }
.company-contract__data { display: grid; grid-template-columns: 1fr; gap: 18px 24px; margin: 16px 0 0; font-size: 14px; }
.company-contract__data > div { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 1.6fr); gap: 10px; align-items: start; }
.company-contract__data dt { color: var(--ink-muted); }
.company-contract__data dd { margin: 0; overflow-wrap: anywhere; }
.company-contract__billed { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 13px; }
.company-contract__urgent { color: var(--ink-red); font-weight: 600; }
.company-unassigned { color: var(--ink-faint); }
.company-contract #company_assigned_to { margin: 0; }
.cs-details-modal .form-row { align-items: start; }
.modal.cs-details-modal { width: min(760px, calc(100vw - 32px)); }
.cs-operation-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cs-operation-options .option { margin: 0; min-width: 0; }
.cs-operation-options .option:has(input:checked) { border-color: var(--ink-teal); background: var(--surface-mint-soft); }
/* «¿Es prospecto o cliente?» of «Nueva compañía» (Jace #2556). */
.company-kind-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.company-kind-options .option { margin: 0; min-width: 0; }
.company-kind-options .option span { display: grid; gap: 2px; }
.company-kind-options .option:has(input:checked) { border-color: var(--ink-teal); background: var(--surface-mint-soft); }
@media (max-width: 640px) { .company-kind-options { grid-template-columns: 1fr; } }
/* «Agregar compañía a la cartera» (Jace #2096): a window over the Cartera in the style of «Editar datos de CS». */
.modal.cs-add-modal { border-radius: 16px; background: var(--card); }
.cs-add-modal .modal__foot { border-radius: 0 0 16px 16px; background: var(--surface-sand-soft); }
.cs-add-modal .cs-add-modal__submit { background: var(--creation-green); }
.cs-add-modal .cs-add-modal__submit:hover { background: var(--creation-green-hover); }
.cs-add-modal .cs-add-modal__submit:disabled { opacity: .5; cursor: not-allowed; }
.cs-add-modal .field input[type=text], .cs-add-modal .field input[type=number] { height: 40px; }
.cs-add-modal .choice-picker summary { min-height: 40px; padding-block: 6px; }
.cs-company-finder > svg { position: absolute; top: 12px; left: 12px; width: 16px; height: 16px; color: var(--ink-muted); pointer-events: none; }
.cs-company-finder input[type=text] { padding-left: 36px; }
.cs-company-finder .combobox__list { border: 1px solid var(--line-sand); border-radius: 12px; background: var(--card); box-shadow: 0 8px 24px rgb(30 39 37 / 10%); padding: 6px; max-height: 280px; }
.cs-company-option { display: grid; gap: 2px; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.cs-company-option:hover, .cs-company-option[aria-selected="true"] { background: var(--surface-mint); }
.cs-company-option__name { font-weight: 700; }
.cs-company-option__group { color: var(--ink-muted); font-size: 13px; }
.cs-company-option--new { margin-top: 6px; border-top: 1px solid var(--line-sand-soft); border-radius: 0 0 8px 8px; color: var(--ink-teal); font-weight: 600; }
.cs-company-notice { margin: 4px 0 0; border-radius: 10px; background: var(--surface-mint-soft); padding: 10px 14px; color: var(--ink-teal); font-size: 14px; }
.cs-company-already { margin: 4px 0 0; color: var(--ink-red); font-size: 13px; font-weight: 600; }
/* «Nueva compañía» with a group of Grupos (Jace #3198). */
.cs-group-addition { display: grid; gap: 6px; border-radius: 10px; background: var(--surface-mint-soft); padding: 10px 14px; color: var(--ink-teal); font-size: 14px; }
.cs-group-addition p { margin: 0; }
.cs-group-addition__hint, .cs-group-addition__rest { color: var(--ink-muted); font-size: 13px; }
.cs-company-option--group .cs-company-option__group { color: var(--ink-teal); font-weight: 600; }
.cs-assigned-locked { display: flex; align-items: center; min-height: 40px; border: 1px solid var(--line-sand); border-radius: 8px; background: var(--surface-sand-soft); padding: 0 12px; font-size: 14px; }
.cs-contract-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-add-modal .cs-contract-hint { color: var(--ink-muted); font-size: 13px; }
.choice-picker { position: relative; min-width: 0; font-size: 14px; }
.choice-picker summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; border: 1px solid var(--line-sand); border-radius: 8px; padding: 8px 12px; cursor: pointer; list-style: none; }
.choice-picker summary::-webkit-details-marker { display: none; }
.choice-picker summary > svg { width: 14px; height: 14px; flex-shrink: 0; }
.choice-picker__menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: max(100%, 220px); max-height: 280px; overflow-y: auto; border: 1px solid var(--line-sand); border-radius: 14px; padding: 6px; background: var(--card); box-shadow: 0 12px 32px rgb(30 39 37 / 16%); }
.choice-picker__option { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.choice-picker__option:has(input:checked) { background: var(--surface-mint); }
.choice-picker__option:hover { background: var(--surface-mint-soft); }
.choice-picker__option:focus-within { outline: 2px solid var(--ink-teal); outline-offset: -2px; }
.choice-picker__option .choice-picker__check { width: 16px; height: 16px; color: var(--ink-teal); visibility: hidden; }
.choice-picker__option:has(input:checked) .choice-picker__check { visibility: visible; }
.contract-money-field { display: flex; align-items: center; min-width: 0; border: 1px solid var(--line-sand); border-radius: 8px; background: var(--card); }
.contract-money-field:focus-within { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.contract-money-field__symbol { padding-left: 12px; color: var(--ink-muted); }
.contract-money-field input[type=number] { min-width: 0; width: 100%; border: 0; background: transparent; box-shadow: none; outline: none; }
.currency-picker { flex: 0 0 110px; border-left: 1px solid var(--line-sand); }
.currency-picker summary { border: 0; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.currency-picker [data-choice-picker-target=selected], .currency-picker [data-choice-label] { display: inline-flex; align-items: center; gap: 8px; }
.currency-picker img { width: 22px; height: 22px; }
.currency-picker .choice-picker__menu { width: 170px; }
.currency-picker .choice-picker__option { font-size: 14px; font-weight: 700; }
.company-next-call { display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid #EFEAE2; border-radius: 12px; padding: 14px 16px; background: var(--surface-sand-faint); }
.company-next-call p { margin: 4px 0 0; font-size: 14px; }
.company-next-call strong { font-size: 15px; }
.company-next-call__label { color: var(--ink-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.company-call-history__heading { font-size: 15px; }
.company-call-history__call { border-bottom: 1px solid var(--line-sand-soft); }
.company-call-history__call > summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; list-style: none; cursor: pointer; font-size: 14px; }
.company-call-history__call > summary::-webkit-details-marker { display: none; }
.company-call-history__call > summary:hover { background: var(--surface-sand-faint); }
.company-call-history__arrow { width: 16px; height: 16px; flex-shrink: 0; transition: transform 160ms ease-out; }
.company-call-history__call[open] > summary .company-call-history__arrow { transform: rotate(90deg); }
.company-call-history__date, .company-call-history__call .badge, .company-call-history__call .person-avatar { flex-shrink: 0; }
.company-call-history__excerpt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.company-call-history__colors { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 68px; flex-shrink: 0; }
.company-call-history__colors .traffic-halo { flex-shrink: 0; margin: 0; }
.company-call-history__body { max-width: 854px; padding: 0 0 20px 34px; font-size: 14px; line-height: 1.55; }
.company-call-history__body .call-script { display: block; margin: 14px 0; }
.company-call-history__body .call-script dt { margin-top: 14px; color: var(--ink-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.company-call-history__body .call-script dd { margin: 4px 0 0; }
.company-call-history__traffic { display: flex; align-items: flex-start; gap: 10px; border-radius: 10px; padding: 10px 12px; background: var(--surface-mint-soft); }
.company-call-history__traffic .traffic-halo { flex-shrink: 0; margin-top: 2px; }
.company-call-history__traffic p { margin: 4px 0 0; }
.company-call-history__audit { margin-top: 14px; font-size: 13px; }
/* Customer Success's notes among the calls (Jace #3146): «Nota» or «Llamada»
   before the date, the filter of the history, and the latest note under each
   company of the Cartera, its first two lines. */
.company-call-history__kind { min-width: 64px; justify-content: center; text-align: center; }
/* «Registrada desde» (Jace #3149): a line of its own under the row, which wraps. */
.company-call-history__call > summary:has(.company-call-history__from) { flex-wrap: wrap; }
.company-call-history__from { flex-basis: 100%; order: 2; margin: -6px 0 0 28px; color: var(--ink-muted); font-size: 13px; overflow-wrap: anywhere; }
.cs-history-filter { margin: 4px 0 8px; }
.cs-note__meta { margin: 14px 0 0; font-size: 13px; }
.cs-note__actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 13px; }
.cs-note__delete { color: var(--ink-red); }
.company-calls__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-latest-note { display: block; max-width: 420px; margin-top: 6px; color: inherit; font-size: 13px; line-height: 1.4; text-decoration: none; }
.cs-latest-note:hover .cs-latest-note__text { color: var(--ink-slate); }
.cs-latest-note--none { color: var(--ink-muted); }
.cs-latest-note__head { display: flex; align-items: center; gap: 6px; }
.cs-latest-note__text { display: -webkit-box; overflow: hidden; color: var(--ink-muted); -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
/* Bugs linked to a note or a call of Customer Success (Jace #3150): code,
   title and status on one line that wraps, never cut; «Ligar bug» and
   «Crear bug» under them, and the bug's «Mencionado en…» lines. */
.cs-bug-section { display: grid; gap: 8px; margin-top: 14px; }
.cs-bug-section__title { margin: 0; color: var(--ink-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cs-bug-section__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-bugs { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cs-bugs__bug { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; font-size: 14px; line-height: 1.4; }
.cs-bugs--pick .cs-bugs__bug { padding: 8px 0; border-bottom: 1px solid var(--line-sand-soft); }
.cs-bugs__code { flex: none; font-weight: 700; white-space: nowrap; }
.cs-bugs__title { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.cs-bugs__action { margin-left: auto; }
.cs-bug-window__search { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-bug-window__search input { flex: 1 1 220px; min-width: 0; }
.cs-bug-window__source { margin: 0; }
.cs-mentions div + div { margin-top: 4px; }
.cs-mention__text { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .company-header__title { align-items: flex-start; flex-direction: column; }
  .company-header__title h1 { font-size: 40px; }
  .company-contract__data { grid-template-columns: 1fr; }
  .company-next-call { align-items: flex-start; flex-direction: column; gap: 12px; }
  .cs-operation-options { grid-template-columns: 1fr; }
  .company-call-history__call > summary { flex-wrap: wrap; gap: 8px; }
  .company-call-history__excerpt { flex-basis: calc(100% - 130px); order: 1; }
  .company-call-history__body { padding-left: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .company-call-history__arrow { transition: none; }
}

.company-header .incident-create { min-height: 44px; margin-top: 0; background: var(--creation-green); font-size: 15px; }
.company-header .incident-create:hover { background: var(--creation-green-hover); }

/* Avatar assignment uses the same explicit choice and save in each window. */
.modal.person-assignment-window { width: min(440px, 100%); }
.person-assignment-trigger { display: inline-flex; border: 0; padding: 0; text-decoration: none; vertical-align: middle; }
.person-assignment-trigger:hover { text-decoration: none; }
.person-assignment-trigger:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 3px; border-radius: 6px; }
.person-assignment-window__company { margin: 0; color: var(--ink-muted); font-size: 14px; }
.person-assignment-window__company strong { color: var(--creation-ink); }
.person-assignment-option { display: flex; align-items: center; gap: 10px; height: 44px; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.person-assignment-option:has(input:checked) { background: var(--surface-mint); }
.person-assignment-option:hover { background: var(--surface-mint-soft); }
.person-assignment-option:focus-within { outline: 2px solid var(--ink-teal); outline-offset: -2px; }
.person-assignment-option__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.person-assignment-option--unassigned .person-assignment-option__name { color: var(--ink-muted); }
.person-assignment-option__empty { flex: 0 0 28px; width: 28px; height: 28px; border: 1px dashed var(--ink-faint); border-radius: 50%; }
.person-assignment-option > svg { flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; color: var(--ink-teal); visibility: hidden; }
.person-assignment-option:has(input:checked) > svg { visibility: visible; }
.person-assignment-window__save { background: var(--creation-green); }
.person-assignment-window__save:hover { background: var(--creation-green-hover); }

/* Request details and the reminder window share the bug and escalation palette. */
.request-detail h2, .request-notes-panel h2 { font-size: 17px; font-weight: 600; }
.request-facts.dl { grid-template-columns: 220px minmax(0, 1fr); gap: 14px 16px; font-size: 15px; line-height: 1.55; }
.request-facts dt, .reminder-window__facts dt { color: var(--ink-muted); }
.request-facts dd, .reminder-window__facts dd { min-width: 0; overflow-wrap: anywhere; }
.request-facts .rich-text > :first-child, .reminder-window__facts .rich-text > :first-child { margin-top: 0; }
.request-facts .rich-text > :last-child, .reminder-window__facts .rich-text > :last-child { margin-bottom: 0; }
.request-facts a, .reminder-window__facts a { color: var(--ink-teal); font-weight: 500; text-decoration: none; }
.request-facts a:hover, .reminder-window__facts a:hover { text-decoration: underline; }
.request-development__empty { color: var(--ink-faint); font-size: 14px; }
.request-development .incident-description__text { margin-top: 16px; }

/* The notes of a request (Jace #2996), in their own panel «Notas» apart from «Desarrollo» (Jace #3195), one per line,
   the newest first, as Sofía asked instead of post-its: the author and date on the left, the text, which wraps and is
   never cut, in the middle, and the pencil and trash on the right; on a phone the text goes below its author. With no
   notes the panel is one line: «Notas» and «+ Agregar nota»; a note being written takes the whole width below. */
.request-notes-panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.request-notes-panel__head h2 { margin: 0; }
.request-note-new:has(.request-note__form:not([hidden])) { flex-basis: 100%; }
.request-notes { margin: 12px 0 0; padding: 0; list-style: none; }
.request-note { padding: 10px 0; border-top: 1px solid var(--border); }
/* Up to 130 px by default, half of the first 260 as Sofía asked, the last line fading, and «Ver más» below (Jace #3195);
   a note being edited shows whole, with no «Ver más» while it is open. */
.request-notes--clamp.is-clamped { max-height: 130px; overflow: hidden; mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
.request-notes--clamp.is-clamped:has(.request-note__form:not([hidden])) { max-height: none; mask-image: none; }
.request-notes__more { margin-top: 8px; }
[data-controller="clamp"]:has(.request-notes--clamp.is-clamped .request-note__form:not([hidden])) .request-notes__more { display: none; }
.request-note:last-child { padding-bottom: 0; }
.request-note__view { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: start; gap: 4px 16px; }
.request-note__author { display: flex; align-items: center; gap: 8px; min-width: 0; }
.request-note__by { display: flex; flex-direction: column; min-width: 0; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.request-note__name { font-weight: 600; }
.request-note__date { color: var(--muted-foreground); }
.request-note__body { min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-note__actions { display: flex; align-items: center; gap: 2px; margin-top: -4px; }
@media (max-width: 640px) {
  .request-note__view { grid-template-columns: minmax(0, 1fr) auto; }
  .request-note__body { grid-column: 1 / -1; grid-row: 2; }
}
.request-note__delete { display: contents; }
.request-note__action {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
}
.request-note__action:hover { background: var(--muted); color: var(--foreground); }
.request-note__action:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.request-note__action .icon { width: 16px; height: 16px; }
.request-note__form { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.request-notes-panel__head .request-note__form { margin-top: 4px; }
.request-note__field {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  padding: 7px 9px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}
.request-note__form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.request-note__error { margin: 0; color: var(--tone-danger-ink); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.request-status--received { background: var(--tone-info-bg); color: var(--tone-info-ink); }
.request-status--received .record-status__dot { background: var(--tone-info-solid); }
.request-status--progress, .reminder-status--pending { background: var(--tone-warning-bg); color: var(--tone-warning-ink); }
.request-status--progress .record-status__dot, .reminder-status--pending .record-status__dot { background: var(--tone-warning-solid); }
.request-status--in_development { background: var(--tone-amber-bg); color: var(--tone-amber-ink); }
.request-status--in_development .record-status__dot { background: var(--tone-amber-ink); }
.request-status--released, .reminder-status--done { background: var(--tone-success-bg); color: var(--tone-success-ink); }
.request-status--released .record-status__dot, .reminder-status--done .record-status__dot { background: var(--tone-success-solid); }
.request-status--declined, .reminder-status--unclaimed { background: var(--creation-beige); color: var(--ink-soft); }
.request-status--declined .record-status__dot, .reminder-status--unclaimed .record-status__dot { background: var(--tone-neutral-solid); }
.reminder-status--overdue { background: var(--tone-danger-bg); color: var(--tone-danger-ink); }
.reminder-status--overdue .record-status__dot { background: var(--tone-danger-solid); }
.request-status-menu .choice-picker__menu { left: 0; right: auto; }
.request-status-menu__option { display: flex; align-items: center; width: 100%; min-height: 40px; border: 0; border-radius: 8px; background: none; padding: 8px 12px; color: var(--ink-teal); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.request-status-menu__option:hover { background: var(--surface-mint); text-decoration: none; }
/* The current status, in its place, is shown with a check on its right and not chosen (Jace #3169). */
.request-status-menu__current { gap: 12px; background: var(--surface-mint); color: var(--ink-teal); font-weight: 700; cursor: default; }
.request-status-menu__current:hover { background: var(--surface-mint); }
.request-status-menu__current .icon { width: 16px; height: 16px; flex: none; margin-left: auto; }
.modal.reminder-detail-window { position: relative; width: min(820px, 100%); border-radius: 16px; background: var(--card); box-shadow: 0 20px 50px rgba(30, 39, 37, .25); }
.reminder-window__body { display: block; padding: 24px; }
.reminder-window__body > header { padding-right: 32px; }
.reminder-detail-window #reminder-window-title { margin: 8px 0 0; color: var(--creation-ink); font-size: 26px; font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.reminder-detail-window .record-heading__meta { margin: 12px 0 0; line-height: 1.8; }
.reminder-window__facts.dl { grid-template-columns: 170px minmax(0, 1fr); gap: 12px 16px; margin: 24px 0; font-size: 15px; line-height: 1.55; }
.reminder-window__facts .hint { color: var(--ink-muted); font-size: 14px; }
.reminder-window__facts .rich-text p { margin: 0 0 8px; }
.reminder-detail-window .folded-panel { border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.reminder-detail-window .folded-panel__header h2 { display: none; }
.reminder-detail-window .folded-panel__header { margin: 0; }
.form.reminder-window__closing { margin: 20px 0 0; border-top: 1px solid var(--line-sand-soft); border-radius: 0; background: none; padding: 20px 0 0; }
.reminder-window__closing label { font-size: 15px; font-weight: 600; }
.reminder-window__closing label .hint { color: var(--ink-muted); font-weight: 400; }
.reminder-window__closing textarea { height: 76px; min-height: 76px; }
.reminder-window__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-sand); border-radius: 0 0 16px 16px; background: var(--surface-sand-soft); padding: 14px 24px; }
.reminder-window__foot-start { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.reminder-window__foot-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; }
.reminder-window__foot .button { min-height: 40px; font-size: 14px; font-weight: 600; }
@media (max-width: 600px) {
  .request-facts.dl, .reminder-window__facts.dl { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .request-facts dd + dt, .reminder-window__facts dd + dt { margin-top: 10px; }
  .reminder-window__body { padding: 20px 16px; }
  .reminder-window__foot { padding: 14px 16px; }
}

.record-external-link[target="_blank"]::after { content: none; }

/* Configuración › Guiones: compact list actions and a single script editor. */
.call-scripts td { border-bottom-color: var(--line-sand-soft); vertical-align: middle; }
.call-scripts__action-cell { width: 1%; }
.call-scripts strong { font-size: 15px; font-weight: 700; }
.call-scripts small { color: var(--ink-muted); font-size: 14px; white-space: nowrap; }
.call-script-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
}
.call-script-action--edit { color: var(--ink-teal); background: var(--surface-mint); }
.call-script-action--edit .icon { width: 15px; height: 15px; }
.call-script-action--edit:hover { background: var(--surface-mint-strong); }
.call-script-action--remove { color: var(--ink-muted); background: var(--card); border-color: var(--line-sand); }
.call-script-action--remove .icon { width: 16px; height: 16px; }
.call-script-action--remove:hover { color: var(--ink-red); border-color: var(--ink-red); }
.call-script-action:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 3px; }
.call-script-editor__back { display: inline-block; margin-bottom: 24px; color: var(--ink-teal); font-size: 14px; font-weight: 600; }
.call-script-editor > .form { max-width: 820px; gap: 24px; }
.call-script-editor input[type="text"] { height: 40px; }
.call-script-editor__bubble { border-radius: 12px; padding: 14px 16px; background: var(--surface-cream); }
.call-script-editor__bubble label { color: var(--ink-muted); font-size: 12px; font-weight: 700; }
.call-script-editor__bubble textarea { background: var(--card); }
.call-script-editor__bubble small { color: var(--ink-muted); font-size: 13px; }
.call-script-editor__questions h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.call-script-editor__questions h2 small { color: var(--ink-muted); font-size: 14px; font-weight: 400; }
.call-script-editor .call-script__questions { gap: 0; margin: 0 0 16px; padding: 0; list-style: none; }
.call-script-editor .call-script__question {
  grid-template-columns: 28px minmax(0, 1fr) 36px;
  align-items: start;
  gap: 16px;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--line-sand-soft);
  border-radius: 0;
}
.call-script-editor .call-script__question[hidden] { display: none; }
.call-script-editor__number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 25px;
  border: 1.5px solid var(--line-sand-strong);
  border-radius: 50%;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
}
.call-script-editor__fields { display: grid; gap: 12px; }
.call-script-editor__fields label { color: var(--ink-muted); font-size: 13px; font-weight: 600; }
.call-script-editor__question-actions { display: grid; gap: 8px; margin-top: 24px; }
.call-script-editor .call-script__handle { position: static; width: 36px; height: 36px; padding: 0; }
.call-script-editor__add { min-height: 36px; padding: 6px 12px; color: var(--ink-teal); background: var(--surface-mint); }
.call-script-editor__add:hover { background: var(--surface-mint-strong); }
.call-script-editor__footer { border-top: 1px solid var(--line-sand-soft); padding-top: 20px; }
.call-script-editor__footer .button--success { background: var(--creation-green); }
.call-script-editor__footer .button--success:hover { background: var(--creation-green-hover); }
@media (max-width: 540px) {
  .call-script-editor .call-script__question { gap: 8px; }
}

/* Encuestas › «Nueva campaña», 20px under the description (Jace #2106). */
.survey-heading .survey-create {
  height: 44px;
  gap: 10px;
  margin-top: 20px;
  border: 0;
  border-radius: 10px;
  background: var(--creation-green);
  padding: 0 18px 0 9px;
  color: var(--creation-green-foreground);
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
}

.survey-heading .survey-create:hover { background: var(--creation-green-hover); }
.survey-create .creation-icon-circle .icon,
.survey-create .creation-icon-circle svg { width: 16px; height: 16px; color: var(--ink-green); }

/* The pills of Respuestas NPS and Compañías: each with its 8px dot, then a
   divider before the last ones (Jace #2106). */
.list-filters { align-items: center; }
.list-filters__divider { width: 1px; height: 20px; flex-shrink: 0; margin: 0 6px; background: var(--line-sand); }
.filter-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; }
.filter-dot--detractors, .filter-dot--high { background: var(--tone-danger-solid); }
.filter-dot--passives, .filter-dot--medium { background: var(--tone-yellow-solid); }
.filter-dot--promoters, .filter-dot--low { background: var(--tone-success-solid); }
.filter-dot--unknown { background: var(--tone-neutral-solid); }

/* Compañías's risk: a tag with its 7px dot; a missing value in grey. */
.risk-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.risk-tag__dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; }
.risk-tag--high { background: var(--tone-danger-bg); color: var(--tone-danger-ink); }
.risk-tag--high .risk-tag__dot { background: var(--tone-danger-solid); }
.risk-tag--medium { background: var(--tone-yellow-bg); color: var(--tone-yellow-ink); }
.risk-tag--medium .risk-tag__dot { background: var(--tone-yellow-solid); }
.risk-tag--low { background: var(--tone-success-bg); color: var(--tone-success-ink); }
.risk-tag--low .risk-tag__dot { background: var(--tone-success-solid); }
.risk-tag--unknown,
.risk-tag--churned { background: var(--creation-beige); color: var(--ink-soft); }
.risk-tag--unknown .risk-tag__dot,
.risk-tag--churned .risk-tag__dot { background: var(--tone-neutral-solid); }
/* A prospect (Jace #2556) has no risk: its tag says so, in blue. */
.risk-tag--prospect { background: var(--tone-info-bg); color: var(--tone-info-ink); }
.risk-tag--prospect .risk-tag__dot { background: var(--tone-info-solid); }
.missing-value { color: var(--ink-faint); }

/* «¿Cómo se calcula el riesgo?»: a card with its link, no triangle. */
.risk-rules { margin-top: 16px; }
.risk-rules__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.risk-rules__head::-webkit-details-marker { display: none; }
.risk-rules__head::marker { content: ""; }
.risk-rules__title { font-size: 16px; font-weight: 600; }
.risk-rules__toggle { color: var(--ink-teal); font-size: 14px; font-weight: 600; }
.risk-rules__head:hover .risk-rules__toggle { text-decoration: underline; }
.risk-rules__head:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 4px; }
.risk-rules__hide,
.risk-rules[open] .risk-rules__show { display: none; }
.risk-rules[open] .risk-rules__hide { display: inline; }
.risk-rules ul { margin: 12px 0 0; }

/* Reportes (Jace #2116): compact period controls, numbers and chart rows. */
.report-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.report-header .tabs {
  flex-shrink: 0;
  align-items: end;
  margin: 0;
  border: 0;
}

.report-period {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 16px;
  padding-bottom: 10px;
}

.report-period__label {
  color: var(--ink-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.report-period__switch {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-linen);
}

.report-period__option,
.report-period__option:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.report-period__option:hover { color: var(--creation-ink); }
.report-period__option[aria-current="page"],
.report-period__option.is-active {
  background: var(--card);
  color: var(--creation-ink);
  box-shadow: 0 1px 3px rgba(30,39,37,.14);
}

.report-period__calendar { width: 40px; padding: 0; }
.report-period__calendar .icon { width: 18px; height: 18px; }
.report-range { margin: 0; }
.report-period__option:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; }

.report-range__calendar { width: 310px; }
.report-range__day { position: relative; display: grid; place-items: center; }
.report-range__day.is-in-range::before {
  position: absolute;
  inset: 0;
  background: var(--surface-mint);
  content: "";
}
.report-range__day.is-start::before { left: 50%; }
.report-range__day.is-end::before { right: 50%; }
.report-range__day.is-start.is-end::before { display: none; }
.report-range__day button { position: relative; }
.report-range__day.is-in-range button:not(.is-selected) { color: var(--ink-teal); }
.report-range__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-sand-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.report-range__footer .date-picker__done { flex-shrink: 0; height: 36px; border-radius: 9px; }
.report-range__footer .date-picker__done:disabled { opacity: .5; cursor: default; }

.reports-page .report-section { gap: 12px; margin: 30px 0 0; }
.reports-page .report-section > h2 { font-size: 20px; font-weight: 600; }
.report-hours { margin: 12px 0 0; color: var(--ink-muted); font-size: 13px; }
.reports-page #escalations { margin-top: 16px; }

.reports-page .report-section:not(#satisfaction) .metric {
  align-self: start;
  align-content: start;
  min-width: 0;
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid var(--line-sand);
  border-radius: 14px;
}
.reports-page .report-section:not(#satisfaction) .metric:hover { background: var(--card); }
.reports-page .report-section:not(#satisfaction) .metric__value { font-size: 26px; font-weight: 800; }
.reports-page .report-section:not(#satisfaction) .metric__label { color: var(--ink-soft); font-size: 14px; }
.reports-page .report-section:not(#satisfaction) .metric__change { color: var(--ink-muted); font-size: 12.5px; }
.reports-page .report-metrics--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.reports-page .report-metrics--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.reports-page .report-charts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-charts > *, .report-row > * { min-width: 0; }
.report-row { display: grid; gap: 16px; }
.report-row--thirds { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.report-row--quarters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }
.report-half { width: calc(50% - 8px); }
.reports-page .lines__svg { height: 110px; }
.reports-page .bars__row { grid-template-columns: 150px minmax(0, 1fr) 3ch; font-size: 14px; }
.reports-page .bars__label { color: var(--ink-soft); overflow-wrap: anywhere; }
.reports-page .bars__track { height: 10px; border-radius: 999px; background: var(--creation-beige); }
.reports-page .bars__bar { border-radius: 999px; }
.reports-page .pastel--unknown { background: var(--line-sand-strong); }
.reports-page .panel h2 small { color: var(--ink-muted); font-size: 13px; }
.reports-page #chart-notices .stacked__bar { height: 12px; }
/* Avisos in one card (Jace #2397): «N de M» big and bold, its label beside
   it in plain text, the change in gray and the bar below. It wraps, never cuts. */
.notices-card { display: grid; gap: 10px; }
.notices-card__headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; color: var(--creation-ink); }
.notices-card__count { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.notices-card__label { min-width: 0; font-size: 15px; font-weight: 400; overflow-wrap: anywhere; }
#notices #chart-notices .metric__change { color: var(--ink-gray); font-size: 12.5px; }
.reports-page .report-empty { margin: 0; padding: 0; border: 0; background: none; color: var(--ink-muted); font-size: 14px; text-align: left; }
.report-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.reports-page .report-link, .reports-page .report-link:visited { flex-shrink: 0; color: var(--ink-teal); font-size: 14px; font-weight: 600; text-decoration: none; }
.reports-page .report-link:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .report-period { flex-wrap: wrap; gap: 6px; }
  .report-period__label { width: 100%; text-align: right; }
}

@media (max-width: 960px) {
  .reports-page .report-metrics--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reports-page .report-charts { grid-template-columns: minmax(0, 1fr); }
  .report-row--quarters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-row--quarters > .panel { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .report-header { flex-wrap: wrap; gap: 12px; }
  .report-header .tabs { width: 100%; }
  .report-period { justify-content: start; padding: 0; }
  .report-period__label { text-align: left; }
  .reports-page .report-metrics--six, .reports-page .report-metrics--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-row--thirds, .report-row--quarters { grid-template-columns: minmax(0, 1fr); }
  .report-half { width: auto; }
  .reports-page .bars__row { grid-template-columns: min(150px, 42%) minmax(0, 1fr) 3ch; }
}

/* Configuración › Equipo (Jace #2114): «+ Nueva persona» in the card's head,
   a person per row with avatar, name and address, and its actions on the
   right: the pencil and «Dar de baja» as a trash. No cell wraps its text. */
.team__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.team__head h2 { margin: 0; }
.team__count { margin-left: 6px; color: var(--ink-muted); font-size: 15px; font-weight: 400; }
.team__new { height: 44px; gap: 10px; border: 0; border-radius: 10px; background: var(--creation-green); padding: 0 18px 0 9px; color: var(--creation-green-foreground); font-size: 15px; font-weight: 600; box-shadow: none; }
.team__new:hover { background: var(--creation-green-hover); color: var(--creation-green-foreground); }
.team__new .creation-icon-circle { background: var(--creation-beige); }
.team__new .creation-icon-circle svg { width: 16px; height: 16px; color: var(--ink-green); }
/* The hidden header «Acciones» stays inside the table's scroll on a phone. */
.team .table-wrap { position: relative; }
.team__table th, .team__table td { white-space: nowrap; vertical-align: middle; }
.team__person { display: flex; align-items: center; gap: 12px; }
.team__identity { display: grid; gap: 2px; }
.team__name { color: var(--creation-ink); font-size: 15px; font-weight: 600; }
.team__you, .team__email { color: var(--ink-muted); font-size: 13px; font-weight: 400; }
.team__basecamp { color: var(--ink-muted); font-size: 12px; }
.team__role { font-size: 14px; }
.team__areas { display: inline-flex; gap: 6px; }
.team-area { display: inline-flex; align-items: center; border-radius: 999px; background: #E3EEFB; padding: 3px 10px; color: #1E4E9C; font-size: 12px; font-weight: 600; }
.team-area--all { background: var(--creation-beige); color: var(--ink-soft); }
.team__last-sign-in { color: var(--ink-muted); font-size: 13px; }
.team__actions { text-align: right; }
.team__buttons { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.team__buttons form { margin: 0; }
.team-button { display: inline-flex; align-items: center; height: 36px; border: 1px solid transparent; border-radius: 8px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; }
.team-button:hover { text-decoration: none; }
.team-button--soft { background: var(--surface-mint); color: var(--ink-teal); }
.team-button--soft:hover { background: var(--surface-mint-strong); }
.team-button--danger { border-color: var(--line-sand); background: var(--card); color: var(--ink-red); }
.team-button--danger:hover { background: var(--tone-danger-bg); }
.team-icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-sand); border-radius: 8px; background: var(--card); padding: 0; color: var(--ink-soft); cursor: pointer; }
.team-icon-button svg { width: 16px; height: 16px; }
.team-icon-button--edit { border-color: transparent; background: var(--surface-mint); color: var(--ink-teal); }
.team-icon-button--edit:hover { background: var(--surface-mint-strong); }
.team-icon-button:focus-visible, .team-button:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.team-icon-button--deactivate { color: var(--ink-muted); }
.team-icon-button--deactivate:hover, .team-icon-button--deactivate:focus-visible { border-color: var(--tone-danger-line); background: var(--tone-danger-bg); color: var(--tone-danger-solid); }

/* «Nueva persona» and «Editar persona»: a window of 640px with the areas as
   pills, each with its check when marked. */
.modal.person-window { width: min(640px, 100%); border-radius: 16px; background: var(--card); }
.person-window__hint { margin: 0; color: var(--ink-muted); font-size: 14px; }
.person-window__input { height: 40px; }
.person-window__areas[hidden] { display: none; }
.area-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.area-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; border: 1px solid var(--line-sand-strong); border-radius: 999px; background: var(--card); padding: 0 14px; color: var(--ink-soft); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.area-pill input { position: absolute; opacity: 0; pointer-events: none; }
.area-pill svg { display: none; width: 14px; height: 14px; }
.area-pill:has(input:checked) { border-color: var(--surface-mint); background: var(--surface-mint); color: var(--ink-teal); }
.area-pill:has(input:checked) svg { display: block; }
.area-pill:has(input:focus-visible) { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.person-window__areas-hint { margin: -8px 0 0; }
.person-window__submit { border: 0; background: var(--creation-green); color: var(--creation-green-foreground); }
.person-window__submit:hover { background: var(--creation-green-hover); }

/* Compañías › Grupos (Jace #2114): the list by risk, the highest first; the
   window «Nuevo grupo»; and a profile that changes everything in place. */
.group-list th[aria-sort] .sort-button { color: var(--creation-ink); }
.group-list th[aria-sort] .sort-button::after { color: var(--ink-teal); }
.group-list td { white-space: nowrap; }
.modal.group-window { width: min(560px, 100%); border-radius: 16px; background: var(--card); }
.group-window__input { height: 40px; }
.group-window__submit { border: 0; background: var(--creation-green); color: var(--creation-green-foreground); }
.group-window__submit:hover { background: var(--creation-green-hover); }
.group-finder { width: 100%; }
.group-finder .combobox__field { width: 100%; }
.group-finder .combobox__field > svg { position: absolute; top: 12px; left: 12px; width: 16px; height: 16px; color: var(--ink-muted); pointer-events: none; }
.group-finder .combobox__field input[type=search] { height: 40px; padding-left: 36px; }
/* A long name wraps instead of being cut (Jace #3124). */
.group-finder .combobox__option { overflow-wrap: anywhere; }

.group-head { align-items: flex-start; flex-wrap: nowrap; }
.group-head__main { min-width: 0; }
.group-name__text { display: flex; align-items: center; gap: 10px; }
.group-name__text[hidden], .group-name__field[hidden] { display: none; }
.group-name__pencil { display: inline-grid; flex-shrink: 0; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--surface-mint); color: var(--ink-teal); cursor: pointer; }
.group-name__pencil svg { width: 15px; height: 15px; }
.group-name__pencil:hover { background: var(--surface-mint-strong); }
.group-name__pencil:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.group-name__form { margin: 0; }
.group-name__field { width: min(420px, 100%); height: 40px; font-size: 20px; font-weight: 600; }
.group-head__summary.group-head__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-muted); font-size: 16px; }
.group-head > form { flex-shrink: 0; margin: 0; }
.group-head__delete { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--line-sand); border-radius: 8px; background: var(--card); padding: 0 16px; color: var(--ink-red); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.group-head__delete:hover { background: #FBE3E1; }

.group-panel__head { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.group-panel__head h2 { margin: 0; }
.group-panel__count { margin-left: 4px; color: var(--ink-muted); font-weight: 400; }
/* The finder hangs from the card's head, so it stays inside on a phone. */
.group-add { position: static; }
.group-add__button { display: inline-flex; align-items: center; gap: 6px; height: 36px; border-radius: 8px; background: var(--surface-mint); padding: 0 14px; color: var(--ink-teal); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.group-add__button::-webkit-details-marker { display: none; }
.group-add__button svg { width: 15px; height: 15px; }
.group-add__button:hover { background: var(--surface-mint-strong); }
.group-add__button:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.group-add__panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: min(360px, 100%); border: 1px solid var(--line-sand); border-radius: 14px; background: var(--card); padding: 10px; box-shadow: 0 12px 32px rgb(30 39 37 / 16%); }
.group-add__panel form { margin: 0; }
.group-companies td { white-space: nowrap; vertical-align: middle; }
.group-companies__actions { width: 1%; text-align: right; }
.group-companies__actions form { margin: 0; }
.group-remove { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-sand); border-radius: 8px; background: var(--card); padding: 0; color: var(--ink-muted); cursor: pointer; }
.group-remove svg { width: 16px; height: 16px; }
.group-remove:hover, .group-remove:focus-visible { border-color: #F2C4C0; background: #FBE3E1; color: #B3261E; }
.group-remove:focus-visible { outline: 2px solid var(--ink-red); outline-offset: 2px; }
.group-remove__tip { position: absolute; right: calc(100% + 8px); top: 50%; display: none; transform: translateY(-50%); border-radius: 6px; background: #1E2725; padding: 4px 8px; color: white; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.group-remove:hover .group-remove__tip, .group-remove:focus-visible .group-remove__tip { display: block; }

@media (max-width: 640px) {
  .group-head { flex-wrap: wrap; }
}

/* The head of a window with its icon and a line below the title. */
.modal__heading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.modal__titles { min-width: 0; }
.modal__titles h2 { overflow-wrap: anywhere; }
.modal__icon { display: inline-flex; width: 40px; height: 40px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: var(--creation-beige); }
.modal__icon .creation-icon { width: 22px; height: 22px; }
.modal__subtitle { margin: 2px 0 0; color: var(--ink-gray); font-size: 14px; }
.modal__head:has(.modal__subtitle) { align-items: flex-start; }

/* «Nueva solicitud» in two steps (Jace #2175). */
/* In the window only its body scrolls, between the head and the footer. */
.modal.request-window { display: flex; max-height: calc(100dvh - 64px); flex-direction: column; border-radius: 16px; background: var(--card); }
.request-window .modal__body { display: flex; min-height: 0; flex: 1; padding: 0; }
.request-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.request-steps__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 24px; }
.request-window .request-steps { display: flex; min-height: 0; max-width: none; flex: 1; flex-direction: column; }
.request-window .request-steps__body { min-height: 0; overflow-y: auto; padding: 18px 20px 24px; }
.request-step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.request-step[hidden] { display: none; }
.request-step.is-revealed { animation: request-step-in 0.25s ease-out; }
@keyframes request-step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .request-step.is-revealed { animation: none; }
}
.request-step__title { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--creation-ink); font-size: 17px; font-weight: 600; }
.request-step__marker { display: inline-flex; width: 28px; height: 28px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: var(--creation-beige); color: var(--creation-ink); font-size: 14px; font-weight: 600; }
.request-step__marker .icon { display: none; width: 16px; height: 16px; color: #FFFFFF; }
.request-step.is-complete .request-step__marker { background: #2D7A4F; }
.request-step.is-complete .request-step__marker > span { display: none; }
.request-step.is-complete .request-step__marker .icon { display: block; }

/* Short options as pills, without border: the medium and the category. */
.choice-pills,
.request-steps .contact-channel__options { display: flex; flex-wrap: wrap; gap: 8px; }
.request-steps .choice-pill,
.request-steps .contact-channel__option { position: relative; display: inline-flex; min-height: 40px; max-width: 100%; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: var(--surface-stone); padding: 0 16px; color: var(--creation-ink); font-size: 14px; font-weight: 500; line-height: 1.25; cursor: pointer; user-select: none; }
.choice-pill input,
.request-steps .contact-channel__option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pill:has(input:checked),
.request-steps .contact-channel__option:has(input:checked) { border: 0; background: var(--surface-mint); box-shadow: none; color: var(--ink-teal); font-weight: 700; }
.choice-pill:has(input:focus-visible),
.request-steps .contact-channel__option:has(input:focus-visible) { outline: 2px solid var(--ink-teal); outline-offset: 2px; }
.request-steps .contact-channel__option > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.request-steps .contact-channel__hint { display: inline; color: inherit; opacity: 0.75; }
.choice-pills + .field-error { margin-top: 6px; }

/* Its footer stays in view: the step, «Cancelar» and the button. */
.request-steps__foot { position: sticky; z-index: 2; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -16px -16px; border-top: 1px solid var(--line-sand); border-radius: 0 0 12px 12px; background: var(--card); padding: 14px 16px; }
.request-window .request-steps__foot { position: static; margin: 0; border-radius: 0 0 16px 16px; padding: 14px 20px; }
.request-steps__status { margin: 0; color: var(--ink-gray); font-size: 14px; }
.request-steps__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; }
.button.request-steps__cancel { min-height: 40px; padding: 0 4px; color: var(--ink-soft); font-size: 15px; }
.button.request-steps__cancel:hover { background: none; color: var(--creation-ink); text-decoration: underline; }
.button.request-steps__submit { min-height: 40px; border: 0; border-radius: 10px; background: var(--creation-green); padding: 0 16px; color: var(--creation-green-foreground); font-size: 15px; box-shadow: none; }
.button.request-steps__submit:hover { background: var(--creation-green-hover); }
.button.request-steps__submit:disabled { background: var(--surface-sand-strong); color: var(--ink-gray); opacity: 1; }

/* Escalation creation: progressive steps with an independently scrolling body. */
.modal-overlay:has(.escalation-create) { overflow: clip; }
.escalation-create {
  max-height: calc(100dvh - 64px);
  overflow: clip;
}
.escalation-create > form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}
.escalation-create .modal__head,
.escalation-create .modal__foot { flex-shrink: 0; }
.escalation-create .modal__head { align-items: flex-start; gap: 12px; padding: 20px; }
.escalation-create__heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.escalation-create__heading .creation-icon-circle { flex-shrink: 0; background: var(--creation-beige); }
.escalation-create__heading h2 { font-weight: 600; }
.escalation-create__heading p { margin: 4px 0 0; color: var(--ink-gray); font-size: 13px; }
.escalation-create .modal__body { min-height: 0; overflow: hidden auto; overscroll-behavior: contain; gap: 24px; }
.escalation-step { min-width: 0; }
.escalation-step:not([hidden]) { animation: escalation-step-enter .25s ease-out; }
.escalation-step__heading { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.escalation-step__marker {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--creation-beige);
  color: var(--creation-ink);
  font-size: 13px;
}
.escalation-step__check { display: none; width: 17px; height: 17px; }
.escalation-step.is-complete .escalation-step__marker { background: #2D7A4F; color: white; }
.escalation-step.is-complete .escalation-step__number { display: none; }
.escalation-step.is-complete .escalation-step__check { display: block; }
.escalation-step__fields,
.escalation-step__fields > [data-form-sections-target]:not([hidden]),
.escalation-attachments { display: grid; gap: 16px; min-width: 0; }
.escalation-create .form-section { border: 0; padding: 0; }
.escalation-create .escalation-pills,
.escalation-create .contact-channel__options { display: flex; flex-wrap: wrap; gap: 8px; }
.escalation-create :is(.escalation-pills .option, .contact-channel__option) {
  position: relative;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-stone);
  color: var(--creation-ink);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 400;
}
.escalation-create .escalation-pills strong { color: inherit; font-weight: inherit; }
.escalation-create .escalation-pills .option > span { font-weight: inherit; }
.escalation-create :is(.escalation-pills .option, .contact-channel__option):has(input:checked) {
  background: var(--surface-mint);
  color: var(--ink-teal);
  font-weight: 700;
  box-shadow: none;
}
.escalation-create .option:has(#escalation_blocks_operation_true:checked) { background: var(--tone-danger-bg); color: var(--tone-danger-ink); }
.escalation-create :is(.escalation-pills .option, .contact-channel__option) input {
  appearance: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.escalation-create :is(.option, .contact-channel__option):has(input:focus-visible) { outline: 2px solid var(--ink-teal); outline-offset: 3px; }
.escalation-area-choice { display: grid; gap: 6px; }
.escalation-area-hint { color: var(--ink-gray); font-size: 12px; }
.escalation-create .contact-channel__hint { display: inline; margin-left: 4px; color: inherit; }
.escalation-title-hint { margin: 4px 0 0; font-size: 12px; color: var(--ink-gray); }
.escalation-create .evidence-picker { border: 1px dashed #D8D0C3; border-radius: 10px; background: #FBF9F5; padding: 12px; }
.escalation-create .evidence-picker label { border: 0; background: transparent; color: var(--ink-teal); white-space: normal; height: auto; }
.escalation-create .evidence-picker label::before {
  content: '';
  flex: 0 0 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 11-8 8a6 6 0 0 1-8-8l9-9a4 4 0 0 1 6 6l-9 9a2 2 0 0 1-3-3l8-8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.escalation-create .modal__foot { align-items: center; background: var(--card); }
.escalation-create__progress { margin-right: auto; color: var(--ink-gray); font-size: 13px; }
.escalation-create .escalation-create__submit { background: var(--creation-green); color: var(--creation-green-foreground); white-space: normal; }
.escalation-create .escalation-create__submit:hover:not(:disabled) { background: var(--creation-green-hover); }
.escalation-create .escalation-create__submit:disabled { background: var(--surface-sand-strong); color: var(--ink-gray); opacity: 1; cursor: not-allowed; }
@keyframes escalation-step-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .escalation-step:not([hidden]) { animation: none; }
}
@media (max-width: 480px) {
  .escalation-create .modal__head,
  .escalation-create .modal__body,
  .escalation-create .modal__foot { padding: 16px; }
  .escalation-create__progress { flex-basis: 100%; }
}
/* Connected apps: a short setup followed by the person's own authorizations. */
.mcp-connect-steps { list-style: decimal; padding-left: 22px; margin: 24px 0 0; }
.mcp-connect-page h2 { font-weight: 600; }
.mcp-copy-action { margin-top: 16px; }
.mcp-connect-steps li + li { margin-top: 8px; }

.mcp-setup { padding: 4px 0 12px; }
.mcp-setup h2 { margin: 0 0 8px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.mcp-setup > p { margin: 0; color: var(--ink-slate); font-size: 14px; line-height: 1.6; }
.mcp-connect-page .mcp-apps { min-width: 0; margin: 22px 0 0; border: 0; padding: 0; }
.mcp-apps__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mcp-app-choice { position: relative; display: flex; min-width: 0; min-height: 178px; flex-direction: column; align-items: flex-start; border: 2px solid transparent; border-radius: 14px; padding: 22px; color: var(--creation-ink); cursor: pointer; transition: border-color 160ms ease-out, transform 160ms ease-out; }
.mcp-app-choice--claude { background: #F6E7DC; }
.mcp-app-choice--codex { background: #E4EDE6; }
.mcp-app-choice:hover { transform: translateY(-2px); }
.mcp-app-choice:has(input:checked) { border-color: var(--ink-green); }
.mcp-app-choice:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 4px; }
.mcp-app-choice input[type="radio"] { position: absolute; top: 20px; right: 20px; width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: #2D7A4F; cursor: pointer; }
.mcp-app-choice input[type="radio"]:focus-visible { outline: none; }
.mcp-app-choice__icon { display: block; width: 48px; height: 48px; margin-bottom: 20px; }
.mcp-app-choice__name { max-width: 100%; font-size: 20px; font-weight: 650; line-height: 1.25; }
.mcp-app-choice__maker { margin-top: 5px; color: var(--ink-slate); font-size: 13px; }
.mcp-setup .mcp-copy-action > .button { min-height: 44px; border-radius: 10px; background: var(--creation-green); padding: 0 18px; font-size: 14px; }
.mcp-setup .mcp-copy-action > .button:hover { background: var(--creation-green-hover); }
@media (max-width: 480px) {
  .mcp-apps__options { gap: 10px; }
  .mcp-app-choice { min-height: 168px; padding: 16px; }
  .mcp-app-choice input[type="radio"] { top: 16px; right: 16px; }
  .mcp-app-choice__name { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mcp-app-choice { transition: none; }
  .mcp-app-choice:hover { transform: none; }
}
.mcp-copy-status { min-height: 20px; margin: 10px 0 6px; font-size: 13px; }
.mcp-copy-fallback { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; }
.mcp-connections { list-style: none; margin: 0; padding: 0; }
.mcp-connections li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.mcp-connections li + li { border-top: 1px solid var(--border); }
.mcp-connections strong { overflow-wrap: anywhere; }
.mcp-connections p { margin: 4px 0 0; }
.mcp-consent p { margin: 0; }

/* Escalation information requests and links to existing bugs (Jace #2338). */
.escalation-info-banner,
.escalation-linked-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  margin-block: 18px;
  border: 0.5px solid #EBCB8B;
  border-radius: 10px;
  background: #FDF5E6;
  color: var(--creation-ink);
  overflow-wrap: anywhere;
}
.escalation-info-banner p,
.escalation-linked-banner p { margin: 0; }
.escalation-info-banner__icon { color: #B8740E; flex-shrink: 0; margin-top: 2px; }
.escalation-info-banner__body { flex: 1; min-width: 0; }
.escalation-info-banner__body strong { color: #633806; }
.escalation-info-banner__body span { color: var(--ink-gray); font-size: 13px; }
.escalation-info-banner__question { padding-top: 8px; overflow-wrap: anywhere; }
.escalation-green { background: var(--creation-green); color: var(--creation-green-foreground); border-color: var(--creation-green); }
.escalation-green:hover { background: var(--creation-green-hover); border-color: var(--creation-green-hover); color: var(--creation-green-foreground); }
.escalation-green:disabled { background: var(--surface-sand-strong); color: var(--ink-gray); border-color: var(--surface-sand-strong); cursor: default; }
.escalation-linked-banner { background: #EEF5F0; border-color: #B9D6C4; align-items: center; }
.escalation-linked-banner > .icon { color: var(--ink-green); flex-shrink: 0; }
.escalation-linked-banner a { font-weight: 600; }
.escalation-information-log { margin-block: 20px; }
.escalation-information-log__entry { padding-block: 18px; }
.escalation-information-log__entry + .escalation-information-log__entry { border-top: 1px solid var(--line-linen); }
.escalation-information-log__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-gray); font-size: 13px; margin: 0; }
.escalation-information-log__meta .icon { color: #B8740E; }
.escalation-information-log__meta .icon:last-of-type { flex-shrink: 0; }
.escalation-information-log__meta:nth-of-type(3) .icon { color: var(--ink-teal); }
.escalation-information-log__question,
.escalation-information-log__answer { overflow-wrap: anywhere; margin: 8px 0 18px 30px; color: var(--ink-gray); }
/* The answer keeps its format, as the question does (Jace #3136): rich_note_format draws its lines. */
.escalation-information-log__answer { color: var(--creation-ink); margin-bottom: 0; }
.escalation-dialog-icon { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--creation-beige); color: #B8740E; }
.escalation-dialog-icon .creation-icon { width: 24px; height: 24px; }
.escalation-reply .modal__head,
.escalation-conversion .modal__head { gap: 12px; }
.escalation-reply .modal__head h2,
.escalation-conversion .modal__head h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.escalation-reply__question { overflow-wrap: anywhere; }
.escalation-conversion { width: min(680px, 100%); }
.escalation-conversion__choices { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 24px 24px; }
.escalation-conversion__pill { border: 0; border-radius: 999px; padding: 10px 16px; background: var(--surface-stone); color: var(--creation-ink); cursor: pointer; font: inherit; font-size: 14px; white-space: normal; }
.escalation-conversion__pill[aria-pressed="true"] { background: var(--surface-mint); color: var(--ink-teal); font-weight: 700; }
.escalation-conversion__pill:hover { background: var(--surface-mint); }
.escalation-conversion__pill:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 3px; }
.escalation-conversion form[hidden] { display: none; }
.escalation-conversion .hint { color: var(--ink-gray); }
.escalation-bug-group { display: grid; gap: 8px; }
.escalation-bug-group + .escalation-bug-group { margin-top: 20px; }
.escalation-bug-group h3 { margin: 0 0 4px; color: var(--ink-gray); font-size: 14px; font-weight: 600; }
.escalation-bug-result { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line-linen); border-radius: 10px; overflow-wrap: anywhere; }
.escalation-bug-result span { flex: 1 1 220px; min-width: 0; }
.button.escalation-bug-action { margin-left: auto; max-width: 100%; border: 0; border-radius: 8px; background: var(--surface-mint); color: var(--ink-teal); font-weight: 700; white-space: normal; text-align: center; }
.button.escalation-bug-action:hover { background: var(--surface-mint-strong); }
.button.escalation-bug-action--recurrence { background: var(--tone-warning-bg); color: var(--tone-warning-ink); }
.button.escalation-bug-action--recurrence:hover { background: color-mix(in srgb, var(--tone-warning-solid) 18%, var(--tone-warning-bg)); }
.escalation-bug-action:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 3px; }
.escalation-bug-result strong { color: var(--creation-ink); font-size: 14px; }
.escalation-bug-result small { display: block; margin-top: 4px; color: var(--ink-gray); font-size: 12px; font-weight: 400; }
.escalation-bug-result mark { background: #FAEEDA; color: inherit; }
.incident-linked-cases h2 { font-size: 17px; font-weight: 600; }
.incident-linked-cases h2 small { color: var(--ink-gray); font-size: 15px; font-weight: 400; }
.incident-linked-cases article { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-block: 12px; color: var(--creation-ink); overflow-wrap: anywhere; }
.incident-linked-cases article + article { border-top: 1px solid var(--line-linen); }
.incident-linked-cases article a { color: var(--ink-teal); font-weight: 500; text-decoration: none; }
.incident-linked-cases article a:hover { text-decoration: underline; }
.incident-linked-cases time { color: var(--ink-gray); font-size: 13px; }
/* «Origen del bug» and «Ligado» (Jace #2357): no border, 6px corners. */
.case-tag { display: inline-block; border: 0; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.case-tag--origin { background: var(--creation-beige); color: var(--ink-stone); }
.case-tag--linked { background: var(--surface-mint); color: var(--ink-teal); }
.bell__title { display: block; font-size: 13px; margin-bottom: 4px; }
@media (max-width: 540px) {
  .escalation-info-banner { flex-wrap: wrap; padding: 16px; }
  .escalation-info-banner > .button { margin-left: 30px; }
  .escalation-info-banner__body { flex-basis: calc(100% - 34px); }
  .escalation-conversion__choices { padding-inline: 16px; }
  .escalation-conversion .modal__foot { flex-wrap: wrap; }
  .escalation-information-log__meta { align-items: flex-start; }
}

/* Bug sections: the existing catalog, combobox and dashboard surfaces. */
.catalog-row--fixed { grid-template-columns: minmax(0, 1fr) auto; padding-left: 42px; }
.catalog-written { margin-top: 24px; }
.catalog-written h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.catalog-written ul { padding: 0; margin: 0; list-style: none; }
.catalog-written li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.catalog-written li > span { min-width: 0; overflow-wrap: anywhere; color: var(--ink-gray); }
.catalog-written form { flex-shrink: 0; margin: 0; }
.catalog-written .button-soft { background: var(--surface-mint); color: var(--ink-teal); white-space: normal; }
.bug-section__picker { position: relative; border: .5px solid var(--line-sand-dim); border-radius: 8px; }
.bug-section__picker.is-open, .bug-section__picker:focus-within { border-color: var(--ink-teal); }
.bug-section__picker input[type="text"] { width: 100%; border: 0; border-radius: 8px; padding-right: 44px; background: transparent; }
.bug-section__picker input:focus { outline: none; box-shadow: none; }
.bug-section__picker input::placeholder { color: var(--ink-gray); opacity: 1; }
.bug-section__picker input:disabled { cursor: not-allowed; background: var(--muted); }
.bug-section__arrow { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: 44px; height: 100%; border: 0; border-radius: 8px; background: transparent; color: var(--ink-gray); cursor: pointer; }
.bug-section__arrow:disabled { cursor: not-allowed; opacity: .5; }
.bug-section__arrow .icon { width: 16px; height: 16px; }
.bug-section .combobox__list { z-index: 45; left: 0; right: 0; width: auto; }
.bug-section .combobox__option { overflow-wrap: anywhere; white-space: normal; }
.bug-section .combobox__option:hover,
.bug-section .combobox__option[aria-selected="true"] { background: var(--surface-mint); color: var(--ink-teal); font-weight: 700; }
.bug-section mark { background: #FAEEDA; color: inherit; }
.incident-facts dd.incident-facts__no-section { color: var(--ink-gray); }
.bug-sections-chart .panel__head { flex-wrap: wrap; gap: 8px; }
.bug-sections-chart ol { padding: 0; margin: 0; list-style: none; }
.bug-sections-chart li { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(40px, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; }
.bug-sections-chart li > span { overflow-wrap: anywhere; }
.bug-sections-chart b { min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.bug-sections-chart__track { height: 10px; border-radius: 4px; background: #EEEAE3; overflow: hidden; }
.bug-sections-chart__bar { height: 100%; border-radius: 4px; background: #E8A39B; }
@media (max-width: 600px) {
  .catalog-written li { flex-wrap: wrap; }
  .bug-sections-chart li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .bug-sections-chart__track { grid-column: 1; grid-row: 2; }
  .bug-sections-chart li b { grid-column: 2; grid-row: 1 / 3; }
}


/* Failure types share the existing short-option pills (Jace #2385). */
.form .bug-failure-type, .form .bug-priority { position: relative; min-width: 0; margin: 0; border: 0; padding: 0; }
.form .bug-failure-type legend, .form .bug-priority legend { padding: 0; margin-bottom: 8px; color: var(--creation-ink); font-weight: 600; }
.bug-failure-pills .choice-pill { position: relative; display: inline-flex; align-items: center; min-height: 40px; max-width: 100%; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--surface-stone); color: var(--creation-ink); font-size: 14px; font-weight: 500; line-height: 1.4; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
.bug-failure-pills .choice-pill:has(input:checked) { background: var(--surface-mint); color: var(--ink-teal); font-weight: 700; }
.bug-failure-pills .choice-pill:has(input:disabled) { color: var(--ink-gray); background: var(--surface-stone); cursor: not-allowed; }
.bug-failure-help { display: inline-flex; vertical-align: middle; }
.bug-failure-help__trigger { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; padding: 0; background: transparent; color: var(--ink-gray); font: inherit; font-size: 13px; cursor: help; }
.bug-failure-help__trigger:focus-visible { outline: 2px solid var(--ink-teal); outline-offset: 2px; border-radius: 8px; }
.bug-failure-help__tooltip { position: absolute; z-index: 50; top: 28px; left: 0; display: none; width: min(360px, 100%); border: .5px solid var(--line-sand-dim); border-radius: 8px; padding: 12px; background: var(--card); color: var(--creation-ink); font-size: 14px; font-weight: 400; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.bug-failure-help:hover .bug-failure-help__tooltip,
.bug-failure-help:focus-within .bug-failure-help__tooltip { display: grid; gap: 8px; }
.incident-facts dd.incident-facts__no-type { color: var(--ink-gray); }

/* Bug priorities share their palette across choices, tags and charts. */
.priority--high, .pastel--priority-high, .priority-select:has(option[value="high"]:checked) {
  --priority-dot: #C8372D;
  --priority-background: #FBE4E1;
  --priority-foreground: #A3271E;
  --priority-chart: #E8A39B;
}
.priority--medium, .pastel--priority-medium, .priority-select:has(option[value="medium"]:checked) {
  --priority-dot: #D9822B;
  --priority-background: #FCEBD9;
  --priority-foreground: #8A4510;
  --priority-chart: #F0B37E;
}
.priority--low, .pastel--priority-low, .priority-select:has(option[value="low"]:checked) {
  --priority-dot: #2F6FD6;
  --priority-background: #E6F1FB;
  --priority-foreground: #0C447C;
  --priority-chart: #9CC3EA;
}
.priority-tag, .field select.priority-select { background-color: var(--priority-background); color: var(--priority-foreground); }
.bug-priority .choice-pill { gap: 8px; }
.priority-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--priority-dot); }
.bug-priority .choice-pill:has(input:checked) { background: var(--priority-background); color: var(--priority-foreground); }
.pastel--priority-high, .pastel--priority-medium, .pastel--priority-low { background: var(--priority-chart); fill: var(--priority-chart); }

/* Bugs of origin «Interno» (Jace #2386): the tag beside the status, without
   border and with 6 px corners, and «Documentado por» in the filter Interno. */
.origin-tag { display: inline-block; border: 0; border-radius: 6px; padding: 2px 8px; background: var(--creation-beige); color: var(--ink-stone); font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.incident-status-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.incident-documented-by { color: var(--ink-gray); }
.reports-page .report-metrics--seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1100px) { .reports-page .report-metrics--seven { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 960px) { .reports-page .report-metrics--seven { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .reports-page .report-metrics--seven { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Requests of origin «Interno» and of type «Usabilidad» (Jace #2395): their
   tags beside the status, without border and with 6 px corners. */
.origin-tag--usability { background: var(--tone-clay-bg); color: var(--tone-clay-ink); }
/* «Crear idea» of a request, the size of the row's buttons, opens «Idea de
   proyecto» and «Mini-idea» in their colors (Jace #2961, #3168), and the tag of
   what it went to Basecamp as. */
.button.record-action.basecamp-idea-action { gap: 8px; white-space: nowrap; }
.basecamp-idea-menu .choice-picker__menu { left: 0; right: auto; display: grid; gap: 4px; }
.basecamp-idea-menu__option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; border: 0; border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer; }
.basecamp-idea-menu__option--project { box-shadow: inset 0 0 0 1px var(--tone-idea-border); background: var(--tone-idea-bg); color: var(--tone-idea-ink); }
.basecamp-idea-menu__option--project:hover { background: color-mix(in srgb, var(--tone-idea-bg) 85%, var(--tone-idea-ink)); }
.basecamp-idea-menu__option--mini { box-shadow: inset 0 0 0 1px var(--tone-mini-idea-border); background: var(--tone-mini-idea-bg); color: var(--tone-mini-idea-ink); }
.basecamp-idea-menu__option--mini:hover { background: color-mix(in srgb, var(--tone-mini-idea-bg) 88%, var(--tone-mini-idea-ink)); }
.basecamp-idea-menu__option--project .icon { color: var(--tone-idea-ink); }
.basecamp-idea-menu__option--mini .icon { fill: var(--tone-mini-idea-spark); stroke: var(--tone-mini-idea-ink); }
.basecamp-idea-tag--project_idea { background: var(--tone-idea-bg); color: var(--tone-idea-ink); }
.basecamp-idea-tag--mini_idea { background: var(--tone-mini-idea-bg); color: var(--tone-mini-idea-ink); }

/* Solicitudes › Roadmap (Jace #2984): Seguimiento's selector, as far under the
   header as on Seguimiento's pages, whose «Regresar» takes 15 px more than
   this page's, and the title 28 px under it. */
.request-views.follow-up-segments { margin-top: 15px; }
/* Roadmap filters and status colors (Jace #2998). Three wide columns as tall
   as the screen allows, compact cards whose title is never cut, and only
   Product Management drags them (Jace #3181). */
.request-roadmap.panel,
.request-roadmap-heading {
  --roadmap-line: #E6E8EB;
  --roadmap-filter-bg: #F1F3F5;
}
.request-roadmap.panel { border-color: var(--roadmap-line); background: var(--card); }
:root[data-theme="dark"] .request-roadmap,
:root[data-theme="dark"] .request-roadmap-heading {
  --roadmap-line: var(--border);
  --roadmap-filter-bg: var(--muted);
}
.request-roadmap-heading.page-head { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.request-roadmap__filters { min-width: 0; max-width: 100%; }
.request-roadmap__filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.request-roadmap__filters .icon { width: 16px; height: 16px; flex: none; }
.request-roadmap__select,
.request-roadmap__search {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--roadmap-line);
  border-radius: 9px;
  background: var(--card);
  color: var(--creation-ink);
  font-size: 13px;
}
.request-roadmap__select {
  position: relative;
  gap: 4px;
  padding-left: 9px;
  white-space: nowrap;
}
.request-roadmap__select select {
  min-height: inherit;
  appearance: none;
  field-sizing: content;
  border: 0;
  border-radius: inherit;
  padding: 0 30px 0 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.request-roadmap__select .icon {
  position: absolute;
  right: 8px;
  pointer-events: none;
}
.request-roadmap__select:hover { background: var(--roadmap-filter-bg); }
.request-roadmap__search { width: 260px; max-width: 100%; padding: 0 9px; }
.request-roadmap__search button {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.request-roadmap__search button:hover { color: var(--creation-ink); }
.request-roadmap__search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.request-roadmap__search input::placeholder { color: var(--ink-muted); opacity: 1; }
.request-roadmap__select:focus-within,
.request-roadmap__search:focus-within,
.request-roadmap__more:focus-visible,
.request-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.request-roadmap__board {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 4px;
}
.request-roadmap__column--planned { --column-bg: #EEF4FD; --column-ink: #1F4F9E; --column-dot: #2F6FD6; }
.request-roadmap__column--in_development { --column-bg: #FDF4E4; --column-ink: #8A5200; --column-dot: #D98A0B; }
.request-roadmap__column--released { --column-bg: #EAF6EE; --column-ink: #1D6B40; --column-dot: #2D9A5B; }
:root[data-theme="dark"] .request-roadmap__column {
  --column-tone: var(--column-bg);
  --column-surface: color-mix(in srgb, var(--column-dot) 18%, var(--card));
}
.request-roadmap__column {
  display: flex;
  flex-direction: column;
  height: max(24rem, calc(100dvh - 20rem));
  min-width: 0;
  padding: 0 6px 6px;
  border-radius: 14px;
  background: var(--column-surface, var(--column-bg));
}
.request-roadmap__column.is-over { box-shadow: inset 0 0 0 2px var(--column-dot); }
.request-roadmap__header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 8px;
  padding: 10px 1px 8px;
  background: var(--column-surface, var(--column-bg));
}
.request-roadmap__head { display: flex; align-items: center; gap: 7px; }
.request-roadmap__head h2 {
  min-width: 0;
  margin: 0;
  color: var(--column-tone, var(--column-ink));
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.request-roadmap__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--column-dot); }
.request-roadmap__count {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--card);
  color: var(--column-tone, var(--column-ink));
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.request-roadmap__period {
  border-radius: 7px;
  color: var(--ink-muted);
  font-size: 12px;
}
.request-roadmap__period label { position: relative; display: flex; align-items: center; }
.request-roadmap__period select {
  min-height: 22px;
  appearance: none;
  field-sizing: content;
  border: 0;
  border-radius: inherit;
  padding: 0 22px 0 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.request-roadmap__period .icon {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  pointer-events: none;
}
.request-roadmap__period:hover { background: var(--card); color: var(--column-ink); }
.request-roadmap__period:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.request-roadmap__scroll {
  display: block;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 5px 6px;
  scroll-padding-top: 44px;
  scrollbar-width: thin;
}
.request-roadmap__scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 8px; }
.request-roadmap__cards { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.request-roadmap__cards li { min-width: 0; }
.request-roadmap__empty { margin: 4px 2px; color: var(--ink-muted); font-size: 13px; }
.request-roadmap__more {
  display: block;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--card);
  color: var(--column-tone, var(--column-ink));
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.request-roadmap__more:hover { color: var(--column-tone, var(--column-ink)); text-decoration: underline; }
.request-roadmap__scroll[aria-busy="true"] .request-roadmap__more { opacity: 0.65; cursor: progress; }
.request-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--card);
  color: var(--card-foreground);
  text-decoration: none;
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}
.request-card:hover { box-shadow: 0 3px 8px rgb(15 23 42 / 15%); text-decoration: none; }
.request-card--movable { cursor: grab; }
.request-card.is-dragging { opacity: 0.5; }
.request-card__title {
  flex: 1;
  min-width: 0;
  color: var(--creation-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.request-card__users {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.request-card__users--popular { background: var(--column-bg); color: var(--column-ink); font-weight: 700; }
.request-card__users .icon { width: 14px; height: 14px; }
.request-status-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }

/* The fixed profile «Interno» of Compañías (Jace #2420): its building in a
   beige circle, the tag «Handy» without border and with 6 px corners, and
   texts that wrap instead of being cut. */
.internal-mark { display: inline-flex; width: 40px; height: 40px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: var(--creation-beige); }
.internal-mark .creation-icon--building { width: 22px; height: 22px; }
.internal-row__company { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.internal-row__text { flex: 1; min-width: 0; }
.table td.internal-row__action { text-align: right; vertical-align: middle; }
.internal-row__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.internal-row__summary { margin: 2px 0 0; color: var(--ink-gray); font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.internal-tag { border-radius: 6px; background: var(--creation-beige); padding: 2px 8px; color: var(--ink-stone); font-size: 12px; font-weight: 600; }
.internal-row__see, .internal-row__see:visited { flex-shrink: 0; color: var(--ink-teal); font-weight: 600; }
.internal-heading.page-head { flex-wrap: nowrap; align-items: center; justify-content: flex-start; }
.internal-heading > div { min-width: 0; }
.internal-summary .metric__value { font-size: 20px; }
.internal-summary .internal-summary__section { font-size: 16px; overflow-wrap: anywhere; }
.internal-items { display: grid; margin: 0; padding: 0; list-style: none; }
.internal-item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; border-top: 1px solid #EFEAE2; padding: 12px 0; }
.internal-item:first-child { border-top: 0; }
.internal-item > .creation-icon { margin-top: 2px; }
.internal-item__main { flex: 1 1 260px; min-width: 0; }
.internal-item__title { font-weight: 700; overflow-wrap: anywhere; }
.internal-item__meta { margin: 2px 0 0; color: var(--ink-gray); font-size: 13px; overflow-wrap: anywhere; }
.internal-item__side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.internal-item__by { color: var(--ink-gray); font-size: 13px; }
.internal-person { align-items: center; }
.internal-person .internal-item__side { color: var(--ink-gray); font-size: 13px; font-variant-numeric: tabular-nums; }
.internal-person .internal-item__side > span + span::before { margin-right: 8px; content: "·"; }
.documented-by-link, .documented-by-link:visited { color: inherit; }

/* Semáforo de uso (Jace #2469): the photo of the week and its accounts. */
.handy-usage__bar { flex-direction: column; align-items: flex-start; gap: 4px; }
.handy-usage__bar .hint { margin: 0; }
/* One line of the week, three columns, an ID that copies, a group's shared
   data on top and its list that folds, and «Asignarme» (Jace #3121). No text is cut. */
.handy-usage__summary { margin: 0 0 16px; font-size: 14px; overflow-wrap: anywhere; }
.handy-usage__count { font-weight: 700; white-space: nowrap; }
.handy-usage__count--red { color: var(--tone-danger-solid); }
.handy-usage__count--yellow { color: var(--tone-yellow-solid); }
.handy-usage__table td { vertical-align: top; }
.handy-usage__client { min-width: 180px; }
.handy-usage__users { white-space: nowrap; }
.handy-usage__averages { font-variant-numeric: tabular-nums; }
.handy-usage__accounts-cell { min-width: 300px; }
.handy-usage__accounts > li + li { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.handy-usage__accounts p, .handy-usage__shared p { margin: 4px 0 0; }
.handy-usage__account { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; overflow-wrap: anywhere; }
.handy-usage__id { display: inline-flex; align-items: center; gap: 2px; color: var(--muted-foreground); font-size: 12px; white-space: nowrap; }
.handy-usage__copy { display: inline-flex; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: var(--muted-foreground); cursor: pointer; }
.handy-usage__copy:hover { background: var(--muted); color: var(--foreground); }
.handy-usage__copy .icon { width: 14px; height: 14px; }
.handy-usage__copy-all [data-copy-icon-target], .handy-usage__copy [data-copy-icon-target] { display: inline-flex; }
.handy-usage__shared { margin-bottom: 10px; }
.handy-usage__group-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.handy-usage__toggle { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: transparent; color: var(--foreground); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.handy-usage__chevron { width: 16px; height: 16px; transition: transform 120ms ease; }
.handy-usage__toggle[aria-expanded="false"] .handy-usage__chevron { transform: rotate(-90deg); }
/* «Nueva llamada» names its «Responsable» by its photo (Jace #3147). */
.cs-call-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.handy-usage__owner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 0; overflow-wrap: anywhere; }
.handy-usage__assign { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; vertical-align: middle; }
/* The name of the new group, in its own block under «Responsable». */
.handy-usage__group-name { display: grid; gap: 6px; margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.handy-usage__group-name label { font-size: 12px; font-weight: 600; }
.handy-usage__group-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.handy-usage__group-name input[type=text] { min-width: 0; width: 220px; max-width: 100%; border: 1px solid var(--input); border-radius: var(--radius); background: var(--card); padding: 7px 9px; color: var(--foreground); font: inherit; font-size: 13px; }
.handy-usage__assigned { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--tone-success-ink); font-size: 13px; font-weight: 600; }
.handy-usage__assigned .icon { flex: none; width: 14px; height: 14px; }
.handy-usage__resolve { margin-top: 6px; }
/* On a phone each client is a card: its three columns one under the other,
   so no account scrolls out of sight. */
@media (max-width: 720px) {
  .handy-usage__table thead { display: none; }
  .handy-usage__table, .handy-usage__table tbody, .handy-usage__table tr, .handy-usage__table td { display: block; width: 100%; }
  .handy-usage__table tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .handy-usage__table tr:last-child { border-bottom: 0; }
  .handy-usage .handy-usage__table td { min-width: 0; padding: 4px 0; border: 0; }
  .handy-usage__users { white-space: normal; }
}
.callout--danger { border-color: #F3B9B4; background: #FBE3E1; color: #9B2C24; }
.handy-usage-mark p { margin: 4px 0 0; }
/* Jace CRM 2 (Jace #2571): a deal's card in the profile, its people and its stage history. */
.deal-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.deal-list li a { text-decoration: none; }
.deal-list__app { font-weight: 600; font-size: 13px; }
.deal-history__comment { margin-top: 4px; }
.deal-history__comment p { margin: 0; }
.deal-form__new-company summary { cursor: pointer; font-weight: 600; }
.deal-form__new-company[open] { display: grid; gap: 12px; }

/* The board of deals (Jace #2669): one column per stage, side by side,
   each of the same width, scrolling sideways when they do not fit (Jace
   #2929). Each column is as tall as the tallest: its header stays fixed
   and its deals scroll below it (Jace #2709). */
.deal-board-filters { margin-bottom: 16px; }
.deal-board-filters .history-filters__field { width: 180px; }
/* The notice that the board shows one's own deals (Jace #2727). */
.deal-board-own { margin: -4px 0 16px; }
/* Kanban only needs clearance for the 56px floating button and its 32px inset. */
.app-main:has(> .deal-board-panel) { padding-bottom: 88px; }
/* Jace #2991: every stage, with the arrows, in one light panel under the
   filters, as Handy's .panel (its card, border, radius and shadow). It is as
   wide as its stages, with no blank space after Perdido, and centered in the
   window; when they do not fit it takes the window's width and scrolls. */
.deal-board-panel {
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: 100%;
  /* Leave room for the header, tabs and filters (Jace #2999). The minimum
     keeps the cards usable when the controls wrap or the window is short. */
  max-height: max(20rem, calc(100dvh - 28rem));
  margin-right: auto;
  margin-left: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}
/* Jace #2929: the arrows that scroll the board sideways, at its right,
   hidden while every stage fits. */
.deal-board-nav { display: flex; flex: none; justify-content: flex-end; gap: 4px; margin-bottom: 8px; }
.deal-board-nav[hidden] { display: none; }
.deal-board-nav .button { width: 30px; padding: 0; }
.deal-board-nav .button .icon { width: 16px; height: 16px; }
.deal-board {
  --deal-card-height: 6.75rem;
  /* Half as wide again as the 193 px each column took when they shared the
     page (Jace #2929): a card goes from 171 to about 258 px. */
  --deal-column-width: 280px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: stretch;
}
.deal-board__column {
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--deal-column-width);
  min-width: 0;
  gap: 8px;
  min-height: 160px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
  transition: border-color 120ms, background 120ms;
}
.deal-board__column.is-over { border-color: var(--brand); background: var(--brand-soft); }
.deal-board__column--won .deal-board__head h2 { color: var(--ink-green); }
.deal-board__column--lost .deal-board__head h2 { color: var(--destructive); }
/* The same two lines in every header, its name and its totals, each cut
   with an ellipsis rather than wrapped, so every header is as tall. */
.deal-board__head {
  display: grid;
  flex: none;
  grid-template-rows: 1.5rem 1.25rem;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.deal-board__title { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.deal-board__head h2, .deal-board__totals { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-board__head h2 { margin: 0; font-size: 0.95rem; line-height: 1.5rem; }
.deal-board__totals { margin: 0; font-size: 0.8rem; line-height: 1.25rem; color: var(--muted-foreground); }
.deal-board__recent { flex: none; }
.deal-board__cards {
  display: grid;
  flex: 0 1 auto;
  grid-auto-rows: var(--deal-card-height);
  gap: 8px;
  min-height: 0;
  margin: 0 -4px;
  padding: 0 4px 2px;
  overflow-y: auto;
  list-style: none;
}
.deal-board__empty { margin: 0; font-size: 0.8rem; color: var(--muted-foreground); }
/* Ganado and Perdido open collapsed (Jace #2706): a narrow strip as tall as
   the board, its name upright and its count, that still takes a drop. */
.deal-board__expand, .deal-board__collapse {
  border: 0;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font: inherit;
}
.deal-board__expand:hover, .deal-board__collapse:hover { color: var(--foreground); }
.deal-board__expand:focus-visible, .deal-board__collapse:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.deal-board__collapse { display: inline-grid; place-items: center; padding: 2px; border-radius: 6px; }
.deal-board__expand { display: none; }
.deal-board__column.is-collapsed { flex: 0 0 44px; min-width: 44px; align-self: stretch; padding: 0; }
.deal-board__column.is-collapsed > :not(.deal-board__expand) { display: none; }
.deal-board__column.is-collapsed .deal-board__expand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 10px 0;
  border-radius: var(--radius);
}
.deal-board__vertical { writing-mode: vertical-rl; font-size: 0.95rem; font-weight: 600; white-space: nowrap; }
.deal-board__column--won .deal-board__vertical { color: var(--ink-green); }
.deal-board__column--lost .deal-board__vertical { color: var(--destructive); }
.deal-board__count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--card-foreground);
  font-size: 0.75rem;
  text-align: center;
}
/* Every card is as tall, whatever it says: one line per datum, cut with an
   ellipsis (Jace #2709). The users go beside the app, and the next activity
   is an icon beside the days in the stage (Jace #2672). */
.deal-card {
  /* Keep the screen-reader text inside the card's scroll container. */
  position: relative;
  display: grid;
  grid-template-rows: 1.25rem 1.25rem 1rem 1rem;
  align-content: start;
  gap: 4px;
  box-sizing: border-box;
  height: var(--deal-card-height);
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--card-foreground);
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}
.deal-card[draggable="true"] { cursor: grab; }
.deal-card:hover { border-color: var(--ring); }
.deal-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.deal-card.is-dragging { opacity: 0.5; }
.deal-card__title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.deal-card__company { min-width: 0; font-size: 0.9rem; line-height: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-card__space {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1rem;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--space-border, var(--border));
  background: var(--space-background, var(--muted));
  color: var(--space-text, var(--foreground));
  font-size: 0.75rem;
}
.deal-card__users, .deal-card__owner, .deal-card__days {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  line-height: 1rem;
  color: var(--muted-foreground);
}
.deal-card__users { font-weight: 600; color: var(--card-foreground); }
/* Jace #2871: the Responsable's avatar before its name, the name cut. */
.deal-card__owner { display: flex; align-items: center; gap: 6px; }
.deal-card__owner > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Jace CRM 6 (Jace #2672): no next activity, an overdue one or 15 days in
   the stage, in red with an icon and its words. */
.deal-card__meta, .deal-card__foot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.deal-card__meta .deal-card__space { flex: 0 1 auto; min-width: 0; }
.deal-card__meta .deal-card__users { flex: none; margin-left: auto; }
.deal-card__users { display: inline-flex; align-items: center; gap: 4px; }
.deal-card__foot { justify-content: space-between; }
.deal-card__days { display: flex; align-items: center; gap: 4px; }
.deal-card__days > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-card__days .icon { flex: none; }
.deal-card__next { display: inline-flex; flex: none; color: var(--muted-foreground); }
.deal-card--warned { border-left: 3px solid var(--destructive); }
.deal-card__warning { color: var(--destructive); font-weight: 600; }
/* Jace #2736: a scheduled next activity, in green, as a missing one is red. */
.deal-card__scheduled { color: var(--tone-success-solid); }
/* Jace CRM 9 (Jace #2675): its proposal of Ganado, beside its next activity. */
.deal-card__proposal { display: inline-flex; flex: none; margin-left: auto; color: var(--tone-success-solid); }
/* «Alto valor» (Jace #2738): its label beside the company, never cut, and
   the card's border in the same color. */
.badge--high-value { background: var(--tone-orange-bg); color: var(--tone-orange-ink); box-shadow: inset 0 0 0 1px var(--tone-orange-ink); }
/* Jace #2745: only a bold sign, so the company's name keeps the room; since
   Jace #2765 a «$» centered both ways in a round box of its own, at the right
   of the company's line; green, its border darker than its fill, since
   Jace #2804. */
.badge--high-value[role="img"] { background: var(--tone-success-bg); color: var(--tone-success-ink); box-shadow: inset 0 0 0 1px var(--tone-success-ink); display: inline-grid; place-items: center; box-sizing: border-box; width: 1.7em; height: 1.7em; padding: 0; font-weight: 800; font-size: 1.05em; line-height: 1; }
.deal-card__title .badge { flex: none; }
.deal-card__title .badge--high-value { margin-left: auto; }
/* Jace #2891: a marked deal's card has a green border, Jace's success green,
   the same as its scheduled activity; an unmarked one keeps --border. */
.deal-card--high-value { border-color: var(--tone-success-solid); }
.deal-head h1 { display: flex; align-items: center; gap: 8px; }
.deal-head h1 .deal-head__company { min-width: 0; }
.deal-head h1 .badge { flex: none; }
.deal-head h1 .badge--high-value { margin-left: auto; font-size: 13px; }
/* The board's quick filters (Jace #2747): a row of their own, below the
   selects, as chips with their box, filled when checked, like «Pendientes». */
.deal-board-filters .deal-board-filters__quick { order: 1; flex: 1 0 100%; width: auto; margin: 0; border: 0; padding: 0; min-width: 0; }
.deal-board-filters__quick .chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.deal-board-filters__quick .chip:has(input:checked) { border-color: var(--brand); background: var(--brand); color: var(--brand-foreground); }
.deal-board-filters__quick .chip:focus-within { outline: 2px solid var(--ink-teal); outline-offset: 1px; }
.deal-board-filters__quick input { margin: 0; accent-color: var(--brand-foreground); }
/* How many deals are in view, at the right of the quick filters (Jace #3120). */
.deal-board-filters__quick .chips { align-items: center; }
.deal-board-filters__count { margin-left: 6px; color: var(--muted-foreground); font-size: 13px; }
/* Reportes de seguimiento de tratos (Jace #2744): a row of «Alto valor»
   starts with its label in a strong color and stands out. */
.deal-report-filters__check { align-self: end; padding-bottom: 8px; }
.deal-report-period { justify-content: space-between; flex-wrap: wrap; }
/* Each view of the report is a box of its own (Jace #2757): its name over
   its counts, apart from the next one; the open one in Jace's color. */
.deal-report-tabs { gap: 8px; padding-bottom: 12px; margin-bottom: 20px; }
.deal-report-tabs a,
.deal-report-tabs a:visited,
.deal-report-tabs a:hover {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 132px;
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--card);
  color: var(--foreground);
  font-size: 15px;
  font-weight: 700;
}
.deal-report-tabs a:hover { border-color: var(--brand); }
.deal-report-tabs a[aria-current="page"] {
  border-color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.deal-report-tabs__counts { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; white-space: nowrap; }
.deal-report-tabs .tab-count { margin-left: 0; color: var(--muted-foreground); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.deal-report__high-count { color: var(--tone-orange-ink); font-size: 0.85em; font-weight: 700; }
.deal-report { margin-bottom: 24px; }
.deal-report h2 { margin: 8px 0; font-size: 16px; }
.deal-report__mark { width: 1%; white-space: nowrap; }
.deal-report__mark .badge--high-value { background: var(--tone-orange-ink); color: var(--brand-foreground); box-shadow: none; }
.deal-report__row--high-value td { background: color-mix(in srgb, var(--tone-orange-ink) 12%, transparent); }
.deal-report__row--high-value td:first-child { box-shadow: inset 4px 0 0 var(--tone-orange-ink); }
.deal-report__number, .deal-report__date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.deal-report__comment { max-width: 320px; }
.deal-report td small.hint { display: block; }
.deal-report__group th { padding-top: 16px; color: var(--foreground); font-size: 13px; text-transform: none; }
.deal-report__group-totals { margin-left: 8px; color: var(--muted-foreground); font-weight: 500; }
/* «Ganados» (Jace #2773): the deals won and their contracted users, over its table. */
.deal-report__totals { margin: 0 0 8px; color: var(--muted-foreground); font-weight: 600; font-variant-numeric: tabular-nums; }
.deal-people__known { margin: 8px 0; }
/* Jace CRM 4 (Jace #2670): the companies a new one may repeat, before it is created. */
.company-duplicates p { margin: 0; }
.company-duplicates ul { margin: 6px 0; padding-left: 18px; }
.company-duplicates .hint { margin-top: 6px; }
.company-duplicates__confirm { margin-top: 8px; }

/* A deal's page (Jace #2712): the header with its company and its five
   active stages; its data on the left, narrow, and its follow-up in the
   middle, wide. On a phone the follow-up goes first. */
.deal-page { display: grid; gap: 16px; }
.deal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: end;
}
.deal-head__title { min-width: 0; }
.deal-head__eyebrow { margin: 0 0 2px; color: var(--muted-foreground); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.deal-head h1 { margin: 0; font-size: 24px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.deal-head__company, .deal-head__company:visited { color: var(--foreground); text-decoration: none; }
.deal-head__company:hover { color: var(--link-hover); text-decoration: underline; }
.deal-head__meta { margin: 4px 0 0; color: var(--muted-foreground); font-size: 13px; }
.deal-head__meta #deal_stage { font-weight: 600; color: var(--foreground); }
.deal-head__stage--won { color: var(--ink-green) !important; }
.deal-head__stage--lost { color: var(--destructive) !important; }
.deal-head__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.deal-stages { grid-column: 1 / -1; }
.deal-stages ol {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.deal-stages__step { display: flex; min-width: 0; }
.deal-stages__form { display: flex; flex: 1; min-width: 0; margin: 0; }
.deal-stages__label,
.deal-stages__label:visited {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--border);
  background: var(--muted);
  padding: 6px 10px;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
}
.deal-stages__step:first-child .deal-stages__label { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.deal-stages__step:last-child .deal-stages__label { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 8px 8px 0; }
.deal-stages__step.is-done .deal-stages__label { background: var(--brand-soft); color: var(--brand-ink); }
.deal-stages__step.is-current .deal-stages__label { background: var(--brand); color: var(--brand-foreground); }
/* A won or lost deal ends the bar with its stage, green or red (Jace #3058). */
.deal-stages__step--won.is-current .deal-stages__label { background: var(--creation-green); color: var(--creation-green-foreground); }
.deal-stages__step--lost.is-current .deal-stages__label { border-color: color-mix(in srgb, var(--destructive) 40%, transparent); background: color-mix(in srgb, var(--destructive) 12%, var(--card)); color: var(--destructive); }
button.deal-stages__label, a.deal-stages__label { cursor: pointer; }
button.deal-stages__label:hover, a.deal-stages__label:hover { background: var(--surface-mint-strong); color: var(--foreground); }
.deal-stages__label:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.deal-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  grid-template-areas: "side main";
  gap: 16px;
  align-items: start;
}
.deal-layout__main { grid-area: main; display: grid; gap: 16px; min-width: 0; }
.deal-side { grid-area: side; display: grid; gap: 16px; min-width: 0; }
@media (max-width: 860px) {
  .deal-head { grid-template-columns: minmax(0, 1fr); }
  .deal-head__actions { justify-content: flex-start; }
  .deal-stages { overflow-x: auto; scrollbar-width: thin; }
  .deal-stages ol { grid-auto-columns: minmax(128px, 1fr); }
  .deal-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side"; }
}

/* Its data, each field edited in place (inline_edit_controller). */
.deal-side__panel h2 { margin-bottom: 8px; }
/* Each card expands and collapses from its title (Jace #3031). */
.deal-side__head { align-items: center; }
.deal-side__head h2 { flex: 1; min-width: 0; margin: 0; }
.deal-side__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 2px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.deal-side__toggle:hover { color: var(--brand-ink); }
.deal-side__toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.deal-side__chevron { flex: none; width: 16px; height: 16px; color: var(--muted-foreground); transition: transform 0.15s ease; }
.deal-side__toggle[aria-expanded="false"] .deal-side__chevron { transform: rotate(-90deg); }
.deal-side__body { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) {
  .deal-side__chevron { transition: none; }
}
.deal-side__edit { font-size: 12px; font-weight: 600; }
.deal-fields { display: grid; gap: 2px; margin: 0; font-size: 13px; }
.deal-field { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 8px; align-items: center; min-height: 30px; }
.deal-field dt { color: var(--muted-foreground); }
.deal-field dd { display: flex; align-items: center; gap: 4px; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.deal-field dd > span { padding: 3px 7px; }
/* The activity of its account in Handy (Jace #3030). */
.deal-activity__missing { color: var(--muted-foreground); }
.deal-activity__note { margin: 8px 0 0; color: var(--muted-foreground); font-size: 12px; }
.deal-field__form { flex: 1; min-width: 0; margin: 0; }
.deal-field__value {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  padding: 3px 6px;
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: text;
}
.deal-field__value > span { min-width: 0; overflow-wrap: anywhere; }
.deal-field__pencil { flex: none; width: 13px; height: 13px; color: var(--muted-foreground); opacity: 0; }
.deal-field__value:hover { border-color: var(--border); background: var(--muted); }
.deal-field__value:hover .deal-field__pencil, .deal-field__value:focus-visible .deal-field__pencil { opacity: 1; }
.deal-field__value:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.deal-field__linked-value { display: flex; align-items: center; gap: 4px; min-width: 0; padding-inline-start: 7px; }
.deal-field__linked-value .deal-field__value { flex: none; justify-content: center; width: 30px; min-height: 30px; cursor: pointer; }
.deal-field__linked-value .deal-field__pencil { opacity: 1; }
.deal-field__linked-value > a { min-width: 0; overflow-wrap: anywhere; }
.deal-field__input { width: 100%; min-width: 0; min-height: 30px; padding: 3px 6px; font-size: 13px; }
.deal-field__link { display: inline-flex; flex: none; color: var(--link); }
.deal-field__link .icon { width: 15px; height: 15px; }
.deal-field__assign { flex: none; margin: 0; }
.deal-field--others dd { flex-wrap: wrap; gap: 4px 10px; }
.deal-field--others a { font-size: 12px; }
.deal-people { display: grid; margin: 0; padding: 0; list-style: none; }
/* One row per person (Jace #3027): its name and role, and the pencil on the
   right that opens its fields below. */
.deal-person { position: relative; padding: 6px 0; }
.deal-person + .deal-person { border-top: 1px solid var(--border); }
.deal-person__summary { display: grid; align-content: center; gap: 1px; min-width: 0; min-height: 30px; padding-inline-end: 36px; font-size: 13px; }
.deal-person__name { font-weight: 600; color: var(--link); overflow-wrap: anywhere; }
.deal-person__role { color: var(--muted-foreground); font-size: 12px; overflow-wrap: anywhere; }
.deal-person__toggle {
  position: absolute;
  top: 6px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  list-style: none;
}
.deal-person__toggle::-webkit-details-marker { display: none; }
.deal-person__toggle:hover, .deal-person__edit[open] > .deal-person__toggle { background: var(--muted); color: var(--foreground); }
.deal-person__toggle .icon { width: 15px; height: 15px; }
.deal-person__edit > .deal-fields { margin-top: 6px; }

/* Jace CRM 9 (Jace #2675): the proposal of Ganado of a paid account of Handy Ventas. */
.deal-proposal { display: grid; gap: 8px; justify-items: start; border-left: 4px solid var(--tone-success-solid); }
.deal-proposal h2 { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--tone-success-solid); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.deal-proposal h2 .icon { width: 16px; height: 16px; }
.deal-proposal__body { margin: 0; font-size: 15px; font-weight: 600; }
.deal-proposal .hint { margin: 0; }
.deal-next { border-left: 4px solid var(--brand); }
.deal-next--overdue, .deal-next--missing { border-left-color: var(--destructive); }
.deal-next h2 { margin-bottom: 8px; color: var(--muted-foreground); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.deal-next__body { display: grid; gap: 6px; }
.deal-next__title { margin: 0; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.deal-next__meta, .deal-next__people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 13px; }
.deal-next__date, .deal-next__people { display: inline-flex; align-items: center; gap: 6px; }
.deal-next__date .icon, .deal-next__people .icon { width: 15px; height: 15px; color: var(--muted-foreground); }
.deal-next__date--scheduled .icon { color: var(--tone-success-solid); }
.deal-next__actions { margin-top: 12px; }
.deal-next__missing { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--destructive); font-weight: 600; }
.deal-next__missing .icon { width: 16px; height: 16px; }
.deal-next__others { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.deal-next__others h3 { margin: 0 0 6px; color: var(--muted-foreground); font-size: 12px; }
.deal-next__others ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.deal-next__others li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.deal-next__other-date { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.deal-next__overdue, .deal-next__overdue .deal-next__other-date { color: var(--destructive); font-weight: 600; }

.deal-capture__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.deal-capture__head h2 { margin: 0; }
.deal-capture__tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); }
.deal-capture__tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 6px 10px;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.deal-capture__tab:hover { color: var(--foreground); }
.deal-capture__tab[aria-selected="true"] { border-bottom-color: var(--brand); color: var(--brand-ink); }
.deal-capture__tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.deal-capture__form { display: grid; gap: 10px; }
.deal-capture__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.deal-capture__contact select {
  max-width: 100%;
  min-height: 32px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: var(--card);
  padding: 0 8px;
  color: var(--foreground);
  font: inherit;
}
.deal-capture__actions { justify-content: flex-end; }

.deal-timeline .panel__head { flex-wrap: wrap; align-items: center; }
.deal-timeline .panel__head h2 { margin: 0; }
/* It collapses from its title like the left cards (Jace #3042); its filters
   hide while it is collapsed. */
.deal-timeline:has(#deal_timeline_toggle[aria-expanded="false"]) .deal-timeline__filters { display: none; }
.deal-timeline__filters { display: flex; flex-wrap: wrap; gap: 6px; }
.deal-timeline__filter { cursor: pointer; font-family: inherit; }
.deal-timeline__filter[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-foreground); }
.deal-timeline__list { display: grid; margin: 0; padding: 0; list-style: none; }
.deal-timeline__entry { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; }
.deal-timeline__entry:not(:last-child)::before { content: ""; position: absolute; top: 28px; bottom: 0; left: 13px; width: 2px; background: var(--border); }
.deal-timeline__dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); }
.deal-timeline__dot .icon { width: 14px; height: 14px; }
.deal-timeline__entry--stage_change .deal-timeline__dot,
.deal-timeline__entry--owner_change .deal-timeline__dot { background: var(--brand-soft); color: var(--brand-ink); }
.deal-timeline__content { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.deal-timeline__content p { margin: 3px 0 2px; }
.deal-timeline__details { color: var(--muted-foreground); }

/* «Fusionar» of CRM › Tratos (Jace #3015): the button above the table and
   the box at the left of each deal. */
.deal-list-merge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.table .deal-list__pick {
  width: 1%;
  padding-right: 0;
  vertical-align: middle;
}

.deal-list__pick input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.deal-list__pick input:disabled { cursor: not-allowed; }
