/* ─────────────────────────────────────────────────────────────────────────────
   Marimaca · Gestión de Permisos — hoja de estilo del prototipo.
   Usa la identidad real de Marimaca Copper (ink #111916 + verde #50D8B4),
   los mismos tokens de la plataforma de Atraviesos, sobre la estructura de
   aplicación de CatastralAI: sidebar colapsable, cards y tipografía Inter.
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Identidad Marimaca */
  --brand-primario: #111916; /* ink */
  --brand-acento: #50d8b4; /* verde-400 / accent */
  --verde-500: #2bbe9b;
  --verde-600: #009d7e;
  --verde-800: #005c48;
  --brand-acento-soft: #50d8b41f;
  --brand-primario-soft: #11191614;
  --fondo: #f8fbfa; /* surface-2 */
  --sombra-pop: 0 28px 60px -16px rgba(17, 25, 22, 0.28), 0 8px 20px -8px rgba(17, 25, 22, 0.14);
  --sombra-card: 0 1px 2px rgba(17, 25, 22, 0.04), 0 1px 3px rgba(17, 25, 22, 0.05);

  /* Escala de grises derivada de la marca (verdosa, no neutra) */
  --zinc-50: #f8fbfa;
  --zinc-100: #eef3f1;
  --zinc-200: #dbe1df;
  --zinc-300: #c9d2ce;
  --zinc-400: #929b97;
  --zinc-500: #69726f;
  --zinc-600: #404945;
  --zinc-700: #2a322e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
  color: var(--brand-primario);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

svg {
  flex-shrink: 0;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--zinc-300);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--zinc-400);
  background-clip: content-box;
}

/* ══════════════════════════ Utilidades base ══════════════════════════ */

.muted {
  color: var(--zinc-500);
}
.tiny {
  font-size: 11px;
}
.small {
  font-size: 12px;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}
.acento {
  color: var(--verde-600);
}
.strong {
  font-weight: 600;
}
.nowrap {
  white-space: nowrap;
}
.right {
  text-align: right;
}
.center {
  text-align: center;
}
.hide {
  display: none !important;
}
/* Texto que solo aparece cuando hay ancho (no depende del sidebar contraído) */
.solo-ancho {
  display: none;
}
@media (min-width: 640px) {
  .solo-ancho {
    display: inline;
  }
}

.section-label {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--zinc-400);
}

/* ══════════════════════════ Login (réplica de marimacapermisos) ══════════════════════════ */

.auth {
  position: relative;
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--brand-primario);
  padding: 3rem 1.25rem;
}

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

.auth__veil {
  position: absolute;
  inset: 0;
  background: rgba(17, 25, 22, 0.35);
}

.auth__wrap {
  position: relative;
  width: 100%;
  max-width: 404px;
  animation: fadeUp 0.28s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.auth__card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--sombra-pop);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.auth__strip {
  height: 4px;
  width: 100%;
  background: var(--brand-acento);
}

.auth__body {
  padding: 2rem 1.75rem 1.75rem;
}

.auth__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.auth__logo img {
  height: 2.75rem;
  width: auto;
}
.auth__logo p {
  margin-top: 0.75rem;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--zinc-500);
}

.auth__form {
  margin-top: 1.75rem;
}

.campo {
  display: block;
}
.campo + .campo {
  margin-top: 1rem;
}
.campo__wrap {
  position: relative;
  display: block;
}
.campo__ico {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--zinc-400);
  pointer-events: none;
}
.campo .input {
  min-height: 46px;
  padding-left: 2.5rem;
  border-radius: 9px;
  font-size: 13.5px;
}
.campo--pass .input {
  padding-right: 2.75rem;
}
.campo__ojo {
  position: absolute;
  right: 0.375rem;
  top: 50%;
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--zinc-400);
  transition: background-color 0.15s, color 0.15s;
}
.campo__ojo:hover {
  background: var(--zinc-50);
  color: var(--zinc-600);
}

.etiqueta {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--zinc-500);
}

.btn-primario {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 9px;
  background: var(--brand-acento);
  padding: 0.5rem 1rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-primario);
  transition: background-color 0.15s;
}
.btn-primario:hover {
  background: var(--verde-500);
}
.btn-primario:active {
  background: var(--verde-600);
}
.btn-primario:disabled {
  opacity: 0.6;
}

.auth__quick {
  border-top: 1px solid var(--zinc-200);
  background: rgba(248, 251, 250, 0.8);
  padding: 1.25rem 1.75rem;
}
.auth__quick > p {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--zinc-400);
}
.auth__quick-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.chip-rol-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: 1px solid var(--zinc-200);
  border-radius: 999px;
  background: #fff;
  padding: 0 0.75rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--zinc-600);
  box-shadow: var(--sombra-card);
  transition: all 0.15s;
}
.chip-rol-btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand-acento);
  color: var(--verde-800);
}
.chip-rol-btn i {
  height: 6px;
  width: 6px;
  border-radius: 999px;
  background: var(--brand-acento);
}

.auth__copy {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 2px rgba(17, 25, 22, 0.4);
}

/* ══════════════════════════ Marca ══════════════════════════ */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  line-height: 1;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.625rem;
  background: var(--brand-acento);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__word {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand__word span {
  font-weight: 300;
  color: var(--zinc-400);
}

.brand--dark .brand__word {
  color: #fff;
}
.brand--dark .brand__word span {
  color: rgba(255, 255, 255, 0.45);
}
.brand--lg .brand__mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  font-size: 15px;
}
.brand--lg .brand__word {
  font-size: 1.375rem;
}

/* ══════════════════════════ Formularios ══════════════════════════ */

.label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--zinc-400);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--zinc-200);
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.625rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--brand-primario);
  transition: border-color 0.15s;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--zinc-300);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--zinc-400);
}
.select {
  appearance: none;
  padding-right: 2.25rem;
  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='%23a1a1aa' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}
.textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.field + .field {
  margin-top: 1.25rem;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--zinc-200);
  border-radius: 0.75rem;
  background: #fff;
  padding: 0 0.875rem;
  color: var(--zinc-400);
  transition: border-color 0.15s;
}
.search:focus-within {
  border-color: rgba(80, 216, 180, 0.65);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.625rem 0;
  font: inherit;
  font-size: 0.875rem;
  color: var(--brand-primario);
  outline: none;
}
.search input::placeholder {
  color: var(--zinc-400);
}

/* ══════════════════════════ Botones ══════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    opacity 0.18s,
    background-color 0.18s,
    border-color 0.18s,
    color 0.18s;
}

.btn--primary {
  background: var(--brand-primario);
  color: #fff;
}
.btn--primary:hover {
  opacity: 0.85;
}

.btn--acento {
  background: var(--brand-acento);
  color: var(--brand-primario);
  font-weight: 600;
}
.btn--acento:hover {
  background: var(--verde-500);
}

.btn--outline {
  border-color: rgba(26, 26, 26, 0.15);
  background: #fff;
  color: var(--zinc-600);
}
.btn--outline:hover {
  border-color: var(--brand-acento);
  color: var(--verde-800);
}

.btn--ghost {
  background: transparent;
  color: var(--zinc-500);
}
.btn--ghost:hover {
  background: var(--zinc-100);
  color: var(--brand-primario);
}

.btn--block {
  width: 100%;
}
.btn--sm {
  padding: 0.3125rem 0.875rem;
  font-size: 13px;
}
.btn--lg {
  padding: 0.6875rem 1.5rem;
}

.btn-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 0.625rem;
  background: transparent;
  color: var(--zinc-500);
  transition: background-color 0.15s;
}
.btn-icon:hover {
  background: var(--zinc-100);
  color: var(--brand-primario);
}

/* ══════════════════════════ Shell de la app ══════════════════════════ */

.shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

.shell__row {
  display: flex;
  min-height: 0;
  flex: 1;
}

.avisos {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  padding: 0.375rem 1rem;
  background: var(--brand-primario);
  color: #fff;
  font-size: 12px;
  text-align: center;
}
.avisos .pill {
  border-radius: 999px;
  background: var(--brand-acento);
  padding: 0.125rem 0.75rem;
  font-weight: 700;
}

/* ───────── Sidebar ───────── */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 16rem;
  flex-direction: column;
  border-right: 1px solid var(--zinc-200);
  background: #fff;
  transform: translateX(-100%);
  transition:
    transform 0.2s,
    width 0.2s;
}
.sidebar.is-open {
  transform: none;
}

@media (min-width: 768px) {
  .sidebar {
    position: static;
    transform: none;
  }
  .shell.is-collapsed .sidebar {
    width: 4rem;
  }
  .shell.is-collapsed .sidebar__label,
  .shell.is-collapsed .sidebar__foot-links,
  .shell.is-collapsed .user__meta,
  .shell.is-collapsed .sidebar__group-title {
    display: none;
  }
  .shell.is-collapsed .nav__item,
  .shell.is-collapsed .user {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
  .shell.is-collapsed .sidebar__logo {
    justify-content: center;
    padding: 0;
  }
  .shell.is-collapsed .collapse-btn {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
}

.sidebar__logo {
  position: relative;
  display: flex;
  height: 4rem;
  flex-shrink: 0;
  align-items: center;
  overflow: hidden;
  padding: 0 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--zinc-100);
}
.sidebar__logo-mark {
  position: relative;
  height: 1.75rem;
  width: 1.75rem;
  flex-shrink: 0;
  object-fit: contain;
  /* El pico de CatastralAI viene en tinta blanca (viene del favicon, pensado para
     fondo oscuro); sobre la franja blanca lo pasamos a negro conservando el alfa. */
  filter: brightness(0);
}
.sidebar__logo-word {
  position: relative;
  margin-left: 0.625rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand-primario);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .shell.is-collapsed .sidebar__logo-word {
    display: none;
  }
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  font-size: 0.875rem;
}

.sidebar__group-title {
  margin: 1rem 0 0.375rem;
  padding: 0 0.75rem;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--zinc-300);
}
.nav > .sidebar__group-title:first-child {
  margin-top: 0;
}

.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-weight: 300;
  color: var(--zinc-500);
  transition:
    background-color 0.15s,
    color 0.15s;
}
.nav__item + .nav__item {
  margin-top: 2px;
}
.nav__item:hover {
  background: var(--zinc-100);
  color: var(--brand-primario);
}
.nav__item svg {
  width: 20px;
  height: 20px;
  color: var(--zinc-400);
}
.nav__item:hover svg {
  color: var(--zinc-600);
}

.nav__item.is-active {
  background: var(--brand-acento-soft);
  font-weight: 600;
  color: var(--brand-primario);
}
.nav__item.is-active svg {
  color: var(--verde-600);
}
.nav__item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 1.5rem;
  width: 4px;
  transform: translateY(-50%);
  border-radius: 0 999px 999px 0;
  background: var(--brand-acento);
}
.shell.is-collapsed .nav__item.is-active::before {
  display: none;
}

.nav__badge {
  margin-left: auto;
  border-radius: 999px;
  background: var(--brand-acento);
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-primario);
}
.shell.is-collapsed .nav__badge {
  display: none;
}

.sidebar__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collapse-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  border-top: 1px solid var(--zinc-100);
  background: transparent;
  padding: 0.625rem 1rem;
  color: var(--zinc-400);
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.collapse-btn:hover {
  background: var(--zinc-50);
  color: var(--brand-primario);
}
@media (min-width: 768px) {
  .collapse-btn {
    display: flex;
  }
}
.shell.is-collapsed .collapse-btn svg {
  transform: rotate(180deg);
}

.sidebar__foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 0.5rem;
  border-top: 1px solid var(--zinc-100);
  padding: 0.625rem 1rem;
  font-size: 11px;
  color: var(--zinc-400);
}
.sidebar__foot-links a:hover {
  color: var(--verde-800);
}

.user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--zinc-100);
  margin: 0;
  padding: 0.75rem 1rem;
}
.user:hover {
  background: var(--zinc-50);
}
.user__avatar {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--brand-primario);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}
.user__meta {
  min-width: 0;
  flex: 1;
}
.user__meta p:first-child {
  font-size: 0.875rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user__meta p:last-child {
  font-size: 12px;
  color: var(--zinc-400);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(24, 24, 27, 0.3);
  backdrop-filter: blur(4px);
}
@media (min-width: 768px) {
  .scrim {
    display: none;
  }
}

/* ───────── Cabecera + main ───────── */

.main-col {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  height: 4rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--zinc-200);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 0 1rem;
}
@media (min-width: 768px) {
  .topbar {
    padding: 0 1.5rem;
  }
}

.topbar__title {
  font-size: 1rem;
  font-weight: 600;
}
.topbar__crumb {
  font-size: 11px;
  color: var(--zinc-400);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chip-rol {
  border-radius: 999px;
  background: var(--brand-acento-soft);
  padding: 0.25rem 0.625rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--verde-800);
}

.bell {
  position: relative;
}
.bell__dot {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--brand-acento);
  padding: 0 3px;
  font-size: 9px;
  font-weight: 700;
  color: var(--brand-primario);
}

.main {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.page {
  margin: 0 auto;
  max-width: 84rem;
  padding: 1.25rem 1rem 3rem;
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .page {
    padding: 1.5rem 1.5rem 3rem;
  }
}

.page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}
.page__head h2 {
  font-size: 1.5rem;
}
.page__head p {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--zinc-500);
}

/* ══════════════════════════ Cards ══════════════════════════ */

.card {
  border: 1px solid var(--zinc-200);
  border-radius: 14px;
  background: #fff;
  padding: 1.25rem;
  box-shadow: var(--sombra-card);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.card__head .ico {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.625rem;
  background: var(--brand-acento-soft);
  color: var(--verde-800);
}
.card__head h3 {
  font-size: 0.9375rem;
}
.card__head p {
  font-size: 12px;
  color: var(--zinc-400);
}
.card__head .card__head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grid {
  display: grid;
  gap: 1rem;
}
.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.grid--kpi {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
@media (min-width: 1100px) {
  .grid--split {
    grid-template-columns: 1.4fr 1fr;
  }
}
@media (min-width: 1100px) {
  .grid--ficha {
    grid-template-columns: 1fr 20rem;
    align-items: start;
  }
}

/* ───────── KPI ───────── */

.kpi {
  border: 1px solid var(--zinc-200);
  border-radius: 14px;
  background: #fff;
  padding: 1.125rem 1.25rem;
  box-shadow: var(--sombra-card);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.kpi:hover {
  border-color: var(--zinc-300);
  box-shadow: 0 8px 24px -18px rgba(0, 0, 0, 0.35);
}
.kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.kpi__label {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--zinc-400);
}
.kpi__value {
  margin-top: 0.5rem;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi__sub {
  margin-top: 0.375rem;
  font-size: 12px;
  color: var(--zinc-500);
}
.kpi .ico {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--zinc-100);
  color: var(--zinc-500);
}
.kpi--acento .ico {
  background: var(--brand-acento-soft);
  color: var(--verde-800);
}
.kpi--ok .ico {
  background: #ecfdf5;
  color: #005c48;
}
.kpi--warn .ico {
  background: #fffbeb;
  color: #b45309;
}
.kpi--bad .ico {
  background: #fef2f2;
  color: #b91c1c;
}

.hero-dark {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--brand-primario);
  color: #fff;
  padding: 1.75rem;
}
.hero-dark::after {
  content: '';
  position: absolute;
  right: -6rem;
  top: -8rem;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  background: rgba(80, 216, 180, 0.22);
  filter: blur(70px);
  pointer-events: none;
}
.hero-dark > * {
  position: relative;
}
.hero-dark h3 {
  margin-top: 0.75rem;
  font-size: 1.5rem;
  line-height: 1.25;
}
.hero-dark p {
  margin-top: 0.5rem;
  max-width: 42rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  background: rgba(80, 216, 180, 0.16);
  padding: 0.25rem 0.75rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7ce8ca;
}
.hero-dark__stats {
  margin-top: 1.5rem;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  border-radius: 0.875rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
.hero-dark__stats > div {
  background: #1a231f;
  padding: 0.875rem 1rem;
}
.hero-dark__stats b {
  display: block;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero-dark__stats span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

/* ══════════════════════════ Badges de estado ══════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  border-radius: 999px;
  padding: 0.1875rem 0.625rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}
.badge--plain::before {
  display: none;
}

.badge--tramite {
  background: #eff6ff;
  color: #1d4ed8;
}
.badge--aprobado {
  background: #eef2ff;
  color: #4338ca;
}
.badge--vigente {
  background: rgba(80, 216, 180, 0.16);
  color: var(--verde-800);
}
.badge--porvencer {
  background: #fffbeb;
  color: #b45309;
}
.badge--vencido {
  background: #fef2f2;
  color: #b91c1c;
}
.badge--renovado {
  background: rgba(80, 216, 180, 0.1);
  color: var(--verde-600);
}
.badge--rechazado {
  background: #fdf2f8;
  color: #9d174d;
}
.badge--neutro {
  background: var(--zinc-100);
  color: var(--zinc-600);
}
.badge--acento {
  background: var(--brand-acento-soft);
  color: var(--verde-800);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--zinc-200);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-size: 11px;
  color: var(--zinc-500);
}

.riesgo {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.riesgo--alto {
  background: #dc2626;
}
.riesgo--medio {
  background: #f59e0b;
}
.riesgo--bajo {
  background: #2bbe9b;
}

/* ══════════════════════════ Tablas ══════════════════════════ */

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

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.tbl thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--zinc-200);
  background: var(--zinc-50);
  padding: 0.625rem 1rem;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--zinc-400);
  white-space: nowrap;
}

table.tbl tbody td {
  border-bottom: 1px solid var(--zinc-100);
  padding: 0.75rem 1rem;
  vertical-align: middle;
  font-weight: 300;
  color: var(--zinc-600);
}

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

table.tbl tbody tr {
  transition: background-color 0.12s;
}
table.tbl tbody tr:hover {
  background: var(--zinc-50);
}
table.tbl tbody tr.is-click {
  cursor: pointer;
}

table.tbl .td-main {
  font-weight: 500;
  color: var(--brand-primario);
}
table.tbl .td-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--zinc-400);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  border-bottom: 1px solid var(--zinc-100);
  padding: 0.875rem 1rem;
}
.toolbar .search {
  min-width: 15rem;
  flex: 1;
}
.toolbar .select {
  width: auto;
  min-width: 9.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 13px;
}

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.filtro {
  border: 1px solid var(--zinc-200);
  border-radius: 999px;
  background: #fff;
  padding: 0.3125rem 0.75rem;
  font-size: 12px;
  color: var(--zinc-500);
  transition: all 0.15s;
}
.filtro:hover {
  border-color: var(--zinc-300);
  color: var(--brand-primario);
}
.filtro.is-active {
  border-color: transparent;
  background: var(--brand-primario);
  color: #fff;
  font-weight: 500;
}

.tabla-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--zinc-100);
  padding: 0.75rem 1rem;
  font-size: 12px;
  color: var(--zinc-400);
}

.pager {
  display: flex;
  gap: 0.25rem;
}
.pager button {
  min-width: 1.875rem;
  border: 1px solid var(--zinc-200);
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
  color: var(--zinc-500);
}
.pager button.is-active {
  border-color: transparent;
  background: var(--brand-primario);
  color: #fff;
}

/* ══════════════════════════ Tabs ══════════════════════════ */

.tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--zinc-200);
}
.tabs button {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--zinc-500);
  white-space: nowrap;
  transition: color 0.15s;
}
.tabs button:hover {
  color: var(--brand-primario);
}
.tabs button.is-active {
  font-weight: 600;
  color: var(--brand-primario);
}
.tabs button.is-active::after {
  content: '';
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-acento);
}
.tabs .count {
  margin-left: 0.375rem;
  border-radius: 999px;
  background: var(--zinc-100);
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--zinc-500);
}

/* ══════════════════════════ Ficha (definition list) ══════════════════════════ */

.dl {
  display: grid;
  gap: 0.875rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.dl div > dt {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--zinc-400);
}
.dl div > dd {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--brand-primario);
}

/* ══════════════════════════ Timeline ══════════════════════════ */

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 1.5rem;
  list-style: none;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--zinc-200);
}
.timeline li {
  position: relative;
  padding-bottom: 1.25rem;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 5px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--zinc-300);
  box-shadow: 0 0 0 1px var(--zinc-200);
}
.timeline li.is-hito::before {
  background: var(--brand-acento);
  box-shadow: 0 0 0 1px var(--brand-acento);
}
.timeline li.is-ok::before {
  background: #2bbe9b;
  box-shadow: 0 0 0 1px #2bbe9b;
}
.timeline__t {
  font-size: 0.875rem;
  font-weight: 500;
}
.timeline__m {
  margin-top: 2px;
  font-size: 12px;
  color: var(--zinc-500);
}

/* ══════════════════════════ Checklist ══════════════════════════ */

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--zinc-100);
  padding: 0.75rem 0;
}
.check-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.check-list li:first-child {
  padding-top: 0;
}
.box {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex-shrink: 0;
  border: 1.5px solid var(--zinc-300);
  border-radius: 5px;
  color: transparent;
}
.box.is-done {
  border-color: #2bbe9b;
  background: #2bbe9b;
  color: #fff;
}
.box.is-part {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}
.check-list .txt {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--zinc-600);
}
.check-list li.is-done .txt {
  color: var(--zinc-400);
}
.check-list .sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--zinc-400);
}

/* ══════════════════════════ Barras / progreso ══════════════════════════ */

.bar {
  height: 6px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: var(--zinc-100);
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-acento);
}
.bar--ok > i {
  background: var(--verde-500);
}
.bar--warn > i {
  background: #f59e0b;
}
.bar--bad > i {
  background: #dc2626;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 11px;
  color: var(--zinc-500);
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 0.3125rem;
  border-radius: 3px;
  vertical-align: -1px;
}

/* Barras horizontales de distribución */
.dist {
  display: grid;
  gap: 0.75rem;
}
.dist__row {
  display: grid;
  grid-template-columns: 8.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.75rem;
  font-size: 12px;
  color: var(--zinc-500);
}
.dist__row b {
  text-align: right;
  font-weight: 600;
  color: var(--brand-primario);
  font-variant-numeric: tabular-nums;
}

/* Donut simple con conic-gradient */
.donut {
  position: relative;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.donut::after {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 999px;
  background: #fff;
}
.donut__c {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
}
.donut__c b {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.donut__c span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--zinc-400);
}

/* ══════════════════════════ Gantt / calendario ══════════════════════════ */

.gantt {
  min-width: 62rem;
}
.gantt__head,
.gantt__row {
  display: grid;
  grid-template-columns: 17rem 1fr;
  align-items: center;
}
.gantt__head {
  border-bottom: 1px solid var(--zinc-200);
  background: var(--zinc-50);
}
.gantt__months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.gantt__months span {
  border-left: 1px solid var(--zinc-200);
  padding: 0.5rem 0;
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--zinc-400);
}
.gantt__row {
  border-bottom: 1px solid var(--zinc-100);
}
.gantt__row:hover {
  background: var(--zinc-50);
}
.gantt__name {
  padding: 0.625rem 1rem;
  min-width: 0;
}
.gantt__name p:first-child {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt__name p:last-child {
  font-size: 11px;
  color: var(--zinc-400);
}
.gantt__track {
  position: relative;
  height: 3.125rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.gantt__track > i {
  border-left: 1px solid var(--zinc-100);
}
.gantt__bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 1.375rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
}
.gantt__bar--ok {
  background: #2bbe9b;
}
.gantt__bar--warn {
  background: #f59e0b;
}
.gantt__bar--bad {
  background: #dc2626;
}
.gantt__bar--tramite {
  background: #3b82f6;
}
.gantt__hoy {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--brand-acento);
  z-index: 2;
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--zinc-200);
  border: 1px solid var(--zinc-200);
  border-radius: 0.875rem;
  overflow: hidden;
}
.cal__dow {
  background: var(--zinc-50);
  padding: 0.5rem 0;
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--zinc-400);
}
.cal__day {
  position: relative;
  min-height: 5.25rem;
  background: #fff;
  padding: 0.375rem;
}
.cal__day.is-out {
  background: var(--zinc-50);
}
.cal__day.is-hoy {
  box-shadow: inset 0 0 0 2px var(--brand-acento);
}
.cal__n {
  font-size: 11px;
  color: var(--zinc-400);
}
.cal__day.is-hoy .cal__n {
  font-weight: 700;
  color: var(--verde-800);
}
.cal__ev {
  display: block;
  margin-top: 3px;
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 10px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal__ev--warn {
  background: #fffbeb;
  color: #b45309;
}
.cal__ev--bad {
  background: #fef2f2;
  color: #b91c1c;
}
.cal__ev--ok {
  background: #ecfdf5;
  color: #005c48;
}
.cal__ev--info {
  background: #eff6ff;
  color: #1d4ed8;
}

/* ══════════════════════════ Kanban ══════════════════════════ */

.kanban {
  display: grid;
  gap: 0.875rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: start;
}
.kcol {
  border: 1px solid var(--zinc-200);
  border-radius: 1rem;
  background: var(--zinc-50);
  padding: 0.75rem;
}
.kcol__h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--zinc-500);
}
.kcol__h span {
  border-radius: 999px;
  background: var(--zinc-200);
  padding: 1px 7px;
  font-size: 10px;
  color: var(--zinc-600);
}
.kcard {
  border: 1px solid var(--zinc-200);
  border-left: 3px solid var(--zinc-300);
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.75rem;
  cursor: grab;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}
.kcard + .kcard {
  margin-top: 0.5rem;
}
.kcard:hover {
  box-shadow: 0 10px 26px -20px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
.kcard--alta {
  border-left-color: #dc2626;
}
.kcard--media {
  border-left-color: #f59e0b;
}
.kcard--baja {
  border-left-color: #2bbe9b;
}
.kcard__t {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}
.kcard__m {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 11px;
  color: var(--zinc-400);
}

.ava {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--zinc-200);
  font-size: 9px;
  font-weight: 700;
  color: var(--zinc-600);
}
.ava--a {
  background: #fde8e2;
  color: #a03a26;
}
.ava--b {
  background: #dbeafe;
  color: #1d4ed8;
}
.ava--c {
  background: #dcfce7;
  color: #15803d;
}
.ava--d {
  background: #ede9fe;
  color: #6d28d9;
}
.ava--e {
  background: #fef3c7;
  color: #b45309;
}
.ava-stack {
  display: flex;
}
.ava-stack .ava + .ava {
  margin-left: -6px;
  border: 2px solid #fff;
}

/* ══════════════════════════ Documentos ══════════════════════════ */

.doc-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border-bottom: 1px solid var(--zinc-100);
  padding: 0.875rem 0;
}
.doc-row:last-child {
  border-bottom: 0;
}
.doc-ico {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.625rem;
  background: var(--zinc-100);
  color: var(--zinc-500);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.doc-ico--pdf {
  background: #fef2f2;
  color: #b91c1c;
}
.doc-ico--xls {
  background: #ecfdf5;
  color: #005c48;
}
.doc-ico--doc {
  background: #eff6ff;
  color: #1d4ed8;
}
.doc-ico--img {
  background: #f5f3ff;
  color: #6d28d9;
}

.ocr {
  border: 1px dashed rgba(80, 216, 180, 0.5);
  border-radius: 0.875rem;
  background: rgba(80, 216, 180, 0.07);
  padding: 1rem;
}
.ocr__kv {
  display: grid;
  gap: 0.5rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin-top: 0.75rem;
}
.ocr__kv div {
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid var(--zinc-200);
  padding: 0.5rem 0.625rem;
}
.ocr__kv dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--zinc-400);
}
.ocr__kv dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 500;
}

/* ══════════════════════════ Alertas / bitácora ══════════════════════════ */

.alerta {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  border: 1px solid var(--zinc-200);
  border-radius: 0.875rem;
  background: #fff;
  padding: 0.875rem 1rem;
}
.alerta--bad {
  border-color: rgba(220, 38, 38, 0.3);
  background: #fef2f2;
}
.alerta--warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
}
.alerta__ico {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid var(--zinc-200);
  color: var(--zinc-500);
}
.alerta--bad .alerta__ico {
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.25);
}
.alerta--warn .alerta__ico {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}
.alerta__t {
  font-size: 0.875rem;
  font-weight: 500;
}
.alerta__d {
  margin-top: 2px;
  font-size: 12px;
  color: var(--zinc-500);
}

.log {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.log li {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1rem;
  border-bottom: 1px solid var(--zinc-100);
  padding: 0.625rem 0;
}
.log li:last-child {
  border-bottom: 0;
}
.log time {
  font-size: 11px;
  color: var(--zinc-400);
  font-variant-numeric: tabular-nums;
}
.log b {
  font-weight: 500;
}
.log .acc {
  display: inline-block;
  margin-right: 0.375rem;
  border-radius: 4px;
  background: var(--zinc-100);
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--zinc-500);
}
.log .acc--crea {
  background: #ecfdf5;
  color: #005c48;
}
.log .acc--edita {
  background: #eff6ff;
  color: #1d4ed8;
}
.log .acc--borra {
  background: #fef2f2;
  color: #b91c1c;
}
.log .acc--estado {
  background: var(--brand-acento-soft);
  color: var(--verde-800);
}

/* ══════════════════════════ Switch / toggles ══════════════════════════ */

.switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: var(--zinc-300);
  padding: 0;
  transition: background-color 0.18s;
}
.switch[data-on='true'] {
  background: var(--brand-acento);
}
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s;
}
.switch[data-on='true'] i {
  transform: translateX(16px);
}

.opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--zinc-100);
  padding: 0.75rem 0;
}
.opt-row:last-child {
  border-bottom: 0;
}
.opt-row p:first-child {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--brand-primario);
}
.opt-row p:last-child {
  margin-top: 2px;
  font-size: 12px;
  color: var(--zinc-400);
}

/* ══════════════════════════ Integraciones ══════════════════════════ */

.integ {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  border: 1px solid var(--zinc-200);
  border-radius: 1rem;
  background: #fff;
  padding: 1.125rem;
}
.integ__logo {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: var(--zinc-100);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--zinc-600);
}

.estado-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 11px;
  font-weight: 500;
}
.estado-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.estado-dot--on {
  color: #005c48;
}
.estado-dot--off {
  color: var(--zinc-400);
}
.estado-dot--err {
  color: #b91c1c;
}

/* ══════════════════════════ Modal ══════════════════════════ */

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background: rgba(24, 24, 27, 0.55);
  backdrop-filter: blur(4px);
  padding: 1.5rem;
}
.modal {
  width: 100%;
  max-width: 40rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.modal--sm {
  max-width: 26rem;
}
.modal__h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--zinc-100);
  padding: 1.25rem 1.5rem;
}
.modal__h h3 {
  font-size: 1.0625rem;
}
.modal__h p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--zinc-400);
}
.modal__b {
  max-height: 60vh;
  overflow-y: auto;
  padding: 1.5rem;
}
.modal__f {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  border-top: 1px solid var(--zinc-100);
  background: var(--zinc-50);
  padding: 0.875rem 1.5rem;
}

/* ══════════════════════════ Toast ══════════════════════════ */

.toast-wrap {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 4000;
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: 0.875rem;
  background: var(--brand-primario);
  padding: 0.75rem 1rem;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  animation: toast-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast svg {
  color: var(--brand-acento);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ══════════════════════════ Misc ══════════════════════════ */

.divider {
  height: 1px;
  background: var(--zinc-100);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--zinc-400);
}

.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  border: 1px dashed var(--zinc-300);
  border-radius: 0.875rem;
  background: #fff;
  padding: 0.75rem 1rem;
  font-size: 12px;
  color: var(--zinc-500);
}
.demo-note svg {
  color: var(--brand-acento);
}

.row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.row--between {
  justify-content: space-between;
}
.row--wrap {
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 0.75rem;
}
.stack--sm {
  gap: 0.5rem;
}
.stack--lg {
  gap: 1.25rem;
}

.fade-in {
  animation: fade-in 0.2s ease-out;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media print {
  .sidebar,
  .topbar,
  .avisos,
  .no-print {
    display: none !important;
  }
  .main {
    overflow: visible !important;
  }
  .card {
    break-inside: avoid;
  }
}
