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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0f;
  color: #e0e0e0;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 12px;
  gap: 12px;
}

/* Agent Profile Bar */
#agentBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #141420;
  border-radius: 10px;
  border: 1px solid #1e1e30;
}

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

.agent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6c5ce7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.agent-info {
  display: flex;
  flex-direction: column;
}

.agent-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.agent-role {
  font-size: 10px;
  color: #888;
}

.agent-stats {
  display: flex;
  gap: 12px;
}

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

.agent-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.agent-stat-label {
  font-size: 9px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Header */
#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #141420;
  border-radius: 10px;
  border: 1px solid #1e1e30;
}

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

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  transition: background 0.3s;
}

.status-dot.connected {
  background: #00e676;
  box-shadow: 0 0 8px #00e67688;
}

.status-dot.listening {
  background: #00e676;
  box-shadow: 0 0 8px #00e67688;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 4px #00e67644; }
  50% { box-shadow: 0 0 12px #00e676aa; }
}

.header-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.btn-lang {
  background: #1e1e30;
  color: #ccc;
  border: 1px solid #333;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.btn-lang:hover {
  background: #2a2a40;
  color: #fff;
}

.btn-lang.tr {
  background: #e74c3c22;
  color: #e74c3c;
  border-color: #e74c3c44;
}

.btn-call {
  background: #00b894;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-call:hover { background: #00d2a0; }
.btn-call.active {
  background: #e74c3c;
  animation: pulse 1.5s infinite;
}

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

select.btn-lang {
  padding: 4px 6px;
  font-size: 10px;
  max-width: 140px;
}

.btn-rec {
  background: #c0392b;
  color: #fff;
  border: 1px solid #e74c3c;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-rec.recording {
  animation: pulse 1.5s infinite;
}

.btn-rec:hover { background: #e74c3c; }

.btn-mute {
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mute:hover { background: #444; }
.btn-mute.muted {
  background: #f39c12;
  border-color: #f39c12;
  color: #000;
}

.btn-connect {
  background: #6c5ce7;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-connect:hover {
  background: #7c6cf7;
  transform: translateY(-1px);
}

.btn-connect.active {
  background: #e74c3c;
}

/* Sentiment Bar */
#sentimentBar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #141420;
  border-radius: 10px;
  border: 1px solid #1e1e30;
}

.sentiment-label {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
}

.sentiment-track {
  flex: 1;
  height: 6px;
  background: #1e1e30;
  border-radius: 3px;
  overflow: hidden;
}

.sentiment-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #e74c3c, #f39c12, #00e676);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.sentiment-text {
  font-size: 11px;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
  color: #f39c12;
  transition: color 0.3s;
}

/* Sections */
.section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.section-icon {
  font-size: 14px;
}

/* Transcript */
#transcriptSection {
  flex: 0 0 auto;
}

.transcript-box {
  background: #141420;
  border: 1px solid #1e1e30;
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 12px;
}

.transcript-box::-webkit-scrollbar {
  width: 4px;
}

.transcript-box::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

.transcript-line {
  margin-bottom: 4px;
  animation: fadeIn 0.3s ease;
}

.transcript-line .speaker {
  font-weight: 600;
  color: #6c5ce7;
}

.transcript-line .speaker.customer {
  color: #00b894;
}

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

/* Suggestions */
#suggestionsSection {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.suggestions-box {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestions-box::-webkit-scrollbar {
  width: 4px;
}

.suggestions-box::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

.suggestion-card {
  background: #141420;
  border: 1px solid #1e1e30;
  border-radius: 10px;
  padding: 12px;
  animation: slideIn 0.4s ease;
  transition: border-color 0.2s;
}

.suggestion-card:hover {
  border-color: #6c5ce744;
}

.suggestion-card.urgent {
  border-left: 3px solid #e74c3c;
}

.suggestion-card.tip {
  border-left: 3px solid #6c5ce7;
}

.suggestion-card.info {
  border-left: 3px solid #00b894;
}

.suggestion-card.pricing {
  border-left: 3px solid #f39c12;
}

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

.suggestion-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.suggestion-tag.objection { background: #e74c3c22; color: #e74c3c; }
.suggestion-tag.tip { background: #6c5ce722; color: #6c5ce7; }
.suggestion-tag.info { background: #00b89422; color: #00b894; }
.suggestion-tag.pricing { background: #f39c1222; color: #f39c12; }
.suggestion-tag.legal { background: #e74c3c22; color: #e74c3c; }

.suggestion-title {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  margin-bottom: 4px;
}

.suggestion-body {
  font-size: 12px;
  color: #bbb;
  line-height: 1.6;
}

.suggestion-body strong {
  color: #fff;
}

.suggestion-body .highlight {
  color: #6c5ce7;
  font-weight: 600;
}

.suggestion-body ul {
  margin: 4px 0 0 16px;
  padding: 0;
}

.suggestion-body li {
  margin-bottom: 2px;
}

/* Streaming dots */
.streaming-dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}

.streaming-dots span {
  width: 4px;
  height: 4px;
  background: #6c5ce7;
  border-radius: 50%;
  animation: dotPulse 1s infinite;
}

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

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

/* (Quick actions moved to bottom bar) */

/* Bottom Bar — thin strip with quick actions + emergency */
#bottomBar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: #0e0e18;
  border-top: 1px solid #1e1e30;
  border-radius: 0 0 10px 10px;
  position: relative;
}

.bar-btn {
  padding: 4px 10px;
  background: #1a1a2a;
  border: 1px solid #2a2a3a;
  border-radius: 6px;
  color: #999;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.bar-btn:hover {
  background: #2a2a3a;
  color: #fff;
  border-color: #6c5ce744;
}

.bar-divider {
  width: 1px;
  height: 16px;
  background: #333;
  margin: 0 2px;
}

.bar-emergency {
  background: #1a1014;
  border-color: #e74c3c44;
  color: #e74c3c;
}

.bar-emergency:hover {
  background: #e74c3c;
  color: #fff;
}

.escalation-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 8px;
  background: #141420;
  border: 1px solid #e74c3c44;
  border-radius: 8px;
  padding: 6px;
  gap: 4px;
  margin-bottom: 4px;
  z-index: 10;
}

.escalation-popup.show {
  display: flex;
  flex-direction: column;
}

.esc-option {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #2a2a3a;
  border-radius: 6px;
  color: #ccc;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.esc-option:hover {
  background: #1e1e30;
  color: #fff;
}

.esc-option.urgent {
  color: #e74c3c;
  border-color: #e74c3c44;
}

.esc-option.urgent:hover {
  background: #e74c3c;
  color: #fff;
}

/* Placeholder */
.placeholder {
  color: #555;
  font-size: 12px;
  text-align: center;
  padding: 20px;
}
