/* Toldar Agent Stylesheet - Modern Glassmorphic Dashboard Theme */

:root {
  --color-bg: #0b0f19;
  --color-panel: rgba(17, 24, 39, 0.65);
  --color-border: rgba(34, 211, 238, 0.15);
  --color-border-active: rgba(34, 211, 238, 0.45);
  --color-text: #f3f4f6;
  --color-text-muted: #9ca3af;
  
  --color-cyan: #22d3ee;
  --color-green: #34d399;
  --color-red: #f87171;
  --color-amber: #fbbf24;
  --color-purple: #a78bfa;
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: 
    radial-gradient(at 10% 20%, rgba(34, 211, 238, 0.04) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(167, 139, 250, 0.04) 0px, transparent 50%);
}

/* Header HUD */
.hud-header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.hud-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--color-cyan);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
  margin-bottom: 0.2rem;
}

.hud-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.hud-title span {
  color: var(--color-cyan);
  text-shadow: 0 0 15px rgba(34, 211, 238, 0.5);
}

.hud-readouts {
  display: flex;
  gap: 2rem;
}

.readout-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.readout-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.readout-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.pulse-green {
  color: var(--color-green);
  animation: pulse 2s infinite;
}

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

/* Dashboard Grid */
.dashboard-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  overflow: hidden;
  height: calc(100vh - 75px);
}

/* Panels */
.glass {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  position: relative;
}

.panel {
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--color-cyan);
}

.panel h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-cyan);
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Corner HUD Accents */
.panel-corner-bl, .panel-corner-br {
  position: absolute;
  width: 8px;
  height: 8px;
  bottom: -1px;
  border-bottom: 2px solid var(--color-cyan);
}

.panel-corner-bl {
  left: -1px;
  border-left: 2px solid var(--color-cyan);
}

.panel-corner-br {
  right: -1px;
  border-right: 2px solid var(--color-cyan);
}

/* Sidebar Inputs */
.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.input-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.15);
}

.status-row, .metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.status-label, .metric-label {
  color: var(--color-text-muted);
}

.status-value, .metric-value {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Suggested buttons */
.suggest-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.8rem;
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.suggest-btn:hover {
  color: var(--color-cyan);
  border-color: var(--color-cyan);
  background: rgba(34, 211, 238, 0.1);
  transform: translateX(4px);
}

/* Chat Layout */
.chat-container {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.chat-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-cyan) 0%, #0891b2 100%);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
  position: relative;
}

.agent-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-green);
  border: 2px solid var(--color-bg);
}

.agent-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

.agent-info p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Messages Stream */
.messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Scrollbar styling */
.messages-stream::-webkit-scrollbar {
  width: 6px;
}
.messages-stream::-webkit-scrollbar-track {
  background: transparent;
}
.messages-stream::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.2);
  border-radius: 3px;
}
.messages-stream::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.4);
}

.message {
  display: flex;
  max-width: 85%;
}

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

.message.agent-msg {
  align-self: flex-start;
}

.message.system-msg {
  align-self: center;
  max-width: 95%;
  font-size: 0.8rem;
  text-align: center;
}

.msg-bubble {
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.user-msg .msg-bubble {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #fff;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 15px rgba(14, 116, 144, 0.25);
}

.agent-msg .msg-bubble {
  background: rgba(31, 41, 55, 0.7);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 2px;
}

.system-msg .msg-bubble {
  background: rgba(251, 191, 36, 0.05);
  border: 1px dashed var(--color-amber);
  color: var(--color-amber);
}

/* Markdown styling inside messages */
.msg-bubble pre {
  background: rgba(11, 15, 25, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin: 0.8rem 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.msg-bubble code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

.msg-bubble pre code {
  background: transparent;
  padding: 0;
}

.msg-bubble p {
  margin-bottom: 0.5rem;
}

.msg-bubble p:last-child {
  margin-bottom: 0;
}

.msg-bubble ul, .msg-bubble ol {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Chat Input Form */
.input-form {
  padding: 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 1rem;
  background: rgba(17, 24, 39, 0.4);
}

.input-form input {
  flex: 1;
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.input-form input:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

.input-form button {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border: none;
  border-radius: 8px;
  padding: 0 1.75rem;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.input-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

.input-form button:disabled {
  background: rgba(55, 65, 81, 0.5);
  box-shadow: none;
  cursor: not-allowed;
  color: var(--color-text-muted);
}
