.nav{display:block;padding:.7rem .9rem;border-radius:.75rem;color:#334155}
.nav:hover,.mnav:hover{background:#eef2ff}
.nav-disclosure{margin:0}
.nav-disclosure-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  cursor:pointer;
  list-style:none;
  font-weight:600;
  user-select:none;
}
.nav-disclosure-toggle::-webkit-details-marker{display:none}
.nav-disclosure-chevron{
  width:1rem;
  height:1rem;
  flex-shrink:0;
  color:#94a3b8;
  transition:transform .15s ease;
}
.nav-disclosure[open] > .nav-disclosure-toggle .nav-disclosure-chevron{
  transform:rotate(180deg);
}
.nav-group{
  display:flex;
  flex-direction:column;
  gap:.15rem;
  margin:.15rem 0 .35rem;
  padding-left:.55rem;
  border-left:2px solid #e2e8f0;
}
.nav-group .nav{padding:.55rem .75rem;font-size:.9rem}
.mnav{display:inline-block;padding:.5rem .8rem;border-radius:.7rem;font-size:.85rem}
.mnav-section{
  color:#64748b;
  font-weight:700;
  font-size:.75rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  pointer-events:none;
}
.card{background:white;border:1px solid #e2e8f0;border-radius:1rem;box-shadow:0 8px 20px rgba(15,23,42,.05)}
.btn{background:#0b2d5f;color:white;border-radius:.75rem;padding:.7rem 1rem;font-weight:600}
.btn-secondary{border:1px solid #cbd5e1;border-radius:.65rem;padding:.45rem .7rem}
.input{width:100%;border:1px solid #cbd5e1;border-radius:.75rem;padding:.75rem;background:white}
.label{font-size:.75rem;font-weight:700;color:#475569;text-transform:uppercase;letter-spacing:.05em}
.ai-pill{border-radius:999px;padding:.35rem .7rem;border:1px solid #cbd5e1}
.ai-pill.active{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.ai-pill.limited{background:#fffbeb;color:#b45309;border-color:#fde68a}
.ai-pill.inactive,.ai-pill.error{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.sq{height:5.5rem;width:5.5rem;border-radius:999px;display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:800;color:white;box-shadow:0 20px 35px rgba(15,23,42,.18)}

/* Global loading overlay */
#global-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#global-loader.is-active {
  display: flex;
}
#global-loader .global-loader-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}
#global-loader .global-loader-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 3px solid #e2e8f0;
  border-top-color: #0b2d5f;
  animation: global-loader-spin 0.7s linear infinite;
}
#global-loader .global-loader-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0b2d5f;
}
@keyframes global-loader-spin {
  to { transform: rotate(360deg); }
}
body.global-loader-open {
  cursor: progress;
}

/* Password strength meter */
.password-strength {
  margin-top: 0.5rem;
}
.password-strength-track {
  height: 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.password-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.15s ease, background-color 0.15s ease;
  background: #94a3b8;
}
.password-strength[data-score="1"] .password-strength-fill { background: #dc2626; }
.password-strength[data-score="2"] .password-strength-fill { background: #ea580c; }
.password-strength[data-score="3"] .password-strength-fill { background: #ca8a04; }
.password-strength[data-score="4"] .password-strength-fill { background: #059669; }
.password-strength-label {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #64748b;
  min-height: 1rem;
}

/* Handover SQVPEC section title */
.review-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b2d5f;
  letter-spacing: -0.01em;
  line-height: 1.25;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid #e2e8f0;
  display: inline-block;
  min-width: 4.5rem;
}

/* Handover review round toggle */
.review-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  padding: 0.4rem 0.75rem 0.4rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.review-toggle:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}
.review-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.review-toggle-control {
  position: relative;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 2px solid #94a3b8;
  background: #fff;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.review-toggle-control::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background-color 0.15s ease, transform 0.15s ease;
  transform: scale(0.4);
}
.review-toggle-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.review-toggle.is-checked {
  border-color: #86efac;
  background: #ecfdf5;
  color: #047857;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.review-toggle.is-checked .review-toggle-control {
  border-color: #10b981;
  background: #10b981;
}
.review-toggle.is-checked .review-toggle-control::after {
  background: #fff;
  transform: scale(1);
}
.review-toggle:focus-within {
  outline: 2px solid #0b2d5f;
  outline-offset: 2px;
}

.ai-summary {
  color: #334155;
  line-height: 1.6;
}
.ai-summary p { margin: 0 0 0.85rem; }
.ai-summary ul, .ai-summary ol { margin: 0 0 0.85rem; padding-left: 1.25rem; }
.ai-summary li { margin: 0.25rem 0; }
.ai-summary strong { color: #0b2d5f; }
.ai-summary hr { margin: 1rem 0; border: 0; border-top: 1px solid #e2e8f0; }

/* Shift Handover Dashboard */
.dash-tab {
  display: inline-block;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.45rem 0.85rem;
  color: #475569;
  background: #fff;
}
.dash-tab.active {
  background: #0b2d5f;
  border-color: #0b2d5f;
  color: #fff;
  font-weight: 600;
}
.dash-filters-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  justify-content: flex-end;
}
.dash-filters-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}
.dash-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.dash-filters-top > .dash-filter-field {
  min-width: 9.5rem;
  max-width: 14rem;
}
.dash-filters-top > .dash-shift-colour-field {
  min-width: auto;
  max-width: none;
}
.dash-filter-field .input {
  padding: 0.55rem 0.7rem;
  width: 100%;
}
.dash-shift-colour-field .dash-shift-colour-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-sizing: border-box;
  min-height: 2.45rem;
  height: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
}
.dash-shift-colour-field .dash-shift-colour-swatch {
  width: 0.9rem;
  height: 0.9rem;
}
.dash-shift-colour-swatch {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
.dash-shift-colour-swatch.is-light {
  border-color: #94a3b8;
  box-shadow: none;
}
.dash-shift-colour-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem 0.15rem 0.3rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-weight: 600;
}
.dash-shift-colour-chip .dash-shift-colour-swatch {
  width: 0.7rem;
  height: 0.7rem;
}
@media (max-width: 900px) {
  .dash-filters-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .dash-filters-row {
    grid-template-columns: 1fr;
  }
}
.dash-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}
.dash-kpi-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0.85rem;
  color: #0f172a;
  line-height: 1;
}
.dash-kpi-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}
.dash-trend {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.dash-trend.up { color: #dc2626; }
.dash-trend.down { color: #dc2626; }
.dash-trend.good { color: #16a34a; }
.dash-trend.muted { color: #94a3b8; }
.dash-chart-wrap { position: relative; height: 240px; }
.dash-chart-wrap--tall { height: 320px; }
.dash-donut-wrap { width: 200px; height: 200px; flex-shrink: 0; }
.dash-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dash-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.875rem;
}
.dash-insight {
  background: var(--tint, #f8fafc);
  border: 1px solid #e2e8f0;
  border-top: 3px solid var(--accent, #64748b);
  border-radius: 0.9rem;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 11rem;
}
.dash-ai-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}
.dash-ai-footer {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #059669;
}
.dash-ai-body p { margin: 0 0 0.75rem; }
.dash-ai-body ul, .dash-ai-body ol { margin: 0 0 0.75rem; padding-left: 1.2rem; }
.dash-focus-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.line-clamp-5 {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive table helpers */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive {
  min-width: 42rem;
}
.table-actions {
  white-space: nowrap;
}
.table-actions .btn-secondary {
  white-space: nowrap;
}

