body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
    font-size: 12px;
    box-sizing: border-box;
    overflow-y: auto;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 8px;
    box-sizing: border-box;
    gap: 8px;
    overflow-y: auto;
}

/* Header styling */
.header {
    background: white;
    color: #333;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.header-logo {
    height: 32px;
    width: auto;
}

.header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Webhook indicator styles */
.webhook-indicator-container {
    position: relative;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    margin-right: 40px;
}

.webhook-indicator-container:hover {
    background: rgba(255, 255, 255, 0.2);
}

.webhook-indicator {
    width: 16px;
    height: 16px;
    background-color: #6c757d;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.webhook-indicator.active {
    background-color: #28a745;
    opacity: 1;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.webhook-indicator.has-notifications {
    background-color: #ffc107;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.webhook-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    display: none;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.5);
}

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

/* Navigation buttons */
.nav-buttons {
    display: flex;
    gap: 6px;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
}

.nav-button {
    padding: 5px 10px;
    background-color: #95a5a6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background-color: #7f8c8d;
}

.nav-button.active {
    background-color: #009845;
}

/* User Profile Dropdown */
.user-profile {
    position: relative;
    margin-left: 12px;
}

.user-profile-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    color: #495057;
}

.user-profile-button:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #009845, #00a854);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 11px;
}

.user-email {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.user-dropdown-icon {
    font-size: 10px;
    transition: transform 0.2s;
}

.user-profile.open .user-dropdown-icon {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-profile.open .user-dropdown-menu {
    display: block;
}

.user-dropdown-header {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.user-dropdown-email {
    font-size: 12px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 2px;
}

.user-dropdown-role {
    font-size: 11px;
    color: #6c757d;
    text-transform: capitalize;
}

.user-dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 12px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-dropdown-item:hover {
    background: #f8f9fa;
}

.user-dropdown-item.logout {
    color: #dc3545;
    border-top: 1px solid #e9ecef;
}

.user-dropdown-item.logout:hover {
    background: #fff5f5;
}

/* Common button styling */
button {
    padding: 6px 12px;
    background-color: #009845;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #007a38;
}

/* Content sections */
.welcome-container {
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

.welcome-title {
    font-size: 15px;
    margin: 0 0 3px 0;
    color: #2c3e50;
}

.welcome-description {
    font-size: 11px;
    color: #666;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.servers-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.servers-section h3 {
    font-size: 14px;
    margin: 0 0 6px 0;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}



.servers-table-container {
    flex: 1;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: white;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.servers-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Dashboard status tiles - fix alignment */
.status-section {
    margin: 20px 0;
}

#status-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.status-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 120px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.status-value {
    font-size: 18px;
    font-weight: 700;
    color: #009845;
    margin-top: 2px;
}

/* Servers table styling */
.servers-table thead {
    background: linear-gradient(135deg, #009845 0%, #007a38 100%);
    color: white;
    flex-shrink: 0;
    display: table;
    width: 100%;
    table-layout: fixed;
}

.servers-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.servers-table thead th:nth-child(1) {
    width: 30%; /* Server Name & Type */
    text-align: left;
}

.servers-table thead th:nth-child(2) {
    width: 35%; /* Description */
    text-align: left;
}

.servers-table thead th:nth-child(3) {
    width: 12%; /* Status */
    text-align: center;
}

.servers-table thead th:nth-child(4) {
    width: 10%; /* Tools */
    text-align: center;
}

.servers-table thead th:nth-child(5) {
    width: 13%; /* Last Heartbeat */
    text-align: center;
}

.servers-table thead th:last-child {
    border-right: none;
}

.servers-table tbody {
    flex: 1;
    overflow-y: auto;
    display: block;
    width: 100%;
    min-height: 0;
}

.servers-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-bottom: 1px solid #f1f5f9;
}

.servers-table tbody tr:hover {
    background-color: #f8f9fa;
}

.servers-table tbody td {
    padding: 12px;
    vertical-align: top;
    text-align: left;
    border-right: 1px solid #f1f5f9;
}

.servers-table tbody td:nth-child(2),
.servers-table tbody td:nth-child(3),
.servers-table tbody td:nth-child(4),
.servers-table tbody td:nth-child(5) {
    text-align: center;
}

.servers-table tbody td:last-child {
    border-right: none;
}

/* Server name cell styling */


/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.connected {
    background: #E8F5E8;
    color: #2E7D32;
    border: 1px solid #4CAF50;
}

.status-badge.disconnected {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #F44336;
}

.status-badge.disabled {
    background: #F5F5F5;
    color: #757575;
    border: 1px solid #BDBDBD;
}



.servers-table tbody tr.error-row {
    order: -1;
}

.status-indicator.gray {
    background: #bbb;
}

.servers-table tbody td {
  padding: 4px 8px;
  font-size: 10px;
  line-height: 1.2;
  vertical-align: middle;
  border-right: 1px solid #f1f5f9;
}

.servers-table tbody td:last-child {
    border-right: none;
}



.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 auto;
}

.status-connected {
    background-color: #28a745;
}

.status-disconnected {
    background-color: #dc3545;
}



.status-text.green {
    color: #28a745;
    font-style: normal;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.status-text {
    font-size: 9px;
    font-weight: 600;
}

.status-text.green {
    color: #28a745;
}

.status-text.red {
    color: #dc3545;
}

.servers-table tbody td:nth-child(1) {
    width: 30%; /* Server Name & Type */
    text-align: left;
}

.servers-table tbody td:nth-child(2) {
    width: 35%; /* Description */
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

.servers-table tbody td:nth-child(3),
.servers-table tbody td:nth-child(4),
.servers-table tbody td:nth-child(5) {
    text-align: center;
}

.servers-table tbody td:nth-child(3) {
    width: 12%; /* Status */
}

.servers-table tbody td:nth-child(4) {
    width: 10%; /* Tools */
}

.servers-table tbody td:nth-child(5) {
    width: 13%; /* Last Heartbeat */
}



.loading-row {
    text-align: center;
    padding: 20px !important;
    color: #666;
    font-style: italic;
}

.status-section {
  margin-top: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 6px;
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.status-section h3 {
  font-size: 14px;
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-section h3::before {
  content: '📊';
  font-size: 16px;
}

#status-info {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 0;
}

.status-item {
  background: white;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 45px;
  transition: all 0.2s ease;
}

.status-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.status-label {
  font-weight: 500;
  color: #666;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.status-value {
  color: #2c3e50;
  font-size: 14px;
  font-weight: 700;
}

#status {
    color: #2c3e50;
    text-transform: capitalize;
}

#servers-count {
    color: #2c3e50;
}

#tools-count {
  color: #2c3e50;
}

#resources-count {
  color: #2c3e50;
}

#uptime {
  color: #2c3e50;
}

.server-item {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.server-status {
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
}

.server-status.registered {
    color: #28a745;
    font-weight: bold;
}

.server-status.unregistered {
    color: #dc3545;
    font-weight: bold;
}

.server-status.connected {
    color: #28a745;
    font-weight: bold;
}

.server-status.disconnected {
    color: #dc3545;
    font-weight: bold;
}

.loading {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 16px;
}



/* Temporary notification animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}



/* Conversational Interface */
.conversation-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  min-height: 0;
  overflow: hidden;
}

/* Chat Layout */
.chat-layout {
  display: flex;
  gap: 16px;
  flex: 1;
  height: 100%;
  min-height: 0;
}

.conversation-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.conversation-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 10px;
}

.typing-dots {
    display: inline-block;
}

.typing-dots span {
    animation: typing 1.4s infinite ease-in-out;
    font-size: 18px;
    color: #666;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Message Styling */
.message-container {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.user-message {
  justify-content: flex-end;
}

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

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.user-message .message-avatar {
  background: #007bff;
  color: white;
  order: 2;
}

.ai-message .message-avatar {
  background: #009845;
  color: white;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
}

.user-bubble {
  background: #007bff;
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-bubble {
  background: white;
  color: #333;
  border: 1px solid #e1e5e9;
  border-bottom-left-radius: 4px;
}

.ai-bubble strong {
  color: #009845;
}

.ai-bubble .section-header {
  color: #2c3e50;
  font-size: 14px;
  margin-top: 8px;
  margin-bottom: 2px;
  display: block;
  font-weight: bold;
}

.ai-bubble h2, .ai-bubble h3, .ai-bubble h4 {
  margin-top: 8px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.ai-bubble p {
  margin: 4px 0;
}

.ai-bubble blockquote {
  margin: 4px 0;
  padding: 4px 8px;
  border-left: 3px solid #009845;
  background: #f8f9fa;
  font-style: italic;
}

.ai-bubble .bullet-point {
  color: #666;
  margin-left: 8px;
}

.ai-bubble .numbered-item {
  color: #333;
  margin-left: 4px;
}

.ai-bubble .emoji-section {
  color: #2c3e50;
  font-weight: bold;
  margin-top: 8px;
  display: block;
}

.ai-bubble p {
  margin: 8px 0 0 0;
  font-size: 12px;
}

.welcome-message .ai-bubble {
  background: #e8f5e8;
  border-color: #009845;
}

/* Better list styling for AI responses */
.ai-bubble ul, .ai-bubble ol {
  margin: 10px 0;
  padding-left: 24px;
  line-height: 1.6;
}

.ai-bubble ul li, .ai-bubble ol li {
  margin: 6px 0;
}

.ai-bubble h1, .ai-bubble h2, .ai-bubble h3 {
  margin: 16px 0 8px 0;
  font-weight: 600;
  color: #2c3e50;
}

.ai-bubble h1 {
  font-size: 18px;
}

.ai-bubble h2 {
  font-size: 16px;
}

.ai-bubble h3 {
  font-size: 14px;
}

.ai-bubble pre {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.ai-bubble code {
  background: #f0f0f0;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

/* Streaming cursor animation */
.streaming-cursor {
  display: inline-block;
  color: #009845;
  animation: blink 1s infinite;
  font-weight: bold;
  margin-left: 2px;
}

@keyframes blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

/* Right Sidebar */
.right-sidebar {
  flex: 0 0 240px;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.unified-analysis-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.panel-header {
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

.panel-header h3 {
  margin: 0;
  font-size: 14px;
  color: #495057;
}

.unified-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: #f8f9fa;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
}

.unified-content::-webkit-scrollbar {
    width: 6px;
}

.unified-content::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.unified-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.unified-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.sample-questions {
  padding: 12px;
  background: white;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
}

.sample-questions h3 {
  margin: 0 0 3px 0;
  color: #495057;
  font-size: 8px;
  font-weight: 600;
}

.quick-start-dropdown {
    margin-bottom: 4px;
}

.quick-start-select {
    width: 100%;
    padding: 3px 6px;
    border: 1px solid #e1e5e9;
    border-radius: 3px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-size: 9px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 4px center;
    background-repeat: no-repeat;
    background-size: 8px;
    padding-right: 20px;
}

.quick-start-select:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.quick-start-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tabbed Panel Container */

.tab-headers {
  display: flex;
  background: #ffffff;
  border-bottom: 2px solid #e0e0e0;
  gap: 0;
}

.tab-header {
  flex: 1;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #666666;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.tab-header:last-child {
  border-right: none;
}

.tab-header.active {
  background: transparent;
  color: #009845;
  border-bottom: 3px solid #009845;
  margin-bottom: -2px;
}

.tab-header:hover:not(.active) {
  color: #333333;
  border-bottom: 3px solid #cccccc;
  margin-bottom: -2px;
}

.tab-content {
  flex: 1;
  display: none;
  flex-direction: column;
  min-height: 0;
}

.tab-content.active {
  display: flex;
}

/* Analysis Panel */

.analysis-content {
    flex: 1;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #666 #e0e0e0;
    border: 1px solid #e9ecef;
}

.analysis-content::-webkit-scrollbar {
    width: 8px;
}

.analysis-content::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.analysis-content::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.analysis-content::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.analysis-content::-webkit-scrollbar {
    width: 10px;
}

.analysis-content::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 5px;
}

.analysis-content::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.analysis-content::-webkit-scrollbar-thumb:hover {
    background: #444;
}



.input-container {
  padding: 12px;
  background: white;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

#nl-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: none;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  min-height: 38px;
}

#nl-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.send-button {
    background: #009845;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,152,69,0.2);
    min-width: 80px;
}

.send-button:hover {
  background: #007a38;
  box-shadow: 0 3px 6px rgba(0,152,69,0.3);
}

.clear-button {
    background: #ffffff;
    color: #666666;
    border: 1px solid #d6d6d6;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.clear-button:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #404040;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    min-width: 80px;
}

.error-message {
  margin-bottom: 16px;
}

.error-message .ai-bubble {
  background: #fdf2f2;
  border-color: #e74c3c;
  color: #721c24;
}

.clarification-input {
  background: #fffbf0;
}

.clarification-input textarea {
  width: 100%;
  margin-bottom: 8px;
}

/* Debug Panel */

.mcp-step.success {
  background: #e8f5e8;
  border-left-color: #28a745;
}

.mcp-step.error {
  background: #f8e8e8;
  border-left-color: #dc3545;
}

.step-header {
  font-weight: bold;
  margin-bottom: 8px;
}







.error {
  color: #d32f2f;
  font-weight: bold;
}



.debug-details .qlik-expression {
  background: #e3f2fd;
  border: 1px solid #1976d2;
  color: #1565c0;
  font-weight: bold;
  padding: 6px;
  margin: 6px 0;
  border-radius: 4px;
}





.workflow-step.success .result-content pre.formatted-result {
  background: #e8f5e8;
  border-color: #4caf50;
}

/* Execution Progress Styles */
.execution-step {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 6px;
  border-left: 4px solid #ddd;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.execution-step.pending {
  border-left-color: #6c757d;
  background: #f8f9fa;
}

.execution-step.executing {
  border-left-color: #ffc107;
  background: #fff8e1;
  animation: pulse 1.5s infinite;
}

.execution-step.success {
  border-left-color: #28a745;
  background: #e8f5e8;
}

.execution-step.error {
  border-left-color: #dc3545;
  background: #f8e8e8;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 4px;
}



.step-name {
  flex: 1;
  font-size: 13px;
}

.step-status {
  font-size: 11px;
  color: #666;
  font-weight: normal;
}



.step-result.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.step-result.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.analysis-section.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.analysis-section.loading h4 {
  margin-bottom: 8px;
  color: #007bff;
}

/* Workflow continuation and notification styles */
.workflow-continuation-indicator {
  border-left: 4px solid #FF9800;
  background: rgba(255, 152, 0, 0.1);
}

.workflow-indicator {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border: 1px solid #FFB74D;
}

.workflow-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
}

.status-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: #009845;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 152, 69, 0.3);
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.status-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.executing {
  background: #FFF3E0;
  color: #F57C00;
  border: 1px solid #FFB74D;
}

.status-badge.completed {
  background: #E8F5E8;
  color: #2E7D32;
  border: 1px solid #4CAF50;
}

.status-badge.failed {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #F44336;
}

.workflow-details {
  font-size: 0.9em;
  color: #666;
  line-height: 1.4;
}



@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  margin-left: auto;
}

.notification-close:hover {
  opacity: 0.8;
}

/* Improved persistence indicators */
.message-container.restored {
  animation: fadeInUp 0.5s ease-out;
}

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

.analysis-section.restored {
  animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}



/* Qlik-styled Custom Confirm Modal */
.qlik-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(48, 59, 69, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.qlik-modal-overlay.qlik-modal-show {
  opacity: 1;
}

.qlik-modal-overlay.qlik-modal-hide {
  opacity: 0;
}

.qlik-modal {
  background: #ffffff;
  border-radius: 8px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.2s ease;
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.qlik-modal-show .qlik-modal {
  transform: scale(1);
}

.qlik-modal-hide .qlik-modal {
  transform: scale(0.9);
}

.qlik-modal-header {
  background: linear-gradient(135deg, #009845 0%, #007a38 100%);
  color: white;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.qlik-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.qlik-modal-body {
  padding: 20px;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
}

.qlik-modal-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.qlik-modal-footer {
  padding: 16px 20px;
  background: white;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.qlik-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 80px;
}

.qlik-btn-primary {
  background: linear-gradient(135deg, #009845 0%, #007a38 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 152, 69, 0.2);
}

.qlik-btn-primary:hover {
  background: linear-gradient(135deg, #007a38 0%, #005c29 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 152, 69, 0.3);
}

.qlik-btn-cancel {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.qlik-btn-cancel:hover {
  background: #e9e9e9;
  border-color: #bbb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qlik-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Beautiful Comparative Analysis Tables - Apply to all AI message tables */
.ai-bubble table,
.response-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

.ai-bubble table thead,
.response-content table thead {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  color: white;
}

.ai-bubble table thead th,
.response-content table thead th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: none;
}

.ai-bubble table thead th:first-child,
.response-content table thead th:first-child {
  border-top-left-radius: 12px;
}

.ai-bubble table thead th:last-child,
.response-content table thead th:last-child {
  border-top-right-radius: 12px;
  text-align: center;
}

.ai-bubble table tbody tr,
.response-content table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

.ai-bubble table tbody tr:hover,
.response-content table tbody tr:hover {
  background-color: #f9fafb;
}

.ai-bubble table tbody tr:last-child,
.response-content table tbody tr:last-child {
  border-bottom: none;
}

.ai-bubble table tbody td,
.response-content table tbody td {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.3;
  vertical-align: middle;
}

.ai-bubble table tbody td:first-child,
.response-content table tbody td:first-child {
  font-weight: 600;
  color: #374151;
}

.ai-bubble table tbody td:last-child,
.response-content table tbody td:last-child {
  text-align: center;
  font-weight: 600;
}

/* Status indicators with colored circles */
.ai-bubble table tbody td:last-child::before,
.response-content table tbody td:last-child::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* Green status for positive/good values */
.ai-bubble table tbody tr:first-child td:last-child::before,
.response-content table tbody tr:first-child td:last-child::before {
  background-color: #10b981;
}

/* Red status for negative/declining values */
.ai-bubble table tbody tr:not(:first-child) td:last-child::before,
.response-content table tbody tr:not(:first-child) td:last-child::before {
  background-color: #ef4444;
}

/* Enhanced styling for value cells */
.ai-bubble table tbody td:nth-child(2),
.response-content table tbody td:nth-child(2) {
  font-family: 'SF Mono', Monaco, monospace;
  font-weight: 600;
  color: #333 !important;
  font-size: 15px;
}

/* Smart coloring for comparative data - will be handled by JavaScript */
.ai-bubble table tbody .positive-value,
.response-content table tbody .positive-value {
  color: #059669 !important;
}

.ai-bubble table tbody .negative-value,
.response-content table tbody .negative-value {
  color: #dc2626 !important;
}

.ai-bubble table tbody .neutral-value,
.response-content table tbody .neutral-value {
  color: #333 !important;
}

/* Executive Summary specific styling */
.ai-bubble h2 + table,
.response-content h2 + table {
  margin-top: 10px;
}

/* Performance Analysis table styling */
.ai-bubble table + h3 + table,
.response-content table + h3 + table {
  margin-top: 15px;
}

/* Responsive status grid and table styling */
@media (max-width: 1200px) {
  #status-info {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
  }

  .status-item {
    min-height: 40px;
    padding: 5px 8px;
  }

  .status-value {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  #status-info {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 4px;
  }

  .status-item {
    min-height: 35px;
    padding: 4px 6px;
  }

  .status-label {
    font-size: 8px;
  }

  .status-value {
    font-size: 11px;
  }

  .ai-bubble table,
  .response-content table {
    font-size: 12px;
  }

  .ai-bubble table thead th,
  .ai-bubble table tbody td,
  .response-content table thead th,
  .response-content table tbody td {
    padding: 12px 15px;
  }
}

/* Special styling for metric tables */
.ai-bubble table th:contains('Metric'),
.ai-bubble table th:contains('Period'),
.response-content table th:contains('Metric'),
.response-content table th:contains('Period') {
  background: linear-gradient(135deg, #009845 0%, #007a38 100%);
}

/* Beautiful borders and spacing */
.ai-bubble table tbody td,
.response-content table tbody td {
  border-right: 1px solid #f3f4f6;
}

.ai-bubble table tbody td:last-child,
.response-content table tbody td:last-child {
  border-right: none;
}

/* Enhanced hover effects */
.ai-bubble table tbody tr:hover td,
.response-content table tbody tr:hover td {
  background-color: #f8fadc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qlik-results {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    background: #f9f9f9;
}

.natural-language-answer {
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.natural-language-answer h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
}

.natural-language-answer p {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.5;
}

.result-title h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
}

.data-table table,
.category-breakdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td,
.category-breakdown th,
.category-breakdown td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th,
.category-breakdown th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table tr:hover,
.category-breakdown tr:hover {
    background-color: #f8f9fa;
}

.category-breakdown td:nth-child(2),
.category-breakdown td:nth-child(3) {
    font-weight: 600;
    color: #28a745;
}

.result-metadata {
    margin-top: 20px;
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

.metadata-section p {
    margin: 6px 0;
}

.response-content {
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    line-height: 1.6;
}

.response-content p {
    margin: 12px 0;
}

.response-content strong {
    color: #495057;
    font-weight: 600;
}

.response-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.stat-label {
  color: #666;
  font-size: 0.9em;
}

.stat-value {
  font-weight: 600;
  color: #333;
}

.qlik-metric .stat-value {
  color: #0072BC;
  font-weight: 700;
  font-size: 1.1em;
}

.qlik-metric .stat-label {
  color: #555;
  font-weight: 500;
}

/* Customer Sales Enablement specific styles */
.customer-sales-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.customer-sales-header {
    text-align: center;
    margin-bottom: 30px;
}

.customer-sales-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.customer-sales-header p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.sales-enablement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.enablement-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
    cursor: pointer;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.enablement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #009845;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    min-height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.card-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.cache-progress {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.cache-status {
    font-size: 13px;
    color: #495057;
    text-align: center;
}

.execution-progress {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #009845, #00b35a);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Agent progress bar for pipeline agents */
.agent-progress-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.progress-container {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-text {
    font-family: monospace;
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

.execution-status {
    font-size: 13px;
    color: #495057;
    text-align: center;
    font-weight: 500;
}

/* Dynamic content container */
#dynamic-content-container {
    background: transparent;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Content wrapper inside dynamic container */
#section-content-area {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tab content needs flex layout to constrain height */
.tab-content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.tab-content.active {
    display: flex;
}

/* External servers container needs scrolling */
#external-servers-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding: 16px;
}

/* Servers tab table wrapper with scrolling */
.servers-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    min-height: 0;
}

/* External servers container scrolling */
#external-servers-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding: 16px;
}

/* Qlik Tenants tab content */
#qlik-tenants-tab {
    overflow-y: auto;
    overflow-x: hidden;
}

.servers-config-table {
    width: 100%;
    border-collapse: collapse;
}

.servers-config-table thead {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #009845 0%, #007a38 100%);
    color: white;
    z-index: 10;
}

.servers-config-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.servers-config-table thead th:last-child {
    border-right: none;
}

.servers-config-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.servers-config-table tbody tr:hover {
    background-color: #f8f9fa;
}

.servers-config-table tbody td {
    padding: 12px;
    vertical-align: middle;
    font-size: 12px;
    border-right: 1px solid #f1f5f9;
}

.servers-config-table tbody td:last-child {
    border-right: none;
}

/* Server details modal */
.server-hover-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #009845;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

        .config-container {
            background: white;
            border-radius: 8px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.1);
            flex: 1;
            overflow: hidden;
            min-height: 0;
            display: flex;
            flex-direction: column;
            position: relative;
            z-index: 0;
        }

        .section-content {
            background: white;
            padding: 20px;
            border-radius: 8px;
            line-height: 1.6;
            display: block;
        }

        .section-content h1,
        .section-content h2,
        .section-content h3 {
            color: #2c3e50;
            margin-top: 20px;
            margin-bottom: 10px;
        }

        .section-content h1 { font-size: 24px; }
        .section-content h2 { font-size: 20px; }
        .section-content h3 { font-size: 18px; }

        .section-content p {
            margin: 10px 0;
            color: #333;
        }

        .section-content ul, .section-content ol {
            margin: 10px 0;
            padding-left: 30px;
        }

        .section-content li {
            margin: 5px 0;
        }

        .section-content strong {
            color: #009845;
        }

.workflow-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.workflow-header {
  background: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.workflow-description {
  color: #666;
  margin: 12px 0 20px 0;
  font-size: 14px;
}

/* Horizontal Layout */
.workflow-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
  height: calc(100vh - 280px);
  min-height: 600px;
}

/* Left Panel: Steps List */
.workflow-steps-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workflow-steps-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Right Panel: Debug Output */
.workflow-debug-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 2px solid #e5e7eb;
  background: #f9fafb;
  flex-shrink: 0;
}

.panel-header h3 {
  margin: 0;
  font-size: 16px;
  color: #111827;
  font-weight: 600;
}

.debug-status-bar {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}

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

.status-label {
  font-weight: 600;
  color: #6b7280;
  font-size: 13px;
}

.status-value {
  color: #009845;
  font-weight: 500;
  font-size: 13px;
}

.debug-output {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  background: #fafafa;
}

.step-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.step-card:hover {
  border-color: #009845;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.step-card.active {
  border-color: #009845;
  background: #f0fdf4;
  border-width: 2px;
  padding: 11px;
}

.step-card.completed {
  background: #f9fafb;
  border-color: #10b981;
}

.step-card.failed {
  background: #fef2f2;
  border-color: #ef4444;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.step-number {
  background: #009845;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.step-card.completed .step-number {
  background: #10b981;
}

.step-card.failed .step-number {
  background: #ef4444;
}

.step-info {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-weight: 600;
  color: #111827;
  font-size: 13px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-type {
  color: #6b7280;
  font-size: 11px;
}

.debug-entry {
  padding: 8px 12px;
  border-left: 3px solid #e5e7eb;
  margin-bottom: 4px;
  background: white;
  border-radius: 3px;
  font-size: 12px;
}

.debug-entry.success {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.debug-entry.error {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.debug-entry.info {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.debug-entry.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.debug-timestamp {
  color: #9ca3af;
  font-size: 10px;
  margin-bottom: 2px;
  font-weight: 500;
}

.debug-message {
  color: #374151;
  word-wrap: break-word;
  line-height: 1.4;
}
/* User Profile Styles */
.user-profile {
  position: relative;
  margin-left: 20px;
}

.login-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #0078d4;
  color: white;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.login-button:hover {
  background: #106ebe;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #4EA72E;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: box-shadow 0.2s;
  border: 2px solid #3d8a24;
}

.user-avatar:hover {
  box-shadow: 0 0 0 3px rgba(78, 167, 46, 0.3);
}

.user-dropdown {
  position: absolute;
  top: 45px;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  z-index: 1000;
  padding: 16px;
}

.user-info {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.user-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #4EA72E;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 20px;
  flex-shrink: 0;
  border: 2px solid #3d8a24;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-name {
  font-weight: 600;
  font-size: 16px;
  color: #333;
}

.user-email {
  font-size: 13px;
  color: #666;
}

.user-role {
  font-size: 12px;
  color: #0078d4;
  background: #e6f2ff;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 4px;
}

.user-dropdown hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 16px 0;
}

.logout-button {
  width: 100%;
  padding: 10px 16px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.logout-button:hover {
  background: #e5e5e5;
}

/* Vega-Lite Chart Containers */
.vega-chart-container {
  margin: 16px 0;
  padding: 16px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.vega-chart-embed {
  width: 100%;
  display: flex;
  justify-content: center;
}

.vega-chart-embed canvas {
  max-width: 100%;
  height: auto;
}

/* Vega action buttons styling */
.vega-chart-container .vega-actions {
  margin-top: 8px;
  text-align: right;
}

.vega-chart-container .vega-actions a {
  color: #666;
  font-size: 11px;
  text-decoration: none;
  margin-left: 8px;
}

.vega-chart-container .vega-actions a:hover {
  color: #009845;
}

/* Smooth statistics counter updates */
.stat-value {
  transition: color 0.3s ease;
}

.stat-value.updating {
  color: #009845 !important;
  font-weight: 600;
}

/* Scanning status indicator */
.badge-info {
  background-color: #17a2b8;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background-color: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-danger {
  background-color: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-warning {
  background-color: #ffc107;
  color: #212529;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Agent Progress Bar Styles */
.agent-progress-container {
  margin: 12px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.progress-message {
  font-weight: 500;
  color: #495057;
}

.progress-stats {
  font-family: monospace;
  color: #6c757d;
  font-size: 13px;
}

.progress-bar-outer {
  width: 100%;
  height: 24px;
  background: #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 12px;
  transition: width 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: #6c757d;
}

.progress-elapsed,
.progress-eta {
  font-family: monospace;
}

.progress-detail {
  margin-top: 6px;
  font-size: 11px;
  color: #868e96;
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-progress-idle {
  padding: 12px;
  text-align: center;
  color: #adb5bd;
  font-size: 13px;
}

.agent-progress-completed {
  padding: 12px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  color: #155724;
  font-weight: 500;
  text-align: center;
}

.agent-progress-error {
  padding: 12px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  color: #721c24;
  font-weight: 500;
  text-align: center;
}

/* Health status colors */
.health-status.health-running {
  color: #007bff;
  font-weight: 600;
}

.health-status.health-ready {
  color: #28a745;
  font-weight: 600;
}

.health-status.health-paused {
  color: #ffc107;
  font-weight: 600;
}

.health-status.health-disabled {
  color: #6c757d;
  font-weight: 600;
}

.health-status.health-not-ready {
  color: #dc3545;
  font-weight: 600;
}
