/* Add custom styling if needed. Tailwind handles most of the styles */

/* Hide scrollbar for all browsers */
::-webkit-scrollbar {
  display: none;
}
* {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

#drop-zone.dragover {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.4);
}

/* Spinner animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

body {
  background-color: #f6f4ed;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
}

.anthropic-serif {
  font-family: 'Newsreader', 'Georgia', serif;
}

/* Custom Resize Handle */
#chat-resizer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  background-color: transparent;
  z-index: 50;
  transition: background-color 0.2s;
}
#chat-resizer:hover, #chat-resizer.active {
  background-color: #cbd5e1;
}

/* Table styling for chat */
#chat-messages .prose table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}
#chat-messages .prose th,
#chat-messages .prose td {
  min-width: 150px;
  max-width: 400px;
  white-space: normal;
  word-wrap: break-word;
  vertical-align: top;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
}

@page {
  size: A4 portrait;
  margin: 14mm 12mm 14mm 12mm;
}

@media print {
  body {
    background: white !important;
    background-image: none !important;
    color: #0f172a !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 10pt !important;
    line-height: 1.4 !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide interactive web chrome */
  #sidebar, 
  body > header, 
  footer, 
  #btn-general-chat, 
  #download-btn-container, 
  #chat-panel, 
  #liquid-mascot, 
  #main-content,
  .no-print {
    display: none !important;
  }

  body, main, #view-dashboard, #ai-app-container {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
  }

  /* Formal Report Header for Print */
  .print-report-header {
    display: block !important;
    border-bottom: 2pt solid #0f172a !important;
    padding-bottom: 8px !important;
    margin-bottom: 14px !important;
    page-break-after: avoid !important;
    break-after: avoid-page !important;
  }

  /* Formal Tables Formatted Specifically for Document Print */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 14px !important;
    page-break-inside: auto !important;
    font-size: 9.5pt !important;
  }

  thead {
    display: table-header-group !important; /* Repeats table headers on every printed page */
    page-break-after: avoid !important;
    break-after: avoid-page !important;
  }

  thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border-top: 1.5pt solid #334155 !important;
    border-bottom: 1.5pt solid #334155 !important;
    padding: 6px 8px !important;
    text-align: left !important;
  }

  tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  td {
    padding: 6px 8px !important;
    border-bottom: 0.75pt solid #cbd5e1 !important;
    vertical-align: top !important;
  }

  tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
  }

  /* Section headers */
  h1, h2, h3, h4 {
    page-break-after: avoid !important;
    break-after: avoid-page !important;
    color: #0f172a !important;
  }

  .report-section {
    page-break-inside: auto !important;
    margin-bottom: 16px !important;
  }

  .summary-box, .table-container {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Badge styling for crisp printing */
  .badge-print {
    display: inline-block !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 8pt !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    white-space: nowrap !important;
  }

  .badge-compliant {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1pt solid #059669 !important;
  }

  .badge-outdated {
    background-color: #fffbeb !important;
    color: #92400e !important;
    border: 1pt solid #d97706 !important;
  }

  .badge-violation {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border: 1pt solid #dc2626 !important;
  }

  .badge-omitted {
    background-color: #fff1f2 !important;
    color: #9f1239 !important;
    border: 1pt solid #e11d48 !important;
  }

  /* Official Print Footer */
  .print-report-footer {
    display: block !important;
    margin-top: 20px !important;
    padding-top: 8px !important;
    border-top: 1pt solid #cbd5e1 !important;
    font-size: 8pt !important;
    color: #64748b !important;
    text-align: center !important;
    page-break-inside: avoid !important;
  }
}


.box {
  --w: auto;
  --h: 44px;
  --r: 9999px;
  --tr: 25%;
  z-index: 500;
  position: relative;
  width: var(--w);
  height: var(--h);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--r);
  border: 1px double rgba(51, 51, 51, 0.08);

  box-shadow:
    inset 2px -2px 1px -1px rgba(255, 255, 255, 0.9),
    inset -2px 2px 1px -1px rgba(255, 255, 255, 0.9),
    inset 6px -6px 1px -6px rgba(255, 255, 255, 0.55),
    inset -6px 6px 1px -6px rgba(255, 255, 255, 0.55),
    inset 0 0 2px rgba(0, 0, 0, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.2);

  background: rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  filter: brightness(0.9);
  user-select: none;
}

.box .svg {
  width: 16px;
  filter: drop-shadow(0 25px 3px rgba(102, 102, 102, 0.2));
}

.box .text {
  filter: drop-shadow(0 25px 3px rgba(102, 102, 102, 0.15));
}

.box:before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: var(--r);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.box:after {
  z-index: 501;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  pointer-events: none;
  border-radius: var(--r);
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.4) 0%,
    transparent var(--tr),
    transparent calc(100% - var(--tr)),
    rgba(255, 255, 255, 0.4) 100%
  );
}

/* Liquid Mascot Tutorial Bubble */
#liquid-mascot {
  overflow: hidden;
}
#liquid-mascot::before,
#liquid-mascot::after {
  border-radius: inherit;
}

.start-btn {
  padding: 0 0.8rem 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: 0.25s;
}

.start-btn .text {
  font-size: 18px;
  font-family: 'Newsreader', 'Georgia', serif;
  color: #3e3e3e;
  position: relative;
  z-index: 502;
  font-weight: 500;
}

.start-btn .btn-icon {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #3e3e3e;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  transition: 0.25s;
  position: relative;
  z-index: 502;
}

.start-btn .btn-icon .svg {
  width: 16px;
  fill: #f5f5f5;
}

.start-btn:hover {
  background: rgba(0, 0, 0, 0);
  transform: translateY(-3px);
}

.start-btn:hover .btn-icon {
  transform: scale(1.1);
}

.start-btn:active {
  transform: scale(0.94);
}

.start-btn:active .text {
  color: #000;
}

.start-btn:active .btn-icon {
  transform: scale(0.94);
}

.icon-btn {
  --w: 44px;
  padding: 0;
  transition: 0.25s;
}
.icon-btn:hover {
  background: rgba(0, 0, 0, 0);
  transform: translateY(-3px);
}
.icon-btn:active {
  transform: scale(0.94);
}
.icon-btn .svg {
  width: 20px;
  fill: #3e3e3e;
  position: relative;
  z-index: 502;
  transition: 0.25s;
}
.icon-btn:hover .svg {
  transform: scale(1.1);
  fill: #1A1A1A;
}

/* Custom blinking cursor */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.cursor-blink {
  animation: blink 1s step-end infinite;
  display: inline-block;
  margin-left: 2px;
}

/* Liquid Glass Input */
.liquid-glass-container {
  background: rgba(246, 244, 237, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.liquid-input {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px double rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.8),
    inset 0 -2px 4px rgba(0,0,0,0.02),
    0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.liquid-input:focus {
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.9),
    inset 0 -2px 4px rgba(0,0,0,0.02),
    0 8px 25px rgba(0,0,0,0.1);
}

/* Arrow Button Animations */
#btn-chat-submit {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-fly-out {
  animation: flyOut 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

.btn-pop-in {
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
}

@keyframes flyOut {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(150%) scale(0.8); opacity: 0; }
}

@keyframes popIn {
  0% { transform: translateX(-150%) scale(0.5); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

/* 5 Dots Wave */
.wave-dots {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  height: 20px;
}
.wave-dots span {
  width: 6px;
  height: 6px;
  background-color: #94a3b8;
  border-radius: 50%;
  display: inline-block;
  animation: waveDots 1.2s ease-in-out infinite;
}
.wave-dots span:nth-child(1) { animation-delay: 0.0s; }
.wave-dots span:nth-child(2) { animation-delay: 0.1s; }
.wave-dots span:nth-child(3) { animation-delay: 0.2s; }
.wave-dots span:nth-child(4) { animation-delay: 0.3s; }
.wave-dots span:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveDots {
  0%, 100% { transform: translateY(0); background-color: #94a3b8; }
  50% { transform: translateY(-6px); background-color: #1A1A1A; }
}

@keyframes spike-vibrate {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.2) rotate(-5deg); }
  40% { transform: scale(0.9) rotate(5deg); }
  60% { transform: scale(1.3) rotate(-3deg); }
  80% { transform: scale(0.95) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.emoji-spiking {
  display: inline-block;
  animation: spike-vibrate 0.4s ease-in-out infinite;
}

/* Team Section Glass Fallback (No DP) */
.no-dp-glass {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px double rgba(51, 51, 51, 0.08);

  box-shadow:
    inset 2px -2px 1px -1px rgba(255, 255, 255, 0.9),
    inset -2px 2px 1px -1px rgba(255, 255, 255, 0.9),
    inset 6px -6px 1px -6px rgba(255, 255, 255, 0.55),
    inset -6px 6px 1px -6px rgba(255, 255, 255, 0.55),
    inset 0 0 2px rgba(0, 0, 0, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.2);

  background: rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  filter: brightness(0.9);
  user-select: none;
}

.no-dp-glass:before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 9999px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.no-dp-glass:after {
  z-index: 5;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  pointer-events: none;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 25%,
    transparent 75%,
    rgba(255, 255, 255, 0.4) 100%
  );
}

.glass-user-icon {
  width: 50%;
  height: auto;
  fill: rgba(255, 255, 255, 0.7);
  filter: drop-shadow(0 25px 3px rgba(102, 102, 102, 0.2));
  z-index: 10;
  position: relative;
}

/* ============================================================
   Liquid Glass Toggle Switch & Dual Mode Switcher
   ============================================================ */

:root {
  --transition: 0.2s;
  --ease: ease-out;
}

[data-pressed=true] .liquid__track {
  min-height: calc(var(--height) * 0.5px);
}

[data-bounce='true']:has(:is(button:active, [data-pressed="true"])) {
  --transition: 0.6s;
  --ease: linear(
    0 0%,
    0.6091 3.69%,
    1.0259 7.24%,
    1.1733 9.05%,
    1.283 10.92%,
    1.3562 12.87%,
    1.3948 14.95%,
    1.4014 16.03%,
    1.3999 17.16%,
    1.3731 19.64%,
    1.3202 22.27%,
    1.1394 29.39%,
    1.0582 33.17%,
    0.9943 37.45%,
    0.9734 39.64%,
    0.9593 41.92%,
    0.9505 45.08%,
    0.9517 48.7%,
    0.9924 63.02%,
    1.0046 71.2%,
    1.0061 78.24%,
    1 100%
  );
}

.indicator--masked .mask {
  translate: calc(
      (var(--complete, 0) / 100) * (100cqi - 60cqi)
    ) -50%;
  transition-property: height, width, margin, scale;
  transition-duration: var(--transition);
  transition-timing-function: var(--ease);
  will-change: height, width, margin;
}

.liquid-toggle .wrapper {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  clip-path: inset(0 0 0 0 round 100px);
  filter: blur(6px);
  transition: filter var(--transition) var(--ease);
}

[aria-pressed='true']:not([data-active='true']) .liquid__track {
  left: calc(var(--border) * 6);
}

.liquid__track {
  left: 0;
  transition-property: height, width, filter, left;
  transition-duration: var(--transition);
  transition-timing-function: var(--ease);
  translate: calc(
      (var(--complete, 0) / 100) * (100cqi - 100% - (6 * var(--border)))
    ) -50%;
}

[data-mapped=false] .liquid__track {
  transition-property: height, width, filter, left, background;
  transition-duration: var(--transition), var(--transition), var(--transition), var(--transition), calc(var(--transition) * 0.5);
  transition-timing-function: var(--ease), var(--ease), var(--ease), var(--ease), ease-out;
}

.indicator__liquid {
  translate: calc(
      (var(--complete, 0) / 100) * (100cqi - 100% - (2 * var(--border)))
    ) -50%;
  transition-property: scale;
  transition-duration: var(--transition);
  transition-timing-function: var(--ease);
}

.indicator__liquid :is(.cover, .shadow) {
  transition: opacity var(--transition) var(--ease);
}

[data-active='true'] .indicator--masked .mask,
.liquid-toggle:active .indicator--masked .mask {
  height: calc((100% - (2 * var(--border))) * (1.65 - (var(--delta, 0) * 0.025)));
  width: calc((60% - (2 * var(--border))) * (1.65 + (var(--delta, 0) * 0.025)));
  margin-left: calc((60% - (2 * var(--border))) * ((.65 + (var(--delta, 0) * 0.025)) * -0.5));
}

[data-active='true'] .indicator__liquid,
.liquid-toggle:active .indicator__liquid {
  scale: calc(1.65 + (var(--delta, 0) * 0.025)) calc(1.65 - (var(--delta, 0) * 0.025));
}

[data-active='true'] .liquid-toggle .wrapper {
  filter: blur(0px);
}

[data-active='true'] .indicator__liquid .shadow,
.liquid-toggle:active .indicator__liquid .shadow {
  opacity: 1;
}

[data-active='true'] .indicator__liquid .cover,
.liquid-toggle:active .indicator__liquid .cover {
  opacity: 0;
}

[data-active='true'] .indicator__liquid .liquid__track,
.liquid-toggle:active .indicator__liquid .liquid__track {
  left: calc(var(--border) * 3);
  height: calc((var(--height) * 1px) - (6 * var(--border)));
}

[data-mapped=false] .liquid-toggle {
  --progress: round(down, var(--complete, 0), 85);
  --checked: hsl(
    var(--hue, 144),
    calc((8 + (var(--progress) / 85 * (92))) * 1%),
    calc((81 - (var(--progress) / 85 * (81 - 43))) * 1%)
  );
}

[data-mapped=false] .liquid-toggle .indicator,
[data-mapped=false] .liquid-toggle .indicator--masked {
  transition: background calc(var(--transition) * 0.5) ease-out;
}

[data-mapped=false] .liquid-toggle .liquid__shadow {
  transition: box-shadow calc(var(--transition) * 0.5) ease-out;
}

.liquid-toggle {
  --unchecked: hsl(218, 8%, 81%);
  --checked: hsl(
    var(--hue, 144),
    calc((8 + (var(--complete, 0) / 100 * (92))) * 1%),
    calc((81 - (var(--complete, 0) / 100 * (81 - 43))) * 1%)
  );
  --control: hsl(300, 100%, 100%);
  --border: 2.5px;
  --width: 76;
  --height: 32;
  height: calc(var(--height) * 1px);
  width: calc(var(--width) * 1px);
  border-radius: 100px;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: visible;
  container-type: inline-size;
  background: #0000;
  transition: outline var(--transition) var(--ease);
  outline-offset: 2px;
  display: inline-block;
  user-select: none;
  touch-action: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
  .liquid-toggle {
    --width: 66;
    --height: 28;
    --border: 2px;
  }
}

.liquid-toggle * {
  pointer-events: none;
}

.liquid-toggle:focus-visible {
  outline: 4px solid color-mix(in oklch, var(--checked), #0000);
}

.liquid-toggle:active {
  outline: none;
}

.liquid-toggle[data-active='true']:focus-visible {
  outline: 4px solid #0000;
}

.liquid-toggle .indicator {
  border-radius: 100px;
  pointer-events: none;
  height: 100%;
  width: 100%;
  background: var(--checked);
  position: absolute;
  top: 50%;
  scale: 1;
  left: 50%;
  translate: -50% -50%;
}

.liquid-toggle .knockout {
  height: calc(var(--height) * 1px);
  width: calc(var(--width) * 1px);
  border-radius: 100px;
  filter: url(#remove-black);
  position: absolute;
  inset: 0;
  will-change: filter, scale;
  transform: translate3d(0, 0, 0);
}

.liquid-toggle .indicator--masked {
  background: var(--checked);
  z-index: 12;
  height: 100%;
  width: 100%;
  translate: -50% -50%;
  container-type: inline-size;
}

.liquid-toggle .indicator--masked .mask {
  position: absolute;
  height: calc(100% - (2 * var(--border)));
  width: calc(60% - (2 * var(--border)));
  top: 50%;
  background: #000;
  left: var(--border);
  border-radius: 100px;
}

.liquid-toggle .liquids {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 0, 0);
  border-radius: 100px;
  overflow: hidden;
  filter: url(#goo);
}

.liquid-toggle .liquids .liquid__shadow {
  position: absolute;
  inset: 0;
  box-shadow: inset 0px 0px 3px 4px var(--checked),
    inset calc(((var(--complete, 0) / 100) * 8px) + -4px) 0px 3px 4px
      var(--checked);
  border-radius: 100px;
}

.liquid-toggle .liquids .liquid__track {
  content: '';
  height: calc((var(--height) * 1px) - (0 * var(--border)));
  width: calc((var(--width) * 1px) - (0 * var(--border)));
  background: var(--checked);
  border-radius: 100px;
  position: absolute;
  top: 50%;
}

.liquid-toggle .indicator__liquid {
  position: absolute;
  height: calc(100% - (2 * var(--border)));
  width: calc(60% - (2 * var(--border)));
  container-type: inline-size;
  top: 50%;
  background: #0000;
  left: var(--border);
  border-radius: 100px;
}

.liquid-toggle .indicator__liquid .shadow {
  opacity: 0;
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  box-shadow: 1px -1px 2px hsl(0 0% 100% / 0.5) inset,
    0px -1px 2px hsl(0 0% 100% / 0.5) inset,
    -1px -1px 2px hsl(0 0% 100% / 0.5) inset,
    1px 1px 2px hsl(0 0% 30% / 0.5) inset,
    -8px 4px 10px -6px hsl(0 0% 30% / 0.25) inset,
    -1px 1px 6px hsl(0 0% 30% / 0.25) inset,
    -1px -1px 8px hsl(0 0% 60% / 0.15), 1px 1px 2px hsl(0 0% 30% / 0.15),
    2px 2px 6px hsl(0 0% 30% / 0.15),
    -2px -1px 2px hsl(0 0% 100% / 0.25) inset,
    3px 6px 16px -6px hsl(0 0% 30% / 0.5);
  z-index: 20;
}

.liquid-toggle .indicator__liquid .cover {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  border-radius: 100px;
}

.mode-label {
  letter-spacing: -0.01em;
  outline: none;
}
.mode-label:hover {
  opacity: 0.85;
}

/* ============================================================
   Dual-Mode View Switch Container & Overlap Elimination
   ============================================================ */
#views-switch-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 380px;
}

/* The ID makes these beat Tailwind's .flex (linked later) without !important.
   display:none alone hides the view; the old opacity:1 !important blocked the fade. */
#file-audit-view.is-inactive,
#text-procurement-view.is-inactive {
  display: none;
}

#file-audit-view.is-active,
#text-procurement-view.is-active {
  animation: fadeInView 0.25s ease-out forwards;
}

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

/* ============================================================
   Scroll Containment & Gesture Isolation for Sidebar & Chat Panel
   ============================================================ */
#sidebar,
#sidebar-scrollable,
#chat-panel,
#chat-messages {
  overscroll-behavior: contain;
}

#sidebar,
#chat-panel {
  isolation: isolate;
  touch-action: pan-y pinch-zoom; /* keep scroll isolation, allow zoom */
}



