:root {
  color-scheme: light;
  --bg-page: #f3f5f8;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f8fafc;
  --bg-sidebar: #f4f6f9;
  --bg-sidebar-alt: #edf1f5;
  --bg-sidebar-active: #dbeafc;
  --line: #d9e1ea;
  --line-strong: #c5ced8;
  --text-primary: #132031;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --brand-blue: #1565c0;
  --brand-blue-strong: #1e88e5;
  --brand-navy: #1a237e;
  --brand-soft: #e8eefc;
  --accent: var(--brand-blue);
  --accent-dark: #283593;
  --accent-soft: var(--brand-soft);
  --info: var(--brand-blue-strong);
  --warning: #fb8c00;
  --danger: #e14f5f;
  --success: #28a745;
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
  --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 228px;
  --sidebar-collapsed-width: 62px;
  --content-max: 1480px;
}

.platform-support-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #102a56;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.platform-support-banner strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.platform-support-banner span {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.84rem;
}

.platform-support-banner a {
  color: #0f62c9;
  font-weight: 800;
  text-decoration: none;
}

.superadmin-health-summary,
.superadmin-actions--health {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.superadmin-health-status {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.82rem;
  font-weight: 900;
}

.superadmin-health-status--verde {
  background: #dcfce7;
  color: #166534;
}

.superadmin-health-status--amarillo {
  background: #fef3c7;
  color: #92400e;
}

.superadmin-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
}

.superadmin-global-health {
  margin-bottom: 1rem;
}

.superadmin-health-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0.8rem 0 1rem;
}

.superadmin-health-check {
  display: grid;
  gap: 0.35rem;
  min-height: 96px;
  padding: 0.85rem;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}

.superadmin-health-check.is-pending {
  border-color: #fde68a;
  background: #fffbeb;
}

.superadmin-health-check strong {
  font-size: 0.9rem;
}

.superadmin-health-check small {
  color: #52627a;
}

.superadmin-shell {
  display: grid;
  gap: 14px;
  scroll-margin-top: 88px;
}

.superadmin-hero,
.superadmin-card,
.superadmin-table-shell,
.superadmin-form {
  background: #fff;
  border: 1px solid #d8e4f3;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(15, 39, 73, 0.08);
}

.superadmin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #f8fbff 0%, #eaf4ff 100%);
}

.superadmin-hero h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.55rem, 2.35vw, 2.25rem);
  line-height: 1.05;
  color: #111d2f;
}

.superadmin-hero p {
  max-width: 720px;
  margin: 0;
  color: #53677f;
  line-height: 1.6;
}

.superadmin-hero__guard {
  min-width: 240px;
  padding: 16px;
  border: 1px solid #bdd7f4;
  border-radius: 14px;
  background: #ffffffd9;
}

.superadmin-hero__guard span,
.superadmin-hero__guard strong {
  display: block;
}

.superadmin-hero__guard span {
  color: #5d7087;
  font-size: 0.85rem;
}

.superadmin-hero__guard strong {
  margin-top: 4px;
  color: #0b58b2;
}

.superadmin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.superadmin-tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d5e1ef;
  border-radius: 999px;
  color: #21344d;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
}

.superadmin-tab.is-active {
  color: #fff;
  background: #0f62c9;
  border-color: #0f62c9;
}

.superadmin-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.superadmin-toolbar input,
.superadmin-form input:not([type="checkbox"]),
.superadmin-form select,
.superadmin-setting-row input:not([type="checkbox"]),
.superadmin-setting-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfdced;
  border-radius: 12px;
  padding: 0 12px;
  color: #15243a;
  background: #fff;
}

.superadmin-table-shell {
  overflow: auto;
  padding: 8px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.superadmin-table-shell--companies {
  padding: 8px 10px;
}

.superadmin-companies-table {
  table-layout: fixed;
  min-width: 1040px;
  font-size: 0.78rem;
}

.superadmin-companies-table th,
.superadmin-companies-table td {
  padding: 7px 6px;
  line-height: 1.25;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}

.superadmin-companies-table th {
  letter-spacing: 0.045em;
}

.superadmin-companies-table th:nth-child(1),
.superadmin-companies-table td:nth-child(1) {
  width: 15%;
}

.superadmin-companies-table th:nth-child(2),
.superadmin-companies-table td:nth-child(2) {
  width: 10%;
}

.superadmin-companies-table th:nth-child(3),
.superadmin-companies-table td:nth-child(3) {
  width: 13%;
}

.superadmin-companies-table th:nth-child(4),
.superadmin-companies-table td:nth-child(4) {
  width: 12%;
}

.superadmin-companies-table th:nth-child(5),
.superadmin-companies-table td:nth-child(5) {
  width: 14%;
}

.superadmin-companies-table th:nth-child(6),
.superadmin-companies-table td:nth-child(6),
.superadmin-companies-table th:nth-child(7),
.superadmin-companies-table td:nth-child(7) {
  width: 7%;
  text-align: center;
}

.superadmin-companies-table th:nth-child(8),
.superadmin-companies-table td:nth-child(8) {
  width: 12%;
}

.superadmin-companies-table th:nth-child(9),
.superadmin-companies-table td:nth-child(9) {
  width: 10%;
}

.superadmin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.superadmin-actions .button--small {
  min-height: 30px;
  padding-inline: 8px;
  font-size: 0.76rem;
  line-height: 1;
}

.superadmin-row-actions {
  position: relative;
  display: inline-block;
}

.superadmin-row-actions summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d4e0ef;
  border-radius: 10px;
  background: #fff;
  color: #15243a;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.superadmin-row-actions summary::-webkit-details-marker {
  display: none;
}

.superadmin-row-actions summary::after {
  content: "expand_more";
  margin-left: 4px;
  font-family: "Material Symbols Rounded";
  font-size: 1rem;
  line-height: 1;
}

.superadmin-row-actions[open] summary {
  border-color: #9cc4f1;
  box-shadow: 0 0 0 3px rgba(15, 98, 201, 0.12);
}

.superadmin-row-actions[open] .superadmin-actions {
  position: absolute;
  right: 0;
  z-index: 8;
  width: 152px;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid #d8e4f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 39, 73, 0.18);
}

.superadmin-row-actions[open] .superadmin-actions .button {
  width: 100%;
  justify-content: center;
}

.superadmin-company-legal {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.superadmin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: #0d56ac;
  font-size: 0.82rem;
  font-weight: 800;
}

.superadmin-form {
  padding: 18px;
}

.superadmin-form label,
.superadmin-setting-row label {
  display: grid;
  gap: 7px;
  color: #586a82;
  font-weight: 800;
}

.superadmin-module-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #d8e4f3;
  border-radius: 14px;
}

.superadmin-module-picker legend {
  padding: 0 8px;
  color: #14213a;
  font-weight: 900;
}

.superadmin-warning,
.superadmin-result {
  margin: 14px 0;
  padding: 14px;
  border-radius: 14px;
  background: #f3f7fc;
  border: 1px solid #d9e7f6;
  color: #20334d;
}

.superadmin-result code {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #0d1526;
  color: #fff;
}

.crm-tenant-integration-notice {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid #cfe0f6;
  border-radius: 14px;
  background: #f3f8ff;
  color: #244467;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.superadmin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
}

.superadmin-card {
  padding: 18px;
}

.superadmin-card--settings {
  overflow: hidden;
}

.superadmin-admin-row,
.superadmin-setting-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(110px, 0.5fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e8eef6;
}

.superadmin-admin-row small,
.superadmin-muted-note,
.superadmin-backup-panel small {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.superadmin-admin-row:last-child,
.superadmin-setting-row:last-of-type {
  border-bottom: 0;
}

.superadmin-setting-row--module {
  grid-template-columns: minmax(210px, 1fr) minmax(180px, 220px) minmax(220px, 1fr);
}

.superadmin-setting-row--integration {
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) minmax(175px, 0.85fr) minmax(190px, 1fr) minmax(116px, 0.55fr);
}

.superadmin-setting-head {
  display: grid;
  gap: 10px;
  padding: 0 0 10px;
  color: #5e7188;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 1px solid #e8eef6;
}

.superadmin-setting-head--integration {
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) minmax(175px, 0.85fr) minmax(190px, 1fr) minmax(116px, 0.55fr);
}

.superadmin-safe-signals {
  grid-column: 1 / -1;
  color: #667b92;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.35;
}

.superadmin-badge--activo {
  background: #e8f2ff;
  color: #0d56ac;
}

.superadmin-badge--error-configuracion {
  background: #fff2f3;
  color: #b42335;
}

.superadmin-badge--roadmap {
  background: #f2f4f7;
  color: #475467;
}

.superadmin-switch {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px !important;
  min-width: 0;
  color: #253a55 !important;
}

.superadmin-switch input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.superadmin-switch__control {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #bfd0e5;
  background: #e8eef6;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background 160ms ease, border-color 160ms ease;
}

.superadmin-switch__control::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
  transition: transform 160ms ease;
}

.superadmin-switch input[type="checkbox"]:checked + .superadmin-switch__control {
  border-color: #1168c8;
  background: #1168c8;
}

.superadmin-switch input[type="checkbox"]:checked + .superadmin-switch__control::after {
  transform: translateX(16px);
}

.superadmin-switch input[type="checkbox"]:focus-visible + .superadmin-switch__control {
  outline: 3px solid rgba(17, 104, 200, 0.22);
  outline-offset: 2px;
}

.superadmin-switch__copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.superadmin-switch__copy strong {
  color: #1c314b;
  line-height: 1.12;
}

.superadmin-switch__copy small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.superadmin-audit-table {
  min-width: 980px;
}

.superadmin-audit-detail {
  margin-top: 6px;
}

.superadmin-audit-detail summary {
  cursor: pointer;
  color: #0d56ac;
  font-size: 0.78rem;
  font-weight: 850;
}

.superadmin-audit-detail pre {
  max-height: 210px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid #d7e4f2;
  border-radius: 10px;
  background: #f7fbff;
  color: #1d2d44;
  white-space: pre-wrap;
  word-break: break-word;
}

.superadmin-backup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.superadmin-backup-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d8e4f3;
  border-radius: 12px;
  background: #f8fbff;
}

.superadmin-backup-grid strong {
  display: block;
  margin: 5px 0;
  color: #13223a;
}

.superadmin-backup-list {
  margin-bottom: 0;
}

@media (max-width: 1280px) {
  .superadmin-companies-table {
    min-width: 1000px;
    font-size: 0.74rem;
  }

  .superadmin-actions .button--small {
    padding-inline: 7px;
    font-size: 0.72rem;
  }

  .superadmin-setting-row--integration,
  .superadmin-setting-head--integration {
    grid-template-columns: minmax(160px, 1fr) minmax(170px, 0.92fr) minmax(160px, 0.82fr) minmax(170px, 0.9fr) minmax(110px, 0.52fr);
  }
}

@media (max-width: 900px) {
  .superadmin-hero,
  .superadmin-toolbar,
  .superadmin-two-col,
  .superadmin-admin-row,
  .superadmin-setting-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .superadmin-setting-head {
    display: none;
  }

  .superadmin-hero {
    padding: 20px;
  }

  .superadmin-hero h2 {
    font-size: 1.75rem;
  }

  .superadmin-hero__guard {
    min-width: 0;
  }

  .superadmin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .superadmin-tab {
    white-space: nowrap;
  }

  .superadmin-table-shell {
    padding: 8px;
  }

  .superadmin-health-groups {
    grid-template-columns: 1fr;
  }

  .superadmin-companies-table,
  .superadmin-audit-table {
    min-width: 0;
    table-layout: auto;
    font-size: 0.82rem;
  }

  .superadmin-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .superadmin-actions .button--small {
    width: 100%;
    justify-content: center;
  }

  .superadmin-row-actions {
    width: 100%;
  }

  .superadmin-row-actions summary {
    width: 100%;
    justify-content: center;
  }

  .superadmin-row-actions[open] .superadmin-actions {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .superadmin-backup-grid {
    grid-template-columns: 1fr;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(30, 136, 229, 0.12), transparent 22%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg-page) 100%);
  color: var(--text-primary);
}

body[data-boot-state="pending"] .content-shell {
  position: relative;
  min-height: 100vh;
}

body[data-boot-state="pending"] .content-shell > .topbar,
body[data-boot-state="pending"] .content-shell > .page-content {
  visibility: hidden;
}

body[data-boot-state="pending"] .content-shell::after {
  content: "Cargando modulo...";
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 12;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 48px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

body.panel-nav-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg-sidebar) 100%);
  color: var(--text-primary);
  border-right: 1px solid #d5dde7;
  transition:
    transform 220ms ease,
    width 220ms ease;
  overflow: hidden;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.48rem 0.56rem 0.42rem;
  border-bottom: 1px solid #dde5ee;
}

.sidebar__logo {
  width: 132px;
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.14));
}

.sidebar__logo--compact {
  display: none;
}

body.platform-console-shell .sidebar__brand {
  justify-content: flex-start;
  min-height: 70px;
  padding: 0.74rem 1rem;
  background: linear-gradient(135deg, #0b1f3a 0%, #0f62c9 100%);
}

.platform-brand-wordmark {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 0.12rem;
  color: #ffffff;
  text-decoration: none;
  line-height: 1;
}

.platform-brand-wordmark span,
.platform-brand-wordmark strong {
  font-size: 1.28rem;
  letter-spacing: 0;
}

.platform-brand-wordmark span {
  font-weight: 650;
}

.platform-brand-wordmark strong {
  font-weight: 900;
}

.platform-brand-wordmark small {
  grid-column: 1 / -1;
  margin-top: 0.16rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.platform-console-shell .sidebar__footer {
  display: none;
}

.sidebar__profile {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 0.44rem;
  align-items: center;
  padding: 0.46rem 0.54rem 0.5rem;
  border-bottom: 1px solid #dde5ee;
  overflow: hidden;
}

.sidebar__avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #1f8af2, #0f5ba8);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sidebar__profile strong,
.sidebar__profile span {
  display: block;
}

.sidebar__profile strong {
  font-size: 0.8rem;
}

.sidebar__profile span {
  margin-top: 0.04rem;
  color: #5f7186;
  font-size: 0.68rem;
}

.sidebar__logout {
  grid-column: 1 / -1;
  min-height: 30px;
  margin-top: 0.2rem;
  border: 1px solid #ced7e2;
  border-radius: 10px;
  background: #ffffff;
  color: #2f4056;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.sidebar__logout:hover,
.sidebar__logout:focus-visible {
  background: #ffe8e9;
  border-color: #f0b2b7;
}

.sidebar__logout:disabled {
  opacity: 0.7;
  cursor: wait;
}

.sidebar__nav {
  flex: 1;
  overflow: auto;
  padding: 0.36rem 0.42rem 0.58rem;
  display: grid;
  gap: 0.24rem;
}

.sidebar__nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar__nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.2);
}

.nav-item,
.nav-group__button,
.nav-subitem {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 0.42rem;
  min-height: 35px;
  padding: 0.24rem 0.34rem;
  border-radius: 10px;
  color: #44596f;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
  overflow: hidden;
}

.nav-item,
.nav-group__button,
.nav-subitem {
  width: 100%;
  border: none;
  text-align: left;
  background: transparent;
}

.nav-item:hover,
.nav-group__button:hover,
.nav-subitem:hover {
  background: #e8eff7;
  color: #1b4e85;
  transform: translateX(1px);
}

.nav-item.is-active,
.nav-group.is-active > .nav-group__button,
.nav-subitem.is-active {
  background: var(--bg-sidebar-active);
  color: #115397;
}

.nav-item.is-active::after,
.nav-group.is-active > .nav-group__button::after {
  display: none;
}

.nav-item__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf0f7;
  color: #49627b;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.nav-item.is-active .nav-item__icon,
.nav-group.is-active > .nav-group__button .nav-item__icon,
.nav-subitem.is-active .nav-subitem__icon {
  background: #1f7fd8;
  color: #ffffff;
}

.material-symbols-rounded.nav-item__icon {
  font-size: 0.92rem;
  font-weight: normal;
  letter-spacing: normal;
}

.nav-item__icon--canonical {
  font-size: 0;
  letter-spacing: 0;
}

.nav-icon-svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-group {
  display: grid;
  gap: 0.18rem;
}

.nav-group__button {
  cursor: pointer;
}

.nav-item__label,
.nav-group__label {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.84rem;
  line-height: 1.12;
}

.nav-group__arrow {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(93, 118, 144, 0.12);
  color: #5f758f;
}

.nav-group__arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.nav-group.is-open .nav-group__arrow::before {
  transform: rotate(45deg);
}

.nav-group:not(.is-open) .nav-group__arrow::before {
  transform: rotate(-45deg);
}

.nav-subitem__icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #60748a;
  background: #edf2f7;
  font-size: 0.62rem;
  font-weight: 800;
}

.nav-group__submenu {
  display: none;
  gap: 0.14rem;
  padding: 0.28rem;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #dee6f0;
}

.nav-group.is-open .nav-group__submenu {
  display: grid;
}

.nav-subitem {
  min-height: 34px;
  padding-block: 0.2rem;
  color: #5c7189;
}

.nav-subitem__label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.79rem;
  line-height: 1.1;
}

.nav-subgroup-label {
  margin-top: 0.18rem;
  padding: 0.26rem 0.34rem 0.12rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5e7390;
  border-top: 1px dashed #d6e1ef;
}

.nav-subgroup {
  display: grid;
  gap: 0.14rem;
}

.nav-subgroup--pinned {
  margin-top: 0.1rem;
  padding-top: 0.14rem;
  border-top: 1px dashed #d6e1ef;
}

.nav-subgroup__button {
  width: 100%;
  border: none;
  text-align: left;
  background: transparent;
  cursor: pointer;
  display: grid;
  grid-template-columns: 26px 1fr 18px;
  align-items: center;
  gap: 0.36rem;
  min-height: 33px;
  padding: 0.2rem 0.24rem;
  border-radius: 10px;
  color: #5c7189;
}

.nav-subgroup__button:hover {
  background: #e8eff7;
  color: #1b4e85;
}

.nav-subgroup__arrow {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(93, 118, 144, 0.12);
  color: #5f758f;
}

.nav-subgroup__arrow::before {
  content: "expand_more";
  font-family: "Material Symbols Rounded";
  font-size: 14px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 20;
  transition: transform 180ms ease;
  transform: rotate(-90deg);
}

.nav-subgroup.is-open .nav-subgroup__arrow::before,
.nav-subgroup.is-active .nav-subgroup__arrow::before {
  transform: rotate(0deg);
}

.nav-subgroup__submenu {
  display: none;
  gap: 0.14rem;
  padding-left: 0.28rem;
}

.nav-subgroup.is-open .nav-subgroup__submenu,
.nav-subgroup.is-active .nav-subgroup__submenu {
  display: grid;
}

.nav-subitem--nested {
  min-height: 32px;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--brand-blue-strong);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar__footer {
  margin-top: auto;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid #dde5ee;
}

.sidebar__ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #5a6f86;
  font-weight: 700;
}

.content-shell {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 220ms ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.72rem 1.1rem;
  background: rgba(243, 245, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(197, 206, 216, 0.8);
}

.topbar__utility {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.topbar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.topbar__toggle-icon {
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1;
}

.topbar__headline h1 {
  margin: 0.18rem 0 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.42rem, 1.7vw, 2rem);
  line-height: 1.05;
}

.topbar__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.topbar__notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

.topbar-notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(19, 32, 49, 0.12);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.topbar-notification-button:hover,
.topbar-notification-button.is-open {
  border-color: rgba(0, 92, 185, 0.28);
  background: #eef6ff;
}

.topbar-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 0.34rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.topbar-notification-dropdown {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 30;
  width: min(380px, calc(100vw - 1.5rem));
  max-height: min(72vh, 620px);
  overflow: auto;
  border: 1px solid rgba(197, 206, 216, 0.85);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.topbar-notification-header,
.topbar-notification-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.78rem 0.88rem;
  border-bottom: 1px solid #e4ebf3;
}

.topbar-notification-footer {
  border-top: 1px solid #e4ebf3;
  border-bottom: 0;
}

.topbar-notification-header strong {
  color: var(--text-primary);
}

.topbar-notification-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  padding: 0.72rem 0.88rem;
  border-bottom: 1px solid #e4ebf3;
}

.topbar-notification-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.3rem 0.48rem;
  border-radius: 999px;
  background: #f3f8fc;
  color: #16324d;
  font-size: 0.76rem;
  font-weight: 800;
}

.topbar-notification-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar-notification-item {
  display: grid;
  gap: 0.24rem;
  padding: 0.78rem 0.88rem;
  border-bottom: 1px solid #eef2f7;
  color: var(--text-primary);
  text-decoration: none;
}

.topbar-notification-item:hover {
  background: #f6faff;
}

.topbar-notification-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.topbar-notification-item__title {
  color: var(--text-primary);
  font-weight: 850;
}

.topbar-notification-item__body {
  color: #4c6278;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.topbar-notification-empty {
  padding: 1.1rem;
  color: var(--text-muted);
  font-weight: 750;
  text-align: center;
}

.contracts-topbar-actions .button {
  min-height: 36px;
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
}

.topbar-density-toggle {
  min-width: 152px;
  white-space: nowrap;
}

.eyebrow,
.hero-banner__eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-content {
  max-width: var(--content-max);
  padding: 1.45rem;
}

body.platform-console-shell {
  --sidebar-width: 214px;
  --content-max: 1280px;
}

body.platform-console-shell .page-content {
  width: min(100%, var(--content-max));
  padding: 1.25rem;
}

body.platform-console-shell .topbar__headline h1 {
  font-size: clamp(1.25rem, 1.6vw, 1.8rem);
}

body[data-page="clientes"] .topbar {
  gap: 0.62rem;
  padding: 0.54rem 0.95rem;
}

body[data-page="clientes"] .topbar__toggle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

body[data-page="clientes"] .topbar__headline h1 {
  margin-top: 0.12rem;
  font-size: clamp(1.2rem, 1.44vw, 1.64rem);
}

body[data-page="clientes"] .page-content {
  padding: 0.95rem 1.18rem 1.08rem;
}

body.panel-density-compact .topbar {
  padding: 0.5rem 0.8rem;
  gap: 0.6rem;
}

body.panel-density-compact .topbar__toggle {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

body.panel-density-compact .topbar__headline h1 {
  font-size: clamp(1.16rem, 1.35vw, 1.58rem);
}

body.panel-density-compact .eyebrow,
body.panel-density-compact .section-kicker {
  font-size: 0.72rem;
}

body.panel-density-compact .page-content {
  padding: 1rem;
}

body.panel-density-compact .toolbar-card,
body.panel-density-compact .table-card,
body.panel-density-compact .module-card {
  padding: 0.82rem;
}

body.panel-density-compact .button {
  min-height: 36px;
  padding: 0.48rem 0.74rem;
  font-size: 0.86rem;
}

body.panel-density-compact .button--tiny {
  min-height: 30px;
  font-size: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.68rem 0.98rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.button--primary {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-strong));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(21, 101, 192, 0.24);
}

.button--efnet-cyan {
  background: linear-gradient(135deg, #00cce4, #00e5ff);
  color: #03233a;
  box-shadow: 0 12px 26px rgba(0, 167, 196, 0.26);
}

.button--efnet-cyan:hover {
  background: linear-gradient(135deg, #00b9cf, #00d4ef);
  color: #03233a;
}

.button--secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.35);
  color: var(--text-primary);
  border: 1px solid rgba(19, 32, 49, 0.1);
}

.button--info {
  background: var(--brand-blue-strong);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(30, 136, 229, 0.24);
}

.button--success {
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(21, 101, 192, 0.24);
}

.button--warning {
  background: #df7a08;
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(223, 122, 8, 0.28);
}

.button--danger {
  background: #b50000;
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(181, 0, 0, 0.24);
}

.button--small {
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

.button--tiny {
  min-height: 36px;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.84rem;
  box-shadow: none;
}

.btn-efnet,
.button.btn-efnet {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-strong));
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-efnet-outline,
.button.btn-efnet-outline {
  background: #ffffff;
  color: var(--brand-blue);
  border: 1px solid rgba(21, 101, 192, 0.3);
}

.button.is-disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.button--full {
  width: 100%;
}

.hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.55rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(30, 136, 229, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(21, 101, 192, 0.14), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(21, 101, 192, 0.24);
  box-shadow: var(--shadow-md);
}

.hero-banner h2 {
  margin: 0.4rem 0 0.8rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.7rem, 2.5vw, 2.6rem);
  line-height: 1.1;
}

.hero-banner p {
  max-width: 720px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-banner--compact {
  align-items: flex-start;
}

.hero-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 1.45rem;
}

.stat-card,
.panel-card,
.toolbar-card,
.table-card {
  background: var(--bg-surface);
  border: 1px solid rgba(197, 206, 216, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.toolbar-card,
.table-card {
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.stat-card {
  position: relative;
  padding: 1.35rem 1.35rem 1.25rem;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: #dbe6ef;
}

.stat-card--success::before {
  background: var(--success);
}

.stat-card--warning::before {
  background: var(--warning);
}

.stat-card--info::before {
  background: var(--info);
}

.stat-card__label {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stat-card strong {
  display: block;
  margin-top: 0.75rem;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.1;
}

.stat-card span:last-child {
  display: block;
  margin-top: 0.55rem;
  color: var(--text-muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 1.1rem;
  margin-top: 1.25rem;
}

.panel-card {
  padding: 1.45rem;
}

.panel-card--wide {
  grid-row: span 2;
}

.panel-card__head,
.table-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.panel-card h2,
.table-card h2 {
  margin: 0.28rem 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.panel-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.86rem;
}

.finance-bars {
  display: grid;
  gap: 1.4rem;
}

.finance-bars__chart {
  min-height: 280px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 1rem;
  padding: 1.25rem 1rem 0.5rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    var(--bg-surface-soft);
  background-size: 100% 25%, 25% 100%;
  border: 1px solid rgba(197, 206, 216, 0.6);
}

.bar-column {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
}

.bar-column__value {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.bar {
  width: min(74px, 100%);
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #6ae28e 0%, #1fa45e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.bar--green {
  background: linear-gradient(180deg, #6de193 0%, #28a461 100%);
}

.finance-bars__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  color: var(--text-muted);
  font-weight: 700;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 0.45rem;
  border-radius: 999px;
}

.legend-dot--green {
  background: var(--success);
}

.legend-dot--blue {
  background: var(--info);
}

.legend-dot--orange {
  background: var(--warning);
}

.quick-list,
.alert-list {
  display: grid;
  gap: 0.9rem;
}

.quick-link,
.alert-item {
  padding: 1rem 1rem 1.05rem;
  border-radius: 18px;
  background: var(--bg-surface-soft);
  border: 1px solid rgba(197, 206, 216, 0.7);
}

.quick-link strong,
.alert-item strong {
  display: block;
  font-size: 1rem;
}

.quick-link span,
.alert-item span {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.quick-link:hover {
  border-color: rgba(21, 101, 192, 0.4);
  transform: translateY(-1px);
}

.toolbar-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(180px, 0.55fr));
  gap: 0.8rem;
  padding: 0.95rem;
  margin-top: 1rem;
}

.control-stack {
  grid-template-columns: 1fr;
}

.control-stack__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(217, 225, 234, 0.85);
}

.control-stack__head h2 {
  margin: 0.24rem 0 0;
  font-size: 1.15rem;
  line-height: 1.15;
}

.control-stack__body {
  display: grid;
  gap: 0.85rem;
}

.control-stack__body.is-hidden {
  display: none !important;
}

.control-stack--collapsed {
  padding-bottom: 0.8rem;
}

#clientControlPanel {
  margin-top: 0.38rem;
  padding: 0.62rem 0.68rem;
}

#clientControlPanel .control-stack__head {
  padding-bottom: 0.36rem;
}

#clientControlPanel .control-stack__head h2 {
  font-size: 0.95rem;
  margin-top: 0.08rem;
}

#clientControlPanel.control-stack--collapsed {
  padding: 0.46rem 0.62rem;
}

#clientControlPanel.control-stack--collapsed .control-stack__head {
  border-bottom: 0;
  padding-bottom: 0;
}

#clientControlPanel .control-stack__body {
  gap: 0.56rem;
}

#clientControlPanel .control-strip,
#clientControlPanel .table-toolbar {
  gap: 0.58rem;
}

#clientControlPanel .control-strip .field {
  min-width: min(100%, 420px);
  flex: 1 1 240px;
}

#clientControlPanel .compact-button {
  min-height: 44px;
  padding-inline: 0.9rem;
}

.control-strip,
.table-toolbar,
.mini-actions {
  display: flex;
  align-items: end;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.mini-actions {
  position: relative;
}

.control-strip .field {
  min-width: min(100%, 520px);
  flex: 1 1 320px;
}

.control-strip--dense .field {
  min-width: min(100%, 320px);
  flex: 0 1 320px;
}

.client-bulk-target {
  min-width: min(100%, 320px);
}

.compact-button {
  min-height: 52px;
  padding-inline: 1.05rem;
}

.mini-button {
  min-height: 36px;
  padding: 0.44rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
}

.mini-button.is-active,
.mini-button[aria-pressed="true"] {
  border-color: rgba(21, 101, 192, 0.72);
  background: rgba(21, 101, 192, 0.1);
  color: var(--brand-blue-strong);
  box-shadow: inset 0 0 0 1px rgba(21, 101, 192, 0.16);
}

.contracts-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  min-height: 40px;
}

.mini-button--icon-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
}

.mini-button--icon-label .material-symbols-rounded {
  font-size: 0.96rem;
  line-height: 1;
}

.mini-records-control {
  min-height: 36px;
  padding: 0.36rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.mini-records-control select {
  min-height: 28px;
  min-width: 3.4rem;
  border: 1px solid rgba(197, 206, 216, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.12rem 0.36rem;
}

.mini-records-control select:focus {
  outline: none;
  border-color: rgba(21, 101, 192, 0.72);
  box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.14);
}

.mini-records-control--brand {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #ffffff;
}

.mini-records-control--brand select {
  color: var(--text-primary);
  min-width: 3.25rem;
}

.mini-records-control select option {
  color: var(--text-primary);
}

.mini-button--green,
.mini-button--brand {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #ffffff;
}

.mini-button--blue {
  background: var(--brand-blue-strong);
  border-color: var(--brand-blue-strong);
  color: #ffffff;
}

.mini-button--violet {
  background: #8f67dd;
  border-color: #8f67dd;
  color: #ffffff;
}

.mini-button--warning {
  background: #f57c00;
  border-color: #f57c00;
  color: #ffffff;
}

.mini-button--danger {
  background: #d32f2f;
  border-color: #d32f2f;
  color: #ffffff;
}

.mini-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.table-search {
  margin-left: auto;
  min-width: min(100%, 280px);
}

.client-columns-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 20;
  width: min(340px, calc(100vw - 3rem));
  max-height: 380px;
  overflow: auto;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(21, 101, 192, 0.36);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(19, 58, 112, 0.99), rgba(10, 36, 79, 0.98));
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.22);
}

.client-columns-menu[hidden] {
  display: none !important;
}

.client-columns-menu__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.2rem 0;
  color: #ffffff;
  font-weight: 700;
}

.client-columns-menu__item input {
  width: 17px;
  height: 17px;
  accent-color: #ffffff;
}

.module-shell {
  display: grid;
  gap: 1.2rem;
}

.module-hero {
  padding: 1.6rem 1.7rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(30, 136, 229, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(21, 101, 192, 0.12), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(21, 101, 192, 0.24);
  box-shadow: var(--shadow-md);
}

.module-hero h2 {
  margin: 0.3rem 0 0.8rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.6rem, 2vw, 2.3rem);
  line-height: 1.1;
}

.module-hero p {
  max-width: 900px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.module-hero .hero-meta {
  margin-top: 0.8rem;
  display: inline-grid;
  gap: 0.2rem;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(21, 101, 192, 0.24);
  background: rgba(255, 255, 255, 0.82);
}

.module-hero .hero-meta strong {
  color: var(--text-primary);
  font-size: 1.2rem;
  line-height: 1;
}

.module-hero .hero-meta span {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.module-stats {
  margin-top: 0;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 1.1rem;
}

.is-hidden {
  display: none !important;
}

.invoice-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  gap: 0.85rem;
  align-items: start;
}

.invoice-workspace__left {
  min-width: 0;
  display: grid;
  gap: 0.95rem;
}

.invoice-workspace__right {
  min-width: 0;
  position: sticky;
  top: 0.9rem;
  align-self: start;
}

.invoice-workspace .module-card {
  padding: 0.72rem !important;
}

.invoice-stats-compact {
  margin-top: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
}

.invoice-stats-compact .stat-card {
  padding: 0.48rem 0.6rem 0.44rem;
  border-radius: 10px;
}

.invoice-stats-compact .stat-card__label {
  font-size: 0.58rem;
  letter-spacing: 0.05em;
}

.invoice-stats-compact .stat-card strong {
  margin-top: 0.14rem;
  font-size: clamp(0.95rem, 1vw, 1.12rem);
}

.invoice-stats-compact .stat-card span:last-child {
  margin-top: 0.08rem;
  font-size: 0.66rem;
  line-height: 1.2;
}

.invoice-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.invoice-edit-panel .field-grid--compact {
  grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1.4fr);
}

.invoice-edit-panel textarea,
.invoice-edit-panel input {
  min-height: 36px;
}

.invoice-edit-items {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.55rem;
}

.invoice-edit-items__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.invoice-edit-items__head strong {
  font-size: 0.85rem;
  color: var(--text-main);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.invoice-edit-table {
  min-width: 880px;
}

.invoice-edit-table th,
.invoice-edit-table td {
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
}

.invoice-edit-table input,
.invoice-edit-table select {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(196, 205, 215, 0.9);
  border-radius: 8px;
  padding: 0.3rem 0.45rem;
  font-size: 0.82rem;
  background: #ffffff;
}

.invoice-edit-row-total {
  font-size: 0.82rem;
}

.invoice-edit-help {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.detail-list--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.detail-list--compact .detail-list__item {
  padding: 0.62rem 0.72rem;
  border-radius: 12px;
}

.detail-list--compact .detail-list__item span {
  font-size: 0.69rem;
  letter-spacing: 0.035em;
}

.detail-list--compact .detail-list__item strong {
  margin-top: 0.2rem;
  font-size: 0.88rem;
  line-height: 1.32;
}

.invoice-preview-card {
  padding: 0.75rem;
}

.invoice-preview-frame-wrap {
  border: 1px solid rgba(197, 206, 216, 0.72);
  border-radius: 14px;
  overflow: hidden;
  background: #f4f7fa;
  min-height: min(78vh, 780px);
  height: min(78vh, 780px);
  aspect-ratio: 5.5 / 8.5;
}

.invoice-preview-frame {
  width: 100%;
  height: 100%;
  min-height: min(78vh, 780px);
  border: 0;
  background: #ffffff;
}

.invoice-preview-state {
  margin: 0.5rem 0 0.8rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.payment-provider-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payment-provider-logo {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.payment-provider-logo--wompi {
  background: linear-gradient(135deg, #101820 0%, #1f2937 100%);
}

.payment-provider-logo--mercadopago {
  background: linear-gradient(135deg, #00a8ff 0%, #008ad8 100%);
}

.invoice-finance-snapshot {
  align-items: start;
}

.invoice-gateways-card,
.invoice-totals-card {
  min-height: 100%;
}

.module-table--gateways {
  min-width: 540px;
}

.module-table--gateways th,
.module-table--gateways td {
  padding: 0.62rem 0.65rem;
}

.payment-provider-link {
  display: inline-block;
  font-size: 0.72rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid #bdd4ff;
  background: #eef5ff;
  color: #0b4fb4;
  text-decoration: none;
  padding: 0.18rem 0.55rem;
}

.payment-provider-link:hover {
  background: #dbe9ff;
}

.payment-provider-link-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.payment-provider-link--tiny {
  padding: 0.14rem 0.46rem;
  font-size: 0.64rem;
}

.payment-provider-domain {
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.payment-provider-empty {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.module-card {
  min-width: 0;
  padding: 1.35rem;
  background: var(--bg-surface);
  border: 1px solid rgba(197, 206, 216, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.module-card--wide {
  grid-row: span 1;
}

.internet-plan-action-panel.is-hidden {
  display: none;
}

.internet-plan-action-panel__body {
  display: grid;
  gap: 0.85rem;
}

.internet-plan-action-panel__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.internet-plan-action-panel__body th {
  width: 220px;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.internet-plan-action-panel__body .module-table--compact {
  min-width: 1120px;
}

.internet-plan-action-panel__body th:last-child,
.internet-plan-action-panel__body td[data-label="Acciones"] {
  width: 340px;
  min-width: 340px;
}

.internet-plan-action-panel__body td[data-label="Acciones"] .button-row {
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.internet-plan-action-panel__body td[data-label="Acciones"] .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.module-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.module-card__head h3 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.module-table-shell {
  overflow: auto;
  border: 1px solid rgba(217, 225, 234, 0.85);
  border-radius: 18px;
}

.portal-inbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.35fr);
  gap: 1rem;
}

.portal-inbox-list,
.portal-inbox-detail {
  min-width: 0;
  border: 1px solid rgba(217, 225, 234, 0.9);
  border-radius: 14px;
  background: #ffffff;
}

.portal-inbox-list {
  max-height: 660px;
  overflow: auto;
}

.portal-inbox-row {
  display: grid;
  width: 100%;
  gap: 0.28rem;
  padding: 0.78rem 0.86rem;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.portal-inbox-row:hover,
.portal-inbox-row.is-active {
  background: #eef6ff;
}

.portal-inbox-row__top,
.portal-inbox-row__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.portal-inbox-row__message {
  color: #4c6278;
  font-size: 0.84rem;
}

.portal-inbox-row__footer {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.portal-inbox-unread {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.4rem;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 850;
}

.portal-inbox-detail {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.portal-inbox-detail__head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.portal-inbox-detail__head h3 {
  margin: 0.1rem 0;
}

.portal-inbox-detail__head p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.portal-inbox-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.portal-inbox-meta-grid > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem;
  border-radius: 12px;
  background: #f6f9fc;
}

.portal-inbox-meta-grid strong {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.portal-message-thread {
  display: grid;
  gap: 0.62rem;
  max-height: 360px;
  overflow: auto;
  padding: 0.8rem;
  border-radius: 12px;
  background: #f8fbfd;
}

.portal-message-thread__bubble {
  display: grid;
  gap: 0.26rem;
  max-width: 82%;
  padding: 0.62rem 0.72rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #dfe8f3;
}

.portal-message-thread__bubble.is-office {
  margin-left: auto;
  border-color: rgba(0, 92, 185, 0.22);
  background: #eef6ff;
}

.portal-message-thread__bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.portal-message-thread__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.portal-inbox-reply textarea {
  min-height: 108px;
}

.portal-inbox-actions {
  justify-content: flex-start;
}

.module-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #ffffff;
}

.module-table th,
.module-table td {
  padding: 0.56rem 0.62rem;
  font-size: 0.82rem;
  line-height: 1.24;
  text-align: left;
  border-bottom: 1px solid rgba(217, 225, 234, 0.8);
}

.module-table th {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-surface-soft);
}

.module-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.03);
}

.module-table tbody tr.is-selected {
  background: rgba(59, 130, 246, 0.08);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.support-ticket-thread {
  max-height: 360px;
  overflow: auto;
}

.installations-toolbar-grid .field--actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.p130-toolbar-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.p130-svg-icon,
.p130-toolbar-action .p130-svg-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  line-height: 1;
}

.p130-icon-action {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.p130-icon-action .p130-svg-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.p130-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[data-p130-operation-view] .table-actions {
  flex-wrap: nowrap;
  gap: 0.3rem;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
}

[data-p130-operation-view] .module-table th:last-child,
[data-p130-operation-view] .module-table td:last-child {
  width: 148px;
  min-width: 148px;
  max-width: 148px;
  text-align: right;
}

[data-p130-operation-view] .module-hero {
  padding: 1rem 1.1rem;
  border-radius: 14px;
}

[data-p130-operation-view] .module-hero h2 {
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 760;
  margin: 0.25rem 0 0.25rem;
}

[data-p130-operation-view] .module-hero p {
  font-size: 0.88rem;
  line-height: 1.35;
}

[data-p130-operation-view] .p130-operation-summary {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.5rem;
}

[data-p130-operation-view] .p130-operation-summary .stat-card {
  min-height: 72px;
  padding: 0.7rem 0.78rem;
  border-radius: 8px;
}

[data-p130-operation-view] .p130-operation-summary .stat-card__label {
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.035em;
}

[data-p130-operation-view] .p130-operation-summary .stat-card strong {
  font-size: 1.25rem;
  line-height: 1.1;
  font-weight: 780;
}

[data-p130-operation-view] .p130-operation-summary .stat-card span:last-child {
  font-size: 0.74rem;
  font-weight: 520;
}

[data-p130-operation-view] .module-card {
  border-radius: 8px;
}

[data-p130-operation-view] .module-card__head h3 {
  font-size: 0.98rem;
  font-weight: 740;
}

[data-p130-operation-view] .module-table {
  font-size: 0.82rem;
}

[data-p130-operation-view] .module-table th {
  font-weight: 760;
}

[data-p130-operation-view] .module-table td {
  font-weight: 460;
}

[data-p130-operation-view] .module-table td strong {
  font-weight: 650;
}

[data-p130-operation-view] .button:not(.p130-icon-action) {
  min-height: 2.1rem;
  border-radius: 8px;
  font-size: 0.82rem;
}

.p130-bulk-panel[hidden] {
  display: none !important;
}

.p130-bulk-panel textarea {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
}

.table-actions--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  min-width: 270px;
}

.table-actions--grid .button {
  width: 100%;
  justify-content: center;
}

.table-actions [data-client-action="generate-invoice"] {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.table-actions [data-client-action="activate"] {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.table-actions [data-client-action="suspend"] {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #ffffff;
}

.table-actions [data-client-action="delete-portal"],
.table-actions [data-client-action="delete-portal-core"] {
  background: #ff0000;
  border-color: #ff0000;
  color: #ffffff;
}

.client-inline-actions {
  display: none;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin-top: 0.38rem;
}

.client-inline-actions[hidden] {
  display: none !important;
}

.client-inline-actions.is-expanded {
  display: flex;
}

.client-inline-actions[aria-hidden="true"] {
  display: none !important;
}

.client-inline-actions[aria-hidden="false"] {
  display: flex !important;
}

.client-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(197, 206, 216, 0.96);
  border-radius: 999px;
  background: #f5f7fa;
  color: #2f3a4a;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  appearance: none;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
  cursor: pointer;
}

.client-inline-action:hover {
  color: #1f2937;
  border-color: rgba(100, 116, 139, 0.55);
  background: #eef2f7;
  transform: translateY(-1px);
}

.client-inline-action .material-symbols-rounded {
  font-size: 15px;
  line-height: 1;
}

.client-inline-action--success,
.client-inline-action[data-client-action="activate"] {
  color: #ffffff;
  border-color: #2563eb;
  background: #2563eb;
}

.client-inline-action--primary,
.client-inline-action[data-client-action="generate-invoice"] {
  color: #ffffff;
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.client-inline-action--warning,
.client-inline-action[data-client-action="suspend"] {
  color: #ffffff;
  border-color: #1e3a8a;
  background: #1e3a8a;
}

.client-inline-action--cyan {
  color: #03233a;
  border-color: #00e5ff;
  background: #00e5ff;
}

.client-inline-action--accent {
  color: #2f3a4a;
}

.client-inline-action--danger,
.client-inline-action[data-client-action="delete-portal"],
.client-inline-action[data-client-action="delete-portal-core"] {
  color: #ffffff;
  border-color: #ff0000;
  background: #ff0000;
}

.client-inline-action--success:hover,
.client-inline-action[data-client-action="activate"]:hover {
  color: #ffffff;
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.client-inline-action--primary:hover,
.client-inline-action[data-client-action="generate-invoice"]:hover {
  color: #ffffff;
  border-color: #1e40af;
  background: #1e40af;
}

.client-inline-action--warning:hover,
.client-inline-action[data-client-action="suspend"]:hover {
  color: #ffffff;
  border-color: #172554;
  background: #172554;
}

.client-inline-action--danger:hover,
.client-inline-action[data-client-action="delete-portal"]:hover,
.client-inline-action[data-client-action="delete-portal-core"]:hover {
  color: #ffffff;
  border-color: #d40000;
  background: #d40000;
}

.client-inline-action--cyan:hover {
  color: #03233a;
  border-color: #00cce4;
  background: #00cce4;
}

.client-inline-action.is-disabled,
.client-inline-action[aria-disabled="true"] {
  opacity: 0.42;
  pointer-events: none;
  box-shadow: none;
}

.ui-action-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.42rem;
  white-space: nowrap;
}

.ui-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(197, 206, 216, 0.96);
  border-radius: 8px;
  background: #ffffff;
  color: #0b5ca8;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.07);
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.ui-action-button:hover {
  color: #07477f;
  border-color: rgba(16, 95, 170, 0.46);
  background: #eef7ff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.ui-action-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.26);
  outline-offset: 2px;
}

.ui-action-button .material-symbols-rounded {
  font-size: 19px;
  line-height: 1;
}

.ui-action-button:disabled,
.ui-action-button[aria-disabled="true"] {
  color: #94a3b8;
  border-color: rgba(203, 213, 225, 0.8);
  background: #f3f6fa;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.ui-action-button--danger {
  color: #b91c1c;
}

.ui-action-button--danger:hover {
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.42);
  background: #fff1f2;
}

.ui-action-button--success {
  color: #047857;
}

.ui-action-button--success:hover {
  color: #065f46;
  border-color: rgba(4, 120, 87, 0.42);
  background: #ecfdf5;
}

.ui-action-row--plans {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.45rem;
}

.internet-plan-actions-cell .ui-action-row--plans {
  justify-content: flex-end;
}

.internet-plan-actions-cell {
  width: 250px;
  min-width: 250px;
}

.internet-plan-mobile-actions {
  display: none;
  margin-top: 0.45rem;
}

.client-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

body[data-page="clientes"] .client-workspace-tabs {
  margin-top: 0.12rem;
  gap: 0.4rem;
}

.client-workspace-tab {
  min-height: 38px;
  padding: 0.46rem 0.78rem;
  border: 1px solid rgba(197, 206, 216, 0.9);
  border-radius: 10px;
  background: #ffffff;
  color: #2f3a4a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

body[data-page="clientes"] .client-workspace-tab {
  min-height: 34px;
  padding: 0.38rem 0.72rem;
  font-size: 11px;
}

.client-workspace-tab.is-active {
  background: linear-gradient(135deg, #1a237e, #1e3a8a);
  border-color: #1e3a8a;
  color: #ffffff;
}

.mass-contracts-toolbar .field {
  min-width: min(100%, 250px);
  flex: 0 1 280px;
}

.module-list {
  display: grid;
  gap: 0.85rem;
}

.module-list__item {
  padding: 1rem;
  border-radius: 18px;
  background: var(--bg-surface-soft);
  border: 1px solid rgba(197, 206, 216, 0.7);
}

.module-list__item strong,
.module-list__item span {
  display: block;
}

.module-list__item span {
  margin-top: 0.35rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.device-card {
  padding: 1.3rem;
  background: var(--bg-surface);
  border: 1px solid rgba(197, 206, 216, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.device-card h3 {
  margin: 0.25rem 0 0.6rem;
  font-size: 1.25rem;
}

.device-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.device-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.device-meta span,
.device-meta strong {
  display: block;
}

.device-meta span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.device-meta strong {
  margin-top: 0.18rem;
  font-size: 1rem;
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field span {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.field__hint {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text-primary);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.field input[type="checkbox"],
.field input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--efnet-blue, #1565c0);
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(21, 101, 192, 0.86);
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.16);
}

.field--search {
  position: relative;
}

.table-card {
  margin-top: 1.1rem;
  padding: 1.08rem;
}

.contracts-table-card {
  margin-top: 0.44rem;
  padding: 0.92rem 0.94rem;
}

.contracts-table-card .table-card__head {
  align-items: center;
  margin-bottom: 0.42rem;
}

.contracts-table-card .table-card__head h2 {
  margin-top: 0.08rem;
  font-size: 1.08rem;
}

.contracts-table-card .section-kicker {
  font-size: 0.66rem;
}

.table-card__head h2,
.control-stack__head h2 {
  color: var(--brand-navy);
}

.table-shell {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  font-size: 11px;
}

.data-table--wide {
  min-width: 1180px;
}

.data-table th,
.data-table td {
  padding: 4px;
  text-align: left;
  border-bottom: 1px solid rgba(217, 225, 234, 0.85);
  vertical-align: top;
}

.data-table th[data-col-key="select"],
.data-table td[data-col-key="select"] {
  width: 54px;
  min-width: 54px;
  text-align: center;
}

.data-table td[data-col-key="plan"] {
  min-width: 165px;
}

.data-table td[data-col-key="name"] {
  min-width: 145px;
}

.data-table td[data-col-key="service"] {
  min-width: 120px;
}

.data-table td[data-col-key="router"] {
  min-width: 105px;
}

.contracts-data-table.data-table--wide {
  min-width: 980px;
}

.contracts-data-table th,
.contracts-data-table td {
  padding: 2px 4px;
}

.contracts-data-table th[data-col-key="name"],
.contracts-data-table td[data-col-key="name"] {
  min-width: 198px;
}

.contracts-data-table th[data-col-key="ip"],
.contracts-data-table td[data-col-key="ip"] {
  min-width: 210px;
}

.contracts-data-table th[data-col-key="status"],
.contracts-data-table td[data-col-key="status"] {
  min-width: 58px;
  width: 58px;
}

.contracts-data-table th[data-col-key="online"],
.contracts-data-table td[data-col-key="online"] {
  min-width: 150px;
}

.contracts-data-table th[data-col-key="plan"],
.contracts-data-table td[data-col-key="plan"] {
  min-width: 158px;
}

.contracts-data-table th[data-col-key="router"],
.contracts-data-table td[data-col-key="router"] {
  min-width: 126px;
}

.contracts-data-table th[data-col-key="pending"],
.contracts-data-table td[data-col-key="pending"] {
  min-width: 136px;
}

.data-table td[data-col-key="online"],
.data-table th[data-col-key="online"] {
  min-width: 106px;
}

.data-table th {
  background: #f8f9fa;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.table-sort__icon::before {
  content: "unfold_more";
  font-family: "Material Symbols Rounded";
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1;
}

.table-sort.is-active {
  color: var(--text-primary);
}

.table-sort.is-active[data-sort-direction="asc"] .table-sort__icon::before {
  content: "arrow_drop_up";
}

.table-sort.is-active[data-sort-direction="desc"] .table-sort__icon::before {
  content: "arrow_drop_down";
}

.data-table__filters th {
  padding-top: 0.28rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(197, 206, 216, 0.62);
  background: #e9ecef;
}

.data-table__filters input {
  width: 100%;
  min-height: 28px;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(197, 206, 216, 0.9);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
}

.data-table__filters input:focus {
  outline: none;
  border-color: rgba(21, 101, 192, 0.72);
  box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.16);
}

.data-table tbody tr:hover {
  background: rgba(30, 136, 229, 0.06);
}

.client-cell {
  display: grid;
  gap: 0.2rem;
}

.client-cell--dense {
  gap: 0.12rem;
}

.client-main {
  display: grid;
  gap: 0.06rem;
}

.client-main__name {
  color: #0f3f73;
  font-size: 11.2px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.client-main__name:hover {
  text-decoration: underline;
}

.client-main__meta {
  display: grid;
  grid-auto-flow: row;
  gap: 0.08rem;
  align-items: start;
  overflow: hidden;
}

.client-main__code {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 0.36rem;
  border-radius: 999px;
  border: 1px solid rgba(30, 136, 229, 0.32);
  background: rgba(30, 136, 229, 0.1);
  color: #0c5ca7;
  font-size: 9.4px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.client-main__service {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #24517f;
  font-size: 9.3px;
  font-weight: 700;
  text-decoration: none;
}

.client-main__service:hover {
  text-decoration: underline;
}

.client-main__service--muted {
  color: #64748b;
  text-decoration: none;
}

.client-main__tag {
  display: inline-flex;
  align-items: center;
  color: #64748b;
  font-size: 9.2px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-main__tag--location {
  max-width: 180px;
}

.client-endpoint {
  display: grid;
  gap: 0.06rem;
}

.client-endpoint__ip {
  color: #1f3f8f;
  font-size: 10.3px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.client-endpoint__ip:hover {
  text-decoration: underline;
}

.client-endpoint__meta {
  display: grid;
  gap: 0.04rem;
  align-items: start;
}

.client-endpoint__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  color: #64748b;
  font-size: 9.2px;
  line-height: 1.2;
}

.client-endpoint__mac {
  letter-spacing: 0.02em;
}

.client-endpoint__actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.34rem;
  margin-top: 0.08rem;
  align-items: center;
  min-width: max-content;
}

.client-quick-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(197, 206, 216, 0.96);
  border-radius: 8px;
  background: #ffffff;
  color: #1f3652;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.07);
  appearance: none;
  cursor: pointer;
}

.client-quick-action-btn .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
}

.client-quick-action-btn:hover {
  border-color: rgba(16, 95, 170, 0.46);
  background: #eef7ff;
  transform: translateY(-1px);
}

.client-quick-action-btn--primary {
  color: #ffffff;
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.client-quick-action-btn--success {
  color: #ffffff;
  border-color: #2563eb;
  background: #2563eb;
}

.client-quick-action-btn--warning {
  color: #ffffff;
  border-color: #1e3a8a;
  background: #1e3a8a;
}

.client-endpoint__icon {
  font-size: 12px;
  color: #1e6eb8;
}

.client-service-state {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 26px;
}

.client-service-state__sub {
  color: #64748b;
  font-size: 9.2px;
  line-height: 1.2;
}

.service-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #f3f4f6;
  color: #6b7280;
}

.service-status-icon__glyph {
  font-size: 14px;
  line-height: 1;
}

.service-status-icon--active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.3);
  color: #1d4ed8;
}

.service-status-icon--suspended {
  background: rgba(180, 83, 9, 0.11);
  border-color: rgba(180, 83, 9, 0.28);
  color: #b45309;
}

.service-status-icon--free {
  background: rgba(15, 118, 110, 0.12);
  border-color: rgba(15, 118, 110, 0.3);
  color: #0f766e;
}

.service-status-icon--cancelled {
  background: rgba(100, 116, 139, 0.14);
  border-color: rgba(100, 116, 139, 0.32);
  color: #64748b;
}

.service-status-icon--neutral {
  background: rgba(107, 114, 128, 0.13);
  border-color: rgba(107, 114, 128, 0.28);
  color: #6b7280;
}

.client-plan,
.client-core {
  display: grid;
  gap: 0.08rem;
}

.client-plan strong,
.client-core strong {
  font-size: 10.6px;
  line-height: 1.15;
}

.client-plan span,
.client-core span {
  color: #64748b;
  font-size: 9.1px;
  line-height: 1.2;
}

.client-debt {
  display: grid;
  gap: 0.06rem;
}

.client-debt__amount {
  color: #152b3f;
  font-size: 10.8px;
  line-height: 1.1;
}

.client-debt__meta {
  color: #64748b;
  font-size: 9px;
  line-height: 1.15;
}

.client-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  justify-content: center;
  width: 100%;
}

.client-actions__quick {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.client-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(197, 206, 216, 0.95);
  border-radius: 8px;
  background: #f5f8fb;
  color: #1f3652;
  cursor: pointer;
}

.client-action-btn .material-symbols-rounded {
  font-size: 15px;
  line-height: 1;
}

.client-action-btn--primary {
  color: #ffffff;
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.client-action-btn--success {
  color: #ffffff;
  border-color: #2563eb;
  background: #2563eb;
}

.client-action-btn--warning {
  color: #ffffff;
  border-color: #1e3a8a;
  background: #1e3a8a;
}

.client-action-btn:hover {
  transform: translateY(-1px);
}

.client-actions-menu {
  position: relative;
}

.client-actions-menu--inline {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.client-actions-menu__trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(197, 206, 216, 0.95);
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.client-actions-menu__trigger::-webkit-details-marker {
  display: none;
}

.client-actions-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 10;
  min-width: 170px;
  padding: 0.4rem;
  border: 1px solid rgba(197, 206, 216, 0.95);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
  display: grid;
  gap: 0.2rem;
}

.client-actions-menu:not([open]) > .client-actions-menu__panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.client-actions-menu[open] > .client-actions-menu__panel {
  display: grid;
  visibility: visible;
  pointer-events: auto;
}

.client-actions-menu__item {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  padding: 0.25rem 0.42rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.client-actions-menu__item:hover {
  border-color: rgba(197, 206, 216, 0.95);
  background: #f8fafc;
}

.client-actions-menu__item.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.client-actions-menu__danger {
  margin-top: 0.1rem;
  padding-top: 0.18rem;
  border-top: 1px solid rgba(197, 206, 216, 0.75);
  display: grid;
  gap: 0.16rem;
}

.client-actions-menu__item.is-danger {
  color: #b1323f;
}

.client-cell__title {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.client-cell__title--contracts {
  flex-wrap: wrap;
  row-gap: 0.18rem;
}

.client-link {
  color: var(--accent-dark);
  font-size: 11.4px;
  font-weight: 800;
  text-decoration: none;
}

.client-link:hover {
  text-decoration: underline;
}

.client-cell__meta {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.25;
  padding-left: 1.8rem;
}

.client-ip-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.08rem 0.44rem;
  border-radius: 999px;
  border: 1px solid rgba(29, 78, 216, 0.38);
  background: rgba(29, 78, 216, 0.11);
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.client-ip-inline:hover {
  background: rgba(29, 78, 216, 0.2);
}

.client-ip-inline--empty {
  border-color: rgba(120, 136, 155, 0.38);
  background: rgba(120, 136, 155, 0.1);
  color: #6b7280;
}

.client-service-link {
  margin-left: 1.8rem;
  color: #0d6dc2;
  font-size: 10.2px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.client-service-link:hover {
  text-decoration: underline;
}

.client-location-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.2rem;
  margin-left: 1.8rem;
  font-size: 10px;
  font-weight: 800;
  color: #1d4ed8;
  text-decoration: none;
}

.client-location-link:hover {
  text-decoration: underline;
}

.client-location-link.is-disabled {
  color: #7b8796;
  cursor: not-allowed;
  text-decoration: none;
}

.client-expand-toggle {
  width: 1.35rem;
  min-width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(197, 206, 216, 0.92);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.client-expand-toggle:hover {
  border-color: rgba(21, 101, 192, 0.5);
  background: rgba(30, 136, 229, 0.1);
}

.client-cell strong {
  font-size: 11px;
  line-height: 1.25;
}

.client-link--service-code {
  font-size: 10.6px;
  letter-spacing: 0.05em;
}

.client-cell span,
.table-muted {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.data-table tr.is-muted-row td {
  color: var(--text-muted);
}

.client-contract-id {
  color: #7b8795;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

#clientTableBody td[data-col-key="name"] .client-contract-id {
  display: none !important;
}

.client-cell--service strong {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.client-service-icon {
  font-size: 14px;
  color: #0d6dc2;
}

.client-tech-state {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.16rem;
  min-width: 138px;
}

.client-tech-state .online-badge {
  min-width: auto;
  padding: 0.14rem 0.2rem;
  gap: 0.3rem;
  border-radius: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0;
}

.client-tech-state .online-badge .material-symbols-rounded {
  font-size: 12px;
}

.client-tech-state .online-badge__state-dot,
.client-tech-state .online-badge__label {
  display: none;
}

.client-tech-state .online-badge__action {
  width: 20px;
  min-width: 20px;
  height: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(120, 136, 155, 0.16);
  color: #6d7988;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.client-tech-state .online-badge__icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid transparent;
  background: rgba(120, 136, 155, 0.16);
  color: #6d7988;
  cursor: pointer;
}

.client-tech-state .online-badge__icon.is-active {
  background: rgba(30, 136, 229, 0.16);
  border-color: rgba(30, 136, 229, 0.32);
  color: #1e88e5;
}

.client-tech-state .online-badge__icon.is-failed {
  background: rgba(120, 136, 155, 0.14);
  border-color: rgba(120, 136, 155, 0.28);
  color: #6d7988;
}

.client-tech-state .online-badge__icon.is-idle {
  border-color: rgba(120, 136, 155, 0.24);
}

.client-tech-state .online-badge__action:hover {
  transform: translateY(-1px);
}

.client-tech-state .online-badge__action.is-active {
  background: rgba(30, 136, 229, 0.16);
  border-color: rgba(30, 136, 229, 0.32);
  color: #1e88e5;
}

.client-tech-state .online-badge__action.is-failed {
  background: rgba(120, 136, 155, 0.14);
  border-color: rgba(120, 136, 155, 0.28);
  color: #6d7988;
}

.client-tech-state .online-badge__action.is-idle {
  border-color: rgba(120, 136, 155, 0.24);
}

.client-tech-state .online-badge__action.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
}

.client-tech-state .online-badge__action.is-loading {
  opacity: 0.72;
  pointer-events: none;
  transform: none;
}

.client-tech-state .online-badge--online {
  border-color: rgba(30, 136, 229, 0.38);
  background: rgba(30, 136, 229, 0.08);
}

.client-tech-state .online-badge--offline {
  border-color: rgba(120, 136, 155, 0.32);
  background: rgba(120, 136, 155, 0.11);
}

.client-tech-state .online-badge--unknown {
  border-color: rgba(120, 136, 155, 0.3);
  background: rgba(120, 136, 155, 0.1);
}

.client-tech-ip {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.25;
}

.client-ip-link {
  color: var(--accent-dark);
  font-size: 11.3px;
  font-weight: 700;
  text-decoration: none;
}

.client-pending {
  display: grid;
  gap: 0.08rem;
}

.client-pending__amount {
  color: var(--text-primary);
  font-size: 11.2px;
  line-height: 1.2;
}

.client-pending__count {
  color: var(--text-muted);
  font-size: 10.2px;
  line-height: 1.2;
}

.client-ip-link:hover {
  text-decoration: underline;
}

.field-input--invalid {
  border-color: #d24343 !important;
  box-shadow: 0 0 0 4px rgba(210, 67, 67, 0.12) !important;
}

.ip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.ip-picker[hidden] {
  display: none !important;
}

.ip-picker__option {
  min-height: 32px;
  padding: 0.38rem 0.72rem;
  border: 1px solid rgba(21, 101, 192, 0.34);
  border-radius: 999px;
  background: rgba(21, 101, 192, 0.12);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.ip-picker__option:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 101, 192, 0.58);
  background: rgba(30, 136, 229, 0.2);
}

.client-select-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.client-select-cell input,
.data-table th input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-dark);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.3rem 0.52rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  gap: 0.3rem;
}

.status-badge--activo {
  background: rgba(30, 136, 229, 0.15);
  color: #0d6dc2;
}

.status-badge--en-aviso {
  background: rgba(245, 158, 11, 0.15);
  color: #b86b00;
}

.status-badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #b86b00;
}

.status-badge--suspendido {
  background: rgba(220, 53, 69, 0.14);
  color: #b1323f;
}

.status-badge--danger {
  background: rgba(220, 53, 69, 0.14);
  color: #b1323f;
}

.status-badge--success {
  background: rgba(16, 185, 129, 0.16);
  color: #0f8a5a;
}

.status-badge--solid {
  color: #ffffff;
}

.status-badge--solid.status-badge--activo {
  background: #1e88e5;
  color: #ffffff;
}

.module-grid--split {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.customer-map-shell {
  gap: 0.72rem;
}

.customer-map-toolbar-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 0.88rem;
}

.customer-map-toolbar-card__copy h2 {
  margin: 0.14rem 0 0;
  font-size: clamp(1.05rem, 1.2vw, 1.28rem);
}

.customer-map-toolbar-card__copy p {
  margin: 0.28rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.customer-map-toolbar-card__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.42rem;
}

.customer-map-toolbar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.24rem 0.62rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.customer-map-toolbar-chip.is-active {
  color: #0f4d86;
  background: rgba(30, 136, 229, 0.14);
  border-color: rgba(30, 136, 229, 0.35);
}

.customer-map-toolbar-chip.is-inactive {
  color: #a62a38;
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.34);
}

.customer-map-toolbar-chip.is-offline {
  color: #914014;
  background: rgba(251, 146, 60, 0.18);
  border-color: rgba(249, 115, 22, 0.34);
}

.customer-map-main-card {
  position: relative;
  padding-bottom: 0.3rem;
}

.customer-map-main-head {
  align-items: center;
  justify-content: space-between;
  gap: 0.72rem;
  margin-bottom: 0.48rem;
}

.customer-map-main-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
}

.customer-map-controls-trigger {
  min-height: 34px;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.customer-map-list-drawer {
  width: min(390px, 94vw);
  max-width: min(390px, 94vw);
}

.customer-map-list-drawer .drawer__head h2,
.customer-map-controls-drawer .drawer__head h2 {
  font-size: 1.06rem;
}

.customer-map-list-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.66rem;
}

.customer-map-list-stat {
  border: 1px solid rgba(197, 206, 216, 0.76);
  border-radius: 11px;
  background: #f8fbff;
  padding: 0.44rem 0.5rem;
  display: grid;
  gap: 0.12rem;
}

.customer-map-list-stat span {
  font-size: 0.64rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-map-list-stat strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.customer-map-list-scroll {
  display: grid;
  gap: 0.48rem;
  max-height: calc(100vh - 228px);
  overflow: auto;
  padding-right: 0.18rem;
  overscroll-behavior: contain;
  content-visibility: auto;
  contain-intrinsic-size: 1px 820px;
}

.customer-map-list-item {
  border: 1px solid rgba(197, 206, 216, 0.72);
  border-radius: 12px;
  padding: 0.5rem 0.56rem;
  background: #ffffff;
  display: grid;
  gap: 0.38rem;
}

.customer-map-list-item.is-focused {
  border-color: rgba(30, 136, 229, 0.78);
  box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.16);
}

.customer-map-list-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.customer-map-list-item__head strong {
  display: block;
  font-size: 0.83rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.customer-map-list-item__head p {
  margin: 0.14rem 0 0;
  font-size: 0.69rem;
  color: var(--text-muted);
}

.customer-map-list-item__head .button {
  min-height: 28px;
  padding-inline: 0.56rem;
}

.customer-map-list-item__badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.customer-map-service-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.14rem 0.52rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.customer-map-service-state.is-active {
  background: rgba(30, 136, 229, 0.14);
  color: #0f4d86;
  border-color: rgba(30, 136, 229, 0.34);
}

.customer-map-service-state.is-inactive {
  background: rgba(220, 53, 69, 0.12);
  color: #a62a38;
  border-color: rgba(220, 53, 69, 0.34);
}

.customer-map-list-item .online-badge {
  min-width: 0;
  padding-inline: 0.44rem;
}

.customer-map-list-history {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.customer-map-list-history .client-online-dot {
  width: 14px;
  height: 6px;
}

.customer-map-list-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.69rem;
  color: #53677f;
}

.customer-map-list-note {
  margin-top: 0.48rem;
}

.customer-map-empty-list {
  margin: 0;
}

.customer-map-filter-grid {
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.customer-map-filter-grid .field--wide {
  grid-column: auto;
}

.customer-map-filter-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 0.62rem;
}

.customer-map-filter-actions .button {
  width: 100%;
}

.customer-map-counter {
  margin: 0;
}

.customer-map-counter strong {
  color: var(--text-primary);
}

.customer-map-tools {
  display: grid;
  gap: 0.72rem;
}

.customer-map-tools .field-grid.field-grid--compact {
  grid-template-columns: 1fr;
  gap: 0.72rem;
}

.customer-map-tools .field--actions {
  flex-direction: column;
  align-items: stretch;
}

.customer-map-tools .field--actions .button {
  width: 100%;
}

.clients-map-canvas {
  min-height: clamp(520px, 74vh, 860px);
  border-radius: 18px;
  border: 1px solid rgba(197, 206, 216, 0.7);
  overflow: hidden;
  position: relative;
  touch-action: pan-x pan-y;
}

.clients-map-canvas .leaflet-container {
  width: 100%;
  height: 100%;
  pointer-events: auto !important;
}

.clients-map-canvas .leaflet-pane,
.clients-map-canvas .leaflet-control-container {
  pointer-events: auto !important;
}

.clients-map-canvas .leaflet-grab {
  cursor: grab;
}

.clients-map-canvas .leaflet-dragging .leaflet-grab {
  cursor: grabbing;
}

.clients-map-canvas .leaflet-control-layers {
  border-radius: 12px;
  border: 1px solid rgba(197, 206, 216, 0.78);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.clients-map-canvas .leaflet-control-layers-toggle {
  width: 34px;
  height: 34px;
}

.map-empty-note {
  max-width: min(360px, 78vw);
  margin: 0.32rem;
  padding: 0.52rem 0.66rem;
  border-radius: 10px;
  border: 1px solid rgba(14, 116, 144, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: #0f2f4a;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

.map-tools-panel {
  border: 1px solid rgba(197, 206, 216, 0.7);
  border-radius: 12px;
  padding: 0.4rem 0.55rem;
  background: #f8fbff;
}

.map-tools-panel > summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f3a5f;
  list-style: none;
}

.map-tools-panel > summary::-webkit-details-marker {
  display: none;
}

.map-tools-panel[open] > summary {
  margin-bottom: 0.55rem;
}

.contract-map-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contract-map-marker__dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
}

.contract-map-marker__dot--online {
  background: #1d4ed8;
}

.contract-map-marker__dot--offline {
  background: #dc2626;
}

.contract-map-marker__dot--unknown {
  background: #64748b;
}

.contract-map-marker__dot--active {
  background: #1d4ed8;
}

.contract-map-marker__dot--inactive {
  background: #dc2626;
}

.contract-map-marker--nap .contract-map-marker__nap {
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  border: 2px solid #ffffff;
  background: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
}

.map-popup {
  min-width: 210px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.map-popup a {
  color: #0d6dc2;
  font-weight: 700;
  text-decoration: none;
}

.map-popup a:hover {
  text-decoration: underline;
}

.status-badge--solid.status-badge--en-aviso {
  background: #f59e0b;
  color: #ffffff;
}

.status-badge--solid.status-badge--suspendido {
  background: #dc2626;
  color: #ffffff;
}

.status-badge--solid.status-badge--info {
  background: #2f89e7;
  color: #ffffff;
}

.status-badge--solid.status-badge--success {
  background: #10b981;
  color: #ffffff;
}

.status-badge--solid.status-badge--warning {
  background: #f59e0b;
  color: #ffffff;
}

.status-badge--solid.status-badge--danger {
  background: #dc2626;
  color: #ffffff;
}

.status-badge__icon {
  font-size: 0.84rem;
  line-height: 1;
  color: #ffffff;
}

.status-badge__label {
  line-height: 1;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.34rem;
  min-width: 102px;
  padding: 0.25rem 0.52rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.online-badge .material-symbols-rounded {
  font-size: 0.8rem;
  line-height: 1;
}

.online-badge__state-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.online-badge__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.online-badge--compact {
  min-width: 102px;
}

.online-badge--compact .material-symbols-rounded {
  font-size: 0.82rem;
}

.online-badge--online {
  background: rgba(30, 136, 229, 0.12);
  border-color: rgba(30, 136, 229, 0.38);
  color: #1763a9;
}

.online-badge--offline {
  background: rgba(120, 136, 155, 0.12);
  border-color: rgba(120, 136, 155, 0.32);
  color: #6d7988;
}

.online-badge--unknown {
  background: rgba(120, 136, 155, 0.12);
  border-color: rgba(120, 136, 155, 0.3);
  color: #6d7988;
}

.client-online-history {
  display: inline-flex;
  align-items: center;
  gap: 0.14rem;
}

.client-online-dot {
  width: 10px;
  height: 4px;
  border-radius: 999px;
  background: #bfc9d6;
  border: 1px solid rgba(18, 40, 74, 0.14);
}

.client-online-dot.is-online {
  background: #1e88e5;
  border-color: rgba(13, 110, 204, 0.45);
}

.client-online-dot.is-offline {
  background: #9aa6b5;
  border-color: rgba(73, 85, 103, 0.34);
}

.client-online-dot.is-unknown {
  background: #aab4c3;
  border-color: rgba(73, 85, 103, 0.25);
}

.client-online-meta {
  display: grid;
  gap: 0.05rem;
}

.client-online-meta span {
  color: var(--text-muted);
  font-size: 8.6px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .client-tech-state {
    min-width: 128px;
  }

  .client-online-meta span {
    font-size: 8.4px;
  }
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(4px);
}

.drawer-backdrop[hidden],
.drawer[hidden],
.drawer.modal-sheet:not(.is-open) {
  pointer-events: none;
}

.drawer-backdrop:not([hidden]),
.drawer.modal-sheet.is-open {
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(460px, 100%);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  background: #ffffff;
  border-left: 1px solid rgba(197, 206, 216, 0.85);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.drawer[aria-hidden="true"]:not(.is-open) {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.drawer--compact {
  width: min(420px, 100%);
}

.drawer.modal-sheet {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(760px, calc(100vw - 2.2rem));
  height: auto;
  max-height: calc(100vh - 2.2rem);
  border-left: 0;
  border: 1px solid rgba(197, 206, 216, 0.85);
  border-radius: 18px;
  transform: translate(-50%, -47%) scale(0.98);
  opacity: 0;
}

.drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
}

.drawer.modal-sheet.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.drawer__head h2 {
  margin: 0.3rem 0 0;
  font-size: 1.5rem;
}

.drawer__close {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
}

.wispro-toolbar {
  display: grid;
  gap: 0.68rem;
  margin: -0.35rem 0 0.8rem;
  padding: 0.72rem;
  border: 1px solid rgba(217, 225, 234, 0.88);
  border-radius: 14px;
  background: #f8fafc;
}

.contracts-toolbar {
  gap: 0.42rem;
  margin: -0.12rem 0 0.42rem;
  padding: 0.48rem 0.52rem;
}

.contracts-toolbar__actions {
  justify-content: flex-start;
  gap: 0.42rem;
}

.contracts-toolbar__zone {
  min-width: 0;
  width: 100%;
  flex: 0 0 auto;
  grid-auto-rows: max-content;
  align-content: start;
}

.contracts-toolbar__zone select {
  min-height: 36px;
  height: auto;
}

.contracts-toolbar .field span {
  font-size: 0.7rem;
  line-height: 1.1;
}

.contracts-toolbar .field {
  gap: 0.28rem;
}

.contracts-toolbar .wispro-toolbar__search {
  display: grid;
  grid-template-columns: minmax(152px, 198px) minmax(260px, 1fr) auto;
  align-items: end;
  gap: 0.42rem;
}

.contracts-toolbar .table-search {
  margin-left: 0;
  min-width: 0;
}

.contracts-toolbar .wispro-toolbar__search-field {
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}

.contracts-toolbar .wispro-toolbar__search-field input {
  min-height: 36px;
}

.contracts-toolbar .wispro-toolbar__search > .mini-button {
  min-height: 36px;
  align-self: end;
}

.contracts-toolbar__overflow {
  position: relative;
}

.contracts-toolbar__overflow > summary {
  list-style: none;
  cursor: pointer;
}

.contracts-toolbar__overflow > summary::-webkit-details-marker {
  display: none;
}

.contracts-toolbar__overflow-menu {
  position: absolute;
  z-index: 9;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 188px;
  display: grid;
  gap: 0.3rem;
  padding: 0.46rem;
  border: 1px solid rgba(197, 206, 216, 0.92);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

.contracts-toolbar__overflow-menu .mini-button {
  width: 100%;
  justify-content: flex-start;
  text-decoration: none;
}

.contracts-advanced-actions .mini-actions {
  gap: 0.42rem;
}

.wispro-toolbar__actions,
.wispro-toolbar__search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.wispro-toolbar__search {
  justify-content: flex-start;
}

.wispro-toolbar__search-field {
  margin-left: 0;
  min-width: 0;
  width: 100%;
  flex: 1 1 320px;
}

.wispro-toolbar__search-field input {
  min-height: 38px;
  font-size: 12px;
}

.wispro-toolbar__paging {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.wispro-page-size-button {
  min-height: 30px;
  min-width: 38px;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(197, 206, 216, 0.9);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.wispro-page-size-button.is-active {
  border-color: rgba(21, 101, 192, 0.65);
  background: rgba(30, 136, 229, 0.14);
  color: var(--brand-navy);
}

.wispro-toolbar__showing {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.wispro-toolbar__pager {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.wispro-toolbar__page-label {
  min-width: 102px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.wispro-page-nav-button {
  min-height: 30px;
  min-width: 74px;
  padding: 0.15rem 0.55rem;
  border: 1px solid rgba(197, 206, 216, 0.9);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.wispro-page-nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.drawer__form {
  display: grid;
  gap: 1rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.drawer.modal-sheet .drawer__form {
  max-height: calc(100vh - 12.5rem);
  padding-right: 0.35rem;
}

.summary-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: #f7fbff;
  border: 1px solid rgba(197, 206, 216, 0.86);
}

.summary-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.summary-card strong {
  color: var(--text-primary);
}

.invoice-preview {
  gap: 0.5rem;
  border-style: dashed;
  border-color: rgba(30, 136, 229, 0.32);
  background: linear-gradient(180deg, #f8fcff 0%, #f3f8ff 100%);
}

.invoice-preview h3 {
  margin: 0;
  color: #1e4e87;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invoice-preview__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.invoice-preview__row span {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.invoice-preview__row strong {
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.25;
  text-align: right;
}

.invoice-preview__row--wide {
  display: grid;
}

.invoice-preview__row--wide strong {
  margin-top: 0.14rem;
  text-align: left;
  font-size: 0.8rem;
}

.invoice-preview__row--total {
  padding-top: 0.42rem;
  border-top: 1px dashed rgba(30, 136, 229, 0.25);
}

.invoice-preview__row--total strong {
  color: #0f5ea6;
  font-size: 1rem;
}

.table-card--plain {
  padding: 0;
  box-shadow: none;
  border-radius: 20px;
}

.router-page {
  display: grid;
  gap: 0.8rem;
}

.router-page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: #f7fbff;
  border: 1px solid rgba(21, 101, 192, 0.2);
}

.router-page__header h2 {
  margin: 0.25rem 0 0.35rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.25rem, 1.55vw, 1.6rem);
}

.router-page__header p {
  max-width: 860px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.router-page__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.router-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  background: rgba(21, 101, 192, 0.14);
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.router-chip--soft {
  background: rgba(36, 148, 233, 0.12);
  color: #1665a3;
}

.router-card {
  padding: 1.35rem;
}

.router-bulk-bar,
.router-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.router-bulk-bar {
  margin-bottom: 1rem;
}

.router-bulk-bar__group,
.router-toolbar__left {
  display: flex;
  align-items: end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.router-selection,
.router-toolbar__label {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.field--compact {
  min-width: min(100%, 360px);
}

.router-mini-select {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.35rem 0.4rem 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eff8f1;
}

.router-mini-select span {
  color: #137547;
  font-size: 0.88rem;
  font-weight: 800;
}

.router-mini-select select {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-weight: 800;
  outline: none;
}

.router-tool-button,
.router-square-action {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(197, 206, 216, 0.9);
  border-radius: 13px;
  background: #ffffff;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.router-square-action {
  background: #1d8fe1;
  border-color: #1d8fe1;
  color: #ffffff;
}

.router-tool-button:disabled,
.router-square-action:disabled,
.router-dropdown__item:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.router-dropdown__item:disabled:hover {
  background: transparent;
}

.router-toolbar__search {
  width: min(100%, 320px);
}

.router-dropdown {
  position: relative;
}

.router-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 40;
  min-width: 270px;
  display: none;
  padding: 0.45rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(197, 206, 216, 0.9);
  box-shadow: var(--shadow-lg);
}

.router-dropdown.is-open .router-dropdown__menu {
  display: grid;
  gap: 0.2rem;
}

.router-dropdown__item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.78rem 0.85rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.router-dropdown__item:hover {
  background: rgba(30, 136, 229, 0.08);
}

.router-dropdown__group {
  position: relative;
}

.router-dropdown__submenu {
  position: absolute;
  top: -0.2rem;
  left: calc(100% + 0.45rem);
  min-width: 240px;
  display: none;
  padding: 0.4rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(197, 206, 216, 0.9);
  box-shadow: var(--shadow-lg);
}

.router-dropdown__group:hover .router-dropdown__submenu {
  display: grid;
  gap: 0.2rem;
}

.router-dropdown__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  background: var(--brand-blue-strong);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.router-table th:nth-child(1),
.router-table td:nth-child(1),
.router-table th:nth-child(2),
.router-table td:nth-child(2) {
  width: 58px;
}

.router-table thead tr:nth-child(2) input,
.router-table thead tr:nth-child(2) select {
  width: 100%;
  min-height: 42px;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.router-link {
  color: #0d6dc2;
  font-weight: 800;
}

.router-expand-link {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1d8fe1;
  color: #ffffff;
  font-weight: 800;
}

.router-config-stack {
  display: grid;
  gap: 0.2rem;
}

.router-footer-note {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(36, 148, 233, 0.09);
  color: #28516e;
}

.router-import-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-metric {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(197, 206, 216, 0.7);
  box-shadow: var(--shadow-md);
}

.compact-metric span,
.compact-metric small {
  display: block;
}

.compact-metric span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compact-metric strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.8rem;
  font-family: "Sora", sans-serif;
}

.compact-metric small {
  margin-top: 0.3rem;
  color: var(--text-muted);
}

.router-import-card,
.router-import-result {
  display: grid;
  gap: 1rem;
}

.router-import-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem 0;
}

.router-import-pagination__summary {
  margin-right: auto;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.router-import-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.router-import-toolbar__group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.router-import-table td,
.router-import-table th {
  vertical-align: top;
}

.router-import__queue-name {
  font-weight: 800;
}

.router-import__queue-meta {
  margin-top: 0.28rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.router-editor {
  display: grid;
  gap: 0.75rem;
}

.router-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid rgba(197, 206, 216, 0.75);
  border-radius: 12px;
  background: #ffffff;
}

.router-tab {
  min-height: 38px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 800;
  cursor: pointer;
}

.router-tab.is-active {
  border-color: rgba(21, 101, 192, 0.55);
  background: rgba(30, 136, 229, 0.1);
  color: var(--accent-dark);
}

.router-panel {
  display: none;
}

.router-panel.is-active {
  display: block;
}

.router-edit-card {
  padding: 1rem;
  border: 1px solid rgba(197, 206, 216, 0.7);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.service-record-card {
  box-shadow: var(--shadow-soft);
}

.service-record-card__head {
  align-items: flex-start;
  gap: 0.75rem;
}

.service-record-card__head .button {
  flex: 0 0 auto;
}

.service-record-copy {
  margin: 0.28rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.service-record-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.service-record-summary-line span,
.service-record-note {
  font-size: 0.84rem;
}

.service-record-linked-list .module-table-shell,
.service-record-card .module-table-shell {
  border-radius: 10px;
}

.service-record-linked-list .module-table,
.service-record-card .module-table {
  min-width: 760px;
  font-size: 0.82rem;
}

.service-record-linked-list .module-table th,
.service-record-card .module-table th {
  font-weight: 700;
}

.service-record-linked-list .module-table td,
.service-record-card .module-table td {
  vertical-align: middle;
}

.service-record-empty {
  padding: 0.95rem;
  font-size: 0.86rem;
}

.router-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.router-form-grid--dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.router-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.8rem;
}

.router-panel-head h3 {
  margin: 0.2rem 0 0;
  font-size: 1.02rem;
}

.router-panel-head--compact {
  margin-bottom: 0.6rem;
}

.field-help {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.router-advanced-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0.9rem;
  margin-top: 1rem;
}

.router-advanced-block {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(197, 206, 216, 0.7);
  border-radius: 12px;
  background: #fbfdff;
}

.field--wide {
  grid-column: 1 / -1;
}

.customer-workflow-form {
  display: grid;
  gap: 1.4rem;
}

.form-section {
  display: grid;
  gap: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.form-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.form-section__title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.form-section__hint {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.status-badge--info {
  background: rgba(74, 166, 255, 0.14);
  color: #0d72d0;
}

.router-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.router-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.router-toggle__label {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.35;
}

.router-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.router-toggle__pill {
  min-width: 72px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #eef2f6;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 800;
}

.router-toggle--inline {
  margin: 0;
}

.router-toggle__pill::before {
  content: attr(data-off);
}

.router-toggle input:checked + .router-toggle__pill {
  background: #3b82f6;
  color: #ffffff;
}

.router-toggle input:checked + .router-toggle__pill::before {
  content: attr(data-on);
}

.router-section-title {
  margin: 1.35rem 0 0.9rem;
  font-family: "Sora", sans-serif;
  font-size: 1.12rem;
}

.router-note {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(36, 148, 233, 0.09);
  color: #28516e;
}

.router-script-help {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.router-help-card {
  padding: 1.1rem;
  border: 1px solid rgba(197, 206, 216, 0.7);
  border-radius: 18px;
  background: #f8fbff;
}

.router-help-card h3 {
  margin: 0.3rem 0 0.45rem;
}

.router-help-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.router-submit-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.router-runtime {
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid rgba(197, 206, 216, 0.7);
  display: grid;
  gap: 0.8rem;
}

.router-runtime__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.router-runtime__header h3,
.router-runtime-card h4 {
  margin: 0.35rem 0 0;
}

.router-runtime__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.router-runtime-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  border: 1px solid rgba(197, 206, 216, 0.75);
  border-radius: 12px;
  background: #f8fbff;
}

.router-runtime-card p {
  margin: 0;
  color: var(--muted);
}

.router-runtime__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.router-runtime__output {
  display: grid;
  gap: 0.7rem;
}

.router-runtime__meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.router-output {
  margin: 0;
  min-height: 150px;
  max-height: 260px;
  padding: 0.8rem 0.85rem;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #0f172a;
  color: #dbeafe;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.router-form-grid--tight {
  gap: 0.6rem;
}

.router-toast {
  position: fixed;
  right: 1.3rem;
  bottom: 1.3rem;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: min(560px, calc(100vw - 2rem));
  padding: 0.9rem 0.9rem 0.9rem 1rem;
  border-radius: 10px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  line-height: 1.45;
  white-space: normal;
}

.router-toast__message {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
}

.router-toast__close {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1;
}

.router-toast__close:hover,
.router-toast__close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.router-toast--success {
  background: #0f7a43;
}

.router-toast--warning {
  background: #c65a02;
}

.router-toast--error {
  background: #b42318;
}

.router-toast--info {
  background: #0f172a;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .content-shell {
  margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar__brand {
  padding: 0.4rem 0.24rem;
  display: grid;
  place-items: center;
}

body.sidebar-collapsed .sidebar__logo--full,
body.sidebar-collapsed .sidebar__profile-copy,
body.sidebar-collapsed .sidebar__logout,
body.sidebar-collapsed .nav-item__label,
body.sidebar-collapsed .nav-group__label span,
body.sidebar-collapsed .nav-group__arrow,
body.sidebar-collapsed .nav-subitem__label,
body.sidebar-collapsed .nav-subgroup__arrow,
body.sidebar-collapsed .sidebar__footer,
body.sidebar-collapsed .nav-group__submenu {
  display: none;
}

body.sidebar-collapsed .sidebar__logo--compact {
  display: block;
  width: 28px;
}

body.sidebar-collapsed .sidebar__profile {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.28rem;
  padding: 0.42rem 0.2rem 0.48rem;
}

body.sidebar-collapsed .sidebar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 0.72rem;
}

body.sidebar-collapsed .sidebar__nav {
  padding-inline: 0.22rem;
  overflow-x: hidden;
}

body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .nav-group__button {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 34px;
  padding: 0.2rem;
}

body.sidebar-collapsed .nav-item__icon {
  width: 28px;
  height: 28px;
  margin: 0 auto;
}

body.sidebar-collapsed .nav-group {
  gap: 0.35rem;
}

body.sidebar-collapsed .nav-item.is-active::after,
body.sidebar-collapsed .nav-group.is-active > .nav-group__button::after {
  display: none;
}

body.sidebar-collapsed .nav-item.is-active,
body.sidebar-collapsed .nav-group.is-active > .nav-group__button {
  box-shadow: inset 0 0 0 1px rgba(21, 101, 192, 0.48);
}

@media (max-width: 1240px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .module-grid,
  .device-grid {
    grid-template-columns: 1fr;
  }

  .panel-card--wide {
    grid-row: span 1;
  }
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }

  body.panel-nav-open .sidebar {
    transform: translateX(0);
  }

  body.panel-nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(15, 23, 42, 0.35);
  }

  .content-shell {
    margin-left: 0;
  }

  body.sidebar-collapsed .content-shell {
    margin-left: 0;
  }

  .topbar {
    padding-inline: 1rem;
  }

  .topbar__utility {
    order: 3;
    margin-left: auto;
  }

  .topbar-density-toggle {
    min-width: 132px;
  }

  .page-content {
    padding: 1rem;
  }

  .hero-banner {
    padding: 1.35rem;
  }

  .toolbar-card {
    grid-template-columns: 1fr;
  }

  .wispro-toolbar__search {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .wispro-toolbar__search-field {
    min-width: 100%;
    width: 100%;
    flex: 0 1 auto;
  }

  .wispro-toolbar__search-field span {
    font-size: 0.78rem;
  }

  .wispro-toolbar__search-field input {
    min-height: 42px;
  }

  .contracts-toolbar .wispro-toolbar__search {
    grid-template-columns: minmax(130px, 1fr) minmax(0, 1.45fr) auto;
    align-items: end;
    gap: 0.36rem;
  }

  .contracts-toolbar .wispro-toolbar__search-field input,
  .contracts-toolbar__zone select,
  .contracts-toolbar .wispro-toolbar__search > .mini-button {
    min-height: 34px;
  }
}

@media (max-width: 760px) {
  .nav-item,
  .nav-group__button,
  .nav-subitem {
    min-height: 40px;
  }

  .sidebar__logout {
    min-height: 38px;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: center;
  }

  .topbar__headline {
    width: calc(100% - 70px);
  }

  .topbar__actions {
    width: 100%;
  }

  .contracts-topbar-actions {
    width: 100%;
  }

  .contracts-topbar-actions .button {
    width: 100%;
  }

  .topbar__utility {
    width: 100%;
    justify-content: flex-end;
  }

  .topbar-density-toggle {
    width: 100%;
    justify-content: center;
  }

  .topbar__actions .button,
  .hero-banner__actions .button {
    width: 100%;
  }

  .clients-action--optional {
    display: none !important;
  }

  .topbar__actions .button-row {
    gap: 0.6rem;
  }

  .table-toolbar,
  .table-toolbar__meta {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .table-search {
    width: 100%;
    min-width: 0;
  }

  .installations-toolbar-grid .field--actions .button {
    width: 100%;
  }

  .hero-banner,
  .hero-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .table-search {
    margin-left: 0;
    width: 100%;
  }

  .wispro-toolbar {
    padding: 0.62rem;
  }

  .contracts-table-card {
    padding: 0.74rem 0.72rem;
  }

  .contracts-toolbar {
    margin: 0 0 0.3rem;
    padding: 0.42rem;
    gap: 0.34rem;
  }

  .contracts-toolbar__zone {
    width: 100%;
    min-width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    grid-auto-rows: max-content;
    align-content: start;
  }

  .contracts-toolbar .field {
    gap: 0.22rem;
  }

  .contracts-toolbar .wispro-toolbar__actions {
    gap: 0.34rem;
  }

  .contracts-toolbar__overflow {
    width: 100%;
  }

  .contracts-toolbar__overflow-menu {
    position: static;
    min-width: 100%;
    box-shadow: none;
  }

  .wispro-toolbar__actions,
  .wispro-toolbar__search {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .contracts-toolbar .wispro-toolbar__search {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .wispro-toolbar__search-field {
    min-width: 100%;
    width: 100%;
    flex: 0 1 auto;
    gap: 0.36rem;
  }

  .wispro-toolbar__search-field span {
    display: none;
  }

  .wispro-toolbar__search-field input {
    min-height: 40px;
  }

  .contracts-toolbar .wispro-toolbar__search-field input,
  .contracts-toolbar__zone select,
  .contracts-toolbar .wispro-toolbar__search > .mini-button {
    min-height: 34px;
  }

  .contracts-toolbar__zone select {
    height: auto;
  }

  .contracts-toolbar .wispro-toolbar__search > .mini-button {
    width: 100%;
    align-self: stretch;
  }

  .table-sort {
    min-height: 36px;
    min-width: 36px;
    padding: 0.15rem 0.2rem;
  }

  .wispro-page-size-button,
  .wispro-page-nav-button {
    min-height: 38px;
  }

  .client-expand-toggle {
    width: 2.35rem;
    min-width: 2.35rem;
    height: 2.35rem;
  }

  .client-select-cell input,
  .data-table th input[type="checkbox"],
  .client-columns-menu__item input {
    width: 18px;
    height: 18px;
  }

  .wispro-toolbar__paging {
    width: 100%;
    justify-content: flex-start;
  }

  .finance-bars__chart {
    min-height: 220px;
    gap: 0.55rem;
    padding-inline: 0.65rem;
  }

  .bar {
    width: 100%;
  }

  .drawer {
    width: 100%;
    padding: 1rem;
  }

  .drawer.modal-sheet {
    width: calc(100vw - 0.9rem);
    max-height: calc(100vh - 0.9rem);
    top: 50%;
    left: 50%;
    border-radius: 14px;
  }

  .drawer.modal-sheet .drawer__form {
    max-height: calc(100vh - 10.4rem);
    padding-right: 0.2rem;
  }
}

@media (max-width: 1100px) {
  .router-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .router-form-grid,
  .router-form-grid--dense,
  .router-advanced-grid,
  .checkbox-grid,
  .router-script-help,
  .router-runtime__grid,
  .staff-role-grid {
    grid-template-columns: 1fr;
  }

  .traffic-live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .traffic-support-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .router-page__header,
  .router-panel-head,
  .router-bulk-bar,
  .router-toolbar,
  .router-import-toolbar,
  .router-toolbar__left,
  .router-import-toolbar__group,
  .router-bulk-bar__group,
  .router-submit-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .router-toolbar__search {
    width: 100%;
  }

  .router-toggle-grid {
    grid-template-columns: 1fr;
  }

  .router-import-summary {
    grid-template-columns: 1fr;
  }

  .router-dropdown__menu,
  .router-dropdown__submenu {
    position: static;
    min-width: 100%;
    margin-top: 0.45rem;
  }

  .router-dropdown__group:hover .router-dropdown__submenu {
    display: none;
  }

  .router-dropdown.is-open .router-dropdown__submenu {
    display: grid;
  }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.topbar__actions .button-row {
  justify-content: flex-end;
}

.clients-action--optional {
  display: inline-flex;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field--actions {
  display: flex;
  align-items: flex-end;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(246, 249, 252, 0.9);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--success);
}

.checkbox-field span {
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 700;
}

.audit-log-pre {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: #0f172a;
  color: #e5edf9;
  max-height: 240px;
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.4;
}

.detail-list {
  display: grid;
  gap: 0.85rem;
}

.detail-list__item {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(197, 206, 216, 0.78);
  border-radius: 18px;
  background: var(--bg-surface-soft);
}

.detail-list__item span,
.detail-list__item strong {
  display: block;
}

.detail-list__item span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-list__item strong {
  margin-top: 0.35rem;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
}

.receipt-sheet {
  border-style: dashed;
  background: #ffffff;
}

.receipt-sheet--compact {
  max-width: 760px;
  margin-inline: auto;
  display: grid;
  gap: 0.55rem;
  border-style: solid;
}

.receipt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(197, 206, 216, 0.72);
}

.receipt-company h3 {
  margin: 0.1rem 0 0.18rem;
  font-size: 1.18rem;
}

.receipt-company p {
  max-width: 420px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.28;
}

.receipt-number {
  display: grid;
  justify-items: end;
  gap: 0.14rem;
  text-align: right;
}

.receipt-number span:first-child {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.receipt-number strong {
  color: var(--text-main);
  font-size: 1.05rem;
}

.receipt-number small {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.receipt-payment-hero {
  display: grid;
  grid-template-columns: minmax(1.2fr, 1.45fr) repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.45rem;
  text-align: center;
}

.receipt-hero-metric {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.55rem 0.45rem;
  border: 1px solid rgba(197, 206, 216, 0.86);
  border-radius: 8px;
  background: #ffffff;
}

.receipt-hero-metric--primary {
  border: 2px solid #113c6f;
  background: #f7fbff;
}

.receipt-hero-metric span,
.receipt-payment-hero__label {
  color: #2f4c70;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipt-hero-metric strong,
.receipt-payment-hero__amount {
  color: #0f172a;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.receipt-hero-metric--primary strong {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

.receipt-hero-metric small,
.receipt-payment-hero__meta {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.receipt-block-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.receipt-block {
  display: grid;
  gap: 0.22rem;
  padding: 0.5rem;
  border: 1px solid rgba(197, 206, 216, 0.85);
  border-radius: 7px;
  background: #ffffff;
}

.receipt-block__title {
  margin: 0 0 0.08rem;
  color: #24486f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: baseline;
  min-width: 0;
}

.receipt-row span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.receipt-row strong {
  min-width: 0;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.receipt-row--focus {
  padding: 0.16rem 0;
  border-top: 1px dashed rgba(17, 60, 111, 0.45);
  border-bottom: 1px dashed rgba(17, 60, 111, 0.45);
}

.receipt-row--focus strong {
  font-size: 0.94rem;
}

.receipt-items-mini {
  display: grid;
  gap: 0.18rem;
  margin: 0.08rem 0 0.12rem;
  padding: 0.28rem 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.48);
  border-bottom: 1px dashed rgba(148, 163, 184, 0.48);
}

.receipt-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(92px, 0.65fr);
  gap: 0.45rem;
  align-items: baseline;
}

.receipt-item-row span {
  min-width: 0;
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.receipt-item-row strong {
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.receipt-note {
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(17, 60, 111, 0.28);
  border-radius: 7px;
  background: #f8fbff;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.32;
}

.receipt-footnote {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(197, 206, 216, 0.7);
  color: var(--text-muted);
  line-height: 1.6;
}

.staff-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.staff-role-card {
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(197, 206, 216, 0.8);
  border-radius: 20px;
  background: var(--bg-surface-soft);
}

.staff-role-card strong {
  display: block;
  font-size: 1rem;
}

.staff-role-card p {
  margin: 0.55rem 0 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.staff-role-card span {
  color: #177345;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.password-note {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(74, 166, 255, 0.22);
  border-radius: 18px;
  background: rgba(74, 166, 255, 0.08);
  color: #23547d;
  line-height: 1.65;
}

.analytics-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  align-items: end;
}

.analytics-toolbar--triple {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.table-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.toolbar-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(197, 206, 216, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 800;
}

.toolbar-pill--green {
  border-color: rgba(21, 101, 192, 0.3);
  background: rgba(30, 136, 229, 0.12);
  color: var(--accent-dark);
}

.toolbar-pill--orange {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.16);
  color: #9a5b05;
}

.toolbar-pill--warning {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.16);
  color: #9a5b05;
}

.template-editor-shell {
  overflow: hidden;
}

.brand-logo-manager {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.brand-logo-preview-block {
  display: grid;
  gap: 0.35rem;
}

.brand-logo-preview-label,
.brand-logo-status {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.brand-logo-preview {
  width: 180px;
  height: 74px;
  border: 1px solid rgba(207, 219, 233, 0.95);
  border-radius: 10px;
  background: #f8fbff;
  display: grid;
  place-items: center;
  padding: 0.55rem;
}

.brand-logo-preview img {
  display: block;
  max-width: 160px;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-logo-controls {
  display: grid;
  gap: 0.45rem;
}

.brand-logo-controls small {
  color: var(--text-muted);
  line-height: 1.4;
}

.payment-method-preview {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(207, 219, 233, 0.95);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text-primary);
}

.payment-method-preview span,
.payment-method-preview small {
  color: var(--text-muted);
}

@media (max-width: 680px) {
  .brand-logo-manager {
    grid-template-columns: 1fr;
  }

  .brand-logo-preview {
    width: 100%;
    max-width: 220px;
  }
}

.template-editor-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1rem;
}

.template-editor-sidebar {
  border: 1px solid rgba(214, 225, 238, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(245, 249, 255, 0.94), rgba(255, 255, 255, 0.96));
  padding: 0.9rem;
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.template-editor-sidebar__title {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-editor-list {
  display: grid;
  gap: 0.55rem;
}

.template-editor-group {
  display: grid;
  gap: 0.42rem;
  padding: 0.48rem;
  border: 1px solid rgba(214, 225, 238, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.template-editor-group__head {
  display: grid;
  gap: 0.08rem;
  padding: 0 0.12rem;
}

.template-editor-group__head strong {
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 900;
}

.template-editor-group__head span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.template-editor-item {
  width: 100%;
  border: 1px solid rgba(207, 219, 233, 0.95);
  border-radius: 14px;
  background: #ffffff;
  padding: 0.72rem 0.8rem;
  display: grid;
  gap: 0.12rem;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.template-editor-item:hover {
  border-color: rgba(21, 101, 192, 0.4);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.template-editor-item.is-active {
  border-color: rgba(21, 101, 192, 0.62);
  background: linear-gradient(180deg, rgba(234, 244, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.11);
}

.template-editor-item__label {
  color: var(--text-main);
  font-size: 0.86rem;
  font-weight: 800;
}

.template-editor-item__meta {
  color: var(--text-muted);
  font-size: 0.74rem;
  word-break: break-all;
}

.template-editor-main {
  border: 1px solid rgba(214, 225, 238, 0.95);
  border-radius: 18px;
  background: #ffffff;
  padding: 0.95rem;
}

.template-editor-form {
  display: grid;
  gap: 0.9rem;
}

.template-editor-preview-shell {
  border: 1px solid rgba(214, 225, 238, 0.95);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(255, 255, 255, 0.98));
  padding: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.template-editor-preview-head {
  display: grid;
  gap: 0.2rem;
}

.template-editor-preview__title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.template-editor-preview-frame-wrap {
  border: 1px solid rgba(200, 212, 227, 0.9);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  min-height: 320px;
}

.template-editor-preview-frame {
  width: 100%;
  min-height: 320px;
  height: 320px;
  border: 0;
  background: #ffffff;
}

.template-editor-textarea {
  min-height: 560px;
  resize: vertical;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  tab-size: 2;
}

.table-search--compact {
  min-width: min(100%, 320px);
}

.table-search--compact input {
  min-height: 46px;
}

.summary-chip {
  display: grid;
  gap: 0.3rem;
  min-height: 52px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(189, 224, 198, 0.9);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(231, 248, 236, 0.95), rgba(245, 251, 247, 0.95));
}

.summary-chip strong {
  color: var(--text-main);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-chip span {
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.finance-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.finance-column {
  min-height: 100%;
}

.money-grid {
  display: grid;
  gap: 0.85rem;
}

.money-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(217, 225, 234, 0.85);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
}

.money-card strong {
  display: block;
  color: var(--text-main);
  font-size: clamp(1.4rem, 2vw, 1.95rem);
  line-height: 1.05;
}

.money-card span:first-child,
.money-card div span {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.money-card .material-symbols-rounded {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-main);
  font-size: 1.35rem;
}

.money-card--success {
  border-color: rgba(21, 101, 192, 0.32);
}

.money-card--success .material-symbols-rounded {
  background: rgba(30, 136, 229, 0.14);
  color: var(--brand-blue);
}

.money-card--warning {
  border-color: rgba(246, 200, 76, 0.38);
}

.money-card--warning .material-symbols-rounded {
  background: rgba(246, 200, 76, 0.16);
  color: #c57d00;
}

.money-card--info {
  border-color: rgba(74, 166, 255, 0.35);
}

.money-card--info .material-symbols-rounded {
  background: rgba(74, 166, 255, 0.15);
  color: var(--info);
}

.money-card--danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.money-card--danger .material-symbols-rounded {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.analytics-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(197, 206, 216, 0.7);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.analytics-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.analytics-card__head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.analytics-card__head span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.analytics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  justify-content: flex-end;
}

.analytics-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.analytics-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  min-height: 260px;
  padding: 0.75rem 0.2rem 0;
  overflow-x: auto;
}

.bar-chart__group {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  min-width: 48px;
  flex: 1 0 auto;
}

.bar-chart__bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.32rem;
  width: 100%;
  min-height: 210px;
}

.bar-chart__bar {
  display: inline-flex;
  width: 16px;
  min-height: 4px;
  height: var(--bar-height);
  border-radius: 999px 999px 4px 4px;
  background: var(--bar-color);
}

.bar-chart__label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.analytics-note {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(145, 188, 234, 0.45);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(236, 247, 255, 0.96), rgba(248, 252, 255, 0.94));
  color: #46607a;
  font-size: 0.9rem;
  line-height: 1.55;
}

.analytics-note strong {
  color: var(--text-main);
}

.traffic-monitor-shell {
  display: grid;
  gap: 1rem;
}

.traffic-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.traffic-context-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(194, 205, 218, 0.86);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.96));
}

.traffic-context-card__label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.traffic-context-card strong {
  font-size: 1.18rem;
  line-height: 1.16;
}

.traffic-context-card span:last-child {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.traffic-live-card {
  display: grid;
  gap: 0.95rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(30, 136, 229, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(240, 248, 255, 0.96), rgba(255, 255, 255, 0.97));
  box-shadow: var(--shadow-soft);
}

.traffic-live-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.traffic-live-card__head h3 {
  margin: 0.2rem 0 0;
  font-size: 1.18rem;
}

.traffic-live-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(30, 136, 229, 0.2);
  background: rgba(30, 136, 229, 0.08);
  color: #165da8;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.traffic-live-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
}

.traffic-live-metric {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.92rem;
  border-radius: 14px;
  border: 1px solid rgba(203, 214, 227, 0.84);
  background: rgba(255, 255, 255, 0.96);
}

.traffic-live-metric > span {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.traffic-live-metric strong {
  font-size: clamp(1.05rem, 1.45vw, 1.4rem);
  line-height: 1.1;
  font-family: "Sora", sans-serif;
}

.traffic-live-metric small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.traffic-live-metric small + small {
  margin-top: 0.08rem;
}

.traffic-live-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 92px;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.traffic-live-status-chip--online {
  color: #0f67b5;
  border-color: rgba(30, 136, 229, 0.28);
  background: rgba(30, 136, 229, 0.11);
}

.traffic-live-status-chip--offline {
  color: #b83280;
  border-color: rgba(232, 62, 140, 0.3);
  background: rgba(232, 62, 140, 0.1);
}

.traffic-live-status-chip--degraded {
  color: #9a6a00;
  border-color: rgba(255, 179, 0, 0.32);
  background: rgba(255, 179, 0, 0.14);
}

.traffic-live-status-chip--neutral {
  color: #5f6f82;
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(148, 163, 184, 0.12);
}

.traffic-live-signal--active {
  color: #0f9d58;
  font-weight: 700;
}

.traffic-live-signal--warn {
  color: #9a6a00;
  font-weight: 700;
}

.traffic-live-operational-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.56rem 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(194, 206, 220, 0.88);
  background: rgba(255, 255, 255, 0.95);
}

.traffic-reading-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  white-space: nowrap;
}

.traffic-reading-chip--ok {
  color: #0f67b5;
  border-color: rgba(30, 136, 229, 0.3);
  background: rgba(30, 136, 229, 0.11);
}

.traffic-reading-chip--warn {
  color: #9a6a00;
  border-color: rgba(255, 179, 0, 0.34);
  background: rgba(255, 179, 0, 0.14);
}

.traffic-reading-chip--danger {
  color: #b83280;
  border-color: rgba(232, 62, 140, 0.35);
  background: rgba(232, 62, 140, 0.12);
}

.traffic-reading-chip--neutral {
  color: #5f6f82;
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(148, 163, 184, 0.12);
}

.traffic-live-operational-line small {
  color: #4f6277;
  font-size: 0.78rem;
  line-height: 1.32;
}

.traffic-live-spark {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.55rem;
  padding: 0.84rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(198, 209, 221, 0.8);
  background: rgba(255, 255, 255, 0.98);
}

.traffic-live-spark__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.traffic-live-spark__head strong {
  font-size: 0.9rem;
}

.traffic-live-spark__head span {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.traffic-sparkline {
  height: 84px;
}

.traffic-sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
}

.traffic-sparkline__line {
  fill: none;
  stroke: #1e88e5;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.traffic-sparkline__area {
  fill: rgba(30, 136, 229, 0.16);
}

.traffic-sparkline__dot {
  fill: #1e88e5;
}

.traffic-sparkline__legend {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.traffic-sparkline__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.traffic-sparkline__legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.traffic-sparkline__empty {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.traffic-window-toolbar .control-strip {
  align-items: flex-end;
}

.traffic-line-card {
  padding: 1rem 1rem 0.85rem;
}

.traffic-line-chart__scroll {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.traffic-line-chart {
  width: 100%;
  min-width: 760px;
  height: 340px;
  display: block;
}

.traffic-line-chart__grid line {
  stroke: rgba(125, 145, 166, 0.22);
  stroke-dasharray: 2 4;
  vector-effect: non-scaling-stroke;
}

.traffic-line-chart__grid text {
  fill: #6a7d95;
  font-size: 11px;
  font-weight: 700;
  text-anchor: end;
  dominant-baseline: middle;
}

.traffic-line-chart__grid text:last-child,
.traffic-line-chart__grid text:nth-last-child(-n + 7) {
  text-anchor: middle;
}

.traffic-line-chart__threshold line {
  stroke: rgba(156, 39, 176, 0.34);
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}

.traffic-line-chart__threshold-label {
  fill: #80409a;
  font-size: 11px;
  font-weight: 700;
}

.traffic-line-chart__series {
  --series-color: #1e88e5;
  --series-fill: rgba(30, 136, 229, 0.14);
}

.traffic-line-chart__area {
  fill: var(--series-fill);
}

.traffic-line-chart__line {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
}

.traffic-line-chart__point circle:first-child {
  fill: var(--series-color);
}

.traffic-line-chart__hitbox {
  fill: transparent;
  cursor: crosshair;
}

.traffic-line-chart__tooltip {
  display: none;
}

.traffic-line-chart__point:hover .traffic-line-chart__tooltip,
.traffic-line-chart__point:focus-within .traffic-line-chart__tooltip {
  display: block;
}

.traffic-line-chart__tooltip rect {
  fill: rgba(12, 22, 36, 0.92);
  stroke: rgba(255, 255, 255, 0.26);
  stroke-width: 1;
}

.traffic-line-chart__tooltip text {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 600;
  dominant-baseline: middle;
}

.traffic-line-chart__tooltip-time {
  fill: rgba(235, 244, 255, 0.95);
}

.traffic-line-chart__tooltip-value {
  font-weight: 700;
}

.traffic-line-chart__tooltip-rx {
  fill: #63b3ff;
  font-weight: 700;
}

.traffic-line-chart__tooltip-tx {
  fill: #ffb457;
  font-weight: 700;
}

.traffic-line-chart__tooltip-total {
  fill: #f8fbff;
  font-weight: 700;
}

.traffic-line-chart__tooltip-meta {
  fill: rgba(217, 229, 245, 0.95);
  font-size: 10px;
}

.traffic-line-chart__hint {
  margin: 0.52rem 0 0;
  color: #5f738a;
  font-size: 0.78rem;
}

.traffic-support-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.72rem;
}

.traffic-support-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(196, 206, 220, 0.85);
  background: rgba(255, 255, 255, 0.98);
}

.traffic-support-card > span {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.traffic-support-card strong {
  font-size: clamp(1rem, 1.35vw, 1.3rem);
  line-height: 1.12;
}

.traffic-support-card small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.traffic-support-note {
  padding: 0.82rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(196, 209, 223, 0.84);
  background: rgba(255, 255, 255, 0.98);
}

.traffic-support-note p {
  margin: 0.4rem 0 0;
  color: #334a61;
  line-height: 1.45;
}

.traffic-sample-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.traffic-sample-status--real {
  color: #0f67b5;
  border-color: rgba(30, 136, 229, 0.29);
  background: rgba(30, 136, 229, 0.11);
}

.traffic-sample-status--near-zero {
  color: #9a6a00;
  border-color: rgba(255, 179, 0, 0.34);
  background: rgba(255, 179, 0, 0.14);
}

/* === CRM chats: right panel control deck (pass4) === */
.crm-shell--chats .crm-conversation-stage {
  grid-template-columns: minmax(0, 1fr) minmax(262px, 304px);
  gap: 0.22rem;
}

.crm-shell--chats .crm-conversation-side {
  gap: 0.22rem;
  align-content: start;
}

.crm-shell--chats .crm-side-card {
  border-radius: 10px;
  border: 1px solid #d5e0f1;
  background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
  box-shadow: 0 5px 14px rgba(20, 47, 86, 0.08);
  padding: 0.28rem 0.34rem;
  gap: 0.2rem;
}

.crm-shell--chats .crm-side-card__head {
  gap: 0.28rem;
}

.crm-shell--chats .crm-side-card__head h4 {
  font-size: 0.69rem;
  letter-spacing: 0.02em;
  color: #1f456f;
  text-transform: uppercase;
}

.crm-shell--chats .crm-side-card--control {
  border-color: #bfd1ec;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.crm-shell--chats .crm-side-identity {
  display: grid;
  gap: 0.08rem;
}

.crm-shell--chats .crm-side-identity strong {
  font-size: 0.79rem;
  color: #1a3e63;
  letter-spacing: 0.01em;
}

.crm-shell--chats .crm-side-identity p {
  margin: 0;
  font-size: 0.64rem;
  color: #5c7591;
}

.crm-contact-name-row,
.crm-side-identity__name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.28rem;
}

.crm-contact-name-row {
  justify-content: flex-start;
}

.crm-side-identity__name-row {
  justify-content: space-between;
}

.crm-contact-name-row h3,
.crm-side-identity__name-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-contact-name-edit {
  flex: 0 0 auto;
  border: 1px solid #cddcec;
  border-radius: 0.42rem;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  color: #275172;
  cursor: pointer;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.18rem 0.38rem;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.crm-contact-name-edit:hover,
.crm-contact-name-edit:focus-visible {
  border-color: #7aa8da;
  color: #0d5eb6;
  box-shadow: 0 4px 10px rgba(51, 100, 150, 0.12);
  transform: translateY(-1px);
}

.crm-contact-name-edit:disabled {
  cursor: progress;
  opacity: 0.58;
  transform: none;
}

.crm-contact-name-edit--side {
  padding: 0.14rem 0.3rem;
  font-size: 0.52rem;
}

.crm-contact-name-hint,
.crm-contact-name-legal {
  margin: 0.04rem 0 0;
  color: #6e86a0;
  font-size: 0.59rem;
  line-height: 1.2;
}

.crm-shell--chats .crm-side-chip-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
}

.crm-shell--chats .crm-side-micro-chip {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0.04rem 0.32rem;
  border-radius: 7px;
  border: 1px solid #d5e0f1;
  background: #f8fbff;
  color: #355778;
  font-size: 0.58rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 700;
}

.crm-shell--chats .crm-side-micro-chip--motor {
  background: #f1f6ff;
  border-color: #cfe0f6;
  color: #2c568a;
}

.crm-shell--chats .crm-side-micro-chip--risk-high {
  background: #fff1f1;
  border-color: #f1c9c9;
  color: #9d3232;
}

.crm-shell--chats .crm-side-micro-chip--risk-normal {
  background: #fef8ea;
  border-color: #f0dcaa;
  color: #84621f;
}

.crm-shell--chats .crm-side-micro-chip--risk-low {
  background: #edf8ef;
  border-color: #c7e6cf;
  color: #2f6a41;
}

.crm-shell--chats .crm-side-pair-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.12rem;
}

.crm-shell--chats .crm-side-pair-list li {
  border: 1px solid #dce7f7;
  border-radius: 7px;
  background: #f8fbff;
  padding: 0.14rem 0.2rem;
  display: grid;
  gap: 0.02rem;
}

.crm-shell--chats .crm-side-pair-list span {
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #69839f;
}

.crm-shell--chats .crm-side-pair-list strong {
  font-size: 0.65rem;
  color: #1f466f;
}

.crm-shell--chats .crm-side-card--context #crmConversationContextMini .crm-context-mini {
  gap: 0.15rem;
}

.crm-shell--chats .crm-side-card--context #crmConversationContextMini .crm-context-mini__head strong {
  font-size: 0.72rem;
}

.crm-shell--chats .crm-side-card--context #crmConversationContextMini .crm-context-mini__head p {
  font-size: 0.61rem;
}

.crm-shell--chats .crm-side-card--context #crmConversationContextMini .crm-context-mini__list li {
  padding: 0.1rem 0.14rem;
  border-radius: 7px;
  border: 1px solid #dbe5f6;
  background: #f8fbff;
}

.crm-shell--chats .crm-side-card--context #crmConversationContextMini .crm-context-mini__list span {
  font-size: 0.54rem;
}

.crm-shell--chats .crm-side-card--context #crmConversationContextMini .crm-context-mini__list strong {
  font-size: 0.62rem;
}

.crm-shell--chats .crm-side-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.12rem;
}

.crm-shell--chats .crm-side-data-grid article {
  display: grid;
  gap: 0.03rem;
  border: 1px solid #dbe6f6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.16rem 0.2rem;
}

.crm-shell--chats .crm-side-data-grid span {
  font-size: 0.54rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #65809c;
}

.crm-shell--chats .crm-side-data-grid strong {
  font-size: 0.66rem;
  color: #1f446a;
}

.crm-shell--chats .crm-side-data-grid small {
  font-size: 0.58rem;
  color: #5b748f;
  line-height: 1.2;
}

.crm-shell--chats .crm-side-card--timeline {
  border-color: #cad9ef;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.crm-shell--chats .crm-side-mini-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
  max-height: 218px;
  overflow: auto;
  padding-right: 0.06rem;
}

.crm-shell--chats .crm-side-mini-timeline__item {
  border: 1px solid #dde7f6;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.14rem 0.18rem;
  display: grid;
  gap: 0.03rem;
}

.crm-shell--chats .crm-side-mini-timeline__item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.16rem;
}

.crm-shell--chats .crm-side-mini-timeline__item header strong {
  font-size: 0.62rem;
  color: #1f456e;
}

.crm-shell--chats .crm-side-mini-timeline__item header time {
  font-size: 0.55rem;
  color: #7088a3;
  white-space: nowrap;
}

.crm-shell--chats .crm-side-mini-timeline__item p {
  margin: 0;
  font-size: 0.6rem;
  color: #3f5d7c;
  line-height: 1.28;
}

.crm-shell--chats .crm-side-mini-timeline__item > span {
  width: fit-content;
  border-radius: 999px;
  border: 1px solid #d6e3f5;
  background: #f2f7ff;
  color: #46688b;
  font-size: 0.54rem;
  padding: 0.03rem 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.crm-shell--chats .crm-side-card--ops {
  gap: 0.16rem;
}

.crm-shell--chats .crm-side-quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.14rem;
}

.crm-shell--chats .crm-side-quick-actions .button {
  min-height: 24px;
  font-size: 0.58rem;
  border-radius: 7px;
  padding: 0.08rem 0.18rem;
}

.crm-shell--chats .crm-side-card--ops .crm-collapsible {
  border-radius: 8px;
  border: 1px dashed #cddcf0;
}

.crm-shell--chats .crm-side-card--ops .crm-collapsible summary {
  padding: 0.22rem 0.3rem;
  font-size: 0.61rem;
  letter-spacing: 0.01em;
  background: #f9fcff;
}

.crm-shell--chats .crm-side-card--ops .crm-collapsible__body {
  padding: 0.24rem 0.3rem;
  gap: 0.24rem;
}

.crm-shell--chats .crm-side-action-form {
  gap: 0.18rem;
}

.crm-shell--chats .crm-side-action-grid {
  gap: 0.14rem;
}

.crm-shell--chats .crm-side-action-form input,
.crm-shell--chats .crm-side-action-form select {
  min-height: 27px;
  border-radius: 7px;
  padding: 0.16rem 0.32rem;
  font-size: 0.62rem;
}

.crm-shell--chats .crm-tag-check-grid {
  gap: 0.12rem;
}

.crm-shell--chats .crm-tag-option {
  border-radius: 7px;
  padding: 0.12rem 0.24rem;
  font-size: 0.61rem;
}

.crm-shell--chats .crm-side-meta {
  font-size: 0.6rem;
  line-height: 1.3;
  color: #4f6986;
}

@media (max-width: 1600px) {
  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: minmax(0, 1fr) minmax(242px, 282px);
  }
}

@media (max-width: 1360px) {
  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-conversation-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .crm-shell--chats .crm-conversation-side {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-side-pair-list,
  .crm-shell--chats .crm-side-data-grid {
    grid-template-columns: 1fr;
  }
}

.traffic-sample-status--low {
  color: #6a7788;
  border-color: rgba(165, 178, 192, 0.34);
  background: rgba(165, 178, 192, 0.14);
}

.traffic-sample-status--empty {
  color: #7c8da2;
  border-color: rgba(176, 188, 203, 0.34);
  background: rgba(176, 188, 203, 0.14);
}

.traffic-sample-status--neutral {
  color: #697b90;
  border-color: rgba(165, 178, 192, 0.3);
  background: rgba(165, 178, 192, 0.12);
}

.activity-list {
  display: grid;
  gap: 0.85rem;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(217, 225, 234, 0.85);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
}

.activity-item strong,
.activity-item span {
  display: block;
}

.activity-item strong {
  color: var(--text-main);
  font-size: 0.98rem;
}

.activity-item span {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.activity-item__aside {
  text-align: right;
}

.finance-toolbar,
.staff-toolbar {
  margin-bottom: 1rem;
  align-items: center;
}

.billing-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.topbar__actions .billing-topbar-actions .button,
.topbar__actions .billing-topbar-actions .invoice-topbar-button {
  width: auto !important;
}

.invoice-topbar-button {
  white-space: nowrap;
}

.invoice-filter-toggle,
.invoice-toolbar-filter-toggle {
  display: none;
  align-items: center;
  gap: 0.28rem;
}

.invoice-filter-toggle .material-symbols-rounded,
.invoice-toolbar-filter-toggle .material-symbols-rounded {
  font-size: 16px;
  line-height: 1;
}

.invoice-filters-panel {
  transition: opacity 0.18s ease;
}

.invoice-search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.52rem;
  padding: 0.62rem 0.72rem;
}

.invoice-search-toolbar__field {
  margin: 0;
}

.invoice-search-toolbar__input {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 36px;
  padding: 0 0.62rem;
  border: 1px solid rgba(188, 200, 216, 0.95);
  border-radius: 10px;
  background: #ffffff;
}

.invoice-search-toolbar__input .material-symbols-rounded {
  font-size: 17px;
  line-height: 1;
  color: #64748b;
}

.invoice-search-toolbar__input input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  min-height: 34px;
  font-size: 0.84rem;
  color: #0f172a;
}

.invoice-search-toolbar .mini-button {
  min-height: 34px;
  border-radius: 999px;
  padding: 0.35rem 0.66rem;
  font-size: 0.72rem;
}

.invoice-limit-control {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 34px;
  padding: 0.2rem 0.44rem;
  border: 1px solid rgba(196, 206, 219, 0.95);
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
}

.invoice-limit-control .mini-button {
  min-height: 28px;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(193, 203, 215, 0.95);
  background: #f8fbff;
  font-size: 0.72rem;
}

.invoice-list-shell {
  gap: 0.4rem;
}

.invoice-list-shell .toolbar-card {
  margin-top: 0;
  padding: 0.42rem 0.56rem;
  border-radius: 12px;
}

.invoice-list-shell .analytics-toolbar {
  gap: 0.5rem;
}

.invoice-list-shell .analytics-toolbar--triple {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.invoice-list-shell .invoice-search-toolbar {
  padding: 0.38rem 0.5rem;
}

.invoice-list-shell .invoice-search-toolbar__field {
  gap: 0.22rem;
}

.invoice-list-shell .invoice-search-toolbar__field > span {
  font-size: 0.63rem;
}

.invoice-list-shell .invoice-filters-panel {
  margin-top: 0;
  padding: 0.38rem 0.5rem;
}

.invoice-list-shell .invoice-filters-panel .field {
  gap: 0.24rem;
}

.invoice-list-shell .invoice-filters-panel .field span {
  font-size: 0.68rem;
  line-height: 1.1;
}

.invoice-list-shell .invoice-filters-panel .field select {
  min-height: 32px;
  height: auto;
  padding: 0.28rem 0.5rem;
  border-radius: 10px;
}

.invoice-secondary-panel {
  border: 1px solid rgba(182, 201, 223, 0.86);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(255, 255, 255, 0.98));
  padding: 0.12rem 0.54rem;
}

.invoice-secondary-panel > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  min-height: 28px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1e3a5f;
  cursor: pointer;
}

.invoice-secondary-panel > summary::-webkit-details-marker {
  display: none;
}

.invoice-secondary-panel > summary .material-symbols-rounded {
  font-size: 16px;
  line-height: 1;
}

.invoice-secondary-panel__body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  padding-bottom: 0.38rem;
}

.invoice-secondary-panel__hint {
  margin: 0.08rem 0 0;
  width: 100%;
  color: #4a647f;
  font-size: 0.72rem;
  line-height: 1.34;
}

.invoice-list-shell .invoice-list-card {
  padding: 0.5rem;
  border-radius: 12px;
}

.invoice-list-shell .finance-toolbar {
  margin-bottom: 0.28rem;
  gap: 0.32rem;
  align-items: flex-start;
}

.invoice-list-shell .finance-toolbar .table-toolbar__meta {
  gap: 0.34rem;
}

.invoice-list-shell .finance-toolbar .mini-button,
.invoice-list-shell .finance-toolbar .toolbar-pill {
  min-height: 30px;
  padding: 0.24rem 0.48rem;
  font-size: 0.68rem;
}

.invoice-list-shell .finance-toolbar .toolbar-pill {
  font-weight: 800;
}

.invoice-list-shell .finance-toolbar .invoice-toolbar-access,
.invoice-list-shell .finance-toolbar .invoice-toolbar-bulk {
  gap: 0.34rem;
}

.invoice-bulk-menu {
  position: relative;
}

.invoice-bulk-menu__trigger {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
}

.invoice-bulk-menu__panel {
  right: 0;
  min-width: 198px;
}

.invoice-list-shell .finance-toolbar #invoiceBulkAction {
  min-height: 32px;
  padding: 0.28rem 0.5rem;
  border-radius: 8px;
}

.invoice-list-shell .finance-toolbar .invoice-bulk-button .material-symbols-rounded {
  font-size: 15px;
}

.invoice-list-shell .invoice-context-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin: 0.08rem 0 0.38rem;
}

.invoice-list-shell .invoice-context-hint {
  min-height: 30px;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.invoice-list-shell .module-table-shell {
  border-radius: 12px;
}

.invoice-list-shell .invoice-table th,
.invoice-list-shell .invoice-table td {
  padding: 0.32rem 0.4rem;
  font-size: 0.74rem;
  line-height: 1.2;
  vertical-align: middle;
}

.invoice-list-shell .invoice-table th {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.invoice-list-shell .invoice-sort-button {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.22rem;
  padding: 0;
  color: #4a6485;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.invoice-list-shell .invoice-sort-button .material-symbols-rounded {
  font-size: 14px;
  line-height: 1;
  color: #9aa8bc;
}

.invoice-list-shell .invoice-sort-button.is-active,
.invoice-list-shell .invoice-sort-button:hover {
  color: #1d4e89;
}

.invoice-list-shell .invoice-sort-button.is-active .material-symbols-rounded,
.invoice-list-shell .invoice-sort-button:hover .material-symbols-rounded {
  color: #1d4e89;
}

.invoice-list-shell .invoice-column-filters-row th {
  padding: 0.2rem 0.3rem;
  background: #f7fbff;
  border-top: 1px solid rgba(218, 228, 240, 0.92);
}

.invoice-list-shell .invoice-column-filter-input,
.invoice-list-shell .invoice-column-filter-select {
  width: 100%;
  min-height: 28px;
  border: 1px solid rgba(188, 200, 216, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: #1f2f43;
  font-size: 0.66rem;
  padding: 0.22rem 0.38rem;
}

.invoice-list-shell .invoice-column-filter-input::placeholder {
  color: #8a9ab0;
}

.invoice-list-shell .invoice-table .table-actions {
  gap: 0.3rem;
}

.invoice-list-shell .invoice-table td[data-label="Factura"],
.invoice-list-shell .invoice-table td[data-label="ID Factura"],
.invoice-list-shell .invoice-table td[data-label="Servicio ref"],
.invoice-list-shell .invoice-table td[data-label="ID Servicio"],
.invoice-list-shell .invoice-table td[data-label="Emision"],
.invoice-list-shell .invoice-table td[data-label="Fecha Oportuna de Pago"],
.invoice-list-shell .invoice-table td[data-label="Periodo"],
.invoice-list-shell .invoice-table td[data-label="Periodos pendientes"],
.invoice-list-shell .invoice-table td[data-label="Total"],
.invoice-list-shell .invoice-table td[data-label="Valor pagado"],
.invoice-list-shell .invoice-table td[data-label="Saldo"],
.invoice-list-shell .invoice-table td[data-label="Estado"] {
  white-space: nowrap;
}

.invoice-list-shell .invoice-id-link {
  color: #1d4e89;
  text-decoration: none;
  border-bottom: 1px dashed rgba(29, 78, 137, 0.35);
}

.invoice-list-shell .invoice-id-link:hover,
.invoice-list-shell .invoice-id-link:focus-visible {
  color: #163b68;
  border-bottom-color: rgba(22, 59, 104, 0.55);
  outline: none;
}

.invoice-list-shell .invoice-advanced-filters {
  grid-column: 1 / -1;
  border: 1px solid rgba(198, 208, 222, 0.95);
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.26rem 0.4rem 0.42rem;
}

.invoice-list-shell .invoice-advanced-filters > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #39547a;
}

.invoice-list-shell .invoice-advanced-filters > summary::-webkit-details-marker {
  display: none;
}

.invoice-list-shell .invoice-advanced-filters__grid {
  margin-top: 0.34rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 0.38rem;
}

.invoice-list-shell .invoice-table .status-badge {
  min-width: 74px;
  padding: 0.2rem 0.4rem;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  gap: 0.18rem;
}

.invoice-list-shell .invoice-table .client-cell {
  gap: 0.08rem;
  line-height: 1.15;
}

.invoice-list-shell .invoice-table .client-cell strong {
  font-size: 0.76rem;
}

.invoice-list-shell .invoice-table .client-cell span {
  font-size: 0.67rem;
}

.invoice-list-shell .invoice-actions-desktop {
  display: none !important;
}

.invoice-list-shell .invoice-actions-compact {
  display: flex;
}

.invoice-actions-compact--always {
  display: flex !important;
}

.invoice-list-shell .invoice-actions-compact__primary {
  flex-wrap: nowrap;
  gap: 0.24rem;
}

.invoice-list-shell .module-stats,
.invoice-list-shell .analytics-note,
.invoice-list-shell .summary-chip {
  display: none !important;
}

.invoice-list-shell .invoice-compact-action,
.invoice-list-shell .invoice-actions-menu .client-actions-menu__trigger,
.invoice-list-shell.is-compact-runtime .invoice-compact-action,
.invoice-list-shell.is-compact-runtime .invoice-actions-menu .client-actions-menu__trigger {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
}

.invoice-list-shell .invoice-compact-action .material-symbols-rounded {
  font-size: 16px;
}

.invoice-list-shell .invoice-actions-menu .client-actions-menu__panel {
  min-width: 178px;
  right: 0;
}

.invoice-list-shell .invoice-overflow-item {
  min-height: 30px;
  font-size: 0.7rem;
  gap: 0.36rem;
}

.invoice-topbar-menu {
  position: relative;
}

.invoice-topbar-menu__trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 34px;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(197, 206, 216, 0.95);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.invoice-topbar-menu__trigger::-webkit-details-marker {
  display: none;
}

.invoice-topbar-menu__trigger .material-symbols-rounded {
  font-size: 16px;
  line-height: 1;
}

.invoice-topbar-menu__panel {
  right: 0;
  min-width: 206px;
  max-height: 280px;
  overflow-y: auto;
}

.invoice-topbar-menu__item {
  min-height: 32px;
  gap: 0.42rem;
  font-size: 0.72rem;
}

.invoice-topbar-menu__item .material-symbols-rounded {
  font-size: 16px;
  line-height: 1;
}

.invoice-column-menu {
  position: relative;
}

.invoice-column-menu__trigger {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
}

.invoice-column-menu__panel {
  right: 0;
  min-width: 320px;
  max-height: min(520px, 70vh);
  overflow-y: auto;
  padding: 0.35rem;
  gap: 0.32rem;
}

.invoice-column-menu__hint {
  margin: 0 0 0.25rem;
  padding: 0.22rem 0.28rem;
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.25;
}

.invoice-column-menu__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  padding: 0.22rem;
  border: 1px solid rgba(197, 206, 216, 0.78);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
}

.invoice-column-menu__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  font-size: 0.72rem;
  color: #1f2f43;
  padding: 0.28rem 0.4rem;
  border-radius: 8px;
}

.invoice-column-menu__item input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.invoice-column-menu__order {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
}

.invoice-column-menu__move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  border: 1px solid rgba(197, 206, 216, 0.92);
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
}

.invoice-column-menu__move:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.invoice-column-menu__move .material-symbols-rounded {
  font-size: 17px;
  line-height: 1;
}

.invoice-dian-note summary {
  cursor: pointer;
  list-style: none;
}

.invoice-dian-note summary::-webkit-details-marker {
  display: none;
}

.invoice-dian-note p {
  margin: 0.45rem 0 0;
}

.invoice-toolbar-access,
.invoice-toolbar-bulk {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.invoice-bulk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
}

.invoice-bulk-button .material-symbols-rounded {
  font-size: 16px;
  line-height: 1;
}

.invoice-actions-desktop {
  width: 100%;
}

.invoice-actions-compact {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
}

.invoice-actions-compact__primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.invoice-action-cluster {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.38rem;
  min-width: max-content;
}

.invoice-compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(197, 206, 216, 0.95);
  border-radius: 10px;
  background: #f8fafc;
  color: #1f3a58;
  cursor: pointer;
}

.invoice-compact-action .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
}

.invoice-compact-action--primary {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

.invoice-compact-action--pdf {
  border-color: #b91c1c;
  background: #fef2f2;
  color: #b91c1c;
}

.invoice-compact-action--disabled,
.invoice-compact-action:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.invoice-compact-action[aria-busy="true"] {
  opacity: 0.7;
}

.invoice-compact-action[aria-busy="true"] .material-symbols-rounded {
  animation: invoiceIconBusy 0.85s linear infinite;
}

.invoice-actions-menu .client-actions-menu__trigger {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
}

.invoice-actions-menu .client-actions-menu__panel {
  min-width: 196px;
}

.invoice-overflow-item {
  gap: 0.42rem;
}

.invoice-overflow-item .material-symbols-rounded {
  font-size: 16px;
  line-height: 1;
}

.invoice-detail-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.52rem;
}

.invoice-detail-topbar__primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.invoice-detail-primary {
  white-space: nowrap;
}

.invoice-detail-menu {
  margin-left: auto;
}

.invoice-detail-menu__trigger {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
}

.invoice-detail-menu__panel {
  right: 0;
  min-width: 220px;
}

.invoice-detail-menu__item {
  min-height: 34px;
  gap: 0.44rem;
  font-size: 0.74rem;
}

.invoice-detail-menu__item .material-symbols-rounded {
  font-size: 17px;
  line-height: 1;
}

.invoice-edit-lock-note {
  margin: 0 0 0.52rem;
}

.invoice-edit-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.billing-topbar-actions.is-compact-runtime,
.invoice-list-shell.is-compact-runtime .billing-topbar-actions {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.12rem;
  scrollbar-width: thin;
}

.billing-topbar-actions.is-compact-runtime .button,
.billing-topbar-actions.is-compact-runtime .invoice-topbar-button,
.invoice-list-shell.is-compact-runtime .billing-topbar-actions .button,
.invoice-list-shell.is-compact-runtime .billing-topbar-actions .invoice-topbar-button {
  width: auto !important;
  flex: 0 0 auto;
  min-height: 34px;
  min-width: max-content;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  font-size: 0.74rem;
}

.billing-topbar-actions.is-compact-runtime .invoice-filter-toggle,
.invoice-list-shell.is-compact-runtime .billing-topbar-actions .invoice-filter-toggle {
  display: inline-flex;
}

.invoice-list-shell.is-compact-runtime .finance-toolbar .invoice-toolbar-filter-toggle {
  display: none;
}

.billing-topbar-actions.is-compact-runtime .invoice-topbar-menu__trigger,
.invoice-list-shell.is-compact-runtime .billing-topbar-actions .invoice-topbar-menu__trigger {
  width: auto !important;
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0.38rem 0.66rem;
  font-size: 0.72rem;
}

.billing-topbar-actions.is-compact-runtime .invoice-topbar-menu__panel {
  right: 0;
  min-width: 188px;
}

.invoice-list-shell.is-compact-runtime .invoice-filters-panel {
  display: none;
}

.invoice-list-shell.is-compact-runtime .invoice-filters-panel.is-open {
  display: grid;
}

.invoice-list-shell.is-compact-runtime .module-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.invoice-list-shell.is-compact-runtime .module-stats .stat-card {
  padding: 0.56rem 0.62rem;
}

.invoice-list-shell.is-compact-runtime .module-stats .stat-card strong {
  font-size: 0.96rem;
}

.invoice-list-shell.is-compact-runtime .analytics-note {
  padding: 0.55rem 0.62rem;
  font-size: 0.75rem;
}

.invoice-list-shell.is-compact-runtime .invoice-actions-desktop {
  display: none;
}

.invoice-list-shell.is-compact-runtime .invoice-actions-compact {
  display: flex;
}

.invoice-list-shell.is-compact-runtime .invoice-actions-compact__primary {
  flex-wrap: nowrap;
  gap: 0.3rem;
}

.invoice-list-shell.is-compact-runtime .invoice-compact-action,
.invoice-list-shell.is-compact-runtime .invoice-actions-menu .client-actions-menu__trigger {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
}

.invoice-list-shell.is-compact-runtime .invoice-actions-menu .client-actions-menu__panel {
  right: 0;
  min-width: 188px;
}

.invoice-list-shell.is-compact-runtime .invoice-overflow-item {
  min-height: 34px;
  font-size: 0.72rem;
}

.invoice-mobile-primary,
.pending-mobile-primary {
  display: none;
}

.invoice-mobile-primary__head,
.pending-mobile-primary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.invoice-mobile-primary__head strong,
.pending-mobile-primary__head strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.invoice-mobile-primary__amount,
.pending-mobile-primary__amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
}

.invoice-mobile-primary__amount span,
.pending-mobile-primary__amount span {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.invoice-mobile-primary__amount strong,
.pending-mobile-primary__amount strong {
  font-size: 1rem;
}

.invoice-mobile-more,
.pending-mobile-more {
  margin-top: 0.12rem;
  border: 1px dashed rgba(160, 174, 192, 0.5);
  border-radius: 10px;
  padding: 0.32rem 0.45rem 0.38rem;
  background: rgba(248, 251, 255, 0.95);
}

.invoice-mobile-more > summary,
.pending-mobile-more > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: #1e3a8a;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.invoice-mobile-more > summary::-webkit-details-marker,
.pending-mobile-more > summary::-webkit-details-marker {
  display: none;
}

.invoice-mobile-more > summary .material-symbols-rounded,
.pending-mobile-more > summary .material-symbols-rounded {
  font-size: 1rem;
}

.invoice-mobile-more__list,
.pending-mobile-more__list {
  margin-top: 0.38rem;
  display: grid;
  gap: 0.18rem;
}

.invoice-mobile-more:not([open]) > .invoice-mobile-more__list,
.pending-mobile-more:not([open]) > .pending-mobile-more__list {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.invoice-mobile-more[open] > .invoice-mobile-more__list,
.pending-mobile-more[open] > .pending-mobile-more__list {
  visibility: visible;
  pointer-events: auto;
}

.invoice-mobile-more__list p,
.pending-mobile-more__list p {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-main);
  line-height: 1.32;
}

.invoice-mobile-more__actions,
.pending-mobile-more__actions {
  margin-top: 0.28rem;
  display: grid;
  gap: 0.24rem;
}

.invoice-mobile-more__action,
.pending-mobile-more__action {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(188, 200, 215, 0.82);
  background: #ffffff;
  border-radius: 10px;
  min-height: 32px;
  padding: 0.32rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.invoice-mobile-more__action.is-danger {
  border-color: rgba(239, 68, 68, 0.45);
  color: #b91c1c;
}

.invoice-mobile-more__action.is-disabled {
  opacity: 0.55;
}

.invoice-table.is-compact-runtime {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.invoice-table.is-compact-runtime thead {
  display: none;
}

.invoice-table.is-compact-runtime tbody {
  display: grid;
  gap: 0.7rem;
}

.invoice-table.is-compact-runtime tbody tr {
  display: grid;
  gap: 0.48rem;
  padding: 0.68rem 0.72rem;
  border: 1px solid rgba(197, 206, 216, 0.82);
  border-radius: 12px;
  background: #ffffff;
}

.invoice-table.is-compact-runtime tbody td {
  border: 0;
  padding: 0;
  display: grid;
  gap: 0.14rem;
}

.invoice-table.is-compact-runtime tbody td::before {
  content: attr(data-label);
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.invoice-table.is-compact-runtime tbody td[data-label="Seleccion"] {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32rem;
}

.invoice-table.is-compact-runtime tbody td[data-label="Seleccion"]::before {
  display: none;
}

.invoice-table.is-compact-runtime tbody td[data-label="Seleccion"] input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.invoice-table.is-compact-runtime tbody td[data-label="Factura"],
.invoice-table.is-compact-runtime tbody td[data-label="Servicio ref"],
.invoice-table.is-compact-runtime tbody td[data-label="ID Servicio"],
.invoice-table.is-compact-runtime tbody td[data-label="Servicio"],
.invoice-table.is-compact-runtime tbody td[data-label="Router"],
.invoice-table.is-compact-runtime tbody td[data-label="ID Factura"],
.invoice-table.is-compact-runtime tbody td[data-label="Emision"],
.invoice-table.is-compact-runtime tbody td[data-label="Fecha Oportuna de Pago"],
.invoice-table.is-compact-runtime tbody td[data-label="Periodo"],
.invoice-table.is-compact-runtime tbody td[data-label="Periodos pendientes"],
.invoice-table.is-compact-runtime tbody td[data-label="Total"],
.invoice-table.is-compact-runtime tbody td[data-label="Valor pagado"],
.invoice-table.is-compact-runtime tbody td[data-label="Saldo"],
.invoice-table.is-compact-runtime tbody td[data-label="Correo"],
.invoice-table.is-compact-runtime tbody td[data-label="Cajero"],
.invoice-table.is-compact-runtime tbody td[data-label="Estado"] {
  display: none;
}

.invoice-table.is-compact-runtime tbody td[data-label="Acciones"] {
  gap: 0.32rem;
}

.invoice-table.is-compact-runtime .invoice-actions-desktop {
  display: none;
}

.invoice-table.is-compact-runtime .invoice-actions-compact {
  display: flex;
}

.invoice-table.is-compact-runtime .invoice-actions-compact__primary {
  flex-wrap: nowrap;
  gap: 0.3rem;
}

.invoice-table.is-compact-runtime tbody td[data-label="Cliente"] .client-cell {
  display: none;
}

.invoice-table.is-compact-runtime .invoice-mobile-primary {
  display: grid;
  gap: 0.35rem;
}

.invoice-table.is-compact-runtime .invoice-compact-action,
.invoice-table.is-compact-runtime .invoice-actions-menu .client-actions-menu__trigger {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
}

.invoice-table.is-compact-runtime .invoice-actions-menu .client-actions-menu__panel {
  right: 0;
  min-width: 188px;
}

.invoice-table.is-compact-runtime .invoice-overflow-item {
  min-height: 34px;
  font-size: 0.72rem;
}

.pending-payments-table.is-compact-runtime {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pending-payments-table.is-compact-runtime thead {
  display: none;
}

.pending-payments-table.is-compact-runtime tbody {
  display: grid;
  gap: 0.7rem;
}

.pending-payments-table.is-compact-runtime tbody tr {
  display: grid;
  gap: 0.48rem;
  padding: 0.68rem 0.72rem;
  border: 1px solid rgba(197, 206, 216, 0.82);
  border-radius: 12px;
  background: #ffffff;
}

.pending-payments-table.is-compact-runtime tbody td {
  border: 0;
  padding: 0;
  display: grid;
  gap: 0.14rem;
}

.pending-payments-table.is-compact-runtime tbody td::before {
  content: attr(data-label);
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pending-payments-table.is-compact-runtime tbody td[data-label="Servicio"],
.pending-payments-table.is-compact-runtime tbody td[data-label="Facturas"],
.pending-payments-table.is-compact-runtime tbody td[data-label="Saldo"],
.pending-payments-table.is-compact-runtime tbody td[data-label="Ultimo pago"],
.pending-payments-table.is-compact-runtime tbody td[data-label="Fecha Oportuna de Pago"],
.pending-payments-table.is-compact-runtime tbody td[data-label="Estado"] {
  display: none;
}

.pending-payments-table.is-compact-runtime tbody td[data-label="Cliente"] .client-cell {
  display: none;
}

.pending-payments-table.is-compact-runtime .pending-mobile-primary {
  display: grid;
  gap: 0.35rem;
}

.pending-payments-table.is-compact-runtime tbody td[data-label="Acciones"] {
  gap: 0.32rem;
}

.pending-payments-table.is-compact-runtime .pending-actions-desktop {
  display: none;
}

.pending-payments-table.is-compact-runtime .pending-actions-compact {
  display: flex;
}

.pending-payments-shell.is-compact-runtime .invoice-search-toolbar,
.invoice-list-shell.is-compact-runtime .invoice-search-toolbar {
  position: sticky;
  top: 0.32rem;
  z-index: 30;
  padding: 0.5rem 0.56rem;
  gap: 0.4rem;
  margin-bottom: 0.34rem;
  background: rgba(243, 247, 253, 0.95);
  border: 1px solid rgba(205, 215, 229, 0.92);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}

.pending-payments-shell.is-compact-runtime .invoice-search-toolbar .mini-button,
.invoice-list-shell.is-compact-runtime .invoice-search-toolbar .mini-button {
  min-height: 32px;
  padding: 0.3rem 0.56rem;
  font-size: 0.7rem;
}

.invoice-list-shell.is-compact-runtime .invoice-limit-control {
  min-height: 32px;
  padding: 0.18rem 0.4rem;
  font-size: 0.68rem;
}

.invoice-list-shell.is-compact-runtime .invoice-limit-control .mini-button {
  min-height: 26px;
  font-size: 0.68rem;
}

.pending-payments-shell.is-compact-runtime .invoice-filters-panel.is-open,
.invoice-list-shell.is-compact-runtime .invoice-filters-panel.is-open {
  position: relative;
  z-index: 28;
  margin-top: 0.2rem;
}

.invoice-detail-topbar.is-compact-runtime {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.12rem;
  scrollbar-width: thin;
}

.invoice-detail-topbar.is-compact-runtime .invoice-detail-topbar__primary {
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.topbar__actions .invoice-detail-topbar.is-compact-runtime .button {
  width: auto !important;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  font-size: 0.74rem;
}

.invoice-detail-topbar.is-compact-runtime .invoice-detail-menu {
  flex: 0 0 auto;
  margin-left: 0;
}

.topbar__actions .invoice-detail-topbar.is-compact-runtime .invoice-detail-menu__trigger {
  width: 38px !important;
  min-width: 38px;
  padding: 0;
  border-radius: 10px;
}

@keyframes invoiceIconBusy {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.86);
    opacity: 0.65;
  }
}

.staff-toolbar .analytics-note {
  margin-left: auto;
  min-width: min(100%, 340px);
}

.permission-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: var(--text-main);
}

.permission-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.staff-permission-editor {
  margin-top: 1rem;
}

.permission-meta-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.permission-zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.permission-zone-item {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(248, 250, 252, 0.85);
}

.permission-module-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.permission-module-summary > div {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.92);
}

.permission-module-summary strong {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--text-main);
}

.permission-module-summary p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.module-table tr.is-selected-row td {
  background: rgba(30, 136, 229, 0.08);
}

.module-table code {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-main);
  font-size: 0.76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.stat-card--danger::before {
  background: #ef4444;
}

.status-overview {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: center;
}

.status-overview__chart {
  display: flex;
  justify-content: center;
}

.status-donut {
  --donut-stops: #dbe6ef 0 100%;
  display: grid;
  place-items: center;
  width: 220px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: conic-gradient(var(--donut-stops));
  box-shadow: inset 0 0 0 1px rgba(197, 206, 216, 0.65);
}

.status-donut__center {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.status-donut__center strong {
  color: var(--text-main);
  font-size: 2rem;
  line-height: 1;
}

.status-donut__center span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-overview__legend {
  display: grid;
  gap: 0.8rem;
}

.status-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(217, 225, 234, 0.85);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
}

.status-chip__meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.status-chip__meta strong {
  display: block;
  color: var(--text-main);
  font-size: 0.98rem;
}

.status-chip__meta span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-chip__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--chip-color, #94a3b8);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--chip-color, #94a3b8) 16%, transparent);
}

.status-chip__value {
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 800;
}

.finance-balance-table tfoot td {
  background: rgba(225, 243, 220, 0.92);
  color: var(--text-main);
  font-weight: 800;
}

.finance-balance-table .is-negative {
  color: #dc2626;
  font-weight: 800;
}

@media (max-width: 1240px) {
  .finance-columns,
  .invoice-workspace,
  .analytics-grid,
  .invoice-two-col,
  .receipt-grid,
  .receipt-block-grid,
  .status-overview,
  .template-editor-layout,
  .field-grid,
  .field-grid--compact {
    grid-template-columns: 1fr;
  }

  .invoice-workspace__right {
    position: static;
  }

  .invoice-stats-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-list--compact {
    grid-template-columns: 1fr;
  }

  .invoice-preview-frame-wrap,
  .invoice-preview-frame {
    min-height: min(72vh, 620px);
    height: min(72vh, 620px);
  }

  .module-table--gateways {
    min-width: 460px;
  }
}

@media (max-width: 760px) {
  .button-row {
    width: 100%;
  }

  .button-row .button {
    width: 100%;
  }

  body[data-view="facturas"] .topbar__actions .button-row,
  body[data-view="ver-factura"] .topbar__actions .button-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding-bottom: 0.12rem;
    scrollbar-width: thin;
  }

  body[data-view="facturas"] .topbar__actions .button-row .button,
  body[data-view="ver-factura"] .topbar__actions .button-row .button {
    width: auto !important;
    flex: 0 0 auto;
    min-height: 34px;
    min-width: max-content;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    font-size: 0.74rem;
  }

  body[data-view="facturas"] .topbar__actions .button-row .client-actions-menu {
    flex: 0 0 auto;
  }

  .billing-topbar-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.12rem;
    scrollbar-width: thin;
  }

  .billing-topbar-actions .invoice-topbar-button {
    width: auto !important;
    flex: 0 0 auto;
    min-height: 34px;
    min-width: max-content;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    font-size: 0.74rem;
  }

  .billing-topbar-actions .invoice-filter-toggle,
  .finance-toolbar .invoice-toolbar-filter-toggle {
    display: inline-flex;
  }

  .finance-toolbar .invoice-toolbar-filter-toggle {
    display: none;
  }

  .billing-topbar-actions .invoice-topbar-menu__trigger {
    width: auto !important;
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0.38rem 0.66rem;
    font-size: 0.72rem;
  }

  .invoice-search-toolbar {
    position: sticky;
    top: 0.28rem;
    z-index: 30;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.48rem 0.52rem;
    gap: 0.38rem;
    margin-bottom: 0.32rem;
    background: rgba(243, 247, 253, 0.95);
    border: 1px solid rgba(205, 215, 229, 0.92);
    border-radius: 12px;
    backdrop-filter: blur(6px);
  }

  .invoice-search-toolbar__field > span {
    font-size: 0.68rem;
  }

  .invoice-search-toolbar__input {
    min-height: 34px;
    padding: 0 0.52rem;
  }

  .invoice-search-toolbar__input input {
    min-height: 32px;
    font-size: 0.8rem;
  }

  .invoice-limit-control {
    min-height: 32px;
    padding: 0.16rem 0.36rem;
    font-size: 0.68rem;
  }

  .invoice-limit-control .mini-button {
    min-height: 25px;
    font-size: 0.67rem;
  }

  .invoice-filters-panel {
    display: none;
  }

  .invoice-filters-panel.is-open {
    display: grid;
    position: relative;
    z-index: 28;
    margin-top: 0.2rem;
  }

  .invoice-list-shell .module-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .invoice-list-shell .module-stats .stat-card {
    padding: 0.56rem 0.62rem;
  }

  .invoice-list-shell .module-stats .stat-card strong {
    font-size: 0.96rem;
  }

  .invoice-list-shell .analytics-note {
    padding: 0.55rem 0.62rem;
    font-size: 0.75rem;
  }

  .invoice-detail-topbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.12rem;
    scrollbar-width: thin;
  }

  .invoice-detail-topbar__primary {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .topbar__actions .invoice-detail-topbar .button {
    width: auto !important;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    font-size: 0.74rem;
  }

  .invoice-detail-menu {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .topbar__actions .invoice-detail-topbar .invoice-detail-menu__trigger {
    width: 38px !important;
    min-width: 38px;
    padding: 0;
    border-radius: 10px;
  }

  .analytics-card__head,
  .analytics-legend {
    justify-content: flex-start;
  }

  .bar-chart {
    min-height: 220px;
  }

  .bar-chart__bars {
    min-height: 180px;
  }

  .invoice-preview-frame-wrap,
  .invoice-preview-frame {
    min-height: min(68vh, 520px);
    height: min(68vh, 520px);
  }

  .module-table--gateways {
    min-width: 390px;
  }

  .finance-toolbar .table-toolbar__meta {
    width: 100%;
  }

  .finance-toolbar .mini-button,
  .finance-toolbar .toolbar-pill {
    min-height: 34px;
    font-size: 0.76rem;
    padding: 0.45rem 0.62rem;
  }

  .finance-toolbar .invoice-toolbar-access {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  .finance-toolbar .invoice-toolbar-access .mini-button,
  .finance-toolbar .invoice-toolbar-access .toolbar-pill {
    flex: 0 0 auto;
    min-height: 32px;
    min-width: max-content;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    font-size: 0.72rem;
  }

  .finance-toolbar .invoice-toolbar-bulk {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.34rem;
  }

  .finance-toolbar .invoice-toolbar-bulk .mini-button,
  .finance-toolbar .invoice-toolbar-bulk .toolbar-pill {
    width: 100%;
    justify-content: center;
  }

  .finance-toolbar #invoiceBulkAction {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
  }

  .finance-toolbar #invoiceBulkCounter {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
  }

  .invoice-stats-compact {
    grid-template-columns: 1fr;
  }

  .status-overview {
    gap: 1rem;
  }

  .status-donut {
    width: min(220px, 100%);
  }

  .receipt-header,
  .activity-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .receipt-number,
  .activity-item__aside {
    justify-items: start;
    text-align: left;
  }

  .table-actions--grid {
    grid-template-columns: 1fr;
    min-width: 170px;
  }

  .template-editor-textarea {
    min-height: 420px;
    font-size: 0.78rem;
  }

  .template-editor-preview-frame-wrap,
  .template-editor-preview-frame {
    min-height: 280px;
    height: 280px;
  }

  .module-card {
    padding: 0.78rem;
    border-radius: 14px;
  }

  .module-card__head h3 {
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 42px;
    padding: 0.58rem 0.66rem;
    font-size: 0.86rem;
  }

  .module-table-shell {
    margin-inline: -0.15rem;
    padding-bottom: 0.35rem;
  }

  .module-table {
    min-width: 640px;
    font-size: 0.74rem;
  }

  .module-table th,
  .module-table td {
    padding: 0.42rem 0.48rem;
  }

  .module-table--mobile-cards {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .module-table--mobile-cards thead {
    display: none;
  }

  .module-table--mobile-cards tbody {
    display: grid;
    gap: 0.7rem;
  }

  .module-table--mobile-cards tbody tr {
    display: grid;
    gap: 0.35rem;
    padding: 0.68rem 0.72rem;
    border: 1px solid rgba(197, 206, 216, 0.82);
    border-radius: 12px;
    background: #ffffff;
  }

  .module-table--mobile-cards tbody td {
    border: 0;
    padding: 0;
    display: grid;
    gap: 0.14rem;
  }

  .module-table--mobile-cards tbody td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .module-table--mobile-cards .table-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .module-table--mobile-cards tbody td[data-label="Seleccion"] {
    display: flex;
    align-items: center;
    gap: 0.45rem;
  }

  .module-table--mobile-cards .table-actions .button {
    flex: 1 1 120px;
    min-width: 110px;
  }

  .internet-plan-row .internet-plan-mobile-actions {
    display: block;
  }

  .internet-plan-row .internet-plan-mobile-actions .ui-action-row--plans {
    justify-content: flex-start;
  }

  .internet-plan-row .internet-plan-actions-cell {
    display: none;
  }

  .invoice-table.module-table--mobile-cards tbody tr {
    gap: 0.48rem;
  }

  .invoice-table.module-table--mobile-cards tbody td[data-label="Factura"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Servicio ref"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="ID Servicio"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Servicio"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Router"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Emision"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Fecha Oportuna de Pago"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Periodo"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Periodos pendientes"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Total"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Valor pagado"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Saldo"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Correo"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Cajero"],
  .invoice-table.module-table--mobile-cards tbody td[data-label="Estado"] {
    display: none;
  }

  .invoice-table.module-table--mobile-cards tbody td[data-label="Acciones"] {
    gap: 0.32rem;
  }

  .invoice-table.module-table--mobile-cards .invoice-actions-desktop {
    display: none;
  }

  .invoice-table.module-table--mobile-cards .invoice-actions-compact {
    display: flex;
  }

  .invoice-table.module-table--mobile-cards .invoice-actions-compact__primary {
    flex-wrap: nowrap;
    gap: 0.3rem;
  }

  .invoice-table.module-table--mobile-cards .invoice-compact-action,
  .invoice-table.module-table--mobile-cards .invoice-actions-menu .client-actions-menu__trigger {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .invoice-table.module-table--mobile-cards .invoice-actions-menu .client-actions-menu__panel {
    right: 0;
    min-width: 188px;
  }

  .invoice-table.module-table--mobile-cards .invoice-overflow-item {
    min-height: 34px;
    font-size: 0.72rem;
  }

  .data-table {
    min-width: 100%;
    font-size: 10px;
  }

  .data-table th,
  .data-table td {
    padding: 3px 4px;
  }

  .data-table th[data-col-key="document"],
  .data-table td[data-col-key="document"],
  .data-table th[data-col-key="address"],
  .data-table td[data-col-key="address"],
  .data-table th[data-col-key="email"],
  .data-table td[data-col-key="email"],
  .data-table th[data-col-key="installationDate"],
  .data-table td[data-col-key="installationDate"],
  .data-table th[data-col-key="invoiceStatus"],
  .data-table td[data-col-key="invoiceStatus"],
  .data-table th[data-col-key="lastPending"],
  .data-table td[data-col-key="lastPending"],
  .data-table th[data-col-key="paymentsDone"],
  .data-table td[data-col-key="paymentsDone"],
  .data-table th[data-col-key="planPrice"],
  .data-table td[data-col-key="planPrice"],
  .data-table th[data-col-key="lastPaid"],
  .data-table td[data-col-key="lastPaid"],
  .data-table th[data-col-key="mac"],
  .data-table td[data-col-key="mac"] {
    display: none;
  }

  .data-table td[data-col-key="actions"] {
    min-width: 132px;
  }

  .table-actions--grid {
    min-width: 132px;
    gap: 0.34rem;
  }
}

@media (max-width: 560px) {
  .data-table th[data-col-key="service"],
  .data-table td[data-col-key="service"],
  .data-table th[data-col-key="plan"],
  .data-table td[data-col-key="plan"],
  .data-table th[data-col-key="router"],
  .data-table td[data-col-key="router"],
  .data-table th[data-col-key="pending"],
  .data-table td[data-col-key="pending"] {
    display: none;
  }

  .data-table th[data-col-key="name"],
  .data-table td[data-col-key="name"] {
    min-width: 132px;
  }

  .client-inline-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.module-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem;
  border: 1px solid var(--line, #d8dfeb);
  border-radius: 8px;
  background: #f7f9fc;
}

.module-subnav .button {
  min-height: 34px;
  padding-inline: 0.72rem;
}

.cash-dashboard-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.6fr);
  gap: 0.85rem;
  align-items: stretch;
}

.cash-status-card {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid var(--line, #d8dfeb);
  border-left: 4px solid var(--efnet-blue, #123f7a);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.06);
}

.cash-status-card h3 {
  margin: 0;
  color: var(--efnet-blue-dark, #0a2f5f);
  font-size: 1.08rem;
}

.cash-status-card p {
  margin: 0;
  color: #526171;
}

.cash-status-card--success {
  border-left-color: #13a35b;
}

.cash-status-card--warning {
  border-left-color: #f2a900;
}

.cash-status-card--info {
  border-left-color: var(--efnet-blue, #123f7a);
}

.cash-status-card__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.cash-status-card__meta span {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem;
  border-radius: 8px;
  background: #f6f8fb;
  color: #1e2f43;
  font-size: 0.84rem;
}

.cash-status-card__meta strong {
  color: #667487;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cash-kpi-grid,
.hotspot-kpi-grid {
  align-content: start;
}

.cash-top-actions .button,
.cash-status-card .button,
.hotspot-dashboard-hero .button {
  border-radius: 8px;
}

.hotspot-dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line, #d8dfeb);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.06);
}

.hotspot-dashboard-hero h3 {
  margin: 0.12rem 0 0.22rem;
  color: var(--efnet-blue-dark, #0a2f5f);
  font-size: 1.16rem;
}

.hotspot-dashboard-hero p {
  margin: 0;
  max-width: 760px;
  color: #526171;
}

.hotspot-flow-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

.hotspot-flow-strip--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0.85rem;
}

.hotspot-flow-step {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}

.hotspot-flow-step strong {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--efnet-blue, #123f7a);
  color: #fff;
  font-size: 0.78rem;
}

.hotspot-flow-step span {
  color: var(--efnet-blue-dark, #0a2f5f);
  font-weight: 700;
}

.hotspot-flow-step small,
.hotspot-preview-summary span {
  color: #5c6c7d;
}

.hotspot-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}

.hotspot-preview-summary strong {
  color: var(--efnet-blue-dark, #0a2f5f);
}

.hotspot-preview-summary span {
  padding: 0.28rem 0.48rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
}

.hotspot-operation-list {
  display: grid;
  gap: 0.5rem;
}

.hotspot-operation-note {
  padding: 0.7rem;
  border: 1px solid #dbe5f0;
  border-left: 4px solid var(--efnet-blue, #123f7a);
  border-radius: 8px;
  background: #f8fafc;
  color: #1e2f43;
}

.hotspot-checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.hotspot-checkbox-field input[type="checkbox"],
.hotspot-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
}

.hotspot-shell .hotspot-toolbar {
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hotspot-shell .hotspot-toolbar > .button,
.hotspot-shell .hotspot-toolbar > select,
.hotspot-shell .hotspot-toolbar > input {
  min-height: 40px;
}

.hotspot-shell .hotspot-form .field-grid {
  gap: 0.65rem;
}

.hotspot-shell .hotspot-table td[data-label="Accion"] .button-row,
.hotspot-shell .hotspot-table td[data-label="Acciones"] .button-row {
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .cash-dashboard-panel {
    grid-template-columns: 1fr;
  }

  .hotspot-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hotspot-flow-strip,
  .hotspot-flow-strip--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hotspot-shell .field-grid.field-grid--compact {
    grid-template-columns: 1fr;
  }

  .hotspot-shell .module-card__head {
    gap: 0.55rem;
  }

  .hotspot-shell .module-card__head .button-row {
    width: 100%;
    justify-content: flex-start;
  }

  .hotspot-shell .hotspot-toolbar > .button,
  .hotspot-shell .hotspot-toolbar > select,
  .hotspot-shell .hotspot-toolbar > input {
    flex: 1 1 180px;
  }
}

@media (max-width: 760px) {
  .cash-status-card__meta,
  .hotspot-flow-strip,
  .hotspot-flow-strip--compact {
    grid-template-columns: 1fr;
  }

  .module-subnav .button {
    flex: 1 1 150px;
  }

  .hotspot-shell .hotspot-toolbar > .button,
  .hotspot-shell .hotspot-toolbar > select,
  .hotspot-shell .hotspot-toolbar > input {
    flex: 1 1 100%;
    width: 100%;
  }

  .hotspot-shell .hotspot-table.module-table--mobile-cards tbody tr {
    gap: 0.42rem;
  }

  .hotspot-shell .hotspot-table.module-table--mobile-cards td[data-label="Accion"] .button-row .button,
  .hotspot-shell .hotspot-table.module-table--mobile-cards td[data-label="Acciones"] .button-row .button {
    flex: 1 1 100%;
  }
}

@media (max-width: 980px) {
  .module-grid--split {
    grid-template-columns: 1fr;
  }

  .customer-map-toolbar-card {
    flex-direction: column;
    align-items: stretch;
  }

  .customer-map-toolbar-card__stats {
    justify-content: flex-start;
  }

  .customer-map-main-head {
    align-items: flex-start;
    gap: 0.65rem;
    flex-direction: column;
  }

  .customer-map-main-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .customer-map-main-actions .customer-map-controls-trigger {
    flex: 1 1 auto;
  }

  .clients-map-canvas {
    min-height: clamp(360px, 64vh, 620px);
  }

  .customer-map-list-drawer {
    width: min(430px, 96vw);
    max-width: min(430px, 96vw);
  }

  .customer-map-list-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-map-list-summary .customer-map-list-stat:last-child {
    grid-column: 1 / -1;
  }

  .customer-map-list-scroll {
    max-height: calc(100vh - 244px);
  }

  .client-cell__meta {
    padding-left: 0;
  }

  .client-service-link {
    margin-left: 0;
  }

  .client-location-link {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .customer-map-toolbar-card {
    padding: 0.62rem 0.68rem;
  }

  .customer-map-toolbar-card__copy h2 {
    font-size: 1rem;
  }

  .customer-map-toolbar-chip {
    font-size: 0.63rem;
  }

  .customer-map-list-drawer {
    width: min(100vw, 100%);
    max-width: min(100vw, 100%);
  }

  .customer-map-list-summary {
    grid-template-columns: 1fr;
  }

  .customer-map-list-summary .customer-map-list-stat:last-child {
    grid-column: auto;
  }

  .customer-map-list-item__meta {
    flex-direction: column;
    gap: 0.22rem;
  }

  .clients-map-canvas {
    min-height: clamp(330px, 58vh, 500px);
  }

  .traffic-context-grid,
  .traffic-live-grid,
  .traffic-support-grid {
    grid-template-columns: 1fr;
  }

  .traffic-live-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .traffic-live-operational-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .traffic-reading-chip {
    min-width: 0;
  }

  .traffic-line-chart {
    min-width: 620px;
  }
}

.crm-shell {
  --crm-text: #16324f;
  --crm-muted: #5f7895;
  --crm-border: #d9e3f1;
  --crm-border-soft: #e7eef8;
  --crm-surface: #ffffff;
  --crm-surface-soft: #f6f9ff;
  --crm-primary: #285fae;
  --crm-shadow: 0 14px 34px rgba(16, 43, 86, 0.08);
  gap: 0.5rem;
}

.crm-shell--chats {
  gap: 0.42rem;
}

.crm-shell--meta {
  gap: 0.42rem;
}

.crm-shell--meta .crm-hero-card {
  padding: 0.3rem 0.44rem;
  gap: 0.46rem;
}

.crm-shell--meta .crm-brand-headline--compact .section-kicker {
  font-size: 0.58rem;
}

.crm-shell--meta .crm-brand-headline h3 {
  margin-top: 0;
  font-size: 0.82rem;
}

.crm-shell--meta .crm-layout {
  gap: 0.36rem;
  min-height: calc(100vh - 118px);
}

.crm-shell--meta .crm-section-shell,
.crm-shell--meta .crm-section-content {
  width: 100%;
  min-width: 0;
}

.crm-shell--meta .crm-section-panel--meta {
  padding: 0.42rem 0.46rem;
  min-height: 0;
  gap: 0.45rem;
}

.crm-shell .module-card {
  border-radius: 16px;
  border: 1px solid var(--crm-border);
  box-shadow: var(--crm-shadow);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.crm-hero-card {
  display: flex;
  justify-content: space-between;
  gap: 0.72rem;
  align-items: center;
  padding: 0.48rem 0.58rem;
}

.crm-hero-card--compact {
  gap: 0.56rem;
}

.crm-hero-card--chats {
  flex-wrap: wrap;
  align-items: flex-start;
}

.crm-hero-card--chats .crm-hero-card__main {
  flex: 1 1 320px;
}

.crm-hero-card--chats .crm-hero-card__side {
  flex: 0 0 auto;
}

.crm-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 0.3rem;
  width: 100%;
}

.crm-kpi-strip__item {
  border: 1px solid var(--crm-border-soft);
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.24rem 0.42rem;
  display: grid;
  gap: 0.03rem;
}

.crm-kpi-strip__item span {
  color: #6881a0;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-kpi-strip__item strong {
  color: #214c7a;
  font-size: 0.86rem;
}

/* Chats home: navega por menu lateral y prioriza area conversacional */
.crm-shell--chats .crm-hero-card {
  padding: 0.22rem 0.34rem;
  gap: 0.28rem;
}

.crm-shell--chats .crm-brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: 0.52rem;
  box-shadow: none;
}

.crm-shell--chats .crm-brand-headline--compact .section-kicker {
  font-size: 0.54rem;
  line-height: 1.05;
}

.crm-shell--chats .crm-brand-headline h3 {
  display: none;
}

.crm-shell--chats .crm-kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.14rem;
}

.crm-shell--chats .crm-kpi-strip__item {
  border-radius: 7px;
  padding: 0.1rem 0.24rem;
  gap: 0.01rem;
}

.crm-shell--chats .crm-kpi-strip__item span {
  font-size: 0.5rem;
  line-height: 1;
}

.crm-shell--chats .crm-kpi-strip__item strong {
  font-size: 0.72rem;
  line-height: 1.08;
}

.crm-hero-card__main {
  min-width: 0;
}

.crm-hero-card__side {
  display: grid;
  gap: 0.32rem;
  justify-items: end;
}

.crm-hero-stat {
  display: grid;
  gap: 0.16rem;
  justify-items: end;
  color: var(--crm-text);
  text-align: right;
  font-size: 0.8rem;
}

.crm-kpi-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #c6d8f5;
  background: #eef4ff;
  color: #1f4e91;
  padding: 0.17rem 0.5rem;
  font-size: 0.69rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crm-brand-headline {
  display: flex;
  align-items: flex-start;
  gap: 0.58rem;
}

.crm-brand-headline--compact {
  align-items: center;
}

.crm-brand-headline--compact .section-kicker {
  font-size: 0.64rem;
}

.crm-brand-headline h3 {
  margin: 0.02rem 0 0;
  font-size: 0.86rem;
  line-height: 1.18;
}

.crm-brand-headline .muted-copy {
  margin: 0;
  font-size: 0.83rem;
  color: var(--crm-muted);
}

.crm-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, #124eb5 0%, #2b65d9 100%);
  box-shadow: 0 6px 14px rgba(35, 87, 177, 0.26);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.crm-chat-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 0.42rem;
}

.crm-chat-kpi {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.34rem 0.48rem;
  display: grid;
  gap: 0.08rem;
}

.crm-chat-kpi span {
  color: #6b839f;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-chat-kpi strong {
  color: #214a78;
  font-size: 0.96rem;
}

.crm-layout {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 0.58rem;
  align-items: start;
  min-height: calc(100vh - 178px);
}

.crm-layout--customer360,
.crm-layout--pipeline,
.crm-layout--noc,
.crm-layout--operations,
.crm-layout--automations,
.crm-layout--whatsapp-billing,
.crm-layout--incidents,
.crm-layout--installations,
.crm-layout--meta-state,
.crm-layout--meta-connection,
.crm-layout--meta-numbers,
.crm-layout--meta-templates,
.crm-layout--meta-webhook,
.crm-layout--meta-tests {
  grid-template-columns: minmax(0, 1fr);
}

.crm-layout--focus {
  grid-template-columns: minmax(0, 1fr);
}

.crm-layout--focus .crm-column--inbox {
  display: none;
}

.crm-layout--focus .crm-workspace-body {
  grid-template-columns: 1fr;
}

.crm-layout--focus .crm-module-nav-card {
  display: none;
}

.crm-layout--focus .crm-section-nav-card {
  display: none;
}

.crm-column {
  min-height: 240px;
}

.crm-column--inbox {
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.crm-shell--chats .crm-layout {
  min-height: calc(100vh - 126px);
  gap: 0.34rem;
}

.crm-shell--chats .crm-column--inbox {
  top: 52px;
  max-height: calc(100vh - 58px);
}

.crm-section-panel--chat-core {
  padding: 0.34rem 0.38rem;
  min-height: calc(100vh - 178px);
}

.crm-shell--chats .crm-section-panel--chat-core {
  padding: 0.28rem 0.3rem;
  min-height: calc(100vh - 152px);
}

.crm-section-shell {
  min-width: 0;
  display: grid;
  gap: 0.64rem;
}

.crm-section-nav-card {
  padding: 0.5rem;
}

.crm-section-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 0.34rem;
}

.crm-section-nav .button {
  border-radius: 12px;
  justify-content: flex-start;
  text-align: left;
  height: auto;
  padding: 0.48rem 0.56rem;
  display: grid;
  gap: 0.14rem;
}

.crm-section-nav .button span {
  font-weight: 700;
  color: #214d7f;
  font-size: 0.8rem;
}

.crm-section-nav .button small {
  color: #6480a2;
  font-size: 0.71rem;
}

.crm-section-nav .button.is-active {
  border-color: rgba(43, 101, 217, 0.55);
  background: rgba(43, 101, 217, 0.12);
  box-shadow: inset 0 0 0 1px rgba(43, 101, 217, 0.14);
}

.crm-section-content {
  min-width: 0;
  display: grid;
  gap: 0.58rem;
}

.crm-section-panel {
  padding: 0.56rem;
  min-height: calc(100vh - 305px);
  display: grid;
  gap: 0.58rem;
}

.crm-section-panel--meta {
  align-content: start;
  gap: 0.52rem;
}

.crm-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.42rem;
}

.crm-meta-grid--templates-summary {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.crm-meta-ops-board {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 0.5rem;
}

.crm-meta-readiness-meter {
  position: relative;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #d4e1f1;
  background: #edf3fb;
  overflow: hidden;
}

.crm-meta-readiness-meter > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #2f7fc7 0%, #47a28f 100%);
  border-radius: inherit;
}

.crm-meta-gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.crm-meta-gate {
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.4rem 0.46rem;
  display: grid;
  gap: 0.16rem;
}

.crm-meta-gate strong {
  font-size: 0.72rem;
  color: #214a72;
}

.crm-meta-gate p {
  margin: 0;
  font-size: 0.69rem;
  color: #5d7899;
  line-height: 1.35;
}

.crm-meta-gate.is-ok {
  border-color: #c4e4d8;
  background: #f3fcf8;
}

.crm-meta-gate.is-blocked {
  border-color: #efd5c2;
  background: #fff8f3;
}

.crm-meta-guide-panel {
  border: 1px dashed #cad9ed;
  border-radius: 10px;
  background: #f7faff;
  padding: 0.46rem 0.52rem;
  display: grid;
  gap: 0.22rem;
}

.crm-meta-guide-panel h5 {
  margin: 0;
  font-size: 0.73rem;
  color: #244b73;
}

.crm-meta-guide-panel ol {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.17rem;
}

.crm-meta-guide-panel li {
  font-size: 0.7rem;
  color: #355a82;
  line-height: 1.35;
}

.crm-meta-connection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.48fr);
  gap: 0.5rem;
}

.crm-meta-connection-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, 0.52fr);
  gap: 0.5rem;
  align-items: start;
}

.crm-meta-embedded-primary {
  margin-bottom: 0.52rem;
  border: 1px solid #c7ddf6;
  background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
}

.crm-meta-embedded-actions {
  margin-top: 0.34rem;
}

.crm-meta-critical-banner {
  border: 1px solid #efcaa9;
  background: #fff6ed;
  color: #7a4517;
  border-radius: 11px;
  padding: 0.45rem 0.55rem;
  display: grid;
  gap: 0.18rem;
}

.crm-meta-critical-banner strong {
  font-size: 0.76rem;
}

.crm-meta-critical-banner p {
  margin: 0;
  font-size: 0.71rem;
  line-height: 1.35;
}

.crm-meta-embedded-cta {
  min-height: 40px;
  font-weight: 800;
  padding-inline: 0.8rem;
  box-shadow: 0 8px 18px rgba(24, 68, 117, 0.16);
}

.crm-meta-manual-advanced {
  border: 1px solid #d8e5f3;
  border-radius: 11px;
  padding: 0.36rem 0.46rem;
  background: #f7faff;
}

.crm-meta-manual-advanced > summary {
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  color: #254a70;
  list-style: none;
}

.crm-meta-manual-advanced > summary::-webkit-details-marker {
  display: none;
}

.crm-meta-manual-advanced[open] > summary {
  margin-bottom: 0.34rem;
}

.crm-meta-form {
  display: grid;
  gap: 0.44rem;
}

.crm-meta-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
}

.crm-meta-form label {
  display: grid;
  gap: 0.15rem;
}

.crm-meta-form label > span {
  font-size: 0.66rem;
  font-weight: 700;
  color: #4f6988;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-meta-form input,
.crm-meta-form select {
  min-height: 34px;
  border: 1px solid #d8e5f3;
  border-radius: 9px;
  padding: 0.22rem 0.48rem;
  font-size: 0.73rem;
  color: #254a70;
  background: #ffffff;
}

.crm-meta-form-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.46rem;
  padding: 0.24rem 0.34rem;
  border: 1px solid #d8e5f3;
  border-radius: 10px;
  background: #f7faff;
}

.crm-meta-form-toggle > span {
  margin: 0;
}

.crm-meta-form-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: auto;
}

.crm-meta-form-secrets {
  display: grid;
  gap: 0.34rem;
}

.crm-meta-secret-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.24rem;
}

.crm-meta-secret-field .button {
  min-height: 34px;
}

.crm-meta-form-actions {
  flex-wrap: wrap;
  gap: 0.28rem;
}

.crm-meta-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}

.crm-meta-checklist-item {
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.34rem 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.34rem;
}

.crm-meta-checklist-item strong {
  display: block;
  font-size: 0.73rem;
  color: #214b72;
}

.crm-meta-checklist-item p {
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  color: #5f7796;
  line-height: 1.35;
}

.crm-meta-numbers-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(286px, 0.38fr);
  gap: 0.5rem;
  align-items: start;
}

.crm-meta-surface--primary {
  min-width: 0;
}

.crm-meta-connection-column {
  min-width: 0;
  display: grid;
  gap: 0.46rem;
}

.crm-meta-card {
  border: 1px solid var(--crm-border-soft);
  border-radius: 11px;
  background: linear-gradient(180deg, #fcfdff 0%, #f6f9ff 100%);
  padding: 0.46rem 0.5rem;
  display: grid;
  gap: 0.15rem;
  box-shadow: 0 6px 16px rgba(19, 49, 92, 0.05);
}

.crm-meta-card__label {
  font-size: 0.63rem;
  color: #5f7693;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.crm-meta-card strong {
  font-size: 0.84rem;
  color: #153357;
  line-height: 1.2;
}

.crm-meta-card small {
  color: #6f839d;
  font-size: 0.68rem;
}

.crm-section-panel--whatsapp-billing {
  align-content: start;
  gap: 0.56rem;
}

.whatsapp-event-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.42rem;
}

.crm-meta-table--whatsapp-events th,
.crm-meta-table--whatsapp-events td {
  vertical-align: top;
}

.whatsapp-event-row.is-ready {
  background: linear-gradient(90deg, rgba(235, 250, 244, 0.74), rgba(255, 255, 255, 0.94));
}

.whatsapp-event-row.is-warning {
  background: linear-gradient(90deg, rgba(255, 248, 239, 0.78), rgba(255, 255, 255, 0.94));
}

.whatsapp-event-template-select {
  width: min(240px, 100%);
  min-height: 32px;
  border: 1px solid #cfe0f3;
  border-radius: 9px;
  background: #ffffff;
  color: #1f456a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.42rem;
}

.whatsapp-event-condition-list {
  margin: 0;
  padding-left: 0.9rem;
  display: grid;
  gap: 0.12rem;
}

.whatsapp-event-condition-list li {
  font-size: 0.68rem;
  color: #395b7c;
  line-height: 1.32;
}

.whatsapp-event-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
  max-width: 230px;
}

.whatsapp-event-variable-list span {
  border: 1px solid #d5e4f5;
  background: #f5f9ff;
  color: #315a82;
  border-radius: 999px;
  padding: 0.1rem 0.32rem;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
}

.whatsapp-event-blockers td {
  border-top: 0;
  background: #fff7ef;
  color: #854d14;
  font-size: 0.7rem;
}

.whatsapp-event-preview-panel {
  display: grid;
  gap: 0.45rem;
}

.whatsapp-event-preview-card {
  max-width: 780px;
}

.whatsapp-template-preview-bubble {
  width: min(520px, 100%);
  border-radius: 16px 16px 16px 4px;
  border: 1px solid #c7efb5;
  background: #dcffd0;
  color: #2a5262;
  padding: 0.75rem 0.82rem;
  font-size: 0.82rem;
  line-height: 1.55;
  box-shadow: 0 10px 22px rgba(42, 82, 98, 0.08);
  white-space: normal;
}

.whatsapp-event-preview-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.whatsapp-event-preview-vars span {
  border: 1px solid #d7e5f3;
  border-radius: 999px;
  background: #f7faff;
  color: #2b4f74;
  padding: 0.15rem 0.42rem;
  font-size: 0.68rem;
}

.whatsapp-event-control-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.whatsapp-event-control-strip article {
  border: 1px solid #d8e5f3;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.52rem 0.6rem;
}

.whatsapp-event-control-strip strong {
  display: block;
  color: #224b73;
  font-size: 0.78rem;
  margin-bottom: 0.14rem;
}

.whatsapp-event-control-strip p {
  margin: 0;
  color: #5e7794;
  font-size: 0.72rem;
  line-height: 1.4;
}

.crm-meta-surface {
  border: 1px solid var(--crm-border-soft);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.5rem 0.56rem;
  display: grid;
  gap: 0.4rem;
}

.crm-meta-surface__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.crm-meta-surface__head h4 {
  margin: 0;
  font-size: 0.78rem;
  color: #224a74;
}

.crm-meta-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.34rem;
}

.crm-meta-check-item {
  border: 1px solid #dce8f6;
  border-radius: 10px;
  padding: 0.38rem 0.42rem;
  background: #f9fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.34rem;
}

.crm-meta-check-item strong {
  display: block;
  font-size: 0.73rem;
  color: #224a74;
}

.crm-meta-check-item small {
  display: block;
  font-size: 0.64rem;
  color: #6a819d;
}

.crm-meta-check-item.is-missing {
  border-color: #f2d2bb;
  background: #fff9f5;
}

.crm-meta-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.3rem 0.5rem;
}

.crm-meta-detail-grid p {
  margin: 0;
  font-size: 0.72rem;
  color: #27486e;
}

.crm-meta-panel {
  border: 1px solid var(--crm-border-soft);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.56rem 0.6rem;
  display: grid;
  gap: 0.34rem;
}

.crm-meta-panel p {
  margin: 0;
  font-size: 0.77rem;
  color: #1f3e63;
}

.crm-meta-panel pre {
  margin: 0;
  padding: 0.46rem 0.52rem;
  border-radius: 10px;
  background: #f4f7fc;
  border: 1px solid #d7e2f1;
  color: #1f3e63;
  font-size: 0.7rem;
  line-height: 1.45;
  max-height: 220px;
  overflow: auto;
}

.crm-meta-inline {
  display: grid;
  gap: 0.18rem;
}

.crm-meta-inline--summary {
  gap: 0.24rem;
}

.crm-meta-inline-state {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
}

.crm-meta-inline-state--dense {
  gap: 0.2rem;
}

.crm-meta-inline-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0.1rem 0.46rem;
  border-radius: 999px;
  background: #edf3fb;
  border: 1px solid #d5e2f2;
  color: #33567d;
  font-size: 0.63rem;
  font-weight: 700;
}

.crm-meta-table-shell {
  border: 1px solid #dbe6f4;
  border-radius: 11px;
  overflow: auto;
  background: #ffffff;
  max-height: 420px;
}

.crm-meta-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.crm-meta-table--numbers {
  min-width: 940px;
}

.crm-meta-table th,
.crm-meta-table td {
  padding: 0.42rem 0.46rem;
  border-bottom: 1px solid #e7eef8;
  text-align: left;
  vertical-align: top;
}

.crm-meta-table th {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5c7390;
  background: #f7faff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.crm-meta-table td {
  font-size: 0.72rem;
  color: #214566;
}

.crm-meta-table__empty {
  text-align: center;
  color: #6480a1;
  padding: 0.8rem 0.55rem;
}

.crm-meta-empty-state {
  display: grid;
  gap: 0.32rem;
  justify-items: center;
  text-align: center;
  max-width: none;
  width: 100%;
  margin: 0;
}

.crm-meta-empty-state h5 {
  margin: 0;
  color: #214c75;
  font-size: 0.83rem;
}

.crm-meta-empty-state p {
  margin: 0;
  color: #5c7797;
  font-size: 0.73rem;
  line-height: 1.4;
}

.crm-meta-templates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.64fr) minmax(300px, 0.36fr);
  gap: 0.5rem;
  align-items: start;
}

.crm-meta-webhook-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.48fr);
  gap: 0.5rem;
  align-items: start;
}

.crm-meta-tests-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.48fr);
  gap: 0.5rem;
  align-items: start;
}

.crm-meta-wizard-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}

.crm-meta-wizard-step {
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.38rem 0.44rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.crm-meta-wizard-step.is-ok {
  border-color: #c4e4d8;
  background: #f3fcf8;
}

.crm-meta-wizard-step.is-pending {
  border-color: #eedbc7;
  background: #fff8f2;
}

.crm-meta-wizard-step strong {
  display: block;
  color: #234c73;
  font-size: 0.74rem;
}

.crm-meta-wizard-step p {
  margin: 0.08rem 0 0;
  color: #5f7898;
  font-size: 0.69rem;
  line-height: 1.35;
}

.crm-meta-toolbar {
  display: grid;
  gap: 0.34rem;
}

.crm-meta-toolbar__controls {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 0.3rem;
}

.crm-meta-toolbar__controls input,
.crm-meta-toolbar__controls select {
  min-height: 34px;
  border: 1px solid #d8e5f3;
  border-radius: 9px;
  padding: 0.22rem 0.48rem;
  font-size: 0.73rem;
  color: #254a70;
  background: #ffffff;
}

.crm-meta-observed-empty {
  border: 1px solid #f0dcc0;
  background: #fff8ef;
  color: #6b4a23;
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.crm-meta-observed-empty--warn {
  border-color: #f1d2b4;
  background: #fff4e8;
  color: #7f4b14;
}

.crm-meta-observed-empty--ok {
  border-color: #c7e6d8;
  background: #f3fcf7;
  color: #21583d;
}

.crm-meta-source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  border: 1px solid #d5e2f2;
  background: #eef4fb;
  color: #33577f;
  font-size: 0.63rem;
  font-weight: 700;
}

.crm-meta-source-badge--meta_real {
  border-color: #b9e2d0;
  background: #ecfaf3;
  color: #1f6040;
}

.crm-meta-source-badge--observed {
  border-color: #d3def0;
  background: #f4f7fc;
  color: #335f8e;
}

.crm-meta-source-badge--reference {
  border-color: #ebd9bd;
  background: #fff7ec;
  color: #7a531e;
}

.crm-meta-source-badge--other,
.crm-meta-source-badge--unknown {
  border-color: #dbe4ef;
  background: #f8fafd;
  color: #5a718d;
}

.crm-meta-tests-missing {
  margin-top: 0;
}

.crm-meta-table--templates {
  min-width: 1180px;
}

.crm-meta-template-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  gap: 0.55rem;
  align-items: start;
}

.crm-section-panel--template-admin .crm-meta-table-shell {
  max-height: min(56vh, 600px);
}

.crm-meta-template-preview-card {
  position: sticky;
  top: 0.65rem;
}

.crm-meta-template-editor {
  margin-top: 0.55rem;
}

.crm-meta-template-editor[hidden] {
  display: none;
}

.crm-meta-template-form {
  display: grid;
  gap: 0.42rem;
}

.crm-meta-template-form label {
  display: grid;
  gap: 0.18rem;
  color: #244b70;
  font-size: 0.72rem;
  font-weight: 800;
}

.crm-meta-template-form input,
.crm-meta-template-form select,
.crm-meta-template-form textarea,
.crm-meta-template-assign-box select {
  width: 100%;
  border: 1px solid #d8e5f3;
  border-radius: 9px;
  background: #ffffff;
  color: #1d3856;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.42rem 0.5rem;
}

.crm-meta-template-form textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.42;
}

.crm-meta-template-preview {
  border: 1px solid #d8e7d1;
  border-radius: 14px;
  background: linear-gradient(145deg, #f7f1e8, #fffaf3);
  padding: 0.55rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  min-height: 142px;
}

.crm-meta-template-preview h5 {
  margin: 0 0 0.45rem;
  color: #075e54;
  font-size: 0.78rem;
}

.crm-meta-template-preview__bubble {
  border-radius: 10px;
  background: #dcf8c6;
  color: #245046;
  padding: 0.7rem 0.78rem;
  font-size: 0.77rem;
  line-height: 1.55;
  white-space: normal;
  max-height: min(48vh, 480px);
  overflow: auto;
}

.crm-meta-table--drafts {
  min-width: 980px;
}

.crm-meta-template-assign-box {
  display: grid;
  gap: 0.35rem;
  max-width: 720px;
}

.button-row--wrap {
  flex-wrap: wrap;
}

.crm-meta-table--webhook {
  min-width: 900px;
}

.crm-meta-table--tests {
  min-width: 980px;
}

.crm-meta-alert-list {
  margin: 0;
  padding: 0 0 0 1.05rem;
  display: grid;
  gap: 0.18rem;
}

.crm-meta-alert-list li {
  color: #5f3c1f;
  font-size: 0.72rem;
}

.crm-meta-connected-accounts {
  margin-top: 0.7rem;
}

.crm-meta-channel-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.55rem 0 0.35rem;
}

.crm-meta-channel-strip__item {
  border: 1px solid #dce8f7;
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.82);
  padding: 0.44rem 0.56rem;
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.crm-meta-channel-strip__item span {
  color: #52708f;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crm-meta-channel-strip__item strong {
  overflow: hidden;
  color: #123557;
  font-size: 0.82rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-meta-channel-strip__item small {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.crm-meta-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.crm-meta-channel-card {
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.56rem 0.62rem;
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.crm-meta-channel-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.crm-meta-channel-card__head strong {
  display: block;
  font-size: 0.82rem;
  color: #14385f;
}

.crm-meta-channel-card__head small,
.crm-meta-channel-card__main small {
  display: block;
  font-size: 0.68rem;
  color: #6e8199;
}

.crm-meta-channel-card__main p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #172f4e;
}

.crm-meta-channel-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.18rem;
}

.crm-meta-channel-list li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  color: #375777;
}

.crm-meta-alert-list--compact {
  padding-left: 0.86rem;
}

.crm-meta-alert-list--compact li {
  font-size: 0.67rem;
  line-height: 1.25;
}

.crm-meta-detail-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding-top: 0.16rem;
  border-top: 1px solid #e4edf7;
}

.crm-meta-steps {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.2rem;
}

.crm-meta-steps li {
  color: #27486d;
  font-size: 0.72rem;
  line-height: 1.35;
}

@media (max-width: 960px) {
  .crm-meta-channel-strip,
  .crm-meta-channel-grid {
    grid-template-columns: 1fr;
  }

  .crm-meta-ops-board,
  .crm-meta-connection-layout,
  .crm-meta-connection-form-layout,
  .crm-meta-numbers-layout,
  .crm-meta-templates-layout,
  .crm-meta-template-admin-layout,
  .crm-meta-webhook-layout,
  .crm-meta-tests-layout {
    grid-template-columns: 1fr;
  }

  .crm-meta-template-preview-card {
    position: static;
  }

  .crm-meta-form-grid {
    grid-template-columns: 1fr;
  }

  .crm-meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .crm-meta-toolbar__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-meta-check-grid,
  .crm-meta-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-meta-gate-grid {
    grid-template-columns: 1fr;
  }

  .crm-meta-table {
    min-width: 600px;
  }

  .crm-meta-table--numbers {
    min-width: 680px;
  }

  .crm-meta-table--templates {
    min-width: 760px;
  }

  .crm-meta-table--webhook {
    min-width: 700px;
  }

  .crm-meta-table--tests {
    min-width: 760px;
  }
}

@media (max-width: 680px) {
  .crm-meta-surface__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .crm-meta-check-grid,
  .crm-meta-detail-grid {
    grid-template-columns: 1fr;
  }

  .crm-meta-table {
    min-width: 520px;
  }

  .crm-meta-toolbar__controls {
    grid-template-columns: 1fr;
  }

  .crm-meta-table--templates {
    min-width: 620px;
  }

  .crm-meta-table--webhook {
    min-width: 560px;
  }

  .crm-meta-table--tests {
    min-width: 620px;
  }
}

.crm-workspace-shell {
  min-width: 0;
  display: grid;
  gap: 0.65rem;
}

.crm-workspace-head {
  display: grid;
  gap: 0.2rem;
  padding: 0.42rem 0.55rem;
}

.crm-workspace-subhint {
  margin: 0;
  color: #597392;
  font-size: 0.73rem;
}

.crm-workspace-body {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.crm-module-nav-card {
  padding: 0.6rem;
}

.crm-module-nav {
  display: grid;
  gap: 0.34rem;
}

.crm-module-nav .button {
  border-radius: 12px;
  justify-content: flex-start;
  text-align: left;
  height: auto;
  padding: 0.55rem 0.6rem;
  display: grid;
  gap: 0.15rem;
}

.crm-module-nav .button span {
  font-weight: 700;
  color: #214d7f;
  font-size: 0.82rem;
}

.crm-module-nav .button small {
  color: #6480a2;
  font-size: 0.72rem;
}

.crm-module-nav .button.is-active {
  border-color: rgba(43, 101, 217, 0.55);
  background: rgba(43, 101, 217, 0.12);
  box-shadow: inset 0 0 0 1px rgba(43, 101, 217, 0.14);
}

.crm-workspace-content {
  min-width: 0;
  display: grid;
  gap: 0.6rem;
}

.crm-workspace-panel {
  display: none;
  padding: 0.56rem;
  min-height: calc(100vh - 305px);
}

.crm-workspace-panel.is-active {
  display: grid;
  gap: 0.58rem;
}

.crm-workspace-panel .module-card__head {
  margin-bottom: 0.2rem;
}

.crm-panel-stack {
  display: grid;
  gap: 0.68rem;
}

.crm-panel-stack > form {
  border: 1px solid var(--crm-border-soft);
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.56rem 0.6rem;
}

.crm-panel-stack > #crmIncidentsList,
.crm-panel-stack > #crmInstallationsList {
  border: 1px solid var(--crm-border-soft);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.56rem 0.6rem;
}

.crm-fieldops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 0.72rem;
}

.crm-fieldops-grid > section {
  border: 1px solid var(--crm-border-soft);
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.55rem 0.58rem;
  display: grid;
  gap: 0.45rem;
}

.crm-column .module-card__head h3 {
  margin: 0.1rem 0 0;
}

.crm-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.54rem;
}

.crm-inbox-count {
  align-self: center;
  border: 1px solid #d1def2;
  border-radius: 999px;
  padding: 0.14rem 0.44rem;
  font-size: 0.68rem;
  color: #224f8d;
  background: #f2f7ff;
  white-space: nowrap;
}

.crm-filter-form {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.24rem;
  margin-bottom: 0.36rem;
  padding: 0.32rem;
  border: 1px solid var(--crm-border-soft);
  border-radius: 10px;
  background: var(--crm-surface-soft);
}

.crm-shell--chats .crm-inbox-head .section-kicker {
  font-size: 0.54rem;
}

.crm-shell--chats .crm-inbox-head h3 {
  margin-top: 0.02rem;
  font-size: 0.8rem;
}

.crm-shell--chats .crm-filter-form {
  margin-top: 0.12rem;
  margin-bottom: 0.18rem;
  padding: 0.18rem;
  gap: 0.18rem;
}

.crm-shell--chats .crm-filter-form__basic {
  gap: 0.2rem;
}

.crm-shell--chats .crm-filter-form input,
.crm-shell--chats .crm-filter-form select {
  min-height: 30px;
  padding: 0.26rem 0.42rem;
  font-size: 0.71rem;
}

.crm-shell--chats .crm-filter-form .button {
  min-height: 30px;
  padding: 0.22rem 0.44rem;
  font-size: 0.69rem;
}

.crm-filter-form__basic {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) repeat(2, minmax(104px, 1fr)) auto auto;
  gap: 0.3rem;
  align-items: center;
}

.crm-filter-form__advanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 0.32rem;
}

.crm-filter-queue {
  grid-column: 1 / -1;
  border: 1px dashed #d4e1f3;
  border-radius: 9px;
  padding: 0.3rem 0.36rem;
  background: #ffffff;
  display: grid;
  gap: 0.2rem;
}

.crm-filter-queue__label {
  font-size: 0.68rem;
  color: #5a7596;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-filter-advanced {
  border: 1px dashed #d5e0f0;
  border-radius: 11px;
  background: #fafdff;
  overflow: hidden;
}

.crm-filter-advanced summary {
  cursor: pointer;
  list-style: none;
  padding: 0.34rem 0.44rem;
  color: #2b5385;
  font-size: 0.72rem;
  font-weight: 700;
}

.crm-filter-advanced summary::-webkit-details-marker {
  display: none;
}

.crm-filter-advanced[open] summary {
  border-bottom: 1px solid #dfe8f7;
}

.crm-filter-advanced .crm-filter-form__advanced {
  padding: 0.36rem 0.44rem 0.42rem;
}

.crm-queue-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.26rem;
  margin: 0;
}

.crm-queue-tabs .button {
  border-radius: 999px;
  padding: 0.18rem 0.46rem;
  font-size: 0.7rem;
}

.crm-queue-tabs .button.is-active {
  border-color: rgba(43, 101, 217, 0.55);
  background: rgba(43, 101, 217, 0.12);
  color: #214f92;
}

.crm-sla-board {
  margin-bottom: 0.2rem;
}

.crm-sla-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  gap: 0.45rem;
}

.crm-sla-card {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: var(--crm-surface);
  padding: 0.52rem 0.6rem;
  display: grid;
  gap: 0.2rem;
}

.crm-sla-card.is-warning {
  border-color: #f0c685;
  background: #fff9ef;
}

.crm-sla-card.is-danger {
  border-color: #e7a1a1;
  background: #fff4f4;
}

.crm-sla-card__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5a7291;
}

.crm-sla-card strong {
  font-size: 1.08rem;
  color: #1f4269;
}

.crm-sla-card small {
  color: var(--crm-muted);
  font-size: 0.74rem;
}

.crm-sla-grid {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 0.55rem;
}

.crm-hybrid-board {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(170px, 1fr));
  gap: 0.55rem;
}

.crm-sla-pane--hybrid-kpis {
  gap: 0.42rem;
}

.crm-hybrid-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.crm-hybrid-kpi-item {
  border: 1px solid #dfe7f5;
  border-radius: 9px;
  background: #ffffff;
  padding: 0.34rem 0.4rem;
  display: grid;
  gap: 0.12rem;
}

.crm-hybrid-kpi-item span {
  font-size: 0.68rem;
  color: #5a7291;
}

.crm-hybrid-kpi-item strong {
  font-size: 0.9rem;
  color: #1f4269;
}

.crm-hybrid-kpi-item small {
  font-size: 0.67rem;
  color: var(--crm-muted);
}

.crm-hybrid-improvement-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.38rem;
}

.crm-hybrid-improvement-list li {
  border: 1px solid #dfe7f5;
  border-radius: 9px;
  background: #ffffff;
  padding: 0.36rem 0.42rem;
  display: grid;
  gap: 0.16rem;
}

.crm-hybrid-improvement-list strong {
  color: #1f4269;
  font-size: 0.79rem;
}

.crm-hybrid-improvement-list p {
  margin: 0;
  color: #34557b;
  font-size: 0.75rem;
  line-height: 1.34;
}

.crm-hybrid-improvement-list small {
  color: var(--crm-muted);
  font-size: 0.68rem;
}

.crm-sla-pane {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 0.55rem 0.62rem;
  background: var(--crm-surface-soft);
  display: grid;
  gap: 0.35rem;
}

.crm-sla-pane h4 {
  margin: 0;
  color: #1f4269;
  font-size: 0.87rem;
}

.crm-sla-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.24rem;
}

.crm-sla-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #2f4e71;
  font-size: 0.81rem;
}

.crm-sla-list strong {
  color: #1f4269;
}

.crm-filter-form input,
.crm-filter-form select,
.crm-install-form input,
.crm-install-form select,
.crm-incident-form input,
.crm-incident-form select,
.crm-inline-form select,
.crm-operational-form input,
.crm-operational-form select,
.crm-quick-form input,
.crm-quick-form textarea,
.crm-reply-form textarea,
.crm-note-form textarea,
.crm-incident-form textarea {
  border: 1px solid #d4dff0;
  border-radius: 10px;
  font: inherit;
  padding: 0.5rem 0.62rem;
  background: #ffffff;
}

.crm-conv-list {
  display: grid;
  gap: 0.3rem;
  max-height: calc(100vh - 300px);
  overflow: auto;
  padding-right: 0.15rem;
}

.crm-shell--chats .crm-conv-list {
  max-height: calc(100vh - 214px);
  min-height: 560px;
}

.crm-conv-item {
  border: 1px solid var(--crm-border);
  background: #ffffff;
  border-radius: 12px;
  padding: 0.42rem 0.5rem;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

.crm-conv-item:hover {
  border-color: #2b65d9;
  box-shadow: 0 10px 18px rgba(39, 92, 180, 0.13);
  transform: translateY(-1px);
}

.crm-conv-item.is-active {
  border-color: #2b65d9;
  box-shadow: 0 0 0 1px rgba(43, 101, 217, 0.22), 0 10px 18px rgba(39, 92, 180, 0.12);
  background: #f3f8ff;
}

.crm-conv-item__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.45rem;
}

.crm-conv-item__identity {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.crm-conv-item__identity strong {
  color: var(--crm-text);
  font-size: 0.84rem;
}

.crm-conv-item__identity span {
  color: var(--crm-muted);
  font-size: 0.72rem;
}

.crm-conv-item__top time {
  color: #6b839f;
  font-size: 0.68rem;
  white-space: nowrap;
}

.crm-conv-item__snippet {
  margin: 0;
  color: #2d4d6f;
  font-size: 0.73rem;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crm-conv-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.crm-conv-item__ops {
  display: flex;
  justify-content: space-between;
  gap: 0.42rem;
  color: #506a88;
  font-size: 0.68rem;
  line-height: 1.3;
}

.crm-conv-item__ops span:last-child {
  text-align: right;
}

.crm-conv-item__hybrid {
  margin: 0;
  color: #4f6b88;
  font-size: 0.67rem;
  line-height: 1.28;
}

.crm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d0ddf2;
  border-radius: 999px;
  padding: 0.14rem 0.46rem;
  font-size: 0.69rem;
  line-height: 1.2;
  color: #31557e;
  background: #f5f9ff;
  white-space: nowrap;
}

.crm-pill--info {
  background: #edf4ff;
  border-color: #c7dbfb;
  color: #1f529b;
}

.crm-pill--danger {
  background: #fff2f2;
  border-color: #f0b8b8;
  color: #9c2f2f;
}

.crm-pill--neutral {
  background: #f5f7fb;
  border-color: #d3dbe8;
  color: #506987;
}

.crm-pill--motor {
  background: #eaf2ff;
  border-color: #bfd6fb;
  color: #1f4d8f;
}

.crm-pill--soft {
  background: #f4f7fc;
  border-color: #d7e0ef;
  color: #4d6888;
}

.crm-pill--owner {
  background: #edf6ff;
  border-color: #c8ddf9;
  color: #2a578f;
}

.crm-pill--tag {
  background: #f6f2ff;
  border-color: #d8cbfb;
  color: #4d4090;
}

.crm-pill--strategic {
  background: #eef9f2;
  border-color: #b8e0c4;
  color: #24653a;
}

.crm-pill--hybrid-ai {
  background: #eef9f2;
  border-color: #b8e0c4;
  color: #24653a;
}

.crm-pill--hybrid-human {
  background: #eef4ff;
  border-color: #c3d6f8;
  color: #2c5694;
}

.crm-pill--hybrid-escalated {
  background: #fff2f2;
  border-color: #f0b8b8;
  color: #9c2f2f;
}

.crm-pill--hybrid-pending {
  background: #fff8e8;
  border-color: #f1dba9;
  color: #8b621f;
}

.crm-detail {
  display: grid;
  gap: 0.58rem;
}

.crm-conversation-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(236px, 290px);
  gap: 0.44rem;
  align-items: start;
}

.crm-shell--chats .crm-conversation-stage {
  grid-template-columns: minmax(0, 1fr) minmax(204px, 248px);
  gap: 0.28rem;
}

.crm-conversation-main {
  min-width: 0;
  display: grid;
  gap: 0.42rem;
  grid-template-rows: minmax(0, 1fr) auto;
}

.crm-conversation-side {
  min-width: 0;
  display: grid;
  gap: 0.34rem;
}

.crm-shell--chats .crm-conversation-side {
  gap: 0.24rem;
}

.crm-side-card {
  border: 1px solid var(--crm-border);
  border-radius: 11px;
  background: #ffffff;
  padding: 0.38rem 0.42rem;
  display: grid;
  gap: 0.3rem;
}

.crm-shell--chats .crm-side-card {
  padding: 0.32rem 0.36rem;
  gap: 0.22rem;
}

.crm-side-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.crm-side-card__head h4 {
  margin: 0;
  color: #214873;
  font-size: 0.8rem;
}

.crm-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
}

.crm-side-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.24rem;
  color: #385b82;
  font-size: 0.76rem;
}

.crm-side-list li {
  line-height: 1.35;
}

.crm-side-meta {
  margin: 0;
  color: #4f6f93;
  font-size: 0.7rem;
}

.crm-side-card--hybrid-status {
  border-color: #cfe0fb;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.crm-hybrid-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 0.36rem;
}

.crm-hybrid-status-grid p {
  margin: 0;
  color: #325273;
  font-size: 0.67rem;
  line-height: 1.3;
}

.crm-hybrid-status-reason {
  margin: 0;
  color: #3b5f85;
  font-size: 0.67rem;
  line-height: 1.3;
  border: 1px dashed #d8e4f8;
  border-radius: 8px;
  background: #f6faff;
  padding: 0.28rem 0.32rem;
}

.crm-side-card--ops {
  gap: 0.26rem;
}

.crm-side-card--ops .crm-collapsible {
  border-radius: 9px;
}

.crm-side-card--ops .crm-collapsible summary {
  font-size: 0.69rem;
  padding: 0.38rem 0.44rem;
}

.crm-side-card--ops .crm-collapsible__body {
  padding: 0.4rem 0.44rem;
}

.crm-side-action-form {
  display: grid;
  gap: 0.28rem;
}

.crm-side-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.24rem;
}

@media (max-width: 1180px) {
  .crm-hybrid-status-grid {
    grid-template-columns: 1fr;
  }

  .crm-side-action-grid {
    grid-template-columns: 1fr;
  }

  .crm-side-quick-actions,
  .crm-tag-check-grid,
  .crm-quick-toolbar {
    grid-template-columns: 1fr;
  }
}

.crm-side-action-form input,
.crm-side-action-form select {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid var(--crm-border-soft);
  background: #ffffff;
  color: #1f466f;
  font-size: 0.7rem;
  padding: 0.26rem 0.44rem;
}

.crm-side-action-form .button-row {
  justify-content: flex-end;
  margin-top: 0.02rem;
}

.crm-side-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.22rem;
}

.crm-tag-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem;
}

.crm-tag-option {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid #d6e2f4;
  border-radius: 8px;
  padding: 0.2rem 0.36rem;
  background: #fbfdff;
  color: #35587f;
  font-size: 0.69rem;
}

.crm-side-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: #4d6e92;
  font-size: 0.66rem;
}

.crm-side-action-hint {
  margin: 0;
  color: #607895;
  font-size: 0.64rem;
  line-height: 1.32;
}

.crm-side-contact-phones {
  display: grid;
  gap: 0.3rem;
}

.crm-side-contact-phones__main,
.crm-side-phone-row,
.crm-side-warning {
  border: 1px solid #d6e5f8;
  border-radius: 9px;
  background: #f7fbff;
  padding: 0.34rem 0.42rem;
}

.crm-side-contact-phones__main strong,
.crm-side-phone-row strong {
  display: block;
  color: #183e66;
  font-size: 0.72rem;
  line-height: 1.2;
}

.crm-side-contact-phones__main span,
.crm-side-phone-row span {
  display: block;
  color: #5b7594;
  font-size: 0.62rem;
  line-height: 1.25;
}

.crm-side-phone-list {
  display: grid;
  gap: 0.22rem;
  margin: 0;
}

.crm-side-warning {
  color: #7a4b04;
  border-color: #efd197;
  background: #fff8e8;
  font-size: 0.64rem;
  line-height: 1.34;
}

.crm-chat-utility-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.crm-conversation-actions {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.38rem 0.42rem;
}

.crm-shell--chats .crm-conversation-actions {
  padding: 0.24rem 0.28rem;
}

.crm-conversation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.crm-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid var(--crm-border-soft);
  background: #f8fbff;
  border-radius: 999px;
  padding: 0.22rem 0.56rem;
  font-size: 0.73rem;
  color: #446488;
}

.crm-summary-pill strong {
  color: #234b78;
}

.crm-detail--focus .crm-conversation-stage {
  grid-template-columns: 1fr;
}

.crm-detail--focus .crm-conversation-side {
  display: none;
}

.crm-reply-tools-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.14rem;
}

.crm-conversation-tools {
  display: grid;
  gap: 0.42rem;
}

.crm-agent-drawer {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.56rem 0.6rem;
  display: grid;
  gap: 0.45rem;
  position: fixed;
  top: 84px;
  right: 18px;
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100vh - 108px);
  overflow: auto;
  z-index: 1500;
  box-shadow: 0 26px 48px rgba(15, 36, 68, 0.24);
}

.crm-agent-drawer[hidden] {
  display: none !important;
}

.crm-agent-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.crm-agent-drawer__head strong {
  color: #214973;
  font-size: 0.83rem;
}

.crm-agent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.crm-agent-tabs .button.is-active {
  border-color: rgba(43, 101, 217, 0.55);
  background: rgba(43, 101, 217, 0.12);
  color: #214f92;
}

.crm-agent-panel {
  display: none;
  gap: 0.45rem;
}

.crm-agent-panel.is-active {
  display: grid;
}

.crm-collapsible {
  border: 1px solid var(--crm-border-soft);
  border-radius: 11px;
  background: #ffffff;
  overflow: hidden;
}

.crm-collapsible summary {
  cursor: pointer;
  list-style: none;
  padding: 0.52rem 0.6rem;
  font-size: 0.79rem;
  font-weight: 700;
  color: #224a77;
  background: #f7faff;
  border-bottom: 1px solid transparent;
}

.crm-collapsible[open] summary {
  border-bottom-color: var(--crm-border-soft);
}

.crm-collapsible summary::-webkit-details-marker {
  display: none;
}

.crm-collapsible__body {
  padding: 0.55rem 0.6rem;
  display: grid;
  gap: 0.46rem;
}

.crm-collapsible--nested {
  border-style: dashed;
}

.crm-collapsible--nested summary {
  background: #fbfdff;
}

.crm-context-mini {
  display: grid;
  gap: 0.2rem;
}

.crm-context-mini__head {
  display: grid;
  gap: 0.22rem;
}

.crm-context-mini__head strong {
  color: #214975;
  font-size: 0.79rem;
}

.crm-context-mini__head p {
  margin: 0;
  color: #5f7895;
  font-size: 0.7rem;
}

.crm-context-mini__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.08rem;
}

.crm-context-mini__list li {
  display: flex;
  justify-content: space-between;
  gap: 0.36rem;
  padding: 0.14rem 0;
  border-bottom: 1px dashed #dce7f7;
}

.crm-context-mini__list li:last-child {
  border-bottom: none;
}

.crm-context-mini__list span {
  color: #65809f;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-context-mini__list strong {
  color: #224973;
  font-size: 0.69rem;
  text-align: right;
}

.crm-detail-head {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.36rem 0.48rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.crm-shell--chats .crm-detail-head {
  padding: 0.2rem 0.28rem;
}

.crm-detail-head h3 {
  margin: 0;
  color: var(--crm-text);
  font-size: 0.84rem;
}

.crm-detail-head__line {
  margin: 0.08rem 0 0;
  color: var(--crm-muted);
  font-size: 0.72rem;
}

.crm-detail-head__chips {
  display: flex;
  gap: 0.34rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.crm-focus-toggle {
  white-space: nowrap;
}

.crm-focus-toggle.is-active {
  border-color: rgba(43, 101, 217, 0.55);
  background: rgba(43, 101, 217, 0.12);
  color: #214f92;
}

.crm-detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 0.4rem;
}

.crm-detail-meta-card {
  border: 1px solid var(--crm-border);
  border-radius: 11px;
  background: var(--crm-surface-soft);
  padding: 0.44rem 0.54rem;
  display: grid;
  gap: 0.16rem;
}

.crm-detail-meta-card span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #617b99;
}

.crm-detail-meta-card strong {
  color: #264b78;
  font-size: 0.82rem;
}

.crm-chat-shell {
  border: 1px solid var(--crm-border);
  border-radius: 13px;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  padding: 0.34rem 0.38rem;
}

.crm-chat-stream {
  display: grid;
  gap: 0.28rem;
  max-height: calc(100vh - 338px);
  min-height: 460px;
  overflow: auto;
  padding-right: 0.16rem;
}

.crm-shell--chats .crm-chat-stream {
  max-height: calc(100vh - 246px);
  min-height: 590px;
}

/* Fallback defensivo: oculta navegacion interna legacy del CRM dentro del workspace */
.crm-shell .crm-section-nav-card,
.crm-shell .crm-section-nav,
.crm-shell [data-crm-open-workspace-tab],
.crm-shell [data-crm-section-link] {
  display: none !important;
}

.crm-chat-msg {
  border: 1px solid #d3e2f8;
  border-radius: 14px;
  padding: 0.36rem 0.46rem;
  background: #ffffff;
  max-width: min(84%, 640px);
  justify-self: start;
  box-shadow: 0 3px 10px rgba(27, 69, 136, 0.06);
}

.crm-chat-msg.is-outbound {
  border-color: #c4dafb;
  background: #eaf3ff;
  justify-self: end;
}

.crm-chat-msg.is-system {
  border-style: dashed;
  background: #f4f7fb;
  max-width: 100%;
}

.crm-chat-msg header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.14rem;
}

.crm-chat-msg header strong {
  color: #204870;
  font-size: 0.73rem;
}

.crm-chat-msg header span {
  color: #6983a2;
  font-size: 0.67rem;
}

.crm-chat-msg p {
  margin: 0;
  color: #284b6f;
  font-size: 0.76rem;
  line-height: 1.3;
}

.crm-msg-attachments {
  margin: 0.4rem 0 0;
  padding-left: 0;
  color: #35557b;
  font-size: 0.75rem;
  display: grid;
  gap: 0.32rem;
}

.crm-msg-attachment {
  display: grid;
  gap: 0.34rem;
  max-width: min(430px, 100%);
  padding: 0.48rem;
  border: 1px solid #d5e3f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  box-shadow: 0 8px 20px rgba(23, 50, 86, 0.06);
  contain: layout paint;
  overflow-anchor: none;
}

.crm-msg-attachment__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}

.crm-msg-attachment__type {
  font-size: 0.66rem;
  font-weight: 800;
  color: #17385f;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.crm-msg-attachment__status,
.crm-msg-attachment__chip {
  border-radius: 999px;
  padding: 0.08rem 0.36rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid #cbdcf0;
  color: #215481;
  background: #edf6ff;
}

.crm-msg-attachment__status--downloaded {
  color: #0d6b4d;
  border-color: #b6ead3;
  background: #ecfff6;
}

.crm-msg-attachment__status--pending {
  color: #8a5a00;
  border-color: #f4d99b;
  background: #fff8df;
}

.crm-msg-attachment__status--failed,
.crm-msg-attachment__status--expired {
  color: #9c1f3a;
  border-color: #f0bfcb;
  background: #fff0f4;
}

.crm-pill--channel-active {
  color: #0d6b4d;
  border-color: #b6ead3;
  background: #ecfff6;
}

.crm-pill--channel-unlinked {
  color: #9a3412;
  border-color: #fed7aa;
  background: #fff7ed;
}

.crm-conv-item--unlinked {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fffaf4 0%, #ffffff 100%);
}

.crm-conv-item--unlinked .crm-conv-item__subline::after {
  content: " · Canal pendiente de vinculacion";
  color: #9a3412;
  font-weight: 800;
}

.crm-msg-attachment__chip--payment {
  color: #7a4b04;
  border-color: #f2d399;
  background: #fff5dc;
}

.crm-msg-attachment__preview {
  width: 100%;
  min-height: 92px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #eaf2fb;
  cursor: pointer;
  text-align: left;
}

.crm-msg-attachment__preview--image {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}

.crm-msg-attachment__preview:hover {
  box-shadow: 0 0 0 2px rgba(28, 101, 194, 0.18);
}

.crm-msg-attachment__preview img,
.crm-msg-attachment video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #edf4fc;
}

.crm-msg-attachment audio {
  width: 100%;
  min-height: 40px;
}

.crm-msg-attachment__doc {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.46rem;
  align-items: center;
  padding: 0.42rem;
  border-radius: 10px;
  background: #eef5fd;
}

.crm-msg-attachment__doc-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: #dbeafa;
  color: #174371;
  font-size: 0.62rem;
  font-weight: 900;
}

.crm-msg-attachment__caption,
.crm-msg-attachment__meta,
.crm-msg-attachment__error {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.32;
}

.crm-msg-attachment__caption {
  color: #1f4167;
}

.crm-msg-attachment__meta {
  color: #6680a0;
}

.crm-msg-attachment__error {
  color: #9a2440;
  padding: 0.32rem 0.42rem;
  border-radius: 8px;
  background: #fff4f6;
  border: 1px solid #f4c9d3;
}

.crm-msg-attachment__tech {
  border: 1px dashed #cbd9eb;
  border-radius: 8px;
  padding: 0.28rem 0.42rem;
  color: #607895;
  background: rgba(246, 250, 255, 0.78);
  max-width: 100%;
  overflow: hidden;
}

.crm-msg-attachment__tech summary {
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 800;
  color: #365f8c;
}

.crm-msg-attachment__tech-body {
  display: grid;
  gap: 0.18rem;
  max-height: 7.5rem;
  overflow: auto;
  overscroll-behavior: contain;
}

.crm-msg-attachment__tech div,
.crm-msg-attachment__tech pre {
  margin: 0.28rem 0 0;
  font-size: 0.62rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.crm-msg-attachment__tech pre {
  max-height: 6rem;
  overflow: auto;
}

.crm-chat-msg__tech {
  margin-top: 0.12rem;
  color: #607895;
  font-size: 0.58rem;
  overflow-anchor: none;
}

.crm-chat-msg__tech summary {
  cursor: pointer;
  color: #456987;
  font-weight: 800;
}

.crm-chat-msg__tech span {
  display: block;
  margin-top: 0.12rem;
  word-break: break-all;
}

.crm-chat-stream,
.crm-chat-msg,
.crm-msg-attachments,
.crm-msg-attachment__tech {
  overflow-anchor: none;
}

.crm-chat-msg__meta span {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-msg-attachment--sticker .crm-msg-attachment__preview {
  aspect-ratio: 1 / 1;
  max-width: 150px;
  min-height: 120px;
}

.crm-msg-attachment--sticker .crm-msg-attachment__preview img {
  max-height: 150px;
  object-fit: contain;
}

.crm-msg-attachment__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}

.crm-msg-attachment__action {
  border: 1px solid #c8d9ee;
  border-radius: 999px;
  padding: 0.18rem 0.46rem;
  background: #ffffff;
  color: #17477a;
  font-size: 0.63rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.crm-msg-attachment__action:hover {
  border-color: #8fb7e5;
  background: #edf6ff;
}

.crm-msg-attachment__action.is-active {
  border-color: #f0c06d;
  background: #fff5d8;
  color: #7b4a05;
}

@media (max-width: 760px) {
  .crm-shell--chats .crm-chat-stream {
    overscroll-behavior: contain;
    scroll-behavior: auto;
  }

  .crm-shell--chats .crm-chat-msg {
    max-width: 96%;
  }

  .crm-shell--chats .crm-msg-attachments {
    gap: 0.24rem;
  }

  .crm-shell--chats .crm-msg-attachment {
    max-width: 100%;
    padding: 0.38rem;
  }

  .crm-shell--chats .crm-msg-attachment__preview img,
  .crm-shell--chats .crm-msg-attachment video {
    max-height: 190px;
  }

  .crm-shell--chats .crm-msg-attachment__actions {
    gap: 0.2rem;
  }

  .crm-shell--chats .crm-msg-attachment__action {
    padding: 0.16rem 0.4rem;
    font-size: 0.6rem;
  }
}

.crm-attachment-lightbox[hidden] {
  display: none;
}

.crm-attachment-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.crm-attachment-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 24, 42, 0.72);
  backdrop-filter: blur(3px);
}

.crm-attachment-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.72rem;
  padding: 0.86rem;
  border-radius: 18px;
  background: #f8fbff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.crm-attachment-lightbox__panel header {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.crm-attachment-lightbox__panel header p {
  margin: 0.18rem 0 0;
  color: #647d99;
  font-size: 0.82rem;
}

.crm-attachment-lightbox__actions {
  display: flex;
  gap: 0.4rem;
}

.crm-attachment-lightbox__media {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  border-radius: 14px;
  background: #0f2033;
}

.crm-attachment-lightbox__media img,
.crm-attachment-lightbox__media video {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.crm-decision-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 0.35rem;
}

.crm-decision-strip--compact {
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.crm-decision-chip {
  border: 1px solid var(--crm-border);
  border-radius: 11px;
  background: #ffffff;
  padding: 0.44rem 0.52rem;
  display: grid;
  gap: 0.16rem;
}

.crm-decision-chip span {
  color: #6983a1;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-decision-chip strong {
  color: #254a75;
  font-size: 0.8rem;
}

.crm-detail-actions {
  display: grid;
  gap: 0.58rem;
}

.crm-ops-stack {
  display: grid;
  gap: 0.58rem;
}

.crm-action-card {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.58rem 0.62rem;
  display: grid;
  gap: 0.48rem;
}

.crm-action-card--primary {
  border-color: #c4d9fa;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
}

.crm-action-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.crm-action-card__head h4 {
  margin: 0;
  color: #224a77;
  font-size: 0.86rem;
}

.crm-action-card__head span {
  color: #5d7898;
  font-size: 0.77rem;
}

.crm-inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.44rem;
  align-items: end;
}

.crm-operational-panel {
  border: 1px solid var(--crm-border-soft);
  border-radius: 11px;
  background: var(--crm-surface-soft);
  padding: 0.52rem;
  display: grid;
  gap: 0.48rem;
}

.crm-operational-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(128px, 1fr));
  gap: 0.4rem;
}

.crm-operational-summary article {
  border: 1px solid #d9e6f8;
  border-radius: 9px;
  background: #ffffff;
  padding: 0.42rem 0.48rem;
  display: grid;
  gap: 0.16rem;
  font-size: 0.77rem;
  color: #35557a;
}

.crm-operational-summary article p {
  margin: 0;
}

.crm-operational-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0.42rem;
  align-items: end;
}

.crm-operational-result {
  grid-column: span 2;
}

.crm-reply-form,
.crm-note-form,
.crm-quick-form {
  display: grid;
  gap: 0.45rem;
}

.crm-reply-form textarea,
.crm-note-form textarea,
.crm-quick-form textarea {
  min-height: 58px;
}

.crm-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.crm-quick-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(180px, 1.4fr);
  gap: 0.28rem;
}

.crm-quick-toolbar select,
.crm-quick-toolbar input {
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid #d2dff2;
  background: #ffffff;
  color: #274f7a;
  font-size: 0.72rem;
  padding: 0.25rem 0.42rem;
}

.crm-quick-list--grouped {
  display: grid;
  gap: 0.42rem;
}

.crm-quick-group {
  border: 1px solid var(--crm-border-soft);
  border-radius: 10px;
  padding: 0.42rem 0.45rem;
  background: #ffffff;
  display: grid;
  gap: 0.36rem;
}

.crm-quick-group__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.crm-quick-group__head strong {
  font-size: 0.77rem;
  color: #274d79;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.crm-quick-group__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #cfddf2;
  color: #3b5f88;
  background: #f4f8ff;
  font-size: 0.71rem;
}

.crm-quick-chip {
  border: 1px solid #c7d7f1;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.28rem 0.56rem;
  color: #2f4d7b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.crm-quick-chip:hover {
  border-color: #9bbcf0;
  background: #f4f8ff;
}

.crm-note-list {
  display: grid;
  gap: 0.35rem;
}

.crm-note-helpers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
}

.crm-note-helpers select,
.crm-note-helpers input {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid #d2def0;
  background: #ffffff;
  color: #2c5079;
  font-size: 0.7rem;
  padding: 0.22rem 0.4rem;
}

.crm-note-list article {
  border: 1px solid var(--crm-border-soft);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.44rem 0.52rem;
}

.crm-note-list article header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.18rem;
}

.crm-note-list article p {
  margin: 0;
  color: #355677;
  font-size: 0.8rem;
}

#crmCustomerContext {
  display: grid;
  gap: 0.48rem;
  margin-bottom: 0.65rem;
}

.crm-context-stack {
  display: grid;
  gap: 0.42rem;
}

.crm-context-card {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.56rem 0.62rem;
  display: grid;
  gap: 0.26rem;
}

.crm-context-card--profile {
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.crm-context-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.55rem;
}

.crm-context-head h4 {
  margin: 0;
  color: #1f466f;
  font-size: 0.91rem;
}

.crm-context-head p {
  margin: 0.14rem 0 0;
  color: #5f7895;
  font-size: 0.78rem;
}

.crm-context-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.crm-context-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 0.38rem;
}

.crm-context-metrics article {
  border: 1px solid var(--crm-border-soft);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.15rem;
}

.crm-context-metrics span {
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #67819f;
}

.crm-context-metrics strong {
  color: #224a76;
  font-size: 0.84rem;
}

.crm-context-metrics p {
  margin: 0;
  color: #5b7694;
  font-size: 0.75rem;
}

.crm-context-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.crm-context-subhead h5 {
  margin: 0;
  color: #214873;
  font-size: 0.84rem;
}

.crm-context-subhead span {
  color: #5c7695;
  font-size: 0.75rem;
}

.crm-context-list {
  display: grid;
  gap: 0.2rem;
}

.crm-context-list h6 {
  margin: 0.22rem 0 0;
  font-size: 0.77rem;
  color: #2f537d;
}

.crm-mini-list {
  margin: 0.16rem 0 0.36rem;
  padding-left: 1rem;
  color: #315071;
  font-size: 0.79rem;
  display: grid;
  gap: 0.18rem;
}

.crm-install-form {
  display: grid;
  gap: 0.45rem;
}

.crm-incident-form {
  display: grid;
  gap: 0.44rem;
  margin-bottom: 0.52rem;
}

.crm-incident-form textarea {
  min-height: 72px;
}

.crm-incident-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #2f4d7b;
  font-size: 0.79rem;
}

.crm-incident-list {
  display: grid;
  gap: 0.38rem;
  max-height: 260px;
  overflow: auto;
  padding-right: 0.12rem;
}

.crm-incident-item {
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: var(--crm-surface-soft);
  padding: 0.5rem 0.56rem;
  display: grid;
  gap: 0.28rem;
}

.crm-incident-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.crm-incident-item p,
.crm-incident-item small {
  margin: 0;
}

.crm-ai-trace {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f7faff;
  padding: 0.58rem 0.65rem;
  display: grid;
  gap: 0.34rem;
  font-size: 0.81rem;
  color: #26466c;
}

.crm-ai-trace header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
}

.crm-ai-trace p {
  margin: 0;
}

.crm-ai-trace__support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 0.22rem 0.55rem;
  border-top: 1px dashed #c6d7f3;
  padding-top: 0.42rem;
}

.crm-ai-trace details {
  border-top: 1px dashed #c6d7f3;
  padding-top: 0.42rem;
}

.crm-ai-trace summary {
  cursor: pointer;
  font-weight: 700;
  color: #1f4f96;
}

.crm-ai-trace pre {
  margin: 0.42rem 0 0;
  max-height: 180px;
  overflow: auto;
  border: 1px solid #d3def2;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.42rem;
  font-size: 0.75rem;
  line-height: 1.32;
}

@media (max-width: 1500px) {
  .crm-kpi-strip {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .crm-chat-kpis {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .crm-section-nav {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .crm-layout {
    grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  }

  .crm-workspace-body {
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  }

  .crm-conversation-stage {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  }

  .crm-sla-cards {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .crm-detail-meta-grid,
  .crm-decision-strip {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 1320px) {
  .crm-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  .crm-layout--customer360,
  .crm-layout--noc,
  .crm-layout--operations,
  .crm-layout--incidents,
  .crm-layout--installations {
    grid-template-columns: 1fr;
  }

  .crm-column--inbox {
    position: static;
    max-height: none;
    overflow: visible;
    grid-template-rows: none;
  }

  .crm-workspace-body {
    grid-template-columns: 1fr;
  }

  .crm-module-nav {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .crm-conversation-stage {
    grid-template-columns: 1fr;
  }

  .crm-sla-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .crm-hybrid-board {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .crm-fieldops-grid {
    grid-template-columns: 1fr;
  }

  .crm-context-metrics {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }
}

@media (max-width: 980px) {
  .crm-kpi-strip {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .crm-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .crm-hero-card__side {
    width: 100%;
    justify-items: start;
  }

  .crm-layout {
    grid-template-columns: 1fr;
  }

  .crm-chat-kpis {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .crm-section-nav {
    grid-template-columns: 1fr 1fr;
  }

  .crm-column {
    min-height: 0;
  }

  .crm-column--inbox {
    position: static;
    max-height: none;
    overflow: visible;
    grid-template-rows: none;
  }

  .crm-workspace-head {
    align-items: flex-start;
  }

  .crm-module-nav {
    grid-template-columns: 1fr;
  }

  .crm-filter-form,
  .crm-filter-form__basic,
  .crm-filter-form__advanced,
  .crm-inline-form,
  .crm-operational-form,
  .crm-operational-summary,
  .crm-sla-cards,
  .crm-sla-grid,
  .crm-hybrid-board,
  .crm-hybrid-kpi-grid,
  .crm-detail-meta-grid,
  .crm-decision-strip,
  .crm-decision-strip--compact,
  .crm-conversation-stage,
  .crm-context-metrics,
  .crm-panel-stack,
  .crm-fieldops-grid {
    grid-template-columns: 1fr;
  }

  .crm-workspace-panel {
    min-height: 0;
  }

  .crm-operational-result {
    grid-column: span 1;
  }

  .crm-ai-trace__support-grid {
    grid-template-columns: 1fr;
  }

  .crm-conv-item__ops {
    flex-direction: column;
    gap: 0.12rem;
  }

  .crm-conv-item__ops span:last-child {
    text-align: left;
  }

  .crm-conv-list,
  .crm-chat-stream {
    max-height: 48vh;
    min-height: 0;
  }
}

@media print {
  @page {
    size: letter;
    margin: 8mm;
  }

  body {
    background: #ffffff;
  }

  .sidebar,
  .topbar,
  .button-row,
  .page-actions,
  .router-toast {
    display: none !important;
  }

  .panel-main,
  .panel-content,
  .module-shell,
  .module-card,
  .receipt-sheet {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  .module-card__head {
    margin-bottom: 1rem;
  }

  .receipt-sheet--compact {
    gap: 0.28rem !important;
    max-width: none !important;
    page-break-inside: avoid;
  }

  .receipt-header {
    gap: 0.45rem !important;
    padding-bottom: 0.24rem !important;
  }

  .receipt-company h3 {
    font-size: 1rem !important;
    margin-bottom: 0.05rem !important;
  }

  .receipt-company p,
  .receipt-number small {
    font-size: 0.68rem !important;
    line-height: 1.18 !important;
  }

  .receipt-payment-hero {
    grid-template-columns: minmax(1.2fr, 1.45fr) repeat(2, minmax(0, 1fr)) !important;
    gap: 0.22rem !important;
    border-radius: 0 !important;
  }

  .receipt-hero-metric {
    gap: 0.06rem !important;
    padding: 0.3rem 0.25rem !important;
    border-radius: 0 !important;
  }

  .receipt-hero-metric span {
    font-size: 0.58rem !important;
  }

  .receipt-hero-metric strong {
    font-size: 0.92rem !important;
  }

  .receipt-hero-metric--primary strong {
    font-size: 1.45rem !important;
  }

  .receipt-hero-metric small {
    font-size: 0.58rem !important;
  }

  .receipt-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.24rem !important;
  }

  .receipt-block {
    gap: 0.12rem !important;
    padding: 0.28rem !important;
    border-radius: 0 !important;
  }

  .receipt-block__title {
    margin-bottom: 0.02rem !important;
    font-size: 0.62rem !important;
  }

  .receipt-row span {
    font-size: 0.66rem !important;
  }

  .receipt-row strong {
    font-size: 0.7rem !important;
  }

  .receipt-row--focus {
    padding: 0.08rem 0 !important;
  }

  .receipt-note,
  .receipt-footnote {
    margin-top: 0 !important;
    padding: 0.28rem !important;
    border-radius: 0 !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }
}

/* === Atencion al cliente visual polish (chat-first + coherent sections) === */
.crm-shell {
  --crm-radius-card: 14px;
  --crm-radius-soft: 11px;
  --crm-shadow-soft: 0 10px 26px rgba(14, 39, 79, 0.07);
  --crm-shadow-hover: 0 12px 22px rgba(28, 72, 138, 0.12);
  gap: 0.38rem;
}

.crm-shell .module-card {
  border-radius: var(--crm-radius-card);
  border-color: #dbe5f4;
  box-shadow: var(--crm-shadow-soft);
  background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
}

.crm-shell .module-card__head {
  margin-bottom: 0.18rem;
}

.crm-shell .button {
  min-height: 30px;
  padding: 0.23rem 0.58rem;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.crm-shell .button--small {
  min-height: 27px;
  padding: 0.16rem 0.48rem;
  font-size: 0.67rem;
}

.crm-shell .button--tiny {
  min-height: 24px;
  padding: 0.12rem 0.42rem;
  font-size: 0.62rem;
}

.crm-shell--chats {
  gap: 0.24rem;
}

.crm-shell--chats .crm-hero-card {
  padding: 0.14rem 0.26rem;
  gap: 0.24rem;
  border-radius: 13px;
}

.crm-shell--chats .crm-brand-headline {
  gap: 0.4rem;
}

.crm-shell--chats .crm-brand-headline--compact .section-kicker {
  font-size: 0.52rem;
  letter-spacing: 0.035em;
}

.crm-shell--chats .crm-kpi-strip {
  gap: 0.12rem;
}

.crm-shell--chats .crm-kpi-strip__item {
  border-radius: 8px;
  padding: 0.08rem 0.2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.26rem;
}

.crm-shell--chats .crm-kpi-strip__item span {
  font-size: 0.48rem;
  color: #6a84a2;
}

.crm-shell--chats .crm-kpi-strip__item strong {
  font-size: 0.67rem;
  color: #234f84;
}

.crm-shell--chats .crm-layout {
  grid-template-columns: minmax(272px, 332px) minmax(0, 1fr);
  min-height: calc(100vh - 106px);
  gap: 0.28rem;
}

.crm-shell--chats .crm-column--inbox {
  top: 46px;
  max-height: calc(100vh - 54px);
}

.crm-shell--chats .crm-column--inbox .module-card__head {
  padding-bottom: 0.04rem;
}

.crm-shell--chats .crm-inbox-head {
  gap: 0.34rem;
}

.crm-shell--chats .crm-inbox-head h3 {
  font-size: 0.76rem;
  margin-top: 0;
}

.crm-shell--chats .crm-inbox-count {
  padding: 0.1rem 0.36rem;
  font-size: 0.63rem;
}

.crm-shell--chats .crm-filter-form {
  margin-top: 0.08rem;
  margin-bottom: 0.14rem;
  padding: 0.16rem;
  border-radius: 9px;
  gap: 0.16rem;
}

.crm-shell--chats .crm-filter-form__basic {
  grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(92px, 1fr)) auto auto;
  gap: 0.22rem;
}

.crm-shell--chats .crm-filter-form input,
.crm-shell--chats .crm-filter-form select {
  min-height: 29px;
  padding: 0.22rem 0.4rem;
  font-size: 0.69rem;
}

.crm-shell--chats .crm-filter-advanced summary {
  padding: 0.28rem 0.38rem;
  font-size: 0.68rem;
}

.crm-shell--chats .crm-filter-advanced .crm-filter-form__advanced {
  padding: 0.28rem 0.36rem 0.34rem;
  gap: 0.24rem;
}

.crm-shell--chats .crm-queue-tabs .button {
  font-size: 0.64rem;
  padding: 0.14rem 0.38rem;
}

.crm-shell--chats .crm-conv-list {
  max-height: calc(100vh - 194px);
  min-height: clamp(420px, 58vh, 690px);
  gap: 0.2rem;
}

.crm-shell--chats .crm-conv-item {
  border-radius: 10px;
  border-color: #d9e5f5;
  padding: 0.32rem 0.4rem;
  gap: 0.16rem;
}

.crm-shell--chats .crm-conv-item:hover {
  border-color: #a8c2ec;
  box-shadow: var(--crm-shadow-hover);
  transform: translateY(-1px);
}

.crm-shell--chats .crm-conv-item.is-active {
  background: #f4f8ff;
  border-color: #82a9e6;
  box-shadow: inset 0 0 0 1px rgba(72, 123, 205, 0.16), 0 10px 18px rgba(32, 77, 144, 0.11);
}

.crm-shell--chats .crm-conv-item__identity strong {
  font-size: 0.8rem;
  line-height: 1.2;
}

.crm-shell--chats .crm-conv-item__identity span,
.crm-shell--chats .crm-conv-item__top time {
  font-size: 0.66rem;
}

.crm-shell--chats .crm-conv-item__snippet {
  font-size: 0.68rem;
  line-height: 1.24;
}

.crm-shell--chats .crm-conv-item__ops {
  font-size: 0.63rem;
}

.crm-shell--chats .crm-pill {
  padding: 0.09rem 0.36rem;
  font-size: 0.62rem;
  border-radius: 999px;
}

.crm-shell--chats .crm-section-panel--chat-core {
  padding: 0.22rem 0.26rem;
  min-height: calc(100vh - 136px);
}

.crm-shell--chats .crm-detail {
  gap: 0.34rem;
}

.crm-shell--chats .crm-conversation-stage {
  grid-template-columns: minmax(0, 1fr) minmax(188px, 228px);
  gap: 0.24rem;
}

.crm-shell--chats .crm-conversation-main {
  gap: 0.28rem;
}

.crm-shell--chats .crm-detail-head {
  padding: 0.16rem 0.24rem;
  border-radius: 10px;
  align-items: center;
  gap: 0.36rem;
}

.crm-shell--chats .crm-detail-head h3 {
  font-size: 0.78rem;
}

.crm-shell--chats .crm-detail-head__line {
  margin-top: 0.02rem;
  font-size: 0.66rem;
}

.crm-detail-head__reply-line {
  margin: 0.08rem 0 0;
  color: #1f6b4f;
  font-size: 0.72rem;
  font-weight: 700;
}

.crm-detail-head__reply-line.is-blocked {
  color: #9f1239;
}

.crm-channel-warning {
  border: 1px solid #fecdd3;
  border-radius: 12px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.7rem;
}

.crm-shell--chats .crm-detail-head__chips {
  gap: 0.22rem;
}

.crm-shell--chats .crm-chat-shell {
  border-radius: 12px;
  padding: 0.24rem 0.26rem;
  border-color: #d8e4f6;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.crm-shell--chats .crm-chat-stream {
  gap: 0.22rem;
  max-height: calc(100vh - 210px);
  min-height: clamp(430px, 61vh, 720px);
}

.crm-shell--chats .crm-chat-msg {
  border-radius: 12px;
  border-color: #d7e4f6;
  box-shadow: 0 2px 8px rgba(33, 79, 144, 0.05);
  padding: 0.3rem 0.4rem;
  max-width: min(82%, 620px);
}

.crm-shell--chats .crm-chat-msg.is-outbound {
  border-color: #bfd5f6;
  background: linear-gradient(180deg, #edf4ff 0%, #e7f0ff 100%);
}

.crm-shell--chats .crm-chat-msg.is-system {
  border-style: solid;
  border-color: #dbe5f4;
  background: #f6f9ff;
  box-shadow: none;
}

.crm-shell--chats .crm-chat-msg header {
  margin-bottom: 0.1rem;
}

.crm-shell--chats .crm-chat-msg header strong {
  font-size: 0.68rem;
}

.crm-shell--chats .crm-chat-msg header span {
  font-size: 0.62rem;
}

.crm-shell--chats .crm-chat-msg p {
  font-size: 0.72rem;
  line-height: 1.28;
}

.crm-shell--chats .crm-msg-attachments {
  margin-top: 0.24rem;
  font-size: 0.68rem;
}

.crm-shell--chats .crm-conversation-actions {
  border-radius: 10px;
  border-color: #d8e4f6;
  padding: 0.18rem 0.22rem;
}

.crm-shell--chats .crm-reply-form {
  gap: 0.28rem;
}

.crm-shell--chats .crm-reply-form textarea {
  min-height: 72px;
  border-radius: 10px;
  padding: 0.36rem 0.48rem;
  font-size: 0.73rem;
  line-height: 1.34;
}

.crm-shell--chats .crm-reply-form .button-row {
  gap: 0.24rem;
  justify-content: flex-end;
}

.crm-shell--chats .crm-reply-tools-inline {
  margin-top: 0.06rem;
  gap: 0.14rem;
  justify-content: flex-end;
}

.crm-shell--chats .crm-reply-tools-inline .button {
  min-height: 24px;
  padding: 0.12rem 0.36rem;
  font-size: 0.62rem;
}

.crm-shell--chats .crm-conversation-side {
  gap: 0.18rem;
}

.crm-shell--chats .crm-side-card {
  border-radius: 10px;
  padding: 0.24rem 0.28rem;
  gap: 0.18rem;
}

.crm-shell--chats .crm-side-card__head h4 {
  font-size: 0.71rem;
}

.crm-shell--chats .crm-side-meta {
  font-size: 0.63rem;
  line-height: 1.25;
}

.crm-shell--chats .crm-hybrid-status-grid {
  gap: 0.14rem 0.24rem;
}

.crm-shell--chats .crm-hybrid-status-grid p,
.crm-shell--chats .crm-hybrid-status-reason {
  font-size: 0.61rem;
}

.crm-shell--chats .crm-hybrid-status-reason {
  border-radius: 7px;
  padding: 0.22rem 0.26rem;
}

.crm-shell--chats .crm-side-card--ops {
  gap: 0.14rem;
}

.crm-shell--chats .crm-side-card--ops .crm-collapsible {
  border-radius: 8px;
}

.crm-shell--chats .crm-side-card--ops .crm-collapsible summary {
  padding: 0.26rem 0.34rem;
  font-size: 0.62rem;
}

.crm-shell--chats .crm-side-card--ops .crm-collapsible__body {
  padding: 0.3rem 0.34rem;
}

.crm-shell--chats .crm-side-action-form {
  gap: 0.2rem;
}

.crm-shell--chats .crm-side-action-grid {
  gap: 0.18rem;
}

.crm-shell--chats .crm-side-action-form input,
.crm-shell--chats .crm-side-action-form select {
  min-height: 26px;
  font-size: 0.64rem;
  padding: 0.18rem 0.34rem;
}

.crm-shell--chats .crm-side-toggle {
  font-size: 0.6rem;
}

.crm-shell--chats .crm-context-mini {
  gap: 0.16rem;
}

.crm-shell--chats .crm-context-mini__head strong {
  font-size: 0.72rem;
}

.crm-shell--chats .crm-context-mini__head p {
  font-size: 0.64rem;
}

.crm-shell--chats .crm-context-mini__list {
  gap: 0.04rem;
}

.crm-shell--chats .crm-context-mini__list li {
  padding: 0.08rem 0;
}

.crm-shell--chats .crm-context-mini__list span {
  font-size: 0.58rem;
}

.crm-shell--chats .crm-context-mini__list strong {
  font-size: 0.63rem;
}

.crm-shell--chats .crm-agent-drawer {
  top: 64px;
  right: 12px;
  width: min(430px, calc(100vw - 22px));
  max-height: calc(100vh - 78px);
  padding: 0.42rem 0.46rem;
  border-radius: 14px;
}

.crm-shell--chats .crm-agent-drawer__head strong {
  font-size: 0.77rem;
}

.crm-shell--chats .crm-agent-tabs {
  gap: 0.22rem;
}

.crm-shell--chats .crm-agent-tabs .button {
  min-height: 24px;
  padding: 0.12rem 0.34rem;
  font-size: 0.62rem;
}

.crm-shell--chats .crm-quick-group {
  border-radius: 9px;
  padding: 0.3rem 0.34rem;
  gap: 0.26rem;
}

.crm-shell--chats .crm-quick-group__head strong {
  font-size: 0.68rem;
}

.crm-shell--chats .crm-quick-group__count {
  min-width: 18px;
  height: 18px;
  font-size: 0.62rem;
}

.crm-shell--chats .crm-quick-chip {
  padding: 0.2rem 0.42rem;
  font-size: 0.64rem;
  gap: 0.24rem;
}

.crm-shell--chats .crm-note-list article {
  border-radius: 9px;
  padding: 0.32rem 0.4rem;
}

.crm-shell--chats .crm-note-list article p {
  font-size: 0.72rem;
}

.crm-shell--chats .crm-ai-trace {
  border-radius: 10px;
  padding: 0.36rem 0.44rem;
  font-size: 0.72rem;
  gap: 0.22rem;
}

.crm-shell--chats .crm-ai-trace pre {
  max-height: 160px;
  font-size: 0.64rem;
}

.crm-section-panel:not(.crm-section-panel--chats) {
  padding: 0.48rem 0.54rem;
  min-height: calc(100vh - 226px);
  gap: 0.5rem;
}

.crm-shell--meta .crm-section-panel--meta {
  min-height: 0;
}

.crm-section-panel:not(.crm-section-panel--chats) .module-card__head h3 {
  font-size: 0.94rem;
}

.crm-section-panel:not(.crm-section-panel--chats) .module-card__head .section-kicker {
  font-size: 0.6rem;
}

.crm-section-panel--customer #crmCustomerContext {
  margin-bottom: 0;
  gap: 0.4rem;
}

.crm-section-panel--customer .crm-context-stack {
  gap: 0.34rem;
}

.crm-section-panel--customer .crm-context-card {
  border-radius: 11px;
  padding: 0.44rem 0.5rem;
}

.crm-section-panel--customer .crm-context-head h4 {
  font-size: 0.83rem;
}

.crm-section-panel--customer .crm-context-head p {
  font-size: 0.72rem;
}

.crm-section-panel--customer .crm-context-metrics article {
  border-radius: 9px;
  padding: 0.36rem 0.42rem;
}

.crm-section-panel--customer .crm-context-metrics span {
  font-size: 0.64rem;
}

.crm-section-panel--customer .crm-context-metrics strong {
  font-size: 0.77rem;
}

.crm-section-panel--operations .crm-sla-board,
.crm-section-panel--operations #crmOperationalWorkspace {
  border: 1px solid #dee8f7;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.44rem 0.5rem;
}

.crm-section-panel--operations .crm-sla-cards {
  gap: 0.34rem;
}

.crm-section-panel--operations .crm-hybrid-board {
  gap: 0.34rem;
}

.crm-section-panel--operations .crm-sla-card {
  border-radius: 10px;
  padding: 0.36rem 0.42rem;
}

.crm-section-panel--operations .crm-hybrid-kpi-item,
.crm-section-panel--operations .crm-hybrid-improvement-list li {
  border-radius: 8px;
  padding: 0.3rem 0.36rem;
}

.crm-section-panel--operations .crm-sla-card__label {
  font-size: 0.64rem;
}

.crm-section-panel--operations .crm-sla-card strong {
  font-size: 0.92rem;
}

.crm-section-panel--operations .crm-action-card {
  border-radius: 11px;
  padding: 0.46rem 0.5rem;
}

.crm-section-panel--operations .crm-action-card__head h4 {
  font-size: 0.8rem;
}

.crm-section-panel--operations .crm-inline-form,
.crm-section-panel--operations .crm-operational-form {
  gap: 0.32rem;
}

.crm-section-panel--operations .crm-operational-panel {
  border-radius: 10px;
  padding: 0.44rem;
}

.crm-section-panel--operations .crm-operational-summary article {
  border-radius: 8px;
  padding: 0.34rem 0.4rem;
}

.crm-section-panel--noc .module-card__head {
  align-items: flex-start;
  gap: 0.52rem;
}

.crm-noc-toolbar {
  align-items: flex-end;
  gap: 0.32rem;
}

.crm-noc-window-field {
  display: grid;
  gap: 0.08rem;
  min-width: 148px;
}

.crm-noc-window-field span {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #617a95;
  font-weight: 700;
}

.crm-noc-window-field select {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid #d4e0f1;
  background: #f8fbff;
  font-size: 0.72rem;
  padding: 0.26rem 0.46rem;
}

.crm-noc-board {
  display: grid;
  gap: 0.5rem;
}

.crm-noc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.34rem;
}

.crm-noc-kpi {
  display: grid;
  gap: 0.14rem;
  border: 1px solid #d7e3f5;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  padding: 0.36rem 0.42rem;
}

.crm-noc-kpi.is-warning {
  border-color: #e5c487;
  background: linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%);
}

.crm-noc-kpi.is-danger {
  border-color: #e7b4b4;
  background: linear-gradient(180deg, #fff4f4 0%, #fffafb 100%);
}

.crm-noc-kpi__label {
  font-size: 0.61rem;
  color: #59728e;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.crm-noc-kpi strong {
  font-size: 0.98rem;
  color: #1f466d;
  line-height: 1.1;
}

.crm-noc-kpi small {
  font-size: 0.64rem;
  color: #5f7894;
  line-height: 1.25;
}

.crm-noc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.36rem;
}

.crm-noc-grid--automation {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-noc-pane {
  border: 1px solid #d9e4f5;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.38rem 0.44rem;
  display: grid;
  gap: 0.2rem;
  min-height: 132px;
}

.crm-noc-pane--wide {
  grid-column: 1 / -1;
  min-height: 86px;
}

.crm-noc-pane > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem;
}

.crm-noc-pane > header h4 {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #1f456f;
}

.crm-noc-pane .crm-sla-list {
  gap: 0.08rem;
}

.crm-noc-pane .crm-sla-list li {
  border-radius: 7px;
  border: 1px solid #dde8f6;
  background: #f8fbff;
  padding: 0.18rem 0.24rem;
}

.crm-noc-pane .crm-sla-list span {
  font-size: 0.63rem;
}

.crm-noc-pane .crm-sla-list strong {
  font-size: 0.7rem;
  color: #1f466d;
}

.crm-noc-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.24rem;
}

.crm-noc-alert-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.42rem;
  border: 1px solid #d8e4f4;
  border-radius: 9px;
  background: #f8fbff;
  padding: 0.3rem 0.34rem;
}

.crm-noc-alert-main {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.crm-noc-alert-head {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
}

.crm-noc-alert-head strong {
  font-size: 0.69rem;
  color: #1f466d;
  line-height: 1.2;
}

.crm-noc-alert-main small {
  font-size: 0.62rem;
  color: #5f7894;
  line-height: 1.2;
}

.crm-noc-alert-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  flex-wrap: wrap;
}

.crm-noc-grid--audit {
  grid-template-columns: 1.35fr 1fr 1fr;
}

.crm-noc-audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.22rem;
}

.crm-noc-audit-row {
  border: 1px solid #d9e4f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.28rem 0.32rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.32rem;
}

.crm-noc-audit-row__main {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.crm-noc-audit-row__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.2rem;
}

.crm-noc-audit-row__head strong {
  font-size: 0.68rem;
  line-height: 1.2;
  color: #1f466d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-noc-audit-row__head time {
  font-size: 0.6rem;
  color: #64809e;
  white-space: nowrap;
}

.crm-noc-audit-row p {
  margin: 0;
  font-size: 0.64rem;
  color: #294b70;
  line-height: 1.28;
}

.crm-noc-audit-row small {
  font-size: 0.6rem;
  color: #64809e;
  line-height: 1.22;
}

.crm-noc-pane .crm-automation-alert {
  margin-top: 0.2rem;
}

.crm-section-panel--noc .empty-state {
  border-radius: 10px;
  border: 1px dashed #cad8ef;
  background: #f8fbff;
}

.crm-section-panel--incidents .crm-panel-stack,
.crm-section-panel--installations .crm-panel-stack {
  gap: 0.46rem;
}

.crm-section-panel--incidents .crm-panel-stack > form,
.crm-section-panel--installations .crm-panel-stack > form {
  border-radius: 11px;
  padding: 0.48rem 0.52rem;
}

.crm-section-panel--incidents .crm-panel-stack > #crmIncidentsList,
.crm-section-panel--installations .crm-panel-stack > #crmInstallationsList {
  border-radius: 11px;
  padding: 0.46rem 0.5rem;
}

.crm-section-panel--incidents .crm-incident-form,
.crm-section-panel--installations .crm-install-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
}

.crm-section-panel--incidents .crm-incident-form textarea,
.crm-section-panel--incidents .crm-incident-toggle,
.crm-section-panel--incidents .crm-incident-form button[type="submit"],
.crm-section-panel--installations .crm-install-form .button-row,
.crm-section-panel--installations .crm-install-form #crmInstallPrecheckResult {
  grid-column: 1 / -1;
}

.crm-section-panel--incidents .crm-incident-form textarea {
  min-height: 70px;
}

.crm-section-panel--incidents .crm-incident-item {
  border-radius: 9px;
  padding: 0.38rem 0.44rem;
}

.crm-section-panel--installations .module-table-shell {
  border-radius: 10px;
  overflow: hidden;
}

.crm-section-panel input,
.crm-section-panel select,
.crm-section-panel textarea {
  border-radius: 9px;
  font-size: 0.73rem;
  padding: 0.42rem 0.54rem;
}

.crm-section-panel .button-row {
  gap: 0.24rem;
}

.crm-customer360-shell {
  display: grid;
  gap: 0.54rem;
}

.crm-customer360-timeline,
.crm-customer360-tabs {
  border: 1px solid #d8e3f4;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.5rem 0.58rem;
}

.crm-customer360-timeline__head,
.crm-customer360-tabs__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.48rem;
  margin-bottom: 0.42rem;
}

.crm-customer360-timeline__head h4,
.crm-customer360-tabs__head h4 {
  margin: 0;
  font-size: 0.82rem;
}

.crm-customer360-timeline__head .muted-copy {
  margin: 0.18rem 0 0;
  font-size: 0.68rem;
}

.crm-customer360-filter {
  display: grid;
  gap: 0.12rem;
  min-width: 170px;
}

.crm-customer360-filter span {
  font-size: 0.64rem;
  color: #58708a;
}

.crm-customer360-filter select {
  border-radius: 9px;
  font-size: 0.7rem;
  padding: 0.32rem 0.46rem;
}

.crm-customer360-timeline__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
  margin-bottom: 0.34rem;
}

.crm-customer360-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-bottom: 0.44rem;
}

.crm-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.crm-timeline-list li {
  border: 1px solid #e2ebf8;
  border-radius: 10px;
  padding: 0.4rem 0.46rem;
  background: #fff;
}

.crm-timeline-list li header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.34rem;
  font-size: 0.7rem;
  color: #5d728a;
  margin-bottom: 0.22rem;
}

.crm-timeline-item__head {
  display: grid;
  gap: 0.14rem;
}

.crm-timeline-list li header strong {
  color: #1a3552;
  font-size: 0.72rem;
}

.crm-timeline-list li header time {
  font-size: 0.66rem;
  white-space: nowrap;
}

.crm-timeline-list li p {
  margin: 0;
  font-size: 0.72rem;
  color: #2a3f56;
}

.crm-timeline-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.08rem 0.44rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  width: fit-content;
  text-transform: uppercase;
}

.crm-timeline-badge--attention {
  background: #e8f5ff;
  color: #1f5f93;
}

.crm-timeline-badge--operations {
  background: #efeaff;
  color: #5c3d9e;
}

.crm-timeline-badge--billing {
  background: #e9f8ef;
  color: #2d6e46;
}

.crm-timeline-badge--support {
  background: #fff0e5;
  color: #8b4d20;
}

.crm-timeline-badge--notes {
  background: #f2f4f8;
  color: #4f5b6e;
}

.crm-timeline-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
  margin-top: 0.24rem;
}

.crm-timeline-item__meta span {
  border: 1px solid #dae3ef;
  border-radius: 999px;
  padding: 0.07rem 0.38rem;
  font-size: 0.61rem;
  color: #4f6479;
  background: #fbfcfe;
}

.crm-domain-card {
  border: 1px solid #dce7f5;
  border-radius: 11px;
  padding: 0.44rem 0.5rem;
  background: #fff;
}

.crm-domain-card h5 {
  margin: 0 0 0.24rem;
  font-size: 0.78rem;
  color: #18497a;
}

.crm-domain-card p {
  margin: 0 0 0.18rem;
  font-size: 0.72rem;
  color: #364a61;
}

.crm-domain-list {
  list-style: none;
  margin: 0.28rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.24rem;
}

.crm-domain-list li {
  display: grid;
  gap: 0.06rem;
  border: 1px solid #e2eaf6;
  border-radius: 8px;
  padding: 0.24rem 0.32rem;
  background: #fbfdff;
}

.crm-domain-list li strong {
  font-size: 0.68rem;
  color: #23415f;
}

.crm-domain-list li span {
  font-size: 0.66rem;
  color: #51677d;
}

.crm-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.26rem;
}

.crm-pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 0.46rem;
}

.crm-pipeline-column {
  border: 1px solid #d9e5f6;
  border-radius: 12px;
  background: #f9fbff;
  padding: 0.42rem;
  display: grid;
  gap: 0.3rem;
}

.crm-pipeline-column.is-dragover {
  border-color: #2f7fcb;
  background: #edf4ff;
}

.crm-pipeline-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
}

.crm-pipeline-column header h4 {
  margin: 0;
  font-size: 0.76rem;
}

.crm-pipeline-column header span {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.68rem;
  background: #dcecff;
  color: #1b4c7b;
}

.crm-pipeline-column > p {
  margin: 0;
  font-size: 0.66rem;
  color: #60758d;
}

.crm-pipeline-list {
  display: grid;
  gap: 0.3rem;
}

.crm-pipeline-card {
  border: 1px solid #d8e3f3;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  display: grid;
  gap: 0.14rem;
  padding: 0.34rem 0.38rem;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.crm-pipeline-card:hover {
  border-color: #7ea9d6;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(17, 48, 78, 0.08);
}

.crm-pipeline-card strong {
  font-size: 0.73rem;
  color: #17344f;
}

.crm-pipeline-card small,
.crm-pipeline-card span,
.crm-pipeline-card em {
  font-size: 0.65rem;
  color: #60748c;
}

.crm-pipeline-card em {
  font-style: normal;
  color: #4d647e;
}

.crm-operations-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(340px, 1.15fr) minmax(220px, 0.9fr);
  gap: 0.46rem;
  margin-top: 0.42rem;
}

.crm-operations-pane {
  border: 1px solid #dbe6f6;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.44rem;
  min-height: 260px;
}

.crm-operations-pane > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.34rem;
}

.crm-operations-pane > header h4 {
  margin: 0;
  font-size: 0.8rem;
}

.crm-operations-pane > header span {
  font-size: 0.64rem;
  color: #6b8097;
}

.crm-operations-pane--action #crmOperationalWorkspace {
  border: none;
  background: transparent;
  padding: 0;
}

.crm-operations-queue {
  display: grid;
  gap: 0.28rem;
}

.crm-operation-queue-item {
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  display: grid;
  gap: 0.1rem;
  padding: 0.32rem 0.38rem;
  cursor: pointer;
}

.crm-operation-queue-item.is-active {
  border-color: #4f8cc9;
  background: #eef5ff;
}

.crm-operation-queue-item strong {
  font-size: 0.72rem;
  color: #193955;
}

.crm-operation-queue-item span,
.crm-operation-queue-item small {
  font-size: 0.64rem;
  color: #60748c;
}

.crm-operation-preview-meta {
  border-top: 1px dashed #d8e2f0;
  margin-top: 0.34rem;
  padding-top: 0.34rem;
  display: grid;
  gap: 0.14rem;
}

.crm-operation-preview-meta p {
  margin: 0;
  font-size: 0.68rem;
  color: #3f546a;
}

.crm-section-panel--automations {
  display: grid;
  gap: 0.44rem;
}

.crm-automation-alert {
  border: 1px solid #f2d8a0;
  border-radius: 12px;
  background: #fff8e9;
  color: #7a5b1b;
  padding: 0.44rem 0.56rem;
  font-size: 0.72rem;
}

.crm-automation-alert strong {
  font-weight: 700;
}

.crm-automation-alert--warn {
  border-color: #ffd1ab;
  background: #fff4eb;
  color: #8f4d25;
}

.crm-automation-admin {
  display: grid;
  gap: 0.48rem;
}

.crm-automation-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.34rem;
}

.crm-automation-summary-card {
  border: 1px solid #d7e3f5;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.36rem 0.46rem;
  display: grid;
  gap: 0.12rem;
}

.crm-automation-summary-card span {
  font-size: 0.66rem;
  color: #4f6680;
}

.crm-automation-summary-card strong {
  font-size: 0.95rem;
  color: #173d63;
}

.crm-automation-summary-card small {
  font-size: 0.62rem;
  color: #6d8198;
}

.crm-automation-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(286px, 0.9fr);
  gap: 0.44rem;
}

.crm-automation-catalog,
.crm-automation-audit {
  border: 1px solid #d9e4f5;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.46rem 0.52rem;
}

.crm-automation-catalog > header,
.crm-automation-audit > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.34rem;
  gap: 0.28rem;
}

.crm-automation-catalog > header h4,
.crm-automation-audit > header h4 {
  margin: 0;
  font-size: 0.82rem;
  color: #14334f;
}

.crm-automation-catalog > header span,
.crm-automation-audit > header span {
  font-size: 0.65rem;
  color: #5d7289;
}

.crm-automation-toolbar {
  border: 1px solid #d6e1f1;
  border-radius: 11px;
  background: #f6faff;
  padding: 0.28rem;
  margin-bottom: 0.34rem;
}

.crm-automation-toolbar__controls {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(4, minmax(122px, 1fr));
  gap: 0.28rem;
}

.crm-automation-toolbar__controls input,
.crm-automation-toolbar__controls select {
  min-height: 31px;
  border: 1px solid #ccd9eb;
  border-radius: 10px;
  padding: 0.26rem 0.42rem;
  font-size: 0.72rem;
  color: #17344f;
  background: #fff;
}

.crm-automation-table-shell {
  border: 1px solid #dbe5f3;
  border-radius: 11px;
  overflow: auto;
  background: #fff;
}

.crm-automation-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.crm-automation-table th,
.crm-automation-table td {
  padding: 0.38rem 0.44rem;
  border-bottom: 1px solid #edf2fa;
  vertical-align: top;
  text-align: left;
  font-size: 0.69rem;
}

.crm-automation-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: 700;
  color: #264565;
  background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
}

.crm-automation-table td strong {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.73rem;
  color: #173752;
}

.crm-automation-table td small {
  font-size: 0.61rem;
  color: #69809b;
}

.crm-automation-rule-row {
  cursor: pointer;
  transition: background-color 130ms ease;
}

.crm-automation-rule-row:hover {
  background: #f6f9ff;
}

.crm-automation-rule-row.is-active {
  background: #eaf3ff;
}

.crm-automation-table__empty {
  text-align: center;
  color: #647b94;
  font-size: 0.7rem;
}

.crm-automation-priority {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.crm-automation-priority__value {
  min-width: 34px;
  text-align: center;
  padding: 0.08rem 0.3rem;
  border: 1px solid #d0dff2;
  border-radius: 999px;
  background: #f5f9ff;
  color: #1e4268;
  font-size: 0.66rem;
  font-weight: 700;
}

.crm-automation-priority__actions {
  display: inline-flex;
  gap: 0.14rem;
}

.crm-automation-toggle {
  border: 1px solid #cfdaec;
  border-radius: 999px;
  font-size: 0.64rem;
  padding: 0.16rem 0.42rem;
  min-height: 24px;
  cursor: pointer;
  background: #f8fbff;
  color: #345a80;
}

.crm-automation-toggle.is-enabled {
  border-color: #9ed0ad;
  background: #edf9f0;
  color: #24683b;
}

.crm-automation-toggle.is-disabled {
  border-color: #dcc8bd;
  background: #faf2ed;
  color: #7c4f38;
}

.crm-automation-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.crm-automation-run-summary {
  display: inline-flex;
  gap: 0.16rem;
  flex-wrap: wrap;
}

.crm-automation-run-summary span {
  padding: 0.08rem 0.26rem;
  border-radius: 999px;
  font-size: 0.61rem;
  border: 1px solid #d6e1f2;
  background: #f7faff;
  color: #3f5e7d;
}

.crm-automation-audit {
  display: grid;
  align-content: start;
  gap: 0.26rem;
}

.crm-automation-audit-list {
  display: grid;
  gap: 0.26rem;
  max-height: 542px;
  overflow: auto;
  padding-right: 0.12rem;
}

.crm-automation-audit-item {
  border: 1px solid #d8e2f2;
  border-radius: 10px;
  background: #fff;
  padding: 0.3rem 0.38rem;
}

.crm-automation-audit-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
  cursor: pointer;
  list-style: none;
}

.crm-automation-audit-item summary::-webkit-details-marker {
  display: none;
}

.crm-automation-audit-item p {
  margin: 0.2rem 0 0;
  font-size: 0.66rem;
  color: #425973;
}

.crm-automation-audit-item pre {
  margin: 0.24rem 0 0;
  border: 1px solid #dce6f5;
  border-radius: 9px;
  background: #f6f9ff;
  padding: 0.28rem 0.34rem;
  max-height: 168px;
  overflow: auto;
  font-size: 0.58rem;
  color: #1f3d5d;
}

.crm-automation-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  justify-content: space-between;
}

.crm-automation-footer small {
  font-size: 0.63rem;
  color: #5f7590;
}

@media (max-width: 1560px) {
  .crm-pipeline-board {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }

  .crm-operations-workspace {
    grid-template-columns: minmax(210px, 0.9fr) minmax(300px, 1.1fr);
  }

  .crm-operations-pane--preview {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1280px) {
  .crm-pipeline-board {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .crm-automation-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-automation-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-automation-toolbar__controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-noc-kpi-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .crm-noc-grid,
  .crm-noc-grid--automation,
  .crm-noc-grid--audit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .crm-operations-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-noc-kpi-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 1480px) {
  .crm-shell--chats .crm-layout {
    grid-template-columns: minmax(248px, 306px) minmax(0, 1fr);
  }

  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: minmax(0, 1fr) minmax(176px, 210px);
  }

  .crm-section-panel--operations .crm-sla-cards {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }
}

@media (max-width: 1320px) {
  .crm-shell--chats .crm-layout {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-column--inbox {
    top: auto;
    max-height: none;
  }

  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-conversation-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-section-panel--incidents .crm-incident-form,
  .crm-section-panel--installations .crm-install-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .crm-shell--chats .crm-hero-card {
    padding: 0.18rem 0.22rem;
  }

  .crm-shell--chats .crm-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-shell--chats .crm-filter-form__basic {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-conv-list,
  .crm-shell--chats .crm-chat-stream {
    min-height: 0;
    max-height: 48vh;
  }

  .crm-shell--chats .crm-conversation-side {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-agent-drawer {
    top: 56px;
    right: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 66px);
  }

  .crm-section-panel:not(.crm-section-panel--chats) {
    min-height: 0;
    padding: 0.4rem 0.44rem;
  }

  .crm-noc-toolbar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .crm-noc-window-field {
    min-width: 126px;
  }

  .crm-noc-kpi-grid,
  .crm-noc-grid,
  .crm-noc-grid--automation,
  .crm-noc-grid--audit {
    grid-template-columns: 1fr;
  }
}

/* === Atencion al cliente premium inbox/chat redesign === */
.crm-shell--chats {
  --crm-chat-radius-card: 16px;
  --crm-chat-radius-soft: 12px;
  --crm-chat-border: #d8e1ef;
  --crm-chat-border-strong: #a9bfdc;
  --crm-chat-surface: #ffffff;
  --crm-chat-surface-soft: #f6f9ff;
  --crm-chat-surface-soft-2: #f1f6ff;
  --crm-chat-ink: #13293f;
  --crm-chat-muted: #536b85;
  --crm-chat-shadow: 0 10px 24px rgba(15, 36, 66, 0.08);
  --crm-chat-shadow-hover: 0 14px 30px rgba(22, 55, 102, 0.14);
}

.crm-shell--chats .crm-hero-card {
  padding: 0.44rem 0.7rem;
  gap: 0.44rem;
  border-radius: var(--crm-chat-radius-card);
}

.crm-shell--chats .crm-brand-headline--compact .section-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #204f81;
}

.crm-shell--chats .crm-kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.34rem;
}

.crm-shell--chats .crm-kpi-strip__item {
  padding: 0.34rem 0.46rem;
  border-radius: 11px;
  border: 1px solid #d7e4f7;
  background: #f8fbff;
}

.crm-shell--chats .crm-kpi-strip__item span {
  font-size: 0.64rem;
  color: #5e7896;
}

.crm-shell--chats .crm-kpi-strip__item strong {
  font-size: 0.95rem;
  color: #1b4c81;
}

.crm-shell--chats .crm-layout {
  grid-template-columns: minmax(318px, 360px) minmax(0, 1fr);
  min-height: calc(100vh - 122px);
  gap: 0.62rem;
}

.crm-shell--chats .crm-column--inbox {
  top: 56px;
  max-height: calc(100vh - 64px);
}

.crm-shell--chats .crm-column--inbox .module-card__head {
  margin-bottom: 0.32rem;
}

.crm-shell--chats .crm-inbox-head {
  gap: 0.5rem;
}

.crm-shell--chats .crm-inbox-head h3 {
  margin: 0.04rem 0 0;
  font-size: 1rem;
  color: var(--crm-chat-ink);
}

.crm-shell--chats .crm-inbox-count {
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid #cad9ef;
  background: #eef4ff;
  color: #234f82;
}

.crm-shell--chats .crm-filter-form {
  border: 1px solid #d5e1f3;
  border-radius: 13px;
  padding: 0.3rem;
  margin-bottom: 0.28rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  gap: 0.24rem;
}

.crm-shell--chats .crm-filter-form__basic {
  grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(104px, 1fr)) auto auto;
  gap: 0.3rem;
}

.crm-shell--chats .crm-filter-form input,
.crm-shell--chats .crm-filter-form select {
  min-height: 31px;
  border-radius: 10px;
  border-color: #ccdaee;
  padding: 0.26rem 0.44rem;
  font-size: 0.74rem;
}

.crm-shell--chats .crm-filter-form input:focus,
.crm-shell--chats .crm-filter-form select:focus,
.crm-shell--chats textarea:focus,
.crm-shell--chats button:focus-visible {
  outline: none;
  border-color: #5e8fd2;
  box-shadow: 0 0 0 3px rgba(88, 142, 216, 0.16);
}

.crm-shell--chats .crm-filter-advanced summary {
  border-radius: 9px;
  padding: 0.28rem 0.42rem;
  font-size: 0.7rem;
  color: #305c8f;
  background: #edf3ff;
}

.crm-shell--chats .crm-filter-advanced .crm-filter-form__advanced {
  padding: 0.34rem 0.42rem 0.38rem;
  gap: 0.24rem;
}

.crm-shell--chats .crm-conv-list {
  max-height: calc(100vh - 262px);
  min-height: clamp(470px, 64vh, 760px);
  gap: 0.14rem;
  padding-right: 0.18rem;
}

.crm-shell--chats .crm-conv-item {
  position: relative;
  border: 1px solid #e0e8f3;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.22rem 0.32rem;
  gap: 0.08rem;
  min-height: 78px;
  box-shadow: 0 1px 2px rgba(17, 39, 69, 0.03);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.crm-shell--chats .crm-conv-item::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 1.5px;
  border-radius: 2px;
  background: #4f7daf;
  opacity: 0;
  transition: opacity 140ms ease;
}

.crm-shell--chats .crm-conv-item:hover {
  border-color: #c1d1e6;
  box-shadow: 0 5px 10px rgba(20, 47, 82, 0.08);
  background: #fcfdff;
  transform: translateY(-0.35px);
}

.crm-shell--chats .crm-conv-item.is-active {
  border-color: #9bb3d0;
  background: #f7fbff;
  box-shadow: 0 0 0 1px rgba(93, 128, 170, 0.11), 0 6px 14px rgba(18, 46, 84, 0.08);
}

.crm-shell--chats .crm-conv-item:hover::before,
.crm-shell--chats .crm-conv-item.is-active::before {
  opacity: 1;
}

.crm-shell--chats .crm-conv-item__top {
  align-items: center;
  gap: 0.24rem;
}

.crm-shell--chats .crm-conv-item__identity {
  gap: 0.02rem;
}

.crm-shell--chats .crm-conv-item__identity strong {
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.1;
  color: #1a3551;
  letter-spacing: 0.004em;
}

.crm-shell--chats .crm-conv-item__identity span {
  font-size: 0.56rem;
  line-height: 1.1;
  color: #8093aa;
}

.crm-shell--chats .crm-conv-item__time-wrap {
  display: inline-flex;
  align-items: center;
  justify-items: end;
  gap: 0.14rem;
  flex-wrap: nowrap;
  margin-left: auto;
}

.crm-shell--chats .crm-conv-item__time-wrap time {
  font-size: 0.55rem;
  color: #7a8ea6;
  letter-spacing: 0.008em;
  white-space: nowrap;
}

.crm-shell--chats .crm-conv-unread {
  min-width: 15px;
  height: 15px;
  padding: 0 0.2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.5rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(180deg, #f15a67 0%, #dc3748 100%);
  box-shadow: 0 2px 6px rgba(220, 55, 72, 0.2);
}

.crm-shell--chats .crm-conv-item__snippet {
  margin: 0;
  color: #2b4967;
  font-size: 0.62rem;
  line-height: 1.14;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}

.crm-shell--chats .crm-conv-item__bottom {
  display: flex;
  gap: 0.2rem;
  align-items: center;
  min-height: 18px;
}

.crm-shell--chats .crm-conv-item__statusline {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.08rem;
  min-height: 18px;
  overflow: hidden;
  flex: 0 1 auto;
}

.crm-shell--chats .crm-conv-item__meta {
  margin: 0;
  font-size: 0.56rem;
  line-height: 1.05;
  color: #6f849a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  margin-left: auto;
  flex: 1 1 auto;
}

.crm-shell--chats .crm-conv-item .status-badge {
  min-width: auto;
  padding: 0 0.28rem;
  min-height: 18px;
  border-radius: 5px;
  font-size: 0.5rem;
  letter-spacing: 0.03em;
  line-height: 1;
  gap: 0.1rem;
  border: 1px solid rgba(162, 182, 205, 0.45);
}

.crm-shell--chats .crm-conv-item .crm-pill {
  flex: 0 0 auto;
  padding: 0 0.26rem;
  min-height: 18px;
  font-size: 0.5rem;
  border-radius: 5px;
  border-width: 1px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-color: rgba(164, 184, 208, 0.48);
  color: #456789;
  background: #f3f8ff;
}

.crm-shell--chats .crm-conv-item .crm-pill--tag {
  max-width: 76px;
  background: #f8fbff;
  color: #507299;
}

.crm-shell--chats .crm-conv-item .crm-pill--tagcount {
  min-width: 22px;
  justify-content: center;
  background: #edf3fb;
  color: #3f607f;
}

@media (max-width: 1540px) {
  .crm-shell--chats .crm-conv-item__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
  }

  .crm-shell--chats .crm-conv-item__meta {
    text-align: left;
    margin-left: 0;
    width: 100%;
  }
}

.crm-shell--chats .crm-pill {
  border-color: #cddcf1;
}

.crm-shell--chats .crm-section-panel--chat-core {
  min-height: calc(100vh - 142px);
  border-radius: var(--crm-chat-radius-card);
  padding: 0.46rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.98) 100%);
}

.crm-shell--chats .crm-detail {
  display: grid;
  gap: 0.26rem;
}

.crm-shell--chats .crm-detail-head {
  border: 1px solid #d7e2f0;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.36rem 0.48rem;
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.26rem;
  box-shadow: 0 4px 12px rgba(16, 39, 73, 0.06);
}

.crm-shell--chats .crm-detail-head h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #183754;
  letter-spacing: 0.005em;
  line-height: 1.15;
  margin: 0;
}

.crm-shell--chats .crm-detail-head__line {
  font-size: 0.62rem;
  color: #617d9b;
  line-height: 1.2;
}

.crm-shell--chats .crm-detail-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  margin-top: 0.1rem;
}

.crm-shell--chats .crm-detail-head__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.12rem;
  align-items: center;
  align-content: center;
}

.crm-shell--chats .crm-conversation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
  border: 1px solid #dce6f3;
  border-radius: 9px;
  background: #f7fbff;
  padding: 0.18rem 0.24rem;
}

.crm-shell--chats .crm-summary-pill {
  border: 1px solid #d7e2f0;
  border-radius: 7px;
  background: #ffffff;
  padding: 0.11rem 0.24rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.crm-shell--chats .crm-summary-pill span {
  font-size: 0.53rem;
  color: #6682a0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.crm-shell--chats .crm-summary-pill strong {
  font-size: 0.62rem;
  color: #214a72;
}

.crm-shell--chats .crm-conversation-stage {
  grid-template-columns: minmax(0, 1fr) minmax(296px, 352px);
  gap: 0.48rem;
}

.crm-shell--chats .crm-conversation-main {
  min-width: 0;
}

.crm-shell--chats .crm-chat-shell {
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 20px rgba(13, 35, 66, 0.08);
  padding: 0.26rem;
  min-height: calc(100vh - 266px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.18rem;
  overflow: hidden;
}

.crm-shell--chats .crm-chat-stream {
  max-height: calc(100vh - 326px);
  min-height: clamp(560px, 68vh, 920px);
  overflow: auto;
  padding: 0.22rem 0.18rem 0.16rem 0.12rem;
  display: grid;
  gap: 0.24rem;
  align-content: start;
  background:
    radial-gradient(circle at top left, rgba(39, 108, 184, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(246, 250, 255, 0.42) 0%, rgba(255, 255, 255, 0) 34%);
  border-radius: 10px;
}

.crm-shell--chats .crm-chat-stream::-webkit-scrollbar {
  width: 8px;
}

.crm-shell--chats .crm-chat-stream::-webkit-scrollbar-track {
  background: transparent;
}

.crm-shell--chats .crm-chat-stream::-webkit-scrollbar-thumb {
  background: #c8d6ea;
  border-radius: 999px;
}

.crm-shell--chats .crm-chat-msg {
  border: 1px solid #d8e4f1;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 52, 88, 0.07);
  padding: 0.34rem 0.48rem;
  max-width: min(70%, 700px);
  justify-self: start;
  display: grid;
  gap: 0.14rem;
  position: relative;
}

.crm-shell--chats .crm-chat-msg.is-outbound {
  justify-self: end;
  background: linear-gradient(180deg, #eaf3ff 0%, #e2edff 100%);
  border-color: #c6d9f3;
  border-bottom-right-radius: 8px;
}

.crm-shell--chats .crm-chat-msg.is-system {
  max-width: min(92%, 960px);
  border-color: #d8e1eb;
  background: #f7fafd;
  box-shadow: none;
  border-radius: 10px;
}

.crm-shell--chats .crm-chat-msg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.24rem;
}

.crm-shell--chats .crm-chat-msg__head strong {
  color: #1f476f;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.crm-shell--chats .crm-chat-msg__head span {
  font-size: 0.56rem;
  color: #738ca7;
  white-space: nowrap;
}

.crm-shell--chats .crm-chat-msg p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.34;
  color: #213f5e;
  text-wrap: pretty;
}

.crm-shell--chats .crm-chat-msg__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.crm-shell--chats .crm-chat-msg__meta span {
  font-size: 0.53rem;
  color: #516d8d;
  border: 1px solid #cfdeec;
  border-radius: 999px;
  padding: 0.04rem 0.22rem;
  background: #f6faff;
}

.crm-shell--chats .crm-msg-attachments {
  margin-top: 0;
  font-size: 0.67rem;
  color: #3f5f80;
}

.crm-shell--chats .crm-chat-event {
  border: 1px solid #d8e3ef;
  border-left: 2px solid #84a4cb;
  border-radius: 9px;
  background: #f8fbff;
  padding: 0.24rem 0.36rem;
  display: grid;
  gap: 0.12rem;
  max-width: min(84%, 760px);
  justify-self: center;
  box-shadow: 0 1px 4px rgba(20, 48, 83, 0.05);
}

.crm-shell--chats .crm-chat-event--handoff {
  border-left-color: #5d8bc5;
  background: #f1f6ff;
}

.crm-shell--chats .crm-chat-event--note {
  border-left-color: #8f79c6;
  background: #f7f3ff;
}

.crm-shell--chats .crm-chat-event--assignment {
  border-left-color: #42a0a7;
  background: #eefbfc;
}

.crm-shell--chats .crm-chat-event--task {
  border-left-color: #6c8f43;
  background: #f2faef;
}

.crm-shell--chats .crm-chat-event--ticket {
  border-left-color: #c7823b;
  background: #fff6ee;
}

.crm-shell--chats .crm-chat-event__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.34rem;
}

.crm-shell--chats .crm-chat-event__head strong {
  margin: 0;
  font-size: 0.63rem;
  color: #285076;
  letter-spacing: 0.01em;
}

.crm-shell--chats .crm-chat-event__head time {
  font-size: 0.54rem;
  color: #738ca7;
  white-space: nowrap;
}

.crm-shell--chats .crm-chat-event p {
  margin: 0;
  font-size: 0.64rem;
  line-height: 1.28;
  color: #3a5b7d;
}

.crm-shell--chats .crm-chat-event__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
}

.crm-shell--chats .crm-chat-event__chips span {
  font-size: 0.5rem;
  border-radius: 999px;
  border: 1px solid #d2ddec;
  background: #ffffff;
  color: #557190;
  padding: 0.03rem 0.2rem;
}

.crm-shell--chats .crm-conversation-actions {
  border: 1px solid #d5e1ef;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  padding: 0.26rem 0.34rem;
  box-shadow: 0 -4px 12px rgba(17, 45, 78, 0.05);
}

.crm-shell--chats .crm-reply-form {
  display: grid;
  gap: 0.16rem;
}

.crm-shell--chats .crm-reply-form textarea {
  min-height: 72px;
  border-radius: 8px;
  border: 1px solid #cbdbee;
  padding: 0.38rem 0.5rem;
  font-size: 0.74rem;
  line-height: 1.34;
  background: #ffffff;
  color: #214160;
  resize: vertical;
}

.crm-shell--chats .crm-reply-form textarea:focus {
  border-color: #86aad3;
  box-shadow: 0 0 0 2px rgba(90, 136, 196, 0.14);
}

.crm-shell--chats .crm-reply-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.18rem;
  border-top: 1px dashed #d7e2ee;
  padding-top: 0.14rem;
}

.crm-shell--chats .crm-reply-toolbar__tools,
.crm-shell--chats .crm-reply-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.18rem;
}

.crm-shell--chats .crm-reply-toolbar .button {
  min-height: 24px;
  padding: 0.12rem 0.32rem;
  font-size: 0.6rem;
  border-radius: 6px;
}

.crm-shell--chats .crm-reply-toolbar__actions .button--primary {
  min-width: 82px;
}

.crm-shell--chats .crm-conversation-side {
  display: grid;
  gap: 0.44rem;
}

.crm-shell--chats .crm-side-card {
  border: 1px solid var(--crm-chat-border);
  border-radius: 13px;
  background: var(--crm-chat-surface);
  padding: 0.52rem 0.58rem;
  box-shadow: 0 8px 18px rgba(16, 41, 77, 0.08);
  gap: 0.34rem;
}

.crm-shell--chats .crm-side-card__head h4 {
  margin: 0;
  font-size: 0.81rem;
  color: #214b78;
}

.crm-shell--chats .crm-side-kpi-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.24rem;
}

.crm-shell--chats .crm-side-kpi-list li {
  border: 1px solid #d9e4f4;
  border-radius: 10px;
  padding: 0.28rem 0.34rem;
  background: #f8fbff;
  display: grid;
  gap: 0.08rem;
}

.crm-shell--chats .crm-side-kpi-list span {
  font-size: 0.6rem;
  color: #607c98;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.crm-shell--chats .crm-side-kpi-list strong {
  font-size: 0.72rem;
  color: #1f456f;
}

.crm-shell--chats .crm-side-kpi-list--ops {
  grid-template-columns: 1fr;
}

.crm-shell--chats .crm-hybrid-status-reason {
  font-size: 0.72rem;
  line-height: 1.34;
  border-radius: 10px;
  padding: 0.36rem 0.42rem;
}

.crm-shell--chats .crm-side-meta {
  font-size: 0.7rem;
  line-height: 1.34;
  color: #4d6786;
}

.crm-shell--chats .crm-side-quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.22rem;
}

.crm-shell--chats .crm-side-action-form {
  gap: 0.24rem;
}

.crm-shell--chats .crm-side-action-grid {
  gap: 0.24rem;
}

.crm-shell--chats .crm-side-action-form input,
.crm-shell--chats .crm-side-action-form select {
  min-height: 31px;
  font-size: 0.72rem;
  padding: 0.28rem 0.42rem;
}

.crm-shell--chats .crm-side-card--ops .crm-collapsible summary {
  font-size: 0.71rem;
  padding: 0.34rem 0.44rem;
}

.crm-shell--chats .crm-side-card--ops .crm-collapsible__body {
  padding: 0.34rem 0.44rem;
}

.crm-shell--chats .crm-context-mini {
  gap: 0.22rem;
}

.crm-shell--chats .crm-context-mini__head strong {
  font-size: 0.84rem;
  color: #1a466f;
}

.crm-shell--chats .crm-context-mini__head p {
  font-size: 0.71rem;
}

.crm-shell--chats .crm-context-mini__list {
  gap: 0.14rem;
}

.crm-shell--chats .crm-context-mini__list li {
  border: 1px solid #dbe6f6;
  border-radius: 9px;
  background: #f9fbff;
  padding: 0.2rem 0.32rem;
}

.crm-shell--chats .crm-context-mini__list span {
  font-size: 0.58rem;
}

.crm-shell--chats .crm-context-mini__list strong {
  font-size: 0.69rem;
}

.crm-shell--chats .crm-agent-drawer {
  border-radius: 16px;
  border-color: #cfdef3;
  box-shadow: 0 24px 52px rgba(12, 34, 66, 0.28);
  padding: 0.52rem 0.56rem;
}

.crm-shell--chats .crm-agent-tabs .button {
  min-height: 28px;
  font-size: 0.68rem;
}

.crm-shell--chats .crm-quick-chip {
  min-height: 30px;
  font-size: 0.68rem;
}

@media (max-width: 1580px) {
  .crm-shell--chats .crm-layout {
    grid-template-columns: minmax(292px, 332px) minmax(0, 1fr);
  }

  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: minmax(0, 1fr) minmax(276px, 324px);
  }
}

@media (max-width: 1360px) {
  .crm-shell--chats .crm-layout {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-column--inbox {
    top: auto;
    max-height: none;
  }

  .crm-shell--chats .crm-conv-list {
    max-height: 44vh;
    min-height: 280px;
  }

  .crm-shell--chats .crm-detail-head {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-detail-head__chips {
    justify-content: flex-start;
  }

  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-conversation-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-shell--chats .crm-chat-shell {
    min-height: 560px;
  }

  .crm-shell--chats .crm-reply-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-shell--chats .crm-reply-toolbar__tools,
  .crm-shell--chats .crm-reply-toolbar__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 1100px) {
  .crm-shell--chats .crm-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-shell--chats .crm-filter-form__basic {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-conversation-side {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-side-kpi-list {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-conv-item__footer {
    grid-template-columns: 1fr;
  }
}

/* === Atencion al cliente Pass 5: consistencia visual global (chat) === */
.crm-shell--chats {
  --crm-pass5-border: #d6e1ef;
  --crm-pass5-border-strong: #9fb6d6;
  --crm-pass5-surface: #ffffff;
  --crm-pass5-surface-soft: #f7fbff;
  --crm-pass5-ink: #17324d;
  --crm-pass5-muted: #617a95;
  --crm-pass5-shadow-soft: 0 8px 18px rgba(16, 41, 77, 0.08);
  --crm-pass5-shadow-hover: 0 12px 24px rgba(16, 44, 80, 0.14);
  --crm-pass5-focus: 0 0 0 3px rgba(84, 134, 199, 0.2);
}

.crm-shell--chats .crm-layout {
  gap: 0.42rem;
  min-height: calc(100vh - 118px);
  align-items: stretch;
}

.crm-shell--chats .crm-column--inbox .module-card,
.crm-shell--chats .crm-section-panel--chat-core {
  border: 1px solid var(--crm-pass5-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--crm-pass5-shadow-soft);
}

.crm-shell--chats .crm-filter-form {
  border-radius: 11px;
  border-color: var(--crm-pass5-border);
  background: #f9fcff;
}

.crm-shell--chats .crm-conv-list {
  scrollbar-width: thin;
  scrollbar-color: #c5d4e8 transparent;
}

.crm-shell--chats .crm-conv-list::-webkit-scrollbar {
  width: 7px;
}

.crm-shell--chats .crm-conv-list::-webkit-scrollbar-thumb {
  background: #c5d4e8;
  border-radius: 999px;
}

.crm-shell--chats .crm-conv-item {
  border-color: #dbe4f1;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(16, 38, 68, 0.02);
}

.crm-shell--chats .crm-conv-item:hover {
  border-color: #b9cce4;
  box-shadow: 0 8px 14px rgba(18, 45, 82, 0.11);
  transform: translateY(-0.25px);
}

.crm-shell--chats .crm-conv-item.is-active {
  border-color: var(--crm-pass5-border-strong);
  box-shadow: 0 0 0 1px rgba(82, 120, 163, 0.13), 0 9px 16px rgba(21, 48, 84, 0.11);
  background: #f6fbff;
}

.crm-shell--chats .crm-conv-item:focus-visible {
  outline: none;
  border-color: #6f95c6;
  box-shadow: var(--crm-pass5-focus);
}

.crm-shell--chats .crm-conv-item__identity strong {
  font-size: 0.74rem;
  letter-spacing: 0.004em;
  color: #15324e;
}

.crm-shell--chats .crm-conv-item__identity span {
  font-size: 0.57rem;
  color: #758ca6;
}

.crm-shell--chats .crm-conv-item__snippet {
  color: #264663;
  font-size: 0.63rem;
  line-height: 1.18;
}

.crm-shell--chats .crm-conv-item__meta {
  font-size: 0.55rem;
  color: #6a8199;
}

.crm-shell--chats .crm-conv-item .status-badge,
.crm-shell--chats .crm-conv-item .crm-pill,
.crm-shell--chats .crm-detail-head .status-badge,
.crm-shell--chats .crm-side-micro-chip,
.crm-shell--chats .crm-chat-msg__meta span,
.crm-shell--chats .crm-chat-event__chips span {
  min-height: 18px;
  border-radius: 4px;
  padding: 0 0.24rem;
  line-height: 1;
  font-size: 0.49rem;
  letter-spacing: 0.03em;
}

.crm-shell--chats .status-badge--activo {
  border: 1px solid rgba(50, 146, 94, 0.24);
  background: #e8f8ef;
  color: #176941;
}

.crm-shell--chats .status-badge--en-aviso {
  border: 1px solid rgba(195, 129, 26, 0.25);
  background: #fff4df;
  color: #955d00;
}

.crm-shell--chats .status-badge--suspendido {
  border: 1px solid rgba(184, 64, 72, 0.28);
  background: #fdeced;
  color: #972c35;
}

.crm-shell--chats .status-badge--info {
  border: 1px solid rgba(74, 117, 168, 0.24);
  background: #edf4ff;
  color: #2c5889;
}

.crm-shell--chats .crm-pill--soft {
  border-color: rgba(108, 141, 177, 0.28);
  background: #f2f7ff;
  color: #385f8b;
}

.crm-shell--chats .crm-conversation-stage {
  gap: 0.38rem;
}

.crm-shell--chats .crm-chat-shell {
  border-color: var(--crm-pass5-border);
  border-radius: 12px;
  box-shadow: var(--crm-pass5-shadow-soft);
}

.crm-shell--chats .crm-chat-stream {
  border: 1px solid #dde7f4;
}

.crm-shell--chats .crm-chat-msg {
  border-radius: 12px;
  box-shadow: 0 3px 9px rgba(24, 49, 83, 0.07);
}

.crm-shell--chats .crm-chat-msg.is-outbound {
  box-shadow: 0 2px 8px rgba(41, 82, 141, 0.1);
}

.crm-shell--chats .crm-chat-event {
  border-radius: 8px;
  box-shadow: 0 2px 7px rgba(15, 40, 74, 0.06);
}

.crm-shell--chats .crm-conversation-actions {
  border-color: var(--crm-pass5-border);
  border-radius: 10px;
  box-shadow: 0 -4px 12px rgba(17, 45, 78, 0.05);
}

.crm-shell--chats .crm-reply-toolbar .button,
.crm-shell--chats .crm-agent-drawer .button,
.crm-shell--chats .crm-side-card .button {
  min-height: 24px;
  border-radius: 6px;
  font-size: 0.6rem;
  padding: 0.11rem 0.3rem;
}

.crm-shell--chats .crm-conversation-side {
  gap: 0.3rem;
}

.crm-shell--chats .crm-side-card {
  border-color: var(--crm-pass5-border);
  border-radius: 11px;
  box-shadow: 0 7px 16px rgba(14, 39, 74, 0.07);
}

.crm-shell--chats .crm-side-kpi-list li {
  border-radius: 8px;
  border-color: #d7e2f1;
  background: #f7fbff;
}

.crm-shell--chats .crm-side-mini-timeline__item {
  border-color: #dbe5f3;
  border-radius: 8px;
  background: #f9fbff;
}

.crm-shell--chats .crm-agent-drawer {
  border-color: #d1def1;
  border-radius: 14px;
  box-shadow: 0 26px 48px rgba(11, 33, 63, 0.26);
}

.crm-shell--chats .crm-quick-chip,
.crm-shell--chats .crm-note-list article,
.crm-shell--chats .crm-ai-trace {
  border-radius: 8px;
}

.crm-shell--chats .button:focus-visible,
.crm-shell--chats input:focus-visible,
.crm-shell--chats select:focus-visible,
.crm-shell--chats textarea:focus-visible,
.crm-shell--chats summary:focus-visible {
  outline: none;
  box-shadow: var(--crm-pass5-focus);
}

.crm-shell--chats .button {
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.crm-shell--chats .button:hover {
  transform: translateY(-0.2px);
}

.crm-shell--chats .button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.crm-shell--chats .empty-state {
  border-radius: 10px;
  border: 1px dashed #ccd9ea;
  background: #f8fbff;
  color: #647d98;
}

.crm-shell--chats .crm-conv-list.is-loading {
  position: relative;
  overflow: hidden;
}

.crm-shell--chats .crm-conv-list.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 22%, rgba(236, 244, 255, 0.64) 42%, rgba(255, 255, 255, 0) 62%);
  animation: crm-pass5-shimmer 1.05s linear infinite;
  pointer-events: none;
}

.crm-shell--chats .crm-chat-stream.is-loading {
  position: relative;
  overflow: hidden;
}

.crm-shell--chats .crm-chat-stream.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 18%, rgba(235, 244, 255, 0.58) 40%, rgba(255, 255, 255, 0) 62%);
  animation: crm-pass5-shimmer 1.12s linear infinite;
  pointer-events: none;
}

@keyframes crm-pass5-shimmer {
  0% {
    transform: translateX(-42%);
  }
  100% {
    transform: translateX(42%);
  }
}

/* === Atencion al cliente Pass 6: bandeja e interfaz de chats operativa === */
.crm-shell--chats {
  --crm-pass6-ink: #12304a;
  --crm-pass6-muted: #61798f;
  --crm-pass6-border: #d8e2ef;
  --crm-pass6-border-strong: #8da9cc;
  --crm-pass6-surface: #ffffff;
  --crm-pass6-surface-soft: #f6faff;
  --crm-pass6-active: #f3f8ff;
  --crm-pass6-shadow-soft: 0 7px 16px rgba(16, 39, 72, 0.07);
}

.crm-shell--chats .crm-hero-card {
  padding: 0.28rem 0.56rem;
  gap: 0.24rem;
}

.crm-shell--chats .crm-kpi-strip {
  gap: 0.22rem;
}

.crm-shell--chats .crm-kpi-strip__item {
  padding: 0.24rem 0.36rem;
  border-radius: 9px;
}

.crm-shell--chats .crm-kpi-strip__item span {
  font-size: 0.6rem;
}

.crm-shell--chats .crm-kpi-strip__item strong {
  font-size: 0.86rem;
  line-height: 1.05;
}

.crm-shell--chats .crm-layout {
  grid-template-columns: minmax(332px, 382px) minmax(0, 1fr);
  min-height: calc(100vh - 108px);
  gap: 0.34rem;
}

.crm-shell--chats .crm-column--inbox .module-card__head {
  margin-bottom: 0.14rem;
}

.crm-shell--chats .crm-filter-form {
  border-radius: 10px;
  padding: 0.24rem;
  margin-bottom: 0.2rem;
  gap: 0.16rem;
}

.crm-shell--chats .crm-filter-form__basic {
  gap: 0.16rem;
}

.crm-shell--chats .crm-filter-form input,
.crm-shell--chats .crm-filter-form select {
  min-height: 30px;
  font-size: 0.72rem;
  padding: 0.24rem 0.42rem;
  border-radius: 9px;
}

.crm-shell--chats .crm-filter-form .button {
  min-height: 30px;
  border-radius: 9px;
  font-size: 0.68rem;
  padding-inline: 0.44rem;
}

.crm-shell--chats .crm-filter-advanced summary {
  font-size: 0.66rem;
  padding: 0.24rem 0.36rem;
}

.crm-shell--chats .crm-filter-advanced .crm-filter-form__advanced {
  padding: 0.28rem 0.36rem 0.32rem;
  gap: 0.2rem;
}

.crm-shell--chats .crm-conv-list {
  max-height: calc(100vh - 242px);
  min-height: clamp(520px, 69vh, 820px);
  gap: 0.08rem;
  padding-right: 0.16rem;
}

.crm-shell--chats .crm-conv-item {
  min-height: 82px;
  padding: 0.22rem 0.3rem;
  border-radius: 7px;
  border: 1px solid transparent;
  border-bottom-color: #dfe7f2;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: none;
  gap: 0.06rem;
}

.crm-shell--chats .crm-conv-item::before {
  left: -1px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: #577faf;
}

.crm-shell--chats .crm-conv-item:hover {
  border-color: #c6d5e8;
  background: #f9fcff;
  box-shadow: 0 4px 10px rgba(18, 44, 80, 0.08);
}

.crm-shell--chats .crm-conv-item.is-active {
  border-color: var(--crm-pass6-border-strong);
  background: var(--crm-pass6-active);
  box-shadow: 0 0 0 1px rgba(96, 131, 175, 0.14), 0 7px 14px rgba(18, 44, 79, 0.12);
}

.crm-shell--chats .crm-conv-item__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.18rem;
  align-items: center;
}

.crm-shell--chats .crm-conv-item__name {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--crm-pass6-ink);
  line-height: 1.12;
  letter-spacing: 0.004em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-shell--chats .crm-conv-item__name-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.22rem;
}

.crm-contact-name-source {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 1rem;
  padding: 0.02rem 0.26rem;
  border: 1px solid #d7e5f6;
  border-radius: 0.32rem;
  background: #f7fbff;
  color: #4f6f92;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.crm-shell--chats .crm-conv-item__subline {
  margin: 0;
  font-size: 0.54rem;
  color: #788ea6;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-shell--chats .crm-conv-item__time-wrap {
  gap: 0.1rem;
}

.crm-shell--chats .crm-conv-item__time-wrap time {
  font-size: 0.54rem;
}

.crm-shell--chats .crm-conv-unread {
  min-width: 14px;
  height: 14px;
  font-size: 0.46rem;
  box-shadow: 0 1px 4px rgba(213, 41, 62, 0.2);
}

.crm-shell--chats .crm-conv-item__snippet {
  font-size: 0.6rem;
  line-height: 1.14;
  color: #2a465f;
  margin-top: 0.01rem;
}

.crm-shell--chats .crm-conv-item__bottom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.14rem;
  min-height: 18px;
}

.crm-shell--chats .crm-conv-item__statusline {
  gap: 0.08rem;
  min-width: 0;
}

.crm-shell--chats .crm-conv-item__meta {
  font-size: 0.53rem;
  color: #6d8298;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.crm-shell--chats .crm-conv-item .status-badge,
.crm-shell--chats .crm-conv-item .crm-pill {
  min-height: 18px;
  font-size: 0.47rem;
  border-radius: 4px;
  padding-inline: 0.2rem;
  border-width: 1px;
  letter-spacing: 0.02em;
}

.crm-shell--chats .crm-conv-item .crm-pill--tag {
  max-width: 66px;
}

.crm-shell--chats .crm-conv-item .crm-pill--tagcount {
  min-width: 18px;
}

.crm-shell--chats .crm-section-panel--chat-core {
  min-height: calc(100vh - 128px);
  padding: 0.34rem;
}

.crm-shell--chats .crm-detail {
  gap: 0.18rem;
}

.crm-shell--chats .crm-detail-head {
  padding: 0.28rem 0.4rem;
  border-radius: 10px;
  gap: 0.2rem;
}

.crm-shell--chats .crm-detail-head h3 {
  font-size: 0.8rem;
}

.crm-shell--chats .crm-detail-head__line {
  font-size: 0.58rem;
}

.crm-shell--chats .crm-detail-head__meta,
.crm-shell--chats .crm-detail-head__chips {
  gap: 0.1rem;
}

.crm-shell--chats .crm-detail-head .status-badge,
.crm-shell--chats .crm-detail-head .crm-pill,
.crm-shell--chats .crm-focus-toggle {
  min-height: 19px;
  font-size: 0.5rem;
  border-radius: 5px;
  padding-inline: 0.24rem;
}

.crm-shell--chats .crm-conversation-summary {
  gap: 0.12rem;
  padding: 0.14rem 0.2rem;
}

.crm-shell--chats .crm-summary-pill {
  gap: 0.14rem;
  padding: 0.09rem 0.2rem;
}

.crm-shell--chats .crm-summary-pill span {
  font-size: 0.49rem;
}

.crm-shell--chats .crm-summary-pill strong {
  font-size: 0.58rem;
}

.crm-shell--chats .crm-conversation-stage {
  grid-template-columns: minmax(0, 1fr) minmax(286px, 324px);
  gap: 0.34rem;
}

.crm-shell--chats .crm-chat-shell {
  min-height: calc(100vh - 236px);
  border-radius: 11px;
  padding: 0.22rem;
  gap: 0.16rem;
}

.crm-shell--chats .crm-chat-stream {
  min-height: clamp(600px, 72vh, 940px);
  max-height: calc(100vh - 294px);
  padding: 0.3rem 0.2rem 0.16rem 0.14rem;
  gap: 0.2rem;
  border-radius: 9px;
}

.crm-shell--chats .crm-chat-msg {
  max-width: min(72%, 760px);
  border-radius: 11px;
  padding: 0.32rem 0.44rem;
  gap: 0.12rem;
  box-shadow: 0 2px 8px rgba(21, 47, 82, 0.07);
}

.crm-shell--chats .crm-chat-msg p {
  font-size: 0.72rem;
  line-height: 1.34;
}

.crm-shell--chats .crm-chat-msg__head strong {
  font-size: 0.62rem;
}

.crm-shell--chats .crm-chat-msg__head span {
  font-size: 0.54rem;
}

.crm-shell--chats .crm-chat-event {
  max-width: min(80%, 760px);
  border-radius: 8px;
  padding: 0.2rem 0.32rem;
  gap: 0.1rem;
}

.crm-shell--chats .crm-chat-event__head strong {
  font-size: 0.6rem;
}

.crm-shell--chats .crm-chat-event p {
  font-size: 0.62rem;
}

.crm-shell--chats .crm-conversation-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  border-radius: 9px;
  padding: 0.24rem 0.3rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(246, 250, 255, 0.98) 100%);
  backdrop-filter: blur(6px);
}

.crm-shell--chats .crm-reply-form {
  gap: 0.12rem;
}

.crm-shell--chats .crm-reply-form textarea {
  min-height: 76px;
  max-height: 194px;
  border-radius: 8px;
  font-size: 0.72rem;
  padding: 0.34rem 0.46rem;
}

.crm-shell--chats .crm-reply-attachments-preview[hidden] {
  display: none;
}

.crm-shell--chats .crm-reply-attachments-preview {
  display: grid;
  gap: 0.22rem;
  padding: 0.34rem;
  border: 1px dashed #b7cce3;
  border-radius: 9px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: #244866;
}

.crm-shell--chats .crm-reply-attachments-preview__head,
.crm-shell--chats .crm-reply-attachments-preview__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
}

.crm-shell--chats .crm-reply-attachments-preview__head strong {
  font-size: 0.64rem;
}

.crm-shell--chats .crm-reply-attachments-preview__head span,
.crm-shell--chats .crm-reply-attachments-preview p,
.crm-shell--chats .crm-reply-attachments-preview__item small {
  margin: 0;
  font-size: 0.55rem;
  color: #5c7894;
}

.crm-shell--chats .crm-reply-attachments-preview__items {
  display: grid;
  gap: 0.18rem;
}

.crm-shell--chats .crm-reply-attachments-preview__item {
  min-width: 0;
  justify-content: flex-start;
  padding: 0.24rem;
  border: 1px solid #d5e4f3;
  border-radius: 8px;
  background: #ffffff;
}

.crm-shell--chats .crm-reply-attachments-preview__item img,
.crm-shell--chats .crm-reply-attachments-preview__item audio,
.crm-shell--chats .crm-reply-attachments-preview__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 7px;
  object-fit: cover;
  background: #e7f0fb;
}

.crm-shell--chats .crm-reply-attachments-preview__item audio {
  background: #edf5ff;
}

.crm-shell--chats .crm-reply-attachments-preview__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #426484;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
}

.crm-shell--chats .crm-reply-attachments-preview__item div {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.crm-shell--chats .crm-reply-attachments-preview__item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.62rem;
}

.crm-shell--chats .crm-reply-attachments-preview__remove {
  margin-left: auto;
  border: 1px solid #cbdced;
  border-radius: 999px;
  background: #f7fbff;
  color: #285477;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.12rem 0.34rem;
  cursor: pointer;
}

.crm-shell--chats .crm-reply-attachments-preview__remove:hover,
.crm-shell--chats .crm-reply-attachments-preview__remove:focus-visible {
  border-color: #8fb4dc;
  background: #eaf4ff;
}

.crm-shell--chats .crm-reply-audio-recorder[hidden] {
  display: none;
}

.crm-shell--chats .crm-reply-audio-recorder {
  display: grid;
  gap: 0.28rem;
  padding: 0.34rem 0.4rem;
  border: 1px dashed #d4b37b;
  border-radius: 9px;
  background: linear-gradient(180deg, #fffaf1 0%, #fff3df 100%);
  color: #6e4c1b;
}

.crm-shell--chats .crm-reply-audio-recorder__state,
.crm-shell--chats .crm-reply-audio-recorder__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.crm-shell--chats .crm-reply-audio-recorder__state strong {
  font-size: 0.66rem;
}

.crm-shell--chats .crm-reply-audio-recorder__state span,
.crm-shell--chats .crm-reply-audio-recorder__error {
  margin: 0;
  font-size: 0.56rem;
  color: #8b5f24;
}

.crm-shell--chats .crm-reply-shortcuts-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.16rem 0.34rem;
  border: 1px solid #ccdbec;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
  color: #3f5f7f;
  font-size: 0.53rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 14px rgba(19, 45, 80, 0.12);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.crm-shell--chats .crm-reply-shortcuts-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.crm-shell--chats .crm-reply-hints {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.26rem;
  font-size: 0.53rem;
  color: #6a8096;
}

.crm-shell--chats .crm-reply-hints__draft {
  padding: 0.1rem 0.26rem;
  border: 1px solid #d8e5f2;
  border-radius: 999px;
  background: #f8fbff;
  color: #4f6b87;
  white-space: nowrap;
}

.crm-shell--chats .crm-reply-hints__draft.is-restored {
  border-color: #91b6df;
  background: #eaf3ff;
  color: #1f4f81;
  font-weight: 600;
}

.crm-shell--chats .crm-reply-hints__keys {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-shell--chats .crm-reply-hints__count {
  justify-self: end;
  font-variant-numeric: tabular-nums;
  color: #5c758e;
}

.crm-shell--chats .crm-reply-hints__count.is-warning {
  color: #b14a2c;
  font-weight: 600;
}

.crm-shell--chats .crm-reply-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.12rem;
}

.crm-shell--chats .crm-reply-toolbar .button {
  min-height: 24px;
  font-size: 0.58rem;
  padding: 0.1rem 0.28rem;
}

.crm-shell--chats .crm-chat-msg,
.crm-shell--chats .crm-conv-item,
.crm-shell--chats .crm-reply-toolbar .button {
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.crm-shell--chats .crm-reply-toolbar__actions .button--primary {
  min-width: 94px;
}

.crm-shell--chats .crm-reply-record-button {
  white-space: nowrap;
}

.crm-shell--chats .crm-conversation-side {
  gap: 0.24rem;
}

.crm-shell--chats .crm-side-card {
  border-radius: 10px;
  padding: 0.4rem 0.44rem;
  gap: 0.24rem;
  box-shadow: 0 5px 12px rgba(15, 40, 74, 0.07);
}

.crm-shell--chats .crm-side-card__head h4 {
  font-size: 0.74rem;
}

.crm-shell--chats .crm-side-chip-line {
  gap: 0.08rem;
}

.crm-shell--chats .crm-side-micro-chip {
  min-height: 18px;
  font-size: 0.49rem;
  padding-inline: 0.2rem;
  border-radius: 4px;
}

.crm-shell--chats .crm-side-pair-list {
  gap: 0.16rem;
}

.crm-shell--chats .crm-side-pair-list li {
  padding: 0.16rem 0.22rem;
  border-radius: 7px;
  border: 1px solid #dce6f3;
  background: #f8fbff;
}

.crm-shell--chats .crm-side-pair-list span {
  font-size: 0.52rem;
}

.crm-shell--chats .crm-side-pair-list strong {
  font-size: 0.62rem;
}

.crm-shell--chats .crm-side-data-grid {
  gap: 0.18rem;
}

.crm-shell--chats .crm-side-data-grid article {
  border-radius: 8px;
  border: 1px solid #dce6f3;
  background: #f8fbff;
  padding: 0.2rem 0.24rem;
}

.crm-shell--chats .crm-side-data-grid span {
  font-size: 0.53rem;
}

.crm-shell--chats .crm-side-data-grid strong {
  font-size: 0.64rem;
}

.crm-shell--chats .crm-side-data-grid small {
  font-size: 0.55rem;
}

.crm-shell--chats .crm-side-mini-timeline {
  gap: 0.14rem;
}

.crm-shell--chats .crm-side-mini-timeline__item {
  padding: 0.18rem 0.22rem;
}

.crm-shell--chats .crm-side-quick-actions {
  gap: 0.16rem;
}

.crm-shell--chats .crm-side-quick-actions .button {
  min-height: 24px;
  font-size: 0.58rem;
}

.crm-shell--chats .crm-context-mini {
  gap: 0.16rem;
}

.crm-shell--chats .crm-context-mini__head strong {
  font-size: 0.78rem;
}

.crm-shell--chats .crm-context-mini__head p {
  font-size: 0.62rem;
}

.crm-shell--chats .crm-context-mini__list {
  gap: 0.1rem;
}

.crm-shell--chats .crm-context-mini__list li {
  padding: 0.16rem 0.24rem;
  border-radius: 7px;
}

.crm-shell--chats .crm-context-mini__list span {
  font-size: 0.52rem;
}

.crm-shell--chats .crm-context-mini__list strong {
  font-size: 0.62rem;
}

.crm-shell--chats .crm-agent-drawer {
  border-radius: 12px;
  padding: 0.42rem 0.46rem;
}

.crm-shell--chats .crm-agent-tabs .button {
  min-height: 26px;
  font-size: 0.62rem;
}

.crm-shell--chats .crm-quick-chip {
  min-height: 28px;
  font-size: 0.62rem;
}

.crm-shell--chats .button {
  border-radius: 7px;
}

.crm-shell--chats .button--small {
  min-height: 24px;
}

.crm-shell--chats .crm-detail--focus .crm-conversation-summary {
  display: none;
}

.crm-shell--chats .crm-detail--focus .crm-conversation-stage {
  grid-template-columns: minmax(0, 1fr);
}

.crm-shell--chats .crm-detail--focus .crm-chat-shell {
  min-height: calc(100vh - 196px);
}

@media (max-width: 1540px) {
  .crm-shell--chats .crm-layout {
    grid-template-columns: minmax(312px, 348px) minmax(0, 1fr);
  }

  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: minmax(0, 1fr) minmax(268px, 308px);
  }

  .crm-shell--chats .crm-conv-item__bottom {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 0.08rem;
  }

  .crm-shell--chats .crm-conv-item__meta {
    text-align: left;
  }

  .crm-shell--chats .crm-reply-hints {
    grid-template-columns: auto auto;
    gap: 0.18rem 0.26rem;
  }

  .crm-shell--chats .crm-reply-shortcuts-tooltip {
    font-size: 0.5rem;
    white-space: normal;
  }

  .crm-shell--chats .crm-reply-hints__keys {
    grid-column: 1 / -1;
    white-space: normal;
    line-height: 1.2;
  }
}

@media (max-width: 1280px) {
  .crm-shell--chats .crm-layout {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: 1fr;
  }
}

/* Hotfix operativo: chat con refresco silencioso y composer siempre visible. */
.crm-shell--chats .crm-section-panel--chat-core {
  height: min(760px, calc(100vh - 286px));
  min-height: 560px;
  overflow: hidden;
  display: grid;
}

.crm-shell--chats .crm-detail {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.crm-shell--chats .crm-conversation-stage,
.crm-shell--chats .crm-conversation-main {
  min-height: 0;
}

.crm-shell--chats .crm-conversation-stage {
  height: 100%;
}

.crm-shell--chats .crm-conversation-main {
  display: grid;
}

.crm-shell--chats .crm-chat-shell {
  min-height: 0;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  position: relative;
}

.crm-shell--chats .crm-chat-stream {
  min-height: 0;
  max-height: none;
}

.crm-shell--chats .crm-conversation-actions {
  position: sticky;
  bottom: 0;
}

.crm-shell--chats .crm-scroll-latest {
  position: absolute;
  right: 1rem;
  bottom: 7.1rem;
  z-index: 4;
  border: 1px solid #b9d2f3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0b5fb9;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.34rem 0.68rem;
  box-shadow: 0 12px 28px rgba(28, 79, 140, 0.16);
  cursor: pointer;
}

.crm-shell--chats .crm-scroll-latest[hidden] {
  display: none;
}

.crm-shell--chats .crm-side-card--ai-state {
  border-color: #c8dcf8;
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 34%);
}

.crm-shell--chats .crm-ai-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
  margin-top: 0.42rem;
}

.crm-shell--chats .crm-ai-state-grid article {
  border: 1px solid #d9e6f6;
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.88);
  padding: 0.38rem 0.48rem;
}

.crm-shell--chats .crm-ai-state-grid__wide {
  grid-column: 1 / -1;
}

.crm-shell--chats .crm-ai-state-grid span {
  display: block;
  color: #6881a2;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.crm-shell--chats .crm-ai-state-grid strong {
  display: block;
  color: #16385f;
  font-size: 0.83rem;
  line-height: 1.26;
  margin-top: 0.12rem;
}

.crm-shell--chats .crm-ai-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.46rem;
}

.crm-shell--chats .crm-conversation-side {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 0.12rem;
}

@media (max-width: 1280px) {
  .crm-shell--chats .crm-section-panel--chat-core {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .crm-shell--chats .crm-detail,
  .crm-shell--chats .crm-conversation-stage,
  .crm-shell--chats .crm-chat-shell {
    height: auto;
  }
}

/* Cliente 360 + Timeline unificada */
@media (min-width: 1281px) {
  body.crm-chats-active .content-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  body.crm-chats-active .page-content {
    height: calc(100vh - 92px);
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0.72rem;
  }

  body.crm-chats-active .crm-shell--chats {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.crm-chats-active .crm-shell--chats .crm-layout {
    height: 100%;
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
  }

  body.crm-chats-active .crm-shell--chats .crm-column--inbox {
    position: static;
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }

  body.crm-chats-active .crm-shell--chats .crm-conv-list {
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: auto;
  }

  body.crm-chats-active .crm-shell--chats .crm-section-shell,
  body.crm-chats-active .crm-shell--chats .crm-section-content,
  body.crm-chats-active .crm-shell--chats .crm-section-panel--chat-core {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.crm-chats-active .crm-shell--chats .crm-detail {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  body.crm-chats-active .crm-shell--chats .crm-conversation-stage,
  body.crm-chats-active .crm-shell--chats .crm-conversation-main,
  body.crm-chats-active .crm-shell--chats .crm-chat-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.crm-chats-active .crm-shell--chats .crm-chat-shell {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body.crm-chats-active .crm-shell--chats .crm-chat-stream {
    max-height: none;
    min-height: 0;
    overflow: auto;
  }

  body.crm-chats-active .crm-shell--chats .crm-conversation-actions {
    position: relative;
    bottom: auto;
  }

  body.crm-chats-active .crm-shell--chats .crm-conversation-side {
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: auto;
  }
}

.crm-section-panel--customer .crm-customer360-shell {
  display: grid;
  gap: 0.52rem;
}

.crm-section-panel--customer .crm-customer360-master {
  border: 1px solid #d8e4f3;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 56%);
  padding: 0.56rem 0.62rem;
  display: grid;
  gap: 0.5rem;
  box-shadow: 0 8px 18px rgba(14, 36, 64, 0.06);
}

.crm-section-panel--customer .crm-customer360-master__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.52rem;
}

.crm-section-panel--customer .crm-customer360-identity h4 {
  margin: 0;
  font-size: 0.88rem;
  color: #153a5d;
}

.crm-section-panel--customer .crm-customer360-identity p {
  margin: 0.18rem 0 0;
  color: #5b7089;
  font-size: 0.7rem;
}

.crm-section-panel--customer .crm-customer360-badges {
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.crm-section-panel--customer .crm-customer360-owner {
  border: 1px solid #d7e2f0;
  border-radius: 10px;
  background: #f6faff;
  padding: 0.38rem 0.46rem;
  min-width: 220px;
  display: grid;
  gap: 0.08rem;
}

.crm-section-panel--customer .crm-customer360-owner span {
  font-size: 0.61rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #5d748d;
}

.crm-section-panel--customer .crm-customer360-owner strong {
  font-size: 0.76rem;
  color: #183a5c;
}

.crm-section-panel--customer .crm-customer360-owner small {
  font-size: 0.66rem;
  color: #5d748d;
}

.crm-section-panel--customer .crm-customer360-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.3rem;
}

.crm-section-panel--customer .crm-customer360-kpi {
  border: 1px solid #dbe6f3;
  border-radius: 9px;
  background: #ffffff;
  padding: 0.32rem 0.4rem;
  display: grid;
  gap: 0.08rem;
}

.crm-section-panel--customer .crm-customer360-kpi span {
  font-size: 0.61rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #5d748d;
}

.crm-section-panel--customer .crm-customer360-kpi strong {
  font-size: 0.79rem;
  color: #173f64;
}

.crm-section-panel--customer .crm-customer360-kpi small {
  font-size: 0.64rem;
  color: #5f778f;
}

.crm-section-panel--customer .crm-customer360-master__footer {
  border-top: 1px dashed #d9e4f3;
  padding-top: 0.34rem;
  display: grid;
  gap: 0.16rem;
}

.crm-section-panel--customer .crm-customer360-master__footer p {
  margin: 0;
  font-size: 0.68rem;
  color: #4f657f;
}

.crm-section-panel--customer .crm-customer360-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.22fr) minmax(340px, 1fr);
  gap: 0.46rem;
  align-items: start;
}

.crm-section-panel--customer .crm-customer360-timeline,
.crm-section-panel--customer .crm-customer360-tabs {
  border: 1px solid #d8e4f3;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.5rem 0.56rem;
  box-shadow: 0 7px 16px rgba(14, 35, 62, 0.05);
}

.crm-section-panel--customer .crm-customer360-timeline__head,
.crm-section-panel--customer .crm-customer360-tabs__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.42rem;
  margin-bottom: 0.4rem;
}

.crm-section-panel--customer .crm-customer360-timeline__head h4,
.crm-section-panel--customer .crm-customer360-tabs__head h4 {
  margin: 0;
  font-size: 0.82rem;
  color: #19486f;
}

.crm-section-panel--customer .crm-customer360-timeline__head .muted-copy,
.crm-section-panel--customer .crm-customer360-tabs__head .muted-copy {
  margin: 0.16rem 0 0;
  font-size: 0.67rem;
  color: #627a93;
}

.crm-section-panel--customer .crm-customer360-filterstack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: flex-end;
}

.crm-section-panel--customer .crm-customer360-filter {
  display: grid;
  gap: 0.1rem;
  min-width: 164px;
}

.crm-section-panel--customer .crm-customer360-filter span {
  font-size: 0.62rem;
  color: #607890;
  text-transform: uppercase;
  letter-spacing: 0.015em;
}

.crm-section-panel--customer .crm-customer360-filter input,
.crm-section-panel--customer .crm-customer360-filter select {
  border: 1px solid #d2dfef;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0.26rem 0.44rem;
  font-size: 0.69rem;
}

.crm-section-panel--customer .crm-customer360-timeline__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 0.34rem;
}

.crm-section-panel--customer .crm-timeline-list {
  display: grid;
  gap: 0.24rem;
}

.crm-section-panel--customer .crm-timeline-list li {
  border: 1px solid #dce7f3;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.34rem 0.42rem;
}

.crm-section-panel--customer .crm-timeline-list li header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.34rem;
  margin-bottom: 0.18rem;
}

.crm-section-panel--customer .crm-timeline-list li header strong {
  color: #184263;
  font-size: 0.71rem;
}

.crm-section-panel--customer .crm-timeline-list li header time {
  font-size: 0.63rem;
  color: #637c95;
}

.crm-section-panel--customer .crm-timeline-item__head-aside {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.crm-section-panel--customer .crm-timeline-actor {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  border-radius: 999px;
  border: 1px solid #d5e2f2;
  background: #f4f8fd;
  color: #3f5e7f;
  font-size: 0.56rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.05rem 0.34rem;
  white-space: nowrap;
}

.crm-section-panel--customer .crm-timeline-actor--ia {
  border-color: #c5d7f4;
  background: #eef4fe;
  color: #2b5f9b;
}

.crm-section-panel--customer .crm-timeline-actor--humano {
  border-color: #d8e8d8;
  background: #f1faf1;
  color: #2f6841;
}

.crm-section-panel--customer .crm-timeline-actor--sistema {
  border-color: #e0e6ef;
  background: #f8fafd;
  color: #5f7186;
}

.crm-section-panel--customer .crm-timeline-list li p {
  font-size: 0.69rem;
  color: #334b63;
}

.crm-section-panel--customer .crm-timeline-item__reason {
  margin-top: 0.12rem;
  font-size: 0.64rem;
  color: #51697f;
}

.crm-section-panel--customer .crm-timeline-item__actions {
  margin-top: 0.16rem;
}

.crm-section-panel--customer .crm-timeline-item__actions .button {
  min-height: 22px;
  padding: 0.08rem 0.36rem;
  font-size: 0.59rem;
}

.crm-section-panel--customer .crm-timeline-item__meta span {
  font-size: 0.6rem;
  padding: 0.06rem 0.34rem;
}

.crm-section-panel--customer .crm-customer360-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-bottom: 0.38rem;
}

.crm-section-panel--customer .crm-domain-card {
  border: 1px solid #d9e5f3;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.42rem 0.48rem;
  display: grid;
  gap: 0.34rem;
}

.crm-section-panel--customer .crm-domain-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3rem;
}

.crm-section-panel--customer .crm-domain-card__head h5 {
  margin: 0;
  font-size: 0.79rem;
  color: #174a73;
}

.crm-section-panel--customer .crm-domain-card__head span {
  font-size: 0.64rem;
  color: #5f778f;
}

.crm-section-panel--customer .crm-domain-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.24rem 0.34rem;
}

.crm-section-panel--customer .crm-domain-facts div {
  display: grid;
  gap: 0.04rem;
}

.crm-section-panel--customer .crm-domain-facts dt {
  font-size: 0.61rem;
  text-transform: uppercase;
  color: #617a93;
  letter-spacing: 0.02em;
}

.crm-section-panel--customer .crm-domain-facts dd {
  margin: 0;
  font-size: 0.7rem;
  color: #2e465f;
}

.crm-section-panel--customer .crm-domain-kpis {
  display: grid;
  gap: 0.2rem;
}

.crm-section-panel--customer .crm-domain-kpis p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.2rem;
  font-size: 0.69rem;
  color: #34506b;
}

.crm-section-panel--customer .crm-domain-kpis p strong {
  color: #153c61;
}

.crm-section-panel--customer .crm-domain-kpis p span {
  color: #5f7690;
  text-align: right;
}

.crm-section-panel--customer .crm-domain-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  overflow: hidden;
  background: #fbfdff;
}

.crm-section-panel--customer .crm-domain-table th,
.crm-section-panel--customer .crm-domain-table td {
  padding: 0.28rem 0.34rem;
  border-bottom: 1px solid #e3ecf7;
  font-size: 0.67rem;
  color: #35516d;
  vertical-align: top;
}

.crm-section-panel--customer .crm-domain-table th {
  text-align: left;
  font-size: 0.61rem;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  color: #607992;
  background: #f4f9ff;
}

.crm-section-panel--customer .crm-domain-table tbody tr:last-child td {
  border-bottom: none;
}

.crm-section-panel--customer .crm-domain-table td small {
  color: #69829a;
}

.crm-section-panel--customer .crm-domain-list,
.crm-section-panel--customer .crm-domain-inline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.crm-section-panel--customer .crm-domain-list li,
.crm-section-panel--customer .crm-domain-inline-list li {
  border: 1px solid #dce7f4;
  border-radius: 8px;
  background: #f9fcff;
  padding: 0.24rem 0.3rem;
  display: grid;
  gap: 0.04rem;
}

.crm-section-panel--customer .crm-domain-list li strong,
.crm-section-panel--customer .crm-domain-inline-list li strong {
  font-size: 0.67rem;
  color: #204666;
}

.crm-section-panel--customer .crm-domain-list li span,
.crm-section-panel--customer .crm-domain-inline-list li span {
  font-size: 0.64rem;
  color: #5c7690;
}

.crm-section-panel--customer .crm-domain-subsection {
  display: grid;
  gap: 0.2rem;
}

.crm-section-panel--customer .crm-domain-subsection h6 {
  margin: 0;
  font-size: 0.67rem;
  color: #2a4968;
}

@media (max-width: 1400px) {
  .crm-section-panel--customer .crm-customer360-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crm-section-panel--customer .crm-customer360-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .crm-section-panel--customer .crm-customer360-master__head {
    flex-direction: column;
  }

  .crm-section-panel--customer .crm-customer360-owner {
    width: 100%;
    min-width: 0;
  }

  .crm-section-panel--customer .crm-customer360-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-section-panel--customer .crm-customer360-filterstack {
    width: 100%;
  }

  .crm-section-panel--customer .crm-customer360-filter {
    min-width: 0;
    flex: 1 1 190px;
  }

  .crm-section-panel--customer .crm-domain-facts {
    grid-template-columns: 1fr;
  }
}

/* WhatsApp CRM: lectura real y operacion movil */
.crm-mobile-nav-button,
.crm-mobile-context-button,
.crm-mobile-context-close {
  display: none;
}

@media (max-width: 760px) {
  .topbar__notifications {
    order: 2;
    margin-left: 0;
  }

  .topbar-notification-dropdown {
    right: -0.35rem;
  }

  .portal-inbox-layout,
  .portal-inbox-meta-grid {
    grid-template-columns: 1fr;
  }

  .portal-message-thread__bubble {
    max-width: 100%;
  }

  body[data-view="crm-whatsapp"] .topbar {
    padding: 0.36rem 0.58rem;
    gap: 0.38rem;
  }

  body[data-view="crm-whatsapp"] .topbar__toggle {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  body[data-view="crm-whatsapp"] .topbar__headline .section-kicker {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  body[data-view="crm-whatsapp"] .topbar__headline h1 {
    margin-top: 0.04rem;
    font-size: clamp(1rem, 5vw, 1.18rem);
    line-height: 1.1;
  }

  body[data-view="crm-whatsapp"] .topbar__actions .button {
    min-height: 34px;
    padding: 0.34rem 0.54rem;
    border-radius: 12px;
    font-size: 0.76rem;
  }

  body[data-view="crm-whatsapp"] .page-content {
    padding: 0.34rem 0.42rem 0.55rem;
  }

  .crm-shell--chats {
    gap: 0.26rem;
  }

  .crm-shell--chats .crm-hero-card {
    display: none;
  }

  .crm-shell--chats .crm-brand-headline--compact .section-kicker {
    font-size: 0.58rem;
  }

  .crm-shell--chats .crm-brand-headline--compact h3 {
    font-size: 0.78rem;
  }

  .crm-shell--chats .crm-kpi-strip {
    display: none;
  }

  .crm-shell--chats .crm-layout {
    grid-template-columns: 1fr;
    gap: 0.28rem;
    min-height: calc(100dvh - 96px);
  }

  .crm-shell--chats .crm-column--inbox {
    position: relative;
    top: auto;
    height: calc(100dvh - 128px);
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }

  .crm-shell--chats .crm-column--inbox .module-card__head {
    margin-bottom: 0.2rem;
  }

  .crm-shell--chats .crm-inbox-head {
    gap: 0.28rem;
  }

  .crm-shell--chats .crm-inbox-head h3 {
    font-size: 0.94rem;
  }

  .crm-shell--chats .crm-inbox-count {
    padding: 0.14rem 0.42rem;
    font-size: 0.66rem;
  }

  .crm-shell--chats .crm-filter-form {
    gap: 0.24rem;
  }

  .crm-shell--chats .crm-filter-form__basic {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.22rem;
  }

  .crm-shell--chats .crm-filter-form__basic button,
  .crm-shell--chats .crm-filter-form__basic select {
    min-height: 34px;
    padding: 0.3rem 0.4rem;
    border-radius: 10px;
    font-size: 0.72rem;
  }

  .crm-shell--chats .crm-conv-list {
    height: calc(100dvh - 240px);
    max-height: none;
    min-height: 0;
    overflow: auto;
    padding-right: 0.12rem;
  }

  body.crm-mobile-chat-open .crm-shell--chats .crm-column--inbox {
    display: none;
  }

  body:not(.crm-mobile-chat-open) .crm-shell--chats .crm-section-shell {
    display: none;
  }

  body.crm-mobile-chat-open .crm-shell--chats .crm-section-shell {
    display: block;
  }

  .crm-shell--chats .crm-section-panel--chat-core {
    height: calc(100dvh - 96px);
    min-height: 0;
    padding: 0.18rem;
    overflow: hidden;
  }

  .crm-shell--chats .crm-detail {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .crm-shell--chats .crm-detail-head {
    position: sticky;
    top: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.24rem 0.34rem;
    padding: 0.3rem 0.36rem;
    border-radius: 12px;
    background: rgba(249, 252, 255, 0.96);
    box-shadow: 0 8px 22px rgba(19, 48, 84, 0.08);
  }

  .crm-mobile-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.26rem 0.46rem;
    border: 1px solid #c6d9f0;
    border-radius: 10px;
    background: #fff;
    color: #174a82;
    font-size: 0.7rem;
    font-weight: 800;
  }

  .crm-shell--chats .crm-detail-head__identity {
    min-width: 0;
  }

  .crm-shell--chats .crm-detail-head__identity h3 {
    font-size: 0.9rem;
  }

  .crm-shell--chats .crm-detail-head__line,
  .crm-shell--chats .crm-contact-name-hint,
  .crm-shell--chats .crm-detail-head__meta {
    display: none;
  }

  .crm-shell--chats .crm-detail-head__chips {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.16rem;
    overflow-x: auto;
    padding-bottom: 0.02rem;
  }

  .crm-shell--chats .crm-detail-head__chips .crm-pill--owner,
  .crm-shell--chats .crm-detail-head__chips .crm-focus-toggle {
    display: none;
  }

  .crm-mobile-context-button {
    display: inline-flex;
    white-space: nowrap;
  }

  .crm-shell--chats .crm-conversation-summary {
    display: none;
  }

  .crm-shell--chats .crm-conversation-stage {
    grid-template-columns: 1fr;
    height: 100%;
    min-height: 0;
    gap: 0;
  }

  .crm-shell--chats .crm-conversation-main,
  .crm-shell--chats .crm-chat-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .crm-shell--chats .crm-chat-shell {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .crm-shell--chats .crm-chat-stream {
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 0.34rem 0.22rem;
  }

  .crm-shell--chats .crm-chat-msg {
    max-width: 93%;
  }

  .crm-shell--chats .crm-message-attachment,
  .crm-shell--chats .crm-attachment-preview {
    max-width: 100%;
  }

  .crm-shell--chats .crm-conversation-actions {
    position: relative;
    bottom: auto;
    padding: 0.22rem;
    border-radius: 12px;
    box-shadow: 0 -8px 22px rgba(24, 60, 104, 0.07);
  }

  .crm-shell--chats #crmReplyBody {
    min-height: 74px;
    max-height: 134px;
    font-size: 0.82rem;
  }

  .crm-shell--chats .crm-reply-hints__keys {
    display: none;
  }

  .crm-shell--chats .crm-reply-toolbar {
    display: grid;
    gap: 0.22rem;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .crm-shell--chats .crm-reply-toolbar__tools,
  .crm-shell--chats .crm-reply-toolbar__actions {
    display: grid;
    gap: 0.18rem;
    width: 100%;
  }

  .crm-shell--chats .crm-reply-toolbar__tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-shell--chats .crm-reply-toolbar__actions {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(86px, 1fr);
  }

  .crm-shell--chats .crm-reply-toolbar .button,
  .crm-shell--chats .crm-reply-toolbar__tools button {
    min-height: 32px;
    justify-content: center;
    width: 100%;
    padding: 0.28rem 0.34rem;
    font-size: 0.68rem;
    border-radius: 10px;
    white-space: nowrap;
  }

  .crm-shell--chats #crmReplyAttachButton,
  .crm-shell--chats #crmReplyRecordButton {
    border-color: #9fc2e8;
    background: #eef7ff;
    color: #174c7c;
  }

  .crm-msg-attachment__tech {
    padding: 0.22rem 0.34rem;
  }

  .crm-msg-attachment__tech summary {
    font-size: 0.64rem;
  }

  .crm-msg-attachment__tech-body {
    max-height: 4.75rem;
  }

  .crm-msg-attachment__tech pre {
    max-height: 4.2rem;
  }

.crm-shell--chats .crm-conversation-side {
  display: none;
}

  body.crm-mobile-context-open .crm-shell--chats .crm-conversation-side {
    position: fixed;
    inset: 58px 10px 10px;
    z-index: 90;
    display: grid;
    align-content: start;
    gap: 0.34rem;
    max-height: none;
    overflow: auto;
    padding: 0.48rem;
    border: 1px solid #c8d9ef;
    border-radius: 16px;
    background: #f8fbff;
    box-shadow: 0 22px 60px rgba(10, 32, 64, 0.26);
  }

  .crm-mobile-context-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    min-height: 30px;
    padding: 0.22rem 0.48rem;
    border: 1px solid #cbdcf1;
    border-radius: 999px;
    background: #fff;
    color: #204b79;
    font-size: 0.68rem;
    font-weight: 800;
  }
}

/* Chat operacion diaria: menos parpadeo, mas espacio y acciones claras. */
.crm-shell--chats .crm-conversation-stage {
  position: relative;
}

.crm-shell--chats .crm-chat-stream {
  overflow-anchor: none;
}

.crm-shell--chats .crm-ai-state-peek {
  position: absolute;
  top: 50%;
  right: -0.42rem;
  z-index: 8;
  transform: translate(50%, -50%);
  width: 34px;
  min-height: 86px;
  border: 1px solid #b7cbe6;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #eaf4ff 100%);
  color: #174676;
  box-shadow: 0 10px 24px rgba(15, 53, 92, 0.18);
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.crm-shell--chats .crm-ai-state-peek.is-open {
  background: linear-gradient(180deg, #156dcc 0%, #0c4f9d 100%);
  border-color: #0c4f9d;
  color: #ffffff;
}

.crm-shell--chats .crm-side-card--ai-state[hidden] {
  display: none !important;
}

.crm-shell--chats .crm-reply-hints__draft:empty,
.crm-shell--chats .crm-reply-hints__keys {
  display: none;
}

.crm-shell--chats .crm-reply-record-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
}

.crm-shell--chats .crm-reply-record-button .material-symbols-rounded {
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 1100px) {
  .crm-shell--chats .crm-ai-state-peek {
    right: 0.28rem;
    min-height: 52px;
    width: 32px;
  }
}

/* Chat operacion diaria v2: contexto completo oculto por defecto y envio sin parpadeo. */
.crm-shell--chats .crm-conversation-stage {
  grid-template-columns: minmax(0, 1fr) !important;
  position: relative;
}

.crm-shell--chats .crm-conversation-stage.has-side-open {
  grid-template-columns: minmax(0, 1fr) minmax(286px, 324px) !important;
}

.crm-shell--chats .crm-conversation-side[hidden] {
  display: none !important;
}

.crm-shell--chats .crm-side-panel-peek {
  position: absolute;
  top: 50%;
  right: -0.44rem;
  z-index: 12;
  transform: translate(50%, -50%);
  min-height: 86px;
  width: 34px;
  border: 1px solid #c9d9ee;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  color: #0b4ea2;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
  cursor: pointer;
}

.crm-shell--chats .crm-side-panel-peek.is-open {
  background: linear-gradient(180deg, #156dcc 0%, #0c4f9d 100%);
  border-color: #0c4f9d;
  color: #ffffff;
}

@media (max-width: 1100px) {
  .crm-shell--chats .crm-side-panel-peek {
    right: 0.24rem;
    min-height: 72px;
    width: 32px;
  }

  body.crm-mobile-context-open .crm-shell--chats .crm-conversation-side {
    display: grid !important;
  }

  body.crm-mobile-context-open .crm-shell--chats .crm-conversation-side[hidden] {
    display: none !important;
  }
}

/* Chat operacion diaria v5: bandeja con busqueda visible y composer mas liviano. */
.crm-shell--chats .crm-inbox-searchbar {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
  width: 100%;
  margin: 0.52rem 0 0.48rem;
  padding: 0.46rem 0.55rem;
  border: 1px solid #c8dbf3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 6px 14px rgba(13, 57, 108, 0.06);
}

.crm-shell--chats .crm-inbox-searchbar .material-symbols-rounded {
  color: #2563a7;
  font-size: 1.08rem;
  line-height: 1;
}

.crm-shell--chats .crm-inbox-searchbar input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #10243d;
  font-size: 0.9rem;
  font-weight: 650;
}

.crm-shell--chats .crm-inbox-searchbar input::placeholder {
  color: #7890ad;
  font-weight: 600;
}

.crm-shell--chats .crm-inbox-searchbar button {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid #d8e4f3;
  border-radius: 999px;
  background: #f5f9ff;
  color: #32516f;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.crm-shell--chats .crm-inbox-searchbar button[hidden] {
  display: none !important;
}

.crm-shell--chats .crm-filter-form__basic {
  grid-template-columns: minmax(8.5rem, 1fr) minmax(8.5rem, 1fr) minmax(8.5rem, 1fr) auto auto;
  align-items: center;
  gap: 0.38rem;
}

.crm-shell--chats .crm-filter-form__basic select,
.crm-shell--chats .crm-filter-form__basic button {
  min-height: 2.32rem;
}

.crm-shell--chats .crm-conv-list {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.crm-shell--chats .crm-conv-item {
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 86px;
  transform: none !important;
  transition: background-color 120ms ease, border-color 120ms ease !important;
}

.crm-shell--chats .crm-conv-item:hover {
  transform: none !important;
}

.crm-shell--chats .crm-chat-msg {
  contain: layout paint style;
  transition: none !important;
}

.crm-shell--chats .crm-reply-form textarea {
  contain: layout paint style;
  box-shadow: none;
  transition: border-color 120ms ease, background-color 120ms ease !important;
}

.crm-shell--chats .crm-reply-form textarea:focus {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 167, 0.18);
}

@media (max-width: 760px) {
  .crm-shell--chats .crm-filter-form__basic {
    grid-template-columns: 1fr;
  }

  .crm-shell--chats .crm-inbox-searchbar {
    margin-top: 0.4rem;
    border-radius: 14px;
  }
}

/* Bandeja WhatsApp v7: mas aire util, filtros compactos y tarjetas legibles. */
.crm-shell--chats .crm-layout {
  grid-template-columns: clamp(405px, 27vw, 482px) minmax(0, 1fr) !important;
  gap: 0.42rem !important;
}

.crm-shell--chats .crm-column--inbox {
  padding: 0.58rem 0.62rem !important;
  border-radius: 20px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96)),
    #ffffff;
  border-color: #cfe0f5 !important;
}

.crm-shell--chats .crm-column--inbox .module-card__head {
  margin-bottom: 0.18rem !important;
  padding-bottom: 0 !important;
}

.crm-shell--chats .crm-inbox-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem !important;
  align-items: center;
}

.crm-shell--chats .crm-inbox-head .section-kicker {
  font-size: 0.58rem !important;
  line-height: 1;
  letter-spacing: 0.08em;
}

.crm-shell--chats .crm-inbox-head h3 {
  margin: 0.02rem 0 0 !important;
  font-size: 0.92rem !important;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.crm-shell--chats .crm-inbox-count {
  justify-self: end;
  padding: 0.14rem 0.5rem !important;
  max-width: 9.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.64rem !important;
  font-weight: 800;
}

.crm-shell--chats .crm-inbox-searchbar {
  min-height: 2.42rem;
  margin: 0.42rem 0 0.34rem !important;
  padding: 0.38rem 0.5rem !important;
  border-radius: 14px !important;
  border-color: #b9d3f2 !important;
  box-shadow: 0 8px 18px rgba(20, 71, 128, 0.08) !important;
}

.crm-shell--chats .crm-inbox-searchbar input {
  font-size: 0.84rem !important;
}

.crm-shell--chats .crm-filter-form {
  margin: 0 0 0.42rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  gap: 0.28rem !important;
}

.crm-shell--chats .crm-filter-form__basic {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1.05fr) minmax(0, 1.1fr) auto auto !important;
  gap: 0.26rem !important;
}

.crm-shell--chats .crm-filter-form__basic select,
.crm-shell--chats .crm-filter-form__basic button {
  min-height: 2rem !important;
  height: 2rem;
  border-radius: 11px !important;
  font-size: 0.68rem !important;
  font-weight: 750;
}

.crm-shell--chats .crm-filter-form__basic select {
  padding: 0.22rem 0.38rem !important;
}

.crm-shell--chats .crm-filter-form__basic button {
  padding: 0.18rem 0.48rem !important;
}

.crm-shell--chats .crm-filter-advanced {
  border-radius: 12px !important;
  background: rgba(247, 251, 255, 0.76) !important;
}

.crm-shell--chats .crm-filter-advanced summary {
  padding: 0.28rem 0.42rem !important;
  font-size: 0.66rem !important;
}

.crm-shell--chats .crm-conv-list {
  gap: 0.24rem !important;
  max-height: calc(100vh - 322px) !important;
  min-height: clamp(380px, 58vh, 680px) !important;
  padding: 0.04rem 0.14rem 0.3rem 0.02rem;
}

.crm-shell--chats .crm-conv-item {
  min-height: 5.35rem;
  padding: 0.46rem 0.54rem !important;
  gap: 0.18rem !important;
  border-radius: 15px !important;
  background: #ffffff !important;
  border-color: #d5e3f6 !important;
}

.crm-shell--chats .crm-conv-item.is-active {
  background: linear-gradient(180deg, #edf6ff 0%, #f7fbff 100%) !important;
  border-color: #73a7e6 !important;
  box-shadow: inset 0 0 0 1px rgba(70, 126, 205, 0.18), 0 8px 18px rgba(26, 75, 136, 0.12) !important;
}

.crm-shell--chats .crm-conv-item__top {
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 0.28rem !important;
}

.crm-shell--chats .crm-conv-item__name {
  font-size: 0.82rem !important;
  font-weight: 850 !important;
  letter-spacing: -0.006em;
}

.crm-shell--chats .crm-contact-name-source {
  min-height: 1.05rem;
  padding: 0.03rem 0.3rem;
  font-size: 0.52rem;
}

.crm-shell--chats .crm-conv-item__time-wrap time {
  font-size: 0.57rem !important;
  font-weight: 700;
}

.crm-shell--chats .crm-conv-unread {
  min-width: 1.05rem !important;
  height: 1.05rem !important;
  font-size: 0.52rem !important;
}

.crm-shell--chats .crm-conv-item__subline {
  font-size: 0.6rem !important;
  color: #59728d !important;
}

.crm-shell--chats .crm-conv-item__snippet {
  font-size: 0.72rem !important;
  line-height: 1.22 !important;
  color: #1f3e5e !important;
  -webkit-line-clamp: 2;
}

.crm-shell--chats .crm-conv-item__bottom {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.08rem !important;
}

.crm-shell--chats .crm-conv-item__statusline {
  gap: 0.12rem !important;
  flex-wrap: nowrap !important;
}

.crm-shell--chats .crm-conv-item__meta {
  display: none !important;
}

.crm-shell--chats .crm-conv-item .status-badge,
.crm-shell--chats .crm-conv-item .crm-pill {
  min-height: 1.05rem !important;
  padding: 0.07rem 0.34rem !important;
  font-size: 0.52rem !important;
  line-height: 1;
}

@media (max-width: 1580px) {
  .crm-shell--chats .crm-layout {
    grid-template-columns: clamp(370px, 30vw, 430px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 1320px) {
  .crm-shell--chats .crm-layout {
    grid-template-columns: 1fr !important;
  }

  .crm-shell--chats .crm-conv-list {
    max-height: 46vh !important;
    min-height: 300px !important;
  }
}

@media (max-width: 760px) {
  .crm-shell--chats .crm-column--inbox {
    padding: 0.46rem !important;
    border-radius: 16px !important;
  }

  .crm-shell--chats .crm-filter-form__basic {
    grid-template-columns: 1fr 1fr !important;
  }

  .crm-shell--chats .crm-filter-form__basic select:first-child {
    grid-column: 1 / -1;
  }

  .crm-shell--chats .crm-conv-list {
    height: calc(100dvh - 232px) !important;
    max-height: none !important;
  }
}

/* Bandeja WhatsApp v8: mas conversaciones visibles y ancho fluido para pantallas grandes. */
.crm-shell--chats .crm-inbox-head h3 {
  font-size: 0.84rem !important;
  line-height: 1.04 !important;
}

.crm-shell--chats .crm-inbox-searchbar {
  min-height: 2.28rem !important;
  margin: 0.34rem 0 0.28rem !important;
}

.crm-shell--chats .crm-filter-form__basic {
  grid-template-columns: minmax(126px, 0.9fr) minmax(126px, 0.95fr) minmax(136px, 1.02fr) auto auto !important;
  gap: 0.22rem !important;
}

.crm-shell--chats .crm-conv-list {
  scrollbar-gutter: stable;
  gap: 0.18rem !important;
  padding-right: 0.18rem !important;
}

.crm-shell--chats .crm-conv-item {
  min-height: 4.35rem !important;
  padding: 0.34rem 0.46rem !important;
  gap: 0.13rem !important;
}

.crm-shell--chats .crm-conv-item__name {
  font-size: 0.78rem !important;
}

.crm-shell--chats .crm-conv-item__subline {
  font-size: 0.58rem !important;
}

.crm-shell--chats .crm-conv-item__snippet {
  font-size: 0.69rem !important;
  line-height: 1.2 !important;
}

.crm-shell--chats .crm-conv-item .status-badge,
.crm-shell--chats .crm-conv-item .crm-pill {
  font-size: 0.5rem !important;
  padding-inline: 0.28rem !important;
}

@media (min-width: 1281px) {
  body.crm-chats-active .crm-shell--chats .crm-layout {
    grid-template-columns: clamp(500px, 31vw, 660px) minmax(0, 1fr) !important;
    gap: 0.5rem !important;
  }

  body.crm-chats-active .crm-shell--chats .crm-column--inbox {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0.5rem 0.56rem !important;
  }

  body.crm-chats-active .crm-shell--chats .crm-conv-list {
    flex: 1 1 auto;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto;
  }
}

@media (min-width: 1680px) {
  body.crm-chats-active .crm-shell--chats .crm-layout {
    grid-template-columns: clamp(560px, 32vw, 700px) minmax(0, 1fr) !important;
  }

  .crm-shell--chats .crm-filter-form__basic {
    grid-template-columns: minmax(145px, 0.92fr) minmax(145px, 0.95fr) minmax(160px, 1.05fr) auto auto !important;
  }
}

@media (min-width: 1900px) {
  body.crm-chats-active .crm-shell--chats .crm-layout {
    grid-template-columns: clamp(610px, 33vw, 760px) minmax(0, 1fr) !important;
  }
}

/* Bandeja WhatsApp v9: no recortar nombre, telefono ni ultimo mensaje. */
.crm-shell--chats .crm-conv-item {
  min-height: 5.25rem !important;
  overflow: visible !important;
  content-visibility: visible !important;
  contain: layout paint !important;
  contain-intrinsic-size: auto !important;
  padding-block: 0.42rem !important;
}

.crm-shell--chats .crm-conv-item__top,
.crm-shell--chats .crm-conv-item__name-wrap {
  min-width: 0;
}

.crm-shell--chats .crm-conv-item__name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-shell--chats .crm-conv-item__subline {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.18 !important;
}

.crm-shell--chats .crm-conv-item__snippet {
  display: -webkit-box;
  min-height: 1.62em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.22 !important;
}

.crm-shell--chats .crm-conv-item__bottom {
  min-height: 1.16rem;
}

.crm-shell--chats .crm-conv-item__statusline {
  flex-wrap: wrap !important;
  overflow: hidden;
  row-gap: 0.08rem !important;
}

/* Caja + HotSpot UX profesional 2026-05-02 */
.topbar-compact-actions {
  gap: 0.42rem;
  flex-wrap: nowrap;
}

.topbar-compact-actions .button {
  min-height: 34px;
  padding: 0.48rem 0.72rem;
  border-radius: 8px;
  box-shadow: none;
  white-space: nowrap;
}

body[data-view^="caja"] .module-shell,
body[data-view^="hotspot"] .module-shell,
body[data-view="crear-fichas"] .module-shell,
body[data-view="puntos-venta"] .module-shell,
body[data-view="corte-caja"] .module-shell {
  gap: 0.72rem;
}

body[data-view^="caja"] .module-card,
body[data-view^="hotspot"] .module-card,
body[data-view="crear-fichas"] .module-card,
body[data-view="puntos-venta"] .module-card,
body[data-view="corte-caja"] .module-card {
  padding: 0.95rem;
  border-radius: 8px;
  border-color: #d7e0ec;
  box-shadow: 0 10px 26px rgba(9, 30, 66, 0.055);
}

body[data-view^="caja"] .module-card__head,
body[data-view^="hotspot"] .module-card__head,
body[data-view="crear-fichas"] .module-card__head,
body[data-view="puntos-venta"] .module-card__head,
body[data-view="corte-caja"] .module-card__head {
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

body[data-view^="caja"] .module-card__head h3,
body[data-view^="hotspot"] .module-card__head h3,
body[data-view="crear-fichas"] .module-card__head h3,
body[data-view="puntos-venta"] .module-card__head h3,
body[data-view="corte-caja"] .module-card__head h3 {
  font-size: 1.05rem;
}

body[data-view^="caja"] .field input,
body[data-view^="caja"] .field select,
body[data-view^="caja"] .field textarea,
body[data-view^="hotspot"] .field input,
body[data-view^="hotspot"] .field select,
body[data-view^="hotspot"] .field textarea,
body[data-view="crear-fichas"] .field input,
body[data-view="crear-fichas"] .field select,
body[data-view="crear-fichas"] .field textarea,
body[data-view="puntos-venta"] .field input,
body[data-view="puntos-venta"] .field select,
body[data-view="puntos-venta"] .field textarea {
  min-height: 38px;
  border-radius: 9px;
}

body[data-view^="caja"] .field span,
body[data-view^="hotspot"] .field span,
body[data-view="crear-fichas"] .field span,
body[data-view="puntos-venta"] .field span {
  font-size: 0.76rem;
}

body[data-view^="caja"] .module-subnav.cash-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  padding: 0.42rem;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: none;
}

body[data-view^="caja"] .module-subnav.cash-subnav .button {
  min-height: 30px;
  padding: 0.34rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  line-height: 1.1;
  box-shadow: none;
}

body[data-view^="caja"] #cashFiltersPanel.toolbar-card {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  box-shadow: none;
}

body[data-view^="caja"] .cash-dashboard-panel {
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.55fr);
  gap: 0.65rem;
}

body[data-view^="caja"] .cash-status-card {
  min-height: 0;
  gap: 0.5rem;
  padding: 0.78rem;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(10, 31, 68, 0.045);
}

body[data-view^="caja"] .cash-status-card h3 {
  font-size: 1rem;
}

body[data-view^="caja"] .cash-status-card p {
  font-size: 0.82rem;
}

body[data-view^="caja"] .cash-status-card__meta {
  gap: 0.35rem;
}

body[data-view^="caja"] .cash-status-card__meta span {
  padding: 0.42rem;
  border-radius: 6px;
  font-size: 0.76rem;
}

body[data-view^="caja"] .stats-grid.module-stats.cash-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.58rem;
}

body[data-view^="caja"] .stat-card {
  min-height: 0;
  padding: 0.78rem;
  border-radius: 8px;
}

body[data-view^="caja"] .stat-card strong {
  font-size: 1.18rem;
  line-height: 1.05;
}

body[data-view^="caja"] .stat-card span:last-child {
  font-size: 0.76rem;
}

body[data-view="caja-apertura-cierre"] [data-cash-section="apertura-cierre"].module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

body[data-view="caja-apertura-cierre"] [data-cash-section="apertura-cierre"] form,
body[data-view="caja-movimientos"] #cashMovementForm {
  display: grid;
  gap: 0.62rem;
}

body[data-view="caja-apertura-cierre"] #cashClosePreview,
body[data-view="caja-apertura-cierre"] #cashCloseNotificationHint,
body[data-view="caja-movimientos"] #cashMovementRequirements {
  margin: 0 !important;
  padding: 0.62rem 0.7rem;
  border-radius: 8px;
  background: #f7fafc;
  color: #526274;
  font-size: 0.8rem;
  text-align: left;
}

body[data-view="caja-movimientos"] [data-cash-section="historial"] .module-card__head h3::after {
  content: " - tabla auditable";
  color: #6b7a90;
  font-weight: 700;
}

body[data-view^="caja"] label.field--inline,
body[data-view^="hotspot"] .hotspot-checkbox-field,
body[data-view="crear-fichas"] .hotspot-checkbox-field,
body[data-view="puntos-venta"] .hotspot-checkbox-field {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.48rem;
  min-height: 28px;
  width: fit-content;
  max-width: 100%;
  padding: 0.22rem 0.45rem;
  border: 1px solid #d9e4f1;
  border-radius: 999px;
  background: #f8fbff;
}

body[data-view^="caja"] label.field--inline input[type="checkbox"],
body[data-view^="hotspot"] .hotspot-checkbox-field input[type="checkbox"],
body[data-view="crear-fichas"] .hotspot-checkbox-field input[type="checkbox"],
body[data-view="puntos-venta"] .hotspot-checkbox-field input[type="checkbox"] {
  position: relative;
  flex: 0 0 auto;
  width: 26px !important;
  min-width: 26px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  margin: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #bcc8d7;
  box-shadow: inset 0 0 0 1px rgba(68, 84, 106, 0.18);
  cursor: pointer;
}

body[data-view^="caja"] label.field--inline input[type="checkbox"]::before,
body[data-view^="hotspot"] .hotspot-checkbox-field input[type="checkbox"]::before,
body[data-view="crear-fichas"] .hotspot-checkbox-field input[type="checkbox"]::before,
body[data-view="puntos-venta"] .hotspot-checkbox-field input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 160ms ease;
}

body[data-view^="caja"] label.field--inline input[type="checkbox"]:checked,
body[data-view^="hotspot"] .hotspot-checkbox-field input[type="checkbox"]:checked,
body[data-view="crear-fichas"] .hotspot-checkbox-field input[type="checkbox"]:checked,
body[data-view="puntos-venta"] .hotspot-checkbox-field input[type="checkbox"]:checked {
  background: #0b73d9;
}

body[data-view^="caja"] label.field--inline input[type="checkbox"]:checked::before,
body[data-view^="hotspot"] .hotspot-checkbox-field input[type="checkbox"]:checked::before,
body[data-view="crear-fichas"] .hotspot-checkbox-field input[type="checkbox"]:checked::before,
body[data-view="puntos-venta"] .hotspot-checkbox-field input[type="checkbox"]:checked::before {
  transform: translateX(10px);
}

body[data-view^="caja"] label.field--inline span,
body[data-view^="hotspot"] .hotspot-checkbox-field span,
body[data-view="crear-fichas"] .hotspot-checkbox-field span,
body[data-view="puntos-venta"] .hotspot-checkbox-field span {
  font-size: 0.73rem;
  line-height: 1.18;
}

body[data-view^="hotspot"] .hotspot-dashboard-hero,
body[data-view="crear-fichas"] .hotspot-dashboard-hero,
body[data-view="puntos-venta"] .hotspot-dashboard-hero {
  padding: 0.85rem;
  border-radius: 8px;
}

body[data-view^="hotspot"] .hotspot-flow-strip,
body[data-view="crear-fichas"] .hotspot-flow-strip {
  gap: 0.5rem;
}

body[data-view^="hotspot"] .hotspot-flow-step,
body[data-view="crear-fichas"] .hotspot-flow-step {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 0.58rem;
  border-radius: 8px;
}

body[data-view^="hotspot"] .hotspot-flow-step small,
body[data-view="crear-fichas"] .hotspot-flow-step small {
  grid-column: 2;
}

body[data-view="hotspot-routers"] .hotspot-shell--routers,
body[data-view="puntos-venta"] .hotspot-shell--points {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: 0.85rem;
  align-items: start;
}

body[data-view="hotspot-routers"] #hotspotCoreProbeResult:empty {
  display: none;
}

body[data-view="hotspot-routers"] #hotspotCoreProbeResult {
  margin-top: 0.65rem;
  border-radius: 8px;
}

body[data-view="hotspot-routers"] .hotspot-core-form {
  gap: 0.62rem;
}

body[data-view="hotspot-routers"] .hotspot-router-form-section {
  display: grid;
  gap: 0.54rem;
  padding: 0.62rem;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #fbfdff;
}

body[data-view="hotspot-routers"] .hotspot-router-form-title {
  display: grid;
  gap: 0.15rem;
}

body[data-view="hotspot-routers"] .hotspot-router-form-title strong {
  color: #102033;
  font-size: 0.92rem;
}

body[data-view="hotspot-routers"] .hotspot-router-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

body[data-view="hotspot-routers"] .hotspot-router-actions .button {
  min-height: 34px;
  padding-inline: 0.78rem;
}

body[data-view="crear-fichas"] .hotspot-shell--tickets > .module-card:first-child {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

body[data-view="crear-fichas"] #hotspotTicketsGeneratorForm .field-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

body[data-view="crear-fichas"] #hotspotTicketCreateSummary {
  align-items: center;
  min-height: 38px;
  padding: 0.55rem 0.62rem;
}

body[data-view="crear-fichas"] .hotspot-toolbar .button,
body[data-view="crear-fichas"] .hotspot-toolbar select,
body[data-view="crear-fichas"] .hotspot-toolbar input,
body[data-view="puntos-venta"] .button-row .button,
body[data-view="hotspot-routers"] .button-row .button {
  min-height: 34px;
}

body[data-view^="hotspot"] .module-table,
body[data-view="crear-fichas"] .module-table,
body[data-view="puntos-venta"] .module-table,
body[data-view^="caja"] .module-table {
  font-size: 0.82rem;
}

body[data-view^="hotspot"] .empty-state,
body[data-view="crear-fichas"] .empty-state,
body[data-view="puntos-venta"] .empty-state,
body[data-view^="caja"] .empty-state {
  border-radius: 8px;
  background: #f8fbff;
  color: #526274;
}

@media (max-width: 1100px) {
  body[data-view="hotspot-routers"] .hotspot-shell--routers,
  body[data-view="puntos-venta"] .hotspot-shell--points,
  body[data-view="caja-apertura-cierre"] [data-cash-section="apertura-cierre"].module-grid,
  body[data-view^="caja"] .cash-dashboard-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 0.42rem 0.5rem;
    padding: 0.5rem 0.62rem;
  }

  .topbar__toggle {
    grid-column: 1;
    grid-row: 1;
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .topbar__headline {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
  }

  .topbar__headline h1 {
    overflow: hidden;
    font-size: 1.08rem;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar__notifications {
    grid-column: 3;
    grid-row: 1;
    order: 0 !important;
    justify-self: end;
    margin-left: 0;
    z-index: 80;
  }

  .topbar-notification-button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .topbar-notification-badge {
    top: -4px;
    right: -4px;
  }

  .topbar-notification-dropdown {
    position: fixed;
    top: 52px;
    right: 0.5rem;
    width: min(380px, calc(100vw - 1rem));
    max-height: calc(100vh - 64px);
  }

  .topbar__actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.05rem;
  }

  .topbar__actions .button-row {
    flex-wrap: nowrap;
    gap: 0.36rem;
  }

  .topbar__actions .button,
  .hero-banner__actions .button {
    width: auto;
    min-height: 32px;
    flex: 0 0 auto;
    padding: 0.42rem 0.58rem;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .topbar__actions .topbar-compact-actions .button {
    min-height: 30px;
    padding: 0.34rem 0.5rem;
    font-size: 0.72rem;
  }

  body[data-view^="caja"] .module-subnav.cash-subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.38rem;
  }

  body[data-view^="caja"] .module-subnav.cash-subnav .button {
    flex: 0 0 auto;
    width: auto;
  }

  body[data-view^="caja"] .cash-status-card__meta,
  body[data-view="crear-fichas"] #hotspotTicketsGeneratorForm .field-grid,
  body[data-view^="hotspot"] .hotspot-flow-strip,
  body[data-view="crear-fichas"] .hotspot-flow-strip {
    grid-template-columns: 1fr;
  }

  body[data-view^="caja"] .stats-grid.module-stats.cash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-view^="caja"] .stat-card,
  body[data-view^="hotspot"] .stat-card,
  body[data-view="crear-fichas"] .stat-card,
  body[data-view="puntos-venta"] .stat-card {
    padding: 0.68rem;
  }

  body[data-view^="caja"] .stat-card strong,
  body[data-view^="hotspot"] .stat-card strong,
  body[data-view="crear-fichas"] .stat-card strong,
  body[data-view="puntos-venta"] .stat-card strong {
    font-size: 1rem;
  }

  body[data-view="hotspot-routers"] .hotspot-shell--routers,
  body[data-view="puntos-venta"] .hotspot-shell--points {
    grid-template-columns: 1fr;
  }

  body[data-view="hotspot-routers"] .hotspot-router-actions {
    justify-content: stretch;
  }

  body[data-view="hotspot-routers"] .hotspot-router-actions .button {
    min-height: 32px;
    flex: 1 1 0;
    padding-inline: 0.5rem;
  }

  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar > .button,
  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar > select,
  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar > input {
    flex: 1 1 160px;
    width: auto;
  }

  body[data-view="crear-fichas"] .hotspot-toolbar--filters,
  body[data-view="crear-fichas"] .hotspot-toolbar--bulk {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    overflow: visible;
    gap: 0.38rem;
    padding-bottom: 0;
  }

  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar--filters > .button,
  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar--bulk > .button {
    min-height: 32px;
    flex: none;
    width: 100%;
    padding: 0.34rem 0.42rem;
    font-size: 0.68rem;
    line-height: 1.15;
    white-space: normal;
  }

  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar--filters > select,
  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar--filters > input,
  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar--bulk > select {
    min-height: 32px;
    min-width: 0;
    flex: none;
    width: 100%;
    padding: 0.34rem 0.5rem;
    font-size: 0.76rem;
  }

  body[data-view="crear-fichas"] .hotspot-shell .hotspot-toolbar--bulk > select {
    grid-column: 1 / -1;
  }
}

/* P0-C hardening: exact mobile routes must not overflow or show duplicate menu controls. */
@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  body[data-view="crm-whatsapp"] .topbar {
    max-width: 100vw;
  }

  body[data-view="crm-whatsapp"] .topbar__headline,
  body[data-view="crm-whatsapp"] .topbar__headline h1,
  body[data-view="crm-whatsapp"] .topbar__headline .eyebrow {
    min-width: 0;
    max-width: 100%;
  }

  body[data-view="crm-whatsapp"] .topbar__headline {
    flex: 1 1 auto;
  }

  body[data-view="crm-whatsapp"] .topbar__headline h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-view="crm-whatsapp"] .topbar__actions {
    max-width: 36vw;
    min-width: 0;
    justify-content: flex-end;
    overflow: hidden;
  }

  body[data-view="crm-whatsapp"] .topbar__actions .button-row {
    min-width: 0;
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow: hidden;
  }

  body[data-view="crm-whatsapp"] .topbar__actions .button {
    max-width: 6.75rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-view="crm-whatsapp"] .topbar-density-toggle {
    display: none !important;
  }

  body[data-view="crm-whatsapp"] .crm-shell,
  body[data-view="crm-whatsapp"] .crm-shell--chats,
  body[data-view="crm-whatsapp"] .crm-layout,
  body[data-view="crm-whatsapp"] .crm-column--inbox,
  body[data-view="crm-whatsapp"] .crm-section-shell,
  body[data-view="crm-whatsapp"] .crm-section-content,
  body[data-view="crm-whatsapp"] .crm-section-panel {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-filter-form,
  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-filter-form__basic,
  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-filter-form__advanced {
    min-width: 0;
    max-width: 100%;
  }

  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-filter-form__basic {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.34rem !important;
  }

  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-filter-form__basic select,
  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-filter-form__basic button,
  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-filter-form__advanced select,
  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-filter-form__advanced button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body[data-view="crm-whatsapp"] .crm-shell--chats .crm-conv-list {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}
