body.permisos-pro-route {
  --perm-ink: #0f172a;
  --perm-muted: #64748b;
  --perm-line: #d8e0ea;
  --perm-soft: #f8fafc;
  --perm-blue: #2563eb;
  --perm-green: #059669;
  --perm-amber: #b45309;
  --perm-red: #dc2626;
  --perm-violet: #6d28d9;
}

body.permisos-pro-route .permissions-pro-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-bottom: 36px;
}

body.permisos-pro-route .permissions-pro-hero {
  align-items: center;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 54%, rgba(239,246,255,.9) 100%);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
  padding: 18px 20px;
}

body.permisos-pro-route .permissions-pro-hero h1 {
  color: var(--perm-ink);
  font-size: 23px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.18;
}

body.permisos-pro-route .permissions-pro-hero p {
  color: var(--perm-muted);
  font-size: 13px;
}

body.permisos-pro-route .permissions-pro-hero button,
body.permisos-pro-route .permissions-pro-config-card button,
body.permisos-pro-route .permissions-pro-panel button {
  border-radius: 8px;
  min-height: 34px;
}

body.permisos-pro-route .permissions-pro-panel {
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .055);
  overflow: hidden;
}

body.permisos-pro-route .permissions-pro-panel-head {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, .82fr);
  padding: 20px;
  background:
    linear-gradient(135deg, #ffffff 0%, #f8fafc 48%, #eef6ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

body.permisos-pro-route .permissions-pro-eyebrow {
  color: var(--perm-blue);
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

body.permisos-pro-route .permissions-pro-panel h2 {
  color: var(--perm-ink);
  font-size: 21px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.16;
  margin: 0;
}

body.permisos-pro-route .permissions-pro-panel h3 {
  color: var(--perm-ink);
  font-size: 14px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
}

body.permisos-pro-route .permissions-pro-panel p {
  color: var(--perm-muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0 0;
}

body.permisos-pro-route .permissions-pro-rule-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.permisos-pro-route .permissions-pro-rule {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  padding: 11px 12px;
}

body.permisos-pro-route .permissions-pro-rule span {
  color: #475569;
  display: block;
  font-size: 11px;
  font-weight: 750;
}

body.permisos-pro-route .permissions-pro-rule strong {
  color: var(--perm-ink);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

body.permisos-pro-route .permissions-pro-rule-global {
  border-color: #bfdbfe;
  background: #eff6ff;
}

body.permisos-pro-route .permissions-pro-rule-scoped {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

body.permisos-pro-route .permissions-pro-rule-blocked {
  border-color: #fecaca;
  background: #fff1f2;
}

body.permisos-pro-route .permissions-pro-workbench {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(310px, .58fr) minmax(0, 1.42fr);
  padding: 16px;
}

body.permisos-pro-route .permissions-pro-flow,
body.permisos-pro-route .permissions-pro-simulator {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  min-width: 0;
  padding: 14px;
}

body.permisos-pro-route .permissions-pro-flow > div {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

body.permisos-pro-route .permissions-pro-step {
  align-items: flex-start;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr);
}

body.permisos-pro-route .permissions-pro-step > span {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  height: 28px;
  justify-content: center;
  width: 28px;
}

body.permisos-pro-route .permissions-pro-step strong {
  color: var(--perm-ink);
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

body.permisos-pro-route .permissions-pro-step p {
  font-size: 12px;
  margin-top: 2px;
}

body.permisos-pro-route .permissions-pro-simulator-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

body.permisos-pro-route .permissions-pro-simulator code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #334155;
  font-size: 12px;
  padding: 1px 5px;
}

body.permisos-pro-route .permissions-pro-refresh {
  border: 1px solid #d7e3f2;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 0 11px;
  white-space: nowrap;
}

body.permisos-pro-route .permissions-pro-refresh:hover {
  background: #f8fafc;
  color: var(--perm-blue);
}

body.permisos-pro-route .permissions-pro-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-top: 13px;
}

body.permisos-pro-route .permissions-pro-controls select {
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  color: var(--perm-ink);
  font-size: 13px;
  height: 38px;
  min-width: 0;
  padding: 0 10px;
}

body.permisos-pro-route .permissions-pro-controls select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .11);
  outline: none;
}

body.permisos-pro-route .permissions-pro-controls button {
  background: #0f172a;
  border: 1px solid #0f172a;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
  padding: 0 14px;
}

body.permisos-pro-route .permissions-pro-controls button:disabled,
body.permisos-pro-route .permissions-pro-refresh:disabled {
  cursor: not-allowed;
  opacity: .58;
}

body.permisos-pro-route .permissions-pro-placeholder,
body.permisos-pro-route .permissions-pro-loading,
body.permisos-pro-route .permissions-pro-error,
body.permisos-pro-route .permissions-pro-empty {
  border: 1px dashed #d7e3f2;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 13px;
  padding: 16px;
}

body.permisos-pro-route .permissions-pro-loading {
  background: #f8fafc;
}

body.permisos-pro-route .permissions-pro-error {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b91c1c;
}

body.permisos-pro-route .permissions-pro-sim-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, .55fr) minmax(0, 1.45fr);
  margin-top: 13px;
}

body.permisos-pro-route .permissions-pro-person {
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  display: flex;
  gap: 11px;
  min-width: 0;
  padding: 13px;
}

body.permisos-pro-route .permissions-pro-person > div:last-child {
  min-width: 0;
}

body.permisos-pro-route .permissions-pro-person strong {
  color: var(--perm-ink);
  display: block;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.permisos-pro-route .permissions-pro-person span {
  color: #64748b;
  display: block;
  font-size: 12px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.permisos-pro-route .permissions-pro-avatar-lg {
  align-items: center;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 13px;
  font-weight: 850;
  height: 42px;
  justify-content: center;
  width: 42px;
}

body.permisos-pro-route .permissions-pro-health {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

body.permisos-pro-route .permissions-pro-metric {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  min-height: 66px;
  min-width: 0;
  padding: 10px;
}

body.permisos-pro-route .permissions-pro-metric span {
  color: #64748b;
  display: block;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.2;
}

body.permisos-pro-route .permissions-pro-metric strong {
  color: var(--perm-ink);
  display: block;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.18;
  margin-top: 7px;
  overflow-wrap: break-word;
  word-break: normal;
}

body.permisos-pro-route .permissions-pro-metric:first-child {
  grid-column: span 2;
}

body.permisos-pro-route .permissions-pro-metric-global {
  border-color: #bfdbfe;
  background: #eff6ff;
}

body.permisos-pro-route .permissions-pro-metric-scoped,
body.permisos-pro-route .permissions-pro-metric-visible {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

body.permisos-pro-route .permissions-pro-metric-blocked {
  border-color: #fecaca;
  background: #fff1f2;
}

body.permisos-pro-route .permissions-pro-detail-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  min-width: 0;
  padding: 13px;
}

body.permisos-pro-route .permissions-pro-detail-card:nth-child(n+3) {
  min-height: 150px;
}

body.permisos-pro-route .permissions-pro-detail-card:nth-child(3),
body.permisos-pro-route .permissions-pro-detail-card:nth-child(4) {
  grid-column: span 1;
}

body.permisos-pro-route .permissions-pro-detail-card:nth-child(5),
body.permisos-pro-route .permissions-pro-detail-card:nth-child(6) {
  grid-column: span 1;
}

body.permisos-pro-route .permissions-pro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

body.permisos-pro-route .permissions-pro-tags span {
  background: #f8fafc;
  border: 1px solid #d7e3f2;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 720;
  padding: 5px 9px;
}

body.permisos-pro-route .permissions-pro-list-row {
  align-items: center;
  border-top: 1px solid #eef2f7;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 48px;
  min-width: 0;
  padding: 9px 0;
}

body.permisos-pro-route .permissions-pro-list-row > div {
  min-width: 0;
}

body.permisos-pro-route .permissions-pro-list-row:first-of-type {
  margin-top: 6px;
}

body.permisos-pro-route .permissions-pro-list-row strong {
  color: var(--perm-ink);
  display: block;
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.permisos-pro-route .permissions-pro-list-row span {
  color: #64748b;
  display: block;
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

body.permisos-pro-route .permissions-pro-list-row em {
  background: #f8fafc;
  border: 1px solid #d7e3f2;
  border-radius: 999px;
  color: #475569;
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  max-width: 230px;
  overflow: hidden;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.permisos-pro-route .permissions-pro-list-row em.is-visible {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

body.permisos-pro-route .permissions-pro-list-row em.is-blocked {
  background: #fff1f2;
  border-color: #fecaca;
  color: #be123c;
}

body.permisos-pro-route .permissions-pro-more {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  padding-top: 8px;
}

body.permisos-pro-route .permissions-pro-kpis {
  gap: 14px;
}

body.permisos-pro-route .permissions-pro-kpi,
body.permisos-pro-route .permissions-pro-config-card,
body.permisos-pro-route .permissions-pro-matrix-card,
body.permisos-pro-route .permissions-pro-info-card {
  border-color: var(--perm-line) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}

body.permisos-pro-route .permissions-pro-kpi {
  overflow: hidden;
}

body.permisos-pro-route .permissions-pro-kpi::before {
  background: var(--perm-blue);
  content: "";
  display: block;
  height: 3px;
}

body.permisos-pro-route .permissions-pro-kpi:nth-child(2)::before {
  background: var(--perm-green);
}

body.permisos-pro-route .permissions-pro-kpi:nth-child(3)::before {
  background: var(--perm-violet);
}

body.permisos-pro-route .permissions-pro-kpi:nth-child(4)::before {
  background: var(--perm-amber);
}

body.permisos-pro-route .permissions-pro-config-card [role="tablist"] {
  background: #eef2f7;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 4px;
}

body.permisos-pro-route .permissions-pro-config-card [role="tab"] {
  border-radius: 7px;
  min-height: 36px;
  white-space: normal;
}

body.permisos-pro-route .permissions-pro-config-card table,
body.permisos-pro-route .permissions-pro-matrix-card table {
  min-width: 900px;
}

body.permisos-pro-route .permissions-pro-config-card th,
body.permisos-pro-route .permissions-pro-matrix-card th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

body.permisos-pro-route .permissions-pro-config-card td,
body.permisos-pro-route .permissions-pro-matrix-card td {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 11px;
  padding-top: 11px;
}

body.permisos-pro-route .permissions-pro-config-card svg.text-gray-300,
body.permisos-pro-route .permissions-pro-matrix-card svg.text-gray-300 {
  color: #dc2626 !important;
  opacity: .92;
}

body.permisos-pro-route .permissions-pro-info-card {
  background: #f8fbff !important;
  border-color: #bfdbfe !important;
}

@media (max-width: 1120px) {
  body.permisos-pro-route .permissions-pro-panel-head,
  body.permisos-pro-route .permissions-pro-workbench,
  body.permisos-pro-route .permissions-pro-sim-grid {
    grid-template-columns: 1fr;
  }

  body.permisos-pro-route .permissions-pro-health {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  body.permisos-pro-route .permissions-pro-metric:first-child {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  body.permisos-pro-route .permissions-pro-panel-head,
  body.permisos-pro-route .permissions-pro-workbench {
    padding: 12px;
  }

  body.permisos-pro-route .permissions-pro-rule-grid,
  body.permisos-pro-route .permissions-pro-controls {
    grid-template-columns: 1fr;
  }

  body.permisos-pro-route .permissions-pro-health {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.permisos-pro-route .permissions-pro-simulator-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.permisos-pro-route .permissions-pro-controls button {
    height: 38px;
  }
}

@media (max-width: 520px) {
  body.permisos-pro-route .permissions-pro-hero {
    align-items: stretch;
    padding: 14px;
  }

  body.permisos-pro-route .permissions-pro-hero > div,
  body.permisos-pro-route .permissions-pro-hero button {
    width: 100%;
  }

  body.permisos-pro-route .permissions-pro-panel h2 {
    font-size: 18px;
  }

  body.permisos-pro-route .permissions-pro-health {
    grid-template-columns: 1fr;
  }

  body.permisos-pro-route .permissions-pro-list-row {
    align-items: flex-start;
    flex-direction: column;
  }

  body.permisos-pro-route .permissions-pro-list-row em {
    max-width: 100%;
    white-space: normal;
  }
}
