* {
    font-family: "Montserrat", sans-serif;
}
/* Voice mode controls */
:root {
    --vh: 100%;
  }
  
  /* Report Progress Waiting State Animations */
  #reportWaitingState .spinner-border {
    animation: spinner-border 0.75s linear infinite;
  }
  
  @keyframes spinner-border {
    to { transform: rotate(360deg); }
  }
  
  #waitingStatusBadge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
  }
  
  #waitingStatusBadge.bg-info {
    background-color: #0dcaf0 !important;
  }
  
  #waitingStatusBadge.bg-warning {
    background-color: #ffc107 !important;
  }
  
  .fade-out {
    animation: fadeOut 0.3s ease-out forwards;
  }
  
  .fade-in {
    animation: fadeIn 0.3s ease-in forwards;
  }
  
  @keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  /* Alert close button styling with Font Awesome */
  .alert .btn-close {
    background: transparent;
    border: none;
    padding: 0;
    opacity: 0.5;
    font-size: 14px;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.2s;
  }
  
  .alert .btn-close:hover {
    opacity: 1;
  }
  
  .alert .btn-close i {
    display: block;
  }
  
  .alert-danger .btn-close {
    color: #721c24;
  }
  
  .alert-success .btn-close {
    color: #155724;
  }
  
  .alert-warning .btn-close {
    color: #856404;
  }
  
  .voice-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
  }
  .voice-button, #muteButton, #unmuteButton, #stopVoiceModeButton {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
  }
  .voice-button img {
    width: 18px;
    height: 18px;
    filter: brightness(0);
  }
  #muteButton, #unmuteButton, #stopVoiceModeButton {
    font-size: 18px;
    color: #333;
  }
  .voice-button:hover, #muteButton:hover, #unmuteButton:hover, #stopVoiceModeButton:hover {
    background: #e0e0e0;
  }
  .stop-button {
    background: #ffeaea;
    color: #d9534f;
    border-color: #d9534f;
  }
  .stop-button:hover {
    background: #ffd6d6;
  }
  html {
    font-size: 14px;
    max-height: 100vh;
    overflow: auto;
  }
  
  @media (min-width: 768px) {
    html {
      font-size: 16px;
    }
  }
  
  .btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
  }
  
  textarea {
    resize: none;
    padding: .375rem 0 !important;
  }
  
  html {
    position: relative;
    min-height: 100%;
  }
  
  /* Commented out background image
  body {
    background: url(../image/nicola-wealth-bg.jpg);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
  }
  */
  
  .form-floating > .form-control-plaintext::placeholder,
  .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
  }
  
  .form-floating > .form-control-plaintext:focus::placeholder,
  .form-floating > .form-control:focus::placeholder {
    text-align: start;
  }
  
  /* OPTIONAL: Style for New Chat button */
  .btn-new-chat {
    font-size: 1rem;
    padding: 6px 16px;
  }
  
  a {
    color: #000000 !important;
    word-break: break-word;
  }
  
  button, .btn-success, .btn-outline-primary {
    background: #000000 !important;
    border: none !important;
    color: #fff !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 30px;
  }
  
  a.navbar-center-brand {
    color: #000 !important;
  }
  
  .list-group {
    overflow: auto;
    padding-bottom: 15px;
    position: absolute;
    left: 0;
    right: 0;
    top: 109px;
    bottom: 50px;
  }
  
  .list-group-item a {
    color: #000 !important;
    font-size: 14px;
  }
  
  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  header nav {
    width: 100%;
    height: 60px;
  }
  
  main {
    position: relative;
  }
  
  .chat-section .right-panel:before {
    content: "";
    /* background: rgb(255 255 255 / 44%);
    backdrop-filter: blur(7px); */
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 99;
    background: #fff;
    border-top: 4px solid #0082ca;
  }
  
  .chat-section {
    display: flex;
  }
  
  .chat-section .left-panel {
    background: #f9f9f9;
    width: 320px;
    overflow: auto;
    border-right: 1px solid #dcdcdc;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 99;
  }
  
  .chat-section .left-panel .list-group-item:first-child, .list-group-item+.list-group-item {
    border-radius: 0;
  }
  
  .chat-section .left-panel .list-group-item {
    padding: 6px 16px;
    background: transparent;
    border: 0;
  }
  
  .chat-section .left-panel .list-group-item:last-child {
    border-bottom: 0;
  }
  
  .chat-section .right-panel {
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: auto;
    position: fixed;
    left: 320px;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 9;
  }
  
  .chat-width {
    max-width: 1020px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    z-index: 99;
  }
  
  /* =============================================
     Sticky Chat Form - Keep chat input visible
     Uses existing absolute positioning system
     ============================================= */
  
  /* Chat form stays at bottom - already handled by existing CSS below */
  
  .spinner-border, .spinner-grow {
    min-width: 1rem;
    min-height: 1rem;
  }
  
  footer {
    background: #000000;
    color: #fff !important;
    padding: 10px;
    line-height: normal !important;
    position: relative !important;
  }
  
  .list-group-item a:hover {
    text-decoration: underline !important;
  }
  
  .input-group>.form-control, .input-group>.form-floating, .input-group>.form-select {
    box-shadow: none !important;
  }
  
  .input-group>.form-control:focus, .input-group>.form-floating:focus, .input-group>.form-select:focus {
    border: 1px solid #7e7e7e;
  }
  
  .input-group {
    padding: 14px 20px;
    border-radius: 20px;
    gap: 7px;
    background: #fff;
    flex-wrap: nowrap;
    align-items: center;
    border: 1px solid #dfdfdf;
  }
  
  .input-group .btn {
    border-radius: 40px !important;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0082ca !important;
  }
  
  h2.mb-0 {
    font-size: 24px;
    line-height: 30px;
    font-weight: 600;
  }
  
  .form-control {
    padding: 10px 15px;
    border: 0 !important;
    padding: 0;
  }
  
  .sender {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex-direction: column;
  }
  
  .sender span, .receiver span {
    padding: 12px 15px;
    border: 1px solid #dfdfdf;
    border-radius: 15px;
    background: #fff;
    display: block;
    max-width: 75%;
    word-break: break-word;
  }
  
  .sender span p:last-child , .receiver span p:last-child {
    margin-bottom: 0;
  }
  
  .sender, .receiver {
    margin-bottom: 12px;
  }
  
  .receiver span {
    background: #f9f9f9;
    border: 1px solid #dfdfdf;
  }
  
  .bg-dark {
    background: #002e6d !important;
  }
  
  .text-center.text-muted {
    height: 100%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      padding-bottom: 20px;
      font-size: 28px;
      font-weight: 300;
      color: #000 !important;
      line-height: 36px;
      flex-direction: column;
  }
  
  #chat-history {
    /* max-height: calc(var(--vh) * 100 - 235px); */
    overflow-y: auto;
    height: auto;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 70px;
    top: 62px;
    z-index: 9;
  }
  
  #chat-history > div:last-child {
    margin-bottom: 0;
  }
  
  #prompt-suggestions{
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
  }
  
  #prompt-suggestions h6 {
    margin-bottom: 10px;
  }
  
  #prompt-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .prompt-button {
    border-radius: 30px;
    font-size: 13px;
    padding: 6px 18px;
    color: #000 !important;
    background: #eaecf1 !important;
  }
  
  .prompt-button:hover {
    background: #dadce4 !important;
  }
  
  #show-more-prompts {
    background: #000 !important;
    color: #fff !important;
    margin-top: 10px;
  }
  
  nav {
    box-shadow: 0 0 40px #00000029;
  }
  
  #plus {
    display: none;
  }
  
  #minus {
    display: none;
  }
  
  nav .btn {
    font-size: 14px;
    border-radius: 30px;
  }
  
  .nav-link {
    margin-right: 10px;
    color: #000 !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
  }
  
  .navbar-center-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    white-space: nowrap;
  }
  
  .navbar-toggler-bar {
    display: block;
    width: 14px;
    height: 2px;
    background-color: #fff;
    margin: 4px 0;
  }
  
  .agent-title {
    color: #fff !important;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
  }
  
  .agent-menu {
    display: none;
  }

  .agent-menu span i {
    color: #fff;
  }
  
  #upload-icon {
    font-size: 20px;
    cursor: pointer;
    display: inline-block;
    display: flex;
    align-items: center;
    padding: 0 5px;
  }
  
  img {
    width: 100%;
  }
  
  #file-name {
    line-height: normal;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
  }
  
  .voice-control-icons {
    position: relative;
    z-index: 99 !important;
  }
  
  #file-name.voice-control-icons{
    max-width: 160px;
  }
  
  .button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 9;
    transition: all 0.4s ease;
  }
  
    .button-container.voice-control {
      background: #ffffff;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      position: absolute;
      border-radius: 20px !important;
      transition: all 0.4s ease;
    }
  
    .wave-button img {
      filter: brightness(0);
      height: 36px;
    }
  
    .button-container button {
        background-color: #d7d7d7;
        border: none;
        color: #152e42;
        padding: 2px 5px;
        border-radius: 20px;
        cursor: pointer;
        font-size: 18px;
        height: 36px;
        width: 36px;
    }
  
        .button-container button:disabled {
            background-color: #b9b9b9;
            cursor: not-allowed;
        }
  
      button#startVoiceModeButton {
        background: transparent !important;
        width: auto;
        height: auto;
      }
  
  #loadingButton {
    position: relative;
    z-index: 999;
  }
  
  #chat-form {
    position: relative;
  }
  
  .chat-alert {
    position: absolute;
    left: 0;
    right: 0;
    top: -35px;
    margin-bottom: 0;
    background: #b93847;
    border: 0;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    padding: 5px 14px;
  }
  
  
  .user-details {
    padding: 10px 15px;
    border-top: 1px solid #e1e2e3;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
  }
  
  .user-details .logged-in-user {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
  .user-details .logged-in-user .icon p {
    margin-bottom: 0;
  }
  
  .user-details .logged-in-user .icon img {
    height: 40px;
    width: 40px;
    border-radius: 40px;
    object-fit: cover;
  }
  
  .user-details .logged-in-user .content h4 {
    font-size: 15px;
      margin-bottom: 0;
      font-weight: 600;
  }
  
  .sidebar-title {
    padding: 15px;
    background: #002e6d;
    border-top: 4px solid #0082cb;
  }
  
  .user-details .logout .btn-logout {
    font-size: 14px;
      padding: 4px 10px;
      border-radius: 30px;
      background: #d6d6d6 !important;
      color: #000 !important;
  }
  
  .tab-switches {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .radio-btn-group {
    display: inline-flex;
    gap: 0px;
    align-items: center;
    background: #ececec;
    padding: 3px;
    border-radius: 50px;
  }
  
  .radio-btn-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .radio-btn-group label {
    user-select: none;
    padding: 8px 14px;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
  }
  
  .radio-btn-group input[type="radio"]:checked + label {
    background: #002e6d;
    color: white;
  }
  
  .radio-btn-group input[type="radio"]:focus + label,
  .radio-btn-group label:focus {
    outline: none;
  }
  
  .message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .message-attachments .attachment-item img {
    height: 100px;
    width: 100px;
    border: 1px solid #dee2e6 !important;
    object-fit: cover;
    background: #fff;
  }
  
  #image-preview-container {
    z-index: 99;
    position: relative;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow: auto;
  }
  
  @media screen and (max-width: 1199px) {
    .agent-title {
      font-size: 16px;
      text-align: right;
      order: 2;
    }
  }
  
  @media screen and (max-width: 991px) {
    .chat-section .left-panel {
      width: 280px;
    }
    .chat-section .right-panel {
      left: 280px;
    }
    .button-container.voice-control {
      justify-content: flex-start;
      padding-left: 20px;
    }
    #file-name.voice-control-icons {
      max-width: 160px;
      position: absolute;
      top: -15px;
      right: 0;
      border-radius: 20px;
      color: #fff;
      max-width: 320px;
      text-align: center;
      align-items: center;
      justify-content: center;
      font-size: 12px;
    }
    #file-name.voice-control-icons.selected {
      background: #000000;
      padding: 5px 10px;
    }
    #file-name.voice-control-icons:before {
      content: "";
      height: 12px;
      width: 12px;
      position: absolute;
      bottom: -12px;
      right: 66px;
      border-left: 6px solid transparent;
      border-right: 6px solid transparent;
    }
    #file-name.voice-control-icons.selected:before{
      border-top: 6px solid #000000;
    }
    .navbar-brand img {
      height: 24px;
      object-fit: cover;
      object-position: left;
    }
  }
  
  @media (max-width: 767px) {
    #plus {
      display: block;
    }
    nav img {
      height: 40px;
    }
    h2.mb-0 {
      font-size: 17px;
      line-height: 23px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .navbar-translate {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
  
    .navbar-collapse {
      position: absolute;
      left: 0;
      top: 60px;
      background: #f1f1f1;
      width: 100%;
      padding: 20px;
      text-align: center;
      z-index: 9;
    }
  
    #btnNavbarToggler {
      display: block;
    }
    .collapse:not(.show) {
      display: none !important;
    }
    .navbar-expand-sm .navbar-nav {
      flex-direction: column;
      width: 100%;
    }
    .chat-section .right-panel:before {
        border-top: 0;
      }
      .navbar-brand img {
        height: 22px;
        width: 25px;
      }
      .agent-title {
        font-size: 14px;
    }
    .chat-section .left-panel {
      width: 230px;
    }
    .chat-section .right-panel {
      left: 230px;
    }
  }
  
  @media screen and (max-width: 575px) {
    .chat-section {
      flex-wrap: wrap;
    }
    .chat-section .left-panel, .chat-section .right-panel {
      width: 100%;
      height: auto;
      position: fixed;
      padding: 10px 20px;
      left: 0;
      right: 0;
      top: 58px;
      bottom: 0;
      z-index: 9;
    }
    .chat-section .left-panel {
      z-index: 99;
    }
    .input-group {
      padding: 4px 10px;
    }
    a.navbar-center-brand {
      max-width: 120px;
      white-space: break-spaces;
      text-align: center;
      font-size: 15px;
    }
    .agent-menu {
      display: block;
      position: relative;
      z-index: 99;
      order: 3;
    }
    .chat-history {
      width: 280px;
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      overflow: auto;
      z-index: 9;
      background: #fafafa;
      padding-top: 55px;
      box-shadow: 0 0 30px #0000005e;
      opacity: 0;
      transform: translateX(400px);
      transition: transform 0.35s ease, opacity 0.35s ease;
    }
    .chat-history.show {
      opacity: 1;
      transform: translateX(0);
      right: 0;
      left: initial;
    }
    .agent-menu.show {
      background: #0082ca;
      border-radius: 20px;
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .list-group {
      top: 94px;
    }
    .navbar-brand {
      order: 1;
    }
    .user-details {
      height: 50px;
    }
    .list-group {
      padding-bottom: 0;
    }
    .navbar-brand img {
      height: 22px;
      width: auto;
      object-fit: cover;
      object-position: left;
    }
    .chat-section .left-panel {
      padding: 0;
      position: initial;
      box-shadow: none;
    }
    .text-center.text-muted {
      padding-bottom: 10px;
      font-size: 24px;
      line-height: 28px;
    }
    .sender span, .receiver span {
      max-width: 85%;
    }
    .button-container {
      gap: 10px;
    }
    .radio-btn-group label {
      padding: 4px 8px;
      font-size: 14px;
    }
    .radio-btn-group {
      padding: 2px;
    }
    h2.mb-0 {
      font-size: 15px;
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #chat-history {
      bottom: 44px;
      top: 51px;
    }
  }
  
  @media (min-width: 576px) {
    .navbar-expand-sm .navbar-collapse {
        flex-basis: initial !important;
        flex-grow: initial !important;
    }
  }
  
  .run-status-bubble {
    background: #f3f6fb;
    border: 1px solid #e6eefb;
    padding: 8px 10px;
    border-radius: 8px;
    margin: 8px 0;
    font-size: 13px;
    color: #222;
    max-width: 78%;
  }
  
  .run-status-bubble.error-bubble {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
  }
  
  .run-status-bubble.error-bubble .run-status-title {
    color: #dc2626;
  }
  
  .run-status-bubble .run-status-title {
    font-weight: 600;
    display:block;
  }
  
  .run-status-bubble .run-status-detail {
    color:#444;
    font-size:12px;
    margin-top:6px;
    white-space:pre-wrap;
  }
  
  .run-status-bubble.run-status-done {
    opacity: 0.5;
    transition: opacity 0.5s ease-out;
    transform: scale(0.98);
  }
  .run-status-bubble.run-status-final {
    border-style: dashed;
  }
  .rs-source { color:#6b6b6b; font-weight:400; font-size:11px; margin-left:6px; }
  
  /* Thread Management Styles */
  .thread-item-wrapper {
    position: relative;
    width: 100%;
  }
  
  .thread-menu-wrapper {
    position: relative;
    margin-left: 8px;
  }
  
  .thread-menu-btn {
    opacity: 0;
    transition: opacity 0.2s;
    color: inherit;
    padding: 1px 10px !important;
    background: #dfdfdf !important;
    border-radius: 4px;
    color: #000 !important;
  }
  
  .thread-item:hover .thread-menu-btn,
  .thread-menu-btn:focus {
    opacity: 1;
  }
  
  .thread-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 135px;
    margin-top: 4px;
    padding: 5px 0;
  }
  
  .thread-menu-item {
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-size: 15px;
  }
  
  .thread-menu-item:hover {
    background: #f5f5f5;
  }
  
  .thread-menu-item:first-child {
    border-radius: 4px 4px 0 0;
  }
  
  .thread-menu-item:last-child {
    border-radius: 0 0 4px 4px;
  }
  
  .thread-menu-item i {
    width: 16px;
  }
  
  .thread-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .thread-title-text {
    transition: opacity 0.3s ease-in-out;
  }
  
  .thread-title-text.title-updating {
    opacity: 0.3;
  }
  
  /* Animated gradient for "Generating..." state */
  .thread-title-text.title-generating {
    opacity: 0.7;
    background: linear-gradient(90deg, #0d6efd 0%, #6610f2 50%, #0d6efd 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 2s ease-in-out infinite;
  }
  
  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  
  .thread-item.active {
    background-color: #e9e9e9 !important;
    border-left: 3px solid #0d6efd;
  }
  
  #reportProgressPanel {
    border: none;
    position: relative;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.14);
    border-radius: 20px;
    overflow: hidden;
  }
  
  #reportProgressPanel .card-header {
    background: #002e6d !important;
    color: #fff !important;
    border-radius: 0;
    padding: 15px 20px;
    border: none;
  }
  
  #reportProgressPanel .card-header h6 {
    color: #fff !important;
    font-weight: 600;
    font-size: 16px;
  }
  
  #reportProgressPanel .card-body {
    padding: 20px;
  }
  
  #reportProgressPanel #cancelReportBtn:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.05);
  }
  
  #reportProgressBar {
    background-color: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
  }
  
  #reportProgressPanel .progress-bar {
    background: linear-gradient(90deg, #002e6d 0%, #0d47a1 100%);
    font-weight: 600;
    font-size: 13px;
  }
  
  #reportProgressPanel .btn-primary {
    background: #000 !important;
    border: none !important;
    color: #fff !important;
    border-radius: 30px;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
  }
  
  #reportProgressPanel .btn-primary:hover {
    background: #1a1a1a !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  
  #reportProgressPanel .btn-outline-primary {
    border-color: #002e6d;
    color: #002e6d;
    border-radius: 30px;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
  }
  
  #reportProgressPanel .btn-outline-primary:hover {
    background: #002e6d !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(9, 39, 85, 0.3);
  }
  
  #reportProgressPanel .btn-outline-danger,
  #reportProgressPanel .btn-outline-info {
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  #reportProgressPanel .btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
  }
  
  #reportProgressPanel .btn-outline-danger:hover {
    background: #dc3545 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  }
  
  #reportProgressPanel .btn-outline-info {
    border-color: #0dcaf0;
    color: #0dcaf0;
  }
  
  #reportProgressPanel .btn-outline-info:hover {
    background: #0dcaf0 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.3);
  }
  
  #reportStatusText {
    color: #000;
    font-size: 15px;
  }
  
  #reportStatusDetail {
    color: #6c757d;
    font-size: 13px;
  }
  
  .progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
  }
  
  @keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
  }
  
  /* =============================================
     Chat Lock Styles
     Used when report generation is in progress
     ============================================= */
  
  /* Locked chat input styling */
  .chat-locked {
    opacity: 0.6;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
  }
  
  /* Lock banner at top of chat form */
  #chat-lock-banner {
    animation: slideDown 0.3s ease-out;
    border-left: 4px solid #0dcaf0;
    background-color: #cff4fc;
    color: #055160;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  #chat-history {
    z-index: 10;
    order: 1;
  }
  
  #topicReviewButtonContainer, #topicGuidancePanel {
    z-index: 99;
    top: 100px;
    position: absolute;
    left: 0;
    right: 0;
  }
  
  #topicReviewButtonContainer {
    gap: 10px;
  }
  
  #topicExtractionSpinner {
    z-index: 99;
  }
  
  .alert-dismissible .btn-close {
    top: 10px;
    right: 10px;
  }
  
  #topicConfirmationPanel, #reportProgressPanel {
    position: absolute !important;
    top: 100px;
    overflow: auto !important;
    left: 0;
    right: 0;
    z-index: 99;
    background: white !important;
    margin-bottom: 1rem !important;
  }
  
  #topicConfirmationPanel {
    bottom: 0px;
  }
  
  .btn-outline-secondary {
    background: #f5f5f5 !important;
    border: 1px solid #dee2e6 !important;
    color: #000 !important;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: 400;
    font-size: 14px;
    transition: all 0.3s ease;
  }
  
  @media screen and (max-width: 575px) {
    #topicReviewButtonContainer, #topicGuidancePanel, #topicConfirmationPanel, #reportProgressPanel {
      top: 74px;
    }
    #topicReviewButtonContainer {
      flex-direction: column;
    }
    .alert-dismissible {
      padding-right: 2rem;
    }
    .alert-heading {
      font-size: 16px;
    }
  }

/* =============================================
   Markdown Formatting in Chat Messages
   ============================================= */

.receiver span h1,
.receiver span h2,
.receiver span h3,
.receiver span h4,
.receiver span h5,
.receiver span h6 {
    margin-top: 0.5em;
    margin-bottom: 0.3em;
    font-weight: 600;
}

.receiver span h1 {
    font-size: 1.4em;
}

.receiver span h2 {
    font-size: 1.25em;
}

.receiver span h3 {
    font-size: 1.1em;
}

.receiver span h4,
.receiver span h5,
.receiver span h6 {
    font-size: 1em;
}

.receiver span p {
    margin-bottom: 0.5em;
}

.receiver span ul,
.receiver span ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.receiver span li {
    margin-bottom: 0.25em;
}

.receiver span code {
    background-color: #e9ecef;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.receiver span pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5em 0;
}

    .receiver span pre code {
        background-color: transparent;
        padding: 0;
        color: inherit;
    }

.receiver span blockquote {
    border-left: 3px solid #0082ca;
    padding-left: 12px;
    margin: 0.5em 0;
    color: #555;
}

.receiver span table {
    border-collapse: collapse;
    margin: 0.5em 0;
    width: 100%;
}

.receiver span th,
.receiver span td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: left;
}

.receiver span th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.receiver span a {
    color: #0082ca !important;
    text-decoration: underline;
}

.receiver span hr {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 1em 0;
}

.receiver span strong {
    font-weight: 600;
}

.receiver span em {
    font-style: italic;
}

/* =============================================
   Citation Styles
   ============================================= */

.citations-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.citations-header {
    font-size: 0.8em;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.citations-header i {
    font-size: 0.9em;
    color: #0082ca;
}

.citations-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.citation-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.85em;
    line-height: 1.4;
}

.citation-number {
    font-weight: 600;
    color: #0082ca;
    white-space: nowrap;
    min-width: 22px;
}

.citation-link {
    color: #0082ca !important;
    text-decoration: underline !important;
    word-break: break-all;
}

.citation-link:hover {
    color: #005a8c !important;
}

.citation-title {
    color: #333;
}