.sticky-top {
  position: sticky;
  top: 50px;
  z-index: 10; 
}

.cred-page-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  margin-bottom: 1rem;
  padding: 1rem;
}

.cred-soft-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.cred-section-title {
  align-items: center;
  color: #1f2937;
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.cred-muted-text {
  color: #64748b;
  line-height: 1.5;
}

.cred-form-shell {
  max-width: 760px;
  margin: 0 auto;
}

.cred-actions-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.cred-actions-text {
  color: #475569;
  font-size: 0.95rem;
}

.cred-account-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 190px;
}

.cred-photo-card {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: flex-start;
  padding: 1rem;
}

.cred-role-picker .ui-selectcheckboxmenu {
  width: 100%;
}

.cred-role-help {
  color: #64748b;
  display: block;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.cred-policy-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.cred-policy-list li {
  margin-bottom: 0.35rem;
}

.cred-password-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cred-password-policy {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
}

.cred-field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cred-field-stack label {
  color: #334155;
  font-weight: 600;
}

.cred-password-actions {
  display: flex;
  justify-content: flex-end;
}

.cred-policy-history .cred-section-title {
  margin: 0;
}

.cred-table-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.cred-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.cred-policy-number,
.cred-policy-number input {
  max-width: 4.5rem;
  min-width: 4.5rem;
  text-align: center;
  width: 4.5rem;
}

.cred-policy-history .ui-inputnumber {
  display: inline-flex;
}

.cred-policy-status-select,
.cred-policy-status-select .ui-selectonemenu-label {
  min-width: 8.5rem;
  text-align: center;
}

.cred-policy-history .ui-column-title {
  margin-right: 0.5rem;
}

.cred-policy-history thead th:last-child {
  text-align: center;
}

.cred-policy-history thead th:last-child .ui-column-title {
  display: block;
  margin-right: 0;
  text-align: center;
  width: 100%;
}

.cred-policy-history .ui-button + .ui-button {
  margin-left: 0.4rem;
}

.cred-roles-list .ui-button + .ui-button {
  margin-left: 0.4rem;
}

.cred-readonly-action {
  color: #94a3b8;
  font-size: 0.82rem;
}

.cred-status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.35rem 0.65rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.cred-status-active {
  background: #dcfce7;
  color: #166534;
}

.cred-status-closed {
  background: #e2e8f0;
  color: #475569;
}

.cred-status-draft {
  background: #fef3c7;
  color: #92400e;
}

.cred-empty-state {
  color: #64748b;
  padding: 0.5rem 0;
}

.cred-dialog-title {
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cred-busy-dialog .ui-dialog-content {
  padding: 1rem 1.25rem 1.25rem;
}

.cred-busy-progress {
  height: 8px !important;
  min-height: 8px !important;
  overflow: hidden;
}

.cred-busy-progress .ui-progressbar-label {
  line-height: 8px !important;
}

.cred-busy-message {
  color: #4b5563;
  margin-top: 0.75rem;
}

.cred-person-cell strong,
.cred-person-cell span,
.cred-email-cell span,
.cred-comment-cell span {
  display: block;
}

.cred-person-cell strong {
  color: #0f172a;
  font-weight: 700;
}

.cred-person-cell span,
.cred-email-cell span,
.cred-comment-cell span {
  color: #64748b;
  line-height: 1.35;
}

.cred-comment-cell span,
.cred-email-cell span {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cred-problems-table .cred-email-cell span {
  max-width: none;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.cred-problems-table .cred-wrap-cell span {
  max-width: none;
  overflow: visible;
  overflow-wrap: anywhere;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
}

.cred-accounts-table thead th .ui-column-title,
.cred-problems-table thead th .ui-column-title {
  display: block;
  line-height: 1.2;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  white-space: nowrap;
}

.cred-accounts-table thead th.ui-sortable-column,
.cred-problems-table thead th.ui-sortable-column {
  text-align: center;
}

.cred-accounts-table thead th.ui-sortable-column .ui-sortable-column-icon,
.cred-problems-table thead th.ui-sortable-column .ui-sortable-column-icon {
  display: flex;
  justify-content: center;
  margin: 0.15rem auto 0;
  text-align: center;
  width: 100%;
}

.cred-accounts-table thead th:not(.ui-sortable-column) .ui-column-title,
.cred-problems-table thead th:not(.ui-sortable-column) .ui-column-title {
  padding-bottom: 1.15rem;
}

.cred-accounts-table thead th .ui-column-filter,
.cred-problems-table thead th .ui-column-filter {
  margin-top: 0.35rem;
  width: 100%;
}

.cred-accounts-table thead th .ui-selectonemenu,
.cred-problems-table thead th .ui-selectonemenu {
  min-width: 100%;
}

.cred-accounts-table thead th.cred-role-filter-column > .ui-column-title {
  padding-bottom: 0;
}

.cred-accounts-table thead th .cred-role-filter-title {
  display: block;
  padding-bottom: 1.15rem;
}

.cred-accounts-table thead th .cred-role-filter {
  margin-top: 0.35rem;
  min-width: 100%;
}

.cred-accounts-table thead th .cred-role-filter .ui-selectcheckboxmenu-label {
  font-weight: 400;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cred-accounts-table tbody td:not(.cred-row-actions),
.cred-problems-table tbody td:not(.cred-row-actions) {
  text-align: center !important;
}

.cred-problems-table .cred-wrap-cell,
.cred-problems-table .cred-wrap-cell span {
  text-align: center !important;
}

.cred-row-actions {
  text-align: center;
  white-space: nowrap;
}

.cred-row-actions-header {
  text-align: center;
  width: 100%;
}

.cred-row-actions-content {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}

.cred-page-card .ui-datatable tbody > tr.ui-widget-content:not(.ui-state-highlight):not(.ui-expanded-row-content):hover > td {
  background: #f8fbff;
  transition: background-color 0.15s ease;
}

.cred-sidebar-table th,
.cred-sidebar-table td,
.cred-sidebar-items-table th,
.cred-sidebar-items-table td {
  vertical-align: middle;
}

.cred-sidebar-table .ui-column-title,
.cred-sidebar-items-table .ui-column-title {
  white-space: nowrap;
}

.cred-sidebar-table .ui-column-filter,
.cred-sidebar-items-table .ui-column-filter,
.cred-sidebar-table .ui-selectcheckboxmenu,
.cred-sidebar-items-table .ui-selectcheckboxmenu {
  max-width: 100%;
  width: 100%;
}

.cred-sidebar-table .width-fill,
.cred-sidebar-table .width-fill input,
.cred-sidebar-table input.ui-inputfield,
.cred-sidebar-table .ui-selectonemenu,
.cred-sidebar-items-table .width-fill,
.cred-sidebar-items-table .width-fill input,
.cred-sidebar-items-table input.ui-inputfield,
.cred-sidebar-items-table .ui-selectonemenu {
  box-sizing: border-box;
  max-width: 100%;
  width: 100% !important;
}

.cred-sidebar-table .align-center,
.cred-sidebar-items-table .align-center {
  overflow: visible;
  text-align: center;
}

.cred-sidebar-table .align-center .ui-selectonemenu,
.cred-sidebar-items-table .align-center .ui-selectonemenu {
  min-width: 6.6rem;
}

.cred-sidebar-table .ui-expanded-row-content {
  background: #f8fafc;
  padding: 1rem 1.25rem 1.2rem;
}

.cred-sidebar-items-panel {
  background: #f8fafc;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: block;
  padding: 0.85rem;
}

.cred-sidebar-items-panel::before {
  background: #bfd0e7;
  content: "";
  display: block;
  height: 1px;
  margin: -0.85rem -0.85rem 0.85rem;
}

.cred-sidebar-items-table {
  background: #fff;
  border: 1px solid #dde5ef;
  border-radius: 10px;
  overflow: hidden;
}

.cred-sidebar-items-table .ui-datatable-header {
  background: #eef4fb;
  border: 0;
  border-bottom: 1px solid #d7e2ef;
}

.cred-sidebar-items-header {
  border: 0;
  padding: 0.25rem 0;
}

.cred-sidebar-items-header .cred-section-title {
  color: #163a66;
  font-size: 0.95rem;
  gap: 0.45rem;
}

.cred-sidebar-items-table thead th {
  background: #f6f9fd;
  color: #1f3553;
}

.cred-sidebar-items-table tbody tr {
  background: #fff;
}

.cred-sidebar-items-table tbody tr:hover {
  background: #f8fbff;
}

.cred-breadcrumbs-table .width-fill,
.cred-breadcrumbs-table .width-fill input,
.cred-breadcrumbs-table input.ui-inputfield,
.cred-breadcrumbs-table .ui-selectonemenu,
.cred-breadcrumbs-table .ui-selectcheckboxmenu {
  box-sizing: border-box;
  max-width: 100%;
  width: 100% !important;
}

.cred-redirect-table .width-fill,
.cred-redirect-table .width-fill input,
.cred-redirect-table input.ui-inputfield,
.cred-redirect-table .ui-selectonemenu,
.cred-redirect-table .ui-selectcheckboxmenu {
  box-sizing: border-box;
  max-width: 100%;
  width: 100% !important;
}

.cred-redirect-table .ui-column-filter {
  max-width: 100%;
  width: 100%;
}

.cred-redirect-table .cred-table-actions {
  align-items: center;
  flex-wrap: nowrap;
}

.cred-redirect-table .cred-table-actions .cred-global-filter,
.cred-redirect-table .cred-table-actions .cred-global-filter.ui-inputfield {
  flex: 0 0 13rem;
  max-width: 13rem;
  width: 13rem !important;
}

.cred-redirect-enabled-column {
  text-align: center;
}

.cred-redirect-table th.cred-redirect-enabled-column,
.cred-redirect-table th.cred-redirect-enabled-column .ui-column-title {
  text-align: center;
}

.cred-redirect-enabled-column .ui-selectonemenu {
  min-width: 7rem;
}

.cred-parameters-table thead th,
.cred-parameters-table thead th .ui-column-title,
.cred-parameters-table tbody td {
  text-align: center !important;
}

.cred-parameters-table .ui-inputnumber,
.cred-parameters-table .ui-selectonemenu {
  margin-left: auto;
  margin-right: auto;
}

.cred-roles-table .width-fill,
.cred-roles-table .width-fill input,
.cred-roles-table input.ui-inputfield,
.cred-roles-table .ui-selectonemenu,
.cred-roles-table .ui-selectcheckboxmenu {
  box-sizing: border-box;
  max-width: 100%;
  width: 100% !important;
}

.cred-roles-table .ui-column-filter {
  max-width: 100%;
  width: 100%;
}

.cred-roles-table .cred-table-actions {
  align-items: center;
  flex-wrap: nowrap;
}

.cred-roles-table .cred-table-actions .cred-global-filter,
.cred-roles-table .cred-table-actions .cred-global-filter.ui-inputfield {
  flex: 0 0 13rem;
  max-width: 13rem;
  width: 13rem !important;
}

.cred-sidebar-roles {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  overflow: visible;
}

.cred-sidebar-access-note {
  align-items: center;
  background: #f8fafc;
  color: #334155;
  display: flex;
  gap: 0.65rem;
  line-height: 1.45;
}

.cred-sidebar-access-note i {
  color: #1f4678;
  font-size: 1.1rem;
}

.cred-sidebar-role-help {
  color: #64748b;
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 0.35rem;
}

.cred-role-chip {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #1e3a8a;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  padding: 0.32rem 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cred-role-chip-external {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.cred-open-access-chip {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  padding: 0.32rem 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cred-empty-roles {
  color: #94a3b8;
  font-size: 0.82rem;
  font-style: italic;
}

.ui-fluid .cred-row-actions .ui-button,
.cred-row-actions .ui-button {
  width: 6.2rem;
}

.cred-action-danger-soft.ui-button,
.cred-action-danger-soft {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.cred-action-danger-soft.ui-button:hover,
.cred-action-danger-soft:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #9f1239;
}

.cred-problem-dialog .ui-dialog-content {
  padding-top: 0.75rem;
}

.cred-problem-dialog-head {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: flex;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  padding: 0.9rem;
}

.cred-problem-dialog-head h3 {
  color: #0f172a;
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
}

.cred-problem-dialog-head span {
  color: #64748b;
  font-weight: 600;
}

.cred-problem-dialog-icon,
.cred-problem-item-icon {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
}

.cred-problem-dialog-icon {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 1.25rem;
  height: 2.75rem;
  width: 2.75rem;
}

.cred-problem-dialog-help {
  color: #475569;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.cred-problem-item {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  padding: 0.8rem;
}

.cred-problem-item-icon {
  background: #fffbeb;
  color: #d97706;
  height: 2rem;
  width: 2rem;
}

.cred-problem-item strong,
.cred-problem-item span,
.cred-problem-item small {
  display: block;
}

.cred-problem-item strong {
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.cred-problem-item span {
  color: #475569;
  margin-bottom: 0.15rem;
}

.cred-problem-item small {
  color: #b45309;
  font-weight: 700;
}

#formCuentas\:mensaje_container,
#formParametros\:mensaje_container,
#formRoles\:mensaje_container {
  position: fixed !important;
  z-index: 20000 !important;
}

.cred-autofill-guard {
  height: 1px;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  top: 0;
  width: 1px;
}

.cred-stats-page {
  --cred-stat-surface: #ffffff;
  --cred-stat-border: #dbe3ef;
  --cred-stat-text: #182033;
  --cred-stat-muted: #667085;
  --cred-stat-accent: #3059c2;
  --cred-stat-navy: #101a38;
  --cred-stat-soft: rgba(48, 89, 194, 0.11);
  color: var(--cred-stat-text);
}

.cred-stats-panel.ui-panel,
.cred-stats-panel .ui-panel-content {
  background: transparent;
  border: 0;
}

.cred-stats-panel .ui-panel-content {
  padding: 0;
}

.cred-stats-panel {
  margin: 0 auto;
  max-width: 1500px;
}

.cred-stats-page .ui-button {
  width: auto;
}

.cred-stats-hero {
  background: radial-gradient(circle at 88% 18%, rgba(84, 196, 255, 0.35), transparent 26%), linear-gradient(135deg, #121a36 0%, #18326d 58%, #3059c2 100%);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(16, 26, 56, 0.18);
  color: #fff;
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  overflow: hidden;
  padding: 1.65rem;
  position: relative;
}

.cred-stats-hero::after {
  border: 2rem solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  bottom: -4rem;
  content: "";
  height: 13rem;
  position: absolute;
  right: -4rem;
  width: 13rem;
}

.cred-stats-hero-main,
.cred-stats-hero-actions {
  position: relative;
  z-index: 1;
}

.cred-stats-eyebrow {
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem;
  padding: 0.25rem 0.65rem;
  text-transform: uppercase;
}

.cred-stats-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
}

.cred-stats-hero p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0.55rem 0 0;
  max-width: 760px;
}

.cred-stats-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.cred-stats-meta span {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  display: inline-flex;
  font-size: 0.8rem;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
}

.cred-stats-hero-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  min-width: 260px;
}

.cred-action-button.ui-button,
.cred-export-button.ui-button,
.cred-pdf-button.ui-button {
  border-radius: 999px;
  box-shadow: none;
  font-weight: 700;
}

.cred-action-button.ui-button {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
}

.cred-export-button.ui-button {
  background: #24b47e;
  border-color: #24b47e;
  color: #fff;
}

.cred-pdf-button.ui-button {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.cred-report-strip {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.cred-report-strip > div,
.cred-kpi-card,
.cred-insight-card,
.cred-chart-card {
  background: #fff;
  border: 1px solid var(--cred-stat-border);
  box-shadow: 0 8px 22px rgba(16, 26, 56, 0.055);
}

.cred-report-strip > div {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.cred-strip-label {
  color: var(--cred-stat-muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cred-report-strip strong {
  color: var(--cred-stat-navy);
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  margin: 0.25rem 0;
}

.cred-report-strip span:last-child {
  color: var(--cred-stat-muted);
  font-size: 0.82rem;
}

.cred-kpi-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 1rem;
}

.cred-kpi-grid-stat {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.cred-kpi-card {
  align-items: center;
  border-left: 4px solid var(--cred-stat-accent);
  border-radius: 14px;
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

.cred-kpi-card:hover {
  box-shadow: 0 14px 28px rgba(16, 26, 56, 0.09);
  transform: translateY(-2px);
}

.cred-kpi-icon {
  align-items: center;
  background: var(--cred-stat-soft);
  border-radius: 50%;
  color: var(--cred-stat-accent);
  display: flex;
  flex-shrink: 0;
  font-size: 1.2rem;
  height: 2.8rem;
  justify-content: center;
  width: 2.8rem;
}

.cred-kpi-body {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.cred-kpi-value {
  color: var(--cred-stat-text);
  font-size: 1.45rem;
  font-weight: 700;
}

.cred-kpi-label {
  color: var(--cred-stat-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.cred-kpi-hint {
  color: var(--cred-stat-muted);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.cred-kpi-info { border-left-color: #36a2eb; }
.cred-kpi-info .cred-kpi-icon { background: rgba(54, 162, 235, 0.12); color: #1971c2; }
.cred-kpi-success { border-left-color: #28a745; }
.cred-kpi-success .cred-kpi-icon { background: rgba(40, 167, 69, 0.12); color: #1e7e34; }
.cred-kpi-warning { border-left-color: #d97706; }
.cred-kpi-warning .cred-kpi-icon { background: rgba(217, 119, 6, 0.12); color: #b56500; }
.cred-kpi-danger { border-left-color: #dc3545; }
.cred-kpi-danger .cred-kpi-icon { background: rgba(220, 53, 69, 0.12); color: #b02a37; }
.cred-kpi-key { border-left-color: #9966ff; }
.cred-kpi-key .cred-kpi-icon { background: rgba(153, 102, 255, 0.14); color: #6f42c1; }
.cred-kpi-secure { border-left-color: #14b8a6; }
.cred-kpi-secure .cred-kpi-icon { background: rgba(20, 184, 166, 0.13); color: #0f766e; }

.cred-insight-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.1rem;
}

.cred-insight-card {
  border-radius: 16px;
  color: var(--cred-stat-muted);
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  gap: 0.25rem;
  overflow: hidden;
  padding: 1.1rem 1.15rem;
  position: relative;
}

.cred-insight-card::before {
  background: var(--cred-stat-accent);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 5px;
}

.cred-insight-danger::before { background: #dc3545; }
.cred-insight-key::before { background: #6f42c1; }

.cred-insight-icon {
  align-items: center;
  background: var(--cred-stat-soft);
  border-radius: 12px;
  color: var(--cred-stat-accent);
  display: inline-flex;
  font-size: 1.1rem;
  height: 2.35rem;
  justify-content: center;
  margin-bottom: 0.25rem;
  width: 2.35rem;
}

.cred-insight-danger .cred-insight-icon { background: rgba(220, 53, 69, 0.10); color: #b02a37; }
.cred-insight-key .cred-insight-icon { background: rgba(153, 102, 255, 0.12); color: #6f42c1; }

.cred-insight-card strong {
  color: var(--cred-stat-text);
  font-size: 1rem;
}

.cred-insight-label {
  color: var(--cred-stat-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cred-stat-charts-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cred-chart-card {
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem 1.1rem;
}

.cred-chart-featured {
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.cred-chart-span-3 {
  grid-column: span 3;
}

.cred-dashboard-section-title {
  align-items: center;
  color: var(--cred-stat-text);
  display: flex;
  font-size: 1rem;
  font-weight: 600;
  gap: 0.5rem;
  margin: 0 0 0.7rem;
}

.cred-dashboard-section-title i {
  color: var(--cred-stat-accent);
}

.cred-chart-title-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.cred-chart-subtitle {
  color: var(--cred-stat-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cred-chart-canvas {
  flex: 1 1 auto;
  height: 270px;
  max-height: 270px;
  min-height: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.cred-chart-canvas-tall {
  height: 365px;
  max-height: 365px;
}

.cred-chart-canvas > .ui-chart,
.cred-chart-canvas > div {
  height: 100% !important;
  width: 100% !important;
}

.cred-chart-canvas canvas {
  display: block;
  height: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  .sticky-top {
    position: static;
  }

  .cred-page-card,
  .cred-soft-card {
    padding: 0.75rem;
  }

  .cred-account-grid {
    grid-template-columns: 1fr;
  }

  .cred-password-actions {
    justify-content: stretch;
  }

  .cred-password-actions .ui-button {
    width: 100%;
  }

  .cred-table-header {
    align-items: stretch;
    flex-direction: column;
  }

  .cred-table-actions {
    justify-content: stretch;
  }

  .cred-table-actions .ui-button {
    width: 100%;
  }

  .cred-row-actions .ui-button {
    display: block;
    margin: 0.35rem 0;
    width: 100%;
  }

  .cred-row-actions .ui-button + .ui-button {
    margin-left: 0;
  }

  .cred-row-actions-content {
    flex-wrap: nowrap;
  }

  .cred-row-actions-content .ui-button {
    display: inline-flex;
    margin: 0;
    width: 6.2rem;
  }

  .cred-comment-cell span,
  .cred-email-cell span {
    max-width: 100%;
  }

  .cred-stats-hero {
    border-radius: 14px;
    flex-direction: column;
    padding: 1.25rem;
  }

  .cred-stats-hero-actions {
    justify-content: flex-start;
  }

  .cred-report-strip,
  .cred-insight-grid,
  .cred-stat-charts-grid {
    grid-template-columns: 1fr;
  }

  .cred-chart-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .cred-chart-canvas,
  .cred-chart-canvas-tall {
    height: 260px;
    max-height: 260px;
  }

  .cred-chart-span-3 {
    grid-column: span 1;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .cred-stats-hero {
    flex-direction: column;
  }

  .cred-stats-hero-actions {
    justify-content: flex-start;
  }

  .cred-stat-charts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cred-chart-span-3 {
    grid-column: span 2;
  }
}
