@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&family=Space+Mono:wght@400;700&display=swap");

:root {
  --bg-main: #050814;
  --bg-elevated: #0b1020;
  --bg-panel: #111729;
  --accent-cyan: #35f2ff;
  --accent-green: #4dff91;
  --accent-magenta: #ff2ddf;
  --accent-red: #ff4b5c;
  --text-primary: #f5f7ff;
  --text-secondary: #9aa4ce;
  --border-subtle: rgba(120, 130, 180, 0.4);
  --shadow-soft: 0 0 24px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Rajdhani", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #1b2241 0, #050814 45%, #02030a 100%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(to right, #050814 0, #0b1020 40%, #050814 100%);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.logo-glitch {
  font-family: "Space Mono", monospace;
  font-size: 22px;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(53, 242, 255, 0.7),
    0 0 24px rgba(53, 242, 255, 0.5);
}

.logo-sub {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--text-secondary);
}

.status-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.badge-idle {
  background: rgba(120, 130, 180, 0.2);
  border-color: rgba(120, 130, 180, 0.6);
  color: var(--text-secondary);
}

.badge-live {
  background: rgba(255, 75, 92, 0.16);
  border-color: rgba(255, 75, 92, 0.9);
  color: var(--accent-red);
  box-shadow: 0 0 16px rgba(255, 75, 92, 0.7);
  animation: pulse 1.3s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 75, 92, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(255, 75, 92, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 75, 92, 0);
  }
}

.app-main {
  flex: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 24px 20px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-panel));
  border-radius: 16px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(80, 90, 140, 0.7);
  box-shadow: var(--shadow-soft);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-cyan);
}

.caller-id-value {
  font-family: "Space Mono", monospace;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(9, 14, 32, 0.9);
  border: 1px dashed rgba(120, 130, 180, 0.7);
  color: var(--text-primary);
  word-break: break-all;
}

.metrics-panel {
  font-size: 13px;
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid rgba(80, 90, 140, 0.3);
}

.metric:first-of-type {
  border-top: none;
}

.metric-label {
  color: var(--text-secondary);
}

.metric-value {
  font-family: "Space Mono", monospace;
  color: var(--accent-green);
}

.chat-section {
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-panel));
  border-radius: 18px;
  border: 1px solid rgba(80, 90, 140, 0.7);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}

.chat-header {
  padding: 12px 18px 8px;
  border-bottom: 1px solid rgba(80, 90, 140, 0.7);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.chat-header h2 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-green);
}

.chat-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

.chat-container {
  flex: 1;
  padding: 14px 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.chat-container::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.3) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.25) 1px,
      transparent 1px
    );
  background-size: 36px 36px;
  pointer-events: none;
}

.message-row {
  display: flex;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.message-row.customer {
  justify-content: flex-start;
}

.message-row.agent {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 68%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  backdrop-filter: blur(6px);
}

.message-bubble.customer {
  background: rgba(230, 235, 255, 0.9);
  color: #050814;
  border: 1px solid rgba(210, 220, 255, 0.8);
  box-shadow: 0 0 12px rgba(100, 150, 255, 0.35);
}

.message-bubble.agent {
  background: radial-gradient(circle at top left, #3dffc8 0, #00c6ff 40%, #0d1b2b 100%);
  color: #020308;
  border: 1px solid rgba(77, 255, 145, 0.7);
  box-shadow: 0 0 16px rgba(0, 230, 170, 0.6);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
}

.message-meta .role {
  font-weight: 600;
}

.message-meta .time {
  font-family: "Space Mono", monospace;
}

.app-footer {
  padding: 8px 24px 14px;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  opacity: 0.7;
}

/* Scrollbar styling */
.chat-container::-webkit-scrollbar {
  width: 8px;
}

.chat-container::-webkit-scrollbar-track {
  background: rgba(5, 8, 20, 0.8);
}

.chat-container::-webkit-scrollbar-thumb {
  background: rgba(80, 90, 140, 0.9);
  border-radius: 999px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 130, 180, 1);
}

/* Responsive */
@media (max-width: 900px) {
  .app-main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .chat-section {
    order: 1;
  }
}

@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .app-main {
    padding-inline: 14px;
  }
}




