/* ===== agent_of_agents.css – layout exclusivo p/ página Agent of Agents ===== */
:root{
    --header-height:56px;
    --primary:#D1164A; --primary-dark:#B01340;
    --gray-50:#fafafa; --gray-100:#f1f5f9; --gray-200:#e2e8f0; --gray-300:#cbd5e1; --gray-700:#334155;
  }
  
  body.agent-of-agents-page{background:var(--gray-50);font-family:Inter,Arial,sans-serif;}
  .chat-container{margin-top:var(--header-height);height:calc(100vh - var(--header-height));max-width:960px;margin-inline:auto;display:flex;flex-direction:column;overflow:hidden;}
  
  /* ----- header ----- */
  .chat-header{background:#fff;display:flex;align-items:center;gap:16px;padding:12px 24px;border-bottom:1px solid #e4e4e7;position:sticky;top:0;z-index:20;}
  .avatar-container{width:48px;height:48px;border-radius:50%;overflow:hidden;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:#f5f5f5;}
  .meta-avatar{width:100%;height:100%;border-radius:50%;object-fit:cover;transition:transform 0.3s ease;display:block;}
  .chat-header:hover .meta-avatar{transform:scale(1.05);}
  .meta-agent-name{font-size:1.25rem;font-weight:600;margin:0;color:#1a1a1a;}
  .meta-agent-description{font-size:.9rem;color:#555;margin:2px 0 0;}
  
  /* ----- mode pills ----- */
  .mode-switcher{display:flex;gap:.5rem;overflow-x:auto;padding:12px 24px 6px;background:#fff;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
  .mode-switcher::-webkit-scrollbar{display:none;}
  .mode-btn{flex:0 0 auto;padding:6px 14px;font-size:.85rem;border:1px solid var(--gray-200);border-radius:999px;background:#fff;color:#0f172a;cursor:pointer;transition:.15s;user-select:none;}
  .mode-btn.active{background:var(--primary);border-color:var(--primary-dark);color:#fff;box-shadow:0 2px 5px rgba(209,22,74,0.2);}
  .mode-btn:hover:not(.active){background:var(--gray-100);}
  .mode-btn:active{transform:translateY(1px);}
  
  /* ----- quick chips & suggestions ----- */
  .prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 12px;
    background: #fff;
  }
  
  /* Updated quick-suggestions styling with proper dark mode support */
  .quick-suggestions {
    display: block;
    min-height: 100px;
    padding: 15px;
    background: #fff; 
    overflow: visible;
    margin-bottom: 8px;
    border-radius: 8px;
  }

  /* Suggestion items styling for both themes */
  .suggestion-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: #f9f9f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
  }

  .suggestion-item:hover {
    background-color: #f1f5f9;
  }
  
  /* Original chip and quick-suggest styling */
  .chip {
    padding: 6px 12px;
    font-size: .78rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    user-select: none;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
  }
  
  .chip:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  }
  
  .chip:active {
    transform: translateY(0);
  }
  
  /* ----- messages ----- */
  .chat-messages{flex:1;overflow-y:auto;padding:16px 24px;display:flex;flex-direction:column;gap:16px;scroll-behavior:smooth;}
  .message{display:flex;max-width:85%;animation:fadeIn .25s ease;}
  .user-message{margin-left:auto;transform-origin:right bottom;}
  .agent-message{margin-right:auto;transform-origin:left bottom;}
  .message-avatar{margin-right:8px;width:40px;height:40px;border-radius:50%;overflow:hidden;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:#f5f5f5;}
  .message-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;box-shadow:0 2px 4px rgba(0,0,0,0.1);}
  .message-content{background:#fff;border-radius:12px;padding:12px 16px;box-shadow:0 1px 3px rgba(0,0,0,0.08);transition:transform 0.2s ease;}
  .user-message .message-content{background:var(--primary);color:#fff;border-radius:12px 12px 0 12px;}
  .user-message .message-footer{color:rgba(255,255,255,0.8);}
  .message-content:hover{transform:translateY(-2px);box-shadow:0 3px 6px rgba(0,0,0,0.1);}
  .message-header{font-weight:600;font-size:.85rem;margin-bottom:4px;}
  .message-text{font-size:.9rem;line-height:1.45;}
  .message-footer{font-size:.75rem;color:#666;margin-top:6px;display:flex;align-items:center;justify-content:space-between;}
  
  /* ----- system messages ----- */
  .system-message {
    margin: 8px auto;
    padding: 8px 16px;
    background-color: rgba(255, 247, 237, 0.8);
    border-left: 3px solid #f97316;
    color: #9a3412;
    border-radius: 4px;
    font-size: 0.85rem;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    animation: fadeIn 0.3s ease;
  }
  
  /* ----- input card ----- */
  .chat-input-container{padding:16px 24px;border-top:1px solid #e4e4e7;background:#fff;}
  .input-card{background:#fff;border:1px solid var(--gray-200);border-radius:16px;box-shadow:0 2px 6px rgba(0,0,0,0.08);display:flex;flex-direction:column;gap:8px;padding:16px;transition:all 0.3s ease;}
  .input-card:focus-within{box-shadow:0 4px 12px rgba(0,0,0,0.12);border-color:var(--gray-300);}
  .input-group{display:flex;align-items:center;gap:12px;border:1px solid var(--gray-200);border-radius:12px;padding-inline:12px;transition:all 0.2s ease;margin-top:4px;}
  .input-group:focus-within{border-color:var(--primary);box-shadow:0 0 0 1px rgba(209,22,74,0.2);}
  #message-input{flex:1;border:none;padding:18px 0;font-size:1.05rem;outline:none;}
  .clip-btn,.send-btn{border:none;background:none;color:var(--primary);font-size:1.1rem;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:8px;transition:all 0.2s ease;border-radius:50%;}
  .clip-btn:hover{background:rgba(209,22,74,0.1);}
  .send-btn{background:var(--primary);color:#fff;width:44px;height:44px;border-radius:50%;box-shadow:0 2px 5px rgba(209,22,74,0.3);}
  .send-btn:hover{background:var(--primary-dark);transform:translateY(-2px);box-shadow:0 4px 8px rgba(209,22,74,0.4);}
  .send-btn:active{transform:translateY(0);}
  
  /* ----- animations & states ----- */
  @keyframes fadeIn{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}
  @keyframes typing{
    0%{background-position:0% 50%;}
    50%{background-position:100% 50%;}
    100%{background-position:0% 50%;}
  }
  
  .typing-indicator{
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 12px;
    background-color: #f0f0f0;
    margin: 5px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    max-width: 100%;
  }
  
  .typing-text {
    font-size: 14px;
    color: #444;
    margin-right: 8px;
    flex: 1;
  }
  
  .typing-dots {
    display: flex;
    align-items: center;
  }
  
  .typing-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #777;
    margin: 0 2px;
    animation: typing-dot 1.4s infinite;
  }
  
  .typing-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  .typing-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
  }
  
  @keyframes typing-dot {
    0% {
      transform: translateY(0);
      opacity: 0.5;
    }
    50% {
      transform: translateY(-4px);
      opacity: 1;
    }
    100% {
      transform: translateY(0);
      opacity: 0.5;
    }
  }
  
  /* Loading state for file uploads */
  .file-loading{opacity:0.7;pointer-events:none;}
  
  /* ----- fix for messages with images ----- */
  .message-text img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
  }
  
  /* ----- responsive styles ----- */
  @media(max-width:768px){
    .chat-container{max-width:100%;}
    .mode-switcher,.prompt-chips{padding-inline:16px;}
    .quick-suggestions{padding:12px 16px;}
    .chat-messages{padding:12px 16px;}
    .chat-input-container{padding:12px 16px;}
    .input-card{padding:12px;}
    .message{max-width:90%;}
    .message-avatar{width:36px;height:36px;}
  }
  
  @media(max-width:480px){
    .meta-avatar{width:40px;height:40px;}
    .meta-agent-name{font-size:1.1rem;}
    .meta-agent-description{font-size:0.8rem;}
    .message-avatar{width:32px;height:32px;}
    .message-content{padding:10px 12px;}
    .message-text{font-size:0.85rem;}
    #message-input{font-size:0.9rem;padding:12px 0;}
    .clip-btn,.send-btn{padding:6px;}
    .send-btn{width:40px;height:40px;}
    .message{max-width:95%;}
    .system-message{max-width:90%;}
  }
  
  /* ----- accessibility improvements ----- */
  :focus{outline:2px solid var(--primary);outline-offset:2px;}
  @media (prefers-reduced-motion: reduce) {
    *,*::before,*::after{
      animation-duration:0.01ms !important;
      animation-iteration-count:1 !important;
      transition-duration:0.01ms !important;
      scroll-behavior:auto !important;
    }
  }
  
  /* ----- dark mode support ----- */
  .dark-mode body.agent-of-agents-page {
    background: #1a1a1a;
    color: #e4e4e7;
  }
  
  .dark-mode .chat-header,
  .dark-mode .mode-switcher,
  .dark-mode .prompt-chips,
  .dark-mode .chat-input-container,
  .dark-mode .quick-suggestions {
    background: #222;
    border-color: #333;
  }
  
  .dark-mode .message-content,
  .dark-mode .input-card {
    background: #2a2a2a;
    border-color: #444;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  
  .dark-mode .input-group {
    background: #2a2a2a;
    border-color: #444;
  }
  
  .dark-mode .meta-agent-name {
    color: #e4e4e7;
  }
  
  .dark-mode .meta-agent-description {
    color: #a1a1aa;
  }
  
  .dark-mode .message-text {
    color: #e4e4e7;
  }
  
  .dark-mode .message-footer {
    color: #a1a1aa;
  }
  
  .dark-mode #message-input {
    color: #e4e4e7;
    background: transparent;
  }
  
  .dark-mode .mode-btn {
    background: #333;
    border-color: #444;
    color: #e4e4e7;
  }
  
  .dark-mode .mode-btn:hover:not(.active) {
    background: #444;
  }
  
  .dark-mode .chip {
    background: #333;
    border-color: #444;
    color: #e4e4e7;
  }
  
  .dark-mode .chip:hover {
    background: #444;
  }
  
  .dark-mode .message-avatar {
    background: #333;
  }
  
  .dark-mode .system-message {
    background-color: rgba(49, 46, 43, 0.8);
    border-left-color: #c2410c;
    color: #fdba74;
  }
  
  /* Enhanced suggestion styles with dark mode support */
  .dark-mode .suggestions-container {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .dark-mode .suggestions-header {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .dark-mode .suggestions-title {
    color: rgba(255, 255, 255, 0.9);
  }
  
  .dark-mode .toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
  }
  
  .dark-mode .toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
  }
  
  .dark-mode .suggestion-item {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e4e4e7;
  }
  
  .dark-mode .suggestion-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .dark-mode .show-more-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
  }
  
  .dark-mode .show-more-btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  
  /* Light mode suggestion styles - to match the dynamic styles added in JS */
  .suggestions-container {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }
  
  .suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
  }
  
  .suggestions-title {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
  }
  
  .toggle-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
  }
  
  .toggle-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
  }
  
  .suggestions-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
  }
  
  .suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .show-more-container {
    text-align: center;
    margin-top: 15px;
  }
  
  .show-more-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
  }
  
  .show-more-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
  }
  
  /* Status indicator styles */
  #status-typing-indicator {
    opacity: 0.9;
    animation: status-pulse 2s infinite;
  }
  
  @keyframes status-pulse {
    0% {
      opacity: 0.8;
    }
    50% {
      opacity: 1;
    }
    100% {
      opacity: 0.8;
    }
  }
  
  /* Adding a status label for different states */
  .status-label {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 8px;
    background-color: #eee;
    color: #666;
  }
  
  .status-label.thinking {
    background-color: #e9f5ff;
    color: #0066cc;
  }
  
  .status-label.processing {
    background-color: #fff4e5;
    color: #ff8c00;
  }
  
  .status-label.loading {
    background-color: #f0f8ff;
    color: #0099ff;
  }
  
  .status-label.complete {
    background-color: #e8f5e9;
    color: #2e7d32;
  }
  
  .status-label.error {
    background-color: #ffebee;
    color: #c62828;
  }
  
  .dark-mode .status-label {
    background-color: #333;
    color: #ddd;
  }
  
  .dark-mode .status-label.thinking {
    background-color: #003366;
    color: #8ac6ff;
  }
  
  .dark-mode .status-label.processing {
    background-color: #4d2e00;
    color: #ffcc80;
  }
  
  .dark-mode .status-label.loading {
    background-color: #002b4d;
    color: #80ccff;
  }
  
  .dark-mode .status-label.complete {
    background-color: #1b4d20;
    color: #a5d6a7;
  }
  
  .dark-mode .status-label.error {
    background-color: #4b0f1a;
    color: #ef9a9a;
  }
  
  /* ===== Message Bubble Styling for Agent of Agents ===== */
  /* Keep the original magenta for UI elements */
  /* Only override the user message bubbles */
  .user-message .message-content {
    background: #f6f6f6 !important;
    color: #222 !important;
    border-radius: 12px !important;
    border-bottom-right-radius: 4px !important;
  }

  /* Fix for user message footer (timestamp) */
  .user-message .message-footer {
    color: #666 !important;
  }

  /* Dark mode override for user bubbles only */
  .dark-mode .user-message .message-content {
    background: #333333 !important;
    color: #fff !important;
  }

  .dark-mode .user-message .message-footer {
    color: #bbb !important;
  }

  /* Hide suggestions area until explicitly shown */
  #quick-suggestions {
    display: none;
  }

  /* Fix the empty bubble issue in the screenshot */
  .message-text {
    min-height: 24px;
    word-break: break-word;
    line-height: 1.4;
  }

  /* Media styling */
  .message-media-container {
    margin-bottom: 12px;
  }

  .message-image {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
  }

  video, audio {
    width: 100%;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.05);
  }

  /* Better message styling with improved contrast */
  .message-content {
    max-width: 90%;
    position: relative;
  }

  /* Agent message bubbles */
  .agent-message .message-text {
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 12px 16px;
    color: #222 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top-left-radius: 4px; /* Subtle shape difference */
  }

  /* User message bubbles - similar but with subtle differences */
  .user-message .message-text {
    background-color: #f6f6f6; /* Slightly lighter */
    border-radius: 12px;
    padding: 12px 16px;
    color: #222 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.07); /* Slightly darker border */
    font-weight: 400;
    border-bottom-right-radius: 4px; /* Subtle shape difference */
  }

  /* Fix meta agent welcome message styling */
  .agent-message .message-text:empty:after {
    content: "...";
    color: #777;
  }

  /* Message footer styling */
  .message-footer {
    margin-top: 4px;
    padding: 2px 8px;
  }

  /* Timestamp styling */
  .message-time {
    font-size: 12px;
    opacity: 0.8;
  }

  .agent-message .message-time {
    color: #666 !important;
  }

  /* User message footer and timestamp */
  .user-message .message-footer {
    text-align: right;
  }

  .user-message .message-time {
    color: #666 !important;
  }

  /* Empty message fix - ensure minimum height */
  .message-text:empty {
    min-height: 24px;
  }

  /* Dark mode adjustments with subtle differentiation */
  body.dark-mode .agent-message .message-text {
    background-color: #2a2a2a;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top-left-radius: 4px;
  }

  body.dark-mode .user-message .message-text {
    background-color: #333333; /* Slightly lighter than agent in dark mode */
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom-right-radius: 4px;
  }

  body.dark-mode .agent-message .message-time {
    color: #bbb !important;
  }

  body.dark-mode .user-message .message-time {
    color: #bbb !important;
  }

  /* Additional spacing and alignment */
  .message {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    animation: messageFadeIn 0.3s ease-out;
    background: none !important; /* Ensure no background on message wrapper */
  }

  .user-message {
    justify-content: flex-end;
    background: none !important; /* Remove magenta background from user message container */
  }

  .agent-message {
    justify-content: flex-start;
  }

  .message-header {
    margin-bottom: 4px;
    font-weight: 600;
    color: #333;
  }

  body.dark-mode .message-header {
    color: #eee;
  }

  /* Fix for empty message containers */
  .message-container:empty {
    display: none;
  }

  /* Improve contrast for message bubbles */
  .agent-message .message-content {
    background: transparent;
  }

  /* Override any conflicting styles */
  .message * {
    font-family: inherit !important;
  }

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

  /* Outer container of messages - remove any background colors */
  .message-container, 
  .user-message.message-container,
  .message.user-message,
  .user-message .message-content {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
  }

  /* Update message containers to ensure no background */
  main#messages-container .message {
    background: none !important;
    background-color: transparent !important;
  }

  /* Target the specific magenta background in any parent of user messages */
  .user-message,
  div.user-message,
  .message.user-message,
  .user-message.message-container,
  main#messages-container .user-message {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
  }

  /* Additional style to fix any remaining magenta backgrounds */
  .chat-messages .message {
    background: transparent !important;
  }

  /* Target parent container of user messages directly */
  .chat-messages > .user-message {
    background: transparent !important;
  }

  /* Override any container background */
  .chat-messages > div {
    background-color: transparent !important;
  }

  /* Additional fix specifically for the message shown in screenshot */
  main#messages-container div.user-message,
  .chat-container div.user-message {
    background-color: transparent !important;
    border: none !important;
    background: none !important;
  }

  /* Override direct inline styles if present */
  [style*="background"] {
    background: transparent !important;
  }

  /* Fix for potentially conflicting styles on the message border */
  .message, .message * {
    border-color: rgba(0, 0, 0, 0.08) !important;
  }

  /* Ensure consistent padding and background for outer message container */
  .chat-container .message {
    padding: 0 !important;
    background: transparent !important;
  }

  /* Override any magenta container backgrounds */
  .chat-container [style*="background-color: #e30b5c"],
  .chat-container [style*="background-color: #d1164c"],
  .chat-container [style*="background-color: rgb(225, 22, 92)"] {
    background-color: transparent !important;
  }

  /* Final overrides to ensure no magenta */
  [style*="background-color: #e30b5c"] { background-color: transparent !important; }
  [style*="background-color: #d1164c"] { background-color: transparent !important; }
  [style*="background-color: rgb(225, 22, 92)"] { background-color: transparent !important; }

  /* Target the specific message wrapper shown in the screenshot */
  .chat-container div[style*="background"] { background: transparent !important; }

  /* Override the user message div that has magenta background */
  main > div { background-color: transparent !important; }

  /* Status indicator styles */
  #status-typing-indicator {
    opacity: 0.9;
    animation: status-pulse 2s infinite;
    position: relative;
    z-index: 100;
    border-left: 4px solid #f9a825; /* Yellow indicator bar */
  }

  #status-typing-indicator.thinking {
    border-left-color: #2196f3; /* Blue for thinking */
  }

  #status-typing-indicator.processing {
    border-left-color: #ff9800; /* Orange for processing */
  }

  #status-typing-indicator.loading {
    border-left-color: #03a9f4; /* Light blue for loading */
  }

  #status-typing-indicator.complete {
    border-left-color: #4caf50; /* Green for complete */
  }

  #status-typing-indicator.error {
    border-left-color: #f44336; /* Red for error */
  }

  /* New status display styles */
  .status-display {
    display: flex;
    align-items: flex-start;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 5px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .dark-mode .status-display {
    background-color: rgba(255, 255, 255, 0.05);
  }

  /* Novos estilos modernos para o status indicator */
  /* container geral */
  .status-message {
    background: transparent;         /* deixa a bolha invisível */
    padding: 0;                      /* remove offsets extras */
    border: none;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: 0.9rem;
  }

  /* linha de status */
  .status-message .status-icon {
    margin-right: .5rem;
    font-weight: 700;
  }

  /* cores por tipo — troque por var(--color-xxx) se usar theme */
  .status-message.complete   .status-icon { color: #28a745; } /* verde */
  .status-message.error      .status-icon { color: #dc3545; } /* vermelho */
  .status-message.processing .status-icon { color: #ffc107; } /* amarelo */
  .status-message.thinking   .status-icon { color: #2196f3; } /* azul */
  .status-message.loading    .status-icon { color: #03a9f4; } /* azul claro */

  /* Estilos ultra-minimalistas para status */
  #status-typing-indicator {
    margin: 5px 0;
  }

  #status-typing-indicator .message-content {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  #status-typing-indicator .message-text {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  /* Cores sutis para diferentes estados */
  #status-typing-indicator.complete .message-text {
    color: #28a745;
  }

  #status-typing-indicator.error .message-text {
    color: #dc3545;
  }

  #status-typing-indicator.processing .message-text {
    color: #666;
  }

  /* Modo escuro */
  .dark-mode #status-typing-indicator .message-text {
    color: #ccc;
  }

  .dark-mode #status-typing-indicator.complete .message-text {
    color: #4caf50;
  }

  .dark-mode #status-typing-indicator.error .message-text {
    color: #f44336;
  }
  
  /* === Discrete toast above input field, compact, with theme support === */
  .chat-container {
    position: relative;
  }

  .chat-container .toast {
    position: absolute !important;
    left: 50% !important;
    bottom: 5.5rem !important;
    transform: translateX(-50%) !important;
    z-index: 50 !important;
    min-width: 160px;
    max-width: 90%;
    padding: 0.35rem 1rem !important;
    font-size: 0.93rem !important;
    border-radius: 24px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07) !important;
    border: 1px solid #e3e6ea !important;
    background: #f8f9fa !important;
    color: #222 !important;
    opacity: 0.98 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    pointer-events: none;
  }

  .chat-container .toast .spinner {
    width: 14px;
    height: 14px;
  }

  .chat-container .toast.complete   { color: #28a745 !important; border-color: #c6f6d5 !important; }
  .chat-container .toast.error      { color: #dc3545 !important; border-color: #f8d7da !important; }
  .chat-container .toast.processing { color: #ff9800 !important; border-color: #ffe0b2 !important; }
  .chat-container .toast.loading    { color: #2196f3 !important; border-color: #bbdefb !important; }

  body.dark-mode .chat-container .toast {
    background: #23272f !important;
    color: #eee !important;
    border: 1px solid #444 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
  }
  body.dark-mode .chat-container .toast.complete   { color: #90ee90 !important; border-color: #2e7d32 !important; }
  body.dark-mode .chat-container .toast.error      { color: #ffb3b3 !important; border-color: #c62828 !important; }
  body.dark-mode .chat-container .toast.processing { color: #ffd280 !important; border-color: #ff9800 !important; }
  body.dark-mode .chat-container .toast.loading    { color: #80ccff !important; border-color: #1976d2 !important; }
  
  /* === Status Bubble Inline (rollback para versão estável) === */
  .status-bubble {
    margin-left: 48px;
    margin-bottom: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 120px;
    max-width: 80%;
    background: var(--bubble-bg, #fffdf5);
    border: 1px solid #ffe9bf;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    display: inline-block;
    animation: statusFadeIn 0.4s cubic-bezier(.4,0,.2,1);
  }

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

  .status-bubble .message-text {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: #a06500;
  }

  .status-bubble.processing { --bubble-bg: #fffdf5; }
  .status-bubble.error      { --bubble-bg: #fff2f2; color: #b3261e; }
  .status-bubble.complete   { --bubble-bg: #f2fff5; color: #1e7b34; }

  .spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
  }
  .track {
    stroke: #e0f7e9; /* verde claro */
    stroke-width: 3;
    fill: none;
  }
  .indicator {
    stroke: #28a745; /* verde forte */
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 56;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* Animated dots for loading/processing */
  .status-bubble .dots {
    display: inline-block;
    width: 24px;
    text-align: left;
  }
  .status-bubble .dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 1px;
    background: #a06500;
    border-radius: 50%;
    opacity: 0.5;
    animation: dotPulse 1.2s infinite;
  }
  .status-bubble .dot:nth-child(2) { animation-delay: 0.2s; }
  .status-bubble .dot:nth-child(3) { animation-delay: 0.4s; }
  @keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.5; }
    40% { opacity: 1; }
  }
  
  /* Fix for wide tables in agent of agents chat messages */
  .message-content table {
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    border-collapse: collapse !important;
    margin-bottom: 1em !important;
  }

  .message-content th,
  .message-content td {
    word-break: break-word !important;
    white-space: normal !important;
    max-width: 300px !important; /* or adjust as needed */
    padding: 0.5em !important;
    text-align: left !important;
  }
  