/* custom.css - PCSHS Premium Design System */

/* 1. Global Variables & Color Palette */
:root {
  /* PCSHS Official Colors - Refined for Formal Government Context */
  --pcshs-navy: #102a43; /* Deep Formal Navy */
  --pcshs-navy-light: #243b53;
  --pcshs-gold: #b8860b; /* Classic Formal Gold */
  --pcshs-gold-light: #d4af37;
  
  /* System Colors */
  --q-primary: var(--pcshs-navy);
  --q-secondary: #486581;
  --q-success: #1b4d3e; /* Formal Forest Green */
  --q-warning: #855d10;
  --q-danger: #7b1d1d; /* Formal Deep Red */
  --q-info: #124e6a;

  /* Backgrounds */
  --bg-body: #f0f4f8; /* Very clean professional grey */
  --bg-card: #ffffff;
  --bg-sidebar: var(--pcshs-navy);

  /* Effects & Shadows - Subtle & Professional */
  --card-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --card-hover-shadow: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.1);
  --primary-glow: 0 0 15px rgba(16, 42, 67, 0.1);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* 1.1 Utility Helpers */
.extra-small {
  font-size: 0.7rem !important;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 2. Typography */
body {
  font-family: "Sarabun", "Inter", sans-serif;
  background-color: var(--bg-body);
  color: #102a43;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--pcshs-navy);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* 3. Gradient Texts */
.text-gradient-pcshs {
  background: linear-gradient(90deg, var(--pcshs-navy), var(--q-info));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-orange {
  background: linear-gradient(90deg, var(--pcshs-orange), var(--pcshs-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* 4. Card Styling (Premium Glass & Soft Shadow) */
.card {
  background-color: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.card-stat {
  position: relative;
  overflow: hidden;
}

/* Decorative Card Element */
.card-stat::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(
    circle,
    rgba(232, 93, 4, 0.05) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(30%, -30%);
  pointer-events: none;
}

.hover-card:hover,
.card-stat:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-hover-shadow);
  border-bottom: 4px solid var(--pcshs-orange);
}

/* 5. Navbar Styling (PCSHS Navy Banner) */
.navbar {
  background-color: var(--pcshs-navy) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 4px solid var(--pcshs-gold);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  color: #ffffff !important;
}

/* 6. Buttons */
.btn {
  border-radius: 50px;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background-color: var(--pcshs-navy);
  border: 1px solid var(--pcshs-navy);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--pcshs-navy-light);
  border-color: var(--pcshs-navy-light);
  transform: translateY(-1px);
}

.btn-warning {
  background-color: var(--pcshs-gold);
  border: 1px solid var(--pcshs-gold);
  color: #fff;
}

.btn-warning:hover {
  background-color: var(--pcshs-gold-light);
  border-color: var(--pcshs-gold-light);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border-color: var(--pcshs-navy);
  color: var(--pcshs-navy);
}

.btn-outline-primary:hover {
  background-color: var(--pcshs-navy);
  color: #fff;
}

/* 7. Form Elements */
.form-control,
.form-select {
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  padding: 0.75rem 1.25rem;
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--pcshs-navy);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(15, 32, 75, 0.1);
}

.form-floating > label {
  padding-left: 1.25rem;
}

/* 8. Special Components */
.icon-box {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  font-size: 1.75rem;
  transition: all 0.3s;
  background: linear-gradient(
    135deg,
    rgba(15, 32, 75, 0.05),
    rgba(15, 32, 75, 0.1)
  );
  color: var(--pcshs-navy);
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 8px solid currentColor;
  background-color: #fff;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.02),
    0 10px 20px rgba(0, 0, 0, 0.05);
}

/* 9. Table Design */
.table {
  margin-bottom: 0;
}

.table-modern {
  border-collapse: separate;
  border-spacing: 0 8px;
  background-color: transparent;
}

.table-modern thead th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  border: none;
  padding: 1.25rem 1rem;
}

.table-modern tbody tr {
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.table-modern tbody tr:hover {
  transform: scale(1.005);
  box-shadow: 0 5px 15px rgba(15, 32, 75, 0.08);
  z-index: 1;
}

.table-modern tbody td {
  padding: 1.25rem 1rem;
  vertical-align: middle;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.table-modern tbody td:first-child {
  border-left: 1px solid #f1f5f9;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.table-modern tbody td:last-child {
  border-right: 1px solid #f1f5f9;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* 10. Badge Design */
.badge {
  padding: 0.6em 1em;
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.bg-primary {
  background-color: var(--pcshs-navy);
  color: #fff !important;
}

.bg-warning {
  background-color: #f59e0b;
  color: #0f204b !important;
}

.bg-success {
  background-color: #059669; 
  color: #fff !important;
}

.bg-danger {
  background-color: #dc2626; 
  color: #fff !important;
}

.bg-info {
  background-color: #0284c7; 
  color: #fff !important;
}

/* Subtle Badge Text Colors for better contrast (WCAG text on light backgrounds) */
.text-success { color: #047857 !important; }
.text-warning { color: #b45309 !important; }
.text-danger  { color: #b91c1c !important; }
.text-info    { color: #0369a1 !important; }
.text-primary { color: var(--pcshs-navy) !important; }

/* 11. Sticky Status (Offline/Online) */
.sticky-status {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 1050;
  box-shadow: var(--card-shadow);
  border-radius: 50px;
  padding: 8px 16px;
  font-weight: 600;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* 12. Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* 13. Print Tweaks */
@media print {
  body {
    background: white;
  }
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    border-bottom: none !important;
  }
  .navbar {
    display: none !important;
  }
}

/* 14. Premium UI/UX Updates */
.stat-card-premium {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 32, 75, 0.05);
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-premium:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(15, 32, 75, 0.1);
  z-index: 10;
}

.stat-card-premium::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  transition: opacity 0.3s ease;
}

.stat-card-premium:hover::before {
  opacity: 0.3;
}

.stat-card-premium .card-body {
  position: relative;
  z-index: 1;
}

.stat-icon-bg {
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-size: 8rem;
  opacity: 0.04;
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease;
  color: currentColor;
}

.stat-card-premium:hover .stat-icon-bg {
  transform: scale(1.15) rotate(-10deg);
  opacity: 0.08;
}

/* Inter Font specifically for Numbers */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");
.number-font {
  font-family: "Inter", "Sarabun", sans-serif !important;
  letter-spacing: -0.04em;
}

/* Custom Gradients by Card Type */
.stat-card-total {
  border-bottom: 4px solid var(--q-info);
  color: var(--q-info);
}
.stat-card-total::before {
  background: radial-gradient(
    circle at 100% 100%,
    var(--q-info) 0%,
    transparent 40%
  );
}

.stat-card-unassigned {
  border-bottom: 4px solid var(--q-danger);
  color: var(--q-danger);
}
.stat-card-unassigned::before {
  background: radial-gradient(
    circle at 100% 100%,
    var(--q-danger) 0%,
    transparent 40%
  );
}

.stat-card-pending {
  border-bottom: 4px solid var(--q-warning);
  color: var(--q-warning);
}
.stat-card-pending::before {
  background: radial-gradient(
    circle at 100% 100%,
    var(--q-warning) 0%,
    transparent 40%
  );
}

.stat-card-completed {
  border-bottom: 4px solid var(--q-success);
  color: var(--q-success);
}
.stat-card-completed::before {
  background: radial-gradient(
    circle at 100% 100%,
    var(--q-success) 0%,
    transparent 40%
  );
}

/* Premium Table */
.table-premium {
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}
.table-premium tbody tr {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #fff;
}
.table-premium tbody tr:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 10px 25px rgba(15, 32, 75, 0.06);
  position: relative;
  z-index: 10;
}
.table-premium tbody td {
  border-bottom: none;
  border-top: 1px solid rgba(0, 0, 0, 0.02);
  background-color: inherit;
}
.table-premium tbody td:first-child {
  border-left: 3px solid transparent;
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}
.table-premium tbody tr:hover td:first-child {
  border-left-color: var(--pcshs-orange);
}
.table-premium tbody td:last-child {
  border-right: 1px solid rgba(0, 0, 0, 0.02);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.table-premium thead th {
  border-bottom: none;
  background-color: transparent !important;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding-bottom: 0.5rem;
}

/* Empty State Styling */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}
.empty-state-icon {
  font-size: 5rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}
.empty-state h5 {
  color: #475569;
  font-weight: 700;
}
.empty-state p {
  color: #94a3b8;
  max-width: 400px;
  margin: 0 auto;
}
/* 15. Extra Motion Effects */
@keyframes successBounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.animate-success {
  animation: successBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid var(--q-success) !important;
}

@keyframes pulse-orange {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 93, 4, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(232, 93, 4, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 93, 4, 0);
  }
}

.btn-pulse {
  animation: pulse-orange 2s infinite;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.animate-shake {
  animation: shake 0.4s ease-in-out 0s 2;
}

/* 16. Print Optimization for PDF Export */
@media print {
  .btn-print-hide,
  .no-print {
    display: none !important;
  }
  .card-premium {
    box-shadow: none !important;
    border: 1px solid #eee !important;
    break-inside: avoid;
  }
}

/* 17. Shared Utility Colors */
.text-orange { color: #f59e0b; }
.bg-orange { background-color: #f59e0b; }
.text-navy { color: var(--pcshs-navy); }

/* 18. Micro-interactions */
.transition-up { transition: transform 0.3s ease; }
/* 19. Accessibility & High-Contrast Utilities */
.text-contrast-high {
  color: #000000 !important;
  font-weight: 500;
}

.text-white-shadow {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.bg-glass-dark {
  background: rgba(16, 42, 67, 0.65) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.readable-small {
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: #475569;
  font-weight: 400;
}

.bg-light-soft {
  background-color: #f8fafc !important;
}

/* 20. Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================
   21. Loading Skeletons & Spinners (P4-1)
   ============================================ */

/* Skeleton Screen for Cards/Stats */
.skeleton-screen {
  position: relative;
  overflow: hidden;
}

.skeleton-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255,255,255,0.6) 50%, 
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
  z-index: 10;
  pointer-events: none;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Skeleton Placeholder Blocks */
.skeleton-block {
  background: linear-gradient(90deg, 
    #e2e8f0 25%, 
    #f1f5f9 50%, 
    #e2e8f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-block.circle {
  border-radius: 50%;
}

.skeleton-block.text-line {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-block.text-line.short {
  width: 60%;
}

.skeleton-block.text-line.medium {
  width: 80%;
}

.skeleton-block.stat-number {
  height: 2.5rem;
  width: 120px;
  margin: 0.5rem 0;
}

.skeleton-block.card-placeholder {
  height: 150px;
  width: 100%;
}

/* Loading Spinner Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-overlay .spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid rgba(16, 42, 67, 0.1);
  border-top-color: var(--pcshs-navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-overlay .spinner.gold {
  border-top-color: var(--pcshs-gold);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay .loading-text {
  margin-top: 1rem;
  color: var(--pcshs-navy);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Relative container for absolute overlays */
.loading-container {
  position: relative;
}

/* Table Loading State */
.table-loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.table-loading-wrapper .spinner-border {
  color: var(--pcshs-navy);
  margin-bottom: 1rem;
}

.table-loading-wrapper .loading-message {
  color: #64748b;
  font-weight: 500;
}

/* Enhanced Empty States (P4-1) */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: var(--radius-lg);
  border: 2px dashed #cbd5e1;
  margin: 1rem 0;
}

.empty-state-icon {
  font-size: 5rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.empty-state-icon.navy {
  color: var(--pcshs-navy);
  opacity: 0.3;
}

.empty-state-icon.gold {
  color: var(--pcshs-gold);
  opacity: 0.4;
}

.empty-state h5 {
  color: #475569;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #94a3b8;
  max-width: 400px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.empty-state .cta-button {
  margin-top: 0.5rem;
}

/* Empty State Variants */
.empty-state.compact {
  padding: 2.5rem 1.5rem;
  border-width: 1px;
}

.empty-state.compact .empty-state-icon {
  font-size: 3.5rem;
}

.empty-state.minimal {
  background: transparent;
  border: none;
  padding: 2rem 1rem;
}

.empty-state.minimal .empty-state-icon {
  font-size: 4rem;
  opacity: 0.5;
}

/* Empty Table Row */
.empty-table-row td {
  padding: 3rem 1rem !important;
  text-align: center;
  background-color: #f8fafc;
}

.empty-table-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.empty-table-content i {
  font-size: 3rem;
  color: #cbd5e1;
}

.empty-table-content .empty-title {
  font-weight: 700;
  color: #475569;
  font-size: 1.1rem;
}

.empty-table-content .empty-description {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Page-level Loading (for AJAX pages) */
.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1.5rem;
}

.page-loading .spinner-lg {
  width: 4rem;
  height: 4rem;
  border: 5px solid rgba(16, 42, 67, 0.1);
  border-top-color: var(--pcshs-navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.page-loading .loading-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pcshs-navy);
}

.page-loading .loading-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin-top: -0.5rem;
}

/* Smooth Transition for Content Reveal */
.content-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.content-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   22. Breadcrumb Navigation (P4-5)
   ============================================ */

.breadcrumb-wrapper {
  background: linear-gradient(135deg, var(--pcshs-navy) 0%, #1e3a5f 100%);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(16, 42, 67, 0.15);
}

.breadcrumb-wrapper .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-wrapper .breadcrumb-item {
  font-size: 0.9rem;
}

.breadcrumb-wrapper .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.breadcrumb-wrapper .breadcrumb-item a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.breadcrumb-wrapper .breadcrumb-item.active {
  color: #ffffff;
  font-weight: 600;
}

.breadcrumb-wrapper .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
  content: "›";
  font-size: 1.2rem;
  font-weight: 300;
}

/* Light Breadcrumb Variant */
.breadcrumb-wrapper.light {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.breadcrumb-wrapper.light .breadcrumb-item a {
  color: var(--pcshs-navy);
}

.breadcrumb-wrapper.light .breadcrumb-item a:hover {
  color: var(--pcshs-gold);
}

.breadcrumb-wrapper.light .breadcrumb-item.active {
  color: var(--pcshs-navy);
}

.breadcrumb-wrapper.light .breadcrumb-item + .breadcrumb-item::before {
  color: #94a3b8;
}

/* ============================================
   23. Form Validation & UX (P4-2)
   ============================================ */

/* Real-time Validation Feedback */
.form-control.is-valid,
.was-validated .form-control:valid {
  border-color: var(--q-success);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%231b4d3e' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: var(--q-danger);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%237b1d1d'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%237b1d1d' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Validation Feedback Messages */
.valid-feedback {
  display: none;
  color: var(--q-success);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.invalid-feedback {
  display: none;
  color: var(--q-danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

.was-validated :valid ~ .valid-feedback,
.is-valid ~ .valid-feedback {
  display: block;
}

.was-validated :invalid ~ .invalid-feedback,
.is-invalid ~ .invalid-feedback {
  display: block;
}

/* Submit Button Loading State */
.btn-submit-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}

.btn-submit-loading::after {
  content: '';
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  top: 50%;
  left: 50%;
  margin-left: -0.625rem;
  margin-top: -0.625rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Form Unsaved Changes Indicator */
.unsaved-changes-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, var(--pcshs-gold) 0%, #d4af37 100%);
  color: #000000;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  display: none;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;
}

.unsaved-changes-bar.visible {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ============================================
   24. Enhanced Print Styles (P4-5)
   ============================================ */

@media print {
  /* Hide Navigation & UI Elements */
  .navbar,
  .sidebar,
  .topbar,
  .no-print,
  .btn-print-hide,
  .sticky-status,
  #qsup-toast-container,
  .unsaved-changes-bar,
  .breadcrumb-wrapper,
  footer,
  .search-overlay,
  .modal,
  .dropdown-menu {
    display: none !important;
  }

  /* Reset Layout for Print */
  body {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12pt;
    line-height: 1.5;
  }

  main.flex-grow-1 {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  /* Card Adjustments */
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .card-header {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #333 !important;
  }

  /* Table Optimization */
  .table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .table th,
  .table td {
    border: 1px solid #ddd !important;
    padding: 0.5rem !important;
    color: #000 !important;
  }

  .table thead th {
    background-color: #f0f0f0 !important;
    color: #000 !important;
    font-weight: 700;
  }

  .table-modern,
  .table-premium {
    border-spacing: 0 !important;
  }

  .table-modern tbody tr,
  .table-premium tbody tr {
    box-shadow: none !important;
    transform: none !important;
  }

  /* Text Colors for Print */
  body,
  .text-navy,
  h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
  }

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

  /* Links */
  a {
    color: #000 !important;
    text-decoration: none !important;
  }

  a[href]:after {
    content: none !important;
  }

  /* Stat Cards */
  .stat-card-premium,
  .card-stat {
    background: white !important;
    border: 2px solid #333 !important;
    box-shadow: none !important;
  }

  /* Badges */
  .badge {
    border: 1px solid #999 !important;
    color: #000 !important;
  }

  /* Page Breaks */
  .page-break-before {
    page-break-before: always;
    break-before: page;
  }

  .page-break-after {
    page-break-after: always;
    break-after: page;
  }

  .avoid-page-break {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Report Header */
  .report-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px double #333;
  }

  .report-header h1 {
    font-size: 18pt;
    margin-bottom: 0.5rem;
  }

  .report-header .report-subtitle {
    font-size: 14pt;
    color: #333;
  }

  .report-header .report-meta {
    font-size: 10pt;
    color: #666;
    margin-top: 0.5rem;
  }

  /* Signature Area */
  .signature-area {
    margin-top: 3rem;
    padding-top: 1rem;
  }

  .signature-line {
    border-top: 1px solid #000;
    margin-top: 3rem;
    padding-top: 0.5rem;
    width: 250px;
    display: inline-block;
  }

  /* Remove Animations */
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
