/* ==========================================================================
   Juris AI - ADVOCATE PORTAL & POST-LOGIN DASHBOARD
   Design: Studio-Style Input Bubbles, Top Labels, Orange & White Palette
   ========================================================================== */

:root {
  /* Primary Studio Coral-Orange Palette */
  --studio-blue: #ff5a34;
  --studio-blue-hover: #e04825;
  --studio-bubble-bg: #eff6ff; /* Soft ice-blue/slate bubble */
  --studio-bubble-border: #dbeafe;
  --studio-text-dark: #111827;
  --studio-text-muted: #64748b;
  
  /* Dashboard Warm Sunrise Orange Palette */
  --orange-primary: #ff5a34;
  --orange-light: #ffa56a;
  --orange-soft: #fff7ed;
  --orange-border: #ffedd5;
  --orange-border-subtle: #fed7aa;
  
  --orange-grad: linear-gradient(135deg, #ffa56a 0%, #ff7e47 50%, #ff5a34 100%);
  --orange-button-grad: linear-gradient(90deg, #ffa56a 0%, #ff7e47 50%, #ff5a34 100%);
  --orange-button-hover: linear-gradient(90deg, #ffb27f 0%, #ff8c59 50%, #ff6844 100%);
  --orange-glow: 0 6px 20px rgba(255, 90, 52, 0.35);
  
  /* Neutral Colors */
  --color-white: #ffffff;
  --color-input-text: #0f172a;
  --color-icon: #64748b;
  --color-muted-link: #64748b;
  
  /* Dashboard Colors */
  --dash-bg: #fafafa;
  
  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --transition-fast: 0.16s ease;
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-input: 8px;
  --radius-pill: 25px;
}

/* Reset & Lock Fullscreen - Fixed within Screen Boundary */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--color-white);
  color: var(--color-input-text);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. AUTH SPLIT SCREEN (CORAL-ORANGE SUNRISE WAVE & STUDIO BUBBLE INPUTS)
   ========================================================================== */
.app-viewport {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
}

.split-auth-card {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  position: relative;
  overflow: hidden;
  background: var(--color-white);
}

/* Fullscreen Left Coral-Orange Wave Panel */
.card-left-wave {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wave-bg-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  filter: drop-shadow(6px 0 18px rgba(255, 90, 52, 0.2));
}

.left-wave-content {
  position: relative;
  z-index: 2;
  padding: 40px 40px 40px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #ffffff;
  max-width: 480px;
}

/* Animated Logo */
.left-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#logo-orbit-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  pointer-events: none;
}

.logo-circle-crest {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 0 14px rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-smooth);
}

.left-logo-wrap:hover .logo-circle-crest {
  transform: scale(1.05);
}

.scales-svg {
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.15));
}

.animated-crossbeam {
  transform-origin: 50px 20px;
  animation: balanceTilt 5s ease-in-out infinite alternate;
}

@keyframes balanceTilt {
  0% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
  100% { transform: rotate(-5deg); }
}

.pulse-node {
  animation: nodeGlow 2s ease-in-out infinite alternate;
}

@keyframes nodeGlow {
  0% { r: 2.2; opacity: 0.8; }
  100% { r: 3.4; opacity: 1; filter: drop-shadow(0 0 5px #ffffff); }
}

/* Left Typography */
.left-text-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.1;
  color: #ffffff;
}

.underline-title {
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.underline-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 4px;
  background: #ffffff;
  border-radius: 2px;
}

.brand-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 360px;
  font-weight: 400;
}

/* ==========================================================================
   RIGHT WHITE AUTH PANEL (STUDIO INPUT BUBBLE DESIGN)
   ========================================================================== */
.card-right-panel {
  background: var(--color-white);
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}

.card-right-panel::-webkit-scrollbar {
  width: 6px;
}
.card-right-panel::-webkit-scrollbar-track {
  background: transparent;
}
.card-right-panel::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}
.card-right-panel::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

.auth-view {
  display: none;
  width: 100%;
  max-width: 420px;
  margin: auto 0;
  padding: 10px 0;
  animation: fadeInView 0.25s ease forwards;
  box-sizing: border-box;
}

.auth-view.active {
  display: block;
}

#register-view {
  max-width: 530px;
  margin: auto 0;
  padding: 12px 0;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Registration Role Selector Grid */
.register-role-selector {
  margin-bottom: 12px;
}

.role-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 5px;
}

@media (max-width: 580px) {
  .role-selector-grid {
    grid-template-columns: 1fr;
  }
}

.role-select-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.role-select-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.role-select-card.active {
  background: #fff7ed;
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 2px rgba(255, 90, 52, 0.15);
}

.role-select-card.active .role-card-icon {
  background: var(--orange-primary);
  color: #ffffff;
}

.role-select-card.active .role-card-title {
  color: var(--orange-primary);
}

.role-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.role-card-content {
  min-width: 0;
  flex: 1;
}

.role-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.role-card-desc {
  font-size: 0.66rem;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Form Header Block */
.form-header-block {
  margin-bottom: 12px;
}

.form-welcome-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.form-welcome-sub {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 0;
}

/* Tab Switcher Pills */
.auth-pill-tabs {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 14px;
}

.tab-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-pill-btn:hover {
  color: #0f172a;
}

.tab-pill-btn.active {
  background: #ffffff;
  color: var(--orange-primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 90, 52, 0.15);
}

.tab-pill-btn.active i {
  color: var(--orange-primary);
}

/* Field Groups with Top Labels */
.form-field-group {
  margin-bottom: 11px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  display: block;
}

.req-star {
  color: #ef4444;
  font-weight: 700;
}

/* Soft Studio Bubble Input Wrap */
.bubble-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--studio-bubble-bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-input);
  transition: all var(--transition-fast);
  padding: 0 12px;
}

.bubble-icon {
  color: #94a3b8;
  font-size: 0.88rem;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  width: 15px;
}

.bubble-input-wrap input,
.bubble-input-wrap select {
  width: 100%;
  padding: 9px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-input-text);
  outline: none;
}

.bubble-input-wrap input::placeholder {
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 400;
}

.bubble-input-wrap:focus-within {
  background: #ffffff;
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3.5px rgba(255, 90, 52, 0.16);
}

.bubble-input-wrap:focus-within .bubble-icon {
  color: var(--orange-primary);
}

.bubble-eye-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.bubble-eye-btn:hover {
  color: var(--orange-primary);
}

.select-wrap {
  padding-left: 12px;
  padding-right: 12px;
  position: relative;
  cursor: pointer;
}

/* ==========================================================================
   ENTERPRISE STUDIO CUSTOM SELECT DROPDOWN COMPONENT
   ========================================================================== */
.custom-select-container {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: transparent;
  border: none;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  outline: none;
  box-sizing: border-box;
  overflow: hidden;
}

.custom-select-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.custom-select-arrow {
  font-size: 0.74rem;
  color: #64748b;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
  margin-left: auto;
  flex-shrink: 0;
}

.custom-select-container.is-open .custom-select-arrow {
  transform: rotate(180deg);
  color: var(--orange-primary);
}

.bubble-input-wrap.select-wrap:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.bubble-input-wrap.select-wrap.is-open,
.bubble-input-wrap.select-wrap:focus-within {
  background: #ffffff;
  border-color: var(--orange-primary) !important;
  box-shadow: 0 0 0 3.5px rgba(255, 90, 52, 0.16) !important;
  z-index: 1000 !important;
}

.custom-select-container.is-open {
  z-index: 1001 !important;
}

.custom-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: -12px;
  right: -12px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  box-shadow: 0 16px 36px -4px rgba(255, 90, 52, 0.18), 0 6px 16px -2px rgba(15, 23, 42, 0.08);
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  z-index: 999999 !important;
  scrollbar-width: thin;
  scrollbar-color: #fed7aa transparent;
  animation: customSelectSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.custom-select-container.open-upward .custom-select-menu {
  top: auto;
  bottom: calc(100% + 6px);
  animation: customSelectSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.custom-select-container.is-open .custom-select-menu {
  display: block;
}

@keyframes customSelectSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes customSelectSlideUp {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-select-menu::-webkit-scrollbar {
  width: 5px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
  background: #fed7aa;
  border-radius: 4px;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #1e293b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 8px;
  user-select: none;
}

.custom-select-option:hover {
  background: #fff7ed;
  color: var(--orange-primary);
  font-weight: 600;
  padding-left: 14px;
}

.custom-select-option.is-selected {
  background: #fff1eb;
  color: var(--orange-primary);
  font-weight: 700;
}

.custom-select-option .option-check {
  display: none;
  font-size: 0.78rem;
  color: var(--orange-primary);
}

.custom-select-option.is-selected .option-check {
  display: inline-block;
}

/* Document Category Select Wrapper inside Step 4 */
.doc-category-picker-wrap {
  position: relative;
  background: var(--studio-bubble-bg);
  border: 1.5px solid #dbeafe;
  border-radius: var(--radius-input);
  padding: 6px 12px;
  transition: all var(--transition-fast);
}

.doc-category-picker-wrap:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.doc-category-picker-wrap.is-open,
.doc-category-picker-wrap:focus-within {
  background: #ffffff;
  border-color: var(--orange-primary) !important;
  box-shadow: 0 0 0 3.5px rgba(255, 90, 52, 0.16) !important;
}

.doc-category-picker-wrap .custom-select-menu {
  left: 0;
  right: 0;
}

/* Fallback native select / option styling */
select {
  font-family: var(--font-sans);
  color: #0f172a;
  background: transparent;
  outline: none;
}

select option {
  background: #ffffff;
  color: #0f172a;
  font-size: 0.88rem;
  padding: 8px 12px;
}

/* Options Row (Remember Session + Forgot Password) */
.form-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 20px;
}

.custom-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-wrap input {
  accent-color: var(--orange-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.chk-label {
  font-size: 0.83rem;
  color: #334155;
  font-weight: 500;
}

.forgot-pwd-link {
  font-size: 0.83rem;
  color: var(--orange-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.forgot-pwd-link:hover {
  text-decoration: underline;
  color: #ea580c;
}

/* Warm Sunrise Coral-Orange Submit Button */
.btn-workspace-submit {
  width: 100%;
  padding: 12px 20px;
  background: var(--orange-button-grad);
  border: none;
  border-radius: var(--radius-input);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(255, 90, 52, 0.3);
  transition: all var(--transition-smooth);
}

.btn-workspace-submit:hover {
  background: var(--orange-button-hover);
  box-shadow: 0 6px 20px rgba(255, 90, 52, 0.45);
  transform: translateY(-1px);
}

.btn-workspace-submit:active {
  transform: translateY(0);
}

.bottom-footer-text {
  text-align: center;
  margin-top: 18px;
  font-size: 0.83rem;
  color: #64748b;
}

.bottom-footer-text a {
  color: var(--orange-primary);
  text-decoration: none;
  font-weight: 700;
  margin-left: 3px;
}

.bottom-footer-text a:hover {
  text-decoration: underline;
  color: #ea580c;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid-2 .form-field-group {
  margin-bottom: 12px;
}

.form-grid-2 .bubble-input-wrap input,
.form-grid-2 .bubble-input-wrap select {
  padding: 9px 0;
  font-size: 0.85rem;
}

.form-grid-2 .bubble-icon {
  font-size: 0.88rem;
}

/* ==========================================================================
   2. POST-LOGIN STUDIO DASHBOARD (MATCHES SCREENSHOT)
   ========================================================================== */
.dashboard-viewport {
  width: 100vw;
  height: 100vh;
  display: flex;
  overflow: hidden;
  background: #f8fafc;
  animation: fadeInView 0.25s ease;
  font-family: var(--font-sans);
}

/* LEFT SIDEBAR PANEL */
.dash-sidebar {
  width: 260px;
  height: 100vh;
  background: var(--color-white);
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

.sidebar-top-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-logo-crest {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--orange-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 3px 10px rgba(255, 90, 52, 0.32);
}

.brand-info h2 {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.2px;
}

.portal-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--orange-primary);
  display: inline-block;
}

/* Active Workspace Card */
.active-workspace-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ws-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  display: block;
}

.ws-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 1px;
}

.badge-isolated {
  background: #fff1eb;
  color: #ea580c;
  border: 1px solid #ffd8cc;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
}

/* Sidebar Navigation Menu */
.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin: 10px 0 4px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 12px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: 7px;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  background: #fff8f5;
  color: var(--orange-primary);
}

.nav-link.active {
  background: #fff5f1;
  color: var(--orange-primary);
  font-weight: 700;
  border-left: 3px solid var(--orange-primary);
}

.nav-link i {
  font-size: 0.88rem;
  width: 16px;
  text-align: center;
}

.link-ext-icon {
  margin-left: auto;
  font-size: 0.68rem;
  color: #94a3b8;
  opacity: 0.6;
}

/* Sidebar User Footer */
.sidebar-user-footer {
  margin-top: auto;
  padding: 8px 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  user-select: none;
}

.sidebar-user-footer:hover {
  background: rgba(255, 90, 52, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange-grad, linear-gradient(135deg, #ff7a59 0%, #ff5a34 100%));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.28);
  position: relative;
}

.user-meta-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-name-text {
  font-size: 0.83rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.user-role-text {
  font-size: 0.68rem;
  color: #94a3b8;
}

.btn-sidebar-logout-icon {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-sidebar-logout-icon:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* Collapsed Sidebar */
.dashboard-viewport.collapsed-sidebar .dash-sidebar {
  width: 68px;
  padding: 16px 8px;
  align-items: center;
}

.dashboard-viewport.collapsed-sidebar .sidebar-top-section {
  justify-content: center;
  width: 100%;
  margin-bottom: 16px;
}

.dashboard-viewport.collapsed-sidebar .dash-brand {
  justify-content: center;
  gap: 0;
}

.dashboard-viewport.collapsed-sidebar .brand-info,
.dashboard-viewport.collapsed-sidebar .ws-info,
.dashboard-viewport.collapsed-sidebar .badge-isolated,
.dashboard-viewport.collapsed-sidebar .nav-section-title,
.dashboard-viewport.collapsed-sidebar .nav-link span,
.dashboard-viewport.collapsed-sidebar .link-ext-icon,
.dashboard-viewport.collapsed-sidebar .user-meta-info,
.dashboard-viewport.collapsed-sidebar .btn-sidebar-logout-icon {
  display: none !important;
}

.dashboard-viewport.collapsed-sidebar .active-workspace-card {
  padding: 8px 0;
  justify-content: center;
  width: 100%;
}

.dashboard-viewport.collapsed-sidebar .nav-link {
  justify-content: center;
  padding: 10px 0;
  width: 100%;
}

.dashboard-viewport.collapsed-sidebar .sidebar-user-footer {
  justify-content: center;
  padding: 8px 0;
  width: 100%;
}

/* RIGHT MAIN CONTENT WORKSPACE */
.dash-main-content {
  flex: 1;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
}

.dash-topbar {
  height: 50px;
  background: var(--color-white);
  border-bottom: 1px solid #e2e8f0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-hamburger-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.topbar-hamburger-btn:hover {
  background: rgba(255, 90, 52, 0.08);
  border-color: rgba(255, 90, 52, 0.3);
  color: #ff5a34;
}

.topbar-breadcrumb {
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
  min-width: 0;
}

.topbar-breadcrumb a {
  white-space: nowrap;
  flex-shrink: 0;
}

.crumb-sep {
  color: #cbd5e1;
  flex-shrink: 0;
}

.crumb-current,
#topbar-breadcrumb-current {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#topbar-breadcrumb-current span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: 12px;
}

/* ==========================================================================
   GLOBAL SEARCH BAR & FLOATING RESULTS DROPDOWN
   ========================================================================== */
.topbar-search-container {
  position: relative;
  flex: 1;
  max-width: 480px;
  margin: 0 20px;
}

.topbar-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 0 12px 0 14px;
  height: 36px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-search-input-wrap:focus-within {
  background: #ffffff;
  border-color: var(--orange-primary, #ff7e47);
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.15), 0 4px 12px rgba(15, 23, 42, 0.06);
}

.search-leading-icon {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-right: 9px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.topbar-search-input-wrap:focus-within .search-leading-icon {
  color: var(--orange-primary, #ff7e47);
}

.global-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.84rem;
  color: #0f172a;
  font-family: inherit;
  width: 100%;
}

.global-search-input::placeholder {
  color: #94a3b8;
  font-size: 0.82rem;
}

.btn-search-clear {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 6px;
}

.btn-search-clear:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.search-kbd-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.search-kbd-badge kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  padding: 2px 5px;
  font-family: inherit;
}

/* Floating Search Results Dropdown */
.global-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(0, 0, 0, 0.05);
  max-height: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  animation: dropdownFadeIn 0.18s ease-out;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}

.search-esc-hint kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.64rem;
}

.search-dropdown-body {
  overflow-y: auto;
  max-height: 420px;
  padding: 6px 0;
}

.search-section {
  padding: 4px 0;
}

.search-section:not(:last-child) {
  border-bottom: 1px solid #f1f5f9;
}

.search-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #94a3b8;
  text-transform: uppercase;
}

.search-section-badge {
  background: #f1f5f9;
  color: #64748b;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.62rem;
  font-weight: 700;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.search-item:hover, .search-item.selected {
  background: #fff8f5;
}

.search-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.search-item-icon.icon-case { background: #eff6ff; color: #2563eb; }
.search-item-icon.icon-doc { background: #f0fdf4; color: #16a34a; }
.search-item-icon.icon-hearing { background: #fffbeb; color: #d97706; }
.search-item-icon.icon-task { background: #faf5ff; color: #9333ea; }
.search-item-icon.icon-party { background: #fef2f2; color: #dc2626; }
.search-item-icon.icon-semantic { background: #fff1eb; color: #ea580c; }

.search-item-details {
  flex: 1;
  min-width: 0;
}

.search-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.search-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-match-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
}

.search-item-subtext {
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.search-semantic-snippet {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.35;
  margin-top: 3px;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 5px;
  border-left: 2px solid var(--orange-primary, #ff7e47);
}

.search-empty-state {
  text-align: center;
  padding: 28px 16px;
  color: #94a3b8;
}

.search-empty-state i {
  font-size: 1.8rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

.search-empty-state p {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}

/* ==========================================================================
   TOPBAR NOTIFICATIONS BELL & DROPDOWN MENU
   ========================================================================== */
.topbar-notification-wrap {
  position: relative;
}

.topbar-notif-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.topbar-notif-btn:hover {
  background: #ffffff;
  color: var(--orange-primary, #ff7e47);
  border-color: var(--orange-primary, #ff7e47);
  box-shadow: 0 3px 10px rgba(255, 90, 52, 0.15);
}

.notif-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Floating Notifications Dropdown */
.notifications-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 410px;
  max-width: 95vw;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownFadeIn 0.18s ease-out;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-header-title h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.notif-unread-pill {
  background: #fee2e2;
  color: #ef4444;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-notif-header-action {
  background: none;
  border: none;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-notif-header-action:hover {
  background: #f1f5f9;
  color: var(--orange-primary, #ff7e47);
}

.btn-notif-header-action.text-danger-hover:hover {
  background: #fef2f2;
  color: #ef4444;
}

.btn-notif-header-action.active-sound {
  color: var(--orange-primary, #ff5a34);
}

.notif-category-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  overflow-x: auto;
  scrollbar-width: none;
}

.notif-category-tabs::-webkit-scrollbar {
  display: none;
}

.notif-tab-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 0.71rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.notif-tab-chip:hover {
  color: #0f172a;
  border-color: #cbd5e1;
}

.notif-tab-chip.active {
  background: var(--orange-primary, #ff5a34);
  color: #ffffff;
  border-color: var(--orange-primary, #ff5a34);
  box-shadow: 0 1px 4px rgba(255, 90, 52, 0.25);
}

.notif-tab-chip.active i,
.notif-tab-chip.active .notif-chip-count {
  color: #ffffff;
}

.notif-chip-count {
  font-size: 0.65rem;
  opacity: 0.85;
  margin-left: 2px;
}

.notif-dropdown-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 2px 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid #f8fafc;
  position: relative;
  background: #ffffff;
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item::before {
  display: none !important;
  content: none !important;
}

.notif-item.unread {
  background: #fffcfb;
}

.notif-item.unread::before {
  display: block !important;
  content: '' !important;
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3.5px;
  background: var(--orange-primary, #ff7e47);
  border-radius: 0 4px 4px 0;
}

.notif-item.unread.priority-urgent::before {
  background: #ef4444;
  width: 4px;
}

.notif-item.unread.priority-high::before {
  background: #f97316;
  width: 3.5px;
}

.notif-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-item-icon.type-hearing { background: #fef3c7; color: #d97706; }
.notif-item-icon.type-task { background: #f3e8ff; color: #9333ea; }
.notif-item-icon.type-doc { background: #dcfce7; color: #16a34a; }
.notif-item-icon.type-case { background: #e0f2fe; color: #0284c7; }
.notif-item-icon.type-failed { background: #fee2e2; color: #ef4444; }
.notif-item-icon.type-system { background: #f1f5f9; color: #475569; }

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.notif-item-title {
  font-size: 0.81rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.notif-item-time {
  font-size: 0.67rem;
  color: #94a3b8;
  white-space: nowrap;
}

.notif-item-msg {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.35;
  margin-top: 3px;
}

.notif-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.notif-case-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 1px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-priority-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.notif-priority-badge.urgent { background: #fee2e2; color: #b91c1c; }
.notif-priority-badge.high { background: #ffedd5; color: #c2410c; }

.notif-item-actions {
  display: none;
  align-items: center;
  gap: 4px;
}

.notif-item:hover .notif-item-actions {
  display: flex;
}

.notif-action-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-action-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.notif-action-btn.delete-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
}

.notif-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.btn-notif-refresh {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-notif-refresh:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.notif-sync-badge {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.notif-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
}

.notif-empty-state i {
  font-size: 2rem;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.notif-empty-state p {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}


.toast-check-icon {
  color: #22c55e;
  font-size: 0.78rem;
}

/* Responsive Scrollable Dashboard Body (Smooth Vertical Scrolling) */
.dash-scroll-body {
  flex: 1;
  min-height: 0;
  height: calc(100vh - 50px);
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px 48px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.studio-tab-view {
  display: none;
  animation: fadeInView 0.22s ease;
  min-height: min-content;
}

.studio-tab-view.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: min-content;
  padding-bottom: 28px;
}

/* Dashboard Header Row */
.dash-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.dash-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.dash-workspace-pill {
  background: #fff1eb;
  color: #ea580c;
  border: 1px solid #ffd8cc;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 14px;
}

.btn-bot-analytics {
  background: var(--orange-button-grad);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(255, 90, 52, 0.25);
  transition: all var(--transition-fast);
}

.btn-bot-analytics:hover {
  background: var(--orange-button-hover);
  box-shadow: 0 5px 16px rgba(255, 90, 52, 0.38);
  transform: translateY(-1px);
}

.action-ext-icon {
  font-size: 0.72rem;
}

/* KPI Metric Cards Grid */
.studio-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.studio-kpi-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.kpi-metric-val {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-metric-val.blue-val {
  color: var(--orange-primary);
}

.kpi-metric-val.dark-val {
  color: #0f172a;
}

.kpi-metric-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

/* Studio Charts Grid */
.studio-charts-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-bottom: 18px;
}

.studio-chart-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.chart-header-badge {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

.icon-coral-orange { background: #fff1eb; color: #ff5a34; }
.icon-warm-amber { background: #fffbeb; color: #d97706; }
.icon-sun-gold { background: #fefce8; color: #ca8a04; }
.icon-warm-peach { background: #fff7ed; color: #ea580c; }

.chart-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #1e293b;
}

.chart-canvas-container {
  position: relative;
  height: 200px;
  width: 100%;
}

.donut-wrap {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-chart-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #475569;
  font-weight: 500;
}

.legend-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.coral-box { background: #ff5a34; }
.amber-box { background: #ffa56a; }
.peach-box { background: #fdba74; }
.gold-box { background: #f59e0b; }
.dashed-coral-box { background: #ff5a34; border: 1px dashed #ea580c; }

/* Studio Session & Database Inspector Card */
.studio-session-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 16px;
}

.session-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.session-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-header-left h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.pulse-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.code-db-tag {
  color: var(--studio-blue);
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.db-json-view {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Agents Data Table */
.agents-table-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.studio-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.studio-data-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.studio-data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.84rem;
  color: #1e293b;
}

.agent-table-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-bot-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #fff5f1;
  color: var(--orange-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.table-sub {
  font-size: 0.72rem;
  color: #64748b;
}

.model-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
}

.status-pill {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.status-pill.active-pill { background: #dcfce7; color: #16a34a; }
.status-pill.idle-pill { background: #fef9c3; color: #ca8a04; }

.btn-table-action {
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-table-action:hover {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
}

/* Knowledge Base Collections */
.kb-collection-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.kb-collection-list li {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
}

.kb-item-title { font-size: 0.84rem; color: #0f172a; }
.kb-item-meta { font-size: 0.72rem; color: #64748b; margin-top: 2px; }

.vector-search-input {
  width: 100%;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
}

.vector-search-input:focus {
  background: #ffffff;
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.14);
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.82rem;
}

.setting-row label { font-weight: 600; color: #475569; }
.setting-row code { color: #ea580c; font-weight: 600; }

/* ==========================================================================
   3. FORGOT PASSWORD MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.22);
  animation: fadeInView 0.22s ease;
  box-sizing: border-box;
}

.modal-card-medium {
  max-width: 580px;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-header {
  text-align: center;
  margin-bottom: 18px;
}

.modal-avatar-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--orange-grad);
  box-shadow: var(--orange-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.25;
}

.modal-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

/* Modal Form Elements */
.modal-form-group {
  margin-bottom: 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}

.modal-form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.modal-form-label .req-star {
  color: #ef4444;
  font-weight: 800;
}

.modal-form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #0f172a;
  background: #ffffff;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-form-input:focus {
  border-color: var(--orange-primary, #ff5a34);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.15);
}

select.modal-form-input {
  cursor: pointer;
  appearance: auto;
  background-color: #ffffff;
}

textarea.modal-form-input {
  min-height: 70px;
  resize: vertical;
  line-height: 1.45;
}

.modal-card .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;
  box-sizing: border-box;
}

.modal-card .form-grid-2 .modal-form-group {
  margin-bottom: 14px;
  min-width: 0;
}

.modal-card .form-grid-2 .modal-form-input {
  width: 100%;
  min-width: 0;
}

.fp-step-content {
  display: none;
}

.fp-step-content.active {
  display: block;
}

.fp-info-text {
  font-size: 0.76rem;
  color: #64748b;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.fp-info-text strong {
  color: #ff5a34;
}

.otp-hint {
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
  margin-bottom: 14px;
}

.otp-boxes-wrapper {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 14px;
}

.otp-box {
  width: 44px;
  height: 48px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--color-bubble-bg);
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #ff5a34;
  outline: none;
  transition: all var(--transition-fast);
}

.otp-box:focus {
  background: #ffffff;
  border-color: #ff5a34;
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.18);
}

.otp-action-row {
  text-align: center;
  margin-bottom: 16px;
}

.btn-quick-fill-otp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 90, 52, 0.08);
  border: 1px solid rgba(255, 90, 52, 0.28);
  padding: 7px 16px;
  border-radius: 20px;
  color: #ff5a34;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-quick-fill-otp:hover {
  background: rgba(255, 90, 52, 0.16);
  border-color: #ff5a34;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(255, 90, 52, 0.22);
}

.btn-quick-fill-otp:active {
  transform: translateY(0);
}

@keyframes otpPopIn {
  0% { transform: scale(0.9); background-color: rgba(255, 90, 52, 0.18); border-color: #ff5a34; }
  50% { transform: scale(1.12); background-color: rgba(255, 90, 52, 0.28); border-color: #ff5a34; }
  100% { transform: scale(1); }
}

.otp-box.otp-filled-pop {
  animation: otpPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-color: #ff5a34;
}

/* ==========================================================================
   PASSWORD RECOVERY: STEP 4 SUCCESS CONFIRMATION ANIMATIONS
   ========================================================================== */
.fp-success-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px 4px;
  animation: fpFadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fpFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fp-success-hero {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 16px;
}

.fp-success-radiant-glow {
  position: absolute;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.32) 0%, rgba(16, 185, 129, 0) 70%);
  animation: radiantPulse 2.4s ease-in-out infinite alternate;
}

.fp-pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.45);
  box-sizing: border-box;
}

.fp-pulse-1 {
  width: 86px;
  height: 86px;
  animation: pulseRingAnim 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.fp-pulse-2 {
  width: 96px;
  height: 96px;
  animation: pulseRingAnim 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite 0.65s;
}

@keyframes pulseRingAnim {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  50% {
    opacity: 0.35;
  }
  100% {
    transform: scale(1.38);
    opacity: 0;
  }
}

@keyframes radiantPulse {
  0% { transform: scale(0.88); opacity: 0.55; }
  100% { transform: scale(1.18); opacity: 1; }
}

.fp-success-badge {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4), 0 0 0 5px rgba(16, 185, 129, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  animation: successBadgePop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes successBadgePop {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.15) rotate(6deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.fp-checkmark-svg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
  stroke-width: 3.5;
  stroke: #ffffff;
  stroke-miterlimit: 10;
}

.fp-checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: rgba(255, 255, 255, 0.35);
  animation: checkCircleStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.2s forwards;
}

.fp-checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkStroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes checkCircleStroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes checkStroke {
  100% {
    stroke-dashoffset: 0;
  }
}

.fp-sparkle-icon {
  position: absolute;
  font-size: 0.92rem;
  z-index: 3;
  animation: sparkleFloat 2s ease-in-out infinite alternate;
}

.sp-tl { top: -2px; left: 6px; color: #f59e0b; animation-delay: 0.1s; }
.sp-tr { top: 4px; right: 6px; color: #ff5a34; font-size: 0.85rem; animation-delay: 0.4s; }
.sp-bl { bottom: 0px; left: 8px; color: #10b981; font-size: 0.8rem; animation-delay: 0.7s; }
.sp-br { bottom: -2px; right: 10px; color: #6366f1; font-size: 0.8rem; animation-delay: 0.3s; }

@keyframes sparkleFloat {
  0% { transform: translateY(0) scale(0.85); opacity: 0.7; }
  100% { transform: translateY(-4px) scale(1.15); opacity: 1; }
}

.fp-success-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.fp-success-sub {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 16px;
  max-width: 320px;
}

.fp-success-meta-card {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fp-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.fp-meta-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 90, 52, 0.1);
  color: #ff5a34;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.fp-meta-icon.text-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.fp-meta-info {
  display: flex;
  flex-direction: column;
}

.fp-meta-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 600;
}

.fp-meta-val {
  font-size: 0.82rem;
  color: #1e293b;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-meta-badge {
  font-size: 0.78rem;
  color: #059669;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fp-meta-divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
  margin: 0 4px;
}

.fp-redirect-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  color: #64748b;
  margin-bottom: 14px;
}

.fp-redirect-spinner {
  width: 11px;
  height: 11px;
  border: 2px solid #cbd5e1;
  border-top-color: #ff5a34;
  border-radius: 50%;
  animation: spinRedirect 0.8s linear infinite;
}

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

.fp-btn-login-now {
  margin-top: 0;
  background: linear-gradient(135deg, #ff5a34 0%, #e04420 100%);
  box-shadow: 0 4px 14px rgba(255, 90, 52, 0.35);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 350px;
}

.toast-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 12px;
  color: #1e293b;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  animation: slideInToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid #ff5a34;
}

.toast-msg.success { border-left-color: #10b981; }
.toast-msg.error { border-left-color: #ef4444; }

@keyframes slideInToast {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   4. COMING SOON DASHBOARD VIEW
   ========================================================================== */
.coming-soon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 20px;
}

.coming-soon-card {
  background: var(--color-white);
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 48px 36px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(255, 90, 52, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeInView 0.3s ease;
}

.coming-soon-badge-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--orange-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 20px rgba(255, 90, 52, 0.35);
  margin-bottom: 4px;
}

.coming-soon-pill {
  background: #fff1eb;
  color: #ea580c;
  border: 1px solid #ffd8cc;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 12px;
  border-radius: 20px;
}

.coming-soon-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.coming-soon-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.55;
  max-width: 440px;
}

/* ==========================================================================
   5. CASE MANAGEMENT & REPOSITORY VIEW
   ========================================================================== */
.cases-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.case-count-pill {
  background: #fff1eb;
  color: #ea580c;
  border: 1px solid #ffd8cc;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
}

.btn-create-case {
  width: auto;
  padding: 8px 18px;
  font-size: 0.84rem;
  box-shadow: 0 3px 12px rgba(255, 90, 52, 0.3);
}

/* Search & Filter Bar */
.cases-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.case-search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.case-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  font-size: 0.84rem;
}

.case-search-wrap input {
  width: 100%;
  padding: 6.5px 12px 6.5px 34px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  color: #0f172a;
  outline: none;
  transition: all var(--transition-fast);
}

.case-search-wrap input:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.14);
}

.case-status-filter-wrap select {
  padding: 6.5px 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: #334155;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.case-status-filter-wrap select:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.14);
}

/* Cases Table Card (Fixed Viewport, Internal Scrollable Body Only) */
.cases-table-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.table-responsive-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.table-responsive-wrapper::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.cases-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cases-data-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  padding: 8px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid #e2e8f0;
}

.cases-data-table td {
  padding: 7px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8rem;
  color: #1e293b;
  vertical-align: middle;
}

.cases-data-table tbody tr:hover {
  background: #fffbf9;
}

.case-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-title-text {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.84rem;
  line-height: 1.2;
}

.case-number-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--orange-primary);
  background: #fff1eb;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.case-parties-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.client-name-bold {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.78rem;
}

.opponent-sub {
  font-size: 0.7rem;
  color: #64748b;
}

.court-name-text {
  font-size: 0.78rem;
  color: #334155;
  font-weight: 500;
}

.court-location-sub {
  font-size: 0.68rem;
  color: #94a3b8;
}

.case-type-badge {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-block;
}

.hearing-date-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 0.78rem;
  color: #0f172a;
}

.hearing-date-cell i {
  color: var(--orange-primary);
  font-size: 0.74rem;
}

/* Status & Priority Badges */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
}

.status-hearing { background: #fff1eb; color: #ea580c; border: 1px solid #ffd8cc; }
.status-trial { background: #ecfdf5; color: #15803d; border: 1px solid #bbf7d0; }
.status-pending { background: #fefce8; color: #a16207; border: 1px solid #fef08a; }
.status-pretrial { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.status-disposed { background: #f8fafc; color: #94a3b8; border: 1px solid #e2e8f0; }

.btn-action-view {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-view:hover {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
}

.btn-action-del {
  background: #ffffff;
  border: 1.5px solid #fee2e2;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.74rem;
  color: #ef4444;
  cursor: pointer;
  margin-left: 4px;
  transition: all var(--transition-fast);
}

.btn-action-del:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* Fresh UI Empty States */
.cases-empty-state {
  padding: 48px 24px;
  text-align: center;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cases-empty-state .empty-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(255, 126, 71, 0.12);
}

.cases-empty-state .empty-icon-circle i {
  font-size: 1.7rem;
  color: var(--orange-primary);
  margin: 0;
}

.cases-empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.cases-empty-state p {
  font-size: 0.84rem;
  color: #64748b;
  max-width: 440px;
  line-height: 1.5;
  margin: 0;
}

.kanban-empty-box {
  border: 1.5px dashed #e2e8f0;
  border-radius: 10px;
  padding: 28px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  margin: 6px 0;
}

.kanban-empty-box i {
  font-size: 1.4rem;
  color: #cbd5e1;
  margin-bottom: 6px;
}

/* Compact, Enterprise-Grade Large Modal Card */
.modal-card-large {
  width: 94%;
  max-width: 860px;
  min-height: auto;
  max-height: 90vh;
  overflow: hidden;
  padding: 20px 26px 16px;
  border-radius: 16px;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.9);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#create-case-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-card-large .modal-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.modal-card-large .modal-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.1rem;
  background: var(--orange-grad, linear-gradient(135deg, #ffa56a 0%, #ff5a34 100%));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(255, 90, 52, 0.28);
  flex-shrink: 0;
}

.modal-card-large .modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.modal-card-large .modal-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}

/* ==========================================================================
   ENTERPRISE CASE CREATION STEPPER WIZARD
   ========================================================================== */
.stepper-wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 14px;
  flex-shrink: 0;
  gap: 6px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.stepper-step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid transparent;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all var(--transition-fast);
  text-align: left;
  user-select: none;
}

.stepper-step-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: #cbd5e1;
}

.stepper-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.stepper-step-info {
  display: flex;
  flex-direction: column;
}

.stepper-step-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.2;
}

.stepper-step-sub {
  font-size: 0.64rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Active Step */
.stepper-step-btn.active {
  background: #ffffff;
  border: 1.5px solid #ff7e47;
  box-shadow: 0 2px 10px rgba(255, 90, 52, 0.12);
}

.stepper-step-btn.active .stepper-badge {
  background: var(--orange-grad, linear-gradient(135deg, #ffa56a 0%, #ff5a34 100%));
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.22);
}

.stepper-step-btn.active .stepper-step-title {
  color: #0f172a;
}

.stepper-step-btn.active .stepper-step-sub {
  color: var(--orange-primary, #ff5a34);
  font-weight: 800;
}

/* Completed Step */
.stepper-step-btn.step-completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.stepper-step-btn.step-completed .stepper-badge {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.stepper-step-btn.step-completed .stepper-step-title {
  color: #065f46;
}

.stepper-step-btn.step-completed .stepper-step-sub {
  color: #10b981;
  font-weight: 800;
}

/* Stepper Connector Lines */
.stepper-connector {
  flex: 1;
  height: 2.5px;
  background: #e2e8f0;
  border-radius: 2px;
  min-width: 10px;
  max-width: 32px;
  transition: all 0.25s ease;
}

.stepper-connector.completed {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.35);
}

/* Tab Panels with Scrollable Content & Dropdown Overflow Safety */
.modal-tab-panel {
  display: none;
  animation: fadeInView 0.2s ease;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  max-height: calc(85vh - 210px);
  padding: 2px 4px 12px 0;
}

.modal-tab-panel.active {
  display: block;
}

/* Modal Specific Dropdown & Stepper Accommodations */
#add-task-modal .modal-card,
#add-task-modal .modal-card-large {
  width: 95%;
  max-width: 760px;
  min-height: 400px;
  overflow: visible;
}

#add-task-modal .modal-tab-panel {
  min-height: 200px;
  overflow: visible;
}

#task-modal-panel-basics {
  min-height: 190px;
  padding-bottom: 24px;
}

#add-task-modal #create-task-form {
  min-height: 260px;
  overflow: visible;
}

.modal-card {
  overflow: visible;
}

.modal-card-large {
  overflow: visible;
}

/* Form Grids with Clean Compact Spacing */
.modal-card-large .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin-bottom: 0;
}

.modal-card-large .form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 0;
}

.modal-card-large .form-field-group {
  margin-bottom: 10px;
}

.modal-card-large .field-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-label-hint {
  font-size: 0.7rem;
  font-weight: 500;
  color: #94a3b8;
}

.modal-card-large .bubble-input-wrap {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  min-height: 38px;
  transition: all var(--transition-fast);
}

.modal-card-large .bubble-input-wrap:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.modal-card-large .bubble-input-wrap:focus-within {
  border-color: var(--orange-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.14);
}

.modal-card-large .bubble-icon {
  color: #94a3b8;
  font-size: 0.82rem;
  width: 16px;
  margin-right: 7px;
  transition: color var(--transition-fast);
}

.modal-card-large .bubble-input-wrap:focus-within .bubble-icon {
  color: var(--orange-primary);
}

.modal-card-large .bubble-input-wrap input,
.modal-card-large .bubble-input-wrap select {
  padding: 6px 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #0f172a;
}

.modal-card-large .bubble-input-wrap input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.btn-inline-pill {
  padding: 2px 7px;
  background: #e2e8f0;
  border: none;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-inline-pill:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.modal-card-large .case-textarea-wrap {
  align-items: flex-start;
  padding-top: 8px;
  padding-bottom: 8px;
}

.modal-card-large .case-textarea-wrap .bubble-icon {
  margin-top: 2px;
}

.modal-card-large .case-textarea {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: #0f172a;
  outline: none;
  resize: none;
  min-height: 52px;
  max-height: 70px;
  line-height: 1.4;
}

.modal-card-large .modal-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1.5px solid #f1f5f9;
  flex-shrink: 0;
  background: #ffffff;
}

.modal-footer-left {
  display: flex;
  gap: 8px;
}

.modal-footer-right {
  display: flex;
  gap: 8px;
}

.btn-modal-next {
  padding: 9px 24px !important;
  background: var(--orange-grad, linear-gradient(135deg, #ffa56a 0%, #ff5a34 100%)) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 0.83rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  box-shadow: 0 4px 14px rgba(255, 90, 52, 0.32);
  transition: all 0.2s ease;
}

.btn-modal-next:hover {
  box-shadow: 0 6px 20px rgba(255, 90, 52, 0.48);
  transform: translateY(-1px);
}

.btn-modal-submit-case,
#btn-save-case {
  background: var(--orange-grad, linear-gradient(135deg, #ffa56a 0%, #ff5a34 100%)) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  padding: 9px 26px !important;
  border-radius: 8px !important;
  border: none !important;
  width: auto !important;
  box-shadow: 0 4px 16px rgba(255, 90, 52, 0.38);
  cursor: pointer;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-modal-submit-case:hover,
#btn-save-case:hover {
  box-shadow: 0 6px 22px rgba(255, 90, 52, 0.52);
  transform: translateY(-1px);
}

.btn-step-nav {
  padding: 8px 18px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-step-nav:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-cancel-modal {
  padding: 8px 18px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cancel-modal:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   5. DEDICATED FULL-PAGE CASE DOSSIER VIEW
   ========================================================================== */
.case-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.btn-back-to-cases {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  width: 29px;
  height: 29px;
  padding: 0;
  font-size: 0.82rem;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
}

.btn-back-to-cases:hover {
  background: #fff7ed;
  border-color: var(--orange-border-subtle);
  color: var(--orange-primary);
  transform: translateX(-2px);
}

.case-detail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-detail-action {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 4.5px 10px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-detail-action:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-detail-del {
  background: #ffffff;
  border: 1.5px solid #fee2e2;
  border-radius: 8px;
  padding: 6.5px 12px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: #ef4444;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-detail-del:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.case-detail-full-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px 28px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}

.case-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 12px;
}

.detail-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--orange-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 3px 10px rgba(255, 90, 52, 0.28);
  flex-shrink: 0;
}

.detail-case-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.detail-badge-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.detail-cnr-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--orange-primary);
  background: #fff1eb;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #ffd8cc;
}

.detail-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-card-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 14px;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #edf2f7;
}

.panel-header i {
  color: var(--orange-primary);
  font-size: 0.82rem;
}

.panel-header h3 {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

/* Structured Rows & Columns Table Styling */
.case-meta-table-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.case-overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.case-overview-table tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition-fast);
}

.case-overview-table tr:last-child {
  border-bottom: none;
}

.case-overview-table tr:hover {
  background: #f8fafc;
}

.case-overview-table .tbl-lbl {
  width: 38%;
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #fcfcfd;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
}

.case-overview-table .tbl-lbl i {
  margin-right: 5px;
  font-size: 0.72rem;
}

.case-overview-table .tbl-val {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  vertical-align: middle;
}

.case-overview-table .tbl-val.highlight-client {
  color: #0f172a;
  font-weight: 700;
}

.case-overview-table .tbl-val.highlight-lawyer {
  color: var(--orange-primary);
  font-weight: 700;
}

.case-overview-table .tbl-val.highlight-hearing {
  color: #ea580c;
  font-weight: 700;
}

.panel-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
}

.panel-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-val {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
}

.highlight-client {
  color: #0f172a;
  font-weight: 700;
}

.highlight-lawyer {
  color: var(--orange-primary);
  font-weight: 700;
}

.highlight-hearing {
  color: #ea580c;
  font-weight: 700;
}

.detail-narrative-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #1e293b;
  min-height: 48px;
}

.detail-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.detail-tag-chip {
  display: inline-block;
  background: #fff1eb;
  color: #ea580c;
  border: 1px solid #ffd8cc;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 4px;
}

/* Modal Dossier Fallback Card */
.dossier-card {
  width: 94%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 28px 20px;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

/* Responsive Layout */
@media (max-width: 860px) {
  .detail-grid-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ==========================================================================
   ROLE-BASED ACCESS CONTROL (RBAC) STYLING EXTENSIONS
   ========================================================================== */

/* Demo One-Click Role Bar on Auth View */
.demo-role-quickbar {
  margin: 10px 0 16px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-role-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.role-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.role-chip.chip-super:hover { border-color: #f59e0b; color: #b45309; background: #fffbeb; }
.role-chip.chip-admin:hover { border-color: #3b82f6; color: #1d4ed8; background: #eff6ff; }
.role-chip.chip-lawyer:hover { border-color: #ff5a34; color: #ff5a34; background: #fff7ed; }
.role-chip.chip-staff:hover { border-color: #10b981; color: #047857; background: #ecfdf5; }
.role-chip.chip-client:hover { border-color: #8b5cf6; color: #6d28d9; background: #f5f3ff; }

/* Sidebar User Footer Role & Org Meta */
.user-role-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  min-width: 0;
}

.user-role-badge {
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1.5px 6px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-role-super_admin {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-role-firm_admin {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-role-lawyer {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.badge-role-legal_staff {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-role-client {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.user-org-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

/* User & Organization Table Customizations */
.member-avatar-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.member-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
}

.member-meta-block {
  display: flex;
  flex-direction: column;
}

.member-name-bold {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.member-email-sub {
  font-size: 0.72rem;
  color: #64748b;
}

.org-plan-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.status-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
}

/* ==========================================================================
   6. CASE DOSSIER 3-PANEL SPLIT & SUBTAB SYSTEM
   ========================================================================== */

/* Dossier Navigation Left */
.dossier-nav-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

/* Sub-Tab Navigation Bar */
.dossier-subtab-pills {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #f1f5f9;
  padding: 2.5px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
  flex-shrink: 1;
}

.dossier-subtab-pills::-webkit-scrollbar {
  display: none;
}

.subtab-pill-btn {
  background: transparent;
  border: none;
  padding: 4px 7px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap !important;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  line-height: 1.25;
}

.subtab-pill-btn i {
  font-size: 0.71rem;
}

.subtab-pill-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.subtab-pill-btn.active {
  background: #ffffff;
  color: var(--orange-primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.subtab-pill-btn .subtab-count-badge {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--orange-primary);
  background: rgba(255, 90, 52, 0.09);
  padding: 0 4px;
  height: 14.5px;
  line-height: 14.5px;
  min-width: 14.5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 90, 52, 0.18);
  margin-left: 1.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.subtab-pill-btn.active .subtab-count-badge {
  background: rgba(255, 90, 52, 0.15);
  border-color: rgba(255, 90, 52, 0.3);
}

/* AI Assistant Toggle Button in Topbar */
.btn-ai-toggle {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
  color: var(--orange-primary) !important;
  border: 1.5px solid #fdba74 !important;
  font-weight: 700 !important;
  font-size: 0.74rem !important;
  padding: 4.5px 10px !important;
  border-radius: 8px !important;
  gap: 5px !important;
}

.btn-ai-toggle:hover {
  background: var(--orange-grad) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 3px 10px rgba(255, 90, 52, 0.28) !important;
}

/* Responsive Pill Labels for 100% Zoom and standard displays */
.pill-label-short,
.ai-toggle-text-short {
  display: none;
}

.pill-label-full,
.ai-toggle-text-full {
  display: inline;
}

@media (max-width: 1280px) {
  .pill-label-full {
    display: none;
  }
  .pill-label-short {
    display: inline;
  }
  .ai-toggle-text-full {
    display: none;
  }
  .ai-toggle-text-short {
    display: inline;
  }
  .subtab-pill-btn {
    padding: 3.5px 5.5px;
    font-size: 0.71rem;
    gap: 3.5px;
  }
}

/* Dossier Split Layout Container & Single-Page Viewport Lock */
#tab-case-detail-view {
  display: none;
}

#tab-case-detail-view.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding-bottom: 0 !important;
  box-sizing: border-box;
}

.dash-scroll-body:has(#tab-case-detail-view.active),
body.in-case-detail .dash-scroll-body {
  overflow-y: hidden !important;
  padding: 10px 16px 12px 16px !important;
  height: calc(100vh - 50px);
  max-height: calc(100vh - 50px);
  box-sizing: border-box;
}

.dossier-split-layout {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.dossier-main-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.dossier-main-content-col {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.dossier-subtab-view {
  display: none;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.dossier-subtab-view.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding-right: 8px;
  padding-bottom: 56px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.dossier-subtab-view::-webkit-scrollbar {
  width: 6px;
}

.dossier-subtab-view::-webkit-scrollbar-track {
  background: transparent;
}

.dossier-subtab-view::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.dossier-subtab-view::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Dedicated Personal Scroll Containers */
.case-docs-scroll-container {
  width: 100%;
  margin-top: 8px;
  box-sizing: border-box;
}

.case-timeline-scroll-container {
  width: 100%;
  margin-top: 10px;
  box-sizing: border-box;
}

/* ==========================================================================
   7. DOCUMENT PIPELINE & REPOSITORY STYLES
   ========================================================================== */

.docs-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
}

.docs-header-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-header-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 3px;
}

/* Drag & Drop Upload Dropzone */
.doc-upload-dropzone {
  background: #fafafa;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 16px;
  position: relative;
}

.doc-upload-dropzone:hover,
.doc-upload-dropzone.dragover {
  background: #fff7ed;
  border-color: var(--orange-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 90, 52, 0.08);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff1eb;
  color: var(--orange-primary);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: transform var(--transition-fast);
}

.doc-upload-dropzone:hover .dropzone-icon {
  transform: scale(1.08);
}

.dropzone-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.dropzone-sub {
  font-size: 0.74rem;
  color: #64748b;
  max-width: 500px;
}

.dropzone-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.badge-tag {
  font-size: 0.68rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* Document Repository List & Search Bar */
.docs-list-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.docs-filter-search {
  flex: 1;
  position: relative;
}

.docs-filter-search i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.8rem;
}

.docs-filter-search input {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px 7px 32px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: #0f172a;
  outline: none;
  transition: all var(--transition-fast);
}

.docs-filter-search input:focus {
  background: #ffffff;
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.12);
}

.btn-refresh-docs {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 6.5px 12px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-refresh-docs:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Document Cards Grid */
.doc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.doc-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
  position: relative;
}

.doc-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.doc-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.doc-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-card-icon.icon-pdf { background: #fef2f2; color: #dc2626; }
.doc-card-icon.icon-docx { background: #eff6ff; color: #2563eb; }
.doc-card-icon.icon-image { background: #fdf4ff; color: #a855f7; }
.doc-card-icon.icon-txt { background: #f8fafc; color: #475569; }

.doc-card-title-wrap {
  flex: 1;
  min-width: 0;
}

.doc-card-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.doc-card-name:hover {
  color: var(--orange-primary);
}

.doc-card-meta {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
}

.doc-card-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.doc-category-badge {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #fff1eb;
  color: var(--orange-primary);
  border: 1px solid #ffd8cc;
  padding: 1.5px 6px;
  border-radius: 4px;
}

/* Status Badges with Pulse */
.status-pill {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-pill.status-uploaded {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.status-pill.status-ocr_processing {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  animation: pulseStatus 1.5s infinite;
}

.status-pill.status-ai_analysis {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  animation: pulseStatus 1.5s infinite;
}

.status-pill.status-completed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-pill.status-failed {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

@keyframes pulseStatus {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

.doc-card-preview-meta {
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.72rem;
  color: #334155;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.doc-meta-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.doc-meta-item strong {
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.doc-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: auto;
}

.btn-doc-card-action {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-doc-card-action:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-doc-card-action.btn-doc-del {
  color: #ef4444;
  border-color: #fee2e2;
}

.btn-doc-card-action.btn-doc-del:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.docs-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.docs-empty-state i {
  font-size: 2.4rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.docs-empty-state h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.docs-empty-state p {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ==========================================================================
   8. CASE AI ASSISTANT PANEL (COLLAPSIBLE RIGHT DRAWER)
   ========================================================================== */

.case-ai-sidebar-panel {
  width: 360px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: width 0.25s ease, opacity 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.case-ai-sidebar-panel.collapsed {
  display: none !important;
}

.ai-panel-header {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--orange-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.25);
}

.ai-panel-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}

.ai-grounded-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-new-ai-chat {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-new-ai-chat:hover {
  background: var(--orange-grad);
  border-color: var(--primary-orange);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.25);
  transform: translateY(-1px);
}

.btn-new-ai-chat:active {
  transform: translateY(0);
}

.btn-new-ai-chat i {
  font-size: 0.75rem;
}

.btn-close-ai-panel {
  background: transparent;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.btn-close-ai-panel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Quick Prompt Action Chips */
.ai-quick-chips-wrapper {
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.quick-chip-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 5px;
}

.ai-quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.ai-quick-chips::-webkit-scrollbar {
  display: none;
}

.ai-chip-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 3.5px 9px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.ai-chip-btn:hover {
  background: #fff7ed;
  border-color: #fed7aa;
  color: var(--orange-primary);
  transform: translateY(-1px);
}

/* Chat Messages Thread */
.ai-chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.ai-welcome-msg {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.4;
}

.ai-bot-circle-mini {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffedd5;
  color: var(--orange-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Message Bubble Types */
.chat-msg-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeInMsg 0.2s ease;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg-row.user-msg {
  align-items: flex-end;
}

.chat-msg-row.ai-msg {
  align-items: flex-start;
}

.msg-bubble-user {
  background: var(--orange-grad);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 14px 14px 2px 14px;
  font-size: 0.79rem;
  line-height: 1.35;
  max-width: 85%;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.2);
}

.msg-bubble-ai {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  padding: 13px 15px;
  border-radius: 16px 16px 16px 3px;
  font-size: 0.83rem;
  line-height: 1.62;
  max-width: 95%;
  word-break: break-word;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  position: relative;
  transition: all var(--transition-fast);
  -webkit-font-smoothing: antialiased;
}

.ai-answer-content {
  color: #0f172a;
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.62;
  letter-spacing: -0.006em;
}

.ai-answer-content strong {
  color: #090d16;
  font-weight: 750;
}

.ai-answer-content em {
  color: #334155;
  font-style: italic;
}

/* AI Live Streaming Cursor / Typewriter Caret */
.ai-stream-cursor {
  display: inline-block;
  font-size: 0.94rem;
  color: #ff5a34;
  font-weight: 900;
  margin-left: 3px;
  vertical-align: 0px;
  animation: aiVibrantCaretBlink 0.65s ease-in-out infinite alternate;
  text-shadow: 0 0 10px rgba(255, 90, 52, 0.85);
}

@keyframes aiVibrantCaretBlink {
  0% {
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 0 12px rgba(255, 90, 52, 0.95);
  }
  100% {
    opacity: 0.25;
    transform: scale(0.95);
    text-shadow: 0 0 3px rgba(255, 90, 52, 0.3);
  }
}

/* AI Markdown Elements - Vibrant & Crisp */
.ai-md-h1 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  margin: 10px 0 6px 0;
  border-left: 3px solid #ff5a34;
  padding-left: 8px;
  letter-spacing: -0.01em;
}

.ai-md-h2 {
  font-size: 0.91rem;
  font-weight: 750;
  color: #0f172a;
  margin: 9px 0 5px 0;
  letter-spacing: -0.01em;
}

.ai-md-h3 {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  margin: 7px 0 4px 0;
}

.ai-md-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0;
  padding-left: 2px;
  line-height: 1.55;
  color: #1e293b;
}

.ai-md-bullet-dot {
  color: #ff5a34;
  font-size: 0.70rem;
  line-height: 1.6;
  flex-shrink: 0;
  font-weight: 900;
}

.ai-md-num-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 5px 0;
  line-height: 1.55;
  color: #1e293b;
}

.ai-md-num-badge {
  color: #ff5a34;
  font-weight: 800;
  font-size: 0.81rem;
  flex-shrink: 0;
}

.ai-md-inline-code {
  background: #fff7ed;
  color: #ea580c;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.76rem;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  border: 1px solid #ffedd5;
}

.ai-md-quote {
  border-left: 3px solid #ff5a34;
  background: #fffaf5;
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #9a3412;
  font-size: 0.80rem;
  line-height: 1.5;
}

.ai-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px 14px 14px 2px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ai-typing-indicator .typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-primary, #ff5a34);
  display: inline-block;
  opacity: 0.35;
  animation: typingDotBounce 1.4s infinite ease-in-out both;
}

.ai-typing-indicator .typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.ai-typing-indicator .typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.ai-typing-indicator .typing-dot:nth-child(3) {
  animation-delay: 0s;
}

.ai-typing-indicator-label {
  font-size: 0.74rem;
  font-weight: 500;
  color: #64748b;
  margin-left: 4px;
}

@keyframes typingDotBounce {
  0%, 80%, 100% {
    transform: scale(0.65);
    opacity: 0.3;
  }
  40% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.ai-typing-loader {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #64748b;
  font-size: 0.75rem;
}

/* Citations Hidden as per user requirement */
.ai-citation-box {
  display: none !important;
}

/* Feedback Row */
.ai-feedback-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 4px;
  justify-content: flex-end;
  animation: fadeInMsg 0.25s ease;
}

.btn-feedback {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 5px;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-feedback:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-feedback.active-helpful {
  color: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.btn-feedback.active-unhelpful {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fecaca;
}

/* AI Chat Input Form */
.ai-chat-input-wrapper {
  padding: 10px;
  background: #fafafa;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.ai-input-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  padding: 4px 6px 4px 12px;
  transition: all var(--transition-fast);
}

.ai-input-box:focus-within {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.12);
}

.ai-input-box textarea {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: #0f172a;
  resize: none;
  max-height: 80px;
  padding: 4px 0;
  line-height: 1.35;
}

.btn-ai-send {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange-grad);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.btn-ai-send:hover {
  transform: scale(1.08);
}

/* ==========================================================================
   9. DOCUMENT PREVIEW & HUMAN VERIFICATION MODAL
   ========================================================================== */

.doc-preview-modal-card {
  max-width: 900px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.doc-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
}

.doc-preview-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-icon-large {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.doc-preview-filename {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.doc-preview-meta {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}

.btn-doc-download {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-doc-download:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.doc-preview-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.doc-section-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.doc-section-header h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
}

.doc-section-hint {
  font-size: 0.72rem;
  color: #64748b;
}

.doc-fields-table-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.doc-fields-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.doc-fields-table th {
  background: #f8fafc;
  padding: 8px 12px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.doc-fields-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.doc-field-name {
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
}

.doc-field-val-text {
  color: #0f172a;
  font-weight: 500;
  word-break: break-word;
}

.doc-field-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--orange-primary);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  color: #0f172a;
}

.field-verify-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.field-verify-status.status-pending { background: #f1f5f9; color: #64748b; }
.field-verify-status.status-confirmed { background: #dcfce7; color: #15803d; }
.field-verify-status.status-edited { background: #dbeafe; color: #1e40af; }
.field-verify-status.status-rejected { background: #fee2e2; color: #b91c1c; }

.field-action-btn-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.btn-field-act {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-field-confirm:hover { background: #dcfce7; color: #15803d; border-color: #86efac; }
.btn-field-edit:hover { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.btn-field-reject:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }

.btn-copy-ocr {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-copy-ocr:hover {
  background: #f8fafc;
  color: #0f172a;
}

.doc-ocr-textbox {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #1e293b;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  scrollbar-width: thin;
}

.doc-preview-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* ==========================================================================
   DASHBOARDS (LAWYER & SUPER ADMIN) STYLING
   ========================================================================== */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 1024px) {
  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dash-stats-grid {
    grid-template-columns: 1fr;
  }
}

.dash-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dash-stat-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.stat-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-icon-blue { background: #eff6ff; color: #2563eb; }
.stat-icon-amber { background: #fffbeb; color: #d97706; }
.stat-icon-purple { background: #faf5ff; color: #7c3aed; }
.stat-icon-emerald { background: #ecfdf5; color: #059669; }

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.stat-subtext {
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.text-emerald { color: #059669; }
.text-amber { color: #d97706; }
.text-purple { color: #7c3aed; }
.text-blue { color: #2563eb; }
.text-rose { color: #e11d48; }

.dash-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .dash-two-col-grid {
    grid-template-columns: 1fr;
  }
}

.dash-panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dash-panel-header {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header-title h3 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
}

.panel-count-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 7px;
  border-radius: 12px;
}

.btn-panel-action {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-panel-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Hearings & Task Items in Dashboard List */
.dash-hearings-list, .dash-tasks-list {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.hearing-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s ease;
}

.hearing-item-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.hearing-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hearing-matter-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hearing-purpose-text {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
}

.hearing-court-text {
  font-size: 0.7rem;
  color: #94a3b8;
}

.hearing-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.hearing-date-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #d97706;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.btn-hearing-outcome-sm {
  font-size: 0.68rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 5px;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-hearing-outcome-sm:hover {
  background: #d1fae5;
}

/* Task Item in Dashboard List */
.task-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-item-card.task-done {
  opacity: 0.6;
  background: #f1f5f9;
}

.task-item-card.task-done .task-title-text {
  text-decoration: line-through;
  color: #64748b;
}

.task-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.task-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

.task-title-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.task-case-ref {
  font-size: 0.68rem;
  color: #64748b;
}

.task-priority-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.priority-urgent { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; font-weight: 800; }
.priority-high { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.priority-medium { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.priority-low { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* ==========================================================================
   COURTROOM HEARINGS DOCKET STYLING
   ========================================================================== */
.hearings-filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
}

.filter-pill-btn {
  background: transparent;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   ACTIONABLE LEGAL TASKS: 3-STEP WIZARD VIEW & CONSTRAINED KANBAN BOARD
   ========================================================================== */
.tasks-view-mode-toggle {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.view-mode-pill-btn {
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.view-mode-pill-btn:hover {
  color: #0f172a;
}

.view-mode-pill-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Enterprise Stepper Tab Pills (Tasks, Modals, Dossiers) */
.modal-tab-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.tasks-step-tabs {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.modal-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 7px 8px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  overflow: hidden;
}

.modal-tab-btn span:not(.tab-badge-num):not(.tab-chip) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-tab-btn:hover {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.modal-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  border-color: var(--orange-primary, #ff7e47);
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.12);
}

.tab-badge-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.modal-tab-btn:hover .tab-badge-num {
  background: #cbd5e1;
  color: #0f172a;
}

.modal-tab-btn.active .tab-badge-num {
  background: var(--orange-primary, #ff5a34);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 90, 52, 0.25);
}

.tab-chip {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.tab-chip.chip-req {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.tab-chip.chip-imp {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.tab-chip.chip-opt {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.tasks-step-view-container {
  margin-top: 14px;
}

.tasks-step-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  animation: fadeInView 0.22s ease;
}

.step-panel-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.step-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.step-main-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.step-sub-title {
  font-size: 0.78rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

.step-counter-tag {
  font-size: 0.74rem;
  font-weight: 700;
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Task Cards Grid (2 Columns on Desktop, 1 on Tablet) */
.tasks-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  padding-right: 4px;
}

.tasks-card-grid::-webkit-scrollbar {
  width: 6px;
}
.tasks-card-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.tasks-step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.step-footer-hint {
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Constrained Kanban Board Styling */
.tasks-kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .tasks-kanban-board {
    grid-template-columns: 1fr;
  }
}

.kanban-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 250px);
  min-height: 420px;
}

.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #ffffff;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.kanban-col-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-count-pill {
  font-size: 0.7rem;
  font-weight: 700;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 1px 7px;
  border-radius: 10px;
}

.kanban-card-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  overflow-y: auto;
}

.kanban-card-list::-webkit-scrollbar {
  width: 5px;
}
.kanban-card-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.kanban-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
}

.kanban-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.kanban-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.kanban-card-desc {
  font-size: 0.74rem;
  color: #475569;
  line-height: 1.4;
}

.task-case-ref {
  font-size: 0.7rem;
  font-weight: 600;
  color: #3b82f6;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.kanban-due-date {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kanban-status-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #334155;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kanban-status-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   AI LEGAL DRAFTING & BRIEFS STUDIO (SINGLE-PAGE VERTICAL FLOW)
   ========================================================================== */
.drafting-single-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding-bottom: 50px;
}

.drafting-form-card,
.drafting-preview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.drafting-card-header {
  padding: 14px 20px;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drafting-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drafting-avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.drafting-card-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.drafting-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}

.drafting-form-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drafting-action-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  padding-top: 8px;
}

.btn-generate-draft-main {
  width: auto !important;
  padding: 12px 36px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--orange-glow);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-generate-draft-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 90, 52, 0.35);
}

.btn-generate-draft-main:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.draft-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-draft-disclaimer-banner {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-bottom: 1px solid #fef3c7;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.disclaimer-icon {
  color: #d97706;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.disclaimer-text {
  font-size: 0.76rem;
  color: #78350f;
  line-height: 1.4;
}

/* In-Progress AI Generation Animation State */
.draft-generating-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  animation: fadeInView 0.25s ease;
}

.draft-pulse-rings {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.draft-bot-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--orange-grad);
  color: #ffffff;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 90, 52, 0.35);
  z-index: 2;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 90, 52, 0.45);
  animation: draftPulseRing 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes draftPulseRing {
  0% {
    transform: scale(0.75);
    opacity: 1;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.draft-generating-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.draft-generating-sub {
  font-size: 0.82rem;
  color: #64748b;
  max-width: 520px;
  line-height: 1.5;
  margin: 0;
}

.draft-content-canvas {
  padding: 44px 50px;
  background: #ffffff;
  font-family: 'Cambria', 'Georgia', 'Times New Roman', serif;
  font-size: 0.96rem;
  line-height: 1.8;
  color: #0f172a;
  word-break: break-word;
  min-height: 480px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  max-width: 900px;
  margin: 0 auto;
}

.btn-mini-action {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-mini-action:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-mini-action.btn-pdf-primary {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
  font-weight: 800;
}

.btn-mini-action.btn-pdf-primary:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

/* Legal Court Document Styling */
.legal-court-document {
  color: #0f172a;
}

.legal-court-header-banner {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #0f172a;
}

.legal-court-header-banner h2 {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0f172a;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.legal-court-header-banner .court-subtitle {
  font-size: 0.9rem;
  font-weight: 700;
  color: #475569;
  margin: 2px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal-cause-title-card {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 6px;
  padding: 16px 22px;
  margin: 18px 0 24px 0;
}

.cause-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.cause-title-party {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.95rem;
}

.cause-title-role {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cause-title-vs {
  text-align: center;
  font-weight: 800;
  color: #94a3b8;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin: 6px 0;
}

.legal-pleading-title {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 22px 0 24px 0;
  text-transform: uppercase;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-section-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 26px 0 14px 0;
  padding-bottom: 4px;
  border-bottom: 1.5px solid #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal-paragraph {
  margin-bottom: 14px;
  line-height: 1.85;
  text-align: justify;
  color: #1e293b;
  font-size: 0.96rem;
}

.legal-bullet-list {
  margin: 10px 0 16px 24px;
  padding-left: 8px;
  list-style-type: disc;
}

.legal-bullet-list li {
  margin-bottom: 8px;
  line-height: 1.75;
  color: #1e293b;
  text-align: justify;
}

.legal-clause-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  line-height: 1.8;
  text-align: justify;
}

.clause-num {
  font-weight: 800;
  color: #0f172a;
  min-width: 24px;
}

.clause-body {
  flex: 1;
  color: #1e293b;
}

/* Court Table Styling */
.legal-table-wrapper {
  margin: 20px 0 24px 0;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.legal-court-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-family: 'Cambria', 'Georgia', 'Times New Roman', serif;
}

.legal-court-table th {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 11px 16px;
  border: 1px solid #0f172a;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.legal-court-table td {
  padding: 10px 16px;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  line-height: 1.6;
  vertical-align: top;
}

.legal-court-table tr:nth-child(even) td {
  background-color: #fafbfc;
}

.legal-court-table td.col-particulars {
  font-weight: 700;
  color: #0f172a;
  background-color: #f8fafc;
  width: 36%;
  border-right: 2px solid #cbd5e1;
}

.legal-court-table td.col-details {
  width: 64%;
}

.legal-excerpt-callout {
  font-size: 0.84rem;
  font-style: italic;
  color: #475569;
  background: #f1f5f9;
  padding: 10px 16px;
  border-radius: 6px;
  margin: 12px 0 20px 0;
  border-left: 3px solid #0284c7;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Verification Card */
.legal-verification-card {
  border: 1.5px solid #94a3b8;
  background: #f8fafc;
  border-radius: 6px;
  padding: 22px 26px;
  margin: 32px 0 24px 0;
}

.legal-verification-badge-header {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1.5px dashed #cbd5e1;
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal-deponent-sig-block {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  text-align: center;
}

.deponent-box {
  min-width: 220px;
}

.deponent-line {
  border-bottom: 1px solid #0f172a;
  margin-bottom: 6px;
  height: 24px;
}

.deponent-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
}

/* Official Advocate Closing Block & Seal */
.legal-official-closing-block {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 2px solid #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.legal-closing-left {
  flex: 1;
}

.closing-meta-line {
  font-size: 0.9rem;
  color: #334155;
  margin: 0 0 6px 0;
  line-height: 1.5;
}

.legal-advocate-details {
  margin-top: 18px;
}

.adv-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
}

.adv-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.adv-cred {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
  margin: 0 0 2px 0;
}

.adv-bar {
  font-size: 0.82rem;
  color: #0f172a;
  font-weight: 700;
  margin: 0 0 2px 0;
}

.adv-chamber {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.legal-closing-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Authentic Advocate Red Seal Stamp */
.legal-court-seal {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 2px dashed #dc2626;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-3deg);
  background: rgba(239, 68, 68, 0.03);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.15);
  user-select: none;
}

.seal-inner-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1.5px solid #dc2626;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  box-sizing: border-box;
  text-align: center;
}

.seal-arc-text-top {
  font-size: 6.5px;
  font-weight: 900;
  color: #dc2626;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 1;
}

.seal-icon-emblem {
  color: #dc2626;
  font-size: 14px;
  line-height: 1;
  margin: 2px 0;
}

.seal-center-text {
  font-size: 7px;
  font-weight: 900;
  color: #b91c1c;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.seal-arc-text-bottom {
  font-size: 6px;
  font-weight: 800;
  color: #dc2626;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
}

.legal-sig-box {
  text-align: center;
  min-width: 200px;
}

.legal-sig-digital {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.digital-sig-script {
  font-family: 'Brush Script MT', 'Segoe Script', cursive;
  font-size: 1.25rem;
  color: #1e3a8a;
  font-weight: 700;
  transform: rotate(-2deg);
}

.legal-sig-line {
  border-bottom: 1.5px solid #0f172a;
  margin: 2px 0 6px 0;
  width: 100%;
}

.legal-sig-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.legal-sig-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

/* PDF Export Styles */
.legal-pdf-watermark-top {
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 0.5px solid #e2e8f0;
}

.legal-pdf-footer-note {
  text-align: center;
  font-size: 7.5px;
  color: #94a3b8;
  margin-top: 24px;
  padding-top: 8px;
  border-top: 0.5px solid #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Print CSS */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-sidebar,
  .app-header,
  .dash-header-row,
  .drafting-form-card,
  .drafting-card-header,
  .legal-draft-disclaimer-banner,
  .toast-container,
  #toast-container {
    display: none !important;
  }
  .drafting-single-container,
  .drafting-preview-card,
  #drafting-preview-panel {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    background: transparent !important;
  }
  .draft-content-canvas {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    font-size: 11pt !important;
    line-height: 1.6 !important;
  }
  .legal-table-wrapper,
  .legal-court-table,
  .legal-verification-card,
  .legal-official-closing-block {
    page-break-inside: avoid !important;
  }
}

/* ==========================================================================
   SUPER ADMIN & AUDIT LOGS STYLING
   ========================================================================== */
.health-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.role-distribution-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-dist-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dash-audit-stream {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.audit-stream-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
}

.audit-action-tag {
  font-weight: 800;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.tag-login { background: #eff6ff; color: #1d4ed8; }
.tag-case { background: #ecfdf5; color: #047857; }
.tag-doc { background: #faf5ff; color: #6d28d9; }
.tag-ai { background: #fff1f2; color: #be123c; }
.tag-hearing { background: #fffbeb; color: #b45309; }
.tag-task { background: #f0fdf4; color: #15803d; }
.tag-draft { background: #fdf4ff; color: #86198f; }

/* ==========================================================================
   DOCUMENT CLIENT VISIBILITY TOGGLE & BADGES
   ========================================================================== */
.btn-vis-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-vis-pill.vis-shared {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.btn-vis-pill.vis-shared:hover {
  background: #d1fae5;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.15);
}

.btn-vis-pill.vis-private {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.btn-vis-pill.vis-private:hover {
  background: #f1f5f9;
  color: #334155;
}

/* ==========================================================================
   CASE TIMELINE & PROCEDURAL CHRONOLOGY STYLES
   ========================================================================== */
.timeline-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
  gap: 16px;
}

.timeline-header-info {
  flex: 1;
  min-width: 0;
}

.timeline-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-timeline-add-milestone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  height: 32px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 7px;
  background: var(--orange-primary);
  color: #ffffff;
  border: 1px solid var(--orange-primary);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(255, 90, 52, 0.2);
  transition: all var(--transition-fast);
}

.btn-timeline-add-milestone:hover {
  background: var(--orange-hover, #e04b28);
  border-color: var(--orange-hover, #e04b28);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(255, 90, 52, 0.35);
}

.btn-timeline-add-milestone:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(255, 90, 52, 0.2);
}

.timeline-filter-chips-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.timeline-filter-chips-bar .filter-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.timeline-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.timeline-chip:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.timeline-chip.active {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.25);
}

.timeline-track-wrapper {
  position: relative;
  padding: 10px 0 20px 0;
}

.timeline-vertical-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-vertical-track::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 20px;
  width: 2px;
  background: #e2e8f0;
  z-index: 0;
}

.timeline-event-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  z-index: 1;
}

.timeline-node {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.timeline-event-card {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.timeline-event-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.timeline-event-item.unconfirmed-card .timeline-event-card {
  border: 1.5px dashed #f97316;
  background: #fffbf9;
}

.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-type-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.timeline-date-display {
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timeline-unconfirmed-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: #ffedd5;
  color: #c2410c;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timeline-confirmed-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timeline-inline-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-tl-act {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-tl-confirm {
  background: #10b981;
  color: #ffffff;
}

.btn-tl-confirm:hover {
  background: #059669;
}

.btn-tl-edit {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-tl-edit:hover {
  background: #e2e8f0;
}

.btn-tl-reject {
  background: #fee2e2;
  color: #dc2626;
}

.btn-tl-reject:hover {
  background: #fca5a5;
}

.btn-tl-icon-act {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-tl-icon-act:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-tl-icon-act.text-red:hover {
  background: #fee2e2;
  color: #dc2626;
}

.timeline-event-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.timeline-event-desc {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 6px;
}

.timeline-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.btn-timeline-source {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--orange-primary);
  background: #fff5f0;
  border: 1px solid #ffdcd1;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-timeline-source:hover {
  background: #ffebe3;
}

.timeline-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  margin: 10px 0;
}

.timeline-empty-state .empty-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff1eb;
  color: var(--orange-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 12px auto;
}

.summary-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  margin: 16px 0;
  min-height: 290px;
}

.summary-empty-state .empty-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff1eb;
  color: var(--orange-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px auto;
  box-shadow: 0 4px 16px rgba(255, 90, 52, 0.16);
}

.summary-empty-state h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.summary-empty-state p {
  font-size: 0.85rem;
  color: #64748b;
  max-width: 500px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.btn-generate-summary-center {
  width: auto !important;
  padding: 12px 30px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 18px rgba(255, 90, 52, 0.32) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-generate-summary-center:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 90, 52, 0.42) !important;
}

/* ==========================================================================
   AUTO-GENERATED AI CASE SUMMARY STYLES
   ========================================================================== */
.summary-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 16px;
  gap: 12px;
}

.summary-header-info {
  flex: 1 1 280px;
  min-width: 240px;
}

.summary-title-with-icon {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.summary-icon-chip {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #fff1eb;
  color: #ff5a34;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 90, 52, 0.15);
  box-shadow: 0 2px 6px rgba(255, 90, 52, 0.08);
  margin-top: 2px;
}

.summary-title-text-wrap {
  flex: 1;
  min-width: 0;
}

.summary-main-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.35;
}

.summary-main-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 3px;
  margin-bottom: 0;
  line-height: 1.45;
}

.summary-meta-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.summary-timestamp-badge {
  font-size: 0.76rem;
  font-weight: 600;
  background: #f8fafc;
  color: #475569;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-summary-regenerate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  height: 32px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 7px;
  background: linear-gradient(135deg, #ff5a34 0%, #ff7a59 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-summary-regenerate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 90, 52, 0.38);
}

.btn-summary-regenerate:active {
  transform: translateY(0);
}

/* On-Page AI Summary Loading Animation Canvas */
.ai-summary-loading-canvas {
  background: linear-gradient(180deg, #fffaf8 0%, #ffffff 100%);
  border: 1.5px dashed #fed7aa;
  border-radius: 12px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.ai-pulse-center {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ai-pulse-orb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 18px rgba(255, 90, 52, 0.4);
  z-index: 2;
  animation: orbFloat 2.5s ease-in-out infinite alternate;
}

@keyframes orbFloat {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-4px) scale(1.05); }
}

.ai-pulse-waves {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.pulse-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 90, 52, 0.4);
  animation: pulseExpand 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.pulse-wave.wave-1 { width: 56px; height: 56px; animation-delay: 0s; }
.pulse-wave.wave-2 { width: 56px; height: 56px; animation-delay: 0.6s; }
.pulse-wave.wave-3 { width: 56px; height: 56px; animation-delay: 1.2s; }

@keyframes pulseExpand {
  0% { width: 44px; height: 44px; opacity: 0.9; }
  100% { width: 110px; height: 110px; opacity: 0; }
}

.ai-pulse-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.ai-pulse-desc {
  font-size: 0.82rem;
  color: #64748b;
  max-width: 520px;
  line-height: 1.5;
  margin-bottom: 22px;
}

.ai-shimmer-skeleton {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #fed7aa 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

.skeleton-line.full { width: 100%; }
.skeleton-line.three-quarter { width: 75%; }
.skeleton-line.half { width: 50%; }

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

/* Unified Single Executive Summary Container */
.summary-unified-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-top: 10px;
}

.summary-unified-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: linear-gradient(135deg, #fff7ed 0%, #fafafa 100%);
  border-bottom: 1px solid #fed7aa;
}

.summary-unified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--orange-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-unified-caption {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}

.summary-unified-body {
  padding: 20px 24px;
  font-size: 0.86rem;
  color: #1e293b;
  line-height: 1.65;
}

.summary-section-block {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.summary-section-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.summary-block-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.summary-block-heading i {
  font-size: 0.85rem;
}

.summary-bullet-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-bullet-items li {
  position: relative;
  padding-left: 20px;
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.55;
}

.summary-bullet-items li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: -1px;
  color: var(--orange-primary);
  font-size: 1.15rem;
  font-weight: 800;
}

.summary-bullet-items li.action-bullet::before {
  color: #dc2626;
}

.summary-bullet-items li.hearing-bullet::before {
  color: #16a34a;
}

.summary-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.summary-card-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.summary-card-panel.span-full {
  grid-column: span 2;
}

.summary-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.summary-card-header i {
  font-size: 0.9rem;
}

.summary-card-header h4 {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1e293b;
}

.summary-card-body {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.55;
}

.summary-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-bullet-list li {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.summary-bullet-list li i {
  font-size: 0.7rem;
  margin-top: 4px;
  flex-shrink: 0;
}

/* ==========================================================================
   PRODUCTION-GRADE UI REDESIGN: REDUCED NOISE, CLEAN TOKENS & SYSTEM
   ========================================================================== */

/* 1. Standardized Status Dots & Compact Strip */
.system-status-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
}

.status-strip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.status-strip-label {
  color: #64748b;
  font-weight: 600;
}

.status-strip-val {
  color: #0f172a;
  font-weight: 700;
}

.status-strip-divider {
  width: 1px;
  height: 16px;
  background: #e2e8f0;
}

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

.status-dot-emerald {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
  animation: pulseDot 2s infinite ease-in-out;
}

.status-dot-amber {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* 2. Dominant Clean Metric Cards (Super Admin & Global) */
.dash-stats-grid.super-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 4px;
}

.stat-card-clean {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.stat-card-clean:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-clean-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.stat-clean-value {
  font-size: 1.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-clean-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

/* 3. Graphical Representation Charts Grid (Super Admin & Lawyer Dashboards) */
.super-charts-grid,
.lawyer-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 18px;
}

@media (max-width: 1024px) {
  .super-charts-grid,
  .lawyer-charts-grid {
    grid-template-columns: 1fr;
  }
}

/* Velocity Timeline Day Columns */
.velocity-chart-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  height: 140px;
  padding: 10px 4px 4px 4px;
}

.velocity-day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
}

.velocity-bar-track {
  width: 100%;
  max-width: 34px;
  background: #f1f5f9;
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  height: 95px;
  overflow: hidden;
}

.velocity-bar-fill {
  width: 100%;
  border-radius: 6px;
  background: linear-gradient(180deg, #ff7e47 0%, #ff5a34 100%);
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 3px;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
}

.velocity-day-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
}

.velocity-day-sub {
  font-size: 0.62rem;
  color: #94a3b8;
}

.chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f8fafc;
}

.chart-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.chart-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.chart-card-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.chart-badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 3px 10px;
  border-radius: 9999px;
}

.chart-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Donut Chart & Legend */
.chart-body-donut-split {
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (max-width: 600px) {
  .chart-body-donut-split {
    flex-direction: column;
    gap: 16px;
  }
}

.donut-chart-container {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-segment {
  fill: none;
  stroke-width: 20;
  transition: stroke-dasharray 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke-width 0.2s ease;
  cursor: pointer;
}

.donut-segment:hover {
  stroke-width: 23;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.15));
}

.donut-center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.donut-center-number {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.donut-center-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.donut-legend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.77rem;
  padding: 5px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.donut-legend-row:hover {
  background: #f8fafc;
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-name {
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.legend-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-val {
  font-weight: 700;
  color: #0f172a;
}

.legend-pct {
  font-size: 0.7rem;
  color: #94a3b8;
  width: 32px;
  text-align: right;
  font-weight: 500;
}

/* Case Stages Meter Bars */
.stage-bars-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.stage-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
}

.stage-bar-name {
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-bar-count {
  font-weight: 700;
  color: #0f172a;
}

.stage-track {
  width: 100%;
  height: 7px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.stage-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Activity Trend Area Chart */
.chart-legend-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.legend-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trend-chart-container {
  width: 100%;
  height: 160px;
  position: relative;
}

.trend-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trend-grid-line {
  stroke: #f1f5f9;
  stroke-dasharray: 4 4;
}

.trend-axis-text {
  font-size: 9px;
  fill: #94a3b8;
  font-family: var(--font-sans);
}

.trend-path-area {
  opacity: 0.15;
}

.trend-path-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-point {
  fill: #ffffff;
  stroke-width: 2.5;
  cursor: pointer;
  transition: r 0.15s ease;
}

.trend-point:hover {
  r: 5.5;
}

/* Chamber Capacity & Allocation */
.orgs-capacity-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.org-capacity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.org-capacity-row:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.org-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.org-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff1eb;
  color: var(--orange-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.org-row-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-row-plan {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.org-plan-enterprise { background: #faf5ff; color: #7c3aed; border: 1px solid #e9d5ff; }
.org-plan-pro { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.org-plan-starter { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

.org-row-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.org-stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.org-stat-val {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
}

.org-stat-lbl {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 600;
}

.btn-clean-link {
  background: none;
  border: none;
  color: var(--orange-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: color 0.15s ease;
}

.btn-clean-link:hover {
  color: #ea580c;
  text-decoration: underline;
}

/* 5. Case Dossier Redesign Components */
.detail-hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-meta-subtitle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 3px;
  font-weight: 500;
}

.detail-subtitle-item {
  color: #475569;
}

.detail-subtitle-dot {
  color: #cbd5e1;
}

.panel-inner-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 14px 0 12px 0;
}

/* Dossier Overflow Dropdown Menu */
.dossier-overflow-wrap {
  position: relative;
  display: inline-block;
}

.btn-overflow-trigger {
  width: 29px;
  height: 29px;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-overflow-trigger:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.dossier-overflow-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 190px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 5px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFadeIn 0.15s ease-out;
}

.overflow-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7.5px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}

.overflow-menu-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.overflow-menu-item.item-danger {
  color: #ef4444;
}

.overflow-menu-item.item-danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.overflow-menu-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 3px 0;
}

/* AI Chips Header & Collapsible Container */
.quick-chip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.btn-ai-chips-toggle {
  background: none;
  border: none;
  color: var(--orange-primary);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-ai-chips-toggle:hover {
  text-decoration: underline;
  color: #ea580c;
}

.ai-chips-extra {
  display: inline-flex;
  gap: 6px;
}

/* 6. Standardized Badge System (All 10 Configurable Case Statuses) */
.badge, .status-tag, .status-pill, .user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.2;
}

/* 1. Draft Status */
.status-draft {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* 2. Active Status */
.status-active, .status-trial, .status-badge-active {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* 3. Pending Status */
.status-pending, .status-pretrial {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* 4. Under Review Status */
.status-under-review, .status-review {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

/* 5. Hearing Scheduled Status */
.status-hearing, .status-scheduled {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

/* 6. Judgment Pending Status */
.status-judgment-pending, .status-judgment {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

/* 7. Won Status */
.status-won, .status-favorable {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

/* 8. Lost Status */
.status-lost, .status-dismissed {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* 9. Settled Status */
.status-settled, .status-compromise {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* 10. Closed Status */
.status-closed, .status-disposed, .status-completed {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Edit Case Action Button */
.btn-edit-case {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  border-radius: 8px;
  padding: 6px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-edit-case:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
  transform: translateY(-1px);
}

/* Save as Draft Button in Create Case Modal */
.btn-save-draft-action {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-save-draft-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Stacked 1-by-1 Layout for Matter Overview */
.detail-stacked-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.detail-stacked-layout .detail-card-panel {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: visible;
}

.detail-stacked-layout .panel-header {
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-stacked-layout .panel-header-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-stacked-layout .panel-header-title h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.detail-stacked-layout .case-meta-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.detail-stacked-layout .case-overview-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-stacked-layout .case-overview-table tr {
  border-bottom: 1px solid #f1f5f9;
}

.detail-stacked-layout .case-overview-table tr:last-child {
  border-bottom: none;
}

.detail-stacked-layout .case-overview-table td.tbl-lbl {
  width: 28%;
  min-width: 180px;
  padding: 10px 18px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  background: #fafbfc;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
}

.detail-stacked-layout .case-overview-table td.tbl-val {
  width: 72%;
  padding: 10px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
  vertical-align: middle;
}

.detail-stacked-layout .detail-narrative-content {
  padding: 18px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #334155;
  background: #ffffff;
  min-height: 80px;
}

.text-coral { color: var(--orange-primary) !important; }
.text-muted { color: #64748b !important; }

/* ==========================================================================
   INTERACTIVE CHART CARDS & LARGE POPUP DETAIL MODAL
   ========================================================================== */
.chart-card-interactive {
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card-interactive:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.btn-chart-expand {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-chart-expand:hover {
  background: var(--orange-primary);
  color: #ffffff;
  border-color: var(--orange-primary);
  transform: scale(1.08);
}

/* Large Chart Modal Styling */
.chart-modal-card {
  max-width: 960px;
  width: 95%;
  max-height: 88vh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

.chart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.chart-modal-header-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chart-modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff1eb;
  color: var(--orange-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.chart-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.chart-modal-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 2px;
}

.chart-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.chart-modal-body::-webkit-scrollbar {
  width: 6px;
}

.chart-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.chart-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.chart-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.chart-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  margin-top: 12px;
  flex-shrink: 0;
}

/* Modal Internal Large Components */
.modal-split-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .modal-split-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.modal-donut-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.modal-donut-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.modal-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.modal-donut-total {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.modal-donut-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

/* Modal Table Scroll Wrapper - Slim & Sticky */
.modal-table-scroll-wrap {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  position: relative;
}

.modal-table-scroll-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.modal-table-scroll-wrap::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 4px;
}

.modal-table-scroll-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modal-table-scroll-wrap::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.modal-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
  background: #ffffff;
}

.modal-data-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

.modal-data-table th {
  background: #f8fafc;
  padding: 10px 14px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.modal-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.modal-data-table tbody tr:last-child td {
  border-bottom: none;
}

.modal-data-table tbody tr:hover td {
  background-color: #f8fafc;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.status-tag.status-draft { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.status-tag.status-active { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-tag.status-pending { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.status-tag.status-under-review { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.status-tag.status-hearing { background: #fff1eb; color: #ea580c; border: 1px solid #fed7aa; }
.status-tag.status-judgment { background: #fdf2f8; color: #be185d; border: 1px solid #fbcfe8; }
.status-tag.status-won { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-tag.status-lost { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.status-tag.status-settled { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.status-tag.status-closed { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.status-tag.status-trial { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-tag.status-pretrial { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.status-tag.status-disposed { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.modal-trend-large-wrap {
  width: 100%;
  height: 260px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

/* Organization Detailed Profile Pop-up Modal */
.org-modal-card {
  max-width: 920px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.org-table-row-clickable {
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.org-table-row-clickable:hover {
  background-color: #f8fafc;
  transform: translateY(-1px);
}

.org-table-row-clickable:hover td {
  border-bottom-color: #cbd5e1;
}

.org-meta-pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #475569;
}

.org-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.org-meta-item i {
  color: var(--orange-primary);
  font-size: 0.82rem;
}

.org-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .org-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.org-metric-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-metric-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.org-metric-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.org-metric-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

.org-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.org-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.org-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-org-action-sm {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-org-action-sm:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* Audit Logs Filter Control */
.audit-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.audit-filter-icon {
  position: absolute;
  left: 12px;
  font-size: 0.78rem;
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}

.audit-filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 10px center / 16px 16px no-repeat;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 34px 8px 32px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  font-family: inherit;
  cursor: pointer;
  min-width: 220px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.audit-filter-select:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

.audit-filter-select:focus {
  outline: none;
  border-color: var(--orange-primary, #ff5a34);
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.15);
}

/* ==========================================================================
   AUDIT LOG RIGHT-SIDE SLIDE-OVER DRAWER (PANEL)
   ========================================================================== */
.sidepanel-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1040;
  transition: opacity 0.2s ease;
}

.sidepanel-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  max-width: 92vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.18);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidepanel-drawer.open {
  transform: translateX(0);
}

.sidepanel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.sidepanel-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidepanel-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff1eb;
  color: var(--orange-primary, #ff5a34);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidepanel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.sidepanel-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  font-family: monospace;
}

.sidepanel-close-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidepanel-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: scale(1.05);
}

.sidepanel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
}

.sidepanel-footer {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  background: #f8fafc;
}

.sidepanel-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}

.sidepanel-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidepanel-key-val-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sidepanel-kv-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidepanel-kv-key {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}

.sidepanel-kv-val {
  font-size: 0.82rem;
  color: #0f172a;
  font-weight: 700;
}

.sidepanel-json-block {
  background: #0f172a;
  color: #38bdf8;
  padding: 12px;
  border-radius: 8px;
  font-family: 'Consolas', monospace;
  font-size: 0.74rem;
  overflow-x: auto;
  max-height: 180px;
  white-space: pre-wrap;
  word-break: break-all;
}

.audit-row-interactive {
  cursor: pointer;
  transition: all 0.15s ease;
}

.audit-row-interactive:hover {
  background-color: #fff8f5 !important;
  transform: translateY(-1px);
}

#audit-data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

#audit-data-table th,
#audit-data-table td {
  white-space: nowrap !important;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 9px 10px;
}

#audit-data-table th:first-child,
#audit-data-table td:first-child {
  padding-left: 16px;
}

#audit-data-table th:last-child,
#audit-data-table td:last-child {
  padding-right: 18px;
  text-align: right;
  overflow: visible;
}

#audit-data-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

#audit-data-table .user-role-badge,
#audit-data-table .audit-action-tag,
#audit-data-table .member-avatar-circle {
  white-space: nowrap !important;
  flex-shrink: 0;
}

/* ==========================================================================
   TABLE PAGINATION COMPONENT (STUDIO CORAL-ORANGE THEME)
   ========================================================================== */
.table-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  font-size: 0.78rem;
  color: #64748b;
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-info strong {
  color: #0f172a;
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pagination-per-page {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.pagination-select {
  padding: 3.5px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}

.pagination-select:focus {
  border-color: var(--orange-primary, #ff5a34);
  box-shadow: 0 0 0 2px rgba(255, 90, 52, 0.15);
}

.pagination-nav-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-page-nav {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-page-nav:hover:not(:disabled):not(.active) {
  background: #fff7ed;
  border-color: var(--orange-primary, #ff5a34);
  color: var(--orange-primary, #ff5a34);
}

.btn-page-nav.active {
  background: var(--orange-primary, #ff5a34);
  border-color: var(--orange-primary, #ff5a34);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(255, 90, 52, 0.25);
}

.btn-page-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

/* ==========================================================================
   AUTHENTIC INDIAN LEGAL COURT PLEADING & DRAFTING STUDIO STYLES
   ========================================================================== */

.legal-court-document {
  background: #ffffff;
  color: #0f172a;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 14px;
  line-height: 1.65;
  padding: 36px 44px;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}

/* Court Header Banner */
.legal-court-header-banner {
  text-align: center;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0f172a;
}

.legal-court-header-banner h2 {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.legal-court-header-banner .court-subtitle {
  font-size: 0.85rem;
  color: #475569;
  font-style: italic;
  margin: 0;
}

/* Cause Title Card */
.legal-cause-title-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0 22px 0;
}

.cause-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
}

.cause-title-party {
  font-weight: 700;
  color: #0f172a;
}

.cause-title-role {
  font-size: 0.82rem;
  color: #64748b;
  font-style: italic;
}

.cause-title-vs {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.08em;
  margin: 6px 0;
}

/* Pleading Title */
.legal-pleading-title {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  margin: 20px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #94a3b8;
  letter-spacing: 0.02em;
}

/* Section Headings */
.legal-section-heading {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  margin: 22px 0 10px 0;
  padding-bottom: 4px;
  border-bottom: 1.5px solid #0f172a;
  display: inline-block;
}

/* Paragraphs */
.legal-paragraph {
  margin: 0 0 12px 0;
  text-align: justify;
  text-justify: inter-word;
  color: #1e293b;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Structured Facts Table */
.legal-table-wrapper {
  margin: 16px 0 20px 0;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.legal-court-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.legal-court-table thead th {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 2px solid #0284c7;
}

.legal-court-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.legal-court-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.legal-court-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
  line-height: 1.45;
}

.legal-court-table .col-particulars {
  width: 32%;
  font-weight: 700;
  color: #0f172a;
  border-right: 1px solid #e2e8f0;
}

.legal-court-table .col-details {
  width: 68%;
  color: #1e293b;
}

/* Numbered / Lettered / Clause Items */
.legal-clause-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  text-align: justify;
}

.legal-clause-item .clause-num {
  font-weight: 800;
  color: #0f172a;
  min-width: 22px;
  flex-shrink: 0;
  line-height: 1.65;
}

.legal-clause-item .clause-body {
  flex: 1;
  color: #1e293b;
  line-height: 1.65;
  font-size: 0.92rem;
}

/* Bullet Lists */
.legal-bullet-list {
  margin: 8px 0 14px 20px;
  padding: 0;
  list-style-type: square;
}

.legal-bullet-list li {
  margin-bottom: 6px;
  color: #1e293b;
  line-height: 1.55;
  font-size: 0.92rem;
}

/* Verification & Affidavit Card */
.legal-verification-card {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0 20px 0;
}

.legal-verification-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #cbd5e1;
}

.legal-deponent-sig-block {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.deponent-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
}

.deponent-line {
  width: 100%;
  height: 1px;
  background: #0f172a;
  margin-bottom: 4px;
}

.deponent-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.04em;
}

/* Official Advocate Seal & Closing Block */
.legal-official-closing-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1.5px solid #0f172a;
  gap: 20px;
}

.legal-closing-left {
  flex: 1;
}

.closing-meta-line {
  margin: 0 0 3px 0;
  font-size: 0.85rem;
  color: #1e293b;
}

.legal-advocate-details {
  margin-top: 10px;
}

.adv-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
  margin: 0 0 2px 0;
}

.adv-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.adv-cred, .adv-chamber {
  font-size: 0.78rem;
  color: #475569;
  margin: 0 0 2px 0;
}

.adv-bar {
  font-size: 0.8rem;
  color: #1e293b;
  margin: 0 0 2px 0;
}

.legal-closing-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Authentic Circular Red Court Seal */
.legal-court-seal {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 2.5px solid #dc2626;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #dc2626;
}

.seal-inner-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px dashed #dc2626;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px;
}

.seal-arc-text-top {
  font-size: 0.38rem;
  font-weight: 900;
  color: #dc2626;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.seal-icon-emblem {
  color: #dc2626;
  font-size: 0.65rem;
  margin: 1px 0;
}

.seal-center-text {
  font-size: 0.44rem;
  font-weight: 900;
  color: #dc2626;
  line-height: 1.1;
  text-transform: uppercase;
}

.seal-arc-text-bottom {
  font-size: 0.36rem;
  font-weight: 800;
  color: #dc2626;
  letter-spacing: 0.04em;
}

.legal-sig-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 170px;
}

.legal-sig-digital {
  height: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.digital-sig-script {
  font-family: 'Brush Script MT', 'Segoe Script', cursive, serif;
  font-size: 1.15rem;
  color: #0f172a;
}

.legal-sig-line {
  width: 100%;
  height: 1.5px;
  background: #0f172a;
  margin: 2px 0 4px 0;
}

.legal-sig-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: 0.03em;
}

.legal-sig-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-style: italic;
  margin: 0;
}

/* ==========================================================================
   TOPBAR QUICK PROFILE BUTTON
   ========================================================================== */
.topbar-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.topbar-profile-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.topbar-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange-grad, linear-gradient(135deg, #ff7a59 0%, #ff5a34 100%));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-user-name-short {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   USER ADVOCATE PROFILE & LOGIN CREDENTIALS MODAL
   ========================================================================== */
.user-profile-modal-card {
  max-width: 620px;
  width: 92%;
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.06);
}

/* Profile Hero Banner */
.profile-hero-banner {
  background: linear-gradient(135deg, rgba(255, 90, 52, 0.09) 0%, rgba(255, 122, 89, 0.03) 100%);
  border: 1px solid rgba(255, 90, 52, 0.16);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.profile-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-lg {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--orange-grad, linear-gradient(135deg, #ff7a59 0%, #ff5a34 100%));
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 90, 52, 0.35);
}

.profile-status-indicator {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #10b981;
  border: 2.5px solid #ffffff;
  position: absolute;
  bottom: 0;
  right: 0;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.profile-hero-details {
  flex: 1;
  min-width: 0;
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-name-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.profile-sub-title {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
  margin: 4px 0 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 6px;
}

.session-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Profile Modal Body Sections */
.profile-modal-body {
  padding: 16px 0 6px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 62vh;
  overflow-y: auto;
}

.profile-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.profile-section-header {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 540px) {
  .profile-info-grid {
    grid-template-columns: 1fr;
  }
}

.profile-field-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 8px 12px;
}

.profile-field-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 3px;
}

.profile-field-val {
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.profile-field-val-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
}

.profile-field-val-with-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
}

.bar-verified-pill {
  font-size: 0.65rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1.5px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-copy-chip {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy-chip:hover {
  color: #ff5a34;
  background: rgba(255, 90, 52, 0.1);
}

.code-font {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.8rem;
  color: #334155;
}

/* Security Metrics Grid */
.profile-security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 540px) {
  .profile-security-grid {
    grid-template-columns: 1fr;
  }
}

.security-metric-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 8px 12px;
}

.sec-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 90, 52, 0.1);
  color: #ff5a34;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.sec-info {
  display: flex;
  flex-direction: column;
}

.sec-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
}

.sec-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
}

.sec-status-active {
  color: #059669;
}

/* Role Capabilities List */
.profile-capabilities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cap-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cap-pill i {
  color: #ff5a34;
  font-size: 0.7rem;
}

/* Profile Modal Footer */
.profile-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  margin-top: 8px;
}

.btn-profile-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #e11d48;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-profile-logout:hover {
  background: #ffe4e6;
  color: #be123c;
  border-color: #fda4af;
}

/* ==========================================================================
   CASE CREATION MODAL: STEP 4 DOCUMENT INGESTION
   ========================================================================== */
.doc-ingest-top-bar {
  margin-bottom: 12px;
}

.doc-category-picker-wrap {
  display: flex;
  flex-direction: column;
}

.doc-category-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.doc-category-select:focus {
  border-color: var(--orange-primary, #ff5a34);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 90, 52, 0.12);
}

.case-doc-dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.case-doc-dropzone-box:hover,
.case-doc-dropzone-box.dragover {
  border-color: var(--orange-primary, #ff5a34);
  background: rgba(255, 90, 52, 0.04);
}

.dropzone-icon-spark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 90, 52, 0.1);
  color: var(--orange-primary, #ff5a34);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  transition: transform 0.2s ease;
}

.case-doc-dropzone-box:hover .dropzone-icon-spark {
  transform: translateY(-2px);
}

.dropzone-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.dropzone-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0 0 12px 0;
}

.dropzone-format-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fmt-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 2px 7px;
  border-radius: 4px;
}

.fmt-tag-multi {
  font-size: 0.68rem;
  font-weight: 700;
  color: #047857;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Staged Files Preview List */
.staged-files-container {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.staged-files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.staged-count-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-clear-staged {
  background: none;
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: #ef4444;
  cursor: pointer;
}

.btn-clear-staged:hover {
  text-decoration: underline;
}

.staged-files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
}

.staged-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  padding: 6px 10px;
}

.staged-file-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.staged-file-icon {
  color: var(--orange-primary, #ff5a34);
  font-size: 0.9rem;
}

.staged-file-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staged-file-size {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

.staged-file-tag {
  font-size: 0.65rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 1px 6px;
  border-radius: 4px;
}

.btn-remove-staged-file {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
}

.btn-remove-staged-file:hover {
  color: #ef4444;
}

/* Background Processing Guarantee Box */
.bg-processing-guarantee-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
}

.proc-guarantee-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.proc-guarantee-text strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: #14532d;
  display: block;
  margin-bottom: 2px;
}

.proc-guarantee-text p {
  font-size: 0.72rem;
  color: #166534;
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   GLOBAL FLOATING BACKGROUND DOCUMENT PROCESSING DOCK
   ========================================================================== */
.global-bg-processing-dock {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 370px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08);
  z-index: 1050;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  animation: slideUpDock 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpDock {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.global-bg-processing-dock.minimized .bg-dock-body {
  display: none;
}

.bg-dock-header {
  padding: 12px 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.bg-dock-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bg-dock-icon-pulse {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 90, 52, 0.2);
  color: #ff5a34;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  animation: dockPulse 1.8s infinite ease-in-out;
}

@keyframes dockPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.75; }
}

.bg-dock-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  line-height: 1.2;
}

.bg-dock-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 0;
}

.bg-dock-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-dock-minimize,
.btn-dock-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.btn-dock-minimize:hover,
.btn-dock-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Dock Body */
.bg-dock-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
}

.bg-dock-case-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  padding: 5px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bg-dock-case-pill i {
  color: var(--orange-primary, #ff5a34);
}

/* Live Progress Section */
.bg-dock-progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bg-dock-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bg-dock-stage-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}

.bg-dock-percent {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--orange-primary, #ff5a34);
}

.bg-dock-progress-bar-track {
  height: 6px;
  width: 100%;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}

.bg-dock-progress-bar-fill {
  height: 100%;
  background: var(--orange-grad, linear-gradient(90deg, #ff7a59 0%, #ff5a34 100%));
  border-radius: 6px;
  transition: width 0.4s ease;
}

/* Pipeline Step Indicators */
.bg-dock-pipeline-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.pipe-step-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.pipe-step-chip .step-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
}

.pipe-step-chip.active {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
  font-weight: 700;
}

.pipe-step-chip.active .step-dot {
  background: #ff5a34;
  color: #ffffff;
}

.pipe-step-chip.completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
  font-weight: 700;
}

.pipe-step-chip.completed .step-dot {
  background: #16a34a;
  color: #ffffff;
}

/* Files Status List in Dock */
.bg-dock-files-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 110px;
  overflow-y: auto;
}

.bg-dock-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.72rem;
}

.bg-dock-file-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bg-dock-file-name {
  font-weight: 600;
  color: #1e293b;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-status-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.dock-status-queued {
  background: #f1f5f9;
  color: #64748b;
}

.dock-status-running {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #ffedd5;
}

.dock-status-done {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* Dock Footer */
.bg-dock-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.bg-dock-unlocked-hint {
  font-size: 0.68rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-dock-open-dossier {
  background: var(--orange-grad, linear-gradient(135deg, #ff7a59 0%, #ff5a34 100%));
  border: none;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-dock-open-dossier:hover {
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.35);
  transform: translateY(-1px);
}

/* Background Dock File Item & 4-Stage Badges */
.bg-dock-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  font-size: 0.72rem;
  transition: all 0.15s ease;
}

.bg-dock-file-item:hover {
  background: #f1f5f9;
}

.bg-dock-file-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.bg-dock-file-badge.status-ocr,
.status-pill.status-ocr {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
}

.bg-dock-file-badge.status-chunk,
.status-pill.status-chunk {
  background: #fefce8;
  color: #ca8a04;
  border: 1px solid #fef08a;
}

.bg-dock-file-badge.status-embed,
.status-pill.status-embed {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.bg-dock-file-badge.status-vectordb,
.status-pill.status-vectordb {
  background: #fdf4ff;
  color: #9333ea;
  border: 1px solid #f0abfc;
}

.bg-dock-file-badge.status-indexed,
.bg-dock-file-badge.status-completed,
.status-pill.status-completed {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.bg-dock-file-badge.status-fail,
.status-pill.status-failed {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Suppress Corner Floating Bubble as per user request */
.global-bg-processing-dock {
  display: none !important;
}

/* ==========================================================================
   INLINE CASE ROW DOCUMENT PROCESSING PIPELINE (Under Case Row)
   ========================================================================== */
.case-inline-pipeline-row {
  background: #fafbfc;
  animation: fadeInView 0.25s ease;
}

.case-inline-pipeline-row td.inline-pipeline-cell {
  padding: 0 16px 10px 16px !important;
  border-top: none !important;
  background: transparent !important;
}

.inline-pipeline-card {
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 2px 8px rgba(255, 90, 52, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.25s ease;
}

.inline-pipeline-card.completed {
  border-color: #a7f3d0;
  background: #f0fdf4;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.inline-pipeline-card.error {
  border-color: #fecaca;
  background: #fef2f2;
}

.inline-pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-pipeline-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-pipeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #ea580c;
}

.inline-pipeline-badge.badge-completed {
  color: #059669;
}

.inline-pipeline-doc-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.inline-pipeline-stages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pipe-mini-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.pipe-mini-chip.active {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
  box-shadow: 0 0 6px rgba(234, 88, 12, 0.15);
}

.pipe-mini-chip.done {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.inline-pipeline-percent {
  font-size: 0.74rem;
  font-weight: 800;
  color: #0f172a;
  min-width: 32px;
  text-align: right;
}

.inline-pipeline-track {
  width: 100%;
  height: 5px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}

.inline-pipeline-fill {
  height: 100%;
  background: var(--orange-grad, linear-gradient(90deg, #ffa56a 0%, #ff5a34 100%));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.inline-pipeline-fill.fill-completed {
  background: #10b981;
}

/* ==========================================================================
   CUSTOM CONFIRMATION POP-UP MODAL
   ========================================================================== */
.confirm-modal-card {
  max-width: 460px;
  width: 92%;
  padding: 24px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05);
  animation: confirmModalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes confirmModalScale {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-modal-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.confirm-modal-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fef2f2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  border: 1px solid #fee2e2;
}

.confirm-modal-icon-badge.icon-warning {
  background: #fffbeb;
  color: #f59e0b;
  border-color: #fef3c7;
}

.confirm-modal-icon-badge.icon-info {
  background: #eff6ff;
  color: #3b82f6;
  border-color: #dbeafe;
}

.confirm-modal-text-wrap {
  flex: 1;
  min-width: 0;
}

.confirm-modal-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.3;
}

.confirm-modal-desc {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.btn-danger-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #dc2626;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
}

.btn-danger-confirm:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.btn-danger-confirm:active {
  transform: translateY(0);
}

/* Document Comparison Grid */
.compare-selector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  align-items: start;
}

.compare-selector-grid > * {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.compare-selector-grid .field-label,
.compare-selector-grid .custom-select-label-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  height: 18px !important;
  line-height: 18px !important;
  margin-bottom: 6px !important;
}

.compare-controls-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.compare-controls-row .form-field-group {
  flex: 1;
  min-width: 260px;
  box-sizing: border-box;
}

.compare-controls-row .field-label {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  height: 18px !important;
  line-height: 18px !important;
  margin-bottom: 6px !important;
}

.compare-action-btn-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
  flex-shrink: 0;
}

/* 2-Column Comparison Result Document Header Grid */
.compare-doc-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.compare-doc-header-card {
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.compare-doc-header-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .compare-selector-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .compare-doc-header-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .compare-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  .compare-action-btn-wrap {
    width: 100%;
  }
  .compare-action-btn-wrap button {
    width: 100% !important;
  }
}

.subtab-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--orange-primary);
  background: rgba(255, 90, 52, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 90, 52, 0.15);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ==========================================================================
   DOSSIER SUBTAB SECTION HEADERS & DATA PANELS
   ========================================================================== */
.docs-section-header,
.timeline-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-bottom: 14px;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.docs-header-left,
.timeline-header-info,
.docs-section-header > div:first-child {
  flex: 1;
  min-width: 260px;
  max-width: 100%;
}

.docs-header-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 3px 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.docs-header-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  font-weight: 500;
}

.timeline-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Detail Card Panels & Data Tables */
.detail-card-panel {
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: visible;
  box-sizing: border-box;
}

.panel-header {
  padding: 11px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.panel-header-title h3 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.table-responsive-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.cases-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  table-layout: auto;
}

.cases-data-table th {
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #fafbfc;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
  text-align: left;
}

.cases-data-table th:last-child {
  text-align: right;
  padding-right: 18px;
}

.cases-data-table td {
  padding: 11px 14px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  box-sizing: border-box;
}

.cases-data-table td:last-child {
  text-align: right;
  padding-right: 18px;
}

.cases-data-table tr:hover {
  background: #fafbfc;
}



