/* ==========================================================================
   ScaleFaster Agent Hub - Premium Design System
   ========================================================================== */

/* Google Fonts - Inter & Outfit */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Color Palette */
  --bg-primary: #06060e;
  --bg-secondary: #0c0d21;
  --glass-bg: rgba(13, 14, 33, 0.55);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  
  --color-primary: #6366f1; /* Indigo */
  --color-primary-glow: rgba(99, 102, 241, 0.15);
  --color-secondary: #a855f7; /* Violet */
  --color-secondary-glow: rgba(168, 85, 247, 0.15);
  --color-accent: #06b6d4; /* Cyan */
  --color-accent-glow: rgba(6, 182, 212, 0.15);
  
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;

  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(8, 9, 21, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: var(--transition-smooth);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  padding-left: 0.5rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item button {
  width: 100%;
  background: none;
  border: none;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
}

.nav-item button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: var(--transition-smooth);
}

.nav-item.active button,
.nav-item button:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active button {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
  border-left: 3px solid var(--color-primary);
  padding-left: calc(1rem - 3px);
  color: #fff;
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.08);
}

.nav-item.active button svg {
  color: var(--color-primary);
  filter: drop-shadow(0 0 8px var(--color-primary));
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  padding-top: 1.5rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-success);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-success);
  animation: pulse 2s infinite;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem 3rem;
  max-width: 1400px;
  width: calc(100% - var(--sidebar-width));
}

header.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.header-title h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}

.header-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.45);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  border-radius: 50px;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

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

.profile-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Dashboard Views (Tab views) */
.tab-view {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-view.active {
  display: block;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* General Component Styling */
h2.card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

h2.card-title svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-primary);
  stroke-width: 2;
  fill: none;
}

/* ==========================================================================
   Tab 1: Overview Dashboard
   ========================================================================== */

.stat-card {
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  fill: none;
}

.stat-card:nth-child(1) .stat-icon svg { stroke: var(--color-primary); }
.stat-card:nth-child(2) .stat-icon svg { stroke: var(--color-secondary); }
.stat-card:nth-child(3) .stat-icon svg { stroke: var(--color-accent); }

.stat-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.stat-trend.up {
  color: var(--color-success);
  background: rgba(16, 185, 129, 0.08);
}

/* Activity feed log styling on home tab */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-badge.voice { background: rgba(99, 102, 241, 0.1); color: var(--color-primary); }
.activity-badge.sms { background: rgba(6, 182, 212, 0.1); color: var(--color-accent); }
.activity-badge.webhook { background: rgba(168, 85, 247, 0.1); color: var(--color-secondary); }

.activity-badge svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.activity-details {
  flex-grow: 1;
}

.activity-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.activity-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.activity-time {
  font-size: 0.72rem;
  color: var(--text-dark);
  font-weight: 500;
  white-space: nowrap;
}

/* Quick ROI bar widget */
.roi-bar-widget {
  margin-top: 1.5rem;
}

.roi-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.roi-bar-outer {
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
}

.roi-bar-inner {
  height: 100%;
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  border-radius: 20px;
  width: 82%;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  animation: loadBar 1.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

/* ==========================================================================
   Tab 2: Voice Agents Simulator
   ========================================================================== */

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.agent-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.agent-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.agent-card.selected {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.08));
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.agent-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
  border: 2px solid var(--glass-border);
  transition: var(--transition-smooth);
  position: relative;
}

.agent-card.selected .agent-avatar {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

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

/* Config fields */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

/* Simulator Call Console */
.console-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  min-height: 480px;
  position: relative;
}

.simulator-status {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.simulator-status.active {
  color: var(--color-accent);
}

/* Wave visualizer */
.wave-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 90px;
  margin-bottom: 2.5rem;
}

.wave-bar {
  width: 6px;
  height: 12px;
  background: linear-gradient(to top, var(--color-primary), var(--color-accent));
  border-radius: 10px;
  transition: height 0.15s ease;
}

.wave-container.active .wave-bar {
  animation: waveHeight 1.2s ease-in-out infinite alternate;
}

/* Call Control Buttons */
.call-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.call-btn.start {
  background: var(--color-success);
  color: white;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

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

.call-btn.stop {
  background: var(--color-danger);
  color: white;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.call-btn.stop:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.call-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Live transcript log */
.transcript-card {
  width: 100%;
  margin-top: 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  height: 140px;
  overflow-y: auto;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.transcript-line {
  line-height: 1.4;
  opacity: 0.9;
  animation: slideUp 0.3s ease-out;
}

.transcript-line.agent {
  color: var(--color-accent);
}

.transcript-line.user {
  color: #fff;
  text-align: right;
}

.transcript-line .speaker {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  display: block;
}

/* ==========================================================================
   Tab 3: SMS automation simulator
   ========================================================================== */

.smartphone-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.smartphone-frame {
  width: 320px;
  height: 560px;
  background: #090a14;
  border: 8px solid rgba(255, 255, 255, 0.12);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: relative;
}

.smartphone-notch {
  width: 120px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

.smartphone-header {
  background: rgba(13, 15, 33, 0.9);
  padding: 1.5rem 1rem 0.75rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.smartphone-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
}

.smartphone-contact {
  display: flex;
  flex-direction: column;
}

.smartphone-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.smartphone-status {
  font-size: 0.7rem;
  color: var(--color-success);
}

.smartphone-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 80%);
}

.sms-bubble {
  max-width: 82%;
  padding: 0.65rem 0.85rem;
  border-radius: 16px;
  font-size: 0.8rem;
  line-height: 1.4;
  position: relative;
  animation: slideUp 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.sms-bubble.in {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  color: #fff;
}

.sms-bubble.out {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  color: white;
}

.sms-time {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.25rem;
  text-align: right;
}

.sms-bubble.in .sms-time {
  color: var(--text-muted);
}

.sms-typing {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.65rem 1rem;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  display: none;
}

.sms-typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 10px;
}

.sms-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1s infinite alternate;
}

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

.smartphone-footer {
  padding: 0.75rem 1rem;
  background: rgba(13, 15, 33, 0.9);
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.smartphone-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0.45rem 1rem;
  color: #fff;
  font-size: 0.8rem;
  outline: none;
}

.smartphone-send {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.smartphone-send:hover {
  transform: scale(1.05);
  background: var(--color-secondary);
}

.smartphone-send svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   Tab 4: Live Webhook Log
   ========================================================================== */

.terminal-container {
  background: #04040a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.terminal-header {
  background: #0c0d18;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-controls {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.terminal-body {
  padding: 1.5rem;
  height: 480px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  color: #38bdf8;
  line-height: 1.5;
}

.terminal-line {
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease-out;
}

.terminal-time {
  color: var(--text-dark);
  margin-right: 0.75rem;
}

.terminal-tag {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.75rem;
}

.terminal-tag.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.terminal-json {
  display: block;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--color-primary);
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  border-radius: 0 8px 8px 0;
  color: #a7f3d0;
  white-space: pre-wrap;
}

/* ==========================================================================
   Tab 5: ROI Analytics
   ========================================================================== */

/* Circular chart widget */
.progress-ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.progress-ring-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 1.5rem;
}

.progress-ring-circle {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-ring-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
}

/* Dynamic CSS Bars Chart */
.chart-container {
  height: 240px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
}

.chart-bar {
  width: 36px;
  background: linear-gradient(to top, var(--color-primary), var(--color-accent));
  border-radius: 8px 8px 0 0;
  transition: height 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
  position: relative;
}

.chart-bar:hover {
  filter: brightness(1.2);
}

.chart-bar-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--bg-primary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.chart-bar:hover .chart-bar-tooltip {
  opacity: 1;
}

.chart-label {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Animations & Transitions
   ========================================================================== */

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes waveHeight {
  0% { height: 12px; }
  100% { height: 80px; }
}

@keyframes typingBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

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

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

@keyframes loadBar {
  from { width: 0%; }
}

/* Custom wave animation heights for natural speech feeling */
.wave-container .wave-bar:nth-child(2n) { animation-delay: 0.15s; }
.wave-container .wave-bar:nth-child(3n) { animation-delay: 0.3s; }
.wave-container .wave-bar:nth-child(4n) { animation-delay: 0.45s; }
.wave-container .wave-bar:nth-child(5n) { animation-delay: 0.6s; }

/* Sidebar backdrop overlay for mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* Sidebar close button */
.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
}

/* Hamburger toggle button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 0.75rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.menu-toggle svg {
  display: block;
  stroke: var(--text-main);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Sidebar Drawer on Mobile */
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    box-shadow: 20px 0 40px rgba(0,0,0,0.5);
    z-index: 1000;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  /* Show close button on sidebar when open on mobile */
  .sidebar-close {
    display: block;
  }
  
  /* Make main content occupy full width */
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1.5rem;
  }
  
  /* Enable the toggle button */
  .menu-toggle {
    display: block;
  }
  
  /* Header flex changes */
  header.top-navbar {
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
  }
  
  .header-title {
    flex-grow: 1;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  /* Grids and elements adapt to small screen widths */
  .grid-2, .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }
  
  .agent-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Circular ROI display responsive alignment */
  .progress-ring-card > div {
    flex-direction: column !important;
    align-items: center;
    gap: 1.5rem;
  }
  
  /* Prevent horizontal overflows of phone chassis */
  .smartphone-container {
    padding: 0.5rem 0;
  }
  
  .smartphone-frame {
    width: 100%;
    max-width: 320px;
  }
}
