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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a1a1a;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
}

.auth-box {
  background: var(--bg-primary);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  min-width: 320px;
  border: 1px solid var(--border-color);
}

.auth-box h1 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.auth-box p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 14px;
}

.auth-box input {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.auth-box button {
  width: 100%;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-box button:hover {
  background: var(--primary-hover);
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #111111;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid #333;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #4a9eff;
}

.sidebar-nav {
  flex: 1;
  padding: 1.5rem 0;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section-title {
  padding: 0 1.5rem;
  color: #666;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #ccc;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: #2a2a2a;
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(135deg, #4a9eff20, #00d4aa20);
  color: #4a9eff;
  border-left-color: #4a9eff;
}

.nav-item-icon {
  font-size: 1.1rem;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #2a2a2a, #333);
  border-bottom: 1px solid #444;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.5);
}

.agent-name-input {
  background: #1a1a1a;
  border: 1px solid #444;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  min-width: 300px;
  transition: all 0.3s ease;
}

.agent-name-input:focus {
  outline: none;
  border-color: #4a9eff;
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.save-btn {
  background: linear-gradient(135deg, #4a9eff, #6bb6ff);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 158, 255, 0.4);
}

/* Content Area */
.content-area {
  flex: 1;
  display: flex;
  min-height: 89vh;
  overflow-y: auto;
}

/* Left Panel */
.left-panel {
  width: 350px;
  background: #2a2a2a;
  border-right: 1px solid #444;
  padding: 2rem;
}

.panel-title {
  color: #4a9eff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  color: #ccc;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-input,
.form-select {
  width: 100%;
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #444;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #4a9eff;
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

/* Center Panel */
.center-panel {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.prompt-header {
  margin-bottom: 1.5rem;
}

.prompt-title {
  color: #4a9eff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.prompt-subtitle {
  color: #888;
  font-size: 0.9rem;
}

.prompt-subtitle a {
  color: #00d4aa;
  text-decoration: none;
}

.prompt-subtitle a:hover {
  text-decoration: underline;
}

.prompt-textarea {
  flex: 1;
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 1.5rem;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: none;
  min-height: 400px;
  transition: all 0.3s ease;
}

.prompt-textarea:focus {
  outline: none;
  border-color: #4a9eff;
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

/* Right Panel - Chat */
.right-panel {
  width: 400px;
  background: #2a2a2a;
  border-left: 1px solid #444;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 1.5rem;
  border-bottom: 1px solid #444;
  background: linear-gradient(135deg, #333, #2a2a2a);
}

.chat-title {
  color: #00d4aa;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-subtitle {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

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

.message {
  display: flex;
  gap: 0.75rem;
}

.message.user {
  flex-direction: row-reverse;
}

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

.message.assistant .message-avatar {
  background: linear-gradient(135deg, #00d4aa, #00b894);
}

.message.user .message-avatar {
  background: linear-gradient(135deg, #4a9eff, #6bb6ff);
}

.message-content {
  background: #333;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  max-width: 80%;
  font-size: 0.9rem;
  line-height: 1.4;
}

.message.user .message-content {
  background: linear-gradient(135deg, #4a9eff20, #6bb6ff20);
  border: 1px solid #4a9eff40;
}

.chat-input-area {
  padding: 1.5rem;
  border-top: 1px solid #444;
  background: #333;
}

.chat-input-container {
  display: flex;
  gap: 0.75rem;
}

.chat-input {
  flex: 1;
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #444;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.chat-input:focus {
  outline: none;
  border-color: #00d4aa;
  box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

.chat-send-btn {
  background: linear-gradient(135deg, #00d4aa, #00b894);
  color: #ffffff;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4);
}

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

/* Responsive */
@media (max-width: 1200px) {
  .right-panel {
    width: 350px;
  }
  .left-panel {
    width: 300px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .main-content {
    margin-left: 0;
  }
  .content-area {
    flex-direction: column;
  }
  .left-panel,
  .right-panel {
    width: 100%;
  }
}
