/* WSNE Consulting Business Development CRM Stylesheet */

/* Design Tokens & Theme Variables */
:root {
  --font-display: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Colors */
  --bg-main: #070b13;
  --bg-sidebar: rgba(10, 16, 30, 0.7);
  --bg-glass: rgba(20, 30, 55, 0.45);
  --bg-glass-active: rgba(30, 45, 80, 0.6);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-glow: rgba(0, 240, 255, 0.25);
  
  --primary-cyan: #00f0ff;
  --primary-cyan-glow: rgba(0, 240, 255, 0.4);
  --primary-cyan-soft: rgba(0, 240, 255, 0.1);
  
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.4);
  --accent-purple-soft: rgba(139, 92, 246, 0.1);
  
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.4);
  --accent-emerald-soft: rgba(16, 185, 129, 0.1);

  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.4);
  --accent-amber-soft: rgba(245, 158, 11, 0.1);

  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dimmed: #64748b;
  
  --shadow-neon: 0 0 15px rgba(0, 240, 255, 0.15);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 10% 20%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(0, 240, 255, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-cyan);
}

/* Layout System */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Header Component */
.app-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.header-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-accent {
  background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.header-nav {
  display: flex;
  gap: 12px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-btn.active {
  color: var(--primary-cyan);
  background: var(--primary-cyan-soft);
  border-color: rgba(0, 240, 255, 0.2);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.nav-btn-mgmt {
  color: var(--accent-purple);
}

.nav-btn-mgmt.active {
  color: var(--accent-purple);
  background: var(--accent-purple-soft);
  border-color: rgba(139, 92, 246, 0.25);
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-name-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}

.switch-user-link {
  font-size: 11px;
  color: var(--primary-cyan);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.switch-user-link:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-neon);
}

/* Main Layout Grid */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 70px);
}

/* Content Area */
.content-view {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  scroll-behavior: smooth;
}

/* SPA View Toggling */
.spa-view {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.spa-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Common Typography & Subheaders */
.view-header {
  margin-bottom: 25px;
}

.view-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: #fff;
  letter-spacing: -0.5px;
}

.view-header .subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* UI Panels & Cards */
.glass-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.glass-panel-glow {
  border-color: var(--border-glass-glow);
  box-shadow: var(--shadow-neon);
}

/* Dashboard Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.metric-desc {
  font-size: 11px;
  color: var(--text-dimmed);
}

/* Kanban Board Component */
.pipeline-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 15px;
  height: calc(100vh - 180px);
  align-items: flex-start;
}

.pipeline-column {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  background: rgba(10, 16, 30, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  max-height: 100%;
}

.pipeline-column-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pipeline-column-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Column specific accent colors */
.dot-new { background: var(--text-muted); }
.dot-contacted { background: var(--primary-cyan); }
.dot-meeting { background: var(--accent-amber); }
.dot-proposal { background: var(--accent-purple); }
.dot-negotiation { background: rgba(139, 92, 246, 0.7); }
.dot-active { background: var(--accent-emerald); }

.pipeline-column-count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.pipeline-cards-container {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 150px;
}

.pipeline-cards-container.dragover {
  background: rgba(0, 240, 255, 0.03);
  outline: 2px dashed rgba(0, 240, 255, 0.2);
  outline-offset: -4px;
}

/* Lead Cards */
.lead-card {
  background: rgba(20, 30, 55, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 14px;
  cursor: grab;
  transition: var(--transition-smooth);
}

.lead-card:active {
  cursor: grabbing;
}

.lead-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  background: rgba(30, 45, 80, 0.6);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.lead-card.dragging {
  opacity: 0.4;
  border: 1px dashed var(--primary-cyan);
}

.lead-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.lead-card-company {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.lead-card-industry {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.lead-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 10px;
  margin-top: 8px;
}

.lead-card-value {
  font-weight: 700;
  color: var(--primary-cyan);
}

.lead-card-agent {
  color: var(--text-dimmed);
  font-size: 10px;
}

.badge-source {
  font-size: 9px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Buttons System */
.btn {
  background: transparent;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary-cyan);
  color: #070b13;
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.2);
}

.btn-primary:hover {
  background: #00d2df;
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-accent {
  background: var(--accent-purple-soft);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c084fc;
}

.btn-accent:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-full {
  width: 100%;
}

/* Interactive Split Panels (Detail view layouts) */
.split-view-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 25px;
  height: calc(100vh - 160px);
}

.directory-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
}

.directory-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-glass);
}

.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.directory-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.directory-item {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.directory-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.directory-item.active {
  background: var(--primary-cyan-soft);
  border-left: 3px solid var(--primary-cyan);
}

.detail-main-panel {
  overflow-y: auto;
  padding-right: 8px;
}

/* Contact / Profile Card Design */
.profile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.profile-title-group h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
  font-size: 13px;
  color: var(--text-muted);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.info-item {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 14px;
  border-radius: 8px;
}

.info-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.info-val {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

/* Activity Logs & Feeds */
.activity-feed-section {
  margin-top: 25px;
}

.activity-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.activity-item {
  display: flex;
  gap: 15px;
  background: rgba(255,255,255,0.01);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
}

.activity-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.badge-call { background: var(--primary-cyan-soft); color: var(--primary-cyan); }
.badge-email { background: var(--accent-purple-soft); color: var(--accent-purple); }
.badge-meeting { background: var(--accent-amber-soft); color: var(--accent-amber); }
.badge-linkedin { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.activity-details {
  flex: 1;
}

.activity-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}

.activity-agent {
  color: var(--text-dimmed);
}

.activity-notes {
  color: var(--text-main);
  font-size: 13px;
}

.activity-outcome {
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent-emerald);
  font-style: italic;
}

/* Tasks / Follow-ups Section */
.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  margin-bottom: 10px;
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-notes {
  color: #fff;
  font-weight: 500;
}

.task-date {
  font-size: 11px;
  color: var(--text-muted);
}

.badge-task-type {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
  width: max-content;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-glass-glow);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.modal-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.modal-content p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}

/* User Selection Overlay */
.registration-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-glass-glow);
  border-radius: 16px;
  padding: 35px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-glass);
}

/* SVG Chart styles */
.svg-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-bar {
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.chart-text {
  font-family: var(--font-display);
  font-weight: 500;
  fill: var(--text-muted);
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
}

.chart-donut-base {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 8;
}

.chart-donut-seg {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease-in-out;
}

.chart-funnel-layer {
  fill-opacity: 0.15;
  stroke-width: 1.5;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.chart-funnel-layer:hover {
  fill-opacity: 0.35;
}

/* Leaderboard Grid / Rows */
.leaderboard-row {
  display: grid;
  grid-template-columns: 40px 1fr 100px 100px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  margin-bottom: 8px;
  align-items: center;
}

.leaderboard-rank {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-cyan);
}

.leaderboard-name {
  font-weight: 600;
  color: #fff;
}

.leaderboard-metric {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 600;
}

/* Status Labels & Indicators */
.status-indicator {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
  text-align: center;
}

.status-indicator.negotiation {
  background: var(--accent-purple-soft);
  color: #c084fc;
}

.status-indicator.active {
  background: var(--accent-emerald-soft);
  color: #34d399;
}

.status-indicator.lost {
  background: var(--danger-soft);
  color: #f87171;
}

.status-indicator.pipeline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* Dynamic Notification Toast */
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-emerald);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 200;
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(10px);
}

.toast.error {
  border-color: var(--danger);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Management Screen specific layout */
.mgmt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 20px;
}

.mgmt-chart-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.mgmt-table-card {
  grid-column: 1 / span 2;
}

.mgmt-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.mgmt-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-glass);
  font-weight: 600;
}

.mgmt-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

.mgmt-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Responsive Rules */
@media (max-width: 992px) {
  .split-view-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .mgmt-grid {
    grid-template-columns: 1fr;
  }
  .mgmt-table-card {
    grid-column: 1;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    height: auto;
    padding: 15px;
    gap: 15px;
  }
  .main-layout {
    height: auto;
  }
}
