/* ==========================================================================
   S-WAVES BY SEAGULLDT — EXECUTIVE DESKTOP STYLESHEET
   Strict Dark/Light Contrast Rules • Zero Emojis • Sleek B2B Interface
   ========================================================================== */

:root {
  --bg-apex: #0a0908;
  --bg-card: #141312;
  --bg-elevated: #1e1d1b;
  --border-subtle: #2d2b28;
  --border-active: #4a4642;
  --text-primary: #f7f4ef;
  --text-secondary: #9c978f;
  --text-muted: #6b6762;
  --accent-gold: #c5a880;
  --accent-emerald: #10b981;
  --accent-crimson: #ef4444;
  --accent-amber: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background-color: var(--bg-apex);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.swaves-header {
  height: 64px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-gold);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 0.72rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.header-status-center {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.scarcity-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  background: rgba(197, 168, 128, 0.08);
  border: 1px solid rgba(197, 168, 128, 0.25);
  padding: 4px 12px;
  border-radius: 9999px;
  color: var(--accent-gold);
}

.stealth-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 12px;
  border-radius: 9999px;
  color: var(--accent-emerald);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  background: var(--bg-elevated);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* Main Layout Grid */
.dashboard-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 330px 1fr 340px;
  gap: 1px;
  background-color: var(--border-subtle);
}

.panel {
  background-color: var(--bg-apex);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 1rem 1.25rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Contacts Panel */
.contacts-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-card:hover {
  border-color: var(--border-active);
  background: var(--bg-elevated);
}

.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.contact-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-role {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.contact-clock-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.badge-window-active {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.btn-send-wave {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.btn-send-wave:hover {
  background: var(--border-subtle);
}

/* Center Stage: Active Wave Session */
.center-stage {
  background: radial-gradient(circle at 50% 30%, #171614 0%, #0a0908 70%);
  display: flex;
  flex-direction: column;
}

.session-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.wave-avatar-glow {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  box-shadow: 0 0 35px rgba(197, 168, 128, 0.15);
}

.wave-status-text {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.wave-meta-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
}

.dashcam-indicator-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 2rem;
}

/* Controls Bar */
.controls-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-control {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-control:hover {
  background: var(--bg-elevated);
  border-color: var(--border-active);
}

.btn-hangup {
  background: var(--accent-crimson);
  color: #fff;
  border: none;
}

.btn-hangup:hover {
  background: #dc2626;
}

/* Document Sharing Sub-Panel */
.doc-share-strip {
  width: 100%;
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-mode-toggle {
  display: flex;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.doc-mode-btn {
  font-size: 0.75rem;
  padding: 4px 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.doc-mode-btn.active {
  background: var(--border-active);
  color: var(--text-primary);
  font-weight: 600;
}

/* Canvas DRM Document Viewer */
.drm-canvas-wrapper {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 650px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #fff;
  display: none;
}

#drm-canvas {
  width: 100%;
  display: block;
}

/* In-Call 35-Word Chat Panel */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.4;
}

.chat-bubble.peer {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.chat-bubble.self {
  align-self: flex-end;
  background: var(--bg-elevated);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
}

.chat-sender {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.chat-input-area {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}

.chat-word-counter-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.chat-textarea {
  flex: 1;
  background: var(--bg-apex);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  resize: none;
  height: 48px;
}

.chat-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.btn-chat-send {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.btn-chat-send:hover {
  background: var(--border-active);
}

/* 45-Second Post-Call Safety Banner */
.safety-banner {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 420px;
  background: #171614;
  border: 1px solid var(--accent-crimson);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  z-index: 9999;
}

.safety-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.safety-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-crimson);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.safety-timer-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-crimson);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.safety-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.safety-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-report {
  flex: 1;
  background: var(--accent-crimson);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-dismiss {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
}

/* SVG Icon helper */
.icon-svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  vertical-align: middle;
}
