/* ========================================
   GA ADMIN — SIDEBAR DASHBOARD
   Version 3.1 — Production Grade
   ======================================== */

:root {
  --bg: #0b0b0f;
  --bg2: #0e0e12;
  --surface: #121216;
  --surface2: #1a1a22;
  --surface3: #222230;
  --border: #2a2a35;
  --border2: #35354a;
  --text: #e8e8f0;
  --text2: #8888a0;
  --text3: #5a5a70;
  --accent: #e63946;
  --accent2: #ff4d5a;
  --accent-glow: rgba(230, 57, 70, 0.15);
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.15);
  --yellow: #f59e0b;
  --yellow-glow: rgba(245, 158, 11, 0.15);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.15);
  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.15);
  --purple: #a78bfa;
  --purple-glow: rgba(167, 139, 250, 0.15);
  --cyan: #22d3ee;
  --radius: 10px;
  --radius2: 14px;
  --radius3: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(230,57,70,0.1);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 240px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }
::selection { background: var(--accent); color: #fff; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent2); }

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

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

.sidebar-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
  letter-spacing: -0.3px;
}

.sidebar-logo span { color: var(--accent); font-weight: 900; }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  width: 100%;
  text-align: left;
}

.sidebar-link svg { flex-shrink: 0; opacity: 0.6; transition: opacity var(--transition); }
.sidebar-link:hover { color: var(--text); background: var(--surface2); }
.sidebar-link:hover svg { opacity: 1; }

.sidebar-link.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.sidebar-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid var(--border);
}

.sidebar-external {
  color: var(--text3);
}

.sidebar-external:hover {
  color: var(--accent);
}

/* ========================================
   MAIN LAYOUT
   ======================================== */
.main {
  margin-left: var(--sidebar-w);
  padding: 28px;
  min-height: 100vh;
}

.section { display: none; animation: fadeIn 0.3s ease; }
.section.active { display: block; }

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

.section-header { margin-bottom: 24px; }
.section-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.section-sub { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ========================================
   CONTROLS
   ======================================== */
.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: var(--radius);
  outline: none;
  transition: all var(--transition);
  min-width: 120px;
}

.form-group select:hover,
.form-group input:hover,
.form-group textarea:hover { border-color: var(--border2); }

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a0'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #c62e3a 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.25);
}

.btn-accent:hover {
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.4);
  transform: translateY(-1px);
}

.btn-green {
  background: linear-gradient(135deg, var(--green) 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.btn-green:hover {
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text2);
  border-color: var(--border);
}

.btn-outline:hover { color: var(--text); border-color: var(--text3); background: var(--surface2); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 11px; border-radius: 6px; }

/* ========================================
   STATS
   ======================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  border-radius: var(--radius2) var(--radius2) 0 0;
}

.stat-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.stat-card .stat-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.5px;
}

.stat-card .stat-sub { font-size: 11px; color: var(--text3); }

.stat-card.accent::before { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.stat-card.green::before { background: linear-gradient(90deg, var(--green), #16a34a); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--yellow), #d97706); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--blue), #2563eb); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), #7c3aed); }

.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.yellow .stat-value { color: var(--yellow); }
.stat-card.blue .stat-value { color: var(--blue); }
.stat-card.purple .stat-value { color: var(--purple); }

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 22px;
  margin-bottom: 16px;
  transition: all var(--transition);
}

.card:hover { border-color: var(--border2); }

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================
   DISCOVER GRID
   ======================================== */
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.lead-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 18px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.lead-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

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

.lead-card-name { font-size: 15px; font-weight: 700; color: var(--text); }
.lead-card-meta { font-size: 12px; color: var(--text2); margin-top: 2px; }

.lead-card-score {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.score-bar {
  flex: 1;
  height: 6px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-bar-fill.high { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.score-bar-fill.medium { background: linear-gradient(90deg, var(--yellow), #d97706); }
.score-bar-fill.low { background: linear-gradient(90deg, var(--green), #16a34a); }

.issue-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }

.issue-tag {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  background: var(--surface3);
  color: var(--text2);
  border: 1px solid var(--border);
}

.lead-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ========================================
   MODE TOGGLE
   ======================================== */
.mode-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  width: fit-content;
  padding: 3px;
  gap: 2px;
}

.mode-btn {
  padding: 7px 18px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: calc(var(--radius) - 2px);
}

.mode-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.mode-btn:not(.active):hover { color: var(--text); background: var(--surface2); }

/* ========================================
   STATE GRID
   ======================================== */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 5px;
  margin-bottom: 20px;
}

.state-tile {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  padding: 4px;
}

.state-tile:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: scale(1.05);
}

.state-tile.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.2);
}

.state-tile .state-abbr { font-size: 12px; font-weight: 700; color: var(--text); }
.state-tile .state-count { font-size: 9px; color: var(--text3); }

.region-label {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0 4px;
}

/* ========================================
   TABLE
   ======================================== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: var(--surface);
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }

thead {
  background: var(--surface2);
  position: sticky;
  top: 0;
  z-index: 2;
}

th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

th:hover { color: var(--accent); }

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr { transition: background var(--transition); }
tr:hover td { background: rgba(230, 57, 70, 0.03); }

.status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  letter-spacing: 0.3px;
}

.status.new { background: var(--blue-glow); color: var(--blue); }
.status.contacted { background: var(--yellow-glow); color: var(--yellow); }
.status.meeting { background: var(--purple-glow); color: var(--purple); }
.status.proposal { background: var(--green-glow); color: var(--green); }
.status.closed { background: var(--red-glow); color: var(--red); }

.priority-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.priority-badge.high { background: var(--red-glow); color: var(--red); }
.priority-badge.medium { background: var(--yellow-glow); color: var(--yellow); }
.priority-badge.low { background: var(--green-glow); color: var(--green); }

.table-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: var(--surface3);
  color: var(--text2);
  margin: 1px;
}

/* ========================================
   FILTER BAR
   ======================================== */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: flex-end;
}

.filter-bar select,
.filter-bar input {
  padding: 7px 10px;
  font-size: 12px;
  min-width: 100px;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
  font-family: inherit;
}

.page-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-sm { max-width: 480px; }
.modal-xl { max-width: 1000px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 18px; font-weight: 700; }

.modal-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: all var(--transition);
  line-height: 1;
}

.modal-close:hover { color: var(--text); border-color: var(--text3); background: var(--surface3); }

textarea {
  width: 100%;
  height: 120px;
  padding: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}

textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ========================================
   FINDER
   ======================================== */
.finder-scorecard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.finder-score {
  text-align: center;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  transition: all var(--transition);
}

.finder-score:hover { border-color: var(--border2); transform: translateY(-2px); }
.finder-score .label { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.finder-score .val { font-size: 36px; font-weight: 800; margin: 6px 0; letter-spacing: -1px; }
.finder-score .val.green { color: var(--green); }
.finder-score .val.yellow { color: var(--yellow); }
.finder-score .val.red { color: var(--red); }

/* ========================================
   STRATEGY
   ======================================== */
.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 6px;
  transition: all var(--transition);
}

.checklist label:hover { border-color: var(--border2); background: var(--surface2); }

.checklist input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }

.checklist label.checked {
  background: var(--green-glow);
  border-color: rgba(34, 197, 94, 0.3);
}

.pricing-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.pricing-table th,
.pricing-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.pricing-table th {
  background: var(--surface2);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
}

.email-template {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin-top: 8px;
  position: relative;
  color: var(--text2);
}

.copy-btn { position: absolute; top: 10px; right: 10px; }

/* ========================================
   PROPOSAL
   ======================================== */
.proposal { padding: 0; font-size: 13px; line-height: 1.7; }

.proposal h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
}

.proposal h3 { font-size: 15px; font-weight: 700; margin: 16px 0 6px; }

.proposal .tier {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}

.proposal .tier h4 { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.proposal .tier .price { font-size: 22px; font-weight: 900; }
.proposal .tier ul { margin: 8px 0 0 16px; color: var(--text2); }
.proposal .tier ul li { margin-bottom: 3px; }
.proposal .meta-line { color: var(--text2); font-size: 12px; margin-bottom: 16px; }

.proposal-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ========================================
   TEMPLATE CARDS
   ======================================== */
.template-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.template-card:hover { border-color: var(--border2); background: var(--surface2); }

/* ========================================
   VOICE ASSISTANT
   ======================================== */
.voice-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, #c62e3a 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(230, 57, 70, 0.55);
}

.voice-fab.listening {
  animation: voicePulse 1.5s ease-in-out infinite;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4); }
  50% { box-shadow: 0 4px 40px rgba(230, 57, 70, 0.7), 0 0 0 12px rgba(230, 57, 70, 0.1); }
}

.voice-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 500;
  width: 380px;
  max-height: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-panel.open { display: flex; }

.voice-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.voice-panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-panel-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.voice-panel-header .dot.active {
  background: var(--accent);
  animation: dotPulse 1s ease infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.voice-close {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.voice-close:hover { color: var(--text); }

.voice-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.voice-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

.voice-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.voice-msg.agent {
  align-self: flex-start;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.voice-msg.agent .typing-dots {
  display: inline-flex;
  gap: 4px;
}

.voice-msg.agent .typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text3);
  animation: typingBounce 1.2s ease-in-out infinite;
}

.voice-msg.agent .typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.voice-msg.agent .typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.voice-input-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}

.voice-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.voice-input:focus { border-color: var(--accent); }

.voice-send {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.voice-send:hover { background: var(--accent2); }

.voice-mic {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.voice-mic:hover { border-color: var(--accent); color: var(--accent); }
.voice-mic.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ========================================
   ROADMAP
   ======================================== */
.roadmap-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.rm-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition);
}

.rm-stat:hover { border-color: var(--border2); transform: translateY(-1px); }

.rm-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.rm-stat-icon.total { background: var(--blue-glow); }
.rm-stat-icon.done { background: var(--green-glow); }
.rm-stat-icon.progress { background: var(--yellow-glow); }
.rm-stat-icon.blocked { background: var(--red-glow); }
.rm-stat-icon.pct { background: var(--purple-glow); }

.rm-stat .rm-stat-val { font-size: 20px; font-weight: 800; }
.rm-stat .rm-stat-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }

.roadmap-controls { margin-bottom: 16px; }

.roadmap-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.roadmap-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  min-height: 200px;
}

.roadmap-column-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.roadmap-column-header .col-count {
  background: var(--surface3);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text2);
}

.roadmap-column-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rm-task {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.rm-task:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.rm-task-phase {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
  margin-bottom: 4px;
}

.rm-task-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.rm-task-desc {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
  margin-bottom: 8px;
}

.rm-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rm-task-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rm-task-tag.phase-1 { background: rgba(59,130,246,0.15); color: var(--blue); }
.rm-task-tag.phase-2 { background: rgba(167,139,250,0.15); color: var(--purple); }
.rm-task-tag.phase-3 { background: rgba(34,197,94,0.15); color: var(--green); }
.rm-task-tag.phase-4 { background: rgba(245,158,11,0.15); color: var(--yellow); }
.rm-task-tag.phase-5 { background: rgba(230,57,70,0.15); color: var(--accent); }
.rm-task-tag.phase-6 { background: rgba(34,211,238,0.15); color: var(--cyan); }

.rm-task-priority {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.rm-task-priority.critical { background: var(--red-glow); color: var(--red); }
.rm-task-priority.high { background: var(--yellow-glow); color: var(--yellow); }
.rm-task-priority.medium { background: var(--blue-glow); color: var(--blue); }
.rm-task-priority.low { background: var(--surface3); color: var(--text3); }

.rm-task-date {
  font-size: 10px;
  color: var(--text3);
  margin-left: auto;
}

.rm-task-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.rm-task-btn {
  padding: 3px 8px;
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.rm-task-btn:hover { border-color: var(--accent); color: var(--accent); }
.rm-task-btn.done-btn:hover { border-color: var(--green); color: var(--green); }

/* Timeline View */
.roadmap-timeline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 22px;
}

.roadmap-timeline h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.rm-timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.rm-timeline-row:last-child { border-bottom: none; }

.rm-timeline-label {
  width: 180px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}

.rm-timeline-bar-wrap {
  flex: 1;
  height: 24px;
  background: var(--surface3);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.rm-timeline-bar {
  height: 100%;
  border-radius: 4px;
  position: absolute;
  top: 0;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

.rm-timeline-bar.phase-1 { background: linear-gradient(90deg, var(--blue), #60a5fa); }
.rm-timeline-bar.phase-2 { background: linear-gradient(90deg, var(--purple), #c4b5fd); }
.rm-timeline-bar.phase-3 { background: linear-gradient(90deg, var(--green), #4ade80); }
.rm-timeline-bar.phase-4 { background: linear-gradient(90deg, var(--yellow), #fbbf24); }
.rm-timeline-bar.phase-5 { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.rm-timeline-bar.phase-6 { background: linear-gradient(90deg, var(--cyan), #67e8f9); }

.rm-timeline-pct {
  width: 40px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
}

/* Add Task Modal */
.rm-add-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ========================================
   TOAST
   ======================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 96px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 3000;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }

/* ========================================
   COMMAND CENTER
   ======================================== */
.cc-top { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.cc-health { display: flex; align-items: center; gap: 12px; }
.cc-health-ring { width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--health-color, #22c55e); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--health-color, #22c55e); background: var(--surface); }
.cc-health-label { font-size: 14px; font-weight: 600; color: var(--text2); }
.cc-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-section { margin-bottom: 24px; }
.cc-section-title { font-size: 14px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cc-stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.cc-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.cc-stat-value { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.cc-stat-label { font-size: 11px; color: var(--text2); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Pipeline Funnel */
.cc-funnel { display: flex; flex-direction: column; gap: 6px; }
.cc-funnel-row { display: flex; align-items: center; gap: 12px; }
.cc-funnel-label { width: 120px; font-size: 12px; color: var(--text2); text-align: right; white-space: nowrap; }
.cc-funnel-bar { flex: 1; height: 20px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.cc-funnel-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.cc-funnel-count { width: 36px; font-size: 13px; font-weight: 700; text-align: right; }

/* Agent Cards */
.cc-agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cc-agent-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; gap: 12px; transition: border-color 0.2s; }
.cc-agent-card:hover { border-color: var(--border2); }
.cc-agent-running { border-color: #22c55e40; background: #22c55e08; }
.cc-agent-done { border-color: #3b82f640; }
.cc-agent-error { border-color: #ef444440; background: #ef444408; }
.cc-agent-icon { font-size: 24px; flex-shrink: 0; }
.cc-agent-info { flex: 1; min-width: 0; }
.cc-agent-name { font-size: 13px; font-weight: 700; }
.cc-agent-status { font-size: 11px; color: var(--text2); }
.cc-agent-tasks { font-size: 11px; color: var(--text2); }
.cc-agent-actions { flex-shrink: 0; }

/* Automation Workflows */
.cc-workflows { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cc-workflow { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; transition: border-color 0.2s; }
.cc-workflow.enabled { border-left: 3px solid var(--green); }
.cc-workflow.disabled { border-left: 3px solid var(--text2); opacity: 0.6; }
.cc-wf-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cc-wf-name { font-size: 13px; font-weight: 700; }
.cc-wf-desc { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.cc-wf-meta { font-size: 11px; color: var(--text3); }

/* Toggle Switch */
.cc-toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.cc-toggle input { opacity: 0; width: 0; height: 0; }
.cc-toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--surface2); border-radius: 20px; transition: 0.3s; border: 1px solid var(--border); }
.cc-toggle-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background: var(--text2); border-radius: 50%; transition: 0.3s; }
.cc-toggle input:checked + .cc-toggle-slider { background: var(--green); border-color: var(--green); }
.cc-toggle input:checked + .cc-toggle-slider:before { transform: translateX(16px); background: #fff; }

/* Activity Feed */
.cc-feed { max-height: 400px; overflow-y: auto; }
.cc-feed-empty { padding: 24px; text-align: center; color: var(--text2); font-size: 13px; }
.cc-feed-item { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; align-items: baseline; }
.cc-feed-time { color: var(--text3); white-space: nowrap; font-size: 11px; min-width: 50px; }
.cc-feed-source { color: var(--text2); font-weight: 600; min-width: 70px; }
.cc-feed-action { font-weight: 600; min-width: 80px; }
.cc-feed-detail { color: var(--text2); flex: 1; }
.cc-feed-success .cc-feed-action { color: var(--green); }
.cc-feed-error .cc-feed-action { color: var(--red); }
.cc-feed-warning .cc-feed-action { color: var(--yellow); }

/* Needs Attention */
.cc-attention-list { display: flex; flex-direction: column; gap: 6px; }
.cc-attention-item { display: flex; gap: 12px; align-items: center; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--yellow); border-radius: var(--radius-xs); font-size: 13px; }
.cc-att-name { font-weight: 600; }
.cc-att-stage { color: var(--text2); font-size: 12px; }
.cc-att-days { color: var(--yellow); font-size: 12px; margin-left: auto; }

/* ========================================
   PIPELINE
   ======================================== */
.pipeline-stages-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.pipeline-stage-pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface2); font-size: 12px; }
.pipeline-badge { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-hot { color: #ef4444; font-weight: 600; }
.badge-warm { color: #f59e0b; font-weight: 600; }
.badge-cold { color: #3b82f6; font-weight: 600; }

/* ========================================
   LEADS FINDER
   ======================================== */
.finder-result-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface); transition: border-color 0.2s; cursor: pointer; }
.finder-result-item:hover { border-color: var(--accent); }
.fri-main { flex: 1; min-width: 0; }
.fri-name { font-weight: 700; font-size: 14px; }
.fri-url { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fri-meta { display: flex; gap: 8px; align-items: center; }
.fri-score { font-size: 12px; color: var(--text2); }
.fri-contact { font-size: 12px; color: var(--text2); min-width: 150px; }
.fri-actions { flex-shrink: 0; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--text2); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================
   AUTOMATION
   ======================================== */
.automation-wf { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; }
.automation-wf.enabled { border-left: 3px solid var(--green); }
.automation-wf.disabled { opacity: 0.5; border-left: 3px solid var(--text2); }
.awf-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.awf-name { font-weight: 700; font-size: 14px; }
.awf-desc { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.awf-steps { font-size: 12px; color: var(--text3); margin-bottom: 4px; padding: 8px; background: var(--surface2); border-radius: 4px; }
.awf-meta { font-size: 11px; color: var(--text3); }
.automation-log-entry { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; display: flex; gap: 8px; }
.ale-time { color: var(--text3); min-width: 70px; }
.ale-action { font-weight: 600; min-width: 80px; }
.ale-detail { color: var(--text2); }
.automation-log-entry.error .ale-action { color: var(--red); }
.automation-log-entry.success .ale-action { color: var(--green); }
.automation-log-entry.warning .ale-action { color: var(--yellow); }

/* ========================================
   OUTREACH ENGINE
   ======================================== */
.outreach-limits { display: flex; gap: 16px; margin-bottom: 16px; padding: 12px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.outreach-limit { flex: 1; display: flex; align-items: center; gap: 8px; }
.ol-label { font-size: 12px; color: var(--text2); white-space: nowrap; min-width: 100px; }
.ol-bar { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.ol-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.ol-count { font-size: 12px; font-weight: 600; min-width: 60px; text-align: right; }
.outreach-preview-item { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface2); }
.opi-name { font-size: 14px; margin-bottom: 4px; }
.opi-email { font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.opi-content { font-size: 13px; color: var(--text); padding: 8px; background: var(--surface); border-radius: 4px; white-space: pre-wrap; }
.outreach-queue-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.oqi-channel { font-size: 16px; }
.oqi-name { font-weight: 600; flex: 1; }
.oqi-campaign { color: var(--text2); font-size: 12px; }
.oqi-time { color: var(--text3); font-size: 11px; }
.outreach-campaign { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface); }
.oc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.oc-name { font-weight: 700; font-size: 14px; }
.oc-channel { font-size: 16px; }
.oc-stats { font-size: 12px; color: var(--text2); }
.oc-meta { font-size: 11px; color: var(--text3); }
.outreach-template { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface); }
.ot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ot-subject { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.ot-body { font-size: 12px; color: var(--text3); white-space: pre-wrap; max-height: 60px; overflow: hidden; }
.status-badge { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.status-badge.sent { background: #22c55e20; color: #22c55e; }
.status-badge.failed { background: #ef444420; color: #ef4444; }
.status-badge.opened { background: #3b82f620; color: #3b82f6; }
.status-badge.queued { background: #f59e0b20; color: #f59e0b; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-link span { display: none; }
  .sidebar-logo { font-size: 14px; justify-content: center; }
  .sidebar-header { padding: 16px 0; display: flex; justify-content: center; }
  .sidebar-nav { padding: 8px 6px; align-items: center; }
  .sidebar-footer { padding: 6px; display: flex; justify-content: center; }
  .main { margin-left: 60px; padding: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .discover-grid { grid-template-columns: 1fr; }
  .finder-scorecard { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; }
  .filter-bar select,
  .filter-bar input { width: 100%; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .voice-panel { width: calc(100vw - 16px); right: 8px; bottom: 88px; }
  .roadmap-board { grid-template-columns: 1fr; }
  .rm-timeline-label { width: 120px; font-size: 11px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .finder-scorecard { grid-template-columns: 1fr; }
}

/* ========================================
   PRINT
   ======================================== */
@media print {
  .sidebar, .voice-fab, .voice-panel, .modal-close, .proposal-actions, .btn, .filter-bar, .mode-toggle { display: none !important; }
  .main { margin-left: 0; }
  .modal-overlay { position: static; background: none; padding: 0; backdrop-filter: none; }
  .modal { max-width: 100%; box-shadow: none; border: none; padding: 0; }
  body { background: #fff; color: #000; }
  .proposal { color: #000; }
  .proposal h2 { border-bottom-color: #e63946; }
  .proposal .tier { background: #f5f5f5; border-color: #ddd; }
  .proposal .tier .price { color: #000; }
  .proposal .tier h4 { color: #e63946; }
  .proposal .meta-line { color: #666; }
}

/* ========================================
   PORTFOLIO MANAGER
   ======================================== */
.pm-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:20px}
.pm-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;cursor:pointer;transition:all .2s}
.pm-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:var(--shadow-md)}
.pm-card-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:12px}
.pm-card-title{display:flex;align-items:center;gap:10px}
.pm-card-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.pm-card-title h3{font-size:.95rem;font-weight:700;margin:0}
.pm-tag{font-size:.7rem;color:var(--text3);text-transform:uppercase;letter-spacing:.5px}
.pm-score{font-size:1.6rem;font-weight:900;letter-spacing:-.02em}
.pm-score-bar{height:4px;background:var(--surface2);border-radius:2px;overflow:hidden;margin-bottom:12px}
.pm-score-fill{height:100%;border-radius:2px;transition:width .6s ease}
.pm-card-meta{display:flex;gap:12px;font-size:.75rem;color:var(--text2);flex-wrap:wrap;margin-bottom:12px}
.pm-card-footer{display:flex;align-items:center;justify-content:space-between}
.pm-time{font-size:.75rem;color:var(--text3)}
.pm-audit-btn{padding:6px 14px;background:var(--accent);color:#fff;border:none;border-radius:6px;font-size:.8rem;font-weight:600;font-family:inherit;cursor:pointer;transition:all .2s}
.pm-audit-btn:hover{background:var(--accent2)}
.pm-audit-btn:disabled{opacity:.5;cursor:not-allowed}

/* Score colors */
.score-excellent{color:var(--green)}.bg-score-excellent{background:var(--green)}
.score-good{color:var(--blue)}.bg-score-good{background:var(--blue)}
.score-fair{color:var(--yellow)}.bg-score-fair{background:var(--yellow)}
.score-poor{color:var(--red)}.bg-score-poor{background:var(--red)}
.score-unknown{color:var(--text3)}

/* Detail view */
.pm-detail{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin-top:24px}
.pm-detail-header{margin-bottom:24px}
.pm-back-btn{background:none;border:none;color:var(--accent);font-size:.85rem;font-family:inherit;cursor:pointer;padding:0;margin-bottom:12px}
.pm-back-btn:hover{text-decoration:underline}
.pm-detail-header h2{font-size:1.4rem;font-weight:800;margin:0 0 4px}
.pm-detail-url{color:var(--text3);font-size:.85rem}
.pm-score-row{display:flex;gap:32px;align-items:flex-start;margin-bottom:24px;flex-wrap:wrap}
.pm-score-big{font-size:3rem;font-weight:900;letter-spacing:-.03em;line-height:1}
.pm-score-big span{font-size:1.2rem;font-weight:500;color:var(--text3)}
.pm-score-categories{flex:1;min-width:250px}
.pm-cat-row{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.pm-cat-name{font-size:.78rem;color:var(--text2);width:110px;flex-shrink:0}
.pm-cat-bar{flex:1;height:5px;background:var(--surface2);border-radius:3px;overflow:hidden}
.pm-cat-fill{height:100%;border-radius:3px;transition:width .4s ease}
.pm-cat-score{font-size:.78rem;font-weight:700;width:28px;text-align:right}

/* Metrics */
.pm-metrics{display:flex;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.pm-metric{background:var(--surface2);border-radius:8px;padding:12px 16px;text-align:center;min-width:80px}
.pm-metric-val{display:block;font-size:1.1rem;font-weight:800;color:var(--text)}
.pm-metric-label{display:block;font-size:.7rem;color:var(--text3);margin-top:2px;text-transform:uppercase;letter-spacing:.5px}

/* Sections */
.pm-section{margin-bottom:24px}
.pm-section h3{font-size:1rem;font-weight:700;margin-bottom:12px}

/* Quick wins */
.pm-wins{display:flex;flex-direction:column;gap:8px}
.pm-win{display:flex;gap:10px;padding:10px 14px;border-radius:8px;font-size:.85rem;align-items:flex-start}
.pm-win.critical{background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.2)}
.pm-win.high{background:rgba(249,115,22,.08);border:1px solid rgba(249,115,22,.2)}
.pm-win-sev{font-size:.65rem;font-weight:700;padding:2px 6px;border-radius:4px;flex-shrink:0;text-transform:uppercase}
.pm-win.critical .pm-win-sev{background:rgba(239,68,68,.2);color:var(--red)}
.pm-win.high .pm-win-sev{background:rgba(249,115,22,.2);color:var(--orange)}
.pm-win p{margin:2px 0 0;color:var(--text2);font-size:.78rem}

/* Issues */
.pm-issues{display:flex;flex-direction:column;gap:6px}
.pm-issue{padding:8px 12px;border-radius:6px;font-size:.82rem;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pm-issue.critical{background:rgba(239,68,68,.06);border:1px solid rgba(239,68,68,.15)}
.pm-issue.high{background:rgba(249,115,22,.06);border:1px solid rgba(249,115,22,.15)}
.pm-issue.medium{background:rgba(234,179,8,.06);border:1px solid rgba(234,179,8,.15)}
.pm-issue.low{background:rgba(59,130,246,.06);border:1px solid rgba(59,130,246,.15)}
.pm-sev{font-size:.65rem;font-weight:700;padding:2px 6px;border-radius:4px;text-transform:uppercase;flex-shrink:0}
.pm-sev.critical{background:rgba(239,68,68,.15);color:var(--red)}
.pm-sev.high{background:rgba(249,115,22,.15);color:var(--orange)}
.pm-sev.medium{background:rgba(234,179,8,.15);color:var(--yellow)}
.pm-sev.low{background:rgba(59,130,246,.15);color:var(--blue)}
.pm-issue-cat{font-size:.7rem;color:var(--text3);background:var(--surface2);padding:1px 6px;border-radius:4px}
.pm-more{color:var(--text3);font-size:.8rem;margin-top:8px}

/* Strengths */
.pm-strengths{display:flex;flex-direction:column;gap:4px}
.pm-strength{font-size:.82rem;color:var(--green);padding:4px 0;padding-left:16px;position:relative}
.pm-strength::before{content:'✓';position:absolute;left:0;font-weight:700}

/* History */
.pm-history{display:flex;flex-direction:column;gap:6px}
.pm-history-row{display:flex;align-items:center;gap:12px;font-size:.82rem}
.pm-history-date{color:var(--text3);width:140px;flex-shrink:0}
.pm-history-bar{flex:1;height:5px;background:var(--surface2);border-radius:3px;overflow:hidden}
.pm-history-fill{height:100%;border-radius:3px}
.pm-history-score{font-weight:700;width:32px;text-align:right}

/* Logout button */
.sidebar-logout{color:var(--red) !important}
.sidebar-logout:hover{background:rgba(239,68,68,.1) !important}

@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}

@media(max-width:1024px){.pm-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.pm-grid{grid-template-columns:1fr}.pm-score-row{flex-direction:column}}
