/* ============================================================
   Tukaram Consultancy - Calling Agent Stylesheet
   Brand palette: deep navy + saffron/gold + ivory
   ============================================================ */
:root {
  --navy-900: #0f1e3d;
  --navy-800: #1a2b4a;
  --navy-700: #2a3f63;
  --saffron:  #ff9933;
  --gold:     #c9a227;
  --ivory:    #faf7f0;
  --white:    #ffffff;
  --gray-100: #f3f5f9;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --green-500: #22c55e;
  --red-500:   #ef4444;
  --shadow: 0 4px 12px rgba(15, 30, 61, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 30, 61, 0.12);
  --shadow-lg: 0 16px 48px rgba(15, 30, 61, 0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--ivory);
  color: var(--navy-900);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--saffron); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Landing page ---------- */
.landing {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.landing::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,153,51,0.15), transparent 70%);
  pointer-events: none;
}
.landing::after {
  content: "";
  position: absolute;
  bottom: -200px; left: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,162,39,0.12), transparent 70%);
  pointer-events: none;
}
.landing-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  position: relative;
  z-index: 1;
}

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--navy-900);
  font-weight: 800;
}
.brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 0.5px;
}
.topbar-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}
.topbar-links a {
  color: var(--white);
  opacity: 0.85;
}
.topbar-links a:hover { opacity: 1; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0;
}
.hero-left h1 {
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: 16px;
  font-weight: 700;
}
.hero-left h1 span {
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: 17px;
  opacity: 0.85;
  margin-bottom: 28px;
  max-width: 540px;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  color: var(--navy-900);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}
.hero-stats {
  display: flex;
  gap: 28px;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--saffron);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  opacity: 0.7;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Hero right - live preview card */
.hero-right {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}
.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.preview-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.preview-info strong { display: block; font-size: 15px; }
.preview-info small { font-size: 12px; opacity: 0.7; }
.preview-transcript {
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-height: 180px;
  max-height: 240px;
  overflow-y: auto;
  font-size: 13px;
  margin-bottom: 16px;
}
.preview-msg {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 85%;
}
.preview-msg.agent {
  background: rgba(255,153,51,0.15);
  border-left: 3px solid var(--saffron);
}
.preview-msg.caller {
  background: rgba(255,255,255,0.08);
  border-left: 3px solid rgba(255,255,255,0.4);
  margin-left: auto;
}
.preview-msg small {
  display: block;
  font-size: 10px;
  opacity: 0.6;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.preview-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: 0.8;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Sections */
.section {
  padding: 60px 0;
}
.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  opacity: 0.7;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--saffron);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,153,51,0.2), rgba(201,162,39,0.2));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}
.feature-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.feature-card p {
  font-size: 13px;
  opacity: 0.8;
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  opacity: 0.6;
}
.footer a { color: var(--saffron); }

/* Responsive */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-left h1 { font-size: 30px; }
  .hero-stats { gap: 16px; }
  .topbar-links { display: none; }
}

/* ============================================================
   CALL PAGE
   ============================================================ */
.call-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
}
.call-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.call-header .brand { font-size: 16px; }
.call-header .brand-logo { width: 32px; height: 32px; font-size: 16px; }

.call-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 0;
}

@media (max-width: 900px) {
  .call-body { grid-template-columns: 1fr; }
  .call-sidebar { display: none; }
}

/* Main conversation area */
.call-main {
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-height: 0;
}
.call-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  font-size: 14px;
}
.call-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--saffron);
}
.call-state-pill {
  padding: 4px 10px;
  background: rgba(34,197,94,0.2);
  border: 1px solid rgba(34,197,94,0.4);
  border-radius: 12px;
  font-size: 11px;
  color: var(--green-500);
}
.call-state-pill.idle {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
}
.call-state-pill.listening {
  background: rgba(255,153,51,0.2);
  border-color: var(--saffron);
  color: var(--saffron);
}

.transcript {
  flex: 1;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius);
  padding: 20px;
  overflow-y: auto;
  min-height: 300px;
  max-height: calc(100vh - 320px);
}
.transcript-msg {
  margin-bottom: 14px;
  max-width: 80%;
}
.transcript-msg.agent {
  margin-right: auto;
}
.transcript-msg.caller {
  margin-left: auto;
  text-align: right;
}
.tm-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  display: inline-block;
}
.transcript-msg.agent .tm-bubble {
  background: rgba(255,153,51,0.15);
  border: 1px solid rgba(255,153,51,0.3);
  border-top-left-radius: 4px;
}
.transcript-msg.caller .tm-bubble {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-top-right-radius: 4px;
}
.tm-meta {
  font-size: 10px;
  opacity: 0.6;
  margin: 4px 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Control bar */
.call-controls {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius);
}
.call-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.2s;
  position: relative;
}
.call-btn.start {
  background: var(--green-500);
  color: white;
}
.call-btn.start:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 8px rgba(34,197,94,0.2);
}
.call-btn.end {
  background: var(--red-500);
  color: white;
}
.call-btn.end:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 8px rgba(239,68,68,0.2);
}
.call-btn.mic {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.call-btn.mic:hover { background: rgba(255,255,255,0.2); }
.call-btn.mic.active {
  background: var(--saffron);
  color: var(--navy-900);
  animation: mic-pulse 1.5s infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,153,51,0.5); }
  50% { box-shadow: 0 0 0 12px rgba(255,153,51,0); }
}
.call-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.call-hint {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 8px;
  text-align: center;
}

/* Sidebar - quick info */
.call-sidebar {
  background: rgba(0,0,0,0.15);
  border-left: 1px solid rgba(255,255,255,0.1);
  padding: 24px;
  overflow-y: auto;
}
.sidebar-section {
  margin-bottom: 24px;
}
.sidebar-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-bottom: 10px;
  font-weight: 600;
}
.lead-card {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
}
.lead-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.lead-row:last-child { border-bottom: none; }
.lead-row strong { color: var(--saffron); }

.product-chip {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin: 2px;
  border: 1px solid rgba(255,255,255,0.1);
}
.quick-products {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ============================================================
   EMBED WIDGET MODE
   ============================================================ */
.widget-body {
  width: 100vw;
  height: 100vh;
  background: var(--navy-900);
  color: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.widget-header {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.widget-header .brand-logo { width: 32px; height: 32px; font-size: 16px; }
.widget-header .brand-text { font-size: 13px; }
.widget-header .brand-text small { font-size: 10px; }
.widget-body .transcript {
  flex: 1;
  border-radius: 0;
  background: var(--navy-900);
  padding: 16px;
  max-height: none;
}
.widget-controls {
  padding: 12px;
  background: var(--navy-800);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-page {
  min-height: 100vh;
  background: var(--gray-100);
}
.dash-header {
  background: var(--navy-900);
  color: var(--white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-header .brand { color: var(--white); }
.dash-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .dash-container { grid-template-columns: 1fr; }
}
.dash-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.dash-card h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-card h3 .count {
  background: var(--saffron);
  color: var(--navy-900);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 700px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
.dash-stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.dash-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--saffron);
}
.dash-stat-label {
  font-size: 12px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.call-list, .lead-list {
  max-height: 480px;
  overflow-y: auto;
}
.call-row, .lead-row-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  margin-bottom: 8px;
  font-size: 13px;
}
.call-row.live {
  background: rgba(255,153,51,0.08);
  border-left: 3px solid var(--saffron);
}
.call-row strong, .lead-row-item strong {
  color: var(--navy-900);
}
.call-row .meta, .lead-row-item .meta {
  display: block;
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
}
.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--gray-500);
  font-size: 13px;
}
.transcript-preview {
  background: var(--white);
  padding: 8px;
  border-radius: 6px;
  margin-top: 8px;
  font-size: 12px;
  max-height: 80px;
  overflow-y: auto;
  color: var(--gray-700);
}
.tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}
.tag-catalog { background: rgba(34,197,94,0.15); color: var(--green-500); }
.tag-subscription { background: rgba(255,153,51,0.15); color: var(--saffron); }
.tag-lead { background: rgba(239,68,68,0.15); color: var(--red-500); }
