/* CARDS & CONTAINERS */
.card {
  border-radius: var(--premium-border-radius);
  border: 1px solid var(--gray-200);
  box-shadow:
    0 1px 3px rgba(16, 24, 40, 0.1),
    0 1px 2px rgba(16, 24, 40, 0.06);
  background-color: #fff;
  overflow: visible;
  position: relative;
}

.card > *:first-child {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.card > *:last-child {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.table-responsive {
  overflow: visible !important;
}

@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto !important;
  }
}

.card-header-premium {
  padding: 1.25rem 1.5rem;
  background-color: #fff;
  border-bottom: 1px solid var(--gray-200);
}

/* BUTTONS */
.btn-rulio {
  background-color: var(--rulio-red);
  border-color: var(--rulio-red);
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.btn-rulio:hover {
  background-color: var(--rulio-red-hover);
  border-color: var(--rulio-red-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary-rulio {
  background-color: #fff;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius);
}

.btn-secondary-rulio:hover {
  background-color: var(--gray-50);
  color: var(--gray-900);
  border-color: var(--gray-300);
}

/* TABLES */
.table thead th {
  background-color: var(--gray-50);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.table tbody td {
  padding: 16px;
  vertical-align: middle;
}

/* FORMS */
.form-control-material {
  border: none;
  border-bottom: 2px solid var(--gray-200);
  border-radius: 0;
  padding: 0.5rem 0;
  background-color: transparent;
  width: 100%;
  display: block;
  transition: all 0.2s;
}

.form-control-material:focus {
  outline: none;
  border-bottom-color: var(--rulio-red);
  box-shadow: none;
}

.search-pill {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 100px;
  padding: 0.25rem 1rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

/* NOTIFICATIONS */
.notif-item {
  border-bottom: 1px solid var(--gray-100) !important;
  padding: 1.25rem 1.5rem !important;
}

.notif-item.unread {
  background-color: rgba(176, 39, 44, 0.02) !important;
  border-left: 4px solid var(--rulio-red) !important;
}

.notif-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

/* BREADCRUMBS */
.breadcrumb-item a {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-item.active {
  color: var(--gray-900);
  font-weight: 600;
}

/* UTILITIES */
.hover-underline:hover {
  text-decoration: underline !important;
  cursor: pointer;
}

.border-dashed {
  border-style: dashed !important;
}

.border-rulio {
  border-top: 4px solid var(--rulio-red) !important;
}

/* UNIFIED RULIO METRIC / KPI CARD SYSTEM */
.rulio-metric-card {
  border-radius: 12px !important;
  border: 0 !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rulio-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06) !important;
}

.hover-translate {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-translate:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

/* PORTAL FOOTER */
.portal-footer {
  background-color: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--premium-border-radius);
  box-shadow:
    0 1px 3px rgba(16, 24, 40, 0.04),
    0 1px 2px rgba(16, 24, 40, 0.02);
  padding: 1rem 1.5rem;
  transition: all 0.2s ease;
}

.footer-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-600);
  background-color: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 50rem;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.25;
}

.footer-nav-link i {
  font-size: 0.88rem;
  color: var(--gray-400);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-nav-link:hover {
  color: var(--rulio-red);
  background-color: #ffffff;
  border-color: rgba(176, 39, 44, 0.35);
  box-shadow: 0 2px 4px rgba(16, 24, 40, 0.05);
  transform: translateY(-1px);
}

.footer-nav-link:hover i {
  color: var(--rulio-red);
  transform: scale(1.1);
}

.footer-nav-link:active {
  transform: translateY(0);
}

/* EXTENDED SPACING UTILITIES (Decimal Steps) */
.me-1\.5 { margin-right: 0.375rem !important; }
.me-2\.5 { margin-right: 0.75rem !important; }
.me-3\.5 { margin-right: 1.25rem !important; }
.ms-1\.5 { margin-left: 0.375rem !important; }
.ms-2\.5 { margin-left: 0.75rem !important; }
.mb-1\.5 { margin-bottom: 0.375rem !important; }
.mb-2\.5 { margin-bottom: 0.75rem !important; }
.mt-1\.5 { margin-top: 0.375rem !important; }
.mt-2\.5 { margin-top: 0.75rem !important; }
.p-1\.5 { padding: 0.375rem !important; }
.p-2\.5 { padding: 0.625rem !important; }
.px-1\.5 { padding-left: 0.375rem !important; padding-right: 0.375rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.px-3\.5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.py-0\.5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2\.5 { gap: 0.75rem !important; }

/* MEDICAL ASSESSMENT RECOMMENDATION TILES & ROWS */
.recommendation-card {
  border: 1px solid var(--gray-200);
  background-color: #ffffff;
  border-radius: var(--border-radius, 8px);
  padding: 0.85rem 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.recommendation-card:hover {
  border-color: var(--gray-300);
  background-color: #f8fafc;
  box-shadow: 0 2px 4px rgba(16, 24, 40, 0.06);
}
.recommendation-card:has(input:checked) {
  border-color: #94a3b8;
  background-color: #f1f5f9;
}
.recommendation-row {
  border: 1px solid var(--gray-200);
  background-color: #ffffff;
  border-radius: var(--border-radius, 8px);
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.recommendation-row:hover {
  border-color: var(--gray-300);
  background-color: #fafbfc;
}
.recommendation-row:has(input:checked) {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

/* CANDIDATE URN & NAME MODAL TRIGGERS */
.candidate-urn-btn:hover {
  background-color: #f8fafc !important;
  border-color: #e61e2d !important;
  color: #e61e2d !important;
  box-shadow: 0 2px 4px rgba(230, 30, 45, 0.15);
  transform: translateY(-1px);
}
.hover-red:hover {
  color: #e61e2d !important;
}
.hover-red:hover span {
  color: #e61e2d !important;
  text-decoration: underline;
}
.hover-red:hover i {
  color: #e61e2d !important;
  opacity: 1 !important;
}

/* ==========================================================================
   MAINTENANCE & ANIMATION UTILITIES
   ========================================================================== */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   CANDIDATES & SUBMISSIONS TAB STYLES
   ========================================================================== */
.submissions-tabs .nav-link {
  color: var(--gray-600);
  border: none;
  border-bottom: 3px solid transparent !important;
  border-radius: 0;
  font-weight: 600;
  padding: 1rem 1.75rem;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.submissions-tabs .nav-link:hover {
  color: var(--rulio-red);
  background: rgba(186, 27, 29, 0.04);
}

.submissions-tabs .nav-link.active {
  color: var(--rulio-red) !important;
  border-bottom-color: var(--rulio-red) !important;
  background: transparent;
}

.status-pill-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.status-dot-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.matrix-dot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.matrix-dot-green {
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid rgba(15, 81, 50, 0.2);
}

.matrix-dot-red {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid rgba(132, 32, 41, 0.2);
}

.matrix-dot-gray {
  background-color: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.rulio-switch .form-check-input {
  width: 2.75rem;
  height: 1.4rem;
  cursor: pointer;
}

.rulio-switch .form-check-input:checked {
  background-color: var(--rulio-red);
  border-color: var(--rulio-red);
}

.submissions-row {
  transition: background-color 0.15s ease;
}

.submissions-row:hover td {
  background-color: #f8f9fa !important;
}

/* ==========================================================================
   JOB STATUS MATRIX STYLES
   ========================================================================== */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.matrix-table-responsive {
  width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  min-height: 380px;
  padding-bottom: 90px;
}

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

.matrix-cell-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: bold;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.matrix-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: bold;
  color: #fff;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.matrix-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.matrix-toggle-btn:active {
  transform: scale(0.95);
}

.matrix-toggle-btn.btn-pass {
  background-color: #198754 !important;
}

.matrix-toggle-btn.btn-fail {
  background-color: #dc3545 !important;
}

.matrix-toggle-btn.btn-pending {
  background-color: #6c757d !important;
  opacity: 0.45;
}

.matrix-toggle-btn.btn-pending:hover {
  opacity: 0.8;
}

.matrix-table tbody tr:hover {
  background-color: #f8fafc;
}

.matrix-candidate-card {
  border-radius: 10px;
  background-color: #ffffff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.matrix-candidate-card:hover {
  border-color: #d0d5dd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.matrix-result-btn {
  transition: all 0.15s ease-in-out;
}

.matrix-result-btn:hover,
.matrix-result-btn:focus,
.matrix-result-btn.show {
  border-color: var(--rulio-red, #e61e2d) !important;
  background-color: #fafbfc !important;
  box-shadow: 0 0 0 3px rgba(230, 30, 45, 0.12) !important;
}

.matrix-result-btn .badge {
  margin-right: 5px !important;
}

.matrix-result-dropdown .dropdown-menu {
  border-radius: 10px;
  z-index: 9999 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   FATIGUE MANAGEMENT TAB STYLES
   ========================================================================== */
.fatigue-tabs .nav-link {
  color: var(--gray-600);
  border: none;
  border-bottom: 3px solid transparent !important;
  border-radius: 0;
  font-weight: 600;
  padding: 1rem 1.75rem;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.fatigue-tabs .nav-link:hover {
  color: var(--rulio-red);
  background: rgba(186, 27, 29, 0.04);
}

.fatigue-tabs .nav-link.active {
  color: var(--rulio-red) !important;
  border-bottom-color: var(--rulio-red) !important;
  background: transparent;
}

.staff-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.score-badge {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

/* ==========================================================================
   STAFF COMPETENCIES & QUALIFICATIONS TAB STYLES
   ========================================================================== */
.competencies-tabs .nav-link {
  color: var(--gray-600);
  border: none;
  border-bottom: 3px solid transparent !important;
  border-radius: 0;
  font-weight: 600;
  padding: 1rem 1.75rem;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.competencies-tabs .nav-link:hover {
  color: var(--rulio-red);
  background: rgba(186, 27, 29, 0.04);
}

.competencies-tabs .nav-link.active {
  color: var(--rulio-red) !important;
  border-bottom-color: var(--rulio-red) !important;
  background: transparent;
}

.competency-table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: var(--gray-600);
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

.competency-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  font-size: 0.88rem;
}

.matrix-table th {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: var(--gray-600);
  padding: 0.75rem 0.5rem;
  text-align: center;
  vertical-align: middle;
}

.matrix-table td {
  padding: 0.75rem 0.5rem;
  text-align: center;
  vertical-align: middle;
  font-size: 0.82rem;
}

.user-avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(186, 27, 29, 0.1);
  color: var(--rulio-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
}

.status-pill-group .btn-check:checked + .btn {
  background-color: var(--rulio-red) !important;
  border-color: var(--rulio-red) !important;
  color: #fff !important;
}

.btn-secondary-rulio {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 500;
}

.btn-secondary-rulio:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.card-metric-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-metric-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

/* ==========================================================================
   DOCUMENTATION HUB TAB STYLES
   ========================================================================== */
.doc-sidebar-link {
  transition: all 0.15s ease-in-out;
}

.doc-sidebar-link:hover {
  background-color: #f8fafc;
  color: var(--rulio-red, #e61e2d) !important;
}

.doc-sidebar-link.active {
  background-color: rgba(230, 30, 45, 0.08) !important;
  color: var(--rulio-red, #e61e2d) !important;
  font-weight: 600;
  border-left: 3px solid var(--rulio-red, #e61e2d);
}

.doc-section {
  scroll-margin-top: 30px;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 2rem;
}

.doc-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

@media print {
  .sticky-top,
  .input-group,
  button[onclick="window.print()"],
  a[href="?tab=support"],
  #docSidebarNav {
    display: none !important;
  }

  .col-lg-9 {
    width: 100% !important;
  }

  .doc-section {
    page-break-after: always;
    border-bottom: none;
  }
}


