:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-border: #dbe4f0;
  --surface: #ffffff;
  --text: #172033;
  --text-strong: #0f172a;
  --text-muted: #64748b;
  --text-primary: #172033;
  --text-secondary: #64748b;
  --muted: #5f6f89;
  --primary: #1f5eff;
  --primary-soft: #e8efff;
  --sidebar-bg: #0f1728;
  --sidebar-text: #d6def0;
  --sidebar-muted: #8d9ab5;
  --sidebar-active: #1a2540;
  --success: #147d52;
  --warning: #b7791f;
  --danger: #c53030;
  --input-bg: #ffffff;
  --table-border: #e9eef6;
  --shadow-soft: 0 8px 24px rgba(15, 23, 40, 0.05);
  --executive-panel-bg: linear-gradient(135deg, #ffffff, #f8fbff 56%, #eef6ff);
  --executive-card-bg: rgba(255, 255, 255, 0.82);
  --executive-card-muted-bg: rgba(248, 250, 252, 0.9);
  --executive-row-bg: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(248,250,252,0.78));
  --executive-chart-bg: rgba(255, 255, 255, 0.78);
  --executive-track-bg: rgba(226, 232, 240, 0.92);
  --tone-success-text: #047857;
  --tone-warning-text: #b45309;
  --tone-danger-text: #b91c1c;
  --tone-accent-text: #1d4ed8;
  --tone-neutral-text: #475569;
  --tone-success-gradient: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(255,255,255,0));
  --tone-warning-gradient: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(255,255,255,0));
  --tone-danger-gradient: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(255,255,255,0));
  --tone-accent-gradient: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(255,255,255,0));
  --tone-neutral-gradient: linear-gradient(135deg, rgba(148, 163, 184, 0.14), rgba(255,255,255,0));

  font-family:
    Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #111827;
  --panel-border: #263244;
  --surface: #111827;
  --text: #e5edf8;
  --text-strong: #f8fafc;
  --text-muted: #94a3b8;
  --text-primary: #e5edf8;
  --text-secondary: #94a3b8;
  --muted: #9aa8bd;
  --primary: #6ea8ff;
  --primary-soft: rgba(96, 165, 250, 0.16);
  --sidebar-bg: #020617;
  --sidebar-text: #dbeafe;
  --sidebar-muted: #8796ad;
  --sidebar-active: rgba(96, 165, 250, 0.18);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --input-bg: #0f172a;
  --table-border: #263244;
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.26);
  --executive-panel-bg: radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.11), transparent 320px), linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.97) 58%, rgba(30, 41, 59, 0.92));
  --executive-card-bg: rgba(15, 23, 42, 0.88);
  --executive-card-muted-bg: rgba(15, 23, 42, 0.72);
  --executive-row-bg: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.68));
  --executive-chart-bg: rgba(15, 23, 42, 0.72);
  --executive-track-bg: rgba(51, 65, 85, 0.72);
  --tone-success-text: #34d399;
  --tone-warning-text: #fbbf24;
  --tone-danger-text: #f87171;
  --tone-accent-text: #60a5fa;
  --tone-neutral-text: #cbd5e1;
  --tone-success-gradient: linear-gradient(135deg, rgba(34, 197, 94, 0.17), rgba(20, 184, 166, 0.05));
  --tone-warning-gradient: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(251, 191, 36, 0.05));
  --tone-danger-gradient: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(244, 63, 94, 0.05));
  --tone-accent-gradient: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(56, 189, 248, 0.05));
  --tone-neutral-gradient: linear-gradient(135deg, rgba(148, 163, 184, 0.16), rgba(59, 130, 246, 0.05));
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

body {
  color: var(--text);
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  transition: grid-template-columns 0.2s ease;
}

.app-shell--sidebar-collapsed {
  grid-template-columns: 80px 1fr;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 24px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.app-shell--sidebar-collapsed .sidebar {
  padding: 24px 12px;
}

.sidebar-brand {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  min-width: 0;
}

.sidebar-brand .erpcc-logo {
  flex: 1;
  min-width: 0;
  padding-right: 40px;
}

.erpcc-logo {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.erpcc-logo__mark {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 28px rgba(21, 155, 255, 0.22);
  overflow: visible;
}

.erpcc-logo__image {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 7px 16px rgba(14, 165, 233, 0.28));
}

.erpcc-logo__core {
  position: relative;
  z-index: 2;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.erpcc-logo__orbit {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.erpcc-logo__orbit--one {
  transform: rotate(32deg);
}

.erpcc-logo__orbit--two {
  transform: rotate(-32deg);
  opacity: 0.7;
}

.erpcc-logo__text {
  min-width: 0;
  flex: 1;
}

.erpcc-logo__name {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.erpcc-logo__tagline {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--sidebar-muted);
  white-space: normal;
}

.sidebar-toggle {
  position: absolute;
  top: 8px;
  right: 0;
  z-index: 1;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.app-shell--sidebar-collapsed .sidebar-brand {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 18px;
}

.app-shell--sidebar-collapsed .sidebar-brand .erpcc-logo {
  padding-right: 0;
}

.app-shell--sidebar-collapsed .sidebar-toggle {
  position: static;
  margin-top: 10px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-section__title {
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  white-space: nowrap;
}

.app-shell--sidebar-collapsed .sidebar-nav {
  gap: 14px;
}

.app-shell--sidebar-collapsed .sidebar-section {
  align-items: center;
}

.app-shell--sidebar-collapsed .sidebar-section__title {
  width: 28px;
  height: 1px;
  padding: 0;
  margin: 2px 0;
  overflow: hidden;
  color: transparent;
  background: rgba(255, 255, 255, 0.09);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.sidebar-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

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

.app-shell--sidebar-collapsed .sidebar-link {
  width: 44px;
  height: 44px;
  justify-content: center;
  padding: 0;
}

.app-shell--sidebar-collapsed .sidebar-link__label {
  display: none;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-link--active {
  background: var(--sidebar-active);
  color: #ffffff;
}
.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 16px 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 247, 251, 0.98) 46%, rgba(226, 232, 240, 0.94) 100%);
  border-bottom: 1px solid rgba(203, 213, 225, 0.95);
  box-shadow:
    0 14px 30px rgba(15, 23, 40, 0.11),
    0 3px 10px rgba(15, 23, 40, 0.06);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar--actions-only {
  justify-content: flex-end;
}

.topbar__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.topbar__subtitle {
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 14px;
}

.content-body {
  padding: 16px 32px 32px 32px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.page-subtitle {
  margin: 8px 0 0 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-section__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 40, 0.05);
}

.summary-card__title {
  font-size: 14px;
  color: var(--muted);
}

.summary-card__value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.summary-card__hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.panel-grid {
  display: grid;
  gap: 16px;
}

.panel-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 40, 0.05);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel__header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}

.panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  padding: 14px 0;
  border-bottom: 1px solid #e9eef6;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item__title {
  font-size: 15px;
  font-weight: 600;
}

.list-item__meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.empty-state {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1280px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-grid--2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell,
  .app-shell--sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .app-shell--sidebar-collapsed .sidebar {
    padding: 18px;
  }

  .app-shell--sidebar-collapsed .sidebar-brand {
    flex-direction: row;
    justify-content: space-between;
  }

  .app-shell--sidebar-collapsed .sidebar-nav {
    gap: 22px;
  }

  .app-shell--sidebar-collapsed .sidebar-section {
    align-items: stretch;
  }

  .app-shell--sidebar-collapsed .sidebar-section__title {
    width: auto;
    height: auto;
    padding: 0 10px;
    margin: 0;
    overflow: visible;
    color: var(--sidebar-muted);
    background: transparent;
  }

  .app-shell--sidebar-collapsed .sidebar-link {
    width: auto;
    height: auto;
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .app-shell--sidebar-collapsed .sidebar-link__label {
    display: inline;
  }

  .topbar {
    padding: 20px 20px 12px 20px;
  }

  .content-body {
    padding: 0 20px 20px 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 40, 0.05);
}

.pagination__info {
  color: var(--muted);
  font-size: 14px;
}

.pagination__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button--secondary {
  background: #e9eef6;
  color: var(--text);
}

@media (max-width: 900px) {
  .pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}

.panel__hint {
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.text-input {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text);
}

.text-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e9eef6;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-primary {
  font-weight: 600;
}

.table-secondary {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill--success {
  background: rgba(20, 125, 82, 0.12);
  color: var(--success);
}

.status-pill--warning {
  background: rgba(183, 121, 31, 0.12);
  color: var(--warning);
}

.status-pill--neutral {
  background: rgba(95, 111, 137, 0.12);
  color: var(--muted);
}

.status-pill--info {
  background: rgba(31, 94, 255, 0.12);
  color: var(--primary);
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.button--danger {
  background: rgba(197, 48, 48, 0.12);
  color: var(--danger);
}

.button--small {
  padding: 8px 10px;
  font-size: 12px;
}

.toolbar--between {
  justify-content: space-between;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-input--full {
  max-width: none;
}

.textarea-input {
  resize: vertical;
  min-height: 88px;
}

.job-form-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 35%, rgba(15, 23, 40, 0.72));
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px;
  overflow-y: auto;
  z-index: 30;
}

.job-form-card {
  width: min(1120px, 100%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

.job-form-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.job-form-title {
  margin: 0;
  font-size: 24px;
}

.job-form-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.job-form-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-section-card {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 18px;
  background: color-mix(in srgb, var(--panel) 92%, var(--bg));
}

.form-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-strong);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid--1 { grid-template-columns: 1fr; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.toggle-row, .day-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toggle-chip {
  border: 1px solid var(--panel-border);
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.toggle-chip:hover:not(:disabled):not(.toggle-chip--active) {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--panel-border));
  background: color-mix(in srgb, var(--input-bg) 82%, var(--primary-soft));
}

.toggle-chip--active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--panel-border));
}

.toggle-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-helper-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  background: color-mix(in srgb, var(--input-bg) 72%, var(--panel));
  border: 1px solid var(--panel-border);
}

.form-helper-banner--info {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--panel-border));
}

.sub-panel {
  margin-top: 8px;
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px;
}

.sub-panel-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-strong);
}

.checkbox-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-error-banner,
.form-success-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.form-error-banner {
  background: rgba(197, 48, 48, 0.12);
  color: var(--danger);
}

.form-success-banner {
  background: rgba(20, 125, 82, 0.12);
  color: var(--success);
}

@media (max-width: 1100px) {
  .form-grid--4,
  .form-grid--3,
  .form-grid--2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .job-form-overlay {
    padding: 16px;
  }

  .job-form-header,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.settings-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.capture-operation-filters {
  margin-top: 14px;
}

.settings-tab {
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.settings-tab--active {
  background: var(--primary-soft);
  border-color: #bfd0ff;
  color: var(--primary);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cloud-status-page .cloud-status-stack {
  display: grid;
  gap: 0;
}

.cloud-status-page .cloud-status-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 12px 20px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-border);
}

.cloud-status-page .cloud-status-row:last-child {
  border-bottom: none;
}

.cloud-status-page .cloud-status-row__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.cloud-status-page .cloud-status-row__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  word-break: break-word;
}

.cloud-status-page .cloud-status-help {
  margin: 8px 0 4px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.cloud-agent-connection-hero__badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cloud-agent-connection-hero__pulse {
  animation: cloud-agent-pulse 1.8s ease-in-out infinite;
}

@keyframes cloud-agent-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.82;
  }
}

.cloud-identity-success {
  padding: 16px 18px;
  border: 1px solid rgba(20, 125, 82, 0.18);
  border-radius: 14px;
  background: rgba(20, 125, 82, 0.08);
  color: var(--text);
}

.cloud-identity-success p {
  margin: 0 0 8px;
}

.cloud-identity-success p:last-child {
  margin-bottom: 0;
}

.cloud-identity-company-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.cloud-identity-company-list li {
  margin-bottom: 4px;
}

.cloud-company-selector-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cloud-company-selector-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: #fff;
}

.cloud-company-selector-item__name {
  font-size: 16px;
  font-weight: 700;
}

.cloud-company-selector-item__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.cloud-session-permissions {
  margin: 20px 0;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: #f8fbff;
}

.cloud-session-permissions__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cloud-session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 24px 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(197, 129, 0, 0.25);
  background: #fff8eb;
  color: #8a6100;
  font-size: 14px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-field--full {
  grid-column: 1 / -1;
}

.settings-field__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.settings-input,
.settings-textarea {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text);
}

.settings-textarea {
  resize: vertical;
}

.settings-switches {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--input-bg);
}

.status-banner {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
}

.status-banner--success {
  background: #e9f8f1;
  color: var(--success);
  border: 1px solid #bfe8d2;
}

.status-banner--error {
  background: #fdeeee;
  color: var(--danger);
  border: 1px solid #f3c5c5;
}

@media (max-width: 900px) {
  .settings-grid,
  .settings-switches {
    grid-template-columns: 1fr;
  }
}

.panel-grid--2-history {
  grid-template-columns: 1.3fr 1fr;
}

.status-pill--danger {
  background: #fdeeee;
  color: var(--danger);
}

.run-logs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.run-log-item {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  background: #fbfcfe;
}

.run-log-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.run-log-item__message {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.run-log-item__details {
  margin: 10px 0 0 0;
  padding: 12px;
  border-radius: 12px;
  background: #0f1728;
  color: #d6def0;
  font-size: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-level {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.log-level--info {
  background: #e8efff;
  color: var(--primary);
}

.log-level--warn {
  background: #fff4de;
  color: var(--warning);
}

.log-level--error {
  background: #fdeeee;
  color: var(--danger);
}

.log-level--debug {
  background: #eef2f7;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .panel-grid--2-history {
    grid-template-columns: 1fr;
  }
}

.button--warning {
  background: #fff4db;
  color: #8a5a00;
}


.action-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.action-button--primary {
  background: var(--primary);
  color: #fff;
}

.action-button--secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--panel-border);
}

.action-button__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}

.action-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  flex: 0 0 auto;
}

.action-icon-button:hover:not(:disabled),
.action-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.action-icon-button--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.action-icon-button--success {
  background: #0f8b4c;
  border-color: #0f8b4c;
  color: #fff;
}

.action-icon-button--warning {
  background: #ffab00;
  border-color: #ffab00;
  color: #fff;
}

.action-icon-button--danger {
  background: #e11d2e;
  border-color: #e11d2e;
  color: #fff;
}

.action-icon-button__glyph {
  font-size: 14px;
  line-height: 1;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.page-header {
  gap: 16px;
}

.page-header__actions {
  flex: 0 0 auto;
}

/* Ajustes ERPCC - ActionIconButton atual */
.action-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  flex: 0 0 auto;
}

.action-icon-btn svg {
  width: 18px;
  height: 18px;
}

.action-icon-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.action-icon-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.action-icon-btn.success {
  background: #008f5b;
  border-color: #008f5b;
  color: #fff;
}

.action-icon-btn.warning {
  background: #f6a300;
  border-color: #f6a300;
  color: #fff;
}

.action-icon-btn.danger {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
}


.action-icon-btn--delete-neutral,
.action-icon-btn--delete-neutral.danger {
  background: #fff;
  border-color: var(--panel-border);
  color: var(--text);
}

.action-icon-btn--delete-neutral:hover:not(:disabled),
.action-icon-btn--delete-neutral.danger:hover:not(:disabled) {
  background: #f8fafc;
}

.action-icon-btn.neutral {
  background: #fff;
  border-color: var(--panel-border);
  color: var(--text);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar__theme-toggle {
  flex-shrink: 0;
}

.topbar__user-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 4px 18px rgba(15, 23, 40, 0.05);
}

.topbar__user-name {
  font-size: 14px;
  font-weight: 700;
}

.topbar__user-role {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(15, 23, 40, 0.08);
}


.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 20px 0;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--panel-border);
}

.auth-brand__logo {
  width: 66px;
  height: 62px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: visible;
}

.auth-brand__logo-image {
  width: 76px;
  height: 72px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(14, 165, 233, 0.28));
}

.auth-brand__logo-core {
  position: relative;
  z-index: 2;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.auth-brand__logo-orbit {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
}

.auth-brand__logo-orbit--one {
  transform: rotate(32deg);
}

.auth-brand__logo-orbit--two {
  transform: rotate(-32deg);
  opacity: 0.72;
}

.auth-brand__text {
  min-width: 0;
}

.auth-brand__title {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.auth-brand__subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.auth-card--wide {
  max-width: 720px;
}

.mode-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mode-selector-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: #fff;
}

.mode-selector-card__eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mode-selector-card__title {
  margin: 0;
  font-size: 20px;
}

.mode-selector-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.mode-selector-card__meta {
  color: var(--muted);
  font-size: 13px;
}

.mode-selector-card--featured {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

@media (max-width: 720px) {
  .mode-selector-grid {
    grid-template-columns: 1fr;
  }
}

.auth-card__header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
}

.auth-card__header p {
  margin: 0 0 20px 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-field--full {
  grid-column: 1 / -1;
}

.auth-field span {
  font-size: 14px;
  font-weight: 600;
}

.auth-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

.auth-input:focus {
  outline: 2px solid rgba(31, 94, 255, 0.18);
  border-color: var(--primary);
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.auth-link-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 16px 0;
}

.auth-link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-link-button:hover {
  text-decoration: underline;
}

.auth-forgot-card {
  margin: 0 0 18px 0;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: #f8fbff;
}

.auth-forgot-card__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-forgot-card__text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.auth-forgot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.auth-forgot-button {
  min-width: 110px;
}

.auth-actions--between {
  justify-content: space-between;
}

.auth-notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.auth-notice--error {
  background: #fff1f1;
  color: var(--danger);
  border: 1px solid rgba(197, 48, 48, 0.2);
}

.auth-notice--success {
  background: #edfdf5;
  color: var(--success);
  border: 1px solid rgba(20, 125, 82, 0.2);
}

.auth-notice--info {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(31, 94, 255, 0.2);
}

.auth-warning {
  margin: 6px 0 20px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  line-height: 1.5;
}

.auth-error-banner {
  margin: 16px auto 0 auto;
  max-width: 720px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff1f1;
  border: 1px solid rgba(197, 48, 48, 0.2);
  color: var(--danger);
}

@media (max-width: 900px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar__actions {
    width: 100%;
    justify-content: space-between;
  }
}

html,
body,
#root {
  height: 100%;
}

body {
  overflow: hidden;
}

.window-shell {
  height: 100vh;
  background: var(--bg);
  overflow: hidden;
}

.window-shell__content {
  height: 100vh;
  padding-top: 52px;
  overflow-y: auto;
  overflow-x: hidden;
}

.window-titlebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: linear-gradient(90deg, #10182b 0%, #0a1325 100%);
  color: #fff;
  z-index: 1000;
  -webkit-app-region: drag;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-titlebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.window-titlebar__logo {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: visible;
}

.window-titlebar__logo-image {
  width: 42px;
  height: 40px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(14, 165, 233, 0.24));
}

.window-titlebar__logo-core {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.window-titlebar__logo-orbit {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.window-titlebar__logo-orbit--one {
  transform: rotate(32deg);
}

.window-titlebar__logo-orbit--two {
  transform: rotate(-32deg);
  opacity: 0.7;
}

.window-titlebar__text {
  min-width: 0;
}

.window-titlebar__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}

.window-titlebar__subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(214, 222, 240, 0.9);
  line-height: 1.1;
}

.window-titlebar__actions {
  display: flex;
  align-items: stretch;
  margin-right: -6px;
  -webkit-app-region: no-drag;
}

.window-titlebar__button {
  width: 46px;
  height: 52px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.window-titlebar__button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.window-titlebar__button--close:hover {
  background: #d92d20;
}

.auth-error-banner {
  max-width: 720px;
  margin: 0 auto 16px auto;
}

.auth-shell {
  min-height: calc(100vh - 52px);
}

.app-shell {
  min-height: calc(100vh - 52px);
}


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

.table-wrapper--jobs {
  overflow-x: auto;
  overflow-y: hidden;
}

.data-table--jobs {
  min-width: 1580px;
  table-layout: fixed;
}

.data-table--jobs th,
.data-table--jobs td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table--jobs th > span {
  display: inline-block;
  line-height: 1.2;
}

.data-table--jobs .col-job-id {
  width: 60px;
}

.data-table--jobs .col-job-name {
  width: 190px;
}

.data-table--jobs .col-job-program {
  width: 230px;
}

.data-table--jobs .col-job-environment {
  width: 115px;
}

.data-table--jobs .col-job-mode {
  width: 75px;
}

.data-table--jobs .col-job-destination {
  width: 220px;
}

.data-table--jobs .col-job-recurrence {
  width: 120px;
}

.data-table--jobs .col-job-next-run {
  width: 110px;
}

.data-table--jobs .col-job-last-status {
  width: 110px;
}

.data-table--jobs .col-job-state {
  width: 130px;
}

.data-table--jobs .col-job-actions {
  width: 190px;
}

.data-table .sticky-col,
.data-table--jobs .sticky-col {
  position: sticky;
  background: var(--panel);
  z-index: 2;
}

.data-table th.sticky-col,
.data-table--jobs th.sticky-col {
  z-index: 3;
}

.data-table .sticky-col--actions,
.data-table--jobs .sticky-col--actions {
  right: 0;
  box-shadow: -1px 0 0 #e9eef6;
}

.data-table--jobs .sticky-col--state {
  right: 190px;
  box-shadow: -1px 0 0 #e9eef6;
}

.data-table--jobs td.col-job-state,
.data-table--jobs td.col-job-actions {
  vertical-align: middle;
}

.data-table--jobs .status-pill {
  white-space: nowrap;
}

.data-table--jobs .table-actions {
  justify-content: flex-start;
  min-width: 172px;
}

.window-titlebar__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 8px;
  -webkit-app-region: no-drag;
}

.window-titlebar__badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.topbar__mode-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(15, 23, 40, 0.05);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.topbar__mode-control:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.06);
  transform: translateY(-1px);
}

.topbar__mode-control-text strong {
  font-weight: 700;
}

.topbar__mode-control-icon {
  flex-shrink: 0;
  opacity: 0.72;
}

.mode-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mode-select-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 40, 0.05);
}

.mode-select-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(31, 94, 255, 0.1);
}

.mode-select-card strong {
  font-size: 18px;
}

.mode-select-card span {
  color: var(--muted);
  line-height: 1.5;
}

.inline-confirmation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(191, 120, 18, 0.22);
  border-radius: 14px;
  background: rgba(191, 120, 18, 0.08);
  color: var(--text-primary);
}

.inline-confirmation--danger {
  border-color: rgba(197, 48, 48, 0.24);
  background: rgba(197, 48, 48, 0.08);
}

.inline-confirmation__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 14px;
}

.inline-confirmation__content strong {
  color: var(--text-primary);
}

.inline-confirmation__content span {
  color: var(--text-secondary);
}

.inline-confirmation__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .inline-confirmation {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-confirmation__actions {
    justify-content: flex-end;
  }
}

/* ERPCC: page title moved to the main topbar, keeping page actions below when they exist. */
.topbar__page-title-block {
  min-width: 0;
  padding-right: 24px;
}

.topbar__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.topbar__subtitle {
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.page-header--actions-only {
  justify-content: flex-end;
  margin-top: 0;
}

.window-titlebar__actions {
  margin-left: auto;
}

@media (max-width: 900px) {
  .topbar__page-title-block {
    padding-right: 0;
  }

  .page-header--actions-only {
    justify-content: flex-start;
  }
}

/* ERPCC: modernized login screen */
.auth-shell--login {
  position: relative;
  min-height: calc(100vh - 48px);
  padding: 54px 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(14, 165, 233, 0.18), transparent 30%),
    radial-gradient(circle at 86% 24%, rgba(31, 94, 255, 0.13), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #eef3f9 48%, #e9eff7 100%);
}

.auth-shell--login::before,
.auth-shell--login::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-shell--login::before {
  width: 520px;
  height: 520px;
  left: -190px;
  bottom: -250px;
  background: rgba(14, 165, 233, 0.12);
  filter: blur(8px);
}

.auth-shell--login::after {
  width: 360px;
  height: 360px;
  right: -120px;
  top: 70px;
  border: 1px solid rgba(31, 94, 255, 0.16);
  background: rgba(255, 255, 255, 0.34);
}

.auth-card--login-modern {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1fr);
  gap: 0;
  width: min(100%, 980px);
  max-width: 980px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 32px 72px rgba(15, 23, 40, 0.18),
    0 8px 20px rgba(15, 23, 40, 0.08);
  backdrop-filter: blur(14px);
}

.auth-login-hero {
  position: relative;
  min-height: 560px;
  padding: 40px;
  color: #ffffff;
  background:
    linear-gradient(155deg, rgba(15, 23, 42, 0.96), rgba(18, 48, 89, 0.96) 52%, rgba(3, 105, 161, 0.92)),
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.42), transparent 28%);
  overflow: hidden;
}

.auth-login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 90px),
    linear-gradient(30deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 84px);
  opacity: 0.42;
}

.auth-login-hero__glow {
  position: absolute;
  width: 260px;
  height: 260px;
  left: 36px;
  top: 54px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.2);
  filter: blur(16px);
}

.auth-login-hero__brand,
.auth-login-hero__chips,
.auth-login-hero__status {
  position: relative;
  z-index: 1;
}

.auth-login-hero__brand {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.auth-login-hero__logo {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 10px;
  box-sizing: border-box;
  overflow: visible;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 45px rgba(34, 211, 238, 0.22);
}

.auth-login-hero__logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(34, 211, 238, 0.42));
}

.auth-login-hero__eyebrow {
  margin-bottom: 14px;
  color: rgba(226, 242, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-login-hero h1 {
  margin: 0;
  max-width: 380px;
  color: #ffffff;
  font-size: 42px;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-shadow: 0 18px 32px rgba(8, 13, 28, 0.34);
}

.auth-login-hero p {
  max-width: 340px;
  margin: 18px 0 0 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 15px;
  line-height: 1.6;
}

.auth-login-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.auth-login-hero__chips span {
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.auth-login-hero__status {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-login-hero__status div {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
}

.auth-login-hero__status strong {
  font-size: 13px;
  color: #9ff7d1;
}

.auth-login-hero__status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
}

.auth-login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px 44px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.94)),
    radial-gradient(circle at 85% 20%, rgba(14, 165, 233, 0.09), transparent 30%);
}

.auth-login-panel__header {
  margin-bottom: 22px;
}

.auth-mode-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.22);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.auth-login-panel__header h2 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.auth-login-panel__header p {
  margin: 10px 0 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.auth-login-panel__server {
  display: block;
  margin-top: 6px;
  color: #365579;
  word-break: break-all;
}

.auth-field--modern {
  margin-bottom: 18px;
}

.auth-input--modern {
  min-height: 50px;
  padding: 13px 15px;
  border-radius: 15px;
  border-color: #cfdae8;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.auth-input--modern:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow:
    0 0 0 4px rgba(14, 165, 233, 0.13),
    0 10px 22px rgba(14, 165, 233, 0.08);
  transform: translateY(-1px);
}

.auth-link-row--modern {
  justify-content: space-between;
  gap: 14px;
  margin: -2px 0 22px 0;
}

.auth-link-row--modern .auth-link-button {
  font-size: 13px;
}

.auth-forgot-card--modern {
  margin-bottom: 22px;
  background: rgba(224, 242, 254, 0.42);
  border-color: rgba(14, 165, 233, 0.2);
}

.auth-actions--modern {
  justify-content: stretch;
}

.auth-submit-button {
  width: 100%;
  min-height: 50px;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(31, 94, 255, 0.22);
}

.auth-card--login-modern .auth-notice {
  margin-bottom: 18px;
}

@media (max-width: 980px) {
  .auth-card--login-modern {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .auth-login-hero {
    min-height: auto;
    padding: 32px;
  }

  .auth-login-hero__status {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 28px;
  }

  .auth-login-panel {
    padding: 34px 32px;
  }
}

@media (max-width: 640px) {
  .auth-shell--login {
    padding: 22px 14px;
  }

  .auth-card--login-modern {
    border-radius: 22px;
  }

  .auth-login-hero,
  .auth-login-panel {
    padding: 26px 22px;
  }

  .auth-login-hero__brand {
    flex-direction: column;
  }

  .auth-login-hero h1,
  .auth-login-panel__header h2 {
    font-size: 26px;
  }

  .auth-login-hero__status,
  .auth-forgot-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .auth-login-hero__status {
    flex-direction: column;
    align-items: flex-start;
  }
}

.license-card {
  max-width: 980px;
}

.license-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.license-info-grid div {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.86);
}

.license-info-grid span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.license-info-grid strong {
  display: block;
  color: #0f172a;
  font-size: 0.88rem;
  word-break: break-word;
}

.auth-warning-banner {
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-size: 0.86rem;
  font-weight: 700;
}

.license-summary-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.license-summary-list__item {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.88);
}

.license-summary-list__item span {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.license-summary-list__item strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  word-break: break-word;
}

@media (max-width: 900px) {
  .license-info-grid,
  .license-summary-list {
    grid-template-columns: 1fr;
  }
}

/* Licensing activation adjustments */
.license-card {
  width: min(100%, 1040px);
  max-width: 1040px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(440px, 1.1fr);
}

.license-card .auth-login-hero {
  min-height: 520px;
}

.license-card .auth-login-hero__title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.license-card .auth-login-hero__subtitle {
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.9rem;
  font-weight: 700;
}

.license-card .auth-login-hero__content {
  position: relative;
  z-index: 1;
  margin-top: 56px;
}

.license-card .auth-login-hero__content h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.license-panel {
  min-width: 0;
  padding: 38px 36px;
}

.license-panel__header h2 {
  font-size: 1.8rem;
}

.license-panel .auth-field input {
  width: 100%;
}

.license-panel .form-error-banner,
.license-panel .form-success-banner,
.license-panel .auth-warning-banner {
  margin-bottom: 16px;
}

.license-card .license-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .license-card {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .license-card .auth-login-hero {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .license-panel {
    padding: 28px 22px;
  }

  .license-card .license-info-grid {
    grid-template-columns: 1fr;
  }
}


.license-portal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.license-portal-actions--hero {
  justify-content: flex-start;
  margin-top: 22px;
}

.license-activation-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
}

.license-activation-help button {
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
}

.license-activation-help button:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.license-overview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.06));
}

.license-overview-card div {
  display: grid;
  gap: 4px;
}

.license-overview-card__eyebrow {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.license-overview-card strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.license-overview-card small {
  color: #475569;
  font-weight: 700;
}

/* ERPCC licensing settings polish */
.license-page-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.license-management-card {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.82);
}

.license-management-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.license-management-card__header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.license-management-card__header p {
  margin: 5px 0 0 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.license-key-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.license-key-form__field {
  min-width: 0;
}

.license-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.license-action-row .button {
  white-space: nowrap;
}

.topbar__license-badge {
  display: grid;
  gap: 2px;
  min-width: 132px;
  max-width: 180px;
  padding: 8px 12px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 14px;
  background: rgba(240, 249, 255, 0.72);
  color: #0f172a;
}

.topbar__license-badge span,
.topbar__license-badge strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__license-badge span {
  font-size: 12px;
  font-weight: 800;
}

.topbar__license-badge strong {
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 1280px) {
  .license-key-form {
    grid-template-columns: 1fr;
  }

  .license-action-row {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .license-management-card__header {
    flex-direction: column;
  }

  .license-portal-actions {
    justify-content: flex-start;
  }

  .license-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .license-action-row .button {
    width: 100%;
  }
}

.license-diagnostics-card {
  padding: 18px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 18px;
  background: rgba(240, 249, 255, 0.62);
}

.license-summary-list--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.license-summary-list__item--wide {
  grid-column: 1 / -1;
}

.license-summary-list--compact .license-summary-list__item strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .license-summary-list--compact {
    grid-template-columns: 1fr;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.modal-card {
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  background: var(--surface, #fff);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

.modal-card--wide {
  width: min(1100px, calc(100vw - 48px));
}

.modal-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 8px;
}

.modal-card__header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.modal-card__header p {
  margin: 4px 0 0;
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
}

.log-snapshot-viewer {
  max-height: min(62vh, 620px);
  margin: 12px 20px 20px;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font: 12px/1.5 Consolas, 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.error-detail-content {
  padding: 8px 20px 20px;
  overflow: auto;
  max-height: calc(100vh - 140px);
}

.error-detail-summary {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.78);
}

.error-detail-summary span,
.error-detail-field span {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.error-detail-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--text-strong, #0f172a);
  font-size: 1rem;
}

.error-detail-summary small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted, #64748b);
}

.error-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.error-detail-field {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.86);
}

.error-detail-field strong {
  display: block;
  margin-top: 5px;
  color: var(--text-strong, #0f172a);
  font-size: 0.88rem;
  word-break: break-word;
}

.error-detail-section {
  margin-top: 14px;
}

.error-detail-section h4 {
  margin: 0 0 8px;
  color: var(--text-strong, #0f172a);
  font-size: 0.95rem;
}

.error-detail-log {
  max-height: min(44vh, 460px);
  margin: 0;
}

.error-detail-roadmap {
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.7);
}

.error-detail-roadmap p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.86rem;
}

.monitoring-service-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.monitoring-service-card__main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.monitoring-service-card__main p {
  margin: 0;
  color: var(--muted);
}

.monitoring-service-card__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.monitoring-service-card__grid > div {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 12px;
  background: #f8fbff;
}

.monitoring-service-card__grid span,
.monitoring-service-card__grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.monitoring-service-card__grid strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.monitoring-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.monitoring-filters__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.monitoring-filters__field--small {
  min-width: 170px;
}

.sidebar-link--button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.sidebar-link--button:hover {
  background: rgba(255, 255, 255, 0.06);
}


.error-analysis-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 16px;
}

.error-analysis-summary-grid .summary-card {
  min-width: 0;
}

@media (max-width: 1400px) {
  .error-analysis-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .error-analysis-summary-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.error-events-table-wrapper {
  overflow-x: auto;
}

.error-events-table {
  table-layout: fixed;
  min-width: 1100px;
}

.error-events-table .col-log-time { width: 110px; }
.error-events-table .col-log-severity { width: 90px; }
.error-events-table .col-log-message { width: 36%; }
.error-events-table .col-log-context { width: 24%; }
.error-events-table .col-log-origin { width: 95px; }
.error-events-table .col-log-actions { width: 90px; }

.error-events-table th,
.error-events-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.error-events-table th.sticky-col--actions,
.error-events-table td.sticky-col--actions {
  width: 90px;
  min-width: 90px;
}

.error-message-cell__text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  max-height: 4.1em;
}

.error-message-cell .table-secondary {
  overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
  .error-events-table .col-log-time { width: 100px; }
  .error-events-table .col-log-severity { width: 82px; }
  .error-events-table .col-log-context { width: 22%; }
  .error-events-table .col-log-origin { width: 90px; }
  .error-events-table .col-log-actions { width: 78px; }

  .error-events-table th.sticky-col--actions,
  .error-events-table td.sticky-col--actions {
    width: 78px;
    min-width: 78px;
  }
}

.error-analysis-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.error-analysis-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.error-analysis-hero span {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error-analysis-hero strong {
  display: block;
  margin-top: 6px;
  color: var(--text-strong, #0f172a);
  font-size: 1.05rem;
  line-height: 1.35;
}

.error-analysis-hero small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted, #64748b);
}

.error-analysis-section {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.error-analysis-section h4 {
  margin: 0 0 10px;
  color: var(--text-strong, #0f172a);
  font-size: 0.95rem;
}

.error-detail-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.error-detail-row {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.error-detail-row span {
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 800;
}

.error-detail-row strong {
  color: var(--text-strong, #0f172a);
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.error-diagnostic-box {
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 12px;
  background: rgba(255, 251, 235, 0.76);
}

.error-diagnostic-box p {
  margin: 0;
  color: var(--text-strong, #0f172a);
  line-height: 1.5;
}

.error-diagnostic-box small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted, #64748b);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .error-analysis-hero {
    flex-direction: column;
  }

  .error-detail-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.error-monitoring-tabs {
  margin: -4px 0 4px;
}

.error-panel-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.error-panel-hero--success { border-color: rgba(34, 197, 94, 0.24); }
.error-panel-hero--warning { border-color: rgba(245, 158, 11, 0.28); }
.error-panel-hero--danger { border-color: rgba(239, 68, 68, 0.26); }

.error-panel-hero span {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-panel-hero h2 {
  margin: 8px 0 6px;
  color: var(--text-strong, #0f172a);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
}

.error-panel-hero p {
  margin: 0;
  max-width: 780px;
  color: var(--text-muted, #64748b);
  line-height: 1.55;
}

.error-panel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.error-panel-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.error-panel-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #94a3b8;
}

.error-panel-card--success::before { background: #22c55e; }
.error-panel-card--warning::before { background: #f59e0b; }
.error-panel-card--danger::before { background: #ef4444; }
.error-panel-card--neutral::before { background: #3b82f6; }

.error-panel-card span,
.error-panel-card small,
.error-panel-card em {
  display: block;
}

.error-panel-card span {
  color: var(--text-muted, #64748b);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error-panel-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text-strong, #0f172a);
  font-size: 1.8rem;
  line-height: 1;
}

.error-panel-card small {
  margin-top: 8px;
  color: var(--text, #334155);
  font-weight: 700;
}

.error-panel-card em {
  margin-top: 7px;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-style: normal;
  overflow-wrap: anywhere;
}

.error-panel-story {
  padding: 16px 18px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.96));
}

.error-panel-story strong {
  color: var(--text-strong, #0f172a);
  font-size: 0.96rem;
}

.error-panel-story p {
  margin: 7px 0 0;
  color: var(--text, #334155);
  line-height: 1.55;
}

.error-timeline-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

@media (min-width: 2000px) {
  .error-timeline-chart,
  .monitoring-detector-wrap {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
  }
}

.error-timeline-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.error-timeline-kpis > div {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.92));
}

.error-timeline-kpis span,
.error-timeline-kpis small {
  display: block;
  color: var(--text-muted, #64748b);
}

.error-timeline-kpis span {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-timeline-kpis strong {
  display: block;
  margin-top: 6px;
  color: var(--text-strong, #0f172a);
  font-size: 1.1rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.error-timeline-kpis small {
  margin-top: 5px;
  font-size: 0.72rem;
  font-weight: 700;
}

.error-timeline-chart__grid {
  display: grid;
  grid-template-columns: repeat(24, minmax(8px, 1fr));
  align-items: end;
  gap: 6px;
  min-height: 220px;
  padding: 14px 10px 6px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.error-timeline-chart__column {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  gap: 8px;
  height: 190px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.error-timeline-chart__column:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.82);
  outline-offset: 4px;
  border-radius: 10px;
}

.error-timeline-chart__column.is-selected .error-timeline-chart__bar {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22), 0 12px 24px rgba(15, 23, 42, 0.16);
}

.error-timeline-chart__bar {
  width: 100%;
  min-height: 6px;
  border-radius: 999px 999px 4px 4px;
  background: #cbd5e1;
  transition: height 160ms ease;
}

.error-timeline-chart__bar--success { background: #22c55e; }
.error-timeline-chart__bar--warning { background: #f59e0b; }
.error-timeline-chart__bar--danger { background: #ef4444; }
.error-timeline-chart__bar--neutral { background: #3b82f6; }

.error-timeline-chart__column small {
  min-height: 18px;
  color: var(--text-muted, #64748b);
  font-size: 0.68rem;
  white-space: nowrap;
  transform: rotate(-28deg);
}

.error-panel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 800;
}

.error-panel-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot--danger { background: #ef4444; }
.legend-dot--warning { background: #f59e0b; }
.legend-dot--neutral { background: #3b82f6; }
.legend-dot--success { background: #22c55e; }

.error-timeline-footnote {
  margin: -2px 0 0;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  line-height: 1.45;
}

.error-timeline-detail {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.9));
}

.error-timeline-detail__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.error-timeline-detail__header span,
.error-timeline-detail__header small {
  display: block;
  color: var(--text-muted, #64748b);
}

.error-timeline-detail__header span {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-timeline-detail__header strong {
  display: block;
  margin-top: 4px;
  color: var(--text-strong, #0f172a);
}

.error-timeline-detail__header em {
  align-self: flex-start;
  padding: 7px 10px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 999px;
  color: #2563eb;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.error-timeline-detail__list {
  display: grid;
  gap: 9px;
}

.error-timeline-detail__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.error-timeline-detail__item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.error-timeline-detail__item > div:last-child {
  flex: 0 0 auto;
  justify-items: end;
}

.error-timeline-detail__item strong {
  color: var(--text-strong, #0f172a);
  overflow-wrap: anywhere;
}

.error-timeline-detail__item span,
.error-timeline-detail__item small {
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
}

.error-timeline-detail__item em {
  color: var(--text-strong, #0f172a);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
}

.error-panel-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.error-group-box {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.045);
}

.error-group-box h3 {
  margin: 0 0 12px;
  color: var(--text-strong, #0f172a);
  font-size: 0.98rem;
}

.error-group-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.error-group-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.74);
  text-align: left;
}

.error-group-item--interactive {
  cursor: pointer;
}

.error-group-item--interactive:hover {
  border-color: rgba(59, 130, 246, 0.34);
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.08);
}

.error-group-item--interactive:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.82);
  outline-offset: 2px;
}

.error-group-item strong,
.error-group-item span {
  display: block;
}

.error-group-item strong {
  color: var(--text-strong, #0f172a);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.error-group-item span {
  margin-top: 4px;
  color: var(--text-muted, #64748b);
  font-size: 0.76rem;
}

.error-group-badge {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: var(--text, #334155);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.error-group-badge--success { color: #15803d; border-color: rgba(34, 197, 94, 0.28); }
.error-group-badge--warning { color: #b45309; border-color: rgba(245, 158, 11, 0.32); }
.error-group-badge--danger { color: #b91c1c; border-color: rgba(239, 68, 68, 0.3); }
.error-group-badge--neutral { color: #2563eb; border-color: rgba(59, 130, 246, 0.28); }

.error-insight-detail {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.92));
}

.error-insight-detail--danger { border-color: rgba(239, 68, 68, 0.26); }
.error-insight-detail--warning { border-color: rgba(245, 158, 11, 0.26); }

.error-insight-detail__header,
.error-insight-detail__item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.error-insight-detail__header span,
.error-insight-detail__header small,
.error-insight-detail__item span,
.error-insight-detail__item small {
  display: block;
  color: var(--text-muted, #64748b);
}

.error-insight-detail__header span {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-insight-detail__header strong,
.error-insight-detail__item strong {
  display: block;
  margin-top: 4px;
  color: var(--text-strong, #0f172a);
  overflow-wrap: anywhere;
}

.error-insight-detail__list {
  display: grid;
  gap: 9px;
}

.error-insight-detail__item {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.error-insight-detail__item > div:first-child { min-width: 0; }

.error-insight-detail__item > div:last-child {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.error-insight-detail__item em {
  color: var(--text-strong, #0f172a);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
}

.error-group-box--priority {
  display: grid;
  gap: 14px;
}

.error-priority-box__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.error-priority-box__header p {
  margin: 6px 0 0;
  color: var(--text-muted, #64748b);
  font-size: 0.84rem;
  line-height: 1.5;
}

.error-priority-list {
  display: grid;
  gap: 10px;
}

.error-priority-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: color-mix(in srgb, var(--executive-card-muted-bg, rgba(248, 250, 252, 0.74)) 86%, transparent);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.error-priority-item__copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.error-priority-item__copy strong {
  color: var(--text-strong, #0f172a);
  font-size: 0.95rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.error-priority-item__copy p {
  margin: 0;
  color: var(--text, #334155);
  font-size: 0.82rem;
  line-height: 1.45;
}

.error-priority-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.error-priority-item__meta > span:last-child {
  color: var(--text-muted, #64748b);
  font-size: 0.76rem;
  font-weight: 700;
}

.error-priority-item__aside {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.error-priority-item__aside em {
  color: var(--text-strong, #0f172a);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
}

.error-priority-item__reason {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .error-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .error-timeline-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .error-panel-columns {
    grid-template-columns: 1fr;
  }

  .error-priority-item {
    flex-direction: column;
  }

  .error-priority-item__aside {
    width: 100%;
    justify-items: start;
  }
}

@media (max-width: 760px) {
  .error-panel-hero {
    flex-direction: column;
  }

  .error-panel-grid {
    grid-template-columns: 1fr;
  }

  .error-timeline-chart__grid {
    grid-template-columns: repeat(12, minmax(8px, 1fr));
    overflow-x: auto;
  }

  .error-group-item {
    flex-direction: column;
  }
}

.error-analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.error-analysis-summary-card {
  position: relative;
  display: flex;
  min-height: 112px;
  flex-direction: column;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.72));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.error-analysis-summary-card::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3b82f6;
}

.error-analysis-summary-card--danger::before { background: #ef4444; }
.error-analysis-summary-card--warning::before { background: #f59e0b; }

.error-analysis-summary-card span {
  padding-left: 18px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-analysis-summary-card strong {
  color: #0f172a;
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}

.error-analysis-summary-card small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.error-event-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.error-event-actions .button {
  white-space: nowrap;
}

.modal-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1400px) {
  .error-analysis-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .error-analysis-summary-grid {
    grid-template-columns: 1fr;
  }
}

.error-detail-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.error-detail-section-title-row h4 {
  margin: 0;
}

.error-detail-snapshot-meta {
  margin: 0 0 8px;
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
  font-weight: 700;
}

.error-detail-log--sql {
  max-height: min(50vh, 520px);
  white-space: pre;
  word-break: normal;
}

.error-detail-log--snapshot-full {
  max-height: min(64vh, 680px);
  white-space: pre;
  word-break: normal;
}

@media (max-width: 760px) {
  .error-detail-section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.inline-input-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.inline-input-action .settings-input {
  flex: 1 1 auto;
  min-width: 0;
}

.inline-input-action .button {
  flex: 0 0 auto;
  align-self: stretch;
}


.error-reference-inline-panel {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.72);
}

.error-reference-inline-panel > strong {
  color: var(--text-strong, #0f172a);
  font-size: 0.88rem;
  font-weight: 900;
}

.error-reference-inline-panel > span {
  color: var(--text, #334155);
  font-size: 0.82rem;
  line-height: 1.45;
}

.error-reference-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.error-reference-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--text-strong, #0f172a);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.error-reference-inline-link:hover {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.error-reference-inline-link em {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.error-reference-inline-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-reference-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.error-reference-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
}

.error-reference-card div {
  min-width: 0;
}

.error-reference-card span {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--text-muted, #64748b);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.error-reference-card strong {
  display: block;
  color: var(--text-strong, #0f172a);
  font-size: 0.92rem;
  font-weight: 900;
}

.error-reference-card p {
  margin: 5px 0 0;
  color: var(--text, #334155);
  font-size: 0.84rem;
  line-height: 1.45;
}

.error-reference-card small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted, #64748b);
  font-size: 0.76rem;
  line-height: 1.35;
}

.error-diagnostic-box--soft {
  margin-top: 10px;
  border-color: rgba(59, 130, 246, 0.18);
  background: rgba(239, 246, 255, 0.72);
}

.error-diagnostic-box--sql {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.94), rgba(255, 251, 235, 0.86));
}

.error-diagnostic-box--sql small {
  color: #9a3412;
}

.ai-caution-box {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.92), rgba(255, 251, 235, 0.86));
}

.ai-caution-box p {
  color: #7c4a03;
}

.ai-caution-box small {
  color: #9a6700;
}

@media (max-width: 760px) {
  .error-reference-card {
    flex-direction: column;
  }
}

.error-detail-row--origin strong {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.error-detail-row--origin strong small {
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}

.error-detail-row--origin-warning strong { color: #92400e; }
.error-detail-row--origin-danger strong { color: #991b1b; }
.error-detail-row--origin-neutral strong { color: var(--text-strong, #0f172a); }

.error-detail-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.error-detail-section--raw-preview {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.error-detail-log-fade-wrapper {
  position: relative;
}

.error-detail-log-fade-wrapper.is-collapsed::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 72px;
  pointer-events: none;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.94));
}

.error-detail-log--collapsible {
  max-height: min(56vh, 620px);
  transition: max-height 160ms ease;
}

.error-detail-log--collapsed {
  max-height: 220px;
  overflow: hidden;
}

.error-sql-original-details {
  margin-top: 10px;
}

.error-sql-original-details summary {
  cursor: pointer;
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
  font-weight: 800;
}

.error-detail-log--sql-original {
  margin-top: 8px;
  max-height: 260px;
  white-space: pre;
  word-break: normal;
}

@media (max-width: 760px) {
  .error-detail-section-actions {
    justify-content: flex-start;
  }
}

.error-smart-diagnosis {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.86), rgba(255, 255, 255, 0.94));
}

.error-smart-diagnosis--success {
  border-color: rgba(22, 163, 74, 0.24);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.88), rgba(255, 255, 255, 0.94));
}

.error-smart-diagnosis--warning {
  border-color: rgba(245, 158, 11, 0.26);
}

.error-smart-diagnosis--neutral {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.94);
}

.error-smart-diagnosis__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.error-smart-diagnosis__header div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.error-smart-diagnosis__header span,
.error-smart-checklist > span,
.error-smart-diagnosis__grid article span {
  color: var(--text-muted, #64748b);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.error-smart-diagnosis__header strong {
  color: var(--text-strong, #0f172a);
  font-size: 1rem;
  line-height: 1.45;
}

.error-smart-confidence {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.error-smart-confidence--success {
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
}

.error-smart-confidence--warning {
  background: rgba(245, 158, 11, 0.13);
  color: #92400e;
}

.error-smart-confidence--neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.error-smart-diagnosis__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.error-smart-diagnosis__grid article,
.error-smart-checklist,
.error-smart-attention,
.error-smart-note {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.error-smart-diagnosis__grid article p,
.error-smart-attention p,
.error-smart-note p {
  margin: 6px 0 0;
  color: var(--text, #334155);
  font-size: 0.86rem;
  line-height: 1.52;
}

.error-smart-checklist {
  display: grid;
  gap: 8px;
}

.error-smart-checklist ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.error-smart-checklist li {
  position: relative;
  padding-left: 22px;
  color: var(--text, #334155);
  font-size: 0.86rem;
  line-height: 1.45;
}

.error-smart-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #2563eb;
  font-weight: 900;
}

.error-smart-attention {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(255, 251, 235, 0.72);
}

.error-smart-note {
  border-color: rgba(59, 130, 246, 0.18);
  background: rgba(239, 246, 255, 0.7);
}

.error-smart-attention strong,
.error-smart-note strong {
  color: var(--text-strong, #0f172a);
  font-size: 0.82rem;
  font-weight: 900;
}


.error-suggested-search-summary {
  margin-top: 0;
  border-color: rgba(203, 213, 225, 0.8);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.94));
  font-weight: 700;
}

.error-suggested-search-summary p {
  margin: 0;
  color: var(--text, #334155);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.5;
}

.error-suggested-search-summary small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.error-suggested-search-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.error-suggested-search-terms span {
  color: var(--text-muted, #64748b);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.error-suggested-search-terms em {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 999px;
  background: #fff;
  color: var(--text-strong, #0f172a);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.error-suggested-search-card span {
  color: #1d4ed8;
}

.error-smart-diagnosis > small {
  color: var(--text-muted, #64748b);
  font-size: 0.76rem;
  line-height: 1.4;
}

.error-reference-inline-panel--compact {
  margin: 0;
  background: rgba(239, 246, 255, 0.58);
}

@media (max-width: 760px) {
  .error-smart-diagnosis__header {
    flex-direction: column;
  }

  .error-smart-diagnosis__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-warning-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  background: rgba(180, 118, 0, 0.12);
  color: #8a5a00;
}

.settings-tab--unavailable {
  opacity: 0.5;
  filter: grayscale(0.85);
}

.settings-panel--disabled {
  opacity: 0.52;
  filter: grayscale(0.4);
  pointer-events: none;
  user-select: none;
}

.settings-panel--disabled .form-warning-banner {
  pointer-events: auto;
  opacity: 1;
  filter: none;
}

.ai-analysis-result {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
  color: var(--text-strong, #0f172a);
}

.ai-analysis-result h5 {
  margin: 8px 0 0;
  color: var(--text-strong, #0f172a);
  font-size: 0.9rem;
  font-weight: 900;
}

.ai-analysis-result h5:first-child {
  margin-top: 0;
}

.ai-analysis-result p {
  margin: 0;
  color: var(--text, #1e293b);
  font-size: 0.88rem;
  line-height: 1.6;
}

.ai-analysis-result ul,
.ai-analysis-result ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text, #1e293b);
  font-size: 0.88rem;
  line-height: 1.6;
}

.ai-analysis-result li + li {
  margin-top: 5px;
}

.ai-analysis-result strong {
  color: var(--text-strong, #0f172a);
}

.ai-analysis-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.ai-analysis-link:hover {
  color: #1d4ed8;
}

.ai-analysis-code {
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font: 12px/1.5 Consolas, 'Courier New', monospace;
  white-space: pre-wrap;
}

.ai-analysis-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.ai-analysis-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.45;
}

.ai-analysis-table th,
.ai-analysis-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  text-align: left;
  vertical-align: top;
}

.ai-analysis-table th {
  color: var(--text-strong, #0f172a);
  font-weight: 900;
  background: rgba(239, 246, 255, 0.88);
}

.ai-analysis-table tr:last-child td {
  border-bottom: 0;
}

.ai-analysis-table td {
  color: var(--text, #1e293b);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-analysis-raw {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.ai-analysis-raw summary {
  cursor: pointer;
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
  font-weight: 800;
}

.ai-analysis-raw pre {
  margin: 10px 0 0;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--text, #1e293b);
  font: 12px/1.5 Consolas, 'Courier New', monospace;
}

.monitoring-filters__field--statuses {
  margin-top: 10px;
}

.monitoring-filters__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.monitoring-filters__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--panel-border, #dbe4f0);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel, #fff) 88%, transparent);
  color: var(--text, #334155);
  font-size: 0.84rem;
  font-weight: 700;
}

.monitoring-filters__check input {
  margin: 0;
}

.monitoring-filters__check:has(input:checked) {
  border-color: rgba(59, 130, 246, 0.42);
  background: color-mix(in srgb, var(--tone-accent-gradient, rgba(59, 130, 246, 0.16)) 32%, var(--panel, #fff));
  color: var(--text-strong, #0f172a);
}

.monitoring-filters__check:has(input:disabled) {
  opacity: 0.7;
}

.error-event-status-stack {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.event-treatment-panel {
  display: grid;
  gap: 14px;
}

.event-treatment-status-card,
.event-treatment-composer,
.event-treatment-timeline {
  gap: 12px;
}

.event-treatment-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.event-treatment-status-pill--success {
  background: rgba(22, 163, 74, 0.12);
  color: var(--tone-success-text, #047857);
}

.event-treatment-status-pill--warning {
  background: rgba(245, 158, 11, 0.14);
  color: var(--tone-warning-text, #b45309);
}

.event-treatment-status-pill--neutral {
  background: rgba(148, 163, 184, 0.14);
  color: var(--tone-neutral-text, #475569);
}

.event-treatment-resolution {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 14px;
  background: color-mix(in srgb, var(--tone-success-gradient, rgba(34, 197, 94, 0.16)) 34%, var(--panel, #fff));
  color: var(--text, #334155);
  font-size: 0.9rem;
  line-height: 1.55;
}

.event-treatment-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.event-treatment-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--panel-border, #dbe4f0);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel, #fff) 92%, transparent);
  color: var(--text-strong, #0f172a);
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.event-treatment-tool-button.is-active {
  border-color: rgba(59, 130, 246, 0.48);
  background: color-mix(in srgb, var(--tone-accent-gradient, rgba(59, 130, 246, 0.16)) 34%, var(--panel, #fff));
  color: #2563eb;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22), 0 10px 24px rgba(59, 130, 246, 0.12);
}

.event-treatment-tool-button:hover:not(:disabled) {
  border-color: rgba(59, 130, 246, 0.42);
  background: color-mix(in srgb, var(--tone-accent-gradient, rgba(59, 130, 246, 0.16)) 30%, var(--panel, #fff));
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

.event-treatment-tool-button:disabled {
  opacity: 0.65;
  cursor: default;
}

.event-treatment-tool-button svg {
  width: 16px;
  height: 16px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.event-treatment-editor {
  min-height: 180px;
  padding: 14px;
  overflow-wrap: anywhere;
  border: 1px solid var(--panel-border, #dbe4f0);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface, #fff) 92%, transparent);
  color: var(--text, #334155);
  line-height: 1.6;
  outline: none;
}

.event-treatment-editor:focus {
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.event-treatment-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted, #64748b);
}

.event-treatment-editor p {
  margin: 0 0 0.6rem;
}

.event-treatment-editor p:last-child {
  margin-bottom: 0;
}

.event-treatment-attachments,
.event-treatment-note-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-treatment-attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone-accent-gradient, rgba(59, 130, 246, 0.16)) 26%, var(--panel, #fff));
  color: var(--text-strong, #0f172a);
  font-size: 0.78rem;
  font-weight: 700;
}

.event-treatment-attachment-pill button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.event-treatment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.event-treatment-note-list {
  display: grid;
  gap: 12px;
}

.event-treatment-note-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--panel-border, #dbe4f0);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel, #fff) 94%, transparent);
}

.event-treatment-note-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.event-treatment-note-card header div {
  display: grid;
  gap: 4px;
}

.event-treatment-note-card strong {
  color: var(--text-strong, #0f172a);
  font-size: 0.88rem;
  font-weight: 900;
}

.event-treatment-note-card span {
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
}

.event-treatment-note-body {
  color: var(--text, #334155);
  font-size: 0.88rem;
  line-height: 1.6;
}

.event-treatment-note-body > :first-child {
  margin-top: 0;
}

.event-treatment-note-body > :last-child {
  margin-bottom: 0;
}

.event-treatment-note-body img,
.event-treatment-inline-image {
  display: block;
  max-width: min(100%, 520px);
  height: auto;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid var(--panel-border, #dbe4f0);
}

@media (max-width: 760px) {
  .monitoring-filters__checks {
    flex-direction: column;
  }

  .event-treatment-actions {
    justify-content: stretch;
  }

  .event-treatment-actions .button {
    flex: 1 1 100%;
  }
}

/* ERPCC - redesign claro do modal de análise */
.error-analysis-content {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.55fr);
  gap: 14px;
  align-items: start;
}

.error-analysis-content > .form-error-banner,
.error-analysis-content > .form-success-banner,
.error-analysis-hero {
  grid-column: 1 / -1;
}

.error-analysis-hero {
  position: sticky;
  top: 0;
  z-index: 3;
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.error-analysis-section {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.045);
}

.error-analysis-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
  color: var(--text-strong, #0f172a);
  font-size: 0.9rem;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
}

.error-analysis-section > summary::-webkit-details-marker { display: none; }

.error-analysis-section > summary::after {
  content: '⌄';
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 0.9rem;
  transition: transform 160ms ease;
}

.error-analysis-section[open] > summary::after { transform: rotate(180deg); }

.error-analysis-section__body {
  padding: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.error-analysis-section--resumo-tecnico,
.error-analysis-section--query-extraida-analise-sql,
.error-analysis-section--contexto-operacional,
.error-analysis-section--ambiente-tecnico,
.error-analysis-section--fluxo-provavel-da-stack,
.error-analysis-section--callstack-extraida,
.error-analysis-section--variaveis-relevantes-interpretadas {
  grid-column: 1;
}

.error-analysis-section--diagnostico-sugerido,
.error-analysis-section--analise-por-ia,
.error-analysis-section--pesquisas-sugeridas {
  grid-column: 2;
}

.error-analysis-section--analise-por-ia {
  grid-row: 2 / span 2;
  border-color: rgba(37, 99, 235, 0.24);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.96));
}

.error-analysis-section--diagnostico-sugerido {
  border-color: rgba(34, 197, 94, 0.22);
}

.error-detail-list {
  border-top: 0;
}

.error-detail-row {
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr);
  padding: 8px 0;
}

.error-detail-log {
  max-height: 340px;
}

.error-analysis-section--technical {
  overflow: visible;
}

.error-analysis-section--ai-support {
  margin-top: 12px;
}

.error-analysis-section--ai-support .error-detail-log--technical-support {
  margin: 0;
  max-height: min(50vh, 420px);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow-x: auto;
}

.error-analysis-section--resumo-tecnico .error-detail-row:nth-child(n+7) {
  display: none;
}

.error-analysis-section--resumo-tecnico[open] .error-analysis-section__body::after {
  content: 'Abra as seções técnicas abaixo para ver fonte, linha, assinatura, ambiente, query, stack e variáveis.';
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.06);
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.ai-processing-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 68px 68px, rgba(59, 130, 246, 0.18), transparent 90px),
    linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.86));
}

.ai-processing-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.28);
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.06), 0 18px 40px rgba(37, 99, 235, 0.16);
  color: #2563eb;
  font-weight: 950;
  letter-spacing: 0.03em;
  animation: ai-neon-pulse 3.8s ease-in-out infinite;
}

.ai-processing-orb > span {
  position: relative;
  z-index: 1;
  animation: ai-neon-text 3.8s ease-in-out infinite;
}

.ai-processing-orb::before,
.ai-processing-orb::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  border: 1px dashed rgba(37, 99, 235, 0.42);
  animation: ai-orbit 3s linear infinite;
}

.ai-processing-orb::after {
  inset: -18px;
  opacity: 0.45;
  animation-duration: 4.8s;
  animation-direction: reverse;
}

.ai-processing-content strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
}

.ai-processing-content p {
  margin: 6px 0 14px;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.55;
}

.ai-processing-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.ai-processing-steps span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 850;
  text-align: center;
}

.ai-processing-steps span.is-done {
  background: rgba(34, 197, 94, 0.12);
  color: #047857;
}

.ai-processing-steps span.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.ai-processing-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.ai-processing-bar i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.95), rgba(37, 99, 235, 0.25));
  animation: ai-loading-bar 1.35s ease-in-out infinite;
}

.ai-result-panel {
  border-color: rgba(37, 99, 235, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.ai-analysis-result {
  position: relative;
  min-height: 180px;
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: inset 3px 0 0 rgba(37, 99, 235, 0.68);
}

.ai-analysis-result--typing::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -2px;
  border-radius: 2px;
  background: #2563eb;
  animation: ai-cursor-blink 0.9s steps(2, start) infinite;
}

@keyframes ai-orbit {
  to { transform: rotate(360deg); }
}

@keyframes ai-neon-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 8px rgba(37, 99, 235, 0.06),
      0 0 10px rgba(59, 130, 246, 0.12),
      0 18px 40px rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(37, 99, 235, 0.13),
      0 0 28px rgba(59, 130, 246, 0.52),
      0 0 52px rgba(59, 130, 246, 0.2),
      0 18px 40px rgba(37, 99, 235, 0.28);
    border-color: rgba(59, 130, 246, 0.52);
  }
}

@keyframes ai-neon-text {
  0%, 100% {
    text-shadow: 0 0 4px rgba(37, 99, 235, 0.25);
    opacity: 0.88;
  }
  50% {
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.8), 0 0 22px rgba(59, 130, 246, 0.4);
    opacity: 1;
  }
}

@keyframes ai-neon-pulse-green {
  0%, 100% {
    box-shadow:
      0 0 0 8px rgba(16, 185, 129, 0.07),
      0 0 10px rgba(52, 211, 153, 0.12),
      0 18px 40px rgba(16, 185, 129, 0.13);
    border-color: rgba(16, 185, 129, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(16, 185, 129, 0.14),
      0 0 26px rgba(52, 211, 153, 0.5),
      0 0 48px rgba(52, 211, 153, 0.18),
      0 18px 40px rgba(16, 185, 129, 0.26);
    border-color: rgba(52, 211, 153, 0.54);
  }
}

@keyframes ai-neon-text-green {
  0%, 100% {
    text-shadow: 0 0 4px rgba(16, 185, 129, 0.28);
    opacity: 0.88;
  }
  50% {
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.82), 0 0 22px rgba(52, 211, 153, 0.38);
    opacity: 1;
  }
}

@keyframes ai-loading-bar {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(250%); }
}

@keyframes ai-cursor-blink {
  50% { opacity: 0; }
}

@media (max-width: 1180px) {
  .error-analysis-content {
    grid-template-columns: 1fr;
  }
  .error-analysis-section--resumo-tecnico,
  .error-analysis-section--query-extraida-analise-sql,
  .error-analysis-section--contexto-operacional,
  .error-analysis-section--ambiente-tecnico,
  .error-analysis-section--fluxo-provavel-da-stack,
  .error-analysis-section--callstack-extraida,
  .error-analysis-section--variaveis-relevantes-interpretadas,
  .error-analysis-section--diagnostico-sugerido,
  .error-analysis-section--analise-por-ia,
  .error-analysis-section--pesquisas-sugeridas {
    grid-column: 1;
  }
  .error-analysis-section--analise-por-ia { grid-row: auto; }
}

@media (max-width: 760px) {
  .ai-processing-card {
    grid-template-columns: 1fr;
  }
  .ai-processing-steps {
    grid-template-columns: 1fr 1fr;
  }
}

/* ERPCC - workspace claro com menu lateral para análise de erro */
.modal-card--analysis-workspace {
  width: min(1180px, calc(100vw - 28px));
  max-height: min(92vh, 980px);
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.modal-card--analysis-workspace.is-maximized {
  width: calc(100vw - 18px);
  max-height: calc(100vh - 18px);
  border-radius: 14px;
}

.error-analysis-workspace-header {
  position: sticky;
  top: 0;
  z-index: 20;
  align-items: center;
  padding: 16px 20px 12px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.error-analysis-workspace-header h3 {
  font-size: 1.05rem;
  font-weight: 900;
}

.error-analysis-workspace-header p {
  font-size: 0.83rem;
}

.error-analysis-workspace-header .modal-card__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.error-analysis-workspace-header .button {
  border-radius: 999px;
  padding: 8px 11px;
  background: #eef3f9;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.8);
  font-weight: 760;
}

.error-analysis-workspace-header .button--ghost {
  background: #f5f6f8;
  color: #111827;
}

.error-analysis-window-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  background: #eef3f9;
  color: #334155;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.error-analysis-window-button:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(219, 234, 254, 0.88);
  color: #1d4ed8;
  transform: translateY(-1px);
}

.error-analysis-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px 18px;
  overflow: auto;
  max-height: calc(min(92vh, 980px) - 74px);
  background:
    radial-gradient(circle at 16% 0%, rgba(37, 99, 235, 0.045), transparent 260px),
    radial-gradient(circle at 100% 18%, rgba(14, 165, 233, 0.045), transparent 280px),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.99));
}

.modal-card--analysis-workspace.is-maximized .error-analysis-workspace {
  max-height: calc(100vh - 92px);
}

.error-analysis-workspace-notice {
  margin: 0;
}

.error-analysis-hero--compact {
  position: relative;
  top: auto;
  z-index: 2;
  grid-column: auto;
  padding: 14px 18px;
  border: 1px solid rgba(147, 197, 253, 0.42);
  border-radius: 17px;
  background:
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.07), transparent 230px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.error-analysis-hero--compact strong {
  max-width: 920px;
  font-size: 1rem;
  font-weight: 880;
  line-height: 1.36;
}

.error-analysis-hero--compact .status-pill {
  padding: 5px 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  font-size: 0.68rem;
}

.error-analysis-workspace-body {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.error-analysis-side-menu {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(min(92vh, 980px) - 220px);
  padding: 8px;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 250, 252, 0.88));
  box-shadow: inset -1px 0 0 rgba(226, 232, 240, 0.72);
  backdrop-filter: blur(10px);
}

.error-analysis-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  width: 38px;
  height: 30px;
  margin: 0 2px 8px auto;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #475569;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.error-analysis-menu-toggle:hover {
  border-color: rgba(147, 197, 253, 0.78);
  background: rgba(239, 246, 255, 0.92);
  color: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.error-analysis-menu-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 8px 9px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.error-analysis-menu-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 24px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: transparent;
}

.error-analysis-menu-item:hover {
  transform: none;
  background: rgba(248, 250, 252, 0.95);
}

.error-analysis-menu-item.is-active {
  background:
    radial-gradient(circle at right center, rgba(37, 99, 235, 0.08), transparent 150px),
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.38), 0 8px 18px rgba(37, 99, 235, 0.075);
}

.error-analysis-side-menu.is-collapsed .error-analysis-menu-item.is-active {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.94));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.42), 0 10px 22px rgba(37, 99, 235, 0.12);
}

.error-analysis-menu-item.is-active::before {
  background: #2563eb;
}

.error-analysis-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 880;
  letter-spacing: 0;
  line-height: 1;
}

.error-analysis-menu-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.error-analysis-menu-item.is-active .error-analysis-menu-icon {
  background: transparent;
  color: #2563eb;
  box-shadow: none;
}

.error-analysis-side-menu.is-collapsed .error-analysis-menu-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  font-size: 0.95rem;
}

.error-analysis-side-menu.is-collapsed .error-analysis-menu-icon svg {
  width: 17px;
  height: 17px;
}

.error-analysis-menu-copy {
  display: block;
  min-width: 0;
}

.error-analysis-menu-copy strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 860;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-analysis-menu-copy small {
  display: block;
  margin-top: 3px;
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 720;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-analysis-menu-item em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 82px;
  min-height: 22px;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 860;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-analysis-main-pane {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.error-analysis-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background:
    radial-gradient(circle at 92% 15%, rgba(37, 99, 235, 0.055), transparent 180px),
    linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.94));
}

.error-analysis-pane-header span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-analysis-pane-header h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1.06rem;
  font-weight: 880;
}

.error-analysis-pane-header p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.error-analysis-pane-header em {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 860;
}

.error-analysis-pane-content {
  padding: 16px;
  animation: erpcc-panel-fade 180ms ease both;
}

.error-analysis-panel-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.error-analysis-main-card,
.error-analysis-empty-state {
  padding: 15px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.error-analysis-main-card--overview {
  border-color: rgba(191, 219, 254, 0.92);
  background:
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.12), transparent 250px),
    linear-gradient(135deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.94)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.08);
}

.error-analysis-main-card--overview .error-analysis-card-heading strong {
  font-size: 1.25rem;
  line-height: 1.25;
}

.error-analysis-main-card--overview .error-analysis-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.error-analysis-workspace .error-reference-card {
  align-items: center;
  border-color: rgba(226, 232, 240, 0.92);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.error-analysis-workspace .error-reference-card .button {
  border-radius: 999px;
  padding: 8px 11px;
  background: #eef3f9;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.8);
  font-weight: 760;
}

.error-analysis-card-heading span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-analysis-card-heading strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 950;
}

.error-analysis-card-heading p {
  margin: 8px 0 0;
  color: #334155;
  line-height: 1.55;
}

.error-analysis-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.error-analysis-kpi-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

.error-analysis-kpi-grid span,
.error-analysis-kpi-grid small {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
}

.error-analysis-kpi-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 950;
}

.error-analysis-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.error-analysis-card-title-row h4,
.error-analysis-main-card > h4 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 860;
}

.error-analysis-card-title-row h4 { margin-bottom: 0; }
.error-analysis-card-title-row small { color: #64748b; font-size: 0.78rem; font-weight: 800; }

.ai-command-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 0;
}

.ai-command-bar__actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.ai-command-bar__actions .button--primary-loading {
  opacity: 0.92;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.22), 0 6px 18px rgba(37, 99, 235, 0.16);
}

.ai-stop-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 999px;
  padding: 7px 13px 7px 9px;
  background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%);
  color: #991b1b;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.ai-stop-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  box-shadow:
    0 1px 2px rgba(127, 29, 29, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.ai-stop-button__icon::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  background: #ffffff;
}

.ai-stop-button__label {
  line-height: 1;
}

.ai-stop-button:hover {
  transform: translateY(-1px);
  border-color: rgba(220, 38, 38, 0.48);
  background: linear-gradient(180deg, #ffe4e6 0%, #fecaca 100%);
  box-shadow:
    0 4px 14px rgba(220, 38, 38, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.ai-stop-button:active {
  transform: translateY(0);
  box-shadow:
    0 1px 4px rgba(220, 38, 38, 0.14),
    inset 0 1px 2px rgba(127, 29, 29, 0.12);
}

.ai-stop-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(248, 113, 113, 0.35),
    0 4px 14px rgba(220, 38, 38, 0.14);
}

.ai-command-bar span,
.ai-command-bar em {
  color: #64748b;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.ai-processing-card--focus {
  margin-top: 0;
  border-color: rgba(37, 99, 235, 0.26);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.12);
}

.ai-processing-card--focus small {
  display: block;
  margin-top: 10px;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 900;
}

.error-analysis-empty-state {
  text-align: center;
  color: #64748b;
}

.error-analysis-empty-state strong {
  display: block;
  color: #0f172a;
  font-size: 0.96rem;
}

.error-analysis-empty-state p {
  margin: 8px 0 0;
}

@keyframes erpcc-panel-fade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1040px) {
  .error-analysis-workspace-body {
    grid-template-columns: 1fr;
  }
  .error-analysis-main-card--overview .error-analysis-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .error-analysis-side-menu {
    position: relative;
    top: auto;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .modal-card--analysis-workspace {
    width: calc(100vw - 12px);
  }
  .error-analysis-workspace {
    padding: 10px;
  }
  .error-analysis-side-menu,
  .error-analysis-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.ai-processing-card--completed {
  border-color: rgba(16, 185, 129, 0.28);
  background:
    radial-gradient(circle at 68px 68px, rgba(16, 185, 129, 0.16), transparent 90px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.9));
}

.ai-processing-card--completed .ai-processing-orb {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.08), 0 18px 40px rgba(16, 185, 129, 0.15);
  animation: ai-neon-pulse-green 4.2s ease-in-out infinite;
}

.ai-processing-card--completed .ai-processing-orb > span {
  animation: ai-neon-text-green 4.2s ease-in-out infinite;
}

.ai-processing-card--completed .ai-processing-orb::before,
.ai-processing-card--completed .ai-processing-orb::after {
  border-color: rgba(16, 185, 129, 0.38);
  animation-play-state: paused;
}

.ai-processing-steps .is-final {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.24);
}

.ai-processing-card--completed .ai-processing-bar i {
  width: 100%;
  background: linear-gradient(90deg, #34d399, #2563eb);
}

.error-occurrence-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.error-occurrence-card {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.045);
}

.error-occurrence-card.is-expanded {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.1);
}

.error-occurrence-card__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(239, 246, 255, 0.74));
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}

.error-occurrence-card__summary strong,
.error-occurrence-card__summary small,
.error-occurrence-card__summary em {
  display: block;
}

.error-occurrence-card__summary small {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 750;
}

.error-occurrence-card__summary em {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}

.error-occurrence-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 16px 14px;
}

.error-occurrence-meta-grid div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

.error-occurrence-meta-grid span {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.error-occurrence-meta-grid strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-detail-log--occurrence {
  margin: 0 16px 16px;
  max-height: 360px;
}

.error-analysis-main-pane {
  min-width: 0;
}

.error-analysis-pane-content {
  min-height: 420px;
}

@media (max-width: 900px) {
  .error-occurrence-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .error-occurrence-meta-grid {
    grid-template-columns: 1fr;
  }
}

.integrations-page .github-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  margin-bottom: 18px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 10%, rgba(59, 130, 246, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,246,255,0.9));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.github-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.github-hero h2 {
  margin: 10px 0 8px;
  color: #0f172a;
  font-size: 24px;
}

.github-hero p {
  max-width: 760px;
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.github-hero__stats {
  min-width: 170px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  gap: 4px 10px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.github-hero__stats strong {
  color: #2563eb;
  font-size: 24px;
}

.github-hero__stats span {
  align-self: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.github-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.github-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
}

.github-message--success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.github-message--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.github-message--info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.github-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.github-repo-list {
  display: grid;
  gap: 12px;
}

.github-repo-card {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.github-repo-card__header,
.github-repo-card__actions,
.github-repo-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.github-repo-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #0f172a;
}

.github-repo-card p,
.github-repo-card__meta {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.github-repo-card__meta {
  margin-top: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.github-status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.github-status--active { background: #dcfce7; color: #15803d; }
.github-status--inactive { background: #f1f5f9; color: #64748b; }

.github-test {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.github-test--success { background: #ecfdf5; color: #047857; }
.github-test--error { background: #fef2f2; color: #b91c1c; }
.github-test--info { background: #eff6ff; color: #1d4ed8; }

.github-repo-card__actions {
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .integrations-page .github-hero,
  .github-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

.error-analysis-workspace-body.is-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.error-analysis-workspace-body.is-collapsed .error-analysis-side-menu {
  padding: 8px 8px 14px;
}

.error-analysis-workspace-body.is-collapsed .error-analysis-menu-toggle {
  width: 42px;
  height: 34px;
  margin: 0 auto 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.88);
  color: #2563eb;
  box-shadow: none;
}

.error-analysis-workspace-body.is-collapsed .error-analysis-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

.error-analysis-workspace-body.is-collapsed .error-analysis-menu-item::before {
  display: none;
}

.error-analysis-workspace-body.is-collapsed .error-analysis-menu-item:hover {
  transform: none;
  background: rgba(239, 246, 255, 0.72);
}

.error-analysis-workspace-body.is-collapsed .error-analysis-menu-copy,
.error-analysis-workspace-body.is-collapsed .error-analysis-menu-item em {
  display: none;
}

.error-analysis-workspace-body.is-collapsed .error-analysis-menu-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-align: center;
}


.error-analysis-github-commits {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(191, 219, 254, 0.82);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(239, 246, 255, 0.72));
}

.error-analysis-github-commits h5 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 950;
}

.error-analysis-github-commit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.error-analysis-github-commit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.error-analysis-github-commit strong {
  display: block;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.35;
}

.error-analysis-github-commit span,
.error-analysis-github-commit small {
  display: block;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 800;
}

.error-analysis-github-commit a {
  align-self: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.73rem;
  font-weight: 900;
  text-decoration: none;
}

.error-analysis-workspace-body.is-collapsed .error-analysis-menu-item.is-active {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.94));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.46), 0 8px 18px rgba(37, 99, 235, 0.11);
}

.error-analysis-workspace-body.is-collapsed .error-analysis-menu-item.is-active .error-analysis-menu-icon {
  color: #2563eb;
  font-weight: 950;
}

/* Manutenção programada */
.maintenance-page {
  gap: 18px;
}

.maintenance-active-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(183, 121, 31, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 62%, #f8fbff 100%);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.maintenance-active-card h2 {
  margin: 10px 0 6px;
  font-size: 22px;
}

.maintenance-active-card p {
  margin: 0;
  color: var(--muted);
}

.maintenance-active-card__meta {
  min-width: 230px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(183, 121, 31, 0.14);
}

.maintenance-active-card__meta span {
  color: var(--muted);
  font-size: 13px;
}

.maintenance-form-card {
  margin-top: 16px;
}

.maintenance-toggle {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .maintenance-active-card {
    flex-direction: column;
  }

  .maintenance-active-card__meta {
    min-width: 0;
  }
}

/* Tema escuro */
:root[data-theme='dark'] .topbar {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(17, 24, 39, 0.98) 48%, rgba(30, 41, 59, 0.94) 100%);
  border-bottom-color: rgba(51, 65, 85, 0.9);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

:root[data-theme='dark'] .topbar__mode-control {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(51, 65, 85, 0.9);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

:root[data-theme='dark'] .topbar__mode-control:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.12);
}

:root[data-theme='dark'] .job-form-overlay {
  background: rgba(2, 6, 23, 0.78);
}

:root[data-theme='dark'] .job-form-card {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

:root[data-theme='dark'] .form-section-card {
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme='dark'] .toggle-chip {
  background: #1e293b;
  color: var(--text);
  border-color: rgba(51, 65, 85, 0.95);
}

:root[data-theme='dark'] .toggle-chip:hover:not(:disabled):not(.toggle-chip--active) {
  background: #243044;
  border-color: rgba(96, 165, 250, 0.35);
}

:root[data-theme='dark'] .toggle-chip--active {
  background: var(--primary-soft);
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.45);
}

:root[data-theme='dark'] .form-helper-banner {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
}

:root[data-theme='dark'] .form-helper-banner--info {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.28);
}

:root[data-theme='dark'] .checkbox-label input[type='checkbox'] {
  accent-color: #3b82f6;
}

:root[data-theme='dark'] input[type='datetime-local'],
:root[data-theme='dark'] input[type='time'],
:root[data-theme='dark'] input[type='date'] {
  color-scheme: dark;
}

:root[data-theme='dark'] select option {
  background: var(--input-bg);
  color: var(--text);
}

:root[data-theme='dark'] .text-input:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

:root[data-theme='dark'] .summary-card,
:root[data-theme='dark'] .panel,
:root[data-theme='dark'] .sub-panel,
:root[data-theme='dark'] .pagination,
:root[data-theme='dark'] .form-section-card,
:root[data-theme='dark'] .auth-card,
:root[data-theme='dark'] .auth-login-panel,
:root[data-theme='dark'] .mode-select-card,
:root[data-theme='dark'] .license-panel,
:root[data-theme='dark'] .modal-card,
:root[data-theme='dark'] .github-repo-card,
:root[data-theme='dark'] .maintenance-active-card,
:root[data-theme='dark'] .maintenance-form-card,
:root[data-theme='dark'] .error-analysis-main-pane,
:root[data-theme='dark'] .error-analysis-main-card,
:root[data-theme='dark'] .error-analysis-empty-state,
:root[data-theme='dark'] .error-reference-card,
:root[data-theme='dark'] .error-detail-field,
:root[data-theme='dark'] .error-detail-section,
:root[data-theme='dark'] .error-detail-summary {
  border-color: var(--panel-border);
  background: rgba(17, 24, 39, 0.94);
  box-shadow: var(--shadow-soft);
}

:root[data-theme='dark'] .button--secondary,
:root[data-theme='dark'] .button--ghost,
:root[data-theme='dark'] .action-button--secondary,
:root[data-theme='dark'] .settings-tab,
:root[data-theme='dark'] .error-analysis-workspace-header .button,
:root[data-theme='dark'] .error-analysis-workspace .error-reference-card .button {
  border-color: rgba(51, 65, 85, 0.9);
  background: #1e293b;
  color: var(--text);
  box-shadow: none;
}

:root[data-theme='dark'] .button--primary,
:root[data-theme='dark'] .action-button--primary {
  background: #3b82f6;
  color: #ffffff;
}

:root[data-theme='dark'] .settings-tab--active,
:root[data-theme='dark'] .sidebar-link--active {
  background: var(--primary-soft);
  color: #dbeafe;
}

:root[data-theme='dark'] .settings-input,
:root[data-theme='dark'] .settings-textarea,
:root[data-theme='dark'] .text-input,
:root[data-theme='dark'] .auth-field input,
:root[data-theme='dark'] select,
:root[data-theme='dark'] textarea {
  border-color: var(--panel-border);
  background: var(--input-bg);
  color: var(--text);
}

:root[data-theme='dark'] .settings-input::placeholder,
:root[data-theme='dark'] .settings-textarea::placeholder,
:root[data-theme='dark'] .text-input::placeholder,
:root[data-theme='dark'] .auth-field input::placeholder {
  color: #64748b;
}

:root[data-theme='dark'] .data-table th,
:root[data-theme='dark'] .data-table td,
:root[data-theme='dark'] .data-table--jobs th,
:root[data-theme='dark'] .data-table--jobs td,
:root[data-theme='dark'] .list-item {
  border-color: var(--table-border);
}

:root[data-theme='dark'] .data-table th,
:root[data-theme='dark'] .data-table--jobs th,
:root[data-theme='dark'] .data-table--jobs th.sticky-col {
  background: #111827;
  color: var(--text-muted);
}

:root[data-theme='dark'] .data-table .sticky-col,
:root[data-theme='dark'] .data-table .sticky-col--actions,
:root[data-theme='dark'] .data-table--jobs .sticky-col,
:root[data-theme='dark'] .data-table--jobs .sticky-col--actions,
:root[data-theme='dark'] .data-table--jobs .sticky-col--state {
  background: #111827;
}

:root[data-theme='dark'] .table-primary,
:root[data-theme='dark'] .page-title,
:root[data-theme='dark'] .panel__title,
:root[data-theme='dark'] .dashboard-section__title,
:root[data-theme='dark'] .auth-card__header h2,
:root[data-theme='dark'] .mode-select-card strong,
:root[data-theme='dark'] .error-reference-card strong,
:root[data-theme='dark'] .error-detail-row strong,
:root[data-theme='dark'] .error-detail-summary strong {
  color: var(--text-strong);
}

:root[data-theme='dark'] .table-secondary,
:root[data-theme='dark'] .page-subtitle,
:root[data-theme='dark'] .panel__hint,
:root[data-theme='dark'] .summary-card__hint,
:root[data-theme='dark'] .auth-card__header p,
:root[data-theme='dark'] .mode-select-card span,
:root[data-theme='dark'] .error-reference-card p,
:root[data-theme='dark'] .error-reference-card small,
:root[data-theme='dark'] .error-detail-row span,
:root[data-theme='dark'] .error-detail-summary small {
  color: var(--text-muted);
}

:root[data-theme='dark'] .modal-backdrop {
  background: rgba(2, 6, 23, 0.72);
}

:root[data-theme='dark'] .modal-card--analysis-workspace,
:root[data-theme='dark'] .error-analysis-workspace-header {
  border-color: var(--panel-border);
  background: rgba(15, 23, 42, 0.97);
}

:root[data-theme='dark'] .error-analysis-window-button {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(30, 41, 59, 0.9);
  color: var(--text);
}

:root[data-theme='dark'] .error-analysis-window-button:hover {
  border-color: rgba(96, 165, 250, 0.44);
  background: rgba(30, 64, 175, 0.28);
  color: #bfdbfe;
}

:root[data-theme='dark'] .error-analysis-workspace {
  background:
    radial-gradient(circle at 16% 0%, rgba(96, 165, 250, 0.08), transparent 260px),
    radial-gradient(circle at 100% 18%, rgba(20, 184, 166, 0.06), transparent 280px),
    linear-gradient(180deg, rgba(11, 17, 32, 0.98), rgba(15, 23, 42, 0.99));
}

:root[data-theme='dark'] .error-analysis-hero--compact,
:root[data-theme='dark'] .error-analysis-pane-header,
:root[data-theme='dark'] .error-suggested-search-summary,
:root[data-theme='dark'] .error-analysis-main-card--overview {
  border-color: rgba(59, 130, 246, 0.26);
  background:
    radial-gradient(circle at right top, rgba(96, 165, 250, 0.11), transparent 230px),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96));
}

:root[data-theme='dark'] .error-analysis-main-card--overview {
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
}

:root[data-theme='dark'] .error-analysis-side-menu {
  border-color: var(--panel-border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.94));
  box-shadow: inset -1px 0 0 rgba(51, 65, 85, 0.74);
}

:root[data-theme='dark'] .error-analysis-menu-toggle,
:root[data-theme='dark'] .error-analysis-menu-item:hover,
:root[data-theme='dark'] .error-analysis-menu-item.is-active,
:root[data-theme='dark'] .error-analysis-workspace-body.is-collapsed .error-analysis-menu-item.is-active {
  border-color: rgba(59, 130, 246, 0.32);
  background: rgba(30, 41, 59, 0.82);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22);
}

:root[data-theme='dark'] .error-analysis-menu-copy strong,
:root[data-theme='dark'] .error-analysis-pane-header h4,
:root[data-theme='dark'] .error-analysis-hero strong,
:root[data-theme='dark'] .error-analysis-card-heading strong,
:root[data-theme='dark'] .error-analysis-card-title-row h4,
:root[data-theme='dark'] .error-analysis-main-card > h4,
:root[data-theme='dark'] .ai-analysis-result h5,
:root[data-theme='dark'] .ai-analysis-result strong {
  color: var(--text-strong);
}

:root[data-theme='dark'] .error-analysis-menu-copy small,
:root[data-theme='dark'] .error-analysis-pane-header p,
:root[data-theme='dark'] .error-analysis-hero small,
:root[data-theme='dark'] .error-analysis-card-heading p,
:root[data-theme='dark'] .ai-analysis-result p,
:root[data-theme='dark'] .ai-analysis-result li {
  color: var(--text);
}

:root[data-theme='dark'] .log-snapshot-viewer,
:root[data-theme='dark'] .error-detail-log,
:root[data-theme='dark'] .ai-analysis-code,
:root[data-theme='dark'] .ai-analysis-raw pre {
  border-color: var(--panel-border);
  background: #020617;
  color: #dbeafe;
}

:root[data-theme='dark'] .ai-analysis-table-wrap {
  border-color: var(--panel-border);
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme='dark'] .ai-analysis-table th {
  color: #e2e8f0;
  background: rgba(30, 64, 175, 0.22);
}

:root[data-theme='dark'] .ai-analysis-table td {
  color: #cbd5e1;
}

:root[data-theme='dark'] .ai-analysis-table th,
:root[data-theme='dark'] .ai-analysis-table td {
  border-bottom-color: rgba(148, 163, 184, 0.16);
}

:root[data-theme='dark'] .form-error-banner {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
}

:root[data-theme='dark'] .form-success-banner,
:root[data-theme='dark'] .status-banner--success {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(20, 83, 45, 0.34);
  color: #bbf7d0;
}

:root[data-theme='dark'] .status-banner--error,
:root[data-theme='dark'] .status-pill--danger {
  background: rgba(127, 29, 29, 0.38);
  color: #fecaca;
}

:root[data-theme='dark'] .status-pill--success {
  background: rgba(20, 83, 45, 0.38);
  color: #bbf7d0;
}

:root[data-theme='dark'] .status-pill--warning {
  background: rgba(120, 53, 15, 0.38);
  color: #fde68a;
}

:root[data-theme='dark'] .status-pill--neutral,
:root[data-theme='dark'] .status-pill--info {
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
}

:root[data-theme='dark'] .maintenance-active-card {
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.12), rgba(17, 24, 39, 0.96) 55%, rgba(15, 23, 42, 0.98));
}

:root[data-theme='dark'] .maintenance-active-card__meta {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
}

:root[data-theme='dark'] .auth-shell--login {
  background:
    radial-gradient(circle at 18% 16%, rgba(14, 165, 233, 0.12), transparent 30%),
    radial-gradient(circle at 86% 24%, rgba(96, 165, 250, 0.1), transparent 34%),
    linear-gradient(135deg, #020617 0%, #0b1120 48%, #111827 100%);
}

:root[data-theme='dark'] .auth-shell--login::before {
  background: rgba(14, 165, 233, 0.1);
}

:root[data-theme='dark'] .auth-shell--login::after {
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(15, 23, 42, 0.42);
}

:root[data-theme='dark'] .auth-card--login-modern {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.4);
}

:root[data-theme='dark'] .auth-login-panel {
  background:
    radial-gradient(circle at 86% 12%, rgba(59, 130, 246, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.97));
}

:root[data-theme='dark'] .auth-mode-badge,
:root[data-theme='dark'] .github-hero__eyebrow {
  border-color: rgba(56, 189, 248, 0.26);
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
}

:root[data-theme='dark'] .auth-input--modern {
  border-color: rgba(71, 85, 105, 0.86);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

:root[data-theme='dark'] .auth-forgot-card--modern {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(30, 41, 59, 0.72);
}

:root[data-theme='dark'] .topbar__license-badge {
  border-color: rgba(96, 165, 250, 0.2);
  background: rgba(30, 41, 59, 0.78);
  color: var(--text-strong);
}

:root[data-theme='dark'] .topbar__license-badge strong {
  color: #7dd3fc;
}

:root[data-theme='dark'] .monitoring-service-card__grid > div,
:root[data-theme='dark'] .error-panel-hero,
:root[data-theme='dark'] .error-panel-card,
:root[data-theme='dark'] .error-panel-story,
:root[data-theme='dark'] .error-timeline-chart__grid,
:root[data-theme='dark'] .error-timeline-kpis > div,
:root[data-theme='dark'] .error-timeline-detail,
:root[data-theme='dark'] .error-timeline-detail__item,
:root[data-theme='dark'] .error-insight-detail,
:root[data-theme='dark'] .error-insight-detail__item,
:root[data-theme='dark'] .error-group-box,
:root[data-theme='dark'] .error-group-item,
:root[data-theme='dark'] .error-analysis-summary-card,
:root[data-theme='dark'] .license-info-grid div,
:root[data-theme='dark'] .license-summary-list__item,
:root[data-theme='dark'] .license-overview-card,
:root[data-theme='dark'] .license-management-card,
:root[data-theme='dark'] .license-diagnostics-card,
:root[data-theme='dark'] .integrations-page .github-hero,
:root[data-theme='dark'] .github-hero__stats {
  border-color: var(--panel-border);
  background: var(--executive-card-bg);
  box-shadow: var(--shadow-soft);
}

:root[data-theme='dark'] .error-panel-hero,
:root[data-theme='dark'] .integrations-page .github-hero {
  background: var(--executive-panel-bg);
}

:root[data-theme='dark'] .error-timeline-chart__grid {
  background: var(--executive-chart-bg);
}

:root[data-theme='dark'] .error-group-item,
:root[data-theme='dark'] .error-timeline-kpis > div,
:root[data-theme='dark'] .error-timeline-detail__item,
:root[data-theme='dark'] .error-insight-detail__item,
:root[data-theme='dark'] .monitoring-service-card__grid > div,
:root[data-theme='dark'] .license-summary-list__item,
:root[data-theme='dark'] .github-hero__stats {
  background: var(--executive-card-muted-bg);
}

:root[data-theme='dark'] .monitoring-service-card__grid strong,
:root[data-theme='dark'] .error-panel-hero h2,
:root[data-theme='dark'] .error-panel-card strong,
:root[data-theme='dark'] .error-panel-story strong,
:root[data-theme='dark'] .error-timeline-kpis strong,
:root[data-theme='dark'] .error-timeline-detail__header strong,
:root[data-theme='dark'] .error-timeline-detail__item strong,
:root[data-theme='dark'] .error-insight-detail__header strong,
:root[data-theme='dark'] .error-insight-detail__item strong,
:root[data-theme='dark'] .error-group-box h3,
:root[data-theme='dark'] .error-group-item strong,
:root[data-theme='dark'] .error-analysis-summary-card strong,
:root[data-theme='dark'] .github-hero h2,
:root[data-theme='dark'] .github-repo-card h3,
:root[data-theme='dark'] .license-info-grid strong,
:root[data-theme='dark'] .license-summary-list__item strong,
:root[data-theme='dark'] .license-overview-card strong,
:root[data-theme='dark'] .license-management-card__header h3 {
  color: var(--text-strong);
}

:root[data-theme='dark'] .monitoring-service-card__grid span,
:root[data-theme='dark'] .monitoring-service-card__grid small,
:root[data-theme='dark'] .error-panel-hero span,
:root[data-theme='dark'] .error-panel-hero p,
:root[data-theme='dark'] .error-panel-card span,
:root[data-theme='dark'] .error-panel-card small,
:root[data-theme='dark'] .error-panel-card em,
:root[data-theme='dark'] .error-panel-story p,
:root[data-theme='dark'] .error-timeline-chart__column small,
:root[data-theme='dark'] .error-timeline-footnote,
:root[data-theme='dark'] .error-timeline-kpis span,
:root[data-theme='dark'] .error-timeline-kpis small,
:root[data-theme='dark'] .error-timeline-detail__header span,
:root[data-theme='dark'] .error-timeline-detail__header small,
:root[data-theme='dark'] .error-timeline-detail__item span,
:root[data-theme='dark'] .error-timeline-detail__item small,
:root[data-theme='dark'] .error-insight-detail__header span,
:root[data-theme='dark'] .error-insight-detail__header small,
:root[data-theme='dark'] .error-insight-detail__item span,
:root[data-theme='dark'] .error-insight-detail__item small,
:root[data-theme='dark'] .error-priority-item__reason,
:root[data-theme='dark'] .error-panel-legend,
:root[data-theme='dark'] .error-group-item span,
:root[data-theme='dark'] .error-analysis-summary-card span,
:root[data-theme='dark'] .error-analysis-summary-card small,
:root[data-theme='dark'] .github-hero p,
:root[data-theme='dark'] .github-hero__stats span,
:root[data-theme='dark'] .github-repo-card p,
:root[data-theme='dark'] .github-repo-card__meta,
:root[data-theme='dark'] .license-info-grid span,
:root[data-theme='dark'] .license-summary-list__item span,
:root[data-theme='dark'] .license-overview-card small,
:root[data-theme='dark'] .license-management-card__header p,
:root[data-theme='dark'] .license-activation-help {
  color: var(--text-muted);
}

:root[data-theme='dark'] .github-message--success,
:root[data-theme='dark'] .github-test--success {
  border: 1px solid rgba(74, 222, 128, 0.24);
  background: rgba(20, 83, 45, 0.34);
  color: #bbf7d0;
}

:root[data-theme='dark'] .github-message--error,
:root[data-theme='dark'] .github-test--error {
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
}

:root[data-theme='dark'] .github-message--info,
:root[data-theme='dark'] .github-test--info {
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(30, 64, 175, 0.24);
  color: #bfdbfe;
}

:root[data-theme='dark'] .github-status--active {
  background: rgba(20, 83, 45, 0.5);
  color: #bbf7d0;
}

:root[data-theme='dark'] .github-status--inactive {
  background: rgba(30, 41, 59, 0.88);
  color: #cbd5e1;
}

:root[data-theme='dark'] .action-icon-button:not(.action-icon-button--primary):not(.action-icon-button--success):not(.action-icon-button--warning):not(.action-icon-button--danger),
:root[data-theme='dark'] .action-icon-btn:not(.primary):not(.success):not(.warning):not(.danger),
:root[data-theme='dark'] .action-icon-btn.neutral,
:root[data-theme='dark'] .action-icon-btn--delete-neutral,
:root[data-theme='dark'] .action-icon-btn--delete-neutral.danger {
  border-color: var(--panel-border);
  background: rgba(30, 41, 59, 0.88);
  color: var(--text);
}

:root[data-theme='dark'] .action-icon-button:not(.action-icon-button--primary):not(.action-icon-button--success):not(.action-icon-button--warning):not(.action-icon-button--danger):hover:not(:disabled),
:root[data-theme='dark'] .action-icon-btn:not(.primary):not(.success):not(.warning):not(.danger):hover:not(:disabled),
:root[data-theme='dark'] .action-icon-btn--delete-neutral:hover:not(:disabled),
:root[data-theme='dark'] .action-icon-btn--delete-neutral.danger:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.92);
  border-color: rgba(96, 165, 250, 0.32);
}

:root[data-theme='dark'] .error-analysis-kpi-grid div,
:root[data-theme='dark'] .error-smart-diagnosis__grid article,
:root[data-theme='dark'] .error-smart-checklist,
:root[data-theme='dark'] .error-smart-attention,
:root[data-theme='dark'] .error-smart-note,
:root[data-theme='dark'] .ai-analysis-result,
:root[data-theme='dark'] .error-occurrence-card,
:root[data-theme='dark'] .error-occurrence-meta-grid div,
:root[data-theme='dark'] .error-analysis-github-commits,
:root[data-theme='dark'] .error-analysis-github-commit {
  border-color: var(--panel-border);
  background: var(--executive-card-bg);
  box-shadow: var(--shadow-soft);
}

:root[data-theme='dark'] .error-smart-diagnosis,
:root[data-theme='dark'] .error-smart-diagnosis--success,
:root[data-theme='dark'] .error-smart-diagnosis--warning,
:root[data-theme='dark'] .error-smart-diagnosis--neutral,
:root[data-theme='dark'] .ai-processing-card,
:root[data-theme='dark'] .ai-processing-card--completed,
:root[data-theme='dark'] .ai-result-panel {
  border-color: rgba(96, 165, 250, 0.24);
  background: var(--executive-panel-bg);
}

:root[data-theme='dark'] .error-analysis-section {
  border-color: var(--panel-border);
  background: var(--executive-panel-bg);
  box-shadow: var(--shadow-soft);
}

:root[data-theme='dark'] .error-analysis-section > summary {
  color: var(--text-strong, #f8fafc);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.94));
}

:root[data-theme='dark'] .error-analysis-section > summary::after {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

:root[data-theme='dark'] .error-analysis-section__body {
  border-top-color: rgba(148, 163, 184, 0.16);
}

:root[data-theme='dark'] .error-analysis-section--ai-support .error-detail-log--technical-support {
  border-color: var(--panel-border);
  background: #020617;
  color: #dbeafe;
}

:root[data-theme='dark'] .error-smart-attention {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.22);
}

:root[data-theme='dark'] .error-smart-note,
:root[data-theme='dark'] .error-reference-inline-panel--compact {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(30, 64, 175, 0.16);
}

:root[data-theme='dark'] .ai-processing-orb {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(15, 23, 42, 0.92);
  color: #93c5fd;
  animation-name: ai-neon-pulse-dark;
}

:root[data-theme='dark'] .ai-processing-orb > span {
  animation-name: ai-neon-text-dark;
}

:root[data-theme='dark'] .ai-processing-card--completed .ai-processing-orb {
  border-color: rgba(52, 211, 153, 0.38);
  color: #34d399;
  animation-name: ai-neon-pulse-green-dark;
}

:root[data-theme='dark'] .ai-processing-card--completed .ai-processing-orb > span {
  animation-name: ai-neon-text-green-dark;
}

@keyframes ai-neon-pulse-dark {
  0%, 100% {
    box-shadow:
      0 0 0 8px rgba(96, 165, 250, 0.08),
      0 0 12px rgba(96, 165, 250, 0.18),
      0 18px 40px rgba(37, 99, 235, 0.22);
    border-color: rgba(96, 165, 250, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 12px rgba(96, 165, 250, 0.18),
      0 0 32px rgba(147, 197, 253, 0.65),
      0 0 60px rgba(96, 165, 250, 0.28),
      0 18px 40px rgba(37, 99, 235, 0.38);
    border-color: rgba(147, 197, 253, 0.65);
  }
}

@keyframes ai-neon-text-dark {
  0%, 100% {
    text-shadow: 0 0 6px rgba(96, 165, 250, 0.35);
    opacity: 0.85;
  }
  50% {
    text-shadow: 0 0 14px rgba(147, 197, 253, 0.95), 0 0 30px rgba(96, 165, 250, 0.55);
    opacity: 1;
  }
}

@keyframes ai-neon-pulse-green-dark {
  0%, 100% {
    box-shadow:
      0 0 0 8px rgba(52, 211, 153, 0.09),
      0 0 12px rgba(52, 211, 153, 0.2),
      0 18px 40px rgba(16, 185, 129, 0.2);
    border-color: rgba(52, 211, 153, 0.34);
  }
  50% {
    box-shadow:
      0 0 0 12px rgba(52, 211, 153, 0.18),
      0 0 30px rgba(52, 211, 153, 0.65),
      0 0 56px rgba(52, 211, 153, 0.28),
      0 18px 40px rgba(16, 185, 129, 0.36);
    border-color: rgba(52, 211, 153, 0.7);
  }
}

@keyframes ai-neon-text-green-dark {
  0%, 100% {
    text-shadow: 0 0 6px rgba(52, 211, 153, 0.38);
    opacity: 0.85;
  }
  50% {
    text-shadow: 0 0 14px rgba(52, 211, 153, 0.95), 0 0 30px rgba(52, 211, 153, 0.5);
    opacity: 1;
  }
}

:root[data-theme='dark'] .ai-processing-steps span {
  background: rgba(51, 65, 85, 0.82);
  color: var(--text-muted);
}

:root[data-theme='dark'] .ai-processing-steps span.is-active {
  background: rgba(37, 99, 235, 0.28);
  color: #bfdbfe;
}

:root[data-theme='dark'] .ai-processing-steps span.is-done,
:root[data-theme='dark'] .ai-processing-steps .is-final,
:root[data-theme='dark'] .error-smart-confidence--success {
  background: rgba(20, 83, 45, 0.42);
  color: #bbf7d0;
}

:root[data-theme='dark'] .error-smart-confidence--warning {
  background: rgba(120, 53, 15, 0.42);
  color: #fde68a;
}

:root[data-theme='dark'] .error-smart-confidence--neutral {
  background: rgba(51, 65, 85, 0.82);
  color: #cbd5e1;
}

:root[data-theme='dark'] .ai-processing-bar {
  background: var(--executive-track-bg);
}

:root[data-theme='dark'] .error-occurrence-card__summary {
  background: var(--executive-row-bg);
  color: var(--text-strong);
}

:root[data-theme='dark'] .error-occurrence-card__summary em,
:root[data-theme='dark'] .error-suggested-search-terms em,
:root[data-theme='dark'] .error-analysis-github-commit a {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(30, 64, 175, 0.2);
  color: #bfdbfe;
}

:root[data-theme='dark'] .error-analysis-kpi-grid strong,
:root[data-theme='dark'] .error-smart-diagnosis__header strong,
:root[data-theme='dark'] .error-smart-attention strong,
:root[data-theme='dark'] .error-smart-note strong,
:root[data-theme='dark'] .ai-processing-content strong,
:root[data-theme='dark'] .error-occurrence-card__summary strong,
:root[data-theme='dark'] .error-occurrence-meta-grid strong,
:root[data-theme='dark'] .error-analysis-github-commits h5,
:root[data-theme='dark'] .error-analysis-github-commit strong {
  color: var(--text-strong);
}

:root[data-theme='dark'] .error-analysis-card-heading p,
:root[data-theme='dark'] .error-analysis-card-title-row small,
:root[data-theme='dark'] .ai-command-bar__actions .button--primary-loading {
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 6px 18px rgba(37, 99, 235, 0.22);
}

:root[data-theme='dark'] .ai-stop-button {
  border-color: rgba(248, 113, 113, 0.38);
  background: linear-gradient(180deg, rgba(69, 10, 10, 0.72) 0%, rgba(127, 29, 29, 0.58) 100%);
  color: #fecaca;
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-theme='dark'] .ai-stop-button__icon {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

:root[data-theme='dark'] .ai-stop-button:hover {
  border-color: rgba(252, 165, 165, 0.55);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.82) 0%, rgba(153, 27, 27, 0.68) 100%);
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.18),
    0 6px 16px rgba(220, 38, 38, 0.22);
}

:root[data-theme='dark'] .ai-command-bar span,
:root[data-theme='dark'] .ai-command-bar em,
:root[data-theme='dark'] .error-analysis-kpi-grid span,
:root[data-theme='dark'] .error-analysis-kpi-grid small,
:root[data-theme='dark'] .error-smart-diagnosis__header span,
:root[data-theme='dark'] .error-smart-checklist > span,
:root[data-theme='dark'] .error-smart-diagnosis__grid article span,
:root[data-theme='dark'] .error-smart-diagnosis__grid article p,
:root[data-theme='dark'] .error-smart-attention p,
:root[data-theme='dark'] .error-smart-note p,
:root[data-theme='dark'] .error-smart-checklist li,
:root[data-theme='dark'] .error-smart-diagnosis > small,
:root[data-theme='dark'] .ai-processing-content p,
:root[data-theme='dark'] .ai-processing-card--focus small,
:root[data-theme='dark'] .error-occurrence-card__summary small,
:root[data-theme='dark'] .error-occurrence-meta-grid span,
:root[data-theme='dark'] .error-analysis-github-commit span,
:root[data-theme='dark'] .error-analysis-github-commit small {
  color: var(--text-muted);
}

:root[data-theme='dark'] .form-warning-banner {
  background: rgba(120, 53, 15, 0.32);
  color: #fde68a;
}

:root[data-theme='dark'] .ai-caution-box {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.28), rgba(146, 64, 14, 0.2));
}

:root[data-theme='dark'] .error-diagnostic-box--sql {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.24), rgba(92, 45, 12, 0.18));
  box-shadow: var(--shadow-soft);
}

:root[data-theme='dark'] .error-diagnostic-box--sql p {
  color: #fef3c7;
}

:root[data-theme='dark'] .error-diagnostic-box--sql small {
  color: #fcd34d;
}

:root[data-theme='dark'] .ai-caution-box p {
  color: #fde68a;
}

:root[data-theme='dark'] .ai-caution-box small {
  color: #fcd34d;
}

/* Error monitoring executive visual alignment */
.error-panel-card {
  min-height: 132px;
  border-color: rgba(245, 158, 11, 0.28);
  background:
    radial-gradient(circle at 92% 12%, rgba(59, 130, 246, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(255, 255, 255, 0.96));
}

.error-panel-card::before {
  display: none;
}

.error-panel-card--success {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    radial-gradient(circle at 92% 12%, rgba(34, 197, 94, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(240, 253, 244, 0.94), rgba(255, 255, 255, 0.96));
}

.error-panel-card--warning {
  border-color: rgba(245, 158, 11, 0.34);
  background:
    radial-gradient(circle at 92% 12%, rgba(245, 158, 11, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.96));
}

.error-panel-card--danger {
  border-color: rgba(239, 68, 68, 0.34);
  background:
    radial-gradient(circle at 92% 12%, rgba(239, 68, 68, 0.13), transparent 30%),
    linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.96));
}

.error-panel-card--neutral {
  border-color: rgba(59, 130, 246, 0.3);
  background:
    radial-gradient(circle at 92% 12%, rgba(59, 130, 246, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.96));
}

.error-panel-card--success strong { color: #059669; }
.error-panel-card--warning strong { color: #d97706; }
.error-panel-card--danger strong { color: #ef4444; }
.error-panel-card--neutral strong { color: #2563eb; }

.error-timeline-chart--detector {
  gap: 14px;
}

.error-timeline-kpis--detector > div {
  min-height: 86px;
  border-color: rgba(59, 130, 246, 0.24);
  background:
    radial-gradient(circle at 92% 8%, rgba(59, 130, 246, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
}

.error-timeline-kpis--detector > div.is-success {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.94), rgba(255, 255, 255, 0.96));
}

.error-timeline-kpis--detector > div.is-warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.96));
}

.error-timeline-kpis--detector > div.is-danger {
  border-color: rgba(239, 68, 68, 0.34);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.96));
}

.error-timeline-detector-box {
  position: relative;
  min-height: 330px;
  overflow: visible;
}

.error-timeline-detector-svg {
  display: block;
  width: 100%;
  min-height: 330px;
  overflow: visible;
  cursor: crosshair;
}

.error-timeline-detector-plot {
  fill: color-mix(in srgb, var(--panel, #fff) 92%, transparent);
  stroke: rgba(148, 163, 184, 0.2);
}

.error-timeline-detector-grid-line {
  stroke: rgba(148, 163, 184, 0.18);
  stroke-dasharray: 4 6;
}

.error-timeline-detector-axis-text {
  fill: var(--text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
}

.error-timeline-detector-watermark {
  fill: rgba(148, 163, 184, 0.26);
  font-size: 20px;
  font-weight: 900;
}

.error-timeline-detector-hover-line {
  stroke: rgba(239, 68, 68, 0.32);
  stroke-dasharray: 4 6;
}

.error-timeline-gradient-stop-start {
  stop-color: #ef4444;
  stop-opacity: 0.65;
}

.error-timeline-gradient-stop-end {
  stop-color: #ef4444;
  stop-opacity: 0.08;
}

.error-timeline-detector-area {
  fill: url(#error-timeline-detector-gradient);
}

.error-timeline-detector-line {
  fill: none;
  stroke: #ef4444;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.error-timeline-detector-point {
  stroke: color-mix(in srgb, var(--panel, #fff) 94%, transparent);
  stroke-width: 1.6;
  transition: r 150ms ease, filter 150ms ease;
}

.error-timeline-detector-point--success { fill: #22c55e; }
.error-timeline-detector-point--warning { fill: #f59e0b; }
.error-timeline-detector-point--danger { fill: #ef4444; }
.error-timeline-detector-point--neutral { fill: #3b82f6; }
.error-timeline-detector-point.is-selected { filter: drop-shadow(0 0 7px rgba(59, 130, 246, 0.6)); }

.error-timeline-detector-tooltip {
  position: absolute;
  z-index: 8;
  width: min(360px, calc(100vw - 42px));
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 15px;
  background: color-mix(in srgb, var(--panel, #fff) 96%, transparent);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  color: var(--text, #334155);
  pointer-events: none;
}

.error-timeline-detector-tooltip__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-strong, #0f172a);
  font-weight: 900;
}

.error-timeline-detector-tooltip__header span {
  color: #ef4444;
}

.error-timeline-detector-tooltip__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 10px;
  font-size: 0.78rem;
}

.error-timeline-detector-tooltip p,
.error-timeline-detector-tooltip small {
  display: block;
  margin: 8px 0 0;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}

.error-panel-legend--detector {
  margin-top: -2px;
}

:root[data-theme='dark'] .error-panel-card,
:root[data-theme='dark'] .error-panel-card--success,
:root[data-theme='dark'] .error-panel-card--warning,
:root[data-theme='dark'] .error-panel-card--danger,
:root[data-theme='dark'] .error-panel-card--neutral,
:root[data-theme='dark'] .error-timeline-kpis--detector > div,
:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-success,
:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-warning,
:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-danger {
  background: var(--executive-card-muted-bg);
}

:root[data-theme='dark'] .error-timeline-detector-plot {
  fill: var(--executive-chart-bg);
  stroke: rgba(148, 163, 184, 0.18);
}

:root[data-theme='dark'] .error-timeline-detector-tooltip {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38);
}

@media (max-width: 1080px) {
  .error-timeline-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .error-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Error monitoring strategic rankings and heat-map refinements */
.error-panel-card::after {
  content: '';
  position: absolute;
  inset: auto -24px -34px auto;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  opacity: 0.16;
  filter: blur(2px);
  pointer-events: none;
}

.error-panel-card--success::after { background: #22c55e; }
.error-panel-card--warning::after { background: #f59e0b; }
.error-panel-card--danger::after { background: #ef4444; }
.error-panel-card--neutral::after { background: #3b82f6; }

.error-panel-card--success,
.error-timeline-kpis--detector > div.is-success {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08), 0 16px 38px rgba(34, 197, 94, 0.08);
}

.error-panel-card--warning,
.error-timeline-kpis--detector > div.is-warning {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.08), 0 16px 38px rgba(245, 158, 11, 0.09);
}

.error-panel-card--danger,
.error-timeline-kpis--detector > div.is-danger {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.08), 0 16px 38px rgba(239, 68, 68, 0.1);
}

.error-timeline-heat-band {
  pointer-events: none;
  mix-blend-mode: multiply;
}

.error-timeline-heat-band--success { fill: rgba(34, 197, 94, 0.07); }
.error-timeline-heat-band--warning { fill: rgba(245, 158, 11, 0.09); }
.error-timeline-heat-band--danger { fill: rgba(239, 68, 68, 0.1); }

.error-timeline-gradient-stop-start {
  stop-color: #ef4444;
  stop-opacity: 0.36;
}

.error-timeline-gradient-stop-end {
  stop-color: #22c55e;
  stop-opacity: 0.08;
}

.error-panel-columns--rankings {
  align-items: stretch;
}

.error-group-box--ranking {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 6%, rgba(59, 130, 246, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
}

.error-group-box__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.error-group-box__header h3 {
  margin-bottom: 4px;
}

.error-group-box__header p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.76rem;
  line-height: 1.35;
}

.error-ranking-list {
  display: grid;
  gap: 10px;
}

.error-ranking-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.78);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.error-ranking-item:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.34);
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.09);
}

.error-ranking-item:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.82);
  outline-offset: 2px;
}

.error-ranking-item__topline,
.error-ranking-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.error-ranking-item__topline strong {
  min-width: 0;
  color: var(--text-strong, #0f172a);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-ranking-item__topline em {
  flex: 0 0 auto;
  color: var(--text-strong, #0f172a);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 950;
}

.error-ranking-item__track {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.error-ranking-item__track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-width, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bar-color) 72%, transparent), var(--bar-color));
  box-shadow: 0 0 18px color-mix(in srgb, var(--bar-color) 26%, transparent);
}

.error-ranking-item__meta span {
  color: var(--text-muted, #64748b);
  font-size: 0.72rem;
  font-weight: 800;
}

.error-insight-modal {
  max-height: min(82vh, 860px);
  overflow: hidden;
}

.error-insight-modal__header span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted, #64748b);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-insight-modal__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.error-insight-modal__summary > div {
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.76);
}

.error-insight-modal__summary span,
.error-insight-modal__summary strong {
  display: block;
}

.error-insight-modal__summary span {
  color: var(--text-muted, #64748b);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error-insight-modal__summary strong {
  margin-top: 5px;
  color: var(--text-strong, #0f172a);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.error-insight-detail__list--modal {
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

:root[data-theme='dark'] .error-panel-card::after {
  opacity: 0.22;
}

:root[data-theme='dark'] .error-timeline-heat-band {
  mix-blend-mode: screen;
  opacity: 0.42;
}

:root[data-theme='dark'] .error-group-box--ranking,
:root[data-theme='dark'] .error-ranking-item,
:root[data-theme='dark'] .error-insight-modal__summary > div {
  background: var(--executive-card-muted-bg);
  border-color: rgba(148, 163, 184, 0.18);
}

:root[data-theme='dark'] .error-ranking-item:hover {
  border-color: rgba(96, 165, 250, 0.34);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

:root[data-theme='dark'] .error-ranking-item__track {
  background: rgba(148, 163, 184, 0.16);
}

:root[data-theme='dark'] .error-ranking-item__topline strong,
:root[data-theme='dark'] .error-ranking-item__topline em,
:root[data-theme='dark'] .error-insight-modal__summary strong {
  color: #e5edf8;
}

:root[data-theme='dark'] .error-group-box__header p,
:root[data-theme='dark'] .error-ranking-item__meta span,
:root[data-theme='dark'] .error-insight-modal__header span,
:root[data-theme='dark'] .error-insight-modal__summary span {
  color: #94a3b8;
}

@media (max-width: 900px) {
  .error-insight-modal__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Ajuste fino: a timeline estilo downdetector não deve usar faixas fixas de temperatura no fundo. */
.error-timeline-gradient-stop-start {
  stop-color: #ef4444;
  stop-opacity: 0.34;
}

.error-timeline-gradient-stop-end {
  stop-color: #ef4444;
  stop-opacity: 0.04;
}

/* Reforça os cards executivos no tema escuro, sem perder a temperatura visual por status. */
:root[data-theme='dark'] .error-panel-card {
  background:
    radial-gradient(circle at 94% 76%, rgba(59, 130, 246, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.92));
  border-color: rgba(96, 165, 250, 0.2);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.04), 0 18px 42px rgba(0, 0, 0, 0.22);
}

:root[data-theme='dark'] .error-panel-card--success {
  background:
    radial-gradient(circle at 94% 76%, rgba(34, 197, 94, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(6, 78, 59, 0.34), rgba(15, 23, 42, 0.94) 58%, rgba(17, 24, 39, 0.94));
  border-color: rgba(34, 197, 94, 0.34);
}

:root[data-theme='dark'] .error-panel-card--warning {
  background:
    radial-gradient(circle at 94% 76%, rgba(245, 158, 11, 0.3), transparent 30%),
    linear-gradient(135deg, rgba(120, 53, 15, 0.34), rgba(15, 23, 42, 0.94) 58%, rgba(17, 24, 39, 0.94));
  border-color: rgba(245, 158, 11, 0.4);
}

:root[data-theme='dark'] .error-panel-card--danger {
  background:
    radial-gradient(circle at 94% 76%, rgba(239, 68, 68, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(127, 29, 29, 0.38), rgba(15, 23, 42, 0.94) 58%, rgba(17, 24, 39, 0.94));
  border-color: rgba(248, 113, 113, 0.46);
}

:root[data-theme='dark'] .error-panel-card--neutral {
  background:
    radial-gradient(circle at 94% 76%, rgba(59, 130, 246, 0.3), transparent 30%),
    linear-gradient(135deg, rgba(30, 64, 175, 0.3), rgba(15, 23, 42, 0.94) 58%, rgba(17, 24, 39, 0.94));
  border-color: rgba(96, 165, 250, 0.38);
}

:root[data-theme='dark'] .error-panel-card--success strong { color: #34d399; }
:root[data-theme='dark'] .error-panel-card--warning strong { color: #fbbf24; }
:root[data-theme='dark'] .error-panel-card--danger strong { color: #fb7185; }
:root[data-theme='dark'] .error-panel-card--neutral strong { color: #60a5fa; }

/* Refinamento visual ERPCC: cards de erro sem bolha decorativa e KPIs da timeline com temperatura no tema escuro. */
.error-panel-card::after {
  display: none !important;
  content: none !important;
}

:root[data-theme='dark'] .error-panel-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.92));
}

:root[data-theme='dark'] .error-panel-card--success {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.42), rgba(15, 23, 42, 0.95) 58%, rgba(17, 24, 39, 0.94));
}

:root[data-theme='dark'] .error-panel-card--warning {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.42), rgba(15, 23, 42, 0.95) 58%, rgba(17, 24, 39, 0.94));
}

:root[data-theme='dark'] .error-panel-card--danger {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.46), rgba(15, 23, 42, 0.95) 58%, rgba(17, 24, 39, 0.94));
}

:root[data-theme='dark'] .error-panel-card--neutral {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.38), rgba(15, 23, 42, 0.95) 58%, rgba(17, 24, 39, 0.94));
}

:root[data-theme='dark'] .error-timeline-kpis--detector > div {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.92));
  border-color: rgba(96, 165, 250, 0.2);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.04), 0 18px 42px rgba(0, 0, 0, 0.18);
}

:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-success {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.42), rgba(15, 23, 42, 0.95) 58%, rgba(17, 24, 39, 0.94));
  border-color: rgba(34, 197, 94, 0.34);
}

:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-warning {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.42), rgba(15, 23, 42, 0.95) 58%, rgba(17, 24, 39, 0.94));
  border-color: rgba(245, 158, 11, 0.4);
}

:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-danger {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.46), rgba(15, 23, 42, 0.95) 58%, rgba(17, 24, 39, 0.94));
  border-color: rgba(248, 113, 113, 0.46);
}

:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-neutral {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.38), rgba(15, 23, 42, 0.95) 58%, rgba(17, 24, 39, 0.94));
  border-color: rgba(96, 165, 250, 0.38);
}

:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-success strong { color: #34d399; }
:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-warning strong { color: #fbbf24; }
:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-danger strong { color: #fb7185; }
:root[data-theme='dark'] .error-timeline-kpis--detector > div.is-neutral strong { color: #60a5fa; }

/* ERPCC - refinamento visual do modal de análise de erros */
.modal-card--analysis-workspace {
  overflow: hidden;
  border-radius: 24px;
}

.modal-card--analysis-workspace .modal-card__header.error-analysis-workspace-header {
  position: sticky;
  top: 0;
  z-index: 7;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.11), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.91));
  backdrop-filter: blur(18px);
}

.error-analysis-workspace {
  background:
    radial-gradient(circle at 92% 8%, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(241, 245, 249, 0.86));
}

.error-analysis-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(248, 250, 252, 0.94) 54%, rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 92% 18%, rgba(59, 130, 246, 0.16), transparent 32%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.error-analysis-hero::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.error-analysis-hero::after {
  content: '';
  position: absolute;
  right: -64px;
  bottom: -74px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14), transparent 67%);
  pointer-events: none;
}

.error-analysis-hero--error {
  border-color: rgba(248, 113, 113, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 241, 242, 0.96), rgba(248, 250, 252, 0.94) 54%, rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 92% 18%, rgba(248, 113, 113, 0.18), transparent 32%);
}

.error-analysis-hero--error::before { background: linear-gradient(180deg, #fb7185, #ef4444); }
.error-analysis-hero--error::after { background: radial-gradient(circle, rgba(248, 113, 113, 0.16), transparent 67%); }

.error-analysis-hero--warning {
  border-color: rgba(245, 158, 11, 0.36);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.97), rgba(248, 250, 252, 0.94) 54%, rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 92% 18%, rgba(245, 158, 11, 0.16), transparent 32%);
}

.error-analysis-hero--warning::before { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.error-analysis-hero--warning::after { background: radial-gradient(circle, rgba(245, 158, 11, 0.16), transparent 67%); }

.error-analysis-hero span,
.error-analysis-pane-header span,
.error-analysis-card-heading span {
  letter-spacing: 0.12em;
}

.error-analysis-hero strong {
  position: relative;
  z-index: 1;
  max-width: 92%;
  color: #0f172a;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.25;
}

.error-analysis-hero small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  color: #475569;
  font-weight: 760;
}

.error-analysis-workspace-body {
  align-items: stretch;
}

.error-analysis-side-menu {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 150px);
  align-self: flex-start;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.76));
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9), 0 14px 32px rgba(15, 23, 42, 0.07);
}

.error-analysis-menu-item {
  border-radius: 14px;
}

.error-analysis-menu-item.is-active {
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.96), rgba(239, 246, 255, 0.74));
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.22), 0 10px 22px rgba(37, 99, 235, 0.08);
}

.error-analysis-main-pane {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.74);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.error-analysis-pane-header {
  position: sticky;
  top: 74px;
  z-index: 5;
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.88));
  backdrop-filter: blur(14px);
}

.error-analysis-pane-header h4 {
  color: #0f172a;
  font-size: 1.18rem;
}

.error-analysis-pane-content {
  padding: 16px;
}

.error-analysis-main-card {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
}

.error-analysis-main-card--overview {
  border-color: rgba(59, 130, 246, 0.26);
  background:
    radial-gradient(circle at 96% 10%, rgba(59, 130, 246, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.94) 58%, rgba(248, 250, 252, 0.94));
}

.error-analysis-main-card--overview .error-analysis-card-heading {
  padding-bottom: 4px;
}

.error-analysis-main-card--overview .error-analysis-card-heading strong {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.15;
}

.error-analysis-main-card--overview .error-analysis-card-heading p {
  max-width: 1080px;
  color: #475569;
  font-size: 0.98rem;
}

.error-analysis-main-card--overview .error-analysis-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.error-analysis-kpi-grid div {
  position: relative;
  overflow: hidden;
  padding: 15px 15px 14px;
  border-color: rgba(147, 197, 253, 0.48);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.64));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.error-analysis-kpi-grid div::after {
  content: '';
  position: absolute;
  right: -32px;
  bottom: -40px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.13), transparent 66%);
  pointer-events: none;
}

.error-analysis-kpi-grid div:nth-child(1) { border-color: rgba(59, 130, 246, 0.42); }
.error-analysis-kpi-grid div:nth-child(2) { border-color: rgba(245, 158, 11, 0.38); }
.error-analysis-kpi-grid div:nth-child(2)::after { background: radial-gradient(circle, rgba(245, 158, 11, 0.13), transparent 66%); }
.error-analysis-kpi-grid div:nth-child(3) { border-color: rgba(14, 165, 233, 0.36); }
.error-analysis-kpi-grid div:nth-child(3)::after { background: radial-gradient(circle, rgba(14, 165, 233, 0.12), transparent 66%); }
.error-analysis-kpi-grid div:nth-child(4) { border-color: rgba(248, 113, 113, 0.34); }
.error-analysis-kpi-grid div:nth-child(4)::after { background: radial-gradient(circle, rgba(248, 113, 113, 0.12), transparent 66%); }

.error-analysis-kpi-grid strong {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  line-height: 1.28;
}

.error-analysis-kpi-grid small {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  line-height: 1.25;
}

.error-analysis-main-card .error-detail-list {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.error-analysis-main-card .error-detail-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  gap: 18px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.62);
  background: transparent;
}

.error-analysis-main-card .error-detail-row:last-child {
  border-bottom: 0;
}

.error-analysis-main-card .error-detail-row span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 880;
}

.error-analysis-main-card .error-detail-row strong {
  color: #0f172a;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.error-analysis-main-card .error-detail-row:hover {
  background: rgba(239, 246, 255, 0.68);
}

.error-smart-diagnosis,
.ai-processing-card,
.ai-result-panel,
.error-occurrence-card,
.error-analysis-empty-state {
  border-radius: 18px;
}

@media (max-width: 1280px) {
  .error-analysis-main-card--overview .error-analysis-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .error-analysis-main-card--overview .error-analysis-kpi-grid,
  .error-analysis-kpi-grid {
    grid-template-columns: 1fr;
  }

  .error-analysis-main-card .error-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

:root[data-theme='dark'] .modal-card--analysis-workspace .modal-card__header.error-analysis-workspace-header {
  border-bottom-color: rgba(96, 165, 250, 0.18);
  background:
    radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.94));
}

:root[data-theme='dark'] .error-analysis-workspace {
  background:
    radial-gradient(circle at 92% 8%, rgba(59, 130, 246, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94));
}

:root[data-theme='dark'] .error-analysis-hero {
  border-color: rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(circle at 96% 0%, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92) 54%, rgba(30, 41, 59, 0.8));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

:root[data-theme='dark'] .error-analysis-hero--error {
  border-color: rgba(248, 113, 113, 0.34);
  background:
    radial-gradient(circle at 96% 0%, rgba(248, 113, 113, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.88) 56%, rgba(88, 28, 45, 0.3));
}

:root[data-theme='dark'] .error-analysis-hero--warning {
  border-color: rgba(245, 158, 11, 0.34);
  background:
    radial-gradient(circle at 96% 0%, rgba(245, 158, 11, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.88) 56%, rgba(120, 53, 15, 0.28));
}

:root[data-theme='dark'] .error-analysis-hero strong,
:root[data-theme='dark'] .error-analysis-pane-header h4 {
  color: #f8fafc;
}

:root[data-theme='dark'] .error-analysis-hero small {
  color: #bfdbfe;
}

:root[data-theme='dark'] .error-analysis-side-menu {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.82));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.14), 0 18px 42px rgba(0, 0, 0, 0.28);
}

:root[data-theme='dark'] .error-analysis-menu-item.is-active {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(14, 165, 233, 0.14));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.26), 0 12px 26px rgba(37, 99, 235, 0.14);
}

:root[data-theme='dark'] .error-analysis-main-pane {
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

:root[data-theme='dark'] .error-analysis-pane-header {
  border-bottom-color: rgba(96, 165, 250, 0.16);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.9));
}

:root[data-theme='dark'] .error-analysis-main-card {
  border-color: rgba(96, 165, 250, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.76));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

:root[data-theme='dark'] .error-analysis-main-card--overview {
  border-color: rgba(96, 165, 250, 0.24);
  background:
    radial-gradient(circle at 96% 10%, rgba(59, 130, 246, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.88) 58%, rgba(30, 41, 59, 0.72));
}

:root[data-theme='dark'] .error-analysis-main-card--overview .error-analysis-card-heading strong {
  color: #f8fafc;
}

:root[data-theme='dark'] .error-analysis-main-card--overview .error-analysis-card-heading p {
  color: #cbd5e1;
}

:root[data-theme='dark'] .error-analysis-kpi-grid div {
  border-color: rgba(96, 165, 250, 0.2);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.7));
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

:root[data-theme='dark'] .error-analysis-kpi-grid div:nth-child(1) { border-color: rgba(96, 165, 250, 0.3); }
:root[data-theme='dark'] .error-analysis-kpi-grid div:nth-child(2) { border-color: rgba(245, 158, 11, 0.3); }
:root[data-theme='dark'] .error-analysis-kpi-grid div:nth-child(3) { border-color: rgba(14, 165, 233, 0.28); }
:root[data-theme='dark'] .error-analysis-kpi-grid div:nth-child(4) { border-color: rgba(248, 113, 113, 0.28); }

:root[data-theme='dark'] .error-analysis-main-card .error-detail-list {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.18);
}

:root[data-theme='dark'] .error-analysis-main-card .error-detail-row {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

:root[data-theme='dark'] .error-analysis-main-card .error-detail-row span {
  color: #94a3b8;
}

:root[data-theme='dark'] .error-analysis-main-card .error-detail-row strong {
  color: #f8fafc;
}

:root[data-theme='dark'] .error-analysis-main-card .error-detail-row:hover {
  background: rgba(30, 64, 175, 0.16);
}

/* ERPCC - ajuste final do modal de análise de erro: evita sobreposição no workspace */
.modal-card--analysis-workspace {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card--analysis-workspace .error-analysis-workspace-header {
  flex: 0 0 auto;
}

.modal-card--analysis-workspace .error-analysis-workspace {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-top: 16px;
  scroll-padding-top: 16px;
}

.modal-card--analysis-workspace .error-analysis-hero,
.modal-card--analysis-workspace .error-analysis-hero--compact {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: auto;
  max-height: none;
  margin: 0;
  padding: 14px 18px 14px 20px;
  overflow: hidden;
}

.modal-card--analysis-workspace .error-analysis-hero > div,
.modal-card--analysis-workspace .error-analysis-hero--compact > div {
  min-width: 0;
}

.modal-card--analysis-workspace .error-analysis-hero strong,
.modal-card--analysis-workspace .error-analysis-hero--compact strong {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.modal-card--analysis-workspace .error-analysis-hero small,
.modal-card--analysis-workspace .error-analysis-hero--compact small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.modal-card--analysis-workspace .error-analysis-workspace-body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
}

.modal-card--analysis-workspace .error-analysis-main-pane {
  min-width: 0;
  overflow: visible;
}

.modal-card--analysis-workspace .error-analysis-pane-header {
  position: static;
  top: auto;
  z-index: auto;
}

.modal-card--analysis-workspace .error-analysis-main-card,
.modal-card--analysis-workspace .error-reference-card,
.modal-card--analysis-workspace .error-detail-section,
.modal-card--analysis-workspace .error-detail-summary {
  scroll-margin-top: 16px;
}

.modal-card--analysis-workspace .error-analysis-table td,
.modal-card--analysis-workspace .error-analysis-table th,
.modal-card--analysis-workspace .error-detail-table td,
.modal-card--analysis-workspace .error-detail-table th {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .modal-card--analysis-workspace .error-analysis-hero,
  .modal-card--analysis-workspace .error-analysis-hero--compact {
    grid-template-columns: 1fr;
  }
}

/* Refinamento final do modal de análise de erro: hierarquia premium, claro/escuro */
.error-analysis-hero--refined {
  align-items: flex-start;
  gap: 18px;
}

.error-analysis-hero--refined > div:first-child {
  min-width: 0;
}

.error-analysis-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.error-analysis-hero-chips em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #0f172a;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.error-analysis-hero-chips em span {
  color: #64748b;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.error-analysis-panel-stack--refined {
  gap: 12px;
}

.error-analysis-quick-diagnosis {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 15%, rgba(59, 130, 246, 0.15), transparent 32%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.error-analysis-quick-diagnosis span,
.error-analysis-technical-group h5 {
  display: block;
  margin-bottom: 6px;
  color: #2563eb;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.error-analysis-quick-diagnosis strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.error-analysis-quick-diagnosis p {
  max-width: 980px;
  margin: 7px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.error-analysis-main-card--overview-refined {
  padding: 14px;
}

.error-analysis-card-heading--compact {
  gap: 4px;
  margin-bottom: 12px;
}

.error-analysis-card-heading--compact strong {
  font-size: 17px !important;
  line-height: 1.25;
}

.error-analysis-card-heading--compact p {
  display: -webkit-box;
  margin-top: 4px !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.error-analysis-kpi-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.error-analysis-kpi-grid--compact .error-analysis-kpi-card {
  min-height: 0;
  padding: 12px 12px 11px 38px;
  border-radius: 15px;
}

.error-analysis-kpi-card__icon {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(59, 130, 246, 0.11);
  color: #2563eb;
}

.error-analysis-kpi-grid--compact strong {
  display: -webkit-box;
  min-height: 18px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px !important;
  line-height: 1.25;
}

.error-analysis-kpi-grid--compact small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.error-analysis-technical-summary-card {
  padding: 14px;
}

.error-analysis-technical-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.error-analysis-technical-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
}

.error-analysis-technical-group h5 {
  margin: 0 0 8px;
}

.error-detail-list--grouped {
  gap: 0;
}

.error-detail-list--grouped .error-detail-row {
  grid-template-columns: minmax(120px, 0.52fr) minmax(0, 1fr);
  min-height: 34px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.error-detail-list--grouped .error-detail-row:last-child {
  border-bottom: 0;
}

.error-detail-list--grouped .error-detail-row strong {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 11px;
  line-height: 1.45;
}

.error-analysis-side-menu {
  gap: 6px;
}

.error-analysis-menu-item {
  min-height: 42px;
  padding-block: 8px;
}

.error-analysis-menu-copy strong {
  font-size: 12px;
}

.error-analysis-pane-header {
  padding: 14px 16px;
}

.error-analysis-pane-content {
  padding: 14px;
}

:root[data-theme='dark'] .error-analysis-hero-chips em {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.76);
  color: #e5eefb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

:root[data-theme='dark'] .error-analysis-hero-chips em span {
  color: #93a4ba;
}

:root[data-theme='dark'] .error-analysis-quick-diagnosis {
  border-color: rgba(96, 165, 250, 0.18);
  background:
    radial-gradient(circle at 8% 15%, rgba(37, 99, 235, 0.23), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.9));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

:root[data-theme='dark'] .error-analysis-quick-diagnosis span,
:root[data-theme='dark'] .error-analysis-technical-group h5 {
  color: #7dd3fc;
}

:root[data-theme='dark'] .error-analysis-quick-diagnosis strong {
  color: #f8fafc;
}

:root[data-theme='dark'] .error-analysis-quick-diagnosis p {
  color: #aab8ca;
}

:root[data-theme='dark'] .error-analysis-kpi-card__icon {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

:root[data-theme='dark'] .error-analysis-technical-group {
  border-color: rgba(148, 163, 184, 0.13);
  background: rgba(15, 23, 42, 0.54);
}

:root[data-theme='dark'] .error-detail-list--grouped .error-detail-row {
  border-bottom-color: rgba(148, 163, 184, 0.11);
}

:root[data-theme='dark'] .error-detail-list--grouped .error-detail-row strong {
  color: #e2e8f0;
}

@media (max-width: 1080px) {
  .error-analysis-kpi-grid--compact,
  .error-analysis-technical-groups {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   ERPCC – Refinamento visual dos modais de drilldown do Panorama
   de Monitoramento (Downdetector, Erros por faixa, Agrupamentos)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero / executive summary ────────────────────────────────────── */
.mop-bucket-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: var(--executive-card-bg);
}

.mop-bucket-hero__accent {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  pointer-events: none;
}

.mop-bucket-hero__content {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.mop-bucket-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mop-bucket-hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.mop-bucket-hero__text {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.mop-bucket-hero--healthy {
  border-color: rgba(34, 197, 94, 0.22);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.07) 0%, transparent 62%), var(--executive-card-bg);
}

.mop-bucket-hero--warning {
  border-color: rgba(245, 158, 11, 0.26);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.09) 0%, transparent 62%), var(--executive-card-bg);
}

.mop-bucket-hero--critical {
  border-color: rgba(239, 68, 68, 0.26);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.09) 0%, transparent 62%), var(--executive-card-bg);
}

/* ── Metric cards grid ───────────────────────────────────────────── */
.mop-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mop-metric-card {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: var(--executive-card-muted-bg, rgba(248, 250, 252, 0.78));
}

.mop-metric-card--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.07) 0%, transparent 70%),
    var(--executive-card-muted-bg, rgba(248, 250, 252, 0.78));
}

.mop-metric-card--critical {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, transparent 70%),
    var(--executive-card-muted-bg, rgba(248, 250, 252, 0.78));
}

.mop-metric-card__label {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mop-metric-card__value {
  display: block;
  color: var(--text-strong, #0f172a);
  font-size: 22px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.mop-metric-card__value--name {
  font-size: 14px;
  line-height: 1.3;
}

.mop-metric-card__hint {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 11px;
  line-height: 1.35;
}

/* ── Endpoint section & rows ─────────────────────────────────────── */
.mop-endpoint-section {
  display: grid;
  gap: 10px;
}

.mop-endpoint-section__title {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mop-endpoint-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: var(--executive-card-bg);
}

.mop-endpoint-badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid;
  border-radius: 999px;
  background: var(--executive-card-bg);
  font-size: 11px;
  font-weight: 800;
}

/* ── Empty state elegante ────────────────────────────────────────── */
.mop-endpoint-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 16px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.04);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.mop-endpoint-empty__icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-size: 16px;
  font-weight: 700;
}

/* ── Responsivo ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .mop-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Modo escuro ─────────────────────────────────────────────────── */
:root[data-theme='dark'] .mop-bucket-hero--healthy {
  border-color: rgba(34, 197, 94, 0.18);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.13) 0%, transparent 62%), rgba(15, 23, 42, 0.72);
}

:root[data-theme='dark'] .mop-bucket-hero--warning {
  border-color: rgba(245, 158, 11, 0.22);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, transparent 62%), rgba(15, 23, 42, 0.72);
}

:root[data-theme='dark'] .mop-bucket-hero--critical {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, transparent 62%), rgba(15, 23, 42, 0.72);
}

:root[data-theme='dark'] .mop-bucket-hero__text {
  color: var(--text, #cbd5e1);
}

:root[data-theme='dark'] .mop-metric-card {
  background: var(--executive-card-muted-bg);
  border-color: rgba(148, 163, 184, 0.14);
}

:root[data-theme='dark'] .mop-metric-card--warning {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.13) 0%, transparent 70%),
    var(--executive-card-muted-bg);
}

:root[data-theme='dark'] .mop-metric-card--critical {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.13) 0%, transparent 70%),
    var(--executive-card-muted-bg);
}

:root[data-theme='dark'] .mop-metric-card__value {
  color: #e5edf8;
}

:root[data-theme='dark'] .mop-metric-card__label,
:root[data-theme='dark'] .mop-metric-card__hint {
  color: #94a3b8;
}

:root[data-theme='dark'] .mop-endpoint-row {
  background: var(--executive-card-bg);
  border-color: rgba(148, 163, 184, 0.13);
}

:root[data-theme='dark'] .mop-endpoint-empty {
  border-color: rgba(34, 197, 94, 0.14);
  background: rgba(34, 197, 94, 0.06);
}

:root[data-theme='dark'] .mop-endpoint-empty__icon {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
}

:root[data-theme='dark'] .mop-endpoint-section__title {
  color: #94a3b8;
}

/* ── Toast progress bar animation ───────────────────────────────────────── */
@keyframes erpcc-toast-shrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── ERP Control Center loading states ──────────────────────────────────── */
.erpcc-loading-boundary {
  position: relative;
}

.erpcc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.erpcc-loading--page {
  padding: 48px 24px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--executive-panel-bg);
  box-shadow: var(--shadow-soft);
}

.erpcc-loading--panel {
  padding: 36px 20px;
  min-height: 180px;
}

.erpcc-loading--inline {
  flex-direction: row;
  gap: 12px;
  justify-content: flex-start;
  padding: 8px 0;
}

.erpcc-loading--overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  padding: 32px 24px;
  border-radius: inherit;
  background: rgba(244, 247, 251, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.erpcc-loading__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.erpcc-loading__orb {
  position: relative;
  width: 72px;
  height: 72px;
}

.erpcc-loading__ring,
.erpcc-loading__core {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 999px;
}

.erpcc-loading__ring {
  border: 2px solid transparent;
}

.erpcc-loading__ring--outer {
  inset: 0;
  border-top-color: rgba(31, 94, 255, 0.92);
  border-right-color: rgba(31, 94, 255, 0.18);
  animation: erpcc-loading-spin 1.35s linear infinite;
}

.erpcc-loading__ring--middle {
  inset: 10px;
  border-bottom-color: rgba(59, 130, 246, 0.72);
  border-left-color: rgba(59, 130, 246, 0.14);
  animation: erpcc-loading-spin 1.05s linear infinite reverse;
}

.erpcc-loading__ring--inner {
  inset: 20px;
  border-top-color: rgba(96, 165, 250, 0.55);
  border-right-color: rgba(96, 165, 250, 0.08);
  animation: erpcc-loading-spin 0.85s linear infinite;
}

.erpcc-loading__core {
  inset: 28px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), rgba(31, 94, 255, 0.88) 58%, rgba(29, 78, 216, 0.92));
  box-shadow:
    0 0 0 6px rgba(31, 94, 255, 0.08),
    0 0 24px rgba(31, 94, 255, 0.28);
  animation: erpcc-loading-pulse 2.4s ease-in-out infinite;
}

.erpcc-loading--inline .erpcc-loading__orb {
  width: 28px;
  height: 28px;
}

.erpcc-loading--inline .erpcc-loading__ring--middle {
  inset: 4px;
}

.erpcc-loading--inline .erpcc-loading__ring--inner {
  inset: 8px;
}

.erpcc-loading--inline .erpcc-loading__core {
  inset: 11px;
}

.erpcc-loading--inline .erpcc-loading__stage {
  flex-direction: row;
  gap: 10px;
}

.erpcc-loading--inline .erpcc-loading__skeleton {
  display: none;
}

.erpcc-loading__skeleton {
  display: grid;
  gap: 10px;
  width: min(320px, 72vw);
}

.erpcc-loading__skeleton span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.14) 0%,
    rgba(148, 163, 184, 0.28) 45%,
    rgba(148, 163, 184, 0.14) 100%
  );
  background-size: 220% 100%;
  animation: erpcc-loading-shimmer 1.6s ease-in-out infinite;
}

.erpcc-loading__skeleton span:nth-child(1) {
  width: 100%;
}

.erpcc-loading__skeleton span:nth-child(2) {
  width: 82%;
}

.erpcc-loading__skeleton span:nth-child(3) {
  width: 64%;
  animation-delay: 0.12s;
}

.erpcc-loading__message {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

@keyframes erpcc-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes erpcc-loading-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 6px rgba(31, 94, 255, 0.08),
      0 0 18px rgba(31, 94, 255, 0.22);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 8px rgba(31, 94, 255, 0.12),
      0 0 28px rgba(31, 94, 255, 0.34);
  }
}

@keyframes erpcc-loading-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

:root[data-theme='dark'] .erpcc-loading--page {
  border-color: var(--panel-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

:root[data-theme='dark'] .erpcc-loading--overlay {
  background: rgba(11, 17, 32, 0.76);
}

:root[data-theme='dark'] .erpcc-loading__ring--outer {
  border-top-color: rgba(110, 168, 255, 0.95);
  border-right-color: rgba(110, 168, 255, 0.16);
}

:root[data-theme='dark'] .erpcc-loading__ring--middle {
  border-bottom-color: rgba(96, 165, 250, 0.72);
  border-left-color: rgba(96, 165, 250, 0.12);
}

:root[data-theme='dark'] .erpcc-loading__ring--inner {
  border-top-color: rgba(147, 197, 253, 0.58);
  border-right-color: rgba(147, 197, 253, 0.08);
}

:root[data-theme='dark'] .erpcc-loading__core {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.92), rgba(96, 165, 250, 0.88) 58%, rgba(37, 99, 235, 0.94));
  box-shadow:
    0 0 0 6px rgba(96, 165, 250, 0.1),
    0 0 24px rgba(59, 130, 246, 0.32);
}

:root[data-theme='dark'] .erpcc-loading__skeleton span {
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.08) 0%,
    rgba(148, 163, 184, 0.22) 45%,
    rgba(148, 163, 184, 0.08) 100%
  );
  background-size: 220% 100%;
}
/* override seguro - não impacta login */
button.btn-delete,
.btn-delete {
  background-color: #e5e7eb !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
}

button.btn-delete:hover,
.btn-delete:hover {
  background-color: #d1d5db !important;
}
