:root {
    --primary: #0ea5e9;
    --primary-dark: #0c4a6e;
    --accent: #38bdf8;
    --bg: #f0f4f8;
    --card-bg: white;
    --header-bg: #0c1d3c;
    --shadow: 0 8px 28px rgba(0,0,0,0.08);
    --input-bg: #e0f2fe; /* Light blue */
    --input-bg-focus: #bae6fd;
  }
  .activity-feed {
      display: flex;
      flex-direction: column;
      width: 100%;
    }
    
    .activity-row {
      display: grid;
      grid-template-columns: 90px 1fr 100px;
      gap: 1rem;
      align-items: center;
      padding: 0.6rem 0;
      border-bottom: 1px solid #eee;
      font-size: 0.9rem;
      color: #334155;
    }
    
    .activity-time {
      font-weight: 500;
      color: #0f172a;
    }
    
    .activity-desc {
      flex: 1;
    }
    
    .activity-link a {
      color: var(--primary);
      font-weight: 500;
      text-decoration: none;
      transition: color 0.2s;
    }
    
    .activity-link a:hover {
      text-decoration: underline;
      color: var(--primary-dark);
    }

    
  .agent-status-list {
      display: grid;
      gap: 1rem;
    }
    
    /* Base card style matches Tool Usage */
    .agent-status-card {
      background: var(--card-bg);
      border-radius: 8px;
      padding: 1rem;
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
      transition: transform 0.25s ease, box-shadow 0.25s ease;
    }
    
    /* Shimmer effect like Tool Usage */
    .agent-status-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 200%;
      height: 100%;
      background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(56,189,248,0.08) 30%,
        rgba(56,189,248,0.15) 50%,
        transparent 70%
      );
      transition: all 0.6s ease;
      pointer-events: none;
    }
    
    .agent-status-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    }
    
    .agent-status-card:hover::before {
      left: 0;
    }
    
    .agent-status-header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-weight: 600;
      color: #0f172a;
      margin-bottom: 0.25rem;
    }
    
    .agent-status-header .agent-name {
      flex: 1;
    }
    
    .agent-status-details p {
      margin: 0.15rem 0;
      font-size: 0.85rem;
      color: #475569;
    }
    
    /* Status dots */
    .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }
    
    .dot.online {
      background-color: #22c55e;
      animation: pulse 1.5s infinite;
    }
    
    .dot.offline {
      background-color: #ef4444;
      opacity: 0.85;
    }
    
    @keyframes pulse {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.4); opacity: 0.6; }
    }
    
    

  /* Tool Usage Item Hover Animation */
  .tool-usage-item {
      transition: transform 0.25s ease, box-shadow 0.25s ease;
      position: relative;
      overflow: hidden;
  }
  
  .tool-usage-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 200%;
      height: 100%;
      background: linear-gradient(
      120deg,
      transparent 0%,
      rgba(56,189,248,0.08) 30%,
      rgba(56,189,248,0.15) 50%,
      transparent 70%
      );
      transition: all 0.6s ease;
      pointer-events: none;
  }
  
  .tool-usage-item:hover {
      transform: translateY(-4px);
      box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  }
  
  .tool-usage-item:hover::before {
      left: 0;
  }
  
  /* Optional: Slight icon color lift on hover */
  .tool-usage-item:hover .tool-usage-item-icon img {
      filter: brightness(0) saturate(100%) invert(36%) sepia(72%) 
              saturate(675%) hue-rotate(185deg) brightness(103%) contrast(101%);
      transition: filter 0.3s ease;
  }

    
  .scrollable-section {
      max-height: 300px;       /* adjust as needed */
      overflow-y: auto;
      padding-right: 0.5rem;   /* space for scrollbar */
    }
    
    .scrollable-section::-webkit-scrollbar {
      width: 6px;
    }
    
    .scrollable-section::-webkit-scrollbar-thumb {
      background-color: rgba(0,0,0,0.2);
      border-radius: 3px;
    }
    
    .scrollable-section::-webkit-scrollbar-track {
      background: transparent;
    }

    
  .tool-usage-item {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 1rem;
      border-radius: 8px;
      background-color: var(--card-bg);
      box-shadow: var(--shadow);
  }
  .tool-usage-item-icon {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      overflow: hidden;
  }
  
  .tool-usage-item-icon img {
      width: 32px;
      height: 32px;
      filter: brightness(0) saturate(100%) invert(33%) sepia(95%) 
              saturate(750%) hue-rotate(180deg);
  }  
  .tool-usage-item-icon img { 
      width: 100%;
      height: 100%;
      object-fit: cover;
  }

  .tool-usage-item-details {
      flex: 1;
  }
  .tool-usage-item-details-name {
      font-size: 0.9rem;
      font-weight: 500;
  }
  .tool-usage-item-details-usage {
      font-size: 0.8rem;
      color: #64748b;
  }
  .tool-usage {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 1rem;
  }

  body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg);
  }

  header {
    background: linear-gradient(to right, var(--header-bg), var(--primary-dark));
    color: #fff;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  }

  header h1 {
    margin: 0;
    font-size: 1.6rem;
  }

  .container {
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
  }

  .card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
  }

  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  }

  .section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }

  .section-title span.toggle {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: #2db7f4;
  }

  .collapsed .section-title span.toggle {
    transform: rotate(-90deg);
  }

  .collapsible-content {
    max-height: 1000px;
    overflow: visible;
    transition: max-height 0.4s ease;
  }

  .collapsed .collapsible-content {
    max-height: 0;
    padding: 0;
    overflow: hidden;
  }

  /* Stats */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .stat {
    background: linear-gradient(to bottom right, var(--accent), var(--primary));
    padding: 1.2rem;
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .stat:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }

  .stat h2 {
    margin: 0;
    font-size: 1.8rem;
  }

  .stat p {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
  }

  ul.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  ul.activity-feed li {
    border-bottom: 1px solid #eee;
    padding: 0.75rem 0;
    font-size: 0.9rem;
    color: #334155;
  }

  /* Quick Actions Grid Layout */
  .sidebar-actions {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 0.75rem;
  }

  .sidebar-actions button {
      width: 100%;
      padding: 0.8rem;
      background: linear-gradient(to right, var(--accent), var(--primary));
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.95rem;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .sidebar-actions button:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  }


  .agent-status {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .agent-status .dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
  }

  @keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
  }

  .chart-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .chart-container {
    flex: 1;
    min-width: 250px;
  }

  .smart-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 500;
  }

  /* Soft Blue Form Style */
  .filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    align-items: end;
  }

  .filter-form .form-group {
    display: flex;
    flex-direction: column;
  }

  .filter-form .form-group label {
    font-size: 0.8rem;
    color: #334155;
    margin-bottom: 0.3rem;
    font-weight: 500;
  }

  .filter-form input,
  .filter-form select,
  .chat-input input {
    padding: 0.55rem 0.65rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: var(--input-bg);
    color: #0f172a;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
  }

  .filter-form input:focus,
  .filter-form select:focus,
  .chat-input input:focus {
    background-color: var(--input-bg-focus);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
    outline: none;
  }

  .filter-form select[multiple] {
    min-height: 110px;
  }

  .filter-form .form-actions {
    display: flex;
    align-items: flex-end;
  }

  .filter-form button {
    padding: 0.55rem 1.2rem;
    background: linear-gradient(to right, var(--accent), var(--primary));
    color: white;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .filter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  /* Chat Interface */
  .chat-container {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    height: 190px;
  }

  .chat-history {
    flex: 1;
    padding: 0.5rem;
    background: #f9fafb;
    overflow-y: auto;
    font-size: 0.9rem;
  }

  .chat-message {
    margin: 0.25rem 0;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    max-width: 80%;
    clear: both;
  }

  .chat-message.user {
    background: #0ea5e9;
    color: white;
    float: right;
  }

  .chat-message.bot {
    background: #e2e8f0;
    float: left;
  }

  .chat-input {
    display: flex;
    border-top: 1px solid #e5e7eb;
  }

  .chat-input input {
    flex: 1;
    border: none;
    padding: 0.5rem;
    font-size: 0.9rem;
    outline: none;
  }

  .chat-input button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0;
  }

  .chat-input button:hover {
    background: var(--primary-dark);
  }

  a {
      color: var(--primary);
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    footer {
      text-align: center;
      padding: 1rem;
      font-size: 0.8rem;
      color: #888;
    } 
    
  @media (max-width: 900px) {
    .container { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .chart-row { flex-direction: column; }
  }

  @media (max-width: 500px) {
    .stats-grid { grid-template-columns: 1fr; }
    .filter-form { grid-template-columns: 1fr; }
    .sidebar-actions {grid-template-columns: 1fr;}
  }

  .multi-select {
      position: relative;
      display: flex;
      flex-direction: column;
      border-radius: 8px;
      background-color: var(--input-bg);
      cursor: pointer;
    }
    
    .multi-select input {
      border: none;
      background: transparent;
      padding: 0.55rem 0.65rem;
      font-size: 0.9rem;
      color: #0f172a;
      cursor: pointer;
    }
    
    .multi-select input:focus {
      outline: none;
    }
    
    .multi-select .selected-options {
      display: flex;
      flex-wrap: wrap;
      padding: 0.25rem 0.5rem 0 0.5rem;
      gap: 0.3rem;
    }
    
    .multi-select .selected-options .tag {
      background: #bae6fd;
      color: #0c4a6e;
      padding: 0.25rem 0.5rem;
      font-size: 0.75rem;
      border-radius: 12px;
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }
    
    .multi-select .selected-options .tag .remove {
      cursor: pointer;
      font-weight: bold;
    }
    
    .multi-select .dropdown-options {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      background: white;
      border-radius: 0 0 8px 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      display: none;
      flex-direction: column;
      z-index: 1000;
      border: 1px solid #e5e7eb;
    }
    
    .multi-select.open .dropdown-options {
      display: flex;
    }
    
    .multi-select .dropdown-options div {
      padding: 0.5rem 0.65rem;
      font-size: 0.9rem;
      cursor: pointer;
      transition: background 0.15s;
    }
    
    .multi-select .dropdown-options div:hover {
      background: #e0f2fe;
    } 