:root {
  --hansecurity-blue: #0e71b4;
  --hansecurity-gray: #9c9ea0;
  --hansecurity-blue-dark: #0a5a91;
  --hansecurity-blue-light: #eaf5fb;
  --app-bg: #f5f7fa;
  --app-border: #e1e5ea;
  --app-text: #1f2937;
}

body {
  min-height: 100vh;
  background: var(--app-bg);
  color: var(--app-text);
}

a {
  color: var(--hansecurity-blue);
}

a:hover {
  color: var(--hansecurity-blue-dark);
}

.text-muted {
  color: #6f7479 !important;
}

.btn-primary {
  --bs-btn-bg: var(--hansecurity-blue);
  --bs-btn-border-color: var(--hansecurity-blue);
  --bs-btn-hover-bg: var(--hansecurity-blue-dark);
  --bs-btn-hover-border-color: var(--hansecurity-blue-dark);
  --bs-btn-active-bg: var(--hansecurity-blue-dark);
  --bs-btn-active-border-color: var(--hansecurity-blue-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--hansecurity-blue);
  --bs-btn-border-color: var(--hansecurity-blue);
  --bs-btn-hover-bg: var(--hansecurity-blue);
  --bs-btn-hover-border-color: var(--hansecurity-blue);
  --bs-btn-active-bg: var(--hansecurity-blue-dark);
  --bs-btn-active-border-color: var(--hansecurity-blue-dark);
}

.btn-outline-secondary {
  --bs-btn-color: #60656b;
  --bs-btn-border-color: var(--hansecurity-gray);
  --bs-btn-hover-bg: #eef1f4;
  --bs-btn-hover-border-color: #84878a;
  --bs-btn-hover-color: #34383d;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--hansecurity-blue);
  box-shadow: 0 0 0 0.2rem rgba(14, 113, 180, 0.18);
}

.form-check-input:checked {
  background-color: var(--hansecurity-blue);
  border-color: var(--hansecurity-blue);
}

.app-navbar {
  background: #fff;
  border-bottom: 3px solid var(--hansecurity-blue);
}

.app-navbar .navbar-brand {
  color: var(--app-text);
}

.app-brand {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  line-height: 1;
  min-height: 42px;
  padding-bottom: 0;
  padding-top: 0;
}

.app-brand-logo-frame {
  align-items: center;
  display: inline-flex;
  height: 40px;
}

.app-logo-navbar {
  display: block;
  height: 34px;
  object-fit: contain;
  width: auto;
}

.app-brand-divider {
  align-self: stretch;
  background: var(--app-border);
  display: inline-block;
  margin: 0.45rem 0;
  width: 1px;
}

.app-brand-service {
  color: var(--app-text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.app-logo-login {
  width: 170px;
  max-width: 100%;
  height: auto;
}

.app-sidebar {
  min-height: calc(100vh - 59px);
  border-color: var(--app-border) !important;
}

.app-sidebar .nav-link {
  border-left: 4px solid transparent;
  color: #525960;
  font-weight: 500;
}

.app-sidebar .nav-link:hover {
  background: var(--hansecurity-blue-light);
  color: var(--hansecurity-blue-dark);
}

.app-sidebar .nav-link.active {
  background: var(--hansecurity-blue-light);
  border-left-color: var(--hansecurity-blue);
  color: var(--hansecurity-blue-dark);
  font-weight: 700;
}

.card {
  border-color: var(--app-border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.card-header {
  border-bottom-color: var(--app-border);
}

.table {
  --bs-table-hover-bg: var(--hansecurity-blue-light);
}

.table-light {
  --bs-table-bg: #f7f9fb;
  --bs-table-color: #42474d;
}

.progress {
  background-color: #e8edf2;
}

.progress-bar {
  background-color: var(--hansecurity-blue);
}

.badge.text-bg-primary {
  background-color: var(--hansecurity-blue) !important;
}

.badge.text-bg-secondary {
  background-color: #7f858b !important;
}

.badge.text-bg-light {
  color: #46505a !important;
}

.page-heading {
  gap: 1rem;
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #6f7479;
}

.empty-state-title {
  color: var(--app-text);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dashboard-tile {
  border-top: 3px solid var(--hansecurity-blue);
}

.dashboard-icon {
  align-items: center;
  background: var(--hansecurity-blue-light);
  border-radius: 0.5rem;
  color: var(--hansecurity-blue-dark);
  display: inline-flex;
  font-weight: 700;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.login-shell {
  background:
    linear-gradient(135deg, rgba(14, 113, 180, 0.1), rgba(156, 158, 160, 0.08)),
    var(--app-bg);
}

.login-card {
  border-top: 4px solid var(--hansecurity-blue);
}

@media (min-width: 992px) {
  .app-sidebar {
    position: sticky;
    top: 59px;
  }
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.table-fixed-min {
  min-width: 1080px;
}

.table-checklist-entry {
  table-layout: fixed;
  min-width: max-content;
  width: max-content;
}

.table-checklist-entry col.checklist-column-reference {
  width: 10rem;
}

.table-checklist-entry col.checklist-column-result_input {
  width: 6.5rem;
}

.table-checklist-entry col.checklist-column-status_input {
  width: 14rem;
}

.table-checklist-entry col.checklist-column-evidence_upload {
  width: 15rem;
}

.table-checklist-entry th,
.table-checklist-entry td {
  padding: 0.45rem 0.55rem;
  vertical-align: top;
}

.table-checklist-entry th {
  font-size: 0.875rem;
  position: relative;
  white-space: nowrap;
}

.column-resize-handle {
  bottom: 0;
  cursor: col-resize;
  position: absolute;
  right: -0.3rem;
  top: 0;
  touch-action: none;
  width: 0.6rem;
  z-index: 2;
}

.column-resize-handle::after {
  background: #d8dde3;
  bottom: 0.45rem;
  content: "";
  position: absolute;
  right: 0.28rem;
  top: 0.45rem;
  width: 1px;
}

.column-resize-handle:hover::after,
.column-resize-handle:focus-visible::after,
.table-checklist-entry th.is-resizing .column-resize-handle::after {
  background: var(--hansecurity-blue);
  width: 2px;
}

.is-resizing-column {
  cursor: col-resize;
  user-select: none;
}

.table-checklist-entry .is-column-hidden {
  display: none;
}

.hidden-column-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--app-border);
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.hidden-column-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.flattened-header {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
  white-space: normal;
}

.flattened-header-line {
  display: block;
  overflow-wrap: anywhere;
}

.table-checklist-entry .checklist-column-reference {
  min-width: 7.5rem;
  max-width: 16rem;
}

.table-checklist-entry .checklist-column-result_input {
  min-width: 7rem;
  width: 8rem;
}

.table-checklist-entry .checklist-column-status_input {
  min-width: 14rem;
  width: 18rem;
}

.table-checklist-entry .checklist-column-evidence_upload {
  min-width: 15rem;
  width: 18rem;
}

.step-badge {
  width: 2rem;
  height: 2rem;
}

.cell-preview {
  min-width: 0;
}

.truncated-cell {
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.cell-detail-button {
  color: var(--hansecurity-blue);
  margin-top: 0.25rem;
  padding: 0;
  text-decoration: none;
}

.cell-detail-button:hover {
  color: var(--hansecurity-blue-dark);
  text-decoration: underline;
}

.cell-detail-text {
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.app-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.25rem;
  padding: 0;
  border: 1px solid #6c757d;
  border-radius: 50%;
  background: transparent;
  color: #6c757d;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: text-bottom;
  cursor: help;
}

.app-help-icon:hover,
.app-help-icon:focus-visible {
  border-color: #0d6efd;
  color: #0d6efd;
  outline: none;
}
