/* AgentOS - Modern UI Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --border-color: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  --transition-fast: 0.15s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

html,
body {
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* App Header */
.app-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  user-select: none;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.app-header h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.app-header .flex {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header .flex div:first-child {
  font-size: 28px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Navigation Tabs */
.nav-tabs {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  display: flex;
  padding: 0 16px;
  gap: 4px;
}

.nav-tab {
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all var(--transition-normal) ease;
  position: relative;
  cursor: pointer;
}

.nav-tab:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
}

.nav-tab.active,
.nav-tab:active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* Main Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  background: var(--bg-primary);
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 100%
  );
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-blue);
}

.stat-icon {
  font-size: 36px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.stat-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  transition: all var(--transition-fast) ease;
}

.stat-value.running {
  color: #10b981;
}
.stat-value.completed {
  color: #3b82f6;
}
.stat-value.failed {
  color: #ef4444;
}
.stat-value.total {
  color: var(--text-primary);
}

/* Table Container */
.table-container {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-normal) ease;
}

.table-container:hover {
  box-shadow: var(--shadow-lg);
}

.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.table-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.table-scroll {
  overflow-x: auto;
  max-height: 600px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: var(--bg-tertiary);
  position: sticky;
  top: 0;
  z-index: 10;
}

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast) ease;
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
  transform: scale(1.005);
}

tbody tr:last-child {
  border-bottom: none;
}

td {
  padding: 16px;
  color: var(--text-secondary);
}

.cell-id {
  font-family: "Courier New", monospace;
  color: var(--text-muted);
  font-size: 13px;
}

.cell-name {
  color: var(--text-primary);
  font-weight: 500;
}

.cell-secondary {
  color: var(--text-muted);
  font-size: 13px;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 24px;
  border: 1px solid;
  text-transform: capitalize;
  transition: all var(--transition-fast) ease;
  cursor: default;
}

.status-badge:hover {
  transform: scale(1.05);
}

.status-running {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-completed {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.status-failed {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-stopped {
  background: rgba(156, 163, 175, 0.1);
  color: #9ca3af;
  border-color: rgba(156, 163, 175, 0.3);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width var(--transition-normal) ease,
    height var(--transition-normal) ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-blue) 0%,
    var(--accent-blue-hover) 100%
  );
  color: white;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 20px -3px rgba(59, 130, 246, 0.5);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(-1px) scale(0.98);
}

.btn-link {
  background: none;
  color: var(--accent-blue);
  padding: 4px 8px;
  text-decoration: none;
  border-radius: 4px;
}

.btn-link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue-hover);
}

.btn-danger {
  color: var(--accent-red);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Forms */
.form-container {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-normal) ease;
}

.form-container:hover {
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition-normal) ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form-select {
  cursor: pointer;
}

/* Cards */
.bg-gray-800 {
  background: var(--bg-secondary);
}

.bg-gray-700 {
  background: var(--bg-tertiary);
}

.bg-gray-900 {
  background: #0f172a;
}

.rounded-lg {
  border-radius: 12px;
}

.shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.border {
  border: 1px solid var(--border-color);
}

.border-b {
  border-bottom: 1px solid var(--border-color);
}

.border-gray-700 {
  border-color: var(--border-color);
}

/* Modal */
.fixed {
  position: fixed;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.z-50 {
  z-index: 50;
}

.bg-black {
  background-color: rgba(0, 0, 0, 0.8);
}

.bg-opacity-75 {
  opacity: 0.95;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-h-\[80vh\] {
  max-height: 80vh;
}

.mx-4 {
  margin-left: 1rem;
  margin-right: 1rem;
}

/* Pre/Code */
pre {
  background: #0f172a;
  color: #10b981;
  padding: 20px;
  border-radius: 12px;
  font-size: 13px;
  overflow: auto;
  border: 1px solid var(--border-color);
  font-family: "Courier New", monospace;
  line-height: 1.6;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Utility Classes */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.space-x-2 > * + * {
  margin-left: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.mt-4 {
  margin-top: 16px;
}

.p-4 {
  padding: 16px;
}

.p-6 {
  padding: 24px;
}

.p-8 {
  padding: 32px;
}

.px-2 {
  padding-left: 8px;
  padding-right: 8px;
}

.px-4 {
  padding-left: 16px;
  padding-right: 16px;
}

.px-6 {
  padding-left: 24px;
  padding-right: 24px;
}

.py-1 {
  padding-top: 4px;
  padding-bottom: 4px;
}

.py-2 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.py-3 {
  padding-top: 12px;
  padding-bottom: 12px;
}

.py-4 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-xs {
  font-size: 12px;
}

.text-sm {
  font-size: 14px;
}

.text-lg {
  font-size: 18px;
}

.text-2xl {
  font-size: 24px;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.uppercase {
  text-transform: uppercase;
}

.text-white {
  color: white;
}

.text-gray-100 {
  color: var(--text-primary);
}

.text-gray-300 {
  color: var(--text-secondary);
}

.text-gray-400 {
  color: var(--text-muted);
}

.text-blue-400 {
  color: #60a5fa;
}

.text-blue-300 {
  color: #93c5fd;
}

.text-red-400 {
  color: #f87171;
}

.text-red-300 {
  color: #fca5a5;
}

.text-green-400 {
  color: #4ade80;
}

.hover\:text-blue-300:hover {
  color: #93c5fd;
}

.hover\:text-red-300:hover {
  color: #fca5a5;
}

.hover\:text-gray-200:hover {
  color: #e5e7eb;
}

.hover\:bg-blue-700:hover {
  background-color: var(--accent-blue-hover);
}

.hover\:bg-red-700:hover {
  background-color: #b91c1c;
}

.hover\:bg-gray-700:hover {
  background-color: var(--bg-tertiary);
}

.bg-blue-600 {
  background-color: var(--accent-blue);
}

.bg-red-600 {
  background-color: var(--accent-red);
}

.bg-green-900 {
  background-color: rgba(6, 78, 59, 0.5);
}

.bg-blue-900 {
  background-color: rgba(30, 58, 138, 0.5);
}

.bg-red-900 {
  background-color: rgba(127, 29, 29, 0.5);
}

.border-green-700 {
  border-color: rgba(21, 128, 61, 0.5);
}

.border-blue-700 {
  border-color: rgba(29, 78, 216, 0.5);
}

.border-red-700 {
  border-color: rgba(185, 28, 28, 0.5);
}

.border-gray-600 {
  border-color: #4b5563;
}

.rounded {
  border-radius: 4px;
}

.rounded-full {
  border-radius: 9999px;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-x-auto {
  overflow-x: auto;
}

.w-full {
  width: 100%;
}

.max-w-xs {
  max-width: 20rem;
}

.min-w-full {
  min-width: 100%;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.divide-y > * + * {
  border-top: 1px solid var(--border-color);
}

.divide-gray-700 > * + * {
  border-color: var(--border-color);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 16px;
  margin-bottom: 8px;
}

/* Loading State */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 8px 12px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast) ease;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .main-content {
    padding: 16px;
  }

  .page-title {
    font-size: 22px;
  }

  .nav-tab {
    padding: 12px 16px;
    font-size: 13px;
  }

  .form-container {
    padding: 24px;
  }

  table {
    font-size: 13px;
  }

  th,
  td {
    padding: 10px 12px;
  }

  .stat-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .app-header {
    padding: 12px 16px;
  }

  .app-header h1 {
    font-size: 16px;
  }
}

/* Loading Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}
/* ============================================
   CHAT INTERFACE STYLES
   ============================================ */

/* Chat Container */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Chat Header */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.chat-header .flex {
  display: flex;
}

.chat-header .items-center {
  align-items: center;
}

.chat-header .gap-3 {
  gap: 0.75rem;
}

/* Chat Messages Area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
}

/* Chat Message Styles */
.chat-message-user,
.chat-message-assistant {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 80%;
  animation: fadeIn 0.3s ease-out;
}

.chat-message-user {
  align-self: flex-end;
}

.chat-message-assistant {
  align-self: flex-start;
}

.chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.chat-message-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.chat-message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-message-content {
  padding: 1rem;
  border-radius: 8px;
  line-height: 1.6;
  word-wrap: break-word;
}

.chat-message-user .chat-message-content {
  background: var(--accent-blue);
  color: white;
}

.chat-message-assistant .chat-message-content {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* Code formatting in messages */
.chat-message-content code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
}

.chat-message-content pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.chat-message-content pre code {
  background: none;
  padding: 0;
}

/* Thinking Indicator */
.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.thinking-dots {
  display: inline-flex;
  gap: 0.2rem;
}

.thinking-dots span {
  animation: thinking 1.4s infinite;
}

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

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

@keyframes thinking {
  0%,
  60%,
  100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}

/* Chat Input Area */
.chat-input-container {
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
}

.chat-input-form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  transition: border-color var(--transition-fast);
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-error {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--accent-red);
  border-radius: 6px;
  color: var(--accent-red);
  font-size: 0.875rem;
}

/* Form Elements for Chat Settings */
.form-select,
.form-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast);
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.form-select {
  cursor: pointer;
}

/* Responsive Chat */
@media (max-width: 768px) {
  .chat-message-user,
  .chat-message-assistant {
    max-width: 90%;
  }

  .chat-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .chat-header .flex {
    justify-content: space-between;
  }
}
/* Agentic Chat Styles */
.badge-agentic {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
  }
}

/* System messages */
.chat-message-system {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 90%;
  align-self: center;
  animation: fadeIn 0.3s ease-out;
}

.chat-message-system .chat-message-content {
  background: var(--bg-primary);
  border: 1px solid var(--accent-yellow);
  color: var(--text-secondary);
}

/* Command actions */
.command-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  flex-wrap: wrap;
}

.command-code {
  flex: 1;
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  color: var(--accent-green);
  word-break: break-all;
}

.btn-execute {
  background: var(--accent-green);
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-execute:hover {
  background: #059669;
  transform: scale(1.05);
}

.btn-execute:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Execution results */
.exec-success {
  color: var(--accent-green);
}

.exec-error {
  color: var(--accent-red);
}

.exec-output {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
}
