/* ==========================================================================
   CRIZANT SHIELD™ — ENTERPRISE RESPONSIVE DESIGN & UX SYSTEM (v4.0)
   Optimised for Mobile Phones, Tablets, Laptops, Desktops & Ultrawide Displays
   Brand Guidelines Compliant • High Accessibility • Idiot-Proof Simplicity
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. UNIVERSAL RESETS & VIEWPORT CONTAINMENT
   -------------------------------------------------------------------------- */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden !important;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Touch targets and smooth scrolling */
button, select, input, a, .segment-btn, .nav-pill, .filter-chip, .head-pill-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Smooth custom horizontal scrollbars for pill rails and tables */
.nav-pills, .toolbar, .drawer-tabs, .segment-group, .mobile-tabbar, .head-filter-group {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.nav-pills {
  min-width: 0 !important;
}

/* Responsive Container Max Widths */
.page-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  transition: padding 0.2s ease, max-width 0.2s ease;
}

/* --------------------------------------------------------------------------
   2. DESKTOP & ULTRAWIDE DISPLAYS (>= 1441px)
   -------------------------------------------------------------------------- */
@media (min-width: 1441px) {
  .topbar-inner {
    max-width: 1440px;
  }
  .page-container {
    max-width: 1440px;
    padding: 36px 36px 96px;
  }
  .head-risk-cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .kpi-strip {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* --------------------------------------------------------------------------
   3. LAPTOPS & STANDARD DESKTOPS (1025px - 1440px)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1440px) {
  .topbar-inner {
    padding: 8px 18px;
    gap: 10px;
  }
  .auth-user-meta {
    max-width: 120px;
  }
  .page-container {
    padding: 28px 24px 88px;
  }
  .nav-pill {
    padding: 6px 10px;
    font-size: 12px;
  }
  .head-hero-bar {
    padding: 22px 24px;
  }
  .head-risk-cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
  .head-risk-card {
    padding: 16px 18px;
  }
  .head-card-count {
    font-size: 28px;
  }
  .drawer-sheet {
    width: 540px !important;
  }
}

/* --------------------------------------------------------------------------
   4. TABLETS & SMALL LAPTOPS (641px - 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 641px) and (max-width: 1024px) {
  .topbar {
    min-height: 64px;
    height: auto;
  }
  .topbar-inner {
    padding: 8px 14px;
    gap: 8px 10px;
  }
  .auth-user-role, .auth-user-wrap .auth-src-pill {
    display: none;
  }
  .auth-user-meta {
    max-width: 110px;
  }
  #mobileToggleBtn {
    display: none;
  }
  .brand-org {
    display: none;
  }
  .brand-name {
    font-size: 15px;
  }
  .brand-suite-tag {
    font-size: 11px;
  }
  .nav-pills {
    overflow: visible !important;
  }
  .nav-pill {
    padding: 5px 10px;
    font-size: 12px;
    gap: 5px;
  }
  .page-container {
    padding: 20px 16px 84px;
  }

  /* 2x2 Grids for Metrics & Tiers */
  .head-risk-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }
  .grid-2 {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }

  /* Head Triage Hero & Toolbar */
  .head-hero-bar {
    padding: 20px;
  }
  .head-filter-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .head-filter-row::-webkit-scrollbar {
    display: none !important;
  }
  .head-filter-group {
    flex-shrink: 0 !important;
    justify-content: flex-start;
    padding: 3px 4px !important;
  }

  /* Drawer Sizing */
  .drawer-sheet {
    width: 72% !important;
  }

  /* Modal Sizing */
  .modal-dialog {
    max-width: 90% !important;
  }
}

/* --------------------------------------------------------------------------
   5. MOBILE PHONES (<= 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  /* Streamlined Topbar */
  .topbar {
    height: 58px !important;
  }
  .topbar-inner {
    padding: 0 12px !important;
    gap: 8px !important;
  }
  .brand-mark-svg {
    width: 28px !important;
    height: 28px !important;
  }
  .brand-text-lockup {
    display: none !important;
  }
  .nav-pills {
    display: none !important;
  }
  .topbar-right {
    gap: 6px !important;
  }
  .auth-user-meta {
    display: none !important;
  }
  .auth-user-pill {
    padding: 3px 7px 3px 3px !important;
    gap: 5px !important;
  }
  .mode-switch {
    display: none !important;
  }
  #mobileToggleBtn {
    display: none !important;
  }
  .topbar-right .btn-primary {
    font-size: 11.5px !important;
    padding: 6px 10px !important;
    gap: 4px !important;
  }

  /* Page Container Spacing */
  .page-container {
    padding: 14px 12px 84px !important;
  }

  /* Role Strip */
  .role-strip-inner {
    padding: 8px 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  .role-strip-perm {
    margin-left: 0 !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
  .role-strip-more {
    align-self: flex-end;
    font-size: 11px !important;
    padding: 2px 6px !important;
  }

  /* Head Hero Banner */
  .head-hero-bar {
    padding: 16px 14px !important;
    border-radius: 10px !important;
    margin-bottom: 14px !important;
  }
  .head-hero-bar h1 {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }
  .head-hero-bar p {
    font-size: 12px !important;
  }
  .head-hero-bar > div {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .head-hero-bar > div > div:last-child {
    text-align: left !important;
    margin-top: 10px;
    padding: 10px 14px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .head-hero-bar > div > div:last-child .head-hero-stat-val {
    font-size: 20px !important;
  }

  /* Governance Alert Banner */
  .governance-strip-banner {
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .governance-strip-banner button {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Filter Toolbar (Strict 1 Single Line) */
  .head-filter-toolbar {
    padding: 10px 12px !important;
    margin-bottom: 14px !important;
    border-radius: 10px !important;
  }
  .head-filter-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .head-filter-row::-webkit-scrollbar {
    display: none !important;
  }
  .head-filter-group {
    width: auto !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    padding: 3px 4px !important;
    border-radius: 8px !important;
    gap: 2px !important;
  }
  .head-filter-group::-webkit-scrollbar {
    display: none;
  }
  .head-pill-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }

  /* 4 Primary Risk Tier Cards (2x2 Grid on Mobile for Maximum Space Efficiency) */
  .head-risk-cards-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .head-risk-card {
    padding: 12px 10px !important;
    border-radius: 10px !important;
  }
  .head-card-top {
    margin-bottom: 6px !important;
    flex-direction: column !important;
    gap: 3px !important;
  }
  .head-card-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
  .head-card-count {
    font-size: 22px !important;
  }
  .head-card-stake {
    font-size: 11.5px !important;
    margin-top: 2px !important;
  }
  .head-card-desc {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    margin-top: 6px !important;
    padding-top: 6px !important;
  }

  /* Section Headings */
  .section-head {
    margin: 18px 0 10px !important;
  }
  .section-head h2 {
    font-size: 16px !important;
  }
  .section-head p {
    font-size: 12px !important;
  }

  /* Transform Tables to Responsive Cards on Mobile */
  .head-ranked-table thead,
  .clean-table thead {
    display: none !important;
  }
  .head-ranked-table,
  .head-ranked-table tbody,
  .head-ranked-table tr,
  .head-ranked-table td,
  .clean-table,
  .clean-table tbody,
  .clean-table tr,
  .clean-table td {
    display: block !important;
    width: 100% !important;
  }
  .head-ranked-table tr,
  .clean-table tr {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 10px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 1px 3px rgba(10, 34, 64, 0.05) !important;
    position: relative !important;
  }
  .head-ranked-table td,
  .clean-table td {
    padding: 6px 0 !important;
    border: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px dashed #F1F5F9 !important;
    font-size: 12px !important;
    text-align: right !important;
  }
  .head-ranked-table td:last-child,
  .clean-table td:last-child {
    border-bottom: none !important;
    padding-top: 10px !important;
    justify-content: flex-end !important;
  }
  .head-ranked-table td::before,
  .clean-table td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--crizant-slate-600);
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
    margin-right: 12px;
    flex-shrink: 0;
  }
  .head-ranked-table td[data-label="Rank"] {
    justify-content: flex-start !important;
    border-bottom: 1px solid #E2E8F0 !important;
    padding-bottom: 8px !important;
  }
  .head-ranked-table td[data-label="Rank"]::before {
    display: none;
  }
  .head-ranked-table td[data-label="Actions"] {
    width: 100% !important;
  }
  .head-ranked-table td[data-label="Actions"] > div {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .head-ranked-table td[data-label="Actions"] button {
    width: 100% !important;
    padding: 8px 10px !important;
    justify-content: center !important;
    font-size: 12px !important;
  }

  /* Case Story Cards on Mobile */
  .case-card {
    border-radius: 10px !important;
    margin-bottom: 14px !important;
  }
  .case-card-top {
    padding: 14px 14px 12px !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .case-risk-pane {
    border-left: 0 !important;
    border-top: 1px solid #E2E8F0 !important;
    padding-left: 0 !important;
    padding-top: 12px !important;
  }
  .case-headline {
    font-size: 16px !important;
  }
  .case-card-foot {
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .case-card-foot button {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px !important;
  }

  /* Full-Width Mobile Modals & Bottom Sheets */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
  }
  .modal-box,
  .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 94vh !important;
    border-radius: 18px 18px 0 0 !important;
    padding: 20px 16px 28px !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3) !important;
    margin: 0 !important;
  }
  .ingest-modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  /* Slide-over Drawer to 100% Mobile View */
  .drawer-sheet {
    width: 100% !important;
    border-radius: 0 !important;
  }
  .drawer-header {
    padding: 14px 16px !important;
  }
  .drawer-tabs {
    padding: 4px 12px !important;
  }
  .drawer-tab {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
  .drawer-body {
    padding: 16px 14px 32px !important;
  }

  /* Mobile Bottom Navigation Bar (Hybrid 4-Tab Layout + ☰ More Sheet) */
  .mobile-tabbar {
    display: flex !important;
    height: 60px !important;
    padding: 0 6px !important;
    padding-bottom: env(safe-area-inset-bottom, 4px) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    overflow: visible !important;
    justify-content: space-around !important;
    gap: 4px !important;
  }
  .mobile-tabbar > .mobile-tab,
  .mobile-tabbar > .mobile-more-wrap > .mobile-tab {
    flex: 1 1 0 !important;
    padding: 6px 4px !important;
    font-size: 10.5px !important;
    width: 100%;
  }
  .mobile-tab-icon {
    font-size: 17px !important;
  }

  /* Toolbar Segments */
  .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .segment-group {
    width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }
  .segment-group::-webkit-scrollbar {
    display: none;
  }
  .segment-btn {
    flex-shrink: 0 !important;
    padding: 6px 11px !important;
    font-size: 12px !important;
  }
  .search-wrapper {
    min-width: 100% !important;
    flex: 1 1 100% !important;
  }

  /* Knowledge Graph Canvas on Mobile */
  .kg-canvas-stage {
    width: 100% !important;
    height: 340px !important;
  }
  .kg-toolbar {
    padding: 8px 10px !important;
  }
  .kg-toolbar select, .kg-toolbar input {
    width: 100% !important;
  }
  .kg-legend-bar {
    padding: 8px 10px !important;
    font-size: 10.5px !important;
  }
  .kg-legend-item {
    font-size: 10.5px !important;
  }

  /* FMC Loop in Governance */
  .fmc-loop {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .fmc-loop-arrow {
    display: none !important;
  }
  .fmc-loop-step {
    padding: 10px 12px !important;
  }
  .fmc-loop-n {
    font-size: 22px !important;
  }

  /* Field Investigator VoIP Calling on Mobile */
  .voip-live-transcript-feed {
    max-height: 180px !important;
    font-size: 11px !important;
  }
  .mycase {
    padding: 14px 12px !important;
    border-radius: 10px !important;
  }
  .mycase-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .mycase-actions button {
    width: 100% !important;
  }
}

/* --------------------------------------------------------------------------
   6. MOBILE PREVIEW SIMULATION FRAME (.mobile-frame-mode)
   Applies full mobile phone styling inside desktop container preview
   -------------------------------------------------------------------------- */
.mobile-frame-mode {
  max-width: 420px !important;
  margin: 16px auto 80px !important;
  padding: 16px 12px 70px !important;
  border: 12px solid #0A2240 !important;
  border-radius: 36px !important;
  box-shadow: 0 20px 60px rgba(10, 34, 64, 0.25) !important;
  background: #FFFFFF !important;
}

.mobile-frame-mode::before {
  content: "" !important;
  display: block !important;
  width: 110px !important;
  height: 16px !important;
  background: #0A2240 !important;
  border-radius: 0 0 12px 12px !important;
  margin: -16px auto 14px !important;
}

.mobile-frame-mode .head-hero-bar {
  padding: 14px 12px !important;
}
.mobile-frame-mode .head-hero-bar h1 {
  font-size: 17px !important;
}
.mobile-frame-mode .head-hero-bar p {
  font-size: 11.5px !important;
}
.mobile-frame-mode .head-risk-cards-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}
.mobile-frame-mode .head-risk-card {
  padding: 10px 8px !important;
}
.mobile-frame-mode .head-card-count {
  font-size: 20px !important;
}
.mobile-frame-mode .head-card-stake {
  font-size: 11px !important;
}
.mobile-frame-mode .head-filter-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch;
}
.mobile-frame-mode .head-filter-row::-webkit-scrollbar {
  display: none !important;
}
.mobile-frame-mode .head-filter-group {
  width: auto !important;
  flex-shrink: 0 !important;
  overflow-x: visible !important;
  flex-wrap: nowrap !important;
}
.mobile-frame-mode .head-ranked-table thead,
.mobile-frame-mode .clean-table thead {
  display: none !important;
}
.mobile-frame-mode .head-ranked-table,
.mobile-frame-mode .head-ranked-table tbody,
.mobile-frame-mode .head-ranked-table tr,
.mobile-frame-mode .head-ranked-table td,
.mobile-frame-mode .clean-table,
.mobile-frame-mode .clean-table tbody,
.mobile-frame-mode .clean-table tr,
.mobile-frame-mode .clean-table td {
  display: block !important;
  width: 100% !important;
}
.mobile-frame-mode .head-ranked-table tr,
.mobile-frame-mode .clean-table tr {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 8px !important;
  padding: 12px !important;
  margin-bottom: 10px !important;
  box-shadow: 0 1px 3px rgba(10, 34, 64, 0.04) !important;
}
.mobile-frame-mode .head-ranked-table td,
.mobile-frame-mode .clean-table td {
  padding: 5px 0 !important;
  border: none !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px dashed #F1F5F9 !important;
  font-size: 11.5px !important;
}
.mobile-frame-mode .head-ranked-table td::before,
.mobile-frame-mode .clean-table td::before {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 10px;
  color: #64748B;
  font-weight: 700;
  text-transform: uppercase;
}
.mobile-frame-mode .head-ranked-table td:last-child,
.mobile-frame-mode .clean-table td:last-child {
  border-bottom: none !important;
  padding-top: 8px !important;
  justify-content: flex-end !important;
}
.mobile-frame-mode .kg-canvas-stage {
  height: 280px !important;
}
.mobile-frame-mode .grid-2,
.mobile-frame-mode .grid-3 {
  grid-template-columns: 1fr !important;
}
.mobile-frame-mode .kpi-strip {
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}
.mobile-frame-mode .kpi-box {
  padding: 10px !important;
}
.mobile-frame-mode .kpi-box-value {
  font-size: 18px !important;
}
.mobile-frame-mode .kpi-box-foot {
  display: none !important;
}

/* --------------------------------------------------------------------------
   7. IDIOT-PROOF VISUAL CLARITY & ACCESSIBILITY ENHANCEMENTS
   -------------------------------------------------------------------------- */
/* High contrast focus ring for accessible keyboard and touch navigation */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--crizant-blue-600, #0057D9) !important;
  outline-offset: 2px !important;
}

/* Clear Visual State for Selected/Active Filter Badges */
.head-pill-btn.active {
  background: #0A2240 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(10, 34, 64, 0.25) !important;
}

/* Big tap-friendly action buttons */
.btn-primary {
  min-height: 38px;
}
.head-risk-card.active {
  box-shadow: 0 0 0 3px rgba(10, 34, 64, 0.25), 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Touch-friendly drawer drag handle on mobile */
.drawer-sheet::before {
  content: "";
  display: none;
}
@media (max-width: 640px) {
  .drawer-sheet::before {
    display: block;
    width: 44px;
    height: 4px;
    background: #CBD5E1;
    border-radius: 2px;
    margin: 8px auto 4px;
  }
}

/* --------------------------------------------------------------------------
   8. COMPONENT-SPECIFIC RESPONSIVE OPTIMIZATIONS
   -------------------------------------------------------------------------- */
/* Executive FRMU Dashboard Grid (Replacing giant text banner) */
.head-dashboard-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}
@media (max-width: 1100px) {
  .head-dashboard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 640px) {
  .head-dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

.head-dash-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(10, 34, 64, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.head-dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(10, 34, 64, 0.08);
  border-color: #0057D9;
}
.head-dash-card.active {
  border-color: #0057D9 !important;
  box-shadow: 0 0 0 3px rgba(0, 87, 217, 0.22), 0 8px 20px rgba(10, 34, 64, 0.12) !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%) !important;
}
.head-dash-card.active::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: #0057D9;
}
.head-dashboard-grid.has-active .head-dash-card:not(.active) {
  opacity: 0.72;
}
.head-dashboard-grid.has-active .head-dash-card:not(.active):hover {
  opacity: 1;
}
.head-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.head-dash-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.head-dash-val {
  font-family: var(--font-display, 'Saira', sans-serif);
  font-size: 26px;
  font-weight: 800;
  color: #0A2240;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.head-dash-sub {
  font-size: 12px;
  color: #334155;
  margin-top: 4px;
}
.head-dash-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
  background: #E2E8F0;
  gap: 2px;
}
.head-dash-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #64748B;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #E2E8F0;
}

/* Prompt Card When Queue is Collapsed */
.head-queue-collapsed-prompt {
  background: #FFFFFF;
  border: 1.5px dashed #CBD5E1;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 24px;
  transition: all 0.2s ease;
}
.head-queue-collapsed-prompt:hover {
  background: #F8FAFC;
  border-color: #0057D9;
}

/* UIDAI & Integrations Sub-Nav Rails */
.uidai-subnav-rail {
  display: flex !important;
  gap: 6px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  padding-bottom: 10px !important;
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.uidai-subnav-rail::-webkit-scrollbar {
  display: none;
}
.uidai-subnav-rail button {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* DRM Document Viewer Responsive Styling */
#drmViewerModalContainer .modal-dialog {
  width: 95% !important;
  max-width: 860px !important;
}
@media (max-width: 640px) {
  #drmViewerModalContainer .modal-dialog {
    width: 100% !important;
    max-height: 96vh !important;
  }
}

/* 5x5 RCSA Heatmap Matrix Responsive Styling */
.heatmap-container {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px !important;
}
@media (max-width: 768px) {
  .heatmap-matrix-wrapper {
    grid-template-columns: 110px 1fr !important;
    gap: 6px !important;
  }
  .heatmap-y-label {
    font-size: 9.5px !important;
    padding-right: 6px !important;
  }
  .heatmap-grid-5x5 {
    grid-template-columns: repeat(5, minmax(100px, 1fr)) !important;
    grid-template-rows: repeat(5, 65px) !important;
    gap: 4px !important;
  }
  .heatmap-cell {
    padding: 6px !important;
  }
  .heatmap-cell-val {
    font-size: 13px !important;
  }
  .heatmap-risk-pill {
    font-size: 8.5px !important;
    padding: 1px 4px !important;
  }
}

/* Dual Signoff Surrender Modal */
#surrenderApprovalModalContainer .modal-dialog {
  max-width: 620px;
}
@media (max-width: 640px) {
  #surrenderApprovalModalContainer .modal-dialog {
    width: 100% !important;
    max-height: 94vh !important;
  }
}

/* --------------------------------------------------------------------------
   9. SENIOR UI/UX DESIGN POLISH & FOCUS STATES
   -------------------------------------------------------------------------- */
/* When any risk tier is actively filtered, softly de-emphasize unselected cards */
.head-risk-cards-grid.has-active .head-risk-card:not(.active) {
  opacity: 0.62;
  filter: grayscale(20%);
  transform: none !important;
}
.head-risk-cards-grid.has-active .head-risk-card:not(.active):hover {
  opacity: 0.95;
  filter: none;
  transform: translateY(-2px) !important;
}

/* Active card glowing ring & shadow elevation */
.head-risk-card.tier-critical.active {
  box-shadow: 0 0 0 3px #DC2626, 0 12px 28px rgba(220, 38, 38, 0.18) !important;
  border-color: #DC2626 !important;
}
.head-risk-card.tier-high.active {
  box-shadow: 0 0 0 3px #EA580C, 0 12px 28px rgba(234, 88, 12, 0.18) !important;
  border-color: #EA580C !important;
}
.head-risk-card.tier-medium.active {
  box-shadow: 0 0 0 3px #D97706, 0 12px 28px rgba(217, 119, 6, 0.18) !important;
  border-color: #D97706 !important;
}
.head-risk-card.tier-low.active {
  box-shadow: 0 0 0 3px #16A34A, 0 12px 28px rgba(22, 163, 74, 0.18) !important;
  border-color: #16A34A !important;
}

/* Polished Empty State for Filter Queues */
.card-padded.empty-state-box {
  background: #FFFFFF;
  border: 1px dashed #CBD5E1;
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(10, 34, 64, 0.03);
}

/* Micro-animations and interaction physics */
.btn, .head-pill-btn, .segment-btn, .head-risk-card {
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:active, .head-pill-btn:active, .segment-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   MODERN COMPACT WORKSPACE HEADER BAR (ZERO SCREEN REAL-ESTATE WASTE)
   ========================================================================== */
.workspace-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #E2E8F0);
}

.workspace-header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--crizant-blue-600, #0284C7);
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  padding: 2px 7px;
  border-radius: 4px;
}

.workspace-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 20px;
  font-weight: 800;
  color: var(--crizant-navy-900, #0A2240);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #065F46;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.workspace-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .workspace-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  .workspace-header-right {
    width: 100%;
    justify-content: flex-start;
  }
  .workspace-header-right .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}



