/* Talkia — color tokens */
:root {
  /* Marca */
  --tk-primary: #434CFF;
  --tk-primary-hover: #3A42E6;
  --tk-primary-active: #3239CC;
  --tk-primary-soft: #EEF0FF;      /* fondos suaves de selección */
  --tk-primary-ring: rgba(67, 76, 255, 0.18);

  --tk-dark: #111123;              /* texto fuerte, sidebar, botón oscuro */
  --tk-dark-hover: #23233B;
  --tk-dark-active: #060612;

  --tk-accent: #10CBFF;            /* SOLO detalles mínimos */
  --tk-accent-soft: #E7FAFF;

  /* Superficies */
  --tk-bg: #FFFFFF;
  --tk-bg-2: #F7F8FC;
  --tk-bg-hover: #F1F3F8;
  --tk-border: #E2E5EE;
  --tk-border-strong: #CFD4E2;

  /* Texto */
  --tk-text: #111123;
  --tk-text-2: #5F6473;
  --tk-text-3: #8A90A2;
  --tk-text-inverse: #FFFFFF;

  /* Semánticos (par tinta / fondo suave) */
  --tk-success: #1F9D6B;
  --tk-success-soft: #E9F7F1;
  --tk-warning: #B45309;
  --tk-warning-soft: #FFF4E0;
  --tk-danger: #D93843;
  --tk-danger-hover: #C22F39;
  --tk-danger-soft: #FDECEE;
  --tk-info: #0E7DA8;
  --tk-info-soft: #E7FAFF;

  /* Sidebar oscura */
  --tk-sidebar-bg: #111123;
  --tk-sidebar-text: #B9BDCE;
  --tk-sidebar-text-active: #FFFFFF;
  --tk-sidebar-item-hover: rgba(255, 255, 255, 0.06);
  --tk-sidebar-item-active: rgba(255, 255, 255, 0.10);
  --tk-sidebar-border: rgba(255, 255, 255, 0.08);

  /* Gráficas (orden de series) */
  --tk-chart-1: #434CFF;
  --tk-chart-2: #10CBFF;
  --tk-chart-3: #8A90A2;
  --tk-chart-4: #1F9D6B;
  --tk-chart-5: #B45309;
  --tk-chart-grid: #EEF0F6;
}

/* Talkia — typography tokens */
:root {
  --tk-font: 'Rethink Sans', -apple-system, 'Segoe UI', sans-serif;

  --tk-fs-h1: 30px;        /* 28–36 desktop */
  --tk-fs-h1-lg: 36px;
  --tk-fs-h2: 24px;
  --tk-fs-h3: 19px;
  --tk-fs-body: 14px;
  --tk-fs-body-lg: 16px;
  --tk-fs-small: 12.5px;
  --tk-fs-label: 12.5px;
  --tk-fs-btn: 14px;
  --tk-fs-metric: 30px;

  --tk-lh-tight: 1.2;
  --tk-lh-body: 1.55;

  --tk-fw-regular: 400;
  --tk-fw-medium: 500;
  --tk-fw-semibold: 600;
  --tk-fw-bold: 700;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  font-family: var(--tk-font);
  font-size: var(--tk-fs-body);
  line-height: var(--tk-lh-body);
  color: var(--tk-text);
  background: var(--tk-bg);
  -webkit-font-smoothing: antialiased;
}

/* Talkia — spacing, radii, borders, shadows, layout */
:root {
  /* Espaciado (escala de 4px) */
  --tk-sp-1: 4px;
  --tk-sp-2: 8px;
  --tk-sp-3: 12px;
  --tk-sp-4: 16px;
  --tk-sp-5: 20px;
  --tk-sp-6: 24px;
  --tk-sp-8: 32px;
  --tk-sp-10: 40px;
  --tk-sp-12: 48px;

  /* Radios */
  --tk-radius-sm: 7px;      /* chips, celdas */
  --tk-radius-md: 8px;      /* botones, inputs */
  --tk-radius-lg: 12px;     /* cards */
  --tk-radius-xl: 14px;     /* modales */
  --tk-radius-pill: 999px;  /* badges, avatares */

  /* Sombras — siempre sutiles */
  --tk-shadow-xs: none;
  --tk-shadow-sm: none;
  --tk-shadow-md: 0 8px 24px rgba(17, 17, 35, 0.10);   /* sólo capas flotantes */
  --tk-shadow-lg: 0 16px 40px rgba(17, 17, 35, 0.14);  /* sólo modales */

  /* Focus */
  --tk-focus-ring: 0 0 0 3px var(--tk-primary-ring);

  /* Layout */
  --tk-sidebar-w: 236px;
  --tk-sidebar-w-collapsed: 68px;
  --tk-topbar-h: 68px;
  --tk-content-max: 1380px;

  /* Transiciones */
  --tk-transition: 140ms ease;
}

/* ============================================================
   Talkia — componentes (.tk-*)
   Clases CSS puras sobre variables. Portables a Bootstrap 5 /
   HTML + JS vanilla sin cambios.
   ============================================================ */

/* ---------- Tipografía utilitaria ---------- */
.tk-h1 { font-size: var(--tk-fs-h1); font-weight: var(--tk-fw-bold); line-height: var(--tk-lh-tight); color: var(--tk-text); margin: 0; letter-spacing: -0.02em; }
.tk-h2 { font-size: var(--tk-fs-h2); font-weight: var(--tk-fw-bold); line-height: var(--tk-lh-tight); color: var(--tk-text); margin: 0; letter-spacing: -0.015em; }
.tk-h3 { font-size: var(--tk-fs-h3); font-weight: var(--tk-fw-semibold); line-height: 1.3; color: var(--tk-text); margin: 0; }
.tk-body { font-size: var(--tk-fs-body); color: var(--tk-text); margin: 0; }
.tk-muted { color: var(--tk-text-2); }
.tk-faint { color: var(--tk-text-3); }
.tk-small { font-size: var(--tk-fs-small); }
.tk-overline { font-size: 11px; font-weight: var(--tk-fw-semibold); letter-spacing: 0.07em; text-transform: uppercase; color: var(--tk-text-3); }
.tk-num { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ---------- Botones ---------- */
.tk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--tk-radius-md);
  font-family: var(--tk-font); font-size: var(--tk-fs-btn); font-weight: var(--tk-fw-semibold);
  line-height: 1; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background var(--tk-transition), border-color var(--tk-transition), color var(--tk-transition), box-shadow var(--tk-transition);
  text-decoration: none; user-select: none;
}
.tk-btn:focus-visible { outline: none; box-shadow: var(--tk-focus-ring); }
.tk-btn:disabled, .tk-btn.is-disabled { cursor: not-allowed; pointer-events: none; }
.tk-btn > svg { width: 16px; height: 16px; flex: none; }

.tk-btn-primary { background: var(--tk-primary); color: #fff; }
.tk-btn-primary:hover { background: var(--tk-primary-hover); }
.tk-btn-primary:active { background: var(--tk-primary-active); }
.tk-btn-primary:disabled, .tk-btn-primary.is-disabled { background: #B9BDF5; color: #fff; }

.tk-btn-dark { background: var(--tk-dark); color: #fff; }
.tk-btn-dark:hover { background: var(--tk-dark-hover); }
.tk-btn-dark:active { background: var(--tk-dark-active); }
.tk-btn-dark:disabled, .tk-btn-dark.is-disabled { background: #A6A8B8; }

.tk-btn-outline { background: #fff; color: var(--tk-text); border-color: var(--tk-border); }
.tk-btn-outline:hover { background: var(--tk-bg-2); border-color: var(--tk-border-strong); }
.tk-btn-outline:active { background: var(--tk-bg-hover); }
.tk-btn-outline:disabled, .tk-btn-outline.is-disabled { color: var(--tk-text-3); background: var(--tk-bg-2); }
.tk-btn-outline.tk-btn-outline-primary { color: var(--tk-primary); border-color: #C6CAFB; }
.tk-btn-outline.tk-btn-outline-primary:hover { background: var(--tk-primary-soft); }

.tk-btn-ghost { background: transparent; color: var(--tk-text-2); }
.tk-btn-ghost:hover { background: var(--tk-bg-2); color: var(--tk-text); }
.tk-btn-ghost:active { background: var(--tk-bg-hover); }
.tk-btn-ghost:disabled, .tk-btn-ghost.is-disabled { color: var(--tk-text-3); }

.tk-btn-danger { background: var(--tk-danger); color: #fff; }
.tk-btn-danger:hover { background: var(--tk-danger-hover); }
.tk-btn-danger:active { background: #A82830; }
.tk-btn-danger:disabled, .tk-btn-danger.is-disabled { background: #F0AEB3; }
.tk-btn-danger-soft { background: var(--tk-danger-soft); color: var(--tk-danger); }
.tk-btn-danger-soft:hover { background: #FADDE0; }

.tk-btn-success { background: var(--tk-success); color: #fff; }
.tk-btn-success:hover { background: #197F58; color: #fff; }
.tk-btn-success:active { background: #146A49; }

.tk-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--tk-radius-sm); }
.tk-btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.tk-btn-block { width: 100%; }
.tk-btn-icon { width: 40px; padding: 0; }
.tk-btn-icon.tk-btn-sm { width: 32px; }

/* Loading */
.tk-btn.is-loading { pointer-events: none; opacity: 0.85; }
.tk-spinner {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: tk-spin 0.7s linear infinite;
}
.tk-spinner-dark { border-color: rgba(17, 17, 35, 0.18); border-top-color: var(--tk-text-2); }
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* ---------- Formularios ---------- */
.tk-field { display: flex; flex-direction: column; gap: 6px; }
.tk-label { font-size: var(--tk-fs-label); font-weight: var(--tk-fw-semibold); color: var(--tk-text); }
.tk-label .tk-req { color: var(--tk-danger); }
.tk-help { font-size: var(--tk-fs-small); color: var(--tk-text-3); }
.tk-error-msg { font-size: var(--tk-fs-small); color: var(--tk-danger); font-weight: var(--tk-fw-medium); }
.tk-success-msg { font-size: var(--tk-fs-small); color: var(--tk-success); font-weight: var(--tk-fw-medium); }

.tk-input, .tk-select, .tk-textarea {
  width: 100%; box-sizing: border-box; font-family: var(--tk-font); font-size: var(--tk-fs-body);
  color: var(--tk-text); background: #fff; border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md); transition: border-color var(--tk-transition), box-shadow var(--tk-transition);
}
.tk-input, .tk-select { height: 40px; padding: 0 12px; }
.tk-textarea { padding: 10px 12px; min-height: 96px; resize: vertical; line-height: var(--tk-lh-body); }
.tk-input::placeholder, .tk-textarea::placeholder { color: var(--tk-text-3); }
.tk-input:hover, .tk-select:hover, .tk-textarea:hover { border-color: var(--tk-border-strong); }
.tk-input:focus, .tk-select:focus, .tk-textarea:focus { outline: none; border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }
.tk-input:disabled, .tk-select:disabled, .tk-textarea:disabled { background: var(--tk-bg-2); color: var(--tk-text-3); cursor: not-allowed; }
.tk-input.is-error, .tk-select.is-error, .tk-textarea.is-error { border-color: var(--tk-danger); }
.tk-input.is-error:focus { box-shadow: 0 0 0 3px rgba(217, 56, 67, 0.14); }
.tk-input.is-success { border-color: var(--tk-success); }

.tk-select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6473' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* Input con ícono / búsqueda */
.tk-input-wrap { position: relative; display: flex; align-items: center; }
.tk-input-wrap .tk-input-icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--tk-text-3); pointer-events: none; display: flex; }
.tk-input-wrap .tk-input-icon svg { width: 16px; height: 16px; }
.tk-input-wrap .tk-input { padding-left: 36px; }
.tk-input-wrap .tk-input-suffix { position: absolute; right: 12px; font-size: var(--tk-fs-small); color: var(--tk-text-3); }

/* Input de teléfono */
.tk-phone { display: flex; }
.tk-phone .tk-phone-code {
  flex: none; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px;
  background: var(--tk-bg-2); border: 1px solid var(--tk-border); border-right: none;
  border-radius: var(--tk-radius-md) 0 0 var(--tk-radius-md); font-size: var(--tk-fs-body); color: var(--tk-text-2);
}
.tk-phone .tk-input { border-radius: 0 var(--tk-radius-md) var(--tk-radius-md) 0; }

/* OTP */
.tk-otp { display: flex; gap: 8px; }
.tk-otp input {
  width: 46px; height: 52px; text-align: center; font-family: var(--tk-font);
  font-size: 20px; font-weight: var(--tk-fw-bold); color: var(--tk-text);
  border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: #fff;
  transition: border-color var(--tk-transition), box-shadow var(--tk-transition);
}
.tk-otp input:focus { outline: none; border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }

/* Checkbox */
.tk-check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--tk-fs-body); color: var(--tk-text); }
.tk-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.tk-check .tk-check-box {
  flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px;
  border: 1.5px solid var(--tk-border-strong); background: #fff; display: flex; align-items: center; justify-content: center;
  transition: background var(--tk-transition), border-color var(--tk-transition), box-shadow var(--tk-transition);
}
.tk-check .tk-check-box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.tk-check input:checked + .tk-check-box { background: var(--tk-primary); border-color: var(--tk-primary); }
.tk-check input:checked + .tk-check-box svg { opacity: 1; }
.tk-check input:focus-visible + .tk-check-box { box-shadow: var(--tk-focus-ring); }
.tk-check input:disabled + .tk-check-box { background: var(--tk-bg-2); border-color: var(--tk-border); }

/* Switch */
.tk-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--tk-fs-body); }
.tk-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tk-switch .tk-switch-track {
  flex: none; width: 38px; height: 22px; border-radius: var(--tk-radius-pill);
  background: var(--tk-border-strong); position: relative; transition: background var(--tk-transition);
}
.tk-switch .tk-switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: var(--tk-shadow-xs); transition: transform var(--tk-transition);
}
.tk-switch input:checked + .tk-switch-track { background: var(--tk-primary); }
.tk-switch input:checked + .tk-switch-track::after { transform: translateX(16px); }
.tk-switch input:focus-visible + .tk-switch-track { box-shadow: var(--tk-focus-ring); }
.tk-switch input:disabled + .tk-switch-track { opacity: 0.5; }

/* Multi-select (chips) */
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; min-height: 40px; box-sizing: border-box; align-items: center; background: #fff; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); }
.tk-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  background: var(--tk-primary-soft); color: var(--tk-primary); border-radius: var(--tk-radius-pill);
  font-size: var(--tk-fs-small); font-weight: var(--tk-fw-semibold);
}
.tk-chip button { all: unset; cursor: pointer; display: flex; opacity: 0.6; }
.tk-chip button:hover { opacity: 1; }

/* Upload */
.tk-upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 28px 20px; border: 1.5px dashed var(--tk-border-strong); border-radius: var(--tk-radius-lg);
  background: var(--tk-bg-2); color: var(--tk-text-2); text-align: center; cursor: pointer;
  transition: border-color var(--tk-transition), background var(--tk-transition);
}
.tk-upload:hover, .tk-upload.is-dragover { border-color: var(--tk-primary); background: var(--tk-primary-soft); }
.tk-upload .tk-upload-icon { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--tk-border); display: flex; align-items: center; justify-content: center; color: var(--tk-text-2); }
.tk-file-upload {
  display: grid; min-height: 74px; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 12px;
  border: 1px dashed var(--tk-border-strong); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); cursor: pointer;
  transition: border-color var(--tk-transition), background var(--tk-transition);
}
.tk-file-upload:hover, .tk-file-upload.is-dragover { border-color: var(--tk-primary); background: var(--tk-primary-soft); }
.tk-file-upload:focus-within { border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }
.tk-file-upload-input { position: absolute; overflow: hidden; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.tk-file-upload-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm); background: #fff; color: var(--tk-primary); }
.tk-file-upload-icon svg { width: 18px; height: 18px; }
.tk-file-upload-copy { display: flex; min-width: 0; flex-direction: column; }
.tk-file-upload-copy strong { overflow: hidden; font-size: 12.5px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-file-upload-copy small { margin-top: 2px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-file-upload-action { flex: none; padding: 5px 8px; border: 1px solid var(--tk-border); border-radius: 6px; background: #fff; color: var(--tk-text-2); font-size: 10.5px; font-weight: var(--tk-fw-semibold); }
.tk-file-upload.has-file { border-style: solid; border-color: #C9CDEF; background: var(--tk-primary-soft); }
.tk-file-upload.has-file .tk-file-upload-icon { border-color: #C9CDEF; color: var(--tk-primary); }
.tk-file-upload.is-compact { min-height: 66px; grid-template-columns: 34px minmax(0,1fr); padding: 10px; }
.tk-file-upload.is-compact .tk-file-upload-icon { width: 34px; height: 34px; }
.tk-file-upload.is-compact .tk-file-upload-action { display: none; }
.tk-document-upload-form { display: flex; align-items: center; gap: 9px; }
.tk-document-upload-form .tk-file-upload { min-width: 0; flex: 1; }

/* ---------- Badges ---------- */
.tk-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 6px; font-size: 12px; font-weight: var(--tk-fw-semibold); line-height: 1; white-space: nowrap;
}
.tk-badge > svg { width: 12px; height: 12px; flex: none; }
.tk-badge .tk-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tk-badge-neutral { background: var(--tk-bg-2); color: var(--tk-text-2); border: 1px solid var(--tk-border); }
.tk-badge-primary { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-badge-dark { background: var(--tk-dark); color: #fff; }
.tk-badge-success { background: var(--tk-success-soft); color: var(--tk-success); }
.tk-badge-warning { background: var(--tk-warning-soft); color: var(--tk-warning); }
.tk-badge-danger { background: var(--tk-danger-soft); color: var(--tk-danger); }
.tk-badge-info { background: var(--tk-info-soft); color: var(--tk-info); }
.tk-badge-accent { background: var(--tk-accent-soft); color: #0B93B8; }
.tk-badge-outline { background: #fff; color: var(--tk-text-2); border: 1px solid var(--tk-border); }

/* ---------- Avatar ---------- */
.tk-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%; background: var(--tk-primary-soft);
  color: var(--tk-primary); font-size: 12px; font-weight: var(--tk-fw-bold); overflow: hidden;
}
.tk-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tk-avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.tk-avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.tk-avatar-dark { background: var(--tk-dark); color: #fff; }
.tk-avatar-group { display: flex; }
.tk-avatar-group .tk-avatar { border: 2px solid #fff; margin-left: -8px; }
.tk-avatar-group .tk-avatar:first-child { margin-left: 0; }

/* ---------- Cards ---------- */
.tk-card {
  background: #fff; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg);
  box-shadow: var(--tk-shadow-xs);
}
.tk-card-body { padding: var(--tk-sp-6); }
.tk-card-header { padding: var(--tk-sp-5) var(--tk-sp-6); border-bottom: 1px solid var(--tk-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tk-card-header .tk-h3 { font-size: 15px; }
.tk-card-footer { padding: var(--tk-sp-4) var(--tk-sp-6); border-top: 1px solid var(--tk-border); }
.tk-card-hover { transition: border-color var(--tk-transition), box-shadow var(--tk-transition); }
.tk-card-hover:hover { border-color: var(--tk-border-strong); box-shadow: var(--tk-shadow-sm); }

/* Métrica */
.tk-metric { display: flex; flex-direction: column; gap: 6px; }
.tk-metric .tk-metric-label { font-size: var(--tk-fs-small); font-weight: var(--tk-fw-semibold); color: var(--tk-text-2); display: flex; align-items: center; gap: 8px; }
.tk-metric .tk-metric-value { font-size: var(--tk-fs-metric); font-weight: var(--tk-fw-bold); letter-spacing: -0.02em; color: var(--tk-text); font-feature-settings: "tnum"; line-height: 1.1; }
.tk-metric .tk-metric-delta { font-size: var(--tk-fs-small); font-weight: var(--tk-fw-semibold); display: inline-flex; align-items: center; gap: 4px; }
.tk-metric .tk-metric-delta.is-up { color: var(--tk-success); }
.tk-metric .tk-metric-delta.is-down { color: var(--tk-danger); }

/* ---------- Tabla ---------- */
.tk-table-wrap { overflow-x: auto; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-table { width: 100%; border-collapse: collapse; font-size: var(--tk-fs-body); }
.tk-table th {
  text-align: left; padding: 10px 16px; font-size: 11.5px; font-weight: var(--tk-fw-semibold);
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--tk-text-3);
  background: var(--tk-bg-2); border-bottom: 1px solid var(--tk-border); white-space: nowrap;
}
.tk-table td { padding: 13px 16px; border-bottom: 1px solid var(--tk-border); color: var(--tk-text); vertical-align: middle; }
.tk-table tr:last-child td { border-bottom: none; }
.tk-table tbody tr { transition: background var(--tk-transition); }
.tk-table tbody tr:hover { background: var(--tk-bg-2); }
.tk-table .tk-td-sub { font-size: var(--tk-fs-small); color: var(--tk-text-3); }
.tk-table a:not(.tk-btn) { color: var(--tk-primary); font-weight: var(--tk-fw-semibold); text-decoration: none; }
.tk-table a:not(.tk-btn):hover { color: var(--tk-primary-hover); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Tabs ---------- */
.tk-tabs { display: flex; max-width: 100%; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--tk-border); scrollbar-width: none; }
.tk-tabs::-webkit-scrollbar { display: none; }
.tk-tab {
  appearance: none; display: inline-flex; align-items: center; background: none; border: none; cursor: pointer; font-family: var(--tk-font);
  padding: 10px 14px; font-size: var(--tk-fs-body); font-weight: var(--tk-fw-medium); color: var(--tk-text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--tk-transition); text-decoration: none; white-space: nowrap;
}
.tk-tab:hover { color: var(--tk-text); }
.tk-tab.is-active { color: var(--tk-primary); border-bottom-color: var(--tk-primary); font-weight: var(--tk-fw-semibold); }
/* Tabs tipo píldora (mobile / filtros) */
.tk-tabs-pill { display: flex; gap: 6px; border: none; overflow-x: auto; }
.tk-tab-pill {
  appearance: none; border: 1px solid var(--tk-border); background: #fff; cursor: pointer; font-family: var(--tk-font);
  height: 32px; padding: 0 14px; border-radius: var(--tk-radius-pill); font-size: 13px; font-weight: var(--tk-fw-medium);
  color: var(--tk-text-2); white-space: nowrap; transition: all var(--tk-transition);
}
.tk-tab-pill:hover { background: var(--tk-bg-2); }
.tk-tab-pill.is-active { background: var(--tk-dark); border-color: var(--tk-dark); color: #fff; }

/* ---------- Dropdown ---------- */
.tk-dropdown {
  min-width: 200px; background: #fff; border: 1px solid var(--tk-border); border-radius: 12px;
  box-shadow: var(--tk-shadow-md); padding: 6px; z-index: 50;
}
.tk-dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box;
  padding: 9px 10px; border: none; background: none; border-radius: var(--tk-radius-sm);
  font-family: var(--tk-font); font-size: var(--tk-fs-body); color: var(--tk-text); cursor: pointer; text-align: left;
  transition: background var(--tk-transition);
}
.tk-dropdown-item:hover { background: var(--tk-bg-2); }
.tk-dropdown-item.is-current { background: var(--tk-primary-soft); color: var(--tk-primary); font-weight: var(--tk-fw-semibold); }
.tk-dropdown-item.is-danger { color: var(--tk-danger); }
.tk-dropdown-item.is-danger:hover { background: var(--tk-danger-soft); }
.tk-dropdown-divider { height: 1px; background: var(--tk-border); margin: 6px 4px; }
.tk-dropdown-label { padding: 6px 10px 4px; font-size: 11px; font-weight: var(--tk-fw-semibold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--tk-text-3); }

/* ---------- Modal ---------- */
.tk-modal-backdrop {
  position: fixed; inset: 0; background: rgba(17, 17, 35, 0.42); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tk-modal {
  width: 100%; max-width: 480px; background: #fff; border-radius: var(--tk-radius-xl);
  box-shadow: var(--tk-shadow-lg); display: flex; flex-direction: column; max-height: 90vh;
}
.tk-modal-lg { max-width: 640px; }
.tk-modal-header { padding: 20px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tk-modal-body { padding: 16px 24px 24px; overflow-y: auto; }
.tk-modal-footer { padding: 16px 24px; border-top: 1px solid var(--tk-border); display: flex; justify-content: flex-end; gap: 10px; }
.tk-modal-close { all: unset; cursor: pointer; color: var(--tk-text-3); padding: 4px; border-radius: 6px; display: flex; }
.tk-modal-close:hover { background: var(--tk-bg-2); color: var(--tk-text); }
.tk-modal-open { overflow: hidden; }

/* ---------- Toast ---------- */
.tk-toast {
  display: flex; align-items: flex-start; gap: 12px; width: 340px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--tk-border); border-radius: 12px; box-shadow: var(--tk-shadow-md);
}
.tk-toast .tk-toast-icon { flex: none; width: 20px; height: 20px; display: flex; margin-top: 1px; }
.tk-toast.is-success .tk-toast-icon { color: var(--tk-success); }
.tk-toast.is-error .tk-toast-icon { color: var(--tk-danger); }
.tk-toast.is-info .tk-toast-icon { color: var(--tk-primary); }
.tk-toast-title { font-weight: var(--tk-fw-semibold); font-size: var(--tk-fs-body); color: var(--tk-text); }
.tk-toast-text { font-size: var(--tk-fs-small); color: var(--tk-text-2); }
.tk-toast-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }

/* ---------- Alertas ---------- */
.tk-alert {
  display: flex; gap: 12px; padding: 13px 16px; border-radius: 12px; font-size: var(--tk-fs-body);
  border: 1px solid transparent; align-items: flex-start;
}
.tk-alert .tk-alert-icon { flex: none; width: 18px; height: 18px; display: flex; margin-top: 2px; }
.tk-alert-info { background: var(--tk-info-soft); color: #0A6A8E; border-color: #C9EFFB; }
.tk-alert-success { background: var(--tk-success-soft); color: #17724F; border-color: #CDEBDD; }
.tk-alert-warning { background: var(--tk-warning-soft); color: #8A4106; border-color: #F5E1BD; }
.tk-alert-danger { background: var(--tk-danger-soft); color: #A82830; border-color: #F6CFD3; }

/* ---------- Progreso ---------- */
.tk-progress { height: 8px; border-radius: var(--tk-radius-pill); background: var(--tk-bg-hover); overflow: hidden; }
.tk-progress-bar { height: 100%; border-radius: var(--tk-radius-pill); background: var(--tk-primary); transition: width 300ms ease; }
.tk-progress-bar.is-warning { background: var(--tk-warning); }
.tk-progress-bar.is-danger { background: var(--tk-danger); }
.tk-progress-bar.is-accent { background: var(--tk-accent); }

/* ---------- Skeleton ---------- */
.tk-skeleton {
  position: relative; overflow: hidden; background: #E9EBF2; border-radius: var(--tk-radius-sm);
}
.tk-skeleton::after {
  position: absolute; inset: 0; transform: translateX(-100%); content: "";
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.58), transparent);
  animation: tk-skeleton-sweep 1.35s ease-in-out infinite;
}
@keyframes tk-skeleton-sweep { to { transform: translateX(100%); } }
.tk-route-skeleton { display: none; width: 100%; max-width: var(--tk-content-max); margin: 0 auto; }
.tk-js .tk-app-content.is-loading > .tk-route-skeleton { display: block; }
.tk-js .tk-app-content.is-loading > .tk-content-inner { display: none; }
.tk-route-skeleton-heading { display: flex; margin-bottom: 22px; align-items: center; justify-content: space-between; gap: 22px; }
.tk-route-skeleton-heading-copy { display: flex; min-width: 220px; gap: 9px; flex-direction: column; }
.tk-route-skeleton-title { width: min(310px,55vw); height: 29px; }
.tk-route-skeleton-subtitle { width: min(210px,42vw); height: 12px; }
.tk-route-skeleton-actions { display: flex; gap: 8px; }
.tk-route-skeleton-action { width: 92px; height: 38px; border-radius: 9px; }
.tk-route-skeleton-metrics { display: grid; margin-bottom: 18px; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-route-skeleton-metric { min-height: 116px; padding: 19px; border-right: 1px solid var(--tk-border); }
.tk-route-skeleton-metric:last-child { border-right: 0; }
.tk-route-skeleton-label { width: 54%; height: 10px; margin-bottom: 16px; }
.tk-route-skeleton-value { width: 42%; height: 28px; margin-bottom: 12px; }
.tk-route-skeleton-hint { width: 72%; height: 9px; }
.tk-route-skeleton-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); gap: 18px; }
.tk-route-skeleton-card { padding: 18px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-route-skeleton-card-head { display: flex; margin-bottom: 20px; align-items: center; gap: 10px; }
.tk-route-skeleton-icon { width: 32px; height: 32px; border-radius: 8px; }
.tk-route-skeleton-card-title { width: 145px; height: 13px; }
.tk-route-skeleton-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 72px; align-items: center; gap: 11px; padding: 13px 0; border-top: 1px solid var(--tk-border); }
.tk-route-skeleton-avatar { width: 34px; height: 34px; border-radius: 9px; }
.tk-route-skeleton-row-copy { display: flex; gap: 7px; flex-direction: column; }
.tk-route-skeleton-row-title { width: min(230px,72%); height: 11px; }
.tk-route-skeleton-row-meta { width: min(150px,48%); height: 8px; }
.tk-route-skeleton-badge { width: 66px; height: 20px; border-radius: 6px; }
.tk-search-skeleton { padding: 7px 10px 10px; }
.tk-search-skeleton-label { width: 72px; height: 8px; margin: 7px 6px 8px; }
.tk-search-skeleton-row { display: grid; padding: 8px 6px; grid-template-columns: 32px minmax(0,1fr) 52px; align-items: center; gap: 9px; }
.tk-search-skeleton-icon { width: 32px; height: 32px; border-radius: 8px; }
.tk-search-skeleton-copy { display: flex; gap: 6px; flex-direction: column; }
.tk-search-skeleton-name { width: 58%; height: 9px; }
.tk-search-skeleton-meta { width: 78%; height: 7px; }
.tk-search-skeleton-status { width: 48px; height: 16px; border-radius: 5px; }
@media (prefers-reduced-motion: reduce) {
  .tk-skeleton::after { animation: none; display: none; }
}
@media (max-width: 1120px) {
  .tk-route-skeleton-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-route-skeleton-metric:nth-child(2) { border-right: 0; }
  .tk-route-skeleton-metric:nth-child(-n+2) { border-bottom: 1px solid var(--tk-border); }
  .tk-route-skeleton-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tk-route-skeleton-heading { align-items: flex-start; flex-direction: column; }
  .tk-route-skeleton-actions { display: none; }
  .tk-route-skeleton-metric { min-height: 98px; padding: 15px; }
  .tk-route-skeleton-card { padding: 15px; }
}

/* ---------- Empty state ---------- */
.tk-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 24px; text-align: center; }
.tk-empty .tk-empty-icon {
  width: 48px; height: 48px; border-radius: 50%; background: var(--tk-bg-2); border: 1px solid var(--tk-border);
  display: flex; align-items: center; justify-content: center; color: var(--tk-text-3); margin-bottom: 8px;
}
.tk-empty .tk-empty-title { font-size: var(--tk-fs-body-lg); font-weight: var(--tk-fw-semibold); color: var(--tk-text); }
.tk-empty .tk-empty-text { font-size: var(--tk-fs-body); color: var(--tk-text-2); max-width: 340px; }
.tk-empty .tk-btn { margin-top: 12px; }

/* ---------- Sidebar ---------- */
.tk-sidebar {
  width: var(--tk-sidebar-w); background: var(--tk-sidebar-bg); color: var(--tk-sidebar-text);
  display: flex; flex: none; flex-direction: column; height: 100%; box-sizing: border-box;
  overflow: hidden; border-right: 1px solid var(--tk-sidebar-border); z-index: 90;
}
.tk-sidebar-logo {
  display: flex; flex: none; align-items: center; height: var(--tk-topbar-h); padding: 0 20px;
  border-bottom: 1px solid var(--tk-sidebar-border); text-decoration: none;
}
.tk-sidebar-logo img { display: block; width: 108px; height: auto; }
.tk-sidebar-nav {
  flex: 1; overflow-y: auto; padding: 14px 12px 20px; display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.tk-sidebar-section {
  padding: 17px 10px 7px; font-size: 10px; font-weight: var(--tk-fw-bold); letter-spacing: 0.09em;
  text-transform: uppercase; color: rgba(255,255,255,0.38);
}
.tk-sidebar-section:first-child { padding-top: 4px; }
.tk-nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 10px; border-radius: var(--tk-radius-sm);
  color: var(--tk-sidebar-text); font-size: 13.5px; font-weight: var(--tk-fw-medium); text-decoration: none;
  cursor: pointer; border: none; background: none; font-family: var(--tk-font); width: 100%; box-sizing: border-box; text-align: left;
  transition: background var(--tk-transition), color var(--tk-transition);
}
.tk-nav-item svg, .tk-nav-item .tk-nav-icon { width: 17px; height: 17px; flex: none; }
.tk-nav-item:hover { background: var(--tk-sidebar-item-hover); color: #fff; }
.tk-nav-item.is-active { background: var(--tk-sidebar-item-active); color: #fff; font-weight: var(--tk-fw-semibold); }
.tk-nav-item.is-active::before {
  content: ""; position: absolute; left: 0; width: 2px; height: 18px; border-radius: 0 2px 2px 0; background: var(--tk-accent);
}
.tk-nav-item .tk-nav-badge { margin-left: auto; }
.tk-nav-badge {
  font-size: 10px; font-weight: var(--tk-fw-semibold); padding: 2px 7px; border-radius: var(--tk-radius-pill);
  background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.72); letter-spacing: 0.02em;
}
.tk-nav-badge.is-upgrade { background: rgba(16, 203, 255, 0.14); color: var(--tk-accent); }
.tk-nav-badge.is-locked { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.45); }
.tk-sidebar-footer { flex: none; padding: 10px 12px 12px; border-top: 1px solid var(--tk-sidebar-border); }
.tk-account-menu { position: relative; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--tk-sidebar-border); }
.tk-account-menu > summary { list-style: none; }
.tk-account-menu > summary::-webkit-details-marker { display: none; }
.tk-account-button {
  display: grid; grid-template-columns: 32px minmax(0,1fr) 16px; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--tk-radius-md); color: #fff; cursor: pointer; user-select: none;
}
.tk-account-button:hover { background: var(--tk-sidebar-item-hover); }
.tk-account-button > svg { width: 15px; height: 15px; color: rgba(255,255,255,0.42); }
.tk-account-avatar {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--tk-radius-sm); background: var(--tk-primary); color: #fff; font-size: 11px; font-weight: var(--tk-fw-bold);
}
.tk-account-meta { display: flex; min-width: 0; flex-direction: column; }
.tk-account-name { overflow: hidden; font-size: 12.5px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-account-plan { overflow: hidden; color: rgba(255,255,255,0.46); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-account-dropdown { position: absolute; right: 0; bottom: calc(100% + 8px); left: 0; min-width: 0; }
.tk-account-dropdown .tk-dropdown-item svg { width: 15px; height: 15px; }

/* ---------- Topbar ---------- */
.tk-topbar {
  height: var(--tk-topbar-h); box-sizing: border-box; background: #fff; border-bottom: 1px solid var(--tk-border);
  display: flex; flex: none; align-items: center; gap: 16px; padding: 0 28px;
}
.tk-menu-button {
  display: none; flex: none; width: 36px; height: 36px; align-items: center; justify-content: center;
  border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: #fff; color: var(--tk-text); cursor: pointer;
}
.tk-menu-button svg { width: 19px; height: 19px; }
.tk-mobile-brand { display: none; flex: none; align-items: center; text-decoration: none; }
.tk-mobile-brand img { display: block; width: 96px; height: auto; }
.tk-topbar-search {
  position: relative; width: min(390px,46vw); height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 10px;
  border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); color: var(--tk-text-3);
}
.tk-topbar-search:focus-within { border-color: var(--tk-primary); background: #fff; box-shadow: var(--tk-focus-ring); }
.tk-topbar-search > svg { width: 16px; height: 16px; flex: none; }
.tk-topbar-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--tk-text); font-family: var(--tk-font); font-size: var(--tk-fs-body); }
.tk-topbar-search input::placeholder { color: var(--tk-text-3); }
.tk-keycap { padding: 1px 5px; border: 1px solid var(--tk-border); border-radius: 4px; background: #fff; color: var(--tk-text-3); font-size: 10px; }
.tk-search-close { display: none; width: 28px; height: 28px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: var(--tk-radius-sm); background: transparent; color: var(--tk-text-2); cursor: pointer; }
.tk-search-close:hover { background: var(--tk-bg-3); color: var(--tk-text); }
.tk-search-close svg { width: 16px; height: 16px; }
.tk-search-results {
  position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 120; max-height: min(380px,calc(100vh - 92px)); overflow-y: auto;
  padding: 6px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; box-shadow: var(--tk-shadow-md); color: var(--tk-text);
}
.tk-search-results[hidden] { display: none; }
.tk-search-group + .tk-search-group { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--tk-border); }
.tk-search-group-label { padding: 5px 10px 4px; color: var(--tk-text-3); font-size: 10px; font-weight: var(--tk-fw-bold); letter-spacing: 0.06em; text-transform: uppercase; }
.tk-search-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; padding: 9px 10px; border-radius: var(--tk-radius-md); color: inherit; text-decoration: none; }
.tk-search-result:hover, .tk-search-result.is-active { background: var(--tk-bg-2); }
.tk-search-result.is-active { box-shadow: inset 3px 0 0 var(--tk-primary); }
.tk-search-result-icon { width: 30px; height: 30px; display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: var(--tk-radius-sm); background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-search-result-icon.is-customer { background: #e8f8f4; color: #138a72; }
.tk-search-result-icon.is-product { background: #fff3e8; color: #b35c12; }
.tk-search-result-icon svg { width: 15px; height: 15px; }
.tk-search-result-content { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.tk-search-result-name { overflow: hidden; font-size: 13px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-search-result-meta { overflow: hidden; color: var(--tk-text-3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tk-search-result-status { flex: none; padding: 3px 7px; border: 1px solid var(--tk-border); border-radius: 999px; background: var(--tk-bg-2); color: var(--tk-text-2); font-size: 10px; }
.tk-search-empty { padding: 18px 12px; color: var(--tk-text-3); font-size: 12px; text-align: center; }
.tk-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; clip-path: inset(50%) !important; }
.tk-topbar-spacer { flex: 1; }
.tk-plan-badge { flex: none; font-size: 10.5px; }
.tk-mobile-search-button { display: none !important; }
.tk-topbar-menu { position: relative; }
.tk-topbar-menu > summary { list-style: none; }
.tk-topbar-menu > summary::-webkit-details-marker { display: none; }
.tk-topbar-iconbtn {
  box-sizing: border-box; cursor: pointer; width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--tk-radius-md);
  display: flex; align-items: center; justify-content: center; color: var(--tk-text-2); position: relative; background: transparent;
  transition: background var(--tk-transition), border-color var(--tk-transition), color var(--tk-transition); text-decoration: none;
}
.tk-topbar-iconbtn:hover { border-color: var(--tk-border); background: var(--tk-bg-2); color: var(--tk-text); }
.tk-topbar-iconbtn > svg { width: 18px; height: 18px; }
.tk-topbar-iconbtn .tk-notif-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--tk-danger); border: 1.5px solid #fff; }
.tk-notification-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: min(340px,calc(100vw - 28px)); max-height: min(480px,70vh); overflow-y: auto; }
.tk-notification-item { align-items: flex-start; flex-direction: column; gap: 2px; }
.tk-notification-title { font-weight: var(--tk-fw-semibold); }
.tk-notification-message { color: var(--tk-text-2); font-size: var(--tk-fs-small); line-height: 1.4; }
.tk-notification-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-right:10px; }
.tk-btn-link { border:0; background:transparent; color:var(--tk-primary); font:inherit; font-size:12px; cursor:pointer; padding:7px 4px; }
.tk-nav-progress { margin-left:auto; border:1px solid rgba(255,255,255,.14); border-radius:999px; padding:2px 7px; font-size:10px; color:var(--tk-sidebar-text-muted); }
.tk-onboarding-header { align-items:flex-end; }
.tk-onboarding-progress-copy { display:flex; flex-direction:column; align-items:flex-end; }
.tk-onboarding-progress-copy strong { font-size:28px; line-height:1; }
.tk-onboarding-progress-copy span { margin-top:5px; color:var(--tk-text-2); font-size:13px; }
.tk-progress.tk-onboarding-progress { height:8px; margin:0 0 24px; overflow:hidden; border-radius:999px; background:var(--tk-bg-3); }
.tk-onboarding-progress span { display:block; height:100%; border-radius:inherit; background:var(--tk-primary); transition:width .3s ease; }
.tk-onboarding-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.tk-onboarding-step { display:grid; grid-template-columns:auto 1fr; gap:14px; padding:20px; }
.tk-onboarding-step-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:var(--tk-primary); background:var(--tk-primary-soft); }
.tk-onboarding-step.is-done .tk-onboarding-step-icon { color:var(--tk-success); background:var(--tk-success-soft); }
.tk-onboarding-step-icon svg { width:20px; height:20px; }
.tk-onboarding-step-content p { margin:6px 0 0; color:var(--tk-text-2); font-size:14px; line-height:1.45; }
.tk-onboarding-step-state { margin-bottom:5px; color:var(--tk-text-3); font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.tk-onboarding-step-actions { grid-column:2; display:flex; align-items:center; gap:8px; }
.tk-onboarding-finish { margin-top:18px; padding:20px; display:flex; justify-content:space-between; align-items:center; gap:18px; }
.tk-onboarding-finish p { margin:5px 0 0; }
@media (max-width:800px) { .tk-onboarding-grid{grid-template-columns:1fr}.tk-onboarding-header{align-items:flex-start}.tk-onboarding-progress-copy{align-items:flex-start}.tk-onboarding-finish{align-items:flex-start;flex-direction:column} }
.tk-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.tk-status-check{padding:16px;display:flex;gap:12px;align-items:flex-start}.tk-status-check-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--tk-success-soft);color:var(--tk-success)}.tk-status-check.is-warning .tk-status-check-icon{background:var(--tk-warning-soft);color:var(--tk-warning)}.tk-status-check.is-error .tk-status-check-icon{background:var(--tk-danger-soft);color:var(--tk-danger)}.tk-status-check-icon svg{width:18px}.tk-status-check p{margin:4px 0 0;color:var(--tk-text-2);font-size:12px}@media(max-width:1000px){.tk-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.tk-status-grid{grid-template-columns:1fr}}
.tk-quota-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.tk-quota-item>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}.tk-quota-item strong{font-size:12px}.tk-quota-track{height:6px;margin-top:8px;border-radius:99px;background:var(--tk-bg-3);overflow:hidden}.tk-quota-track span{display:block;height:100%;border-radius:inherit;background:var(--tk-primary)}@media(max-width:800px){.tk-quota-grid{grid-template-columns:1fr}}
.tk-saas-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow-x:visible}.tk-saas-nav a{justify-content:center}@media(max-width:600px){.tk-saas-nav{display:flex;flex-wrap:nowrap;overflow-x:auto}.tk-saas-nav a{justify-content:flex-start}}
.tk-dropdown-empty { padding: 18px 10px; color: var(--tk-text-3); font-size: var(--tk-fs-small); text-align: center; }

/* ---------- Layout de app ---------- */
.tk-app { display: flex; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: var(--tk-bg-2); }
.tk-app-main { flex: 1; display: flex; height: 100%; min-width: 0; min-height: 0; overflow: hidden; flex-direction: column; }
.tk-app-content { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 30px 34px 48px; }
.tk-app-content > .tk-content-inner { width: 100%; max-width: var(--tk-content-max); margin: 0 auto; }
.tk-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.tk-page-header .tk-body.tk-muted { max-width: 680px; margin-top: 5px !important; font-size: 13.5px; }
.tk-sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 80; background: rgba(17,17,35,0.48); }

/* ---------- Kanban / Pipeline ---------- */
.tk-kanban-shell { position: relative; min-width: 0; }
.tk-kanban-toolbar { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.tk-kanban-guide { display: flex; min-width: 0; align-items: center; gap: 7px; margin: 0; color: var(--tk-text-2); font-size: 11.5px; }
.tk-kanban-guide > svg { width: 14px; height: 14px; flex: none; color: var(--tk-text-3); }
.tk-kanban-keyboard-hint { color: var(--tk-text-3); }
.tk-kanban-scroll-nav { display: flex; flex: none; align-items: center; gap: 5px; }
.tk-kanban-scroll-hint { margin-right: 3px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-kanban-scroll-nav button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--tk-border); border-radius: 8px; background: #fff; color: var(--tk-text-2); cursor: pointer; transition: border-color var(--tk-transition), background var(--tk-transition), color var(--tk-transition); }
.tk-kanban-scroll-nav button:hover:not(:disabled) { border-color: var(--tk-border-strong); background: var(--tk-bg-2); color: var(--tk-text); }
.tk-kanban-scroll-nav button:focus-visible { outline: none; border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }
.tk-kanban-scroll-nav button:disabled { cursor: default; opacity: .34; }
.tk-kanban-scroll-nav button svg { width: 15px; height: 15px; }
.tk-kanban-shell:not(.has-horizontal-overflow) .tk-kanban-scroll-nav { display: none; }
.tk-kanban-notice { display: flex; min-height: 36px; align-items: center; margin-bottom: 10px; padding: 8px 11px; border: 1px solid var(--tk-border); border-radius: 8px; background: #fff; color: var(--tk-text-2); font-size: 11.5px; }
.tk-kanban-notice[hidden] { display: none; }
.tk-kanban-notice.is-success { border-color: #BFE5D1; background: var(--tk-success-soft); color: #176B45; }
.tk-kanban-notice.is-error { border-color: #F1C7C7; background: var(--tk-danger-soft); color: #9E2929; }
.tk-kanban { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding: 0 1px 8px; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.tk-kanban::-webkit-scrollbar { display: none; width: 0; height: 0; }
.tk-kanban-col { --tk-stage-accent: var(--tk-border-strong); flex: none; width: 280px; overflow: hidden; border: 1px solid var(--tk-border); border-top: 3px solid var(--tk-stage-accent); border-radius: var(--tk-radius-lg); background: var(--tk-bg-2); scroll-snap-align: start; transition: border-color 130ms ease, background 130ms ease; }
.tk-kanban-col-header { display: flex; min-height: 58px; align-items: center; gap: 9px; padding: 11px 13px; border-bottom: 1px solid var(--tk-border); background: #fff; color: var(--tk-text); }
.tk-kanban-stage-mark { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--tk-stage-accent); }
.tk-kanban-stage-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.tk-kanban-stage-copy strong { overflow: hidden; font-size: 12.5px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-kanban-stage-copy small { color: var(--tk-text-3); font-size: 9.5px; font-weight: var(--tk-fw-regular); }
.tk-kanban-col-header .tk-kanban-count { min-width: 24px; margin-left: auto; padding: 3px 7px; border-radius: 999px; background: var(--tk-bg-2); color: var(--tk-text-2); font-size: 10.5px; font-weight: var(--tk-fw-semibold); text-align: center; }
.tk-kanban-cards { display: flex; min-height: 92px; max-height: min(490px,calc(100vh - 330px)); overflow-y: auto; flex-direction: column; gap: 7px; padding: 8px; scrollbar-width: none; -ms-overflow-style: none; transition: background 130ms ease; }
.tk-kanban-cards::-webkit-scrollbar { display: none; }
.tk-kanban-card {
  position: relative; display: flex; flex: none; flex-direction: column; gap: 9px; padding: 11px 12px;
  border: 1px solid var(--tk-border); border-radius: 9px; background: #fff; color: var(--tk-text); cursor: pointer;
  text-decoration: none; transition: border-color var(--tk-transition), background var(--tk-transition), opacity 130ms ease, transform 130ms ease;
}
.tk-kanban-card[draggable="true"] { cursor: grab; padding-right: 31px; }
.tk-kanban-card[draggable="true"]:active { cursor: grabbing; }
.tk-kanban-card:hover { border-color: var(--tk-border-strong); background: #FCFCFE; }
.tk-kanban-card:focus-visible { outline: none; border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }
.tk-kanban-drag-handle { position: absolute; top: 10px; right: 8px; width: 17px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--tk-text-3); }
.tk-kanban-drag-handle svg { width: 14px; height: 14px; }
.tk-kanban-card-title { display: flex; min-width: 0; align-items: center; gap: 6px; font-size: 12.5px; font-weight: var(--tk-fw-semibold); }
.tk-kanban-card-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-kanban-card-title .tk-badge { flex: none; }
.tk-kanban-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk-kanban-card-meta .tk-badge { max-width: 128px; overflow: hidden; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-kanban-owner { display: inline-flex; min-width: 0; align-items: center; gap: 4px; overflow: hidden; color: var(--tk-text-3); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-kanban-owner svg { width: 11px; height: 11px; flex: none; }
.tk-kanban-empty { display: flex; min-height: 72px; align-items: center; justify-content: center; padding: 14px 10px; border: 1px dashed var(--tk-border); border-radius: 8px; color: var(--tk-text-3); font-size: 10.5px; text-align: center; }
.tk-kanban-empty[hidden] { display: none; }
.tk-kanban-col.is-drop-target { border-color: var(--tk-primary); background: var(--tk-primary-soft); }
.tk-kanban-col.is-drop-target .tk-kanban-cards { background: rgba(79,70,229,.035); }
.tk-kanban-card.is-dragging { opacity: .42; transform: rotate(.4deg); }
.tk-kanban-card.is-saving { cursor: progress; opacity: .62; pointer-events: none; }
.tk-kanban-card.is-saved { border-color: var(--tk-success); }
.tk-kanban.is-dragging { scroll-snap-type: none; }

/* ---------- Timeline ---------- */
.tk-timeline { display: flex; flex-direction: column; }
.tk-timeline-item { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.tk-timeline-item:last-child { padding-bottom: 0; }
.tk-timeline-item::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 1.5px; background: var(--tk-border); }
.tk-timeline-item:last-child::before { display: none; }
.tk-timeline-dot {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tk-bg-2);
  border: 1px solid var(--tk-border); display: flex; align-items: center; justify-content: center;
  color: var(--tk-text-2); z-index: 1;
}
.tk-timeline-dot.is-primary { background: var(--tk-primary-soft); color: var(--tk-primary); border-color: #D8DBFD; }
.tk-timeline-dot.is-success { background: var(--tk-success-soft); color: var(--tk-success); border-color: #CDEBDD; }
.tk-timeline-dot svg { width: 13px; height: 13px; }
.tk-timeline-content { flex: 1; min-width: 0; padding-top: 3px; }
.tk-timeline-title { font-size: var(--tk-fs-body); color: var(--tk-text); }
.tk-timeline-meta { font-size: var(--tk-fs-small); color: var(--tk-text-3); margin-top: 1px; }

/* ---------- Filtros ---------- */
.tk-filterbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; padding: 12px;
  border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff;
}
.tk-filterbar .tk-select, .tk-filterbar .tk-input-wrap { width: auto; }
.tk-filterbar .tk-input-wrap { min-width: 220px; flex: 1; }
.tk-filterbar .tk-select { min-width: 150px; }

/* ---------- Paginación ---------- */
.tk-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: var(--tk-fs-small); color: var(--tk-text-2); }
.tk-pagination .tk-page-btns { display: flex; gap: 4px; }
.tk-page-btn {
  all: unset; cursor: pointer; min-width: 30px; height: 30px; padding: 0 6px; border-radius: var(--tk-radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--tk-text-2);
  transition: background var(--tk-transition);
}
.tk-page-btn:hover { background: var(--tk-bg-2); }
.tk-page-btn.is-active { background: var(--tk-dark); color: #fff; font-weight: var(--tk-fw-semibold); }

/* ---------- Vistas internas ---------- */
.tk-page-description { max-width: 680px; margin: 5px 0 0; color: var(--tk-text-2); font-size: 13.5px; }
.tk-page-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.tk-leads-page-header { margin-bottom: 16px; }
.tk-leads-commandbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 10px 12px;
  border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff;
}
.tk-leads-command-section { display: flex; min-width: 0; align-items: center; gap: 10px; }
.tk-leads-command-section.is-data { margin-left: auto; }
.tk-leads-command-label { flex: none; color: var(--tk-text-3); font-size: 10px; font-weight: var(--tk-fw-bold); letter-spacing: 0.07em; text-transform: uppercase; }
.tk-view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); }
.tk-view-switch-item {
  display: inline-flex; height: 32px; align-items: center; gap: 7px; padding: 0 12px; border-radius: 6px;
  color: var(--tk-text-2); font-size: 12.5px; font-weight: var(--tk-fw-medium); text-decoration: none;
}
.tk-view-switch-item:hover { color: var(--tk-text); background: var(--tk-bg-hover); }
.tk-view-switch-item.is-active { background: #fff; color: var(--tk-primary); font-weight: var(--tk-fw-semibold); box-shadow: inset 0 0 0 1px var(--tk-border); }
.tk-view-switch-item svg { width: 15px; height: 15px; }
.tk-leads-data-actions { display: flex; gap: 6px; }
.tk-leads-data-action {
  display: grid; min-width: 150px; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 9px; padding: 5px 9px;
  border-radius: var(--tk-radius-md); color: var(--tk-text); text-decoration: none;
}
.tk-leads-data-action:hover { background: var(--tk-bg-2); }
.tk-leads-data-action > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.tk-leads-data-action strong { font-size: 12px; font-weight: var(--tk-fw-semibold); line-height: 1.3; }
.tk-leads-data-action small { overflow: hidden; color: var(--tk-text-3); font-size: 10.5px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.tk-leads-data-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm); background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-leads-data-icon svg { width: 14px; height: 14px; }
.tk-call-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-call-metric { display: grid; min-width: 0; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 11px; padding: 16px 18px; border-right: 1px solid var(--tk-border); }
.tk-call-metric:last-child { border-right: 0; }
.tk-call-metric-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--tk-radius-md); background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-call-metric-icon.is-success { background: var(--tk-success-soft); color: var(--tk-success); }
.tk-call-metric-icon.is-primary { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-call-metric-icon.is-accent { background: var(--tk-accent-soft); color: #087c98; }
.tk-call-metric-icon svg { width: 17px; height: 17px; }
.tk-call-metric-label { display: block; overflow: hidden; color: var(--tk-text-3); font-size: 10.5px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-call-metric-value { display: block; margin-top: 3px; overflow: hidden; font-size: 22px; font-weight: var(--tk-fw-bold); font-variant-numeric: tabular-nums; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.tk-call-filterbar .tk-input-wrap { min-width: 220px; }
.tk-call-filterbar .tk-select { width: 145px; min-width: 145px; }
.tk-call-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 10px; }
.tk-call-list-heading h2 { margin: 0; font-size: 15px; }
.tk-call-list-heading p { margin: 3px 0 0; color: var(--tk-text-3); font-size: 11.5px; }
.tk-call-list-heading > span { flex: none; color: var(--tk-text-3); font-size: 11.5px; }
.tk-call-contact { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 9px; min-width: 170px; }
.tk-call-contact-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--tk-radius-sm); background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-call-contact-icon svg { width: 15px; height: 15px; }
.tk-call-contact > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.tk-call-contact strong, .tk-call-contact a { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-call-contact small, .tk-call-subline { display: block; margin-top: 2px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-call-number, .tk-call-date { font-weight: var(--tk-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-call-status { gap: 5px; }
.tk-call-status svg { width: 12px; height: 12px; }
.tk-call-empty { padding-top: 40px; padding-bottom: 40px; }
.tk-call-empty-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 3px; border-radius: var(--tk-radius-md); background: var(--tk-bg-2); color: var(--tk-text-3); }
.tk-call-empty-icon svg { width: 20px; height: 20px; }
.tk-form-stack { display: flex; flex-direction: column; gap: 15px; }
.tk-form-row { display: flex; align-items: flex-end; gap: 12px; }
.tk-form-row > .tk-field { min-width: 0; flex: 1; }
.tk-form-actions { display: flex; align-items: center; gap: 8px; padding-top: 2px; }

.tk-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.tk-settings-card { min-width: 0; }
.tk-settings-security { display: grid; grid-template-columns: minmax(220px,0.55fr) minmax(320px,1fr); gap: 34px; align-items: start; }
.tk-settings-security-copy { max-width: 340px; color: var(--tk-text-2); font-size: 13px; }
.tk-settings-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.tk-settings-link {
  display: grid; grid-template-columns: 34px minmax(0,1fr) 16px; align-items: center; gap: 11px; min-width: 0;
  padding: 12px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); color: var(--tk-text); text-decoration: none;
  transition: background var(--tk-transition), border-color var(--tk-transition);
}
.tk-settings-link:hover { border-color: var(--tk-border-strong); background: var(--tk-bg-2); color: var(--tk-text); }
.tk-settings-link-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-settings-link-icon svg, .tk-settings-link > svg { width: 16px; height: 16px; }
.tk-settings-link-copy { min-width: 0; }
.tk-settings-link-title { display: block; overflow: hidden; font-size: 13px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-settings-link-meta { display: block; margin-top: 1px; overflow: hidden; color: var(--tk-text-3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tk-settings-link > svg { color: var(--tk-text-3); }
.tk-permission-toggle { height: 30px; padding: 0 10px; border: 0; cursor: pointer; font-family: var(--tk-font); }

.tk-report-filter { width: fit-content; }
.tk-report-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-report-metric { padding: 17px 19px; border-right: 1px solid var(--tk-border); }
.tk-report-metric:last-child { border-right: 0; }
.tk-report-metric-label { color: var(--tk-text-2); font-size: 11.5px; font-weight: var(--tk-fw-semibold); }
.tk-report-metric-value { margin-top: 5px; font-size: 27px; font-weight: var(--tk-fw-bold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.tk-report-metric-value.is-success { color: var(--tk-success); }
.tk-report-metric-value.is-danger { color: var(--tk-danger); }
.tk-report-metric-value.is-primary { color: var(--tk-primary); }
.tk-report-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; align-items: start; }
.tk-report-card { min-width: 0; }
.tk-report-card.is-wide { grid-column: span 2; }
.tk-report-list { padding: 5px 20px 10px; }
.tk-report-row { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--tk-border); }
.tk-report-row:last-child { border-bottom: 0; }
.tk-report-count { flex: none; font-weight: var(--tk-fw-bold); font-variant-numeric: tabular-nums; }
.tk-report-empty { padding: 20px 0; color: var(--tk-text-3); font-size: 12.5px; text-align: center; }
.tk-report-bar-row { display: grid; grid-template-columns: 68px minmax(100px,1fr) 28px; align-items: center; gap: 10px; padding: 8px 0; }
.tk-report-bar-label { color: var(--tk-text-3); font-size: 11.5px; }
.tk-report-bar-track { height: 7px; overflow: hidden; border-radius: 3px; background: var(--tk-bg-hover); }
.tk-report-bar-fill { height: 100%; border-radius: 3px; background: var(--tk-primary); }
.tk-record-summary { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; margin-bottom: 16px; overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-record-summary.is-billing { grid-template-columns: repeat(4,minmax(0,1fr)); }
.tk-record-stat { display: flex; min-height: 82px; justify-content: center; flex-direction: column; padding: 16px 20px; border-right: 1px solid var(--tk-border); }
.tk-record-stat:last-child { border-right: 0; }
.tk-record-stat-label { color: var(--tk-text-3); font-size: 10.5px; font-weight: var(--tk-fw-bold); letter-spacing: 0.05em; text-transform: uppercase; }
.tk-record-stat-value { margin-top: 5px; font-size: 18px; font-weight: var(--tk-fw-bold); font-variant-numeric: tabular-nums; }

/* ---------- Editor de plantillas ---------- */
.tk-template-page-header { margin-bottom: 18px; }
.tk-template-page-header .tk-page-header-actions svg { width: 15px; height: 15px; }
.tk-template-workspace { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,0.75fr); gap: 18px; align-items: start; }
.tk-template-form-card, .tk-template-preview-pane { min-width: 0; }
.tk-template-card-heading, .tk-template-preview-heading { min-height: 61px; }
.tk-template-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.tk-template-card-heading p, .tk-template-preview-heading p { margin: 3px 0 0; color: var(--tk-text-3); font-size: 11.5px; }
.tk-template-form-body { display: flex; flex-direction: column; gap: 17px; }
.tk-template-ai-trigger { flex: none; }
.tk-template-ai-panel { padding: 16px; border: 1px solid #D9D7FF; border-radius: var(--tk-radius-md); background: #F8F7FF; }
.tk-template-ai-heading { display: grid; grid-template-columns: 36px minmax(0,1fr) 30px; align-items: start; gap: 10px; margin-bottom: 14px; }
.tk-template-ai-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; color: var(--tk-primary); }
.tk-template-ai-icon svg { width: 17px; height: 17px; }
.tk-template-ai-heading h3 { margin: 1px 0 2px; font-size: 13px; }
.tk-template-ai-heading p { margin: 0; color: var(--tk-text-3); font-size: 11px; line-height: 1.45; }
.tk-template-ai-heading .tk-icon-action { width: 30px; height: 30px; }
.tk-template-ai-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 11px; }
.tk-template-ai-actions { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.tk-template-ai-status { margin: 0; color: var(--tk-text-3); font-size: 11px; line-height: 1.4; }
.tk-template-ai-status.is-error { color: var(--tk-danger); }
.tk-template-ai-status.is-success { color: var(--tk-success); }
.tk-template-ai-actions .tk-btn { flex: none; }
.tk-template-confirm[hidden] { display: none; }
.tk-template-confirm { z-index: 180; }
.tk-template-confirm-heading { display: flex; min-width: 0; align-items: flex-start; gap: 11px; }
.tk-template-confirm-heading h3 { margin: 1px 0 3px; }
.tk-template-confirm-heading p { max-width: 350px; margin: 0; line-height: 1.5; }
.tk-template-confirm-icon { width: 38px; height: 38px; display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 9px; background: var(--tk-warning-soft); color: var(--tk-warning); }
.tk-template-confirm-icon svg { width: 18px; height: 18px; }
.tk-template-confirm-body p { margin: 0; padding: 11px 12px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); color: var(--tk-text-2); font-size: 11.5px; line-height: 1.55; }

/* ---------- Distribución y recuperación de leads ---------- */
.tk-distribution-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.48fr); gap: 18px; align-items: start; }
.tk-distribution-body { display: flex; flex-direction: column; gap: 18px; }
.tk-distribution-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 0; border: 0; }
.tk-distribution-options legend { grid-column: 1 / -1; margin-bottom: 1px; }
.tk-distribution-option { position: relative; display: grid; min-height: 132px; padding: 14px; grid-template-columns: 38px minmax(0,1fr); align-items: start; gap: 11px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: #fff; cursor: pointer; }
.tk-distribution-option:hover { border-color: var(--tk-border-strong); background: var(--tk-bg-2); }
.tk-distribution-option:has(input:checked) { border-color: var(--tk-primary); background: var(--tk-primary-soft); }
.tk-distribution-option input { position: absolute; opacity: 0; pointer-events: none; }
.tk-distribution-option-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-distribution-option:has(input:checked) .tk-distribution-option-icon { background: #fff; color: var(--tk-primary); }
.tk-distribution-option-icon svg { width: 18px; height: 18px; }
.tk-distribution-option > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.tk-distribution-option strong { font-size: 13px; }
.tk-distribution-option small { margin-top: 3px; color: var(--tk-text-3); font-size: 10.5px; line-height: 1.45; }
.tk-distribution-option em { margin-top: 8px; color: var(--tk-primary); font-size: 10px; font-style: normal; font-weight: var(--tk-fw-bold); }
.tk-distribution-import { align-items: flex-start; }
.tk-distribution-import > span { display: flex; flex-direction: column; }
.tk-distribution-import small { margin-top: 2px; color: var(--tk-text-3); font-size: 10px; font-weight: var(--tk-fw-regular); }
.tk-distribution-summary { position: sticky; top: 0; }
.tk-distribution-summary ol { display: flex; margin: 0; padding: 0; flex-direction: column; list-style: none; }
.tk-distribution-summary li { display: grid; padding: 13px 0; grid-template-columns: 30px minmax(0,1fr); gap: 10px; border-bottom: 1px solid var(--tk-border); }
.tk-distribution-summary li:last-child { border-bottom: 0; }
.tk-distribution-summary li > span { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tk-primary-soft); color: var(--tk-primary); font-size: 10px; font-weight: var(--tk-fw-bold); }
.tk-distribution-summary strong { font-size: 12px; }
.tk-distribution-summary p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 10.5px; line-height: 1.45; }
.tk-automation-action-section { margin-bottom: 28px; }
.tk-automation-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.tk-automation-section-heading.is-email { margin-top: 5px; }
.tk-automation-section-heading > div { display: flex; min-width: 0; align-items: center; gap: 11px; }
.tk-automation-section-heading h2 { margin: 0; font-size: 18px; }
.tk-automation-section-heading p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 11px; }
.tk-automation-section-icon { width: 38px; height: 38px; display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 9px; background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-automation-section-icon svg { width: 17px; height: 17px; }
.tk-reassignment-layout { display: grid; grid-template-columns: minmax(300px,.62fr) minmax(0,1fr); gap: 16px; align-items: start; }
.tk-reassignment-form .tk-card-body { display: flex; flex-direction: column; gap: 15px; }
.tk-reassignment-notifications { display: flex; flex-direction: column; gap: 9px; padding: 12px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); }
.tk-reassignment-list { display: flex; flex-direction: column; gap: 9px; }
.tk-reassignment-card { display: grid; padding: 14px; grid-template-columns: 38px minmax(0,1fr) auto; align-items: start; gap: 11px; }
.tk-reassignment-card-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--tk-warning-soft); color: var(--tk-warning); }
.tk-reassignment-card-icon svg { width: 17px; height: 17px; }
.tk-reassignment-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-reassignment-card-title strong { font-size: 12.5px; }
.tk-reassignment-card p { margin: 4px 0 7px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-reassignment-card small { display: flex; align-items: center; gap: 5px; color: var(--tk-warning); font-size: 9.5px; font-weight: var(--tk-fw-semibold); }
.tk-reassignment-card small svg { width: 12px; height: 12px; }
.tk-reassignment-card-actions { display: flex; gap: 5px; }
.tk-reassignment-empty { min-height: 190px; }
.tk-badge-urgent { gap: 4px; border: 1px solid #F3C9C9; background: #FFF0F0; color: #B42318; }
.tk-badge-urgent svg { width: 11px; height: 11px; }
.tk-lead-name-cell, .tk-lead-detail-title, .tk-kanban-lead-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-lead-urgent-reason { margin-left: 8px; color: var(--tk-danger); font-size: 10.5px; }
.tk-urgent-filter { display: inline-flex; min-height: 38px; padding: 0 11px; align-items: center; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: #fff; cursor: pointer; }
.tk-urgent-filter input { margin-right: 7px; accent-color: var(--tk-danger); }
.tk-urgent-filter span { display: inline-flex; align-items: center; gap: 5px; color: var(--tk-text-2); font-size: 11px; font-weight: var(--tk-fw-semibold); white-space: nowrap; }
.tk-urgent-filter svg { width: 13px; height: 13px; color: var(--tk-danger); }
.tk-template-meta-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(155px,0.38fr); gap: 12px; }
.tk-template-meta-grid.has-status { grid-template-columns: minmax(0,1fr) minmax(145px,0.35fr) minmax(125px,0.28fr); }
.tk-template-editor-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tk-template-editor-label .tk-label { margin: 0; }
.tk-wysiwyg { overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: #fff; }
.tk-wysiwyg:focus-within { border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }
.tk-wysiwyg-toolbar { display: flex; min-height: 42px; align-items: center; gap: 5px; padding: 5px 7px; border-bottom: 1px solid var(--tk-border); background: var(--tk-bg-2); flex-wrap: wrap; }
.tk-wysiwyg-group { display: flex; align-items: center; gap: 2px; }
.tk-wysiwyg-toolbar button { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--tk-text-2); cursor: pointer; }
.tk-wysiwyg-toolbar button:hover { border-color: var(--tk-border); background: #fff; color: var(--tk-text); }
.tk-wysiwyg-toolbar button[aria-expanded="true"] { border-color: var(--tk-primary); background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-wysiwyg-toolbar button:focus-visible { outline: none; border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }
.tk-wysiwyg-toolbar button svg { width: 15px; height: 15px; }
.tk-wysiwyg-divider { width: 1px; height: 20px; background: var(--tk-border); }
.tk-wysiwyg-insert-panel { padding: 13px 14px; border-bottom: 1px solid var(--tk-border); background: #fff; }
.tk-wysiwyg-insert-panel[hidden] { display: none; }
.tk-wysiwyg-insert-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.tk-wysiwyg-insert-heading > div { display: flex; min-width: 0; flex-direction: column; }
.tk-wysiwyg-insert-heading strong { font-size: 12.5px; }
.tk-wysiwyg-insert-heading span { margin-top: 2px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-wysiwyg-insert-heading button { width: 28px; height: 28px; display: inline-flex; flex: none; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--tk-text-3); cursor: pointer; }
.tk-wysiwyg-insert-heading button:hover { border-color: var(--tk-border); background: var(--tk-bg-2); color: var(--tk-text); }
.tk-wysiwyg-insert-heading button:focus-visible { outline: none; border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }
.tk-wysiwyg-insert-heading button svg { width: 14px; height: 14px; }
.tk-wysiwyg-insert-grid { display: grid; grid-template-columns: minmax(150px,.42fr) minmax(0,1fr); gap: 10px; }
.tk-wysiwyg-insert-grid .tk-field { min-width: 0; }
.tk-wysiwyg-insert-actions { display: flex; min-height: 34px; align-items: center; gap: 10px; margin-top: 11px; }
.tk-wysiwyg-insert-actions .tk-check { margin-right: auto; }
.tk-wysiwyg-insert-error { margin-right: auto; color: var(--tk-danger); font-size: 10.5px; line-height: 1.35; }
.tk-wysiwyg-insert-notice { display: flex; margin-top: 10px; align-items: flex-start; gap: 7px; color: var(--tk-text-3); font-size: 10px; line-height: 1.45; }
.tk-wysiwyg-insert-notice svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--tk-warning); }
.tk-wysiwyg-editor { min-height: 310px; max-height: 520px; overflow-y: auto; padding: 16px 17px; outline: none; color: var(--tk-text); font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.tk-wysiwyg-editor:empty::before { content: attr(data-placeholder); color: var(--tk-text-3); pointer-events: none; }
.tk-wysiwyg-editor[aria-invalid="true"] { background: var(--tk-danger-soft); }
.tk-wysiwyg-editor p, .tk-wysiwyg-editor div { margin: 0 0 10px; }
.tk-wysiwyg-editor h2 { margin: 0 0 12px; font-size: 22px; }
.tk-wysiwyg-editor h3 { margin: 0 0 10px; font-size: 18px; }
.tk-wysiwyg-editor blockquote { margin: 10px 0; padding-left: 12px; border-left: 3px solid var(--tk-border-strong); color: var(--tk-text-2); }
.tk-wysiwyg-editor ul, .tk-wysiwyg-editor ol { margin: 8px 0; padding-left: 24px; }
.tk-wysiwyg-editor a, .tk-template-preview-body a { color: var(--tk-primary); text-decoration: underline; text-underline-offset: 2px; }
.tk-wysiwyg-editor img, .tk-template-preview-body img { display: block; max-width: 100%; height: auto; margin: 10px auto; }
.tk-template-variables { overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); }
.tk-template-variables-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--tk-border); }
.tk-template-variables-heading > div { display: flex; min-width: 0; flex-direction: column; }
.tk-template-variables-heading strong { font-size: 12.5px; }
.tk-template-variables-heading span { color: var(--tk-text-3); font-size: 10.5px; }
.tk-template-variables-heading > svg { width: 17px; height: 17px; color: var(--tk-text-3); }
.tk-template-variable-groups { display: flex; flex-direction: column; }
.tk-template-variable-group { border-bottom: 1px solid var(--tk-border); background: #fff; }
.tk-template-variable-group:last-child { border-bottom: 0; }
.tk-template-variable-group-title { display: grid; min-height: 38px; padding: 8px 12px; box-sizing: border-box; grid-template-columns: minmax(0,1fr) auto 16px; align-items: center; gap: 8px; color: var(--tk-text-2); cursor: pointer; list-style: none; }
.tk-template-variable-group-title::-webkit-details-marker { display: none; }
.tk-template-variable-group-title span { font-size: 11px; font-weight: var(--tk-fw-bold); }
.tk-template-variable-group-title small { color: var(--tk-text-3); font-size: 9.5px; font-weight: var(--tk-fw-medium); }
.tk-template-variable-group-title svg { width: 14px; height: 14px; transition: transform .15s ease; }
.tk-template-variable-group[open] .tk-template-variable-group-title svg { transform: rotate(180deg); }
.tk-template-variable-list { display: flex; gap: 6px; padding: 10px 12px 12px; flex-wrap: wrap; }
.tk-template-variable { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--tk-border); border-radius: 6px; background: #fff; color: var(--tk-text-2); cursor: pointer; font-family: var(--tk-font); }
.tk-template-variable:hover { border-color: var(--tk-primary); background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-template-variable code { color: inherit; font-size: 10.5px; }
.tk-template-variable span { display: none; font-size: 10.5px; }
.tk-template-product-note { display: flex; margin: 0; padding: 10px 12px; align-items: flex-start; gap: 7px; border-top: 1px solid var(--tk-border); color: var(--tk-text-3); font-size: 10px; line-height: 1.45; }
.tk-template-product-note svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--tk-primary); }
.tk-template-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 2px; }
.tk-template-form-footer > span { display: flex; align-items: center; gap: 6px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-template-form-footer > span svg { width: 14px; height: 14px; }
.tk-template-preview-pane { position: sticky; top: 0; }
.tk-template-preview-card { overflow: hidden; }
.tk-template-preview-stage { min-height: 470px; display: flex; align-items: flex-start; justify-content: center; padding: 26px 20px; background: #EEF0F5; }
.tk-template-preview-window { width: 100%; overflow: hidden; border: 1px solid var(--tk-border-strong); border-radius: 10px; background: #fff; }
.tk-template-preview-browserbar { height: 28px; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-bottom: 1px solid var(--tk-border); background: var(--tk-bg-2); }
.tk-template-preview-browserbar span { width: 6px; height: 6px; border-radius: 50%; background: var(--tk-border-strong); }
.tk-template-preview-channel { display: flex; align-items: center; gap: 9px; padding: 13px 14px; border-bottom: 1px solid var(--tk-border); }
.tk-template-preview-channel-icon { width: 32px; height: 32px; display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-template-preview-channel-icon svg { width: 15px; height: 15px; }
.tk-template-preview-channel > div { display: flex; min-width: 0; flex-direction: column; }
.tk-template-preview-channel strong { font-size: 12px; }
.tk-template-preview-channel small { overflow: hidden; color: var(--tk-text-3); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-template-preview-subject { padding: 11px 14px; border-bottom: 1px solid var(--tk-border); }
.tk-template-preview-subject span { display: block; margin-bottom: 2px; color: var(--tk-text-3); font-size: 9px; font-weight: var(--tk-fw-bold); letter-spacing: 0.05em; text-transform: uppercase; }
.tk-template-preview-subject strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tk-template-preview-body { min-height: 215px; overflow-wrap: anywhere; padding: 18px 16px 22px; color: #252637; font-family: Arial,sans-serif; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.tk-template-preview-body.is-empty { display: flex; align-items: center; justify-content: center; color: var(--tk-text-3); text-align: center; }
.tk-template-preview-body p, .tk-template-preview-body div { margin: 0 0 9px; }
.tk-template-preview-body h2 { margin: 0 0 10px; font-size: 19px; }
.tk-template-preview-body h3 { margin: 0 0 8px; font-size: 16px; }
.tk-template-preview-body blockquote { margin: 9px 0; padding-left: 10px; border-left: 3px solid var(--tk-border-strong); color: var(--tk-text-2); }
.tk-template-preview-body ul, .tk-template-preview-body ol { margin: 8px 0; padding-left: 19px; }
.tk-template-preview-footer { display: flex; align-items: flex-start; gap: 7px; padding: 11px 13px; border-top: 1px solid var(--tk-border); color: var(--tk-text-3); font-size: 10px; line-height: 1.4; }
.tk-template-preview-footer svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.tk-template-preview-stage.is-whatsapp, .tk-template-preview-stage.is-sms { align-items: center; background: #E9ECF2; }
.tk-template-preview-stage.is-whatsapp .tk-template-preview-window, .tk-template-preview-stage.is-sms .tk-template-preview-window { max-width: 280px; border-radius: 18px; }
.tk-template-preview-stage.is-whatsapp .tk-template-preview-body, .tk-template-preview-stage.is-sms .tk-template-preview-body { min-height: 260px; margin: 10px; padding: 13px; border-radius: 10px 10px 3px 10px; background: var(--tk-primary-soft); white-space: pre-wrap; }
.tk-template-preview-stage.is-call_script .tk-template-preview-browserbar { display: none; }
.tk-template-preview-stage.is-call_script .tk-template-preview-body { font-family: var(--tk-font); }

/* ---------- Cobranza ---------- */
.tk-billing-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-billing-metric { display: grid; min-width: 0; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; padding: 15px 17px; border-right: 1px solid var(--tk-border); }
.tk-billing-metric:last-child { border-right: 0; }
.tk-billing-metric-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-billing-metric-icon svg { width: 16px; height: 16px; }
.tk-billing-metric-icon.is-primary { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-billing-metric-icon.is-success { background: var(--tk-success-soft); color: var(--tk-success); }
.tk-billing-metric-icon.is-danger { background: var(--tk-danger-soft); color: var(--tk-danger); }
.tk-billing-metric-label { display: block; overflow: hidden; color: var(--tk-text-3); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-billing-metric-value { display: block; margin-top: 2px; font-size: 21px; font-weight: var(--tk-fw-bold); font-variant-numeric: tabular-nums; line-height: 1.15; }
.tk-billing-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 18px 0 9px; }
.tk-billing-list-heading h2 { margin: 0; font-size: 15px; }
.tk-billing-list-heading p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 11px; }
.tk-billing-contact { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 9px; min-width: 175px; }
.tk-billing-contact-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-billing-contact-icon svg { width: 14px; height: 14px; }
.tk-billing-contact > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.tk-billing-contact a, .tk-billing-contact strong { overflow: hidden; font-size: 12.5px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-billing-contact small { margin-top: 1px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-billing-status-filter { min-width: 165px; }
.tk-billing-empty { padding: 38px 18px; text-align: center; }
.tk-billing-empty-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; border-radius: var(--tk-radius-md); background: var(--tk-bg-2); color: var(--tk-text-3); }
.tk-billing-empty-icon svg { width: 20px; height: 20px; }
.tk-billing-empty h3 { margin: 0 0 3px; font-size: 14px; }
.tk-billing-empty p { margin: 0 0 12px; color: var(--tk-text-3); font-size: 11.5px; }
.tk-billing-form-card { max-width: 900px; }
.tk-billing-form-body { display: flex; flex-direction: column; gap: 18px; }
.tk-billing-form-section { padding-bottom: 18px; border-bottom: 1px solid var(--tk-border); }
.tk-billing-form-section:last-of-type { padding-bottom: 0; border-bottom: 0; }
.tk-billing-form-section-heading { margin-bottom: 12px; }
.tk-billing-form-section-heading h2 { margin: 0; font-size: 14px; }
.tk-billing-form-section-heading p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 11px; }
.tk-billing-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.tk-billing-form-grid .is-wide { grid-column: 1 / -1; }
.tk-billing-detail-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,0.55fr); gap: 16px; align-items: start; }
.tk-billing-side { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.tk-billing-status-form { display: flex; flex-direction: column; gap: 13px; }
.tk-billing-info-list { display: flex; flex-direction: column; }
.tk-billing-info-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--tk-border); font-size: 12.5px; }
.tk-billing-info-row:last-child { border-bottom: 0; }
.tk-billing-info-row span { color: var(--tk-text-3); }
.tk-billing-info-row strong { max-width: 62%; text-align: right; }
.tk-cfdi-list { display: flex; flex-direction: column; margin-bottom: 16px; }
.tk-cfdi-item { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--tk-border); }
.tk-cfdi-item:first-child { padding-top: 0; }
.tk-cfdi-item-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-cfdi-item-icon svg { width: 16px; height: 16px; }
.tk-cfdi-item-copy { min-width: 0; }
.tk-cfdi-item-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tk-cfdi-item-copy small { color: var(--tk-text-3); font-size: 10.5px; }
.tk-cfdi-upload { margin-top: 4px; padding: 14px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); }
.tk-cfdi-upload-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.tk-cfdi-upload-heading h3 { margin: 0; font-size: 13px; }
.tk-cfdi-upload-heading p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 10.5px; }
.tk-cfdi-upload-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.tk-cfdi-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.tk-cfdi-upload-actions span { color: var(--tk-text-3); font-size: 10.5px; }

/* ---------- API keys & documentation ---------- */
.tk-api-page-header { margin-bottom: 16px; }
.tk-api-secret { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: start; gap: 13px; margin-bottom: 16px; padding: 15px; border: 1px solid #E4D4A8; border-left: 3px solid var(--tk-warning); border-radius: var(--tk-radius-lg); background: #FFFAED; }
.tk-api-secret-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #E9D9AC; border-radius: var(--tk-radius-md); background: #fff; color: var(--tk-warning); }
.tk-api-secret-icon svg { width: 19px; height: 19px; }
.tk-api-secret-copy { min-width: 0; }
.tk-api-secret-eyebrow { display: block; color: var(--tk-warning); font-size: 10px; font-weight: var(--tk-fw-bold); letter-spacing: .06em; text-transform: uppercase; }
.tk-api-secret-copy h2 { margin: 1px 0 8px; font-size: 14px; }
.tk-api-secret-copy code { display: block; overflow-wrap: anywhere; padding: 8px 10px; border: 1px solid #E9D9AC; border-radius: 6px; background: #fff; color: var(--tk-text); font-size: 11px; }
.tk-api-secret .tk-btn.is-copied, .tk-api-code-copy.is-copied { border-color: #B7DFC9; background: var(--tk-success-soft); color: var(--tk-success); }
.tk-api-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-api-overview article { display: grid; grid-template-columns: 35px minmax(0,1fr); align-items: center; gap: 10px; padding: 14px 17px; border-right: 1px solid var(--tk-border); }
.tk-api-overview article:last-child { border-right: 0; }
.tk-api-overview-icon { width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-api-overview-icon.is-success { background: var(--tk-success-soft); color: var(--tk-success); }
.tk-api-overview-icon.is-primary { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-api-overview-icon svg { width: 16px; height: 16px; }
.tk-api-overview small { display: block; color: var(--tk-text-3); font-size: 10.5px; }
.tk-api-overview strong { display: block; margin-top: 1px; font-size: 20px; font-variant-numeric: tabular-nums; }
.tk-api-overview strong.is-text { font-size: 13px; }
.tk-api-management-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(260px,.4fr); gap: 16px; margin-bottom: 16px; }
.tk-api-create-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 12px; }
.tk-api-security-card { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: start; gap: 11px; padding: 16px; background: var(--tk-bg-2); }
.tk-api-security-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: #fff; color: var(--tk-primary); }
.tk-api-security-icon svg { width: 17px; height: 17px; }
.tk-api-security-card h2 { margin: 1px 0 3px; font-size: 13px; }
.tk-api-security-card p { margin: 0; color: var(--tk-text-3); font-size: 10.5px; line-height: 1.5; }
.tk-api-keys-card { overflow: hidden; margin-bottom: 24px; }
.tk-api-keys-table { border: 0; border-radius: 0; }
.tk-api-key-name { display: flex; align-items: center; gap: 9px; }
.tk-api-key-name > span { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-api-key-name svg { width: 14px; height: 14px; }
.tk-api-key-name strong { font-size: 12px; }
.tk-api-prefix { padding: 4px 7px; border-radius: 5px; background: var(--tk-bg-2); color: var(--tk-text-2); font-size: 10px; letter-spacing: .03em; }
.tk-api-key-action { text-align: right; }
.tk-api-key-action form { margin: 0; }
.tk-api-empty { display: flex; flex-direction: column; align-items: center; padding: 25px; color: var(--tk-text-3); text-align: center; }
.tk-api-empty > svg { width: 20px; height: 20px; margin-bottom: 7px; }
.tk-api-empty strong { color: var(--tk-text); font-size: 12px; }
.tk-api-empty span { margin-top: 2px; font-size: 10.5px; }
.tk-api-docs { scroll-margin-top: 12px; padding: 22px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-api-docs-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.tk-api-docs-heading h2 { margin: 2px 0 4px; font-size: 21px; }
.tk-api-docs-heading > div > p:last-child { margin: 0; color: var(--tk-text-2); font-size: 12px; }
.tk-api-version { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--tk-border); border-radius: 6px; color: var(--tk-text-2); font-size: 10px; font-weight: var(--tk-fw-semibold); white-space: nowrap; }
.tk-api-version > span { width: 6px; height: 6px; border-radius: 50%; background: var(--tk-success); }
.tk-api-docs-grid { display: grid; grid-template-columns: minmax(270px,.72fr) minmax(0,1.28fr); gap: 22px; align-items: start; }
.tk-api-doc-copy { display: flex; flex-direction: column; gap: 18px; }
.tk-api-doc-step { display: grid; grid-template-columns: 27px minmax(0,1fr); align-items: start; gap: 10px; }
.tk-api-step-number { width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tk-border); border-radius: 6px; background: var(--tk-bg-2); color: var(--tk-text-2); font-size: 10px; font-weight: var(--tk-fw-bold); }
.tk-api-doc-step h3 { margin: 2px 0 4px; font-size: 12.5px; }
.tk-api-doc-step p { margin: 0; color: var(--tk-text-3); font-size: 10.5px; line-height: 1.5; }
.tk-api-doc-step p code { color: var(--tk-text-2); }
.tk-api-header-example { display: flex; align-items: center; gap: 8px; margin-top: 8px; overflow: hidden; padding: 7px 8px; border: 1px solid var(--tk-border); border-radius: 6px; background: var(--tk-bg-2); }
.tk-api-header-example span { flex: none; color: var(--tk-primary); font-size: 9.5px; font-weight: var(--tk-fw-bold); }
.tk-api-header-example code { overflow: hidden; color: var(--tk-text-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.tk-api-endpoint { display: flex; align-items: center; gap: 8px; margin: 7px 0; padding: 7px 9px; border: 1px solid var(--tk-border); border-radius: 6px; background: var(--tk-bg-2); }
.tk-api-method { padding: 3px 5px; border-radius: 4px; background: var(--tk-primary); color: #fff; font-size: 8.5px; font-weight: var(--tk-fw-bold); }
.tk-api-endpoint code { min-width: 0; overflow: hidden; color: var(--tk-text); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-api-response { margin: 8px 0 0; padding: 10px; overflow: auto; border: 1px solid var(--tk-border); border-radius: 6px; background: var(--tk-bg-2); color: var(--tk-text-2); font-size: 9px; line-height: 1.5; }
.tk-api-code-card { min-width: 0; overflow: hidden; border: 1px solid #252B38; border-radius: var(--tk-radius-lg); background: #171B24; }
.tk-api-code-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 9px 8px 12px; border-bottom: 1px solid #303644; background: #1D222D; }
.tk-api-code-tabs { display: flex; min-width: 0; gap: 3px; overflow-x: auto; }
.tk-api-code-tabs button { padding: 5px 8px; border: 0; border-radius: 5px; background: transparent; color: #949CAC; cursor: pointer; font-family: var(--tk-font); font-size: 9.5px; font-weight: var(--tk-fw-semibold); white-space: nowrap; }
.tk-api-code-tabs button:hover { color: #fff; }
.tk-api-code-tabs button[aria-selected="true"] { background: #303747; color: #fff; }
.tk-api-code-tabs button:focus-visible { outline: 2px solid #858CF1; outline-offset: 1px; }
.tk-api-code-copy { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid #394151; border-radius: 5px; background: transparent; color: #AAB1BF; cursor: pointer; font-family: var(--tk-font); font-size: 9px; }
.tk-api-code-copy:hover { border-color: #555F72; color: #fff; }
.tk-api-code-copy svg { width: 12px; height: 12px; }
.tk-api-code-panel { min-height: 400px; max-height: 475px; margin: 0; padding: 17px 18px; overflow: auto; background: #171B24; color: #D8DDE7; font-size: 10px; line-height: 1.7; tab-size: 2; white-space: pre; }
.tk-api-code-panel code { color: inherit; font-family: var(--tk-mono); }
.tk-api-code-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid #303644; background: #1D222D; color: #7F8797; font-size: 8.5px; }
.tk-api-code-footer span { display: flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-api-code-footer svg { width: 11px; height: 11px; flex: none; }
.tk-api-fields-section { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--tk-border); }
.tk-api-fields-section h3 { margin: 0 0 3px; font-size: 13px; }
.tk-api-fields-section p { margin: 0; color: var(--tk-text-3); font-size: 10.5px; line-height: 1.45; }
.tk-api-fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.tk-api-fields-grid > span { display: flex; min-width: 0; flex-direction: column; gap: 2px; padding: 8px 9px; border: 1px solid var(--tk-border); border-radius: 6px; background: var(--tk-bg-2); }
.tk-api-fields-grid code { overflow: hidden; color: var(--tk-primary); font-size: 9.5px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-api-method.is-get { border-color: #BFE4D5; background: var(--tk-success-soft); color: var(--tk-success); }
.tk-api-catalog-docs { align-items: start; }
.tk-api-catalog-docs .tk-api-response { margin: 0; max-height: 300px; }
.tk-api-rate-note { display: grid; margin-top: 14px; padding: 15px 17px; grid-template-columns: 24px minmax(0,1fr); gap: 11px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: var(--tk-bg-2); }
.tk-api-rate-note > svg { width: 19px; height: 19px; color: var(--tk-primary); }.tk-api-rate-note strong { font-size: 12.5px; }.tk-api-rate-note p { margin: 3px 0 0; color: var(--tk-text-2); font-size: 11.5px; line-height: 1.5; }
.tk-api-fields-grid small { color: var(--tk-text-3); font-size: 9px; }
.tk-api-endpoints-section { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--tk-border); }
.tk-api-endpoints-section h3 { margin: 0 0 3px; font-size: 13px; }
.tk-api-endpoints-section p { margin: 0; color: var(--tk-text-3); font-size: 10.5px; }
.tk-api-endpoints-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.tk-api-endpoints-list > span { display: grid; grid-template-columns: 35px minmax(0,1fr); align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid var(--tk-border); border-radius: 6px; background: var(--tk-bg-2); }
.tk-api-endpoints-list b { color: #087C98; font-size: 8px; }
.tk-api-endpoints-list b.is-post { color: var(--tk-primary); }
.tk-api-endpoints-list code { overflow: hidden; color: var(--tk-text-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.tk-api-errors { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tk-api-errors span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 5px; background: var(--tk-bg-2); color: var(--tk-text-3); font-size: 9.5px; }
.tk-api-errors strong { color: var(--tk-text-2); }

/* ---------- Webhooks ---------- */
.tk-webhook-page-header { margin-bottom: 16px; }
.tk-webhook-alert { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.tk-webhook-alert > svg { width: 17px; height: 17px; flex: none; }
.tk-webhook-secret { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: start; gap: 13px; margin-bottom: 16px; padding: 15px; border: 1px solid #E4D4A8; border-left: 3px solid var(--tk-warning); border-radius: var(--tk-radius-lg); background: #FFFAED; }
.tk-webhook-secret-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #E9D9AC; border-radius: var(--tk-radius-md); background: #fff; color: var(--tk-warning); }
.tk-webhook-secret-icon svg { width: 19px; height: 19px; }
.tk-webhook-secret-copy { min-width: 0; }
.tk-webhook-secret-eyebrow { display: block; margin-bottom: 1px; color: var(--tk-warning); font-size: 10px; font-weight: var(--tk-fw-bold); letter-spacing: 0.06em; text-transform: uppercase; }
.tk-webhook-secret-copy h2 { margin: 0; font-size: 14px; }
.tk-webhook-secret-copy p { margin: 2px 0 9px; color: var(--tk-text-2); font-size: 11.5px; }
.tk-webhook-secret-value { display: block; overflow-wrap: anywhere; padding: 8px 10px; border: 1px solid #E9D9AC; border-radius: 6px; background: #fff; color: var(--tk-text); font-size: 11px; }
.tk-webhook-secret .tk-btn.is-copied, .tk-webhook-url-row button.is-copied { border-color: #B7DFC9; background: var(--tk-success-soft); color: var(--tk-success); }
.tk-webhook-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-webhook-metric { display: grid; min-width: 0; grid-template-columns: 35px minmax(0,1fr); align-items: center; gap: 10px; padding: 15px 17px; border-right: 1px solid var(--tk-border); }
.tk-webhook-metric:last-child { border-right: 0; }
.tk-webhook-metric-icon { width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-webhook-metric-icon svg { width: 16px; height: 16px; }
.tk-webhook-metric-icon.is-success { background: var(--tk-success-soft); color: var(--tk-success); }
.tk-webhook-metric-icon.is-primary { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-webhook-metric-icon.is-accent { background: var(--tk-accent-soft); color: #087C98; }
.tk-webhook-metric-label { display: block; overflow: hidden; color: var(--tk-text-3); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-webhook-metric-value { display: block; margin-top: 2px; overflow: hidden; font-size: 21px; font-weight: var(--tk-fw-bold); font-variant-numeric: tabular-nums; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.tk-webhook-metric-value.is-text { font-size: 13px; letter-spacing: 0.01em; }
.tk-webhook-setup-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(285px,0.55fr); gap: 16px; align-items: start; scroll-margin-top: 12px; }
.tk-webhook-create-card, .tk-webhook-guide { min-width: 0; }
.tk-webhook-card-heading { min-height: 61px; }
.tk-webhook-card-heading p { margin: 3px 0 0; color: var(--tk-text-3); font-size: 11.5px; }
.tk-webhook-form { display: flex; flex-direction: column; gap: 17px; }
.tk-webhook-form-grid { display: grid; grid-template-columns: minmax(180px,0.55fr) minmax(0,1.45fr); gap: 12px; }
.tk-webhook-events-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 1px; }
.tk-webhook-events-heading h3 { margin: 0; font-size: 13.5px; }
.tk-webhook-events-heading p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 10.5px; }
.tk-webhook-events-heading > div:last-child { display: flex; align-items: center; gap: 8px; }
.tk-webhook-events-heading > div:last-child span { width: 1px; height: 14px; background: var(--tk-border); }
.tk-webhook-events-heading button { padding: 0; border: 0; background: transparent; color: var(--tk-primary); cursor: pointer; font-family: var(--tk-font); font-size: 11px; font-weight: var(--tk-fw-semibold); }
.tk-webhook-events-heading button:hover { color: var(--tk-primary-hover); }
.tk-webhook-event-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; outline: none; }
.tk-webhook-event-groups.is-invalid { padding: 3px; border: 1px solid var(--tk-danger); border-radius: var(--tk-radius-lg); }
.tk-field-error { margin: -9px 0 0; color: var(--tk-danger); font-size: var(--tk-fs-small); font-weight: var(--tk-fw-medium); }
.tk-webhook-event-group { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); }
.tk-webhook-event-group:first-child { grid-column: 1 / -1; }
.tk-webhook-event-group legend { width: auto; display: flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 0; color: var(--tk-text-2); float: none; font-size: 10.5px; font-weight: var(--tk-fw-bold); letter-spacing: 0.045em; text-transform: uppercase; }
.tk-webhook-event-group legend svg { width: 13px; height: 13px; }
.tk-webhook-event-list { display: grid; gap: 5px; }
.tk-webhook-event-group:first-child .tk-webhook-event-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
.tk-webhook-event { position: relative; display: grid; min-width: 0; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--tk-border); border-radius: 7px; background: #fff; cursor: pointer; }
.tk-webhook-event:hover { border-color: var(--tk-border-strong); }
.tk-webhook-event:has(input:checked) { border-color: #C9CDEF; background: var(--tk-primary-soft); }
.tk-webhook-event input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.tk-webhook-event-check { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tk-border-strong); border-radius: 5px; background: #fff; color: #fff; }
.tk-webhook-event-check svg { width: 12px; height: 12px; opacity: 0; }
.tk-webhook-event input:checked + .tk-webhook-event-check { border-color: var(--tk-primary); background: var(--tk-primary); }
.tk-webhook-event input:checked + .tk-webhook-event-check svg { opacity: 1; }
.tk-webhook-event input:focus-visible + .tk-webhook-event-check { box-shadow: var(--tk-focus-ring); }
.tk-webhook-event-copy { display: flex; min-width: 0; flex-direction: column; }
.tk-webhook-event-copy strong { overflow: hidden; font-size: 11px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-webhook-event-copy code { overflow: hidden; margin-top: 1px; color: var(--tk-text-3); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.tk-webhook-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 1px; }
.tk-webhook-form-footer > span { display: flex; align-items: flex-start; gap: 6px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-webhook-form-footer > span svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.tk-webhook-guide { position: sticky; top: 0; }
.tk-webhook-steps { display: flex; flex-direction: column; gap: 15px; margin: 0; padding: 0; list-style: none; }
.tk-webhook-steps li { display: grid; grid-template-columns: 26px minmax(0,1fr); align-items: start; gap: 9px; }
.tk-webhook-steps li > span { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tk-border); border-radius: 6px; background: var(--tk-bg-2); color: var(--tk-text-2); font-size: 10.5px; font-weight: var(--tk-fw-bold); }
.tk-webhook-steps strong { display: block; font-size: 11.5px; }
.tk-webhook-steps p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 10.5px; line-height: 1.45; }
.tk-webhook-headers { display: flex; flex-direction: column; margin-top: 18px; padding: 5px 11px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-2); }
.tk-webhook-headers > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--tk-border); }
.tk-webhook-headers > div:last-child { border-bottom: 0; }
.tk-webhook-headers span { color: var(--tk-text-3); font-size: 9.5px; }
.tk-webhook-headers code { overflow: hidden; color: var(--tk-text-2); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-webhook-guide-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; color: var(--tk-text-3); font-size: 10px; line-height: 1.4; }
.tk-webhook-guide-note svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.tk-webhook-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 22px 0 9px; }
.tk-webhook-list-heading h2 { margin: 0; font-size: 15px; }
.tk-webhook-list-heading p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 11px; }
.tk-webhook-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.tk-webhook-endpoint { min-width: 0; overflow: hidden; }
.tk-webhook-endpoint.is-inactive { background: #FCFCFD; }
.tk-webhook-endpoint-header { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 14px 15px 11px; }
.tk-webhook-endpoint-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-webhook-endpoint.is-inactive .tk-webhook-endpoint-icon { background: var(--tk-bg-2); color: var(--tk-text-3); }
.tk-webhook-endpoint-icon svg { width: 17px; height: 17px; }
.tk-webhook-endpoint-title { min-width: 0; }
.tk-webhook-endpoint-title h3 { overflow: hidden; margin: 0; font-size: 13.5px; font-weight: var(--tk-fw-bold); text-overflow: ellipsis; white-space: nowrap; }
.tk-webhook-endpoint-title span { display: block; overflow: hidden; margin-top: 1px; color: var(--tk-text-3); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-webhook-url-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; margin: 0 15px; padding: 8px 9px; border: 1px solid var(--tk-border); border-radius: 7px; background: var(--tk-bg-2); }
.tk-webhook-url-row code { overflow: hidden; color: var(--tk-text-2); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.tk-webhook-url-row button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 5px; border: 0; border-radius: 4px; background: transparent; color: var(--tk-text-3); cursor: pointer; font-family: var(--tk-font); font-size: 9.5px; }
.tk-webhook-url-row button:hover { background: #fff; color: var(--tk-text); }
.tk-webhook-url-row button svg { width: 12px; height: 12px; }
.tk-webhook-endpoint-events { padding: 12px 15px 14px; }
.tk-webhook-endpoint-label { display: block; margin-bottom: 6px; color: var(--tk-text-3); font-size: 9.5px; font-weight: var(--tk-fw-bold); letter-spacing: 0.045em; text-transform: uppercase; }
.tk-webhook-endpoint-events > div { display: flex; gap: 5px; flex-wrap: wrap; }
.tk-webhook-event-chip { display: inline-flex; align-items: center; padding: 4px 7px; border: 1px solid var(--tk-border); border-radius: 5px; background: #fff; color: var(--tk-text-2); font-size: 9.5px; }
.tk-webhook-endpoint-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; border-top: 1px solid var(--tk-border); background: var(--tk-bg-2); }
.tk-webhook-endpoint-footer > span { display: flex; align-items: center; gap: 5px; color: var(--tk-text-3); font-size: 9.5px; }
.tk-webhook-endpoint-footer > span svg { width: 12px; height: 12px; }
.tk-webhook-endpoint-actions { display: flex; align-items: center; gap: 4px; }
.tk-webhook-endpoint-actions form { margin: 0; }
.tk-webhook-empty { padding: 38px 18px; text-align: center; }
.tk-webhook-empty-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; border-radius: var(--tk-radius-md); background: var(--tk-bg-2); color: var(--tk-text-3); }
.tk-webhook-empty-icon svg { width: 20px; height: 20px; }
.tk-webhook-empty h3 { margin: 0 0 3px; font-size: 14px; }
.tk-webhook-empty p { margin: 0 0 12px; color: var(--tk-text-3); font-size: 11.5px; }

.tk-pipeline-settings-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 20px; align-items: start; }
.tk-pipeline-sidebar { display: flex; min-width: 0; flex-direction: column; gap: 12px; }
.tk-pipeline-sidebar-card { padding: 10px; }
.tk-section-label { margin: 0 0 7px; padding: 0 3px; color: var(--tk-text-3); font-size: 10.5px; font-weight: var(--tk-fw-bold); letter-spacing: 0.07em; text-transform: uppercase; }
.tk-pipeline-list { display: flex; flex-direction: column; gap: 3px; }
.tk-pipeline-list-item { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border-radius: 7px; color: var(--tk-text-2); font-size: 13px; font-weight: var(--tk-fw-medium); text-decoration: none; }
.tk-pipeline-list-item:hover { background: var(--tk-bg-2); color: var(--tk-text); }
.tk-pipeline-list-item.is-active { background: var(--tk-primary-soft); color: var(--tk-primary); font-weight: var(--tk-fw-semibold); }
.tk-pipeline-create { display: flex; gap: 7px; }
.tk-pipeline-create .tk-input { min-width: 0; height: 34px; font-size: 12.5px; }
.tk-pipeline-main { min-width: 0; }
.tk-stage-input { width: 100%; min-width: 150px; height: 34px; padding: 0 9px; font-size: 12.5px; }
.tk-stage-select { min-width: 104px; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 12.5px; }
.tk-add-stage { margin-top: 14px; padding: 13px; }

.tk-lead-detail-grid { display: grid; grid-template-columns: minmax(0,0.9fr) minmax(420px,1.35fr); gap: 18px; }
.tk-lead-detail-column { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.tk-lead-activity { position: sticky; top: 0; align-self: start; max-height: calc(100vh - 100px); }
.tk-lead-activity-card { display: flex; max-height: calc(100vh - 100px); overflow: hidden; flex-direction: column; }
.tk-lead-comment { flex: none; padding: 14px 18px; border-bottom: 1px solid var(--tk-border); }
.tk-lead-comment form { display: flex; gap: 8px; }
.tk-lead-comment .tk-textarea { min-height: 76px; flex: 1; }
.tk-lead-activity-scroll { flex: 1; overflow-y: auto; }
.tk-detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 24px; }
.tk-detail-list > div { min-width: 0; }
.tk-detail-list > div > .tk-label { display: block; margin-bottom: 4px; color: var(--tk-text-3); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.tk-detail-list > div > div { min-height: 24px; }
.tk-detail-item { min-width: 0; }
.tk-detail-item .tk-label { display: block; margin-bottom: 4px; color: var(--tk-text-3); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.tk-detail-value { display: flex; min-height: 24px; align-items: center; gap: 7px; min-width: 0; }
.tk-detail-value > svg { width: 14px; height: 14px; flex: none; color: var(--tk-text-3); }

/* ---------- Detalle de cliente ---------- */
.tk-detail-back { display: inline-flex; margin-bottom: 12px; }
.tk-customer-alert { margin-bottom: 12px; }
.tk-customer-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px;
  padding: 18px 20px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff;
}
.tk-customer-identity { display: flex; min-width: 0; align-items: center; gap: 13px; }
.tk-customer-avatar {
  width: 46px; height: 46px; display: inline-flex; flex: none; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--tk-primary-soft); color: var(--tk-primary); font-size: 13px; font-weight: var(--tk-fw-bold);
}
.tk-customer-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tk-customer-title-row .tk-h1 { margin: 0; }
.tk-customer-identity p { margin: 4px 0 0; color: var(--tk-text-3); font-size: 12.5px; }
.tk-customer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.tk-customer-actions form { margin: 0; }
.tk-customer-actions .tk-btn svg, .tk-btn-whatsapp svg { width: 15px; height: 15px; }
.tk-btn-whatsapp { border-color: #B9E8D4; background: #ECF9F3; color: #157A52; }
.tk-btn-whatsapp:hover { border-color: #8FD5B8; background: #E1F6EB; color: #106843; }
.tk-customer-detail-grid { align-items: start; }
.tk-customer-card-header { min-height: 62px; padding: 11px 18px; }
.tk-customer-card-header > div { display: flex; min-width: 0; align-items: center; gap: 10px; }
.tk-customer-card-header h2 { margin: 0; font-size: 14.5px; font-weight: var(--tk-fw-bold); }
.tk-customer-card-header p { margin: 2px 0 0; color: var(--tk-text-3); font-size: 11.5px; }
.tk-customer-card-icon {
  width: 30px; height: 30px; display: inline-flex; flex: none; align-items: center; justify-content: center;
  border: 1px solid var(--tk-border); border-radius: 7px; background: var(--tk-bg-2); color: var(--tk-text-2);
}
.tk-customer-card-icon svg { width: 15px; height: 15px; }
.tk-customer-count {
  display: inline-flex; min-width: 20px; height: 20px; margin-left: 4px; align-items: center; justify-content: center;
  padding: 0 6px; border-radius: 5px; background: var(--tk-bg-2); color: var(--tk-text-2); font-size: 10.5px;
}
.tk-customer-contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.tk-customer-contact-item {
  position: relative; display: flex; min-width: 0; min-height: 58px; align-items: center; gap: 10px;
  padding: 10px 11px; border: 1px solid var(--tk-border); border-radius: 9px; background: var(--tk-bg-1);
}
.tk-customer-contact-item.is-wide { grid-column: 1 / -1; }
.tk-customer-contact-icon {
  width: 30px; height: 30px; display: inline-flex; flex: none; align-items: center; justify-content: center;
  border-radius: 7px; background: var(--tk-bg-2); color: var(--tk-text-3);
}
.tk-customer-contact-icon svg { width: 14px; height: 14px; }
.tk-customer-contact-item > div:not(.tk-customer-inline-actions), .tk-customer-origin > div { min-width: 0; }
.tk-customer-contact-item span:not(.tk-customer-contact-icon), .tk-customer-management-block > span, .tk-customer-origin > div > span, .tk-customer-notes > span {
  display: block; margin-bottom: 2px; color: var(--tk-text-3); font-size: 9.5px; font-weight: var(--tk-fw-bold); letter-spacing: .045em; text-transform: uppercase;
}
.tk-customer-contact-item strong, .tk-customer-contact-item a { overflow-wrap: anywhere; color: var(--tk-text); font-size: 12.5px; font-weight: var(--tk-fw-semibold); text-decoration: none; }
.tk-customer-contact-item a:hover { color: var(--tk-primary); }
.tk-customer-inline-actions { display: flex; margin-left: auto; align-items: center; gap: 4px; }
.tk-customer-inline-actions form { margin: 0; }
.tk-customer-inline-actions button, .tk-customer-inline-actions a, .tk-icon-btn {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--tk-border); border-radius: 6px; background: #fff; color: var(--tk-text-3); cursor: pointer;
}
.tk-customer-inline-actions button:hover, .tk-customer-inline-actions a:hover, .tk-icon-btn:hover { border-color: var(--tk-border-strong); background: var(--tk-bg-2); color: var(--tk-text); }
.tk-customer-inline-actions svg, .tk-icon-btn svg { width: 13px; height: 13px; }
.tk-customer-notes { grid-column: 1 / -1; padding: 11px 12px; border-left: 3px solid var(--tk-primary); border-radius: 0 8px 8px 0; background: var(--tk-primary-soft); }
.tk-customer-notes p { margin: 3px 0 0; color: var(--tk-text-2); font-size: 12px; line-height: 1.55; }
.tk-customer-management-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.tk-customer-management-block form { display: flex; align-items: center; gap: 7px; }
.tk-customer-management-block .tk-select { min-width: 0; height: 36px; font-size: 12px; }
.tk-customer-management-block .tk-btn { flex: none; height: 36px; }
.tk-customer-management-block > strong { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.tk-customer-management-block > strong svg { width: 14px; height: 14px; color: var(--tk-text-3); }
.tk-customer-origin {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-top: 13px; border-top: 1px solid var(--tk-border);
}
.tk-customer-origin a, .tk-customer-origin strong { display: block; color: var(--tk-text); font-size: 12.5px; font-weight: var(--tk-fw-semibold); text-decoration: none; }
.tk-customer-origin a:hover { color: var(--tk-primary); }
.tk-customer-origin small { display: block; margin-top: 2px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-customer-products { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.tk-customer-product { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; gap: 10px; padding: 9px; border: 1px solid var(--tk-border); border-radius: 9px; }
.tk-customer-product-media { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 7px; background: var(--tk-bg-2); color: var(--tk-text-3); }
.tk-customer-product-media img { width: 100%; height: 100%; object-fit: cover; }
.tk-customer-product-media svg { width: 19px; height: 19px; }
.tk-customer-product-copy { min-width: 0; }
.tk-customer-product-copy > span { display: block; color: var(--tk-text-3); font-size: 9.5px; font-weight: var(--tk-fw-bold); letter-spacing: .035em; text-transform: uppercase; }
.tk-customer-product-copy > a { display: block; overflow: hidden; margin: 2px 0; color: var(--tk-text); font-size: 12.5px; font-weight: var(--tk-fw-semibold); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.tk-customer-product-copy > a:hover { color: var(--tk-primary); }
.tk-customer-product-copy > strong { display: block; color: var(--tk-text-2); font-size: 11px; }
.tk-customer-product-copy > p { margin: 3px 0 0; color: var(--tk-text-3); font-size: 10.5px; line-height: 1.35; }
.tk-customer-product > form { margin: 0; }
.tk-customer-product .tk-icon-btn { width: 26px; height: 26px; }
.tk-customer-associate-form { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.85fr) auto; align-items: end; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tk-border); }
.tk-customer-empty-inline { display: flex; align-items: center; gap: 10px; padding: 17px; border: 1px dashed var(--tk-border-strong); border-radius: 9px; background: var(--tk-bg-2); }
.tk-customer-empty-inline > svg { width: 20px; height: 20px; color: var(--tk-text-3); }
.tk-customer-empty-inline strong, .tk-customer-empty-inline span { display: block; }
.tk-customer-empty-inline strong { font-size: 12.5px; }
.tk-customer-empty-inline span { margin-top: 2px; color: var(--tk-text-3); font-size: 11px; }
.tk-customer-list { padding: 3px 18px 7px; }
.tk-customer-list-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--tk-border); color: inherit; text-decoration: none; }
.tk-customer-list-row:last-child { border-bottom: 0; }
a.tk-customer-list-row:hover strong { color: var(--tk-primary); }
.tk-customer-list-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--tk-bg-2); color: var(--tk-text-3); }
.tk-customer-list-icon svg { width: 13px; height: 13px; }
.tk-customer-list-row strong, .tk-customer-list-row span { display: block; }
.tk-customer-list-row strong { font-size: 12px; }
.tk-customer-list-row > div > span { margin-top: 2px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-customer-documents { margin-bottom: 11px; }
.tk-customer-documents > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--tk-border); }
.tk-customer-documents > div > a { display: flex; min-width: 0; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.tk-customer-documents > div > a > span:last-child { min-width: 0; }
.tk-customer-documents strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tk-customer-documents small { display: block; margin-top: 2px; color: var(--tk-text-3); font-size: 10.5px; }
.tk-customer-documents form { margin: 0; }
.tk-customer-task-modal { width: calc(100vw - 32px); max-width: 540px; max-height: 90vh; overflow-y: auto; }
.tk-customer-task-modal .tk-modal-header h3 { margin: 0; font-size: 16px; }
#task-modal { display: none; }
#task-modal:target { display: flex; }
.tk-lead-hero-urgent { display: flex; margin-top: 5px; align-items: center; gap: 5px; color: var(--tk-danger); font-size: 10.5px; }
.tk-lead-hero-urgent svg { width: 12px; height: 12px; }
.tk-lead-management-wide { grid-column: 1 / -1; }
.tk-lead-modal { display: none; }
.tk-lead-modal:target { display: flex; }
.tk-lead-modal .tk-modal-header h3 { margin: 0; font-size: 16px; }
.tk-lead-modal .tk-modal-header p { margin: 4px 0 0; color: var(--tk-text-3); font-size: 11.5px; }

#ai-chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 99; font-family: inherit; }
#ai-chat-btn {
  isolation: isolate; position: relative; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0;
  border: 1px solid rgba(255,255,255,0.82); border-radius: 50%; background: #12C8F4; color: #fff; cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.28), 0 4px 12px rgba(17,17,35,0.16);
  transition: transform var(--tk-transition), box-shadow var(--tk-transition);
}
#ai-chat-btn:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.34), 0 5px 14px rgba(17,17,35,0.19); }
#ai-chat-btn::before, #ai-chat-btn::after, #ai-chat-btn .ai-orb-flow { content: ""; position: absolute; pointer-events: none; will-change: transform, border-radius; }
#ai-chat-btn::before {
  z-index: 0; width: 58px; height: 48px; top: -14px; left: -12px; border-radius: 46% 54% 58% 42%;
  background: #263BFF; filter: blur(6px); opacity: 0.94; animation: tk-orb-deep 3.2s ease-in-out infinite alternate;
}
#ai-chat-btn::after {
  z-index: 1; width: 48px; height: 54px; right: -17px; bottom: -16px; border-radius: 58% 42% 46% 54%;
  background: #10CBFF; filter: blur(5px); opacity: 0.96; animation: tk-orb-cyan 2.6s ease-in-out infinite alternate;
}
#ai-chat-btn .ai-orb-flow {
  z-index: 1; width: 42px; height: 40px; left: -14px; bottom: -13px; border-radius: 42% 58% 54% 46%;
  background: #13E2BE; filter: blur(7px); opacity: 0.9; animation: tk-orb-mint 3.7s ease-in-out infinite alternate;
}
#ai-chat-btn > svg { position: relative; z-index: 3; width: 18px; height: 18px; color: rgba(255,255,255,0.94); }
@keyframes tk-orb-deep {
  0% { transform: translate(-3px,-1px) rotate(0deg) scale(1.02); border-radius: 46% 54% 58% 42%; }
  48% { transform: translate(10px,13px) rotate(118deg) scale(1.12); border-radius: 58% 42% 44% 56%; }
  100% { transform: translate(17px,6px) rotate(236deg) scale(0.98); border-radius: 41% 59% 55% 45%; }
}
@keyframes tk-orb-cyan {
  0% { transform: translate(1px,2px) rotate(0deg) scale(1); border-radius: 58% 42% 46% 54%; }
  55% { transform: translate(-15px,-12px) rotate(-126deg) scale(1.16); border-radius: 44% 56% 60% 40%; }
  100% { transform: translate(-7px,-20px) rotate(-245deg) scale(1.02); border-radius: 55% 45% 41% 59%; }
}
@keyframes tk-orb-mint {
  0% { transform: translate(0,0) rotate(0deg) scale(0.96); border-radius: 42% 58% 54% 46%; }
  50% { transform: translate(17px,-15px) rotate(142deg) scale(1.18); border-radius: 59% 41% 48% 52%; }
  100% { transform: translate(26px,-5px) rotate(278deg) scale(1.02); border-radius: 48% 52% 61% 39%; }
}
@media (prefers-reduced-motion: reduce) {
  #ai-chat-btn::before, #ai-chat-btn::after, #ai-chat-btn .ai-orb-flow { animation: none; }
}
#ai-chat-panel {
  display: none; position: fixed; right: 20px; bottom: 76px; width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 96px);
  overflow: hidden; flex-direction: column; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; box-shadow: var(--tk-shadow-md); z-index: 99;
}
#ai-chat-panel.is-open { display: flex; }
.ai-chat-header { display: flex; flex: none; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--tk-border); background: #fff; color: var(--tk-text); font-size: 13.5px; font-weight: var(--tk-fw-bold); }
.ai-chat-header-title { display: flex; align-items: center; gap: 8px; }
.ai-chat-header-title svg { width: 16px; height: 16px; color: var(--tk-primary); }
.ai-chat-header button { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--tk-text-3); cursor: pointer; }
.ai-chat-header button:hover { background: var(--tk-bg-2); color: var(--tk-text); }
.ai-chat-header button svg { width: 16px; height: 16px; }
.ai-chat-body { display: flex; flex: 1; overflow-y: auto; flex-direction: column; gap: 8px; padding: 14px; background: var(--tk-bg-2); }
.ai-chat-msg { max-width: 86%; padding: 9px 11px; border: 1px solid var(--tk-border); border-radius: 8px; background: #fff; color: var(--tk-text); font-size: 12.5px; line-height: 1.45; }
.ai-chat-msg.user { align-self: flex-end; border-color: var(--tk-primary); background: var(--tk-primary); color: #fff; }
.ai-chat-msg.ai { align-self: flex-start; }
.ai-chat-input { display: flex; flex: none; gap: 7px; padding: 10px; border-top: 1px solid var(--tk-border); background: #fff; }
.ai-chat-input input { min-width: 0; flex: 1; padding: 8px 10px; border: 1px solid var(--tk-border); border-radius: 7px; outline: 0; font-family: inherit; font-size: 12.5px; }
.ai-chat-input input:focus { border-color: var(--tk-primary); box-shadow: var(--tk-focus-ring); }
.ai-chat-input button { padding: 0 13px; border: 0; border-radius: 7px; background: var(--tk-primary); color: #fff; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: var(--tk-fw-semibold); }
.ai-chat-input button:disabled { cursor: not-allowed; opacity: 0.55; }
.ai-chat-typing { display: none; align-self: flex-start; padding: 8px 10px; color: var(--tk-text-3); font-size: 12px; }
.ai-chat-typing.is-visible { display: flex; align-items: center; gap: 4px; }
.ai-chat-typing.is-visible > span { width: 5px; height: 5px; border-radius: 50%; background: var(--tk-text-3); animation: tk-chat-dot 900ms ease-in-out infinite alternate; }
.ai-chat-typing.is-visible > span:nth-child(2) { animation-delay: 150ms; }
.ai-chat-typing.is-visible > span:nth-child(3) { animation-delay: 300ms; }
.ai-chat-typing.is-visible > em { margin-left: 4px; font-style: normal; }
@keyframes tk-chat-dot { from { transform: translateY(1px); opacity: .35; } to { transform: translateY(-2px); opacity: 1; } }
#ai-chat-panel.is-collection { width: 430px; height: 570px; }
#ai-chat-panel.is-collection .ai-chat-header { min-height: 59px; padding: 10px 12px 10px 14px; }
.ai-chat-header-title > span { display: flex; flex-direction: column; }
.ai-chat-header-title small { margin-top: 1px; color: var(--tk-text-3); font-size: 9.5px; font-weight: var(--tk-fw-regular); }
#ai-chat-panel.is-collection .ai-chat-body { gap: 9px; padding: 13px; }
#ai-chat-panel.is-collection .ai-chat-msg { max-width: 94%; }
.ai-chat-welcome { display: flex; flex-direction: column; gap: 4px; }
.ai-chat-welcome strong { font-size: 12.5px; }
.ai-chat-welcome span { color: var(--tk-text-2); font-size: 11px; line-height: 1.45; }
.ai-chat-suggestions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ai-chat-suggestions button { min-height: 29px; padding: 5px 8px; border: 1px solid var(--tk-border); border-radius: 7px; background: #fff; color: var(--tk-text-2); cursor: pointer; font-family: inherit; font-size: 9.5px; }
.ai-chat-suggestions button:hover { border-color: var(--tk-primary); background: var(--tk-primary-soft); color: var(--tk-primary); }
.ai-chat-inline-link { color: var(--tk-primary); font-weight: var(--tk-fw-semibold); text-decoration: underline; text-decoration-color: rgba(79,70,229,.3); text-underline-offset: 2px; }
.ai-chat-records { display: flex; width: min(350px,calc(100vw - 88px)); margin-top: 9px; padding-top: 5px; flex-direction: column; border-top: 1px solid var(--tk-border); }
.ai-chat-record { display: grid; min-width: 0; padding: 8px 2px; grid-template-columns: 27px minmax(0,1fr) 15px; align-items: center; gap: 8px; border-bottom: 1px solid var(--tk-border); color: var(--tk-text); text-decoration: none; }
.ai-chat-record:last-child { border-bottom: 0; }
.ai-chat-record:hover strong { color: var(--tk-primary); }
.ai-chat-record-icon { width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--tk-primary-soft); color: var(--tk-primary); font-size: 10px; font-weight: var(--tk-fw-bold); }
.ai-chat-record > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.ai-chat-record strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-record small { overflow: hidden; margin-top: 1px; color: var(--tk-text-3); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-record-arrow { color: var(--tk-text-3); font-size: 12px; }
.ai-chat-collection-input { min-height: 58px; }
.ai-chat-collection-input button { width: 38px; height: 36px; display: inline-flex; flex: none; align-items: center; justify-content: center; padding: 0; }
.ai-chat-collection-input button svg { width: 15px; height: 15px; }
.ai-chat-collection-input button span { display: none; }
@media (prefers-reduced-motion: reduce) { .ai-chat-typing.is-visible > span { animation: none; } }

/* Task manager */
.tk-task-page-header .tk-btn svg,.tk-task-toolbar svg { width:16px;height:16px }
.tk-task-toolbar { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px }
.tk-task-toolbar .tk-tabs { margin:0;overflow-x:auto }
.tk-task-list { display:grid;gap:8px }
.tk-task-row { background:var(--tk-surface);border:1px solid var(--tk-border);border-radius:10px;transition:border-color .18s ease,background .18s ease }
.tk-task-row:hover { border-color:var(--tk-border-strong);background:var(--tk-bg-2) }
.tk-task-row.is-overdue { border-left:3px solid var(--tk-danger) }
.tk-task-row.is-critical { border-left:3px solid #ef4444 }
.tk-task-row.is-urgent { border-left:3px solid #d97706 }
.tk-task-row-main { display:grid;grid-template-columns:10px minmax(220px,1fr) auto auto auto 20px;align-items:center;gap:14px;padding:14px 16px;color:var(--tk-text);text-decoration:none }
.tk-task-priority-dot { width:8px;height:8px;border-radius:50%;background:var(--tk-text-3) }
.tk-task-priority-dot.is-alta { background:#d97706 }.tk-task-priority-dot.is-urgente { background:var(--tk-danger) }.tk-task-priority-dot.is-baja { background:#94a3b8 }.tk-task-priority-dot.is-media { background:var(--tk-primary) }
.tk-task-row-copy { min-width:0 }.tk-task-row-title { display:block;overflow:hidden;font-size:14px;font-weight:700;text-overflow:ellipsis;white-space:nowrap }
.tk-task-row-meta { display:flex;flex-wrap:wrap;gap:10px;margin-top:4px;color:var(--tk-text-3);font-size:11px }.tk-task-row-meta span { display:inline-flex;align-items:center;gap:4px }.tk-task-row-meta svg { width:12px;height:12px }
.tk-task-chevron { width:16px;color:var(--tk-text-3) }
.tk-task-progress { min-width:112px }.tk-task-progress>span { display:block;height:5px;overflow:hidden;background:var(--tk-bg-3);border-radius:99px }.tk-task-progress>span i { display:block;height:100%;background:var(--tk-primary);border-radius:inherit }.tk-task-progress small { display:block;margin-top:4px;color:var(--tk-text-3);font-size:10px;text-align:right }
.tk-task-progress.is-large { min-width:0;margin-bottom:16px }.tk-task-progress.is-large>span { height:8px }
.tk-deadline-indicator { display:inline-flex;align-items:center;gap:6px;color:#a16207;font-size:11px;font-weight:700;white-space:nowrap }.tk-deadline-indicator.is-critical,.tk-deadline-indicator.is-overdue { color:var(--tk-danger) }.tk-deadline-indicator>span,.tk-pulse-dot { position:relative;display:inline-block;width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:#ef4444 }.tk-deadline-indicator>span:after,.tk-pulse-dot:after { position:absolute;inset:-4px;border:1px solid #ef4444;border-radius:50%;content:"";animation:tk-task-pulse 1.4s ease-out infinite }
@keyframes tk-task-pulse { 0%{opacity:.8;transform:scale(.5)} 100%{opacity:0;transform:scale(1.35)} }
.tk-gantt-card { overflow:hidden }.tk-gantt-head { display:grid;grid-template-columns:240px 1fr auto;gap:12px;padding:12px 16px;border-bottom:1px solid var(--tk-border);color:var(--tk-text-3);font-size:11px;font-weight:700;text-transform:uppercase }.tk-gantt-head span:nth-child(2){text-align:left}.tk-gantt-scroll { min-width:760px;overflow-x:auto }.tk-gantt-row { display:grid;grid-template-columns:240px minmax(500px,1fr);min-height:58px;border-bottom:1px solid var(--tk-border);color:var(--tk-text);text-decoration:none }.tk-gantt-row:hover { background:var(--tk-bg-2) }.tk-gantt-label { display:flex;min-width:0;flex-direction:column;justify-content:center;padding:10px 16px }.tk-gantt-label strong { overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap }.tk-gantt-label small { margin-top:2px;color:var(--tk-text-3);font-size:10px }.tk-gantt-row.is-subtask .tk-gantt-label { padding-left:34px }.tk-gantt-track { position:relative;margin:12px 16px;background:repeating-linear-gradient(90deg,transparent 0,transparent 9.8%,var(--tk-border) 10%) }.tk-gantt-bar { position:absolute;top:5px;height:24px;min-width:24px;border-radius:5px;background:var(--tk-primary);color:#fff }.tk-gantt-bar span { display:block;overflow:hidden;padding:5px 7px;font-size:9px;font-weight:700;text-overflow:ellipsis;white-space:nowrap }.tk-gantt-bar.is-urgent { background:#d97706 }.tk-gantt-bar.is-critical,.tk-gantt-bar.is-overdue { background:#dc2626 }.tk-gantt-bar.is-normal { background:#4f46e5 }
.tk-task-form-card { max-width:820px }.tk-task-detail-header { display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px;margin-bottom:14px;background:var(--tk-surface);border:1px solid var(--tk-border);border-radius:12px }.tk-task-detail-header.is-overdue,.tk-task-detail-header.is-critical { border-left:3px solid #ef4444 }.tk-task-detail-title { min-width:0 }.tk-task-detail-title h1 { margin:8px 0 5px;font-size:25px;line-height:1.2 }.tk-task-detail-title p { max-width:760px;margin:0;color:var(--tk-text-2);font-size:13px;white-space:pre-wrap }.tk-task-detail-actions { display:flex;align-items:flex-end;gap:8px }.tk-task-detail-actions form { margin:0 }.tk-task-detail-actions>div { display:grid;gap:5px }.tk-task-detail-actions .tk-btn:disabled { cursor:not-allowed;filter:grayscale(.35);opacity:.5 }.tk-task-blocked-copy { display:flex;align-items:center;justify-content:flex-end;gap:4px;color:var(--tk-danger);font-size:10px;font-weight:700 }.tk-task-blocked-copy svg { width:12px }
.tk-task-deadline-banner { display:flex;align-items:center;gap:9px;margin-bottom:14px;padding:11px 14px;border:1px solid #f3d391;border-radius:9px;background:#fffbeb;color:#92400e;font-size:12px }.tk-task-deadline-banner svg { width:16px }.tk-task-deadline-banner.is-critical,.tk-task-deadline-banner.is-overdue { border-color:#fecaca;background:#fef2f2;color:#b91c1c }
.tk-task-detail-grid { display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:14px;align-items:start }.tk-task-detail-main { display:grid;gap:14px }.tk-task-detail-aside { position:sticky;top:82px;display:grid;gap:12px }.tk-task-completion-value { font-size:20px;font-weight:800;color:var(--tk-primary) }
.tk-subtask-list { display:grid;gap:6px }.tk-subtask-row { display:grid;grid-template-columns:32px minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:10px;border:1px solid var(--tk-border);border-radius:8px }.tk-subtask-row.is-overdue,.tk-subtask-row.is-critical { border-color:#fecaca }.tk-subtask-row form { margin:0 }.tk-subtask-row>a { min-width:0;color:var(--tk-text);text-decoration:none }.tk-subtask-row>a strong,.tk-subtask-row>a span { display:block }.tk-subtask-row>a strong { font-size:13px }.tk-subtask-row>a span { margin-top:2px;color:var(--tk-text-3);font-size:10px }.tk-subtask-check { display:inline-flex;width:30px;height:30px;align-items:center;justify-content:center;border:0;background:transparent;color:var(--tk-primary) }.tk-subtask-check svg { width:18px }.tk-task-add-details { margin-top:12px;border-top:1px solid var(--tk-border) }.tk-task-add-details>summary { display:flex;align-items:center;gap:7px;padding:13px 0 0;color:var(--tk-primary);font-size:12px;font-weight:700;cursor:pointer;list-style:none }.tk-task-add-details>summary svg { width:15px }.tk-task-add-details>form { margin-top:14px;padding:14px;background:var(--tk-bg-2);border-radius:8px }
.tk-task-comments { display:grid;gap:15px }.tk-task-comments article { display:flex;gap:10px }.tk-task-comments article>div { min-width:0;flex:1 }.tk-task-comments header { display:flex;align-items:center;gap:8px }.tk-task-comments header strong { font-size:12px }.tk-task-comments time { color:var(--tk-text-3);font-size:10px }.tk-task-comments p { margin:5px 0 0;padding:10px 12px;background:var(--tk-bg-2);border-radius:8px;font-size:12px;line-height:1.55;overflow-wrap:anywhere }.tk-task-comments p a { color:var(--tk-primary);text-decoration:underline;text-underline-offset:2px }.tk-task-comment-form { display:grid;justify-items:end;gap:8px;margin-top:16px;padding-top:14px;border-top:1px solid var(--tk-border) }.tk-task-comment-form textarea { width:100% }
.tk-upload-dropzone { display:flex;align-items:center;gap:12px;padding:14px;border:1px dashed var(--tk-border-strong);border-radius:9px;background:var(--tk-bg-2) }.tk-upload-dropzone>svg { width:24px;color:var(--tk-primary) }.tk-upload-dropzone>span { min-width:0;flex:1 }.tk-upload-dropzone strong,.tk-upload-dropzone small { display:block }.tk-upload-dropzone strong { font-size:12px }.tk-upload-dropzone small { color:var(--tk-text-3);font-size:10px }.tk-upload-dropzone input[type=file] { max-width:220px;font-size:11px }.tk-task-documents { display:grid;margin-top:10px }.tk-task-documents>div { display:flex;align-items:center;gap:9px;padding:9px 0;border-top:1px solid var(--tk-border) }.tk-task-documents>div>svg { width:18px;color:var(--tk-text-3) }.tk-task-documents>div>span { min-width:0;flex:1 }.tk-task-documents strong,.tk-task-documents small { display:block }.tk-task-documents strong { overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap }.tk-task-documents small { color:var(--tk-text-3);font-size:10px }.tk-task-documents form { margin:0 }
.tk-task-audit-note { padding:12px 14px;color:var(--tk-text-3);font-size:11px }.tk-task-audit-note span,.tk-task-audit-note strong,.tk-task-audit-note small { display:block }.tk-task-audit-note strong { margin:3px 0;color:var(--tk-text);font-size:12px }
@media(max-width:1100px){.tk-task-row-main{grid-template-columns:10px minmax(180px,1fr) auto auto 20px}.tk-task-row-main>.tk-deadline-indicator{display:none}.tk-task-detail-grid{grid-template-columns:1fr}.tk-task-detail-aside{position:static}}
@media(max-width:760px){.tk-task-toolbar{align-items:stretch;flex-direction:column}.tk-task-row-main{grid-template-columns:10px minmax(0,1fr) auto 18px;gap:9px}.tk-task-row-main>.tk-task-progress,.tk-task-row-main>.tk-badge:first-of-type{display:none}.tk-task-detail-header{flex-direction:column}.tk-task-detail-actions{width:100%}.tk-task-detail-actions form,.tk-task-detail-actions button{flex:1;width:100%}.tk-subtask-row{grid-template-columns:28px minmax(0,1fr) auto}.tk-subtask-row>.tk-badge{display:none}.tk-upload-dropzone{align-items:stretch;flex-direction:column}.tk-upload-dropzone input[type=file]{max-width:100%}}
@media(prefers-reduced-motion:reduce){.tk-deadline-indicator>span:after,.tk-pulse-dot:after{animation:none}}

/* ---------- Dashboard ---------- */
.tk-dashboard-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px;
}
.tk-page-eyebrow {
  margin: 0 0 4px; color: var(--tk-text-3); font-size: 11px; font-weight: var(--tk-fw-bold);
  letter-spacing: 0.07em; text-transform: uppercase;
}
.tk-page-subtitle { margin: 7px 0 0; color: var(--tk-text-2); font-size: 13.5px; }
.tk-dashboard-actions { display: flex; align-items: center; gap: 8px; }
.tk-upgrade-note {
  display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 12px;
  margin-bottom: 18px; padding: 12px 14px; border: 1px solid #D8DBFD; border-left: 3px solid var(--tk-primary);
  border-radius: var(--tk-radius-md); background: var(--tk-primary-soft);
}
.tk-upgrade-note-icon {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--tk-radius-sm); background: #fff; color: var(--tk-primary);
}
.tk-upgrade-note-icon svg { width: 16px; height: 16px; }
.tk-upgrade-note strong { display: block; margin-bottom: 1px; font-size: 13.5px; }
.tk-upgrade-note p { margin: 0; color: var(--tk-text-2); font-size: 12px; }
.tk-upgrade-note a { color: var(--tk-primary); font-size: 12.5px; font-weight: var(--tk-fw-bold); text-decoration: none; }

.tk-dashboard-panel { overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-lg); background: #fff; }
.tk-dashboard-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 18px; }
.tk-dashboard-metric { min-width: 0; padding: 18px 20px 17px; border-right: 1px solid var(--tk-border); }
.tk-dashboard-metric:last-child { border-right: 0; }
.tk-dashboard-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.tk-dashboard-metric-label { overflow: hidden; color: var(--tk-text-2); font-size: 12px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-dashboard-metric-icon {
  width: 26px; height: 26px; display: inline-flex; flex: none; align-items: center; justify-content: center;
  border-radius: 6px; background: var(--tk-bg-2); color: var(--tk-text-2);
}
.tk-dashboard-metric-icon svg { width: 14px; height: 14px; }
.tk-dashboard-metric-value { font-size: 29px; font-weight: var(--tk-fw-bold); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.025em; }
.tk-dashboard-metric-detail { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--tk-text-3); font-size: 11.5px; }
.tk-dashboard-metric-detail .is-positive { color: var(--tk-success); font-weight: var(--tk-fw-bold); }
.tk-dashboard-metric-detail .is-warning { color: var(--tk-warning); font-weight: var(--tk-fw-bold); }
.tk-dashboard-metric-detail .is-danger { color: var(--tk-danger); font-weight: var(--tk-fw-bold); }

.tk-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(310px,0.75fr); gap: 18px; align-items: start; }
.tk-dashboard-side { display: flex; min-width: 0; flex-direction: column; gap: 18px; }
.tk-dashboard-panel-header {
  min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 18px; border-bottom: 1px solid var(--tk-border);
}
.tk-dashboard-panel-title { margin: 0; font-size: 15px; font-weight: var(--tk-fw-bold); }
.tk-dashboard-panel-description { margin: 2px 0 0; color: var(--tk-text-3); font-size: 11.5px; }
.tk-dashboard-link { color: var(--tk-primary); font-size: 12px; font-weight: var(--tk-fw-bold); text-decoration: none; white-space: nowrap; }
.tk-dashboard-link:hover { color: var(--tk-primary-hover); }

.tk-pipeline-summary { display: grid; grid-template-columns: minmax(0,1fr) 156px; gap: 24px; padding: 18px; }
.tk-stage-list { display: flex; flex-direction: column; gap: 13px; }
.tk-stage-row { display: grid; grid-template-columns: 104px minmax(100px,1fr) 30px; align-items: center; gap: 11px; }
.tk-stage-name { overflow: hidden; color: var(--tk-text-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tk-stage-track { height: 7px; overflow: hidden; border-radius: 3px; background: var(--tk-bg-hover); }
.tk-stage-fill { height: 100%; border-radius: 3px; background: var(--tk-primary); }
.tk-stage-fill.is-muted { background: #9EA4B6; }
.tk-stage-fill.is-success { background: var(--tk-success); }
.tk-stage-fill.is-danger { background: var(--tk-danger); }
.tk-stage-count { font-size: 12px; font-weight: var(--tk-fw-bold); text-align: right; }
.tk-conversion-box { display: flex; flex-direction: column; justify-content: center; padding-left: 20px; border-left: 1px solid var(--tk-border); }
.tk-conversion-label { color: var(--tk-text-2); font-size: 11.5px; font-weight: var(--tk-fw-semibold); }
.tk-conversion-value { margin: 4px 0 6px; font-size: 34px; font-weight: var(--tk-fw-bold); line-height: 1.1; letter-spacing: -0.03em; }
.tk-conversion-copy { color: var(--tk-text-3); font-size: 11px; }
.tk-conversion-copy strong { color: var(--tk-success); }

.tk-dashboard-list { padding: 4px 18px 8px; }
.tk-dashboard-list-item {
  display: grid; grid-template-columns: 18px minmax(0,1fr) auto; align-items: start; gap: 10px;
  padding: 13px 0; border-bottom: 1px solid var(--tk-border);
}
.tk-dashboard-list-item:last-child { border-bottom: 0; }
.tk-dashboard-list-icon {
  width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
  border: 1px solid var(--tk-border-strong); border-radius: 4px; color: var(--tk-text-3);
}
.tk-dashboard-list-icon svg { width: 11px; height: 11px; }
.tk-dashboard-list-title { overflow: hidden; font-size: 12.5px; font-weight: var(--tk-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }
.tk-dashboard-list-meta { margin-top: 3px; color: var(--tk-text-3); font-size: 11px; }
.tk-dashboard-status { padding: 3px 7px; border-radius: 5px; font-size: 10.5px; font-weight: var(--tk-fw-bold); white-space: nowrap; }
.tk-dashboard-status.is-today { background: var(--tk-warning-soft); color: var(--tk-warning); }
.tk-dashboard-status.is-next { background: var(--tk-bg-2); color: var(--tk-text-2); }
.tk-dashboard-status.is-overdue { background: var(--tk-danger-soft); color: var(--tk-danger); }
.tk-dashboard-call-status { align-self: center; }

.tk-dashboard-activity { grid-column: 1 / -1; }
.tk-dashboard-table-wrap { overflow-x: auto; }
.tk-dashboard-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tk-dashboard-table th {
  padding: 10px 18px; border-bottom: 1px solid var(--tk-border); background: var(--tk-bg-2); color: var(--tk-text-3);
  font-size: 10.5px; font-weight: var(--tk-fw-bold); letter-spacing: 0.05em; text-align: left; text-transform: uppercase; white-space: nowrap;
}
.tk-dashboard-table td { padding: 13px 18px; border-bottom: 1px solid var(--tk-border); vertical-align: middle; white-space: nowrap; }
.tk-dashboard-table tr:last-child td { border-bottom: 0; }
.tk-dashboard-table tbody tr:hover { background: #FAFBFD; }
.tk-dashboard-person { display: flex; align-items: center; gap: 9px; min-width: 190px; }
.tk-dashboard-person-avatar {
  width: 28px; height: 28px; display: inline-flex; flex: none; align-items: center; justify-content: center;
  border-radius: var(--tk-radius-sm); background: var(--tk-primary-soft); color: var(--tk-primary); font-size: 10px; font-weight: var(--tk-fw-bold);
}
.tk-dashboard-person-name { font-weight: var(--tk-fw-semibold); }
.tk-dashboard-activity-type { display: inline-flex; align-items: center; gap: 7px; }
.tk-dashboard-activity-type svg { width: 14px; height: 14px; color: var(--tk-text-3); }
.tk-dashboard-table-muted { color: var(--tk-text-3); }
.tk-dashboard-mobile-meta { display: none; }
.tk-dashboard-empty { padding: 30px 18px; color: var(--tk-text-3); font-size: 12.5px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .tk-settings-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-lead-detail-grid { grid-template-columns: 1fr; }
  .tk-lead-activity { position: static; max-height: none; }
  .tk-lead-activity-card { max-height: none; }
  .tk-dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-dashboard-metric:nth-child(2) { border-right: 0; }
  .tk-dashboard-metric:nth-child(-n+2) { border-bottom: 1px solid var(--tk-border); }
  .tk-dashboard-grid { grid-template-columns: 1fr; }
  .tk-dashboard-activity { grid-column: auto; }
  .tk-webhook-setup-grid { grid-template-columns: 1fr; }
  .tk-webhook-guide { position: static; }
  .tk-webhook-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-webhook-metric:nth-child(2) { border-right: 0; }
  .tk-webhook-metric:nth-child(-n+2) { border-bottom: 1px solid var(--tk-border); }
}

@media (max-width: 760px) {
  .tk-customer-hero { align-items: flex-start; flex-direction: column; padding: 15px; }
  .tk-customer-actions { width: 100%; justify-content: flex-start; }
  .tk-customer-actions .tk-btn { flex: 1; justify-content: center; }
  .tk-customer-actions form { display: flex; flex: 1; }
  .tk-customer-actions form .tk-btn { width: 100%; }
  .tk-customer-contact-grid, .tk-customer-management-grid, .tk-customer-products { grid-template-columns: 1fr; }
  .tk-customer-contact-item.is-wide, .tk-customer-notes, .tk-customer-origin { grid-column: auto; }
  .tk-customer-associate-form { grid-template-columns: 1fr; }
  .tk-customer-associate-form .tk-btn { width: 100%; }
}

@media (max-width: 1000px) {
  .tk-template-workspace, .tk-billing-detail-grid { grid-template-columns: 1fr; }
  .tk-template-preview-pane { position: static; }
  .tk-template-preview-stage { min-height: 390px; }
  .tk-record-summary.is-billing { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-record-summary.is-billing .tk-record-stat:nth-child(2) { border-right: 0; }
  .tk-record-summary.is-billing .tk-record-stat:nth-child(-n+2) { border-bottom: 1px solid var(--tk-border); }
  .tk-billing-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-billing-metric:nth-child(2) { border-right: 0; }
  .tk-billing-metric:nth-child(-n+2) { border-bottom: 1px solid var(--tk-border); }
}

@media (max-width: 860px) {
  .tk-sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform 180ms ease; }
  .tk-app.is-sidebar-open .tk-sidebar { transform: translateX(0); }
  .tk-app.is-sidebar-open .tk-sidebar-backdrop { display: block; }
  .tk-menu-button { display: inline-flex; }
  .tk-mobile-brand { display: flex; }
  .tk-topbar { padding: 0 18px; }
  .tk-topbar-search { width: min(330px,48vw); }
  .tk-app-content { padding: 26px 20px 42px; }
  .tk-settings-grid, .tk-settings-security, .tk-report-grid, .tk-pipeline-settings-layout { grid-template-columns: 1fr; }
  .tk-report-card.is-wide { grid-column: auto; }
  .tk-report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-report-metric:nth-child(2) { border-right: 0; }
  .tk-report-metric:nth-child(-n+2) { border-bottom: 1px solid var(--tk-border); }
  .tk-call-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-call-metric:nth-child(2) { border-right: 0; }
  .tk-call-metric:nth-child(-n+2) { border-bottom: 1px solid var(--tk-border); }
  .tk-record-summary { grid-template-columns: 1fr; }
  .tk-record-stat { min-height: 0; border-right: 0; border-bottom: 1px solid var(--tk-border); }
  .tk-record-stat:last-child { border-bottom: 0; }
}

@media (max-width: 900px) {
  .tk-api-management-grid, .tk-api-docs-grid { grid-template-columns: 1fr; }
  .tk-api-security-card { align-items: center; }
  .tk-api-code-panel { min-height: 340px; }
}

@media (max-width: 640px) {
  :root { --tk-fs-h1: 24px; --tk-fs-h2: 20px; --tk-fs-metric: 26px; }
  .tk-topbar { height: 60px; gap: 10px; padding: 0 14px; }
  .tk-mobile-brand img { width: 88px; }
  .tk-topbar-search, .tk-plan-badge { display: none; }
  .tk-topbar-search.is-mobile-open { position: absolute; top: 10px; right: 14px; left: 14px; z-index: 130; display: flex; width: auto; background: #fff; }
  .tk-topbar-search.is-mobile-open .tk-keycap { display: none; }
  .tk-topbar-search.is-mobile-open .tk-search-close { display: inline-flex; }
  .tk-topbar-search.is-mobile-open .tk-search-results { max-height: calc(100vh - 76px); }
  .tk-mobile-search-button { display: flex !important; }
  .tk-app-content { padding: 22px 14px 36px; }
  .tk-page-header { flex-direction: column; gap: 12px; align-items: stretch; }
  .tk-page-header-actions, .tk-page-header > div[style*="display:flex"] { display: flex; width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .tk-page-header .tk-btn { font-size: 12px; }
  .tk-leads-commandbar { align-items: stretch; flex-direction: column; gap: 12px; padding: 10px; }
  .tk-leads-command-section { width: 100%; align-items: stretch; flex-direction: column; gap: 6px; }
  .tk-leads-command-section.is-data { margin-left: 0; }
  .tk-view-switch { display: flex; }
  .tk-view-switch-item { flex: 1; justify-content: center; }
  .tk-leads-data-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-leads-data-action { min-width: 0; }
  .tk-kanban-toolbar { align-items: flex-start; gap: 10px; }
  .tk-kanban-guide { padding-top: 7px; line-height: 1.35; }
  .tk-kanban-keyboard-hint, .tk-kanban-scroll-hint { display: none; }
  .tk-kanban-scroll-nav button { width: 34px; height: 34px; }
  .tk-leads-kanban .tk-kanban-col { width: min(82vw,280px); }
  .tk-kanban-cards { max-height: min(440px,calc(100vh - 310px)); }
  .tk-call-metric { padding: 14px; }
  .tk-call-list-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .tk-btn-mobile-block { width: 100%; }
  .tk-template-meta-grid, .tk-template-meta-grid.has-status, .tk-billing-form-grid, .tk-cfdi-upload-grid { grid-template-columns: 1fr; }
  .tk-template-ai-options { grid-template-columns: 1fr; }
  .tk-template-ai-actions { align-items: stretch; flex-direction: column; }
  .tk-template-ai-actions .tk-btn { width: 100%; }
  .tk-template-confirm { padding: 12px; }
  .tk-template-confirm .tk-modal-footer { align-items: stretch; flex-direction: column-reverse; }
  .tk-template-confirm .tk-modal-footer .tk-btn { width: 100%; }
  .tk-distribution-layout, .tk-reassignment-layout { grid-template-columns: 1fr; }
  .tk-distribution-options { grid-template-columns: 1fr; }
  .tk-distribution-summary { position: static; }
  .tk-reassignment-card { grid-template-columns: 34px minmax(0,1fr); }
  .tk-reassignment-card-icon { width: 34px; height: 34px; }
  .tk-reassignment-card-actions { grid-column: 2; }
  .tk-automation-section-heading { align-items: flex-start; }
  .tk-billing-form-grid .is-wide { grid-column: auto; }
  .tk-template-form-footer, .tk-cfdi-upload-actions { align-items: stretch; flex-direction: column; }
  .tk-template-form-footer .tk-btn, .tk-cfdi-upload-actions .tk-btn { width: 100%; }
  .tk-template-preview-stage { min-height: 350px; padding: 18px 12px; }
  .tk-wysiwyg-editor { min-height: 260px; }
  .tk-wysiwyg-insert-grid { grid-template-columns: 1fr; }
  .tk-wysiwyg-insert-actions { align-items: stretch; flex-direction: column; }
  .tk-wysiwyg-insert-actions .tk-check, .tk-wysiwyg-insert-error { margin-right: 0; }
  .tk-wysiwyg-insert-actions .tk-btn { width: 100%; }
  .tk-file-upload { grid-template-columns: 36px minmax(0,1fr); }
  .tk-file-upload-action { display: none; }
  .tk-document-upload-form { align-items: stretch; flex-direction: column; }
  .tk-document-upload-form .tk-btn { width: 100%; }
  .tk-billing-list-heading { align-items: flex-start; flex-direction: column; }
  .tk-api-secret { grid-template-columns: 38px minmax(0,1fr); }
  .tk-api-secret-icon { width: 38px; height: 38px; }
  .tk-api-secret > .tk-btn { grid-column: 2; justify-self: start; }
  .tk-api-overview { grid-template-columns: 1fr; }
  .tk-api-overview article { border-right: 0; border-bottom: 1px solid var(--tk-border); }
  .tk-api-overview article:last-child { border-bottom: 0; }
  .tk-api-create-form { grid-template-columns: 1fr; }
  .tk-api-create-form .tk-btn { width: 100%; }
  .tk-api-docs { padding: 17px 14px; }
  .tk-api-docs-heading { flex-direction: column; }
  .tk-api-docs-heading h2 { font-size: 18px; }
  .tk-api-code-topbar { align-items: stretch; flex-direction: column; }
  .tk-api-code-copy { align-self: flex-end; }
  .tk-api-code-panel { min-height: 360px; padding: 14px; font-size: 9px; }
  .tk-api-code-footer { align-items: flex-start; flex-direction: column; }
  .tk-api-fields-section, .tk-api-endpoints-section { grid-template-columns: 1fr; }
  .tk-api-fields-grid, .tk-api-endpoints-list { grid-template-columns: 1fr; }
  .tk-webhook-secret { grid-template-columns: 38px minmax(0,1fr); }
  .tk-webhook-secret-icon { width: 38px; height: 38px; }
  .tk-webhook-secret > .tk-btn { grid-column: 2; justify-self: start; }
  .tk-webhook-form-grid, .tk-webhook-event-groups, .tk-webhook-event-group:first-child .tk-webhook-event-list, .tk-webhook-list { grid-template-columns: 1fr; }
  .tk-webhook-event-group:first-child { grid-column: auto; }
  .tk-webhook-form-footer { align-items: stretch; flex-direction: column; }
  .tk-webhook-form-footer .tk-btn { width: 100%; }
  .tk-webhook-list-heading { align-items: flex-start; flex-direction: column; }
  .tk-webhook-endpoint-footer { align-items: stretch; flex-direction: column; }
  .tk-webhook-endpoint-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tk-webhook-endpoint-actions .tk-btn { width: 100%; }
  .tk-detail-grid { grid-template-columns: 1fr !important; }
  .tk-detail-grid > div[style*="position:sticky"] { position: static !important; max-height: none !important; }
  .tk-card-header { flex-wrap: wrap; }
  form[style*="display:flex"] { flex-wrap: wrap; }
  input.tk-input, select.tk-select, textarea.tk-textarea { max-width: 100%; box-sizing: border-box; font-size: 14px; }
  .tk-filterbar { align-items: stretch; padding: 10px; }
  .tk-filterbar > *, .tk-filterbar .tk-input-wrap, .tk-filterbar .tk-select { width: 100%; min-width: 0; }
  .tk-form-row { align-items: stretch; flex-direction: column; }
  .tk-settings-links { grid-template-columns: 1fr; }
  .tk-settings-security { gap: 18px; }
  .tk-report-filter { width: 100%; }
  .tk-report-filter .tk-field { width: 100%; }
  .tk-report-metric { padding: 15px; }
  .tk-pipeline-sidebar { display: grid; grid-template-columns: 1fr; }
  .tk-detail-list { grid-template-columns: 1fr; gap: 14px; }
  .tk-lead-comment form { flex-direction: column; }
  .tk-lead-comment .tk-btn { align-self: flex-start; }
  #ai-chat-widget { right: 14px; bottom: 14px; }
  #ai-chat-panel { right: 16px; bottom: 68px; }
  #ai-chat-panel.is-collection { right: 10px; bottom: 66px; width: calc(100vw - 20px); height: min(620px,calc(100vh - 78px)); max-width: none; }

  .tk-dashboard-heading { align-items: stretch; flex-direction: column; gap: 16px; }
  .tk-dashboard-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tk-dashboard-actions .tk-btn { width: 100%; }
  .tk-upgrade-note { grid-template-columns: 28px minmax(0,1fr); }
  .tk-upgrade-note > a { grid-column: 2; }
  .tk-dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .tk-dashboard-metric { padding: 15px; }
  .tk-dashboard-metric-value { font-size: 25px; }
  .tk-dashboard-metric-detail { align-items: flex-start; flex-direction: column; gap: 1px; }
  .tk-pipeline-summary { grid-template-columns: 1fr; gap: 18px; }
  .tk-conversion-box { padding: 16px 0 0; border-top: 1px solid var(--tk-border); border-left: 0; }
  .tk-stage-row { grid-template-columns: 88px minmax(84px,1fr) 24px; gap: 8px; }
  .tk-dashboard-table { table-layout: fixed; }
  .tk-dashboard-table th, .tk-dashboard-table td { padding-right: 14px; padding-left: 14px; white-space: normal; }
  .tk-dashboard-table th:first-child { width: 43%; }
  .tk-dashboard-table th:nth-child(n+3), .tk-dashboard-table td:nth-child(n+3) { display: none; }
  .tk-dashboard-person { min-width: 0; }
  .tk-dashboard-person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tk-dashboard-activity-type { align-items: flex-start; }
  .tk-dashboard-mobile-meta { display: block; margin-top: 3px; color: var(--tk-text-3); font-size: 10.5px; }

  /* Tabla → cards */
  .tk-table-responsive .tk-table thead { display: none; }
  .tk-table-responsive .tk-table, .tk-table-responsive .tk-table tbody, .tk-table-responsive .tk-table tr, .tk-table-responsive .tk-table td { display: block; width: 100%; box-sizing: border-box; }
  .tk-table-responsive .tk-table tr { border-bottom: 1px solid var(--tk-border); padding: 8px 0; }
  .tk-table-responsive .tk-table td { border: none; padding: 4px 16px; }
  .tk-table-responsive .tk-table td[data-th]::before { content: attr(data-th); display: block; font-size: 11px; font-weight: var(--tk-fw-semibold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--tk-text-3); }
}

@media (max-width: 420px) {
  .tk-mobile-brand img { width: 82px; }
  .tk-dashboard-actions { grid-template-columns: 1fr; }
  .tk-dashboard-metrics { grid-template-columns: 1fr; }
  .tk-dashboard-metric { border-right: 0; border-bottom: 1px solid var(--tk-border); }
  .tk-dashboard-metric:nth-child(3) { border-bottom: 1px solid var(--tk-border); }
  .tk-dashboard-metric:last-child { border-bottom: 0; }
  .tk-dashboard-metric-detail { flex-direction: row; gap: 6px; }
  .tk-report-metrics { grid-template-columns: 1fr; }
  .tk-report-metric { border-right: 0; border-bottom: 1px solid var(--tk-border); }
  .tk-report-metric:last-child { border-bottom: 0; }
}

/* Product catalogs */
.tk-eyebrow { color: var(--tk-primary); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.tk-back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 9px; color: var(--tk-text-2); font-size: 13px; font-weight: 650; text-decoration: none; }
.tk-back-link:hover { color: var(--tk-primary); }
.tk-back-link svg, .tk-page-header-actions svg, .tk-btn svg { width: 16px; height: 16px; }
.tk-icon-action { display: inline-grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-md); background: var(--tk-bg-1); color: var(--tk-text-2); cursor: pointer; text-decoration: none; }
.tk-icon-action:hover { border-color: var(--tk-border-strong); color: var(--tk-primary); }
.tk-icon-action svg { width: 16px; height: 16px; }
.tk-empty-state { display: flex; min-height: 280px; padding: 44px 24px; align-items: center; justify-content: center; flex-direction: column; border: 1px dashed var(--tk-border-strong); border-radius: var(--tk-radius-lg); background: var(--tk-bg-1); text-align: center; }
.tk-empty-state > svg { width: 34px; height: 34px; margin-bottom: 14px; color: var(--tk-primary); }
.tk-empty-state h2 { margin: 0 0 6px; font-size: 18px; }
.tk-empty-state p { max-width: 430px; margin: 0 0 20px; color: var(--tk-text-2); }

.tk-catalog-onboarding { max-width: 1080px; margin: 12px auto 50px; }
.tk-catalog-intro { max-width: 680px; margin: 0 auto 28px; text-align: center; }
.tk-catalog-intro h1 { margin: 8px 0; font-size: clamp(26px, 3vw, 36px); }
.tk-catalog-intro p { margin: 0; color: var(--tk-text-2); font-size: 15px; }
.tk-catalog-options { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.tk-catalog-option { cursor: pointer; }
.tk-catalog-option > input { position: absolute; opacity: 0; pointer-events: none; }
.tk-catalog-option-body { position: relative; display: flex; min-height: 292px; box-sizing: border-box; padding: 22px; flex-direction: column; border: 1px solid var(--tk-border); border-radius: 16px; background: var(--tk-bg-1); transition: border-color .15s ease, transform .15s ease; }
.tk-catalog-option:hover .tk-catalog-option-body { border-color: var(--tk-border-strong); transform: translateY(-2px); }
.tk-catalog-option input:checked + .tk-catalog-option-body { border: 2px solid var(--tk-primary); padding: 21px; }
.tk-catalog-icon { display: grid; width: 42px; height: 42px; margin-bottom: 24px; place-items: center; border-radius: 11px; background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-catalog-icon svg { width: 21px; height: 21px; }
.tk-catalog-option-check { position: absolute; top: 18px; right: 18px; display: none; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: var(--tk-primary); color: white; }
.tk-catalog-option-check svg { width: 14px; }
.tk-catalog-option input:checked + .tk-catalog-option-body .tk-catalog-option-check { display: grid; }
.tk-catalog-option strong { font-size: 18px; }
.tk-catalog-description { min-height: 64px; margin-top: 7px; color: var(--tk-text-2); font-size: 13px; line-height: 1.55; }
.tk-catalog-features { display: flex; margin-top: auto; padding-top: 17px; gap: 8px; flex-direction: column; border-top: 1px solid var(--tk-border); }
.tk-catalog-features span { display: flex; gap: 8px; align-items: center; color: var(--tk-text-2); font-size: 12px; }
.tk-catalog-features svg { width: 14px; height: 14px; color: var(--tk-success); }
.tk-catalog-lock-notice { display: grid; max-width: 720px; margin: 22px auto 12px; padding: 15px 17px; grid-template-columns: 26px 1fr; gap: 12px; border: 1px solid #ead8b4; border-radius: var(--tk-radius-lg); background: var(--tk-warning-soft); color: #704216; }
.tk-catalog-lock-notice svg { width: 20px; height: 20px; }
.tk-catalog-lock-notice div { display: flex; gap: 2px; flex-direction: column; }
.tk-catalog-lock-notice span { font-size: 12px; line-height: 1.45; }
.tk-check-row { display: flex; width: fit-content; margin: 14px auto 18px; gap: 9px; align-items: flex-start; color: var(--tk-text-2); font-size: 13px; cursor: pointer; }
.tk-check-row input { margin-top: 2px; accent-color: var(--tk-primary); }
.tk-catalog-form > .tk-btn { display: flex; margin: 0 auto; }
.tk-settings-locked-value { display:flex; min-height:46px; padding:10px 12px; box-sizing:border-box; align-items:flex-start; gap:10px; border:1px solid var(--tk-border); border-radius:var(--tk-radius-md); background:var(--tk-bg-2); }
.tk-settings-locked-value > svg { width:17px; height:17px; margin-top:2px; color:var(--tk-text-3); }.tk-settings-locked-value > span { display:flex; flex-direction:column; }.tk-settings-locked-value strong { font-size:13px; }.tk-settings-locked-value small { color:var(--tk-text-3); font-size:11px; }

.tk-product-title-row { display: flex; align-items: center; gap: 13px; }
.tk-product-catalog-mark { display: grid; width: 46px; height: 46px; flex: none; place-items: center; border-radius: 12px; background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-product-catalog-mark svg { width: 22px; height: 22px; }
.tk-product-filterbar .tk-input-wrap { min-width: min(420px, 100%); }
.tk-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.tk-product-card { overflow: hidden; border: 1px solid var(--tk-border); border-radius: 14px; background: var(--tk-bg-1); transition: border-color .15s ease, transform .15s ease; }
.tk-product-card:hover { border-color: var(--tk-border-strong); transform: translateY(-2px); }
.tk-product-card-media { position: relative; display: block; height: 190px; overflow: hidden; background: var(--tk-bg-2); }
.tk-product-card-media > img { width: 100%; height: 100%; object-fit: cover; }
.tk-product-card-media > span:not(.tk-badge) { display: grid; width: 100%; height: 100%; place-items: center; color: var(--tk-text-3); }
.tk-product-card-media > span svg { width: 28px; height: 28px; }
.tk-product-card-media .tk-badge { position: absolute; top: 11px; right: 11px; }
.tk-product-card-body { padding: 16px; }
.tk-product-card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--tk-text-3); font-size: 11px; font-weight: 650; letter-spacing: .035em; text-transform: uppercase; }
.tk-product-card h2 { margin: 7px 0 10px; font-size: 17px; line-height: 1.25; }
.tk-product-card h2 a { color: inherit; text-decoration: none; }
.tk-product-card-facts { display: flex; min-height: 20px; gap: 13px; color: var(--tk-text-2); font-size: 12px; }
.tk-product-card-facts span { display: flex; align-items: center; gap: 5px; }
.tk-product-card-facts svg { width: 14px; height: 14px; }
.tk-product-card-footer { display: flex; margin-top: 14px; padding-top: 13px; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--tk-border); }
.tk-product-card-footer > strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.tk-product-empty { min-height: 370px; }
.tk-pagination { display: flex; margin-top: 20px; gap: 4px; justify-content: center; }

.tk-product-form { display: grid; grid-template-columns: minmax(0, 1fr) 252px; align-items: start; gap: 18px; }
.tk-product-form-main { display: flex; min-width: 0; gap: 16px; flex-direction: column; }
.tk-form-section { padding: 22px; border: 1px solid var(--tk-border); border-radius: 14px; background: var(--tk-bg-1); }
.tk-form-section > h2 { margin: 0 0 16px; font-size: 17px; }
.tk-form-section-heading { display: flex; margin-bottom: 20px; align-items: flex-start; gap: 11px; }
.tk-form-section-heading > span { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border-radius: 9px; background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-form-section-heading > span svg { width: 17px; height: 17px; }
.tk-form-section-heading h2 { margin: 0; font-size: 16px; }
.tk-form-section-heading p { margin: 3px 0 0; color: var(--tk-text-2); font-size: 12px; }
.tk-form-section-heading > .tk-btn { margin-left: auto; }
.tk-form-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 14px; }
.tk-col-12 { grid-column: span 12; }.tk-col-8 { grid-column: span 8; }.tk-col-6 { grid-column: span 6; }.tk-col-5 { grid-column: span 5; }.tk-col-4 { grid-column: span 4; }.tk-col-3 { grid-column: span 3; }
.tk-product-form-aside { min-width: 0; align-self: stretch; }
.tk-form-sticky { position: sticky; top: 16px; padding: 18px; border: 1px solid var(--tk-border); border-radius: 14px; background: var(--tk-bg-1); }
.tk-form-sticky > h3 { margin: 0 0 16px; font-size: 15px; }
.tk-form-sticky > .tk-btn { margin-top: 9px; }
.tk-catalog-locked { display: flex; margin: 17px 0 7px; padding: 12px 0; align-items: flex-start; gap: 9px; border-top: 1px solid var(--tk-border); border-bottom: 1px solid var(--tk-border); }
.tk-catalog-locked > svg { width: 16px; color: var(--tk-text-3); }
.tk-catalog-locked span { display: flex; flex-direction: column; }
.tk-catalog-locked strong { font-size: 12px; }.tk-catalog-locked small { color: var(--tk-text-3); font-size: 11px; }
.tk-sku-auto-preview { display:grid; min-height:40px; padding:7px 11px; box-sizing:border-box; grid-template-columns:18px auto; column-gap:8px; align-items:center; border:1px solid var(--tk-border); border-radius:var(--tk-radius-md); background:var(--tk-bg-2); }
.tk-sku-auto-preview > svg { width:16px; height:16px; grid-row:span 2; color:var(--tk-primary); }.tk-sku-auto-preview strong { align-self:end; font-size:13px; letter-spacing:.04em; }.tk-sku-auto-preview span { align-self:start; color:var(--tk-text-3); font-size:9px; }.tk-sku-auto-preview.is-pending strong { color:var(--tk-text-2); }
.tk-product-errors { display: flex; margin-bottom: 16px; gap: 10px; }
.tk-product-errors > svg { width: 19px; flex: none; }
.tk-product-errors ul { margin: 5px 0 0; padding-left: 18px; font-size: 12px; }
.tk-photo-dropzone { display: flex; min-height: 138px; align-items: center; justify-content: center; flex-direction: column; border: 1px dashed var(--tk-border-strong); border-radius: 11px; background: var(--tk-bg-2); color: var(--tk-text-2); cursor: pointer; }
.tk-photo-dropzone:hover { border-color: var(--tk-primary); }
.tk-photo-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tk-photo-dropzone > svg { width: 24px; margin-bottom: 7px; color: var(--tk-primary); }
.tk-photo-dropzone strong { font-size: 13px; }.tk-photo-dropzone span { margin-top: 3px; color: var(--tk-text-3); font-size: 11px; }
.tk-photo-existing,.tk-photo-preview { display: grid; margin-bottom: 12px; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.tk-photo-existing-item,.tk-photo-preview-item { position: relative; overflow: hidden; aspect-ratio: 1.25; border: 1px solid var(--tk-border); border-radius: 9px; background: var(--tk-bg-2); }
.tk-photo-existing-item img,.tk-photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.tk-photo-existing-item input { position: absolute; opacity: 0; }
.tk-photo-existing-item > span { position: absolute; right: 5px; bottom: 5px; display: flex; padding: 4px 6px; gap: 4px; align-items: center; border-radius: 6px; background: rgba(20,25,32,.78); color: white; font-size: 10px; cursor: pointer; }
.tk-photo-existing-item > span svg { width: 11px; height: 11px; }.tk-photo-existing-item.is-removed img { opacity: .25; }.tk-photo-existing-item.is-removed > span { background: var(--tk-danger); }
.tk-photo-preview { margin: 10px 0 0; }
.tk-operation-options,.tk-amenities-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.tk-amenities-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.tk-operation-options label,.tk-amenities-grid label { position: relative; }
.tk-operation-options input,.tk-amenities-grid input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tk-operation-options label span,.tk-amenities-grid label span { display: flex; min-height: 40px; box-sizing: border-box; padding: 8px 11px; align-items: center; gap: 7px; border: 1px solid var(--tk-border); border-radius: 9px; color: var(--tk-text-2); font-size: 12px; cursor: pointer; }
.tk-operation-options span svg,.tk-amenities-grid span svg { width: 14px; height: 14px; opacity: .35; }
.tk-operation-options input:checked+span,.tk-amenities-grid input:checked+span { border-color: var(--tk-primary); background: var(--tk-primary-soft); color: var(--tk-primary); font-weight: 650; }
.tk-operation-options input:checked+span svg,.tk-amenities-grid input:checked+span svg { opacity: 1; }
.tk-operation-prices { display: flex; margin-top: 15px; gap: 12px; flex-direction: column; }
.tk-location-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,.8fr); gap: 15px; }
.tk-map-preview { display: flex; min-height: 180px; align-items: center; justify-content: center; flex-direction: column; overflow: hidden; border: 1px solid var(--tk-border); border-radius: 10px; background: var(--tk-bg-2); color: var(--tk-text-3); font-size: 11px; text-align: center; }
.tk-map-preview > svg { width: 26px; margin-bottom: 7px; }.tk-map-preview iframe { width: 100%; height: 100%; min-height: 180px; border: 0; }
.tk-switch-row { position: relative; display: flex; align-items: center; gap: 11px; cursor: pointer; }.tk-switch-row input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tk-switch { position: relative; width: 38px; height: 22px; flex: none; border-radius: 20px; background: var(--tk-border-strong); }.tk-switch::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; content: ''; transition: transform .15s; }.tk-switch-row input:checked+.tk-switch { background: var(--tk-primary); }.tk-switch-row input:checked+.tk-switch::after { transform: translateX(16px); }.tk-switch-row > span:last-child { display:flex; flex-direction:column; }.tk-switch-row small { color:var(--tk-text-3); font-size:11px; }
#financing-panel { max-width: 240px; margin-top: 15px; }
.tk-variation-list { display: flex; gap: 8px; flex-direction: column; }.tk-variation-row { display: grid; grid-template-columns: .8fr 1fr .9fr 80px 90px 36px; gap: 7px; }.tk-variation-row .tk-input { min-width: 0; }

.tk-product-show-title { display: flex; align-items: center; gap: 10px; }.tk-product-show-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; align-items: start; gap: 18px; }.tk-product-show-layout main { display:flex; min-width:0; gap:16px; flex-direction:column; }.tk-product-gallery { overflow:hidden; border:1px solid var(--tk-border); border-radius:14px; background:var(--tk-bg-1); }.tk-product-hero-photo { display:block; width:100%; height:min(480px,52vw); object-fit:cover; }.tk-product-thumbnails { display:flex; padding:10px; gap:8px; overflow-x:auto; }.tk-product-thumbnails button { width:70px; height:53px; flex:none; padding:0; overflow:hidden; border:2px solid transparent; border-radius:7px; background:none; cursor:pointer; }.tk-product-thumbnails button.is-active { border-color:var(--tk-primary); }.tk-product-thumbnails img { width:100%; height:100%; object-fit:cover; }.tk-product-no-photo { display:flex; height:330px; align-items:center; justify-content:center; flex-direction:column; color:var(--tk-text-3); }.tk-product-no-photo svg { width:34px; height:34px; margin-bottom:8px; }.tk-product-description p { margin:0; color:var(--tk-text-2); line-height:1.65; }.tk-spec-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; overflow:hidden; border:1px solid var(--tk-border); border-radius:10px; background:var(--tk-border); }.tk-spec-grid > div { display:flex; min-height:62px; padding:12px; box-sizing:border-box; justify-content:center; flex-direction:column; background:var(--tk-bg-1); }.tk-spec-grid span { color:var(--tk-text-3); font-size:10px; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }.tk-spec-grid strong { margin-top:3px; font-size:13px; }.tk-amenity-tags,.tk-color-list { display:flex; flex-wrap:wrap; gap:8px; }.tk-amenity-tags span,.tk-color-list span { display:flex; padding:7px 10px; align-items:center; gap:5px; border-radius:8px; background:var(--tk-bg-2); color:var(--tk-text-2); font-size:12px; }.tk-amenity-tags svg { width:13px; height:13px; color:var(--tk-success); }.tk-product-map { width:100%; height:300px; margin-top:12px; border:1px solid var(--tk-border); border-radius:10px; }.tk-financing-summary { display:flex; padding:18px; align-items:center; gap:12px; border:1px solid #d4e4da; border-radius:12px; background:var(--tk-success-soft); color:#176044; }.tk-financing-summary svg { width:22px; }.tk-financing-summary div { display:flex; flex-direction:column; }.tk-financing-summary span { font-size:12px; }.tk-product-price-card .tk-eyebrow { display:block; margin-bottom:11px; }.tk-product-price-card > div { display:flex; margin:0 0 13px; flex-direction:column; }.tk-product-price-card small { color:var(--tk-text-3); }.tk-product-price-card strong { font-size:21px; }.tk-product-price-card hr { margin:15px 0; border:0; border-top:1px solid var(--tk-border); }.tk-product-interest-list { display:flex; margin-top:12px; flex-direction:column; }.tk-product-interest-list a { display:flex; padding:8px 0; align-items:center; justify-content:space-between; border-top:1px solid var(--tk-border); color:var(--tk-text-2); font-size:12px; text-decoration:none; }.tk-product-interest-list svg { width:13px; }

@media (max-width: 980px) {
  .tk-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tk-product-form,.tk-product-show-layout { grid-template-columns: 1fr; }
  .tk-product-form-aside,.tk-product-show-aside { order: -1; }
  .tk-form-sticky { position: static; }
  .tk-product-form-aside .tk-form-sticky { display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; align-items:end; }
  .tk-product-form-aside h3,.tk-product-form-aside .tk-catalog-locked { display:none; }
  .tk-product-form-aside .tk-btn { margin:0; }
}
@media (max-width: 720px) {
  .tk-catalog-options,.tk-product-grid { grid-template-columns:1fr; }
  .tk-catalog-option-body { min-height:245px; }
  .tk-form-section { padding:17px; }
  .tk-form-grid { grid-template-columns:1fr; }.tk-col-12,.tk-col-8,.tk-col-6,.tk-col-5,.tk-col-4,.tk-col-3 { grid-column:auto; }
  .tk-photo-existing,.tk-photo-preview { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .tk-amenities-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.tk-operation-options { grid-template-columns:1fr 1fr 1fr; }
  .tk-location-layout { grid-template-columns:1fr; }.tk-variation-row { grid-template-columns:1fr 1fr; padding:11px; border:1px solid var(--tk-border); border-radius:10px; }.tk-variation-row .tk-icon-action { grid-column:2; justify-self:end; }
  .tk-spec-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.tk-product-hero-photo { height:62vw; min-height:250px; }.tk-product-form-aside .tk-form-sticky { grid-template-columns:1fr; }.tk-product-form-aside .tk-btn { width:100%; }
}
@media (max-width: 430px) {
  .tk-photo-existing,.tk-photo-preview { grid-template-columns:repeat(2,minmax(0,1fr)); }.tk-amenities-grid,.tk-operation-options,.tk-spec-grid { grid-template-columns:1fr 1fr; }.tk-product-card-media { height:175px; }
}
.tk-catalog-share-card{margin:0 0 22px;padding:20px;border:1px solid var(--tk-border,#e2e5ee);border-radius:14px;background:#fff}.tk-catalog-share-heading{display:flex;gap:12px;align-items:flex-start;margin-bottom:16px}.tk-catalog-share-heading h2{font-size:17px;margin:1px 0 3px}.tk-catalog-share-heading p{margin:0;color:var(--tk-text-muted,#697083);font-size:14px}.tk-catalog-share-icon{width:38px;height:38px;border-radius:10px;background:#f0efff;color:#5048f4;display:grid;place-items:center;flex:0 0 auto}.tk-catalog-share-icon svg{width:19px}.tk-catalog-share-form{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(360px,1.2fr);gap:18px;align-items:center}.tk-catalog-public-toggle{display:flex;align-items:center;gap:10px;cursor:pointer}.tk-catalog-public-toggle input{width:18px;height:18px;accent-color:#5048f4}.tk-catalog-public-toggle span{display:flex;flex-direction:column}.tk-catalog-public-toggle strong{font-size:14px}.tk-catalog-public-toggle small{font-size:12px;color:var(--tk-text-muted,#697083)}.tk-catalog-url-editor{display:flex;align-items:center}.tk-catalog-url-prefix{height:42px;display:flex;align-items:center;padding:0 10px;border:1px solid var(--tk-border,#e2e5ee);border-right:0;border-radius:9px 0 0 9px;background:#f7f8fb;color:var(--tk-text-muted,#697083);font-size:13px;white-space:nowrap}.tk-catalog-url-editor .tk-input{border-radius:0;min-width:0}.tk-catalog-url-editor .tk-btn{border-radius:0 9px 9px 0;height:42px}.tk-catalog-share-actions{display:flex;align-items:center;gap:8px;margin-top:15px;padding-top:14px;border-top:1px solid var(--tk-border,#e2e5ee)}.tk-catalog-share-actions code{margin-right:auto;color:#4a43d8;background:#f3f2ff;padding:7px 9px;border-radius:7px;font-size:12px}.tk-alert-success{background:#ecf8f2;border-color:#bce6d1;color:#147a55}.tk-alert-danger{background:#fff1f0;border-color:#f4c7c3;color:#b42318}@media(max-width:860px){.tk-catalog-share-form{grid-template-columns:1fr}.tk-catalog-share-actions{flex-wrap:wrap}.tk-catalog-share-actions code{flex-basis:100%;overflow-wrap:anywhere}.tk-catalog-url-editor{flex-wrap:wrap}.tk-catalog-url-prefix{flex:0 0 auto}.tk-catalog-url-editor .tk-input{flex:1}.tk-catalog-url-editor .tk-btn{flex-basis:100%;border-radius:9px;margin-top:8px}.tk-catalog-url-prefix+.tk-input{border-radius:0 9px 9px 0}}

/* ---------- Automatizaciones y compositor de correo ---------- */
.tk-email-provider{display:flex;margin-bottom:18px;padding:14px 16px;align-items:center;gap:12px;border:1px solid var(--tk-border);border-radius:12px;background:var(--tk-bg-1)}
.tk-email-provider.is-ready{border-color:#bde5d2;background:var(--tk-success-soft)}
.tk-email-provider-icon{display:grid;width:38px;height:38px;flex:none;place-items:center;border-radius:10px;background:var(--tk-primary-soft);color:var(--tk-primary)}
.tk-email-provider.is-ready .tk-email-provider-icon{background:#fff;color:var(--tk-success)}.tk-email-provider-icon svg{width:19px;height:19px}.tk-email-provider>div{min-width:0;flex:1}.tk-email-provider strong{font-size:13px}.tk-email-provider p{margin:2px 0 0;color:var(--tk-text-2);font-size:12px}
.tk-automation-layout{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);align-items:start;gap:18px}.tk-automation-create{position:sticky;top:16px}.tk-automation-create .tk-card-header h2{margin:0}.tk-automation-create .tk-card-header p{margin:3px 0 0}.tk-automation-form{display:flex;gap:15px;flex-direction:column}.tk-field-help{color:var(--tk-text-3);font-size:11px;line-height:1.45}.tk-inline-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tk-input-suffix{display:flex;align-items:center}.tk-input-suffix .tk-input{border-radius:9px 0 0 9px}.tk-input-suffix>span{display:flex;min-height:42px;box-sizing:border-box;padding:0 11px;align-items:center;border:1px solid var(--tk-border);border-left:0;border-radius:0 9px 9px 0;background:var(--tk-bg-2);color:var(--tk-text-2);font-size:12px;white-space:nowrap}
.tk-automation-recipients{display:flex;margin:0;padding:0;border:0;gap:7px;flex-direction:column}.tk-automation-recipients legend{margin-bottom:1px}.tk-automation-recipient-option{display:grid;min-height:58px;padding:10px;box-sizing:border-box;grid-template-columns:16px 30px minmax(0,1fr);align-items:center;gap:8px;border:1px solid var(--tk-border);border-radius:9px;background:#fff;cursor:pointer}.tk-automation-recipient-option:has(input:checked){border-color:var(--tk-primary);background:var(--tk-primary-soft)}.tk-automation-recipient-option input,.tk-automation-manager-copy input{width:15px;height:15px;margin:0;accent-color:var(--tk-primary)}.tk-automation-recipient-icon{display:grid;width:30px;height:30px;place-items:center;border-radius:7px;background:var(--tk-bg-2);color:var(--tk-text-2)}.tk-automation-recipient-icon svg{width:15px;height:15px}.tk-automation-recipient-option:has(input:checked) .tk-automation-recipient-icon{background:#fff;color:var(--tk-primary)}.tk-automation-recipient-option strong,.tk-automation-manager-copy strong{display:block;font-size:11.5px}.tk-automation-recipient-option small,.tk-automation-manager-copy small{display:block;margin-top:1px;color:var(--tk-text-3);font-size:10px;line-height:1.35}.tk-automation-manager-copy{display:grid;padding:9px 10px 9px 41px;grid-template-columns:15px minmax(0,1fr);align-items:start;gap:8px;border-left:2px solid var(--tk-primary);background:var(--tk-bg-2);cursor:pointer}.tk-automation-manager-copy[hidden]{display:none}.tk-automation-card-meta{display:flex;flex-wrap:wrap;gap:5px 13px}.tk-automation-card-meta span{display:flex;align-items:center;gap:5px;color:var(--tk-text-3);font-size:11px}.tk-automation-card-meta svg{width:13px;height:13px}
.tk-automation-list{display:flex;gap:10px;flex-direction:column}.tk-automation-card{display:grid;padding:16px;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:13px}.tk-automation-card-icon{display:grid;width:42px;height:42px;place-items:center;border-radius:11px;background:var(--tk-primary-soft);color:var(--tk-primary)}.tk-automation-card-icon svg{width:20px;height:20px}.tk-automation-card-main{min-width:0}.tk-automation-card-title{display:flex;align-items:center;gap:8px}.tk-automation-card-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tk-automation-card-main p{margin:3px 0 5px;color:var(--tk-text-2);font-size:12px}.tk-automation-card-main>span{display:flex;align-items:center;gap:5px;color:var(--tk-text-3);font-size:11px}.tk-automation-card-main>span svg{width:13px;height:13px}.tk-automation-card-actions{display:flex;align-items:center;gap:4px}.tk-automation-card-actions form{margin:0}.tk-automation-card-actions svg{width:14px;height:14px}
.tk-email-modal{display:none}.tk-email-modal:target{display:flex}.tk-email-modal .tk-modal{max-width:660px}.tk-email-modal .tk-modal-header h3{margin:0}.tk-email-modal .tk-modal-header p{margin:3px 0 0}.tk-email-composer-body{display:flex;gap:13px;flex-direction:column}.tk-mini-editor-toolbar{display:flex;padding:5px;gap:3px;border:1px solid var(--tk-border);border-bottom:0;border-radius:9px 9px 0 0;background:var(--tk-bg-2)}.tk-mini-editor-toolbar button{display:grid;width:31px;height:29px;padding:0;place-items:center;border:0;border-radius:6px;background:transparent;color:var(--tk-text-2);cursor:pointer}.tk-mini-editor-toolbar button:hover{background:#fff;color:var(--tk-primary)}.tk-mini-editor-toolbar svg{width:15px;height:15px}.tk-mini-editor{min-height:180px;padding:13px;overflow:auto;border:1px solid var(--tk-border);border-radius:0 0 9px 9px;background:#fff;color:var(--tk-text);font-size:13px;line-height:1.55;outline:none}.tk-mini-editor:focus{border-color:var(--tk-primary);box-shadow:0 0 0 3px rgba(74,67,243,.09)}
@media(max-width:860px){.tk-automation-layout{grid-template-columns:1fr}.tk-automation-create{position:static}}
@media(max-width:600px){.tk-email-provider{align-items:flex-start;flex-wrap:wrap}.tk-email-provider>.tk-btn{width:100%}.tk-automation-card{grid-template-columns:38px minmax(0,1fr)}.tk-automation-card-icon{width:38px;height:38px}.tk-automation-card-actions{grid-column:2}.tk-email-modal{padding:8px}.tk-email-modal .tk-modal{max-height:96vh}}

/* ---------- Soporte y administración SaaS ---------- */
.tk-stack{display:flex;gap:14px;flex-direction:column}.tk-confirm-row,.tk-consent-row{display:flex;padding:12px;align-items:flex-start;gap:10px;border:1px solid var(--tk-border);border-radius:10px;background:var(--tk-bg-2);cursor:pointer}.tk-confirm-row input,.tk-consent-row input{width:16px;height:16px;margin:2px 0 0;flex:none;accent-color:var(--tk-primary)}.tk-confirm-row span{font-size:13px}.tk-consent-row span{display:flex;flex-direction:column}.tk-consent-row strong{font-size:13px}.tk-consent-row small{margin-top:2px;color:var(--tk-text-3);font-size:11px}.tk-consent-row:has(input:checked){border-color:#c8c9ff;background:var(--tk-primary-soft)}
.tk-saas-nav{display:flex;margin:-4px 0 22px;padding:5px;gap:3px;overflow-x:auto;border:1px solid var(--tk-border);border-radius:11px;background:var(--tk-bg-1);scrollbar-width:none}.tk-saas-nav::-webkit-scrollbar{display:none}.tk-saas-nav a{display:flex;padding:8px 11px;align-items:center;gap:6px;border-radius:7px;color:var(--tk-text-2);font-size:12px;font-weight:650;text-decoration:none;white-space:nowrap}.tk-saas-nav a:hover{background:var(--tk-bg-2);color:var(--tk-primary)}.tk-saas-nav svg{width:14px;height:14px}.tk-metric-grid{display:grid;margin-bottom:18px;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.tk-metric{display:flex;min-height:112px;padding:17px;box-sizing:border-box;justify-content:center;flex-direction:column;border:1px solid var(--tk-border);border-radius:13px;background:var(--tk-bg-1)}.tk-metric>span{color:var(--tk-text-2);font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.04em}.tk-metric>strong{margin:5px 0 2px;font-size:24px;line-height:1.1}.tk-metric>small{color:var(--tk-text-3);font-size:11px}.tk-saas-metrics .tk-metric:first-child{border-top:3px solid var(--tk-primary)}.tk-saas-account-grid,.tk-support-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;align-items:start;gap:18px}.tk-click-row{cursor:pointer}.tk-click-row:hover{background:var(--tk-bg-2)}.tk-code-pill{display:inline-flex;padding:5px 8px;border-radius:6px;background:var(--tk-primary-soft);color:var(--tk-primary);font-weight:700;letter-spacing:.04em}.tk-ticket-thread{display:flex;gap:12px;flex-direction:column}.tk-ticket-message{max-width:84%;padding:13px 15px;align-self:flex-start;border:1px solid var(--tk-border);border-radius:5px 12px 12px;background:var(--tk-bg-1)}.tk-ticket-message.is-staff{align-self:flex-end;border-color:#d4d5ff;border-radius:12px 5px 12px 12px;background:var(--tk-primary-soft)}.tk-ticket-message-head{display:flex;margin-bottom:7px;align-items:center;justify-content:space-between;gap:20px}.tk-ticket-message-head strong{font-size:12px}.tk-ticket-message-head time{color:var(--tk-text-3);font-size:10px}.tk-ticket-message p{margin:0;color:var(--tk-text-2);font-size:13px;line-height:1.55}.tk-ticket-reply{display:flex;margin-top:10px;padding-top:17px;gap:9px;flex-direction:column;border-top:1px solid var(--tk-border)}.tk-ticket-reply .tk-btn{align-self:flex-end}.tk-detail-list{display:flex;gap:12px;flex-direction:column}.tk-detail-list>div{display:flex;padding-bottom:10px;justify-content:space-between;gap:12px;border-bottom:1px solid var(--tk-border);font-size:12px}.tk-detail-list>div:last-child{padding-bottom:0;border:0}.tk-detail-list span{color:var(--tk-text-3)}.tk-detail-list strong{text-align:right;overflow-wrap:anywhere}
@media(max-width:980px){.tk-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tk-saas-account-grid,.tk-support-layout{grid-template-columns:1fr}}
@media(max-width:600px){.tk-metric-grid{grid-template-columns:1fr 1fr}.tk-metric{min-height:96px;padding:13px}.tk-metric>strong{font-size:20px}.tk-ticket-message{max-width:94%}.tk-inline-fields{grid-template-columns:1fr}.tk-saas-nav{margin-top:0}}

/* ---------- Fortaleza de contraseña ---------- */
.tk-password-strength{margin-top:9px;padding:12px;border:1px solid var(--tk-border);border-radius:10px;background:var(--tk-bg-2)}.tk-password-strength-head{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--tk-text-2);font-size:11px}.tk-password-strength-head strong{color:var(--tk-text);font-size:11px}.tk-password-strength-bars{display:grid;margin:8px 0;grid-template-columns:repeat(4,1fr);gap:5px}.tk-password-strength-bars span{height:4px;border-radius:4px;background:var(--tk-border-strong);transition:background-color .18s ease}.tk-password-strength[data-score="1"] .tk-password-strength-bars span:nth-child(-n+1){background:var(--tk-danger)}.tk-password-strength[data-score="2"] .tk-password-strength-bars span:nth-child(-n+2){background:#d08a19}.tk-password-strength[data-score="3"] .tk-password-strength-bars span:nth-child(-n+3){background:#4d8d55}.tk-password-strength[data-score="4"] .tk-password-strength-bars span{background:var(--tk-success)}.tk-password-strength[data-score="1"] .tk-password-strength-head strong{color:var(--tk-danger)}.tk-password-strength[data-score="2"] .tk-password-strength-head strong{color:#a9630b}.tk-password-strength[data-score="3"] .tk-password-strength-head strong,.tk-password-strength[data-score="4"] .tk-password-strength-head strong{color:var(--tk-success)}.tk-password-strength-message{margin:0;color:var(--tk-text-2);font-size:11px;line-height:1.4}.tk-password-requirements{display:grid;margin:10px 0 0;padding:10px 0 0;grid-template-columns:1fr 1fr;gap:6px 10px;border-top:1px solid var(--tk-border);list-style:none}.tk-password-requirements li{position:relative;padding-left:17px;color:var(--tk-text-3);font-size:10px;line-height:1.35}.tk-password-requirements li::before{position:absolute;top:1px;left:0;width:12px;height:12px;border:1px solid var(--tk-border-strong);border-radius:50%;content:''}.tk-password-requirements li.is-met{color:#24714b}.tk-password-requirements li.is-met::before{border-color:var(--tk-success);background:var(--tk-success);box-shadow:inset 0 0 0 3px white}.tk-password-requirements li.is-missing{color:var(--tk-text-2)}.tk-btn:disabled{opacity:.5;cursor:not-allowed;transform:none}
@media(max-width:520px){.tk-password-requirements{grid-template-columns:1fr}}

/* ---------- Registro y selección inicial de plan ---------- */
.tk-guest-page{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y pinch-zoom}.tk-guest-page .tk-guest-body{height:auto;min-height:100vh;min-height:100dvh;overflow-x:hidden;overflow-y:visible;touch-action:pan-y pinch-zoom}.tk-guest-body{min-height:100vh;display:flex;box-sizing:border-box;padding:20px;align-items:center;justify-content:center;background:var(--tk-bg-2);margin:0}.tk-guest-body.is-top-aligned{align-items:flex-start}.tk-guest-card{width:100%;box-sizing:border-box;padding:36px 32px}.tk-register-plan-fieldset{min-width:0;margin:0;padding:0;border:0}.tk-register-plan-fieldset>legend{margin:0 0 8px;color:var(--tk-text);font-size:12px;font-weight:700}.tk-register-plan-fieldset>p{margin:8px 0 0;color:var(--tk-text-3);font-size:10.5px;line-height:1.4}.tk-register-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.tk-register-plan-option{position:relative;min-width:0;cursor:pointer}.tk-register-plan-option>input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.tk-register-plan-card{position:relative;display:flex;min-height:142px;box-sizing:border-box;padding:13px;gap:7px;flex-direction:column;border:1px solid var(--tk-border);border-radius:11px;background:var(--tk-bg-1);transition:border-color .15s ease,background-color .15s ease}.tk-register-plan-option:hover .tk-register-plan-card{border-color:var(--tk-border-strong)}.tk-register-plan-option>input:focus-visible+.tk-register-plan-card{outline:3px solid rgba(74,67,243,.16);outline-offset:2px}.tk-register-plan-option>input:checked+.tk-register-plan-card{border:2px solid var(--tk-primary);padding:12px;background:var(--tk-primary-soft)}.tk-register-plan-head{display:flex;min-height:20px;align-items:center;justify-content:space-between;gap:5px}.tk-register-plan-head strong{font-size:13px}.tk-register-plan-head em{padding:3px 5px;border-radius:5px;background:var(--tk-primary);color:#fff;font-size:8px;font-style:normal;font-weight:750;letter-spacing:.02em;text-transform:uppercase}.tk-register-plan-price{display:flex;align-items:baseline;gap:5px}.tk-register-plan-price b{font-size:22px;line-height:1}.tk-register-plan-price small{color:var(--tk-text-3);font-size:9px}.tk-register-plan-description{color:var(--tk-text-2);font-size:10.5px;line-height:1.4}.tk-register-plan-card>i{position:absolute;right:10px;bottom:10px;display:none;width:18px;height:18px;padding:3px;box-sizing:border-box;border-radius:50%;background:var(--tk-primary);color:#fff}.tk-register-plan-option>input:checked+.tk-register-plan-card>i{display:block}.tk-turnstile-slot{display:flex;min-height:65px;align-items:center;justify-content:center}.tk-turnstile-slot .cf-turnstile{min-height:65px}
@media(max-width:600px){.tk-guest-body{padding:12px}.tk-guest-card{padding:28px 20px}.tk-register-plan-grid{grid-template-columns:1fr}.tk-register-plan-card{min-height:100px;padding-right:42px}.tk-register-plan-option>input:checked+.tk-register-plan-card{padding-right:41px}.tk-register-plan-price b{font-size:20px}.tk-register-plan-card>i{top:50%;right:13px;bottom:auto;transform:translateY(-50%)}}
