/* === Product mockup styles === */

/* ---- Wrapper / chrome shared ---- */
.app-shell {
  background: linear-gradient(180deg, rgba(20,18,32,0.85), rgba(12,11,22,0.88));
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-glow);
  position: relative;
}
.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(155,124,255,0.08), transparent 40%);
  pointer-events: none;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(8, 7, 16, 0.6);
}
.tl {
  display: flex; gap: 6px;
}
.tl span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #2a2937;
}
.app-title {
  font-size: 12px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.app-tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.app-tab {
  font-size: 11px;
  color: var(--fg-3);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
}
.app-tab.active {
  background: rgba(155,124,255,0.12);
  color: var(--lav-200);
}

/* ---- Hybrid mock layout ---- */
.hybrid {
  display: grid;
  grid-template-columns: 168px 232px 1fr 232px;
  grid-template-rows: 1fr;
  height: 620px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.hybrid > * { min-width: 0; }

/* keep floating chrome out of the auto-flow */
.hybrid > .event-ribbon,
.hybrid > .cal-float {
  grid-row: 1;
  grid-column: 1;
}

/* Sidebar */
.side {
  border-right: 1px solid var(--hairline);
  padding: 16px 14px;
  background: rgba(8, 7, 16, 0.4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-section {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--fg-4);
  letter-spacing: 0.16em;
  padding: 8px 8px 4px;
  font-family: var(--font-mono);
}
.side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-2);
  cursor: pointer;
  transition: background 0.12s ease;
  position: relative;
}
.side-item:hover { background: rgba(255,255,255,0.04); }
.side-item.active {
  background: rgba(155,124,255,0.10);
  color: var(--fg);
}
.side-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px;
  background: var(--lav-400);
  box-shadow: 0 0 8px var(--lav-500);
}
.side-item .icon {
  width: 16px; height: 16px;
  color: var(--fg-3);
  flex-shrink: 0;
}
.side-item.active .icon { color: var(--lav-300); }
.side-item .badge {
  margin-left: auto;
  font-size: 10px;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--fg-3);
}
.side-item.active .badge {
  background: var(--lav-600);
  color: white;
}

/* Inbox list (middle column) */
.inbox {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--hairline);
  background: rgba(10, 9, 20, 0.3);
}
.inbox-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 10px;
}
.inbox-head .title {
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
}
.inbox-head .filter {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--fg-3);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
}
.chip.active {
  background: rgba(155,124,255,0.12);
  color: var(--lav-200);
  border-color: rgba(155,124,255,0.25);
}

.inbox-list {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.inbox {
  min-height: 0;
}
.lead {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  position: relative;
  transition: background 0.12s ease;
}
.lead:hover { background: rgba(255,255,255,0.02); }
.lead.active { background: rgba(155,124,255,0.06); }
.lead.active::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--lav-400);
}
.lead .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a3aa0, #8b6dff);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
  color: white;
  position: relative;
}
.lead .avatar.green { background: linear-gradient(135deg, #2a8a5e, #6ee7b7); }
.lead .avatar.blue { background: linear-gradient(135deg, #2a3d8a, #93c5fd); }
.lead .avatar.pink { background: linear-gradient(135deg, #8a2a5e, #f0a3c7); }
.lead .avatar.amber { background: linear-gradient(135deg, #8a6a2a, #f5d27e); }

.lead .info { min-width: 0; }
.lead .name {
  font-size: 13px; color: var(--fg);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lead .preview {
  font-size: 12px; color: var(--fg-3);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lead .meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.lead .time {
  font-size: 10px; color: var(--fg-4);
  font-family: var(--font-mono);
}
.lead .stage {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stage.hot { background: rgba(248,113,113,0.12); color: #fca5a5; }
.stage.warm { background: rgba(245,210,126,0.12); color: #fcd97a; }
.stage.cold { background: rgba(147,197,253,0.12); color: #93c5fd; }
.stage.qual { background: rgba(110,231,183,0.12); color: #6ee7b7; }
.stage.book { background: rgba(155,124,255,0.18); color: #c5b3ff; }

/* Conversation column */
.convo {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at top, rgba(124, 92, 246, 0.04) 0%, transparent 60%),
    rgba(10, 9, 20, 0.3);
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
.convo-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 10px;
}
.convo-head .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a8a5e, #6ee7b7);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: white;
}
.convo-head .name { font-size: 13px; color: var(--fg); }
.convo-head .sub { font-size: 11px; color: var(--fg-3); display: flex; align-items: center; gap: 6px; }
.convo-head .wa-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--wa);
  box-shadow: 0 0 8px rgba(37,211,102,0.6);
}
.convo-head-actions {
  margin-left: auto;
  display: flex; gap: 6px;
}
.head-action {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
}
.head-action:hover { color: var(--fg); background: rgba(255,255,255,0.06); }

.convo-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  scroll-behavior: smooth;
  /* fade out top edge so older messages dissolve naturally */
  mask-image: linear-gradient(180deg, transparent 0, black 24px, black calc(100% - 12px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, black 24px, black calc(100% - 12px), transparent 100%);
}
.convo-body::-webkit-scrollbar { width: 0; height: 0; }
.bubble {
  max-width: 78%;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 14px;
  position: relative;
  animation: fadeInUp 0.4s ease both;
  word-wrap: break-word;
}
.bubble.in {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.05);
  border-bottom-left-radius: 4px;
}
.bubble.out {
  align-self: flex-end;
  background: linear-gradient(135deg, #5a44c0, #8b6dff);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px -4px rgba(124,92,246,0.5);
}
.bubble.out::after {
  content: "✓✓";
  font-size: 9px;
  position: absolute;
  bottom: 3px; right: 8px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
}
.bubble.ai-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.7);
  display: block;
  margin-bottom: 2px;
  letter-spacing: 0.04em;
}
.bubble .ai-tag {
  display: flex; align-items: center; gap: 4px;
}
.bubble .ai-tag .spark {
  width: 8px; height: 8px;
}

.typing {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 10px 14px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  display: inline-flex;
  gap: 4px;
}
.typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lav-300);
  animation: typingBounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

.convo-input {
  border-top: 1px solid var(--hairline);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.input-fake {
  flex: 1;
  font-size: 12px;
  color: var(--fg-4);
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  font-family: var(--font-mono);
}
.ai-suggest {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--lav-300);
  padding: 6px 10px;
  background: rgba(155,124,255,0.10);
  border: 1px solid rgba(155,124,255,0.2);
  border-radius: 999px;
  font-family: var(--font-mono);
}

/* Lead panel (right column) */
.panel {
  background: rgba(10, 9, 20, 0.6);
  display: flex;
  flex-direction: column;
}
.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  font-family: var(--font-mono);
  display: flex; justify-content: space-between; align-items: center;
}
.panel-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  min-height: 0;
  flex: 1;
}
.score-ring {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ring {
  width: 64px; height: 64px;
  position: relative;
  flex-shrink: 0;
}
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring .track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 5; }
.ring .arc { fill: none; stroke: url(#scoreGrad); stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray 0.8s ease; }
.ring .label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 500;
  color: var(--fg);
}
.score-info .lbl {
  font-size: 10px; text-transform: uppercase; color: var(--fg-3);
  letter-spacing: 0.14em; font-family: var(--font-mono);
}
.score-info .val {
  font-size: 14px; color: var(--fg);
  margin-top: 2px;
}
.score-info .stage-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(110,231,183,0.12);
  color: #6ee7b7;
  font-family: var(--font-mono);
  display: inline-block;
  margin-top: 4px;
}

.kvs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--hairline);
}
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--fg-3); font-family: var(--font-mono); font-size: 11px; }
.kv .v { color: var(--fg); font-weight: 500; }

.signals {
  display: flex; flex-direction: column; gap: 6px;
}
.signal {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.4;
}
.signal .s-icon {
  width: 14px; height: 14px;
  color: var(--lav-300);
  flex-shrink: 0;
  margin-top: 2px;
}

.action-row {
  display: flex; gap: 8px; flex-direction: column;
  margin-top: auto;
}
.action-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(155,124,255,0.10);
  border: 1px solid rgba(155,124,255,0.22);
  border-radius: 10px;
  color: var(--lav-100);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.action-btn:hover { background: rgba(155,124,255,0.18); }
.action-btn .arrow { margin-left: auto; }
.action-btn.solid {
  background: linear-gradient(180deg, #a18bff 0%, #7757f0 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 24px -10px rgba(124, 92, 246, 0.6);
}
.action-btn.solid:hover { filter: brightness(1.1); }

/* Live event ribbon */
.event-ribbon {
  position: absolute;
  grid-row: 1; grid-column: 1;
  right: -22px;
  top: 90px;
  background: linear-gradient(180deg, rgba(20,18,32,0.96), rgba(12,11,22,0.96));
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow-float);
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  z-index: 5;
  animation: fadeInUp 0.6s ease both;
  max-width: 240px;
}
.event-ribbon .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
  animation: pulseDot 1.6s infinite;
  flex-shrink: 0;
}
.event-ribbon strong { color: var(--fg); font-weight: 500; }
.event-ribbon .ev-text { color: var(--fg-3); }

/* Calendar floating */
.cal-float {
  position: absolute;
  grid-row: 1; grid-column: 1;
  left: -28px;
  bottom: 60px;
  width: 240px;
  background: linear-gradient(180deg, rgba(20,18,32,0.96), rgba(12,11,22,0.96));
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-float);
  padding: 12px;
  z-index: 5;
}
.cal-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--fg-3);
  border-radius: 6px;
}
.cal-cell.dim { color: var(--fg-4); }
.cal-cell.has {
  background: rgba(155,124,255,0.10);
  color: var(--lav-200);
}
.cal-cell.book {
  background: var(--lav-600);
  color: white;
  font-weight: 500;
  box-shadow: 0 0 12px rgba(124,92,246,0.5);
}

@media (max-width: 1100px) {
  .hybrid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: auto;
  }
  .side, .inbox, .panel {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }
  .event-ribbon, .cal-float { display: none; }
}
