.scx-inspection-dashboard,
.scx-issue-tracker,
.scx-action-panel,
.scx-inspection-form,
.scx-form-success {
  color: #16324f;
  font-family: Inter, Arial, sans-serif;
}

.scx-header-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.scx-header-row h2 {
  color: #013369;
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 0.2rem 0 0;
}

.scx-eyebrow {
  color: #ffa500;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scx-stats-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.scx-stat-card,
.scx-panel,
.scx-issue-card,
.scx-issue-row,
.scx-item-card,
.scx-success-card,
.scx-timeline-card {
  background: #fff;
  border: 1px solid rgba(1, 51, 105, 0.12);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(1, 51, 105, 0.08);
}

.scx-stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  display: flex;
  flex-direction: column;
  min-height: 116px;
  padding: 1.2rem 1.25rem;
}

.scx-stat-value {
  color: #013369;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.55rem;
}

.scx-stat-label {
  color: #4a5f78;
  font-size: 0.92rem;
}

.scx-panel {
  margin-bottom: 1.5rem;
  overflow: hidden;
  padding: 1.25rem;
}

.scx-panel-head {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.scx-panel-head h3,
.scx-timeline-card h4,
.scx-issue-card h3,
.scx-success-card h3 {
  color: #013369;
  margin: 0;
}

.scx-panel-head p,
.scx-timeline-card p,
.scx-issue-card p,
.scx-action-description,
.scx-success-card p {
  color: #4a5f78;
  margin: 0.35rem 0 0;
}

.scx-dashboard-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.1fr 0.9fr;
}

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

.scx-table {
  border-collapse: collapse;
  min-width: 700px;
  width: 100%;
}

.scx-table th,
.scx-table td {
  border-bottom: 1px solid rgba(1, 51, 105, 0.08);
  padding: 0.9rem 0.75rem;
  text-align: left;
}

.scx-table th {
  color: #5c728a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scx-btn,
.scx-link-btn,
.scx-bell-trigger,
.scx-notification-item,
.scx-toggle {
  font: inherit;
}

.scx-btn,
.scx-link-btn {
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.scx-btn {
  border: none;
  display: inline-flex;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1.2rem;
}

.scx-btn:hover,
.scx-link-btn:hover,
.scx-toggle:hover,
.scx-bell-trigger:hover {
  transform: translateY(-1px);
}

.scx-btn-primary {
  background: #013369;
  color: #fff;
}

.scx-btn-secondary {
  background: rgba(255, 165, 0, 0.12);
  color: #013369;
}

.scx-link-btn {
  background: transparent;
  border: none;
  color: #013369;
  font-weight: 700;
  padding: 0;
}

.scx-status-chip,
.scx-severity-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.36rem 0.68rem;
  white-space: nowrap;
}

.scx-severity-badge {
  color: #fff;
}

.scx-severity-critical {
  background: #dc2626;
}

.scx-severity-high {
  background: #ea580c;
}

.scx-severity-medium {
  background: #f59e0b;
}

.scx-severity-low {
  background: #3b82f6;
}

.scx-status-passed {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.scx-status-issues-found,
.scx-status-open,
.scx-status-overdue {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.scx-status-assigned,
.scx-status-in-progress {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.scx-status-completed,
.scx-status-verified {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.scx-issue-row,
.scx-issue-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
}

.scx-issue-row {
  display: grid;
  gap: 1rem;
}

.scx-issue-main p,
.scx-issue-card p {
  margin: 0.55rem 0;
}

.scx-issue-topline,
.scx-issue-meta,
.scx-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.scx-issue-meta,
.scx-project-label,
.scx-action-grid span,
.scx-dropdown-head span,
.scx-timeline-copy span,
.scx-empty {
  color: #5c728a;
}

.scx-inline-panel {
  margin-top: 0.9rem;
}

.scx-filter-row,
.scx-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.scx-filter-row label,
.scx-stack label,
.scx-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.scx-filter-row span,
.scx-stack span,
.scx-form-grid span {
  color: #355272;
  font-size: 0.86rem;
  font-weight: 700;
}

.scx-filter-row select,
.scx-stack input,
.scx-stack select,
.scx-stack textarea,
.scx-form-grid input,
.scx-form-grid select,
.scx-issue-editor textarea,
.scx-issue-editor input,
.scx-issue-editor select {
  background: #fff;
  border: 1px solid rgba(1, 51, 105, 0.18);
  border-radius: 12px;
  color: #16324f;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
}

.scx-stack textarea,
.scx-issue-editor textarea {
  min-height: 100px;
  resize: vertical;
}

.scx-item-list,
.scx-stack {
  display: grid;
  gap: 1rem;
}

.scx-item-card {
  padding: 1rem 1.1rem;
}

.scx-item-head {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.scx-item-head strong {
  color: #013369;
  font-size: 1rem;
}

.scx-toggle-group {
  display: flex;
  gap: 0.55rem;
}

.scx-toggle {
  background: #f4f8fc;
  border: 1px solid rgba(1, 51, 105, 0.14);
  border-radius: 999px;
  color: #013369;
  cursor: pointer;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
}

.scx-toggle.is-active[data-choice="pass"] {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(22, 163, 74, 0.3);
  color: #15803d;
}

.scx-toggle.is-active[data-choice="fail"] {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.28);
  color: #b91c1c;
}

.scx-issue-editor {
  border-top: 1px dashed rgba(1, 51, 105, 0.14);
  display: grid;
  gap: 0.8rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
}

.scx-form-actions {
  margin-top: 1.2rem;
}

.scx-full-span {
  grid-column: 1 / -1;
}

.scx-action-grid div {
  background: #f4f8fc;
  border-radius: 14px;
  min-width: 150px;
  padding: 0.8rem 0.9rem;
}

.scx-action-grid strong {
  color: #013369;
  display: block;
  margin-top: 0.2rem;
}

.scx-timeline {
  margin: 1rem 0 1.25rem;
  padding-left: 1rem;
  position: relative;
}

.scx-timeline::before {
  background: linear-gradient(180deg, rgba(1, 51, 105, 0.25) 0%, rgba(1, 51, 105, 0.08) 100%);
  border-radius: 999px;
  bottom: 0;
  content: "";
  left: 0.32rem;
  position: absolute;
  top: 0;
  width: 2px;
}

.scx-timeline-step {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 18px 1fr;
  margin-bottom: 0.9rem;
  position: relative;
}

.scx-timeline-dot {
  background: #dbe7f3;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(1, 51, 105, 0.14);
  height: 14px;
  margin-top: 0.2rem;
  width: 14px;
}

.scx-timeline-step.is-active .scx-timeline-dot {
  background: #ffa500;
  box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.35);
}

.scx-timeline-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.scx-timeline-copy strong {
  color: #013369;
}

.scx-notification-bell {
  display: inline-block;
  position: relative;
}

.scx-bell-trigger {
  align-items: center;
  background: #013369;
  border: none;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  position: relative;
  width: 46px;
}

.scx-bell-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.scx-bell-badge {
  align-items: center;
  background: #dc2626;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 0.3rem;
  position: absolute;
  right: -2px;
  top: -3px;
}

.scx-notification-dropdown {
  background: #fff;
  border: 1px solid rgba(1, 51, 105, 0.12);
  border-radius: 18px;
  box-shadow: 0 26px 50px rgba(1, 51, 105, 0.18);
  display: none;
  max-height: 360px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 0.7rem);
  width: min(380px, 92vw);
  z-index: 30;
}

.scx-notification-bell.is-open .scx-notification-dropdown {
  display: block;
}

.scx-dropdown-head {
  align-items: center;
  border-bottom: 1px solid rgba(1, 51, 105, 0.08);
  display: flex;
  justify-content: space-between;
  padding: 0.95rem 1rem;
}

.scx-notification-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(1, 51, 105, 0.08);
  cursor: pointer;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 24px 1fr;
  padding: 0.95rem 1rem;
  text-align: left;
  width: 100%;
}

.scx-notification-item.is-unread {
  background: rgba(255, 165, 0, 0.08);
}

.scx-notification-item.is-read {
  opacity: 0.82;
}

.scx-notification-copy {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.scx-notification-copy strong {
  color: #16324f;
  font-size: 0.92rem;
  font-weight: 600;
}

.scx-notification-copy small {
  color: #5c728a;
}

.scx-dropdown-empty {
  padding: 1rem;
}

.scx-success-card {
  margin: 0 auto;
  max-width: 520px;
  padding: 2rem;
  text-align: center;
}

.scx-success-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.scx-empty {
  margin: 0;
}

@media (max-width: 960px) {
  .scx-stats-row,
  .scx-filter-row,
  .scx-form-grid,
  .scx-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .scx-stats-row,
  .scx-filter-row,
  .scx-form-grid,
  .scx-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .scx-header-row,
  .scx-item-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .scx-toggle-group {
    width: 100%;
  }

  .scx-toggle {
    flex: 1;
  }

  .scx-notification-dropdown {
    right: auto;
    left: 0;
  }
}

@media print {
  .scx-btn,
  .scx-bell-trigger,
  .scx-card-actions,
  .scx-filter-row,
  .scx-form-actions {
    display: none !important;
  }

  .scx-panel,
  .scx-issue-card,
  .scx-issue-row,
  .scx-item-card,
  .scx-success-card,
  .scx-timeline-card,
  .scx-stat-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .scx-inspection-dashboard,
  .scx-issue-tracker,
  .scx-action-panel {
    color: #000;
  }
}
