@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=block');

:root {
  color-scheme: light;
  --bg-app: #f2f4f5;
  --bg-panel: rgba(255, 255, 255, 0.85);
  --bg-sidebar: rgba(255, 255, 255, 0.5);
  --border: rgba(228, 228, 231, 0.8);
  --border-glass: rgba(255, 255, 255, 0.6);
  
  /* Text colors */
  --text-main: #1c1c1c;
  --text-body: #5c5c5c;
  --text-muted: #7c7c7c;
  --text-soft: #a8a8a8;
  
  /* Brand and Accent colors (Reddit inspired) */
  --primary: #ff4500;
  --primary-hover: #ea3c00;
  --primary-light: #ffebe6;
  --secondary: #0079d3;
  --accent: #ffd635;
  
  /* Semantic Alert states */
  --success: #10b981;
  --success-bg: #d1fae5;
  --success-border: rgba(16, 185, 129, 0.2);
  
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --warning-border: rgba(245, 158, 11, 0.2);
  
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --danger-border: rgba(239, 68, 68, 0.2);
  
  /* Structural variables */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
  background: var(--bg-app);
  color: var(--text-body);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

p {
  color: var(--text-body);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--primary-hover);
}

/* App Shell Layout */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(255, 69, 0, 0.25);
}

.brand div {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-size: 16px;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  border: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  cursor: pointer;
}

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

.nav button.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav .icon {
  font-size: 20px;
  color: var(--text-muted);
  transition: color 200ms ease;
}

.nav button:hover .icon {
  color: var(--primary);
}

.nav button.active .icon {
  color: var(--primary);
}

.account-mini {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.6);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.account-mini strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.account-mini span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main content wrapper */
.main {
  min-width: 0;
  padding: 40px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Topbar Header styling */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 8px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.topbar p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Global Actions & Buttons */
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-body);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn:hover {
  background: var(--bg-app);
  border-color: var(--text-soft);
  color: var(--text-main);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(255, 69, 0, 0.2);
}

.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 6px 14px rgba(255, 69, 0, 0.3);
}

.btn.dark {
  background: var(--text-main);
  border-color: var(--text-main);
  color: #ffffff;
}

.btn.dark:hover {
  background: #27272a;
  border-color: #27272a;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(0, 0, 0, 0.03);
}

.btn.compact {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Badge classes */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  background: #ffffff;
  color: var(--text-body);
  border: 1px solid var(--border);
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge.green {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.badge.gold {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.badge.red {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* Alert / Status Bar below header */
.status-line {
  margin-bottom: 32px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--primary-light);
  border: 1px solid rgba(255, 69, 0, 0.2);
  color: var(--primary-hover);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
}

/* Panels / Cards */
.panel {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
  box-shadow: var(--shadow-lg);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
}

.section-head .mini-label,
.mini-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

/* AI Hero Banner Card */
.ai-hero {
  position: relative;
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border: 1px solid #e0e7ff;
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.ai-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.ai-hero .ai-kicker {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.1em;
}

.ai-hero h2 {
  font-size: 1.75rem;
  margin-top: 6px;
  margin-bottom: 12px;
  color: var(--text-main);
  line-height: 1.25;
}

.ai-hero p {
  color: var(--text-body);
  font-size: 15px;
  max-width: 600px;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.signal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.signal span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.signal strong {
  font-size: 14px;
  color: var(--text-main);
  margin-top: 2px;
  font-weight: 600;
}

/* Circle progress indicator */
.ai-orbit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

/* Metric pills strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.metric-pill {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 69, 0, 0.2);
}

.metric-pill span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.metric-pill strong {
  font-size: 2.25rem;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.metric-pill small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dashboard Content Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
}

.focus-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.progress {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.progress span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 300ms ease;
}

/* Calendar Row component */
.calendar-row {
  display: grid;
  grid-template-columns: 85px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

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

.calendar-row > strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.calendar-row div strong {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.calendar-row p {
  font-size: 13px;
  color: var(--text-body);
}

/* Business Brain / Opportunity list */
.opportunity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opportunity-item {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 200ms ease;
}

.opportunity-item:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow);
}

.opportunity-item div {
  display: flex;
  flex-direction: column;
}

.opportunity-item strong {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 600;
}

.opportunity-item span {
  font-size: 11px;
  color: var(--text-muted);
}

.score-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-cell b {
  font-size: 12px;
  color: var(--text-main);
}

.score-cell .progress {
  height: 4px;
}

.score-cell .progress span {
  background: var(--success);
}

/* Tab Panels & Mode Controls */
.tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
  margin-bottom: 24px;
}

.tabs button {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
}

.tabs button:hover {
  color: var(--text-main);
}

.tabs button.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Input Fields and Select Dropdowns */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: all 150ms ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.15);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Grid helper variations */
.grid {
  display: grid;
  gap: 20px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Library and Card Lists */
.item-card {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 69, 0, 0.2);
}

.item-card .body {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
  white-space: pre-wrap;
}

.item-card h3 {
  font-size: 15px;
  font-weight: 600;
}

.item-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

/* Table layout styling */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.02);
}

.table td {
  font-size: 13px;
  color: var(--text-body);
  vertical-align: top;
}

.table tbody tr {
  transition: background 150ms ease;
}

.table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

.table strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Risk checker boxes styling */
.risk-box {
  border-left: 4px solid var(--success);
}

.risk-box.medium {
  border-left-color: var(--warning);
}

.risk-box.high {
  border-left-color: var(--danger);
}

/* Onboarding Modal Overlay styling */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-glass);
  padding: 40px;
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
}

.modal .eyebrow {
  margin-bottom: 8px;
}

.modal h2 {
  font-size: 1.75rem;
  margin-bottom: 24px;
}

/* Empty states */
.empty {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px dashed var(--text-soft);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.01);
}

/* Responsive breakdowns */
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
  }
  
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .nav button {
    width: auto;
  }
  
  .main {
    padding: 32px 20px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .ai-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid.cols-2, .grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Helper rules for rendered markup classes */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

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

.panel.metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
}

.panel.metric span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.panel.metric strong {
  font-size: 2rem;
  color: var(--text-main);
  font-weight: 700;
  display: block;
  letter-spacing: -0.02em;
}

.panel.metric p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Circular Chart SVG styling */
.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.04);
  stroke-width: 3.8;
}

.circle {
  fill: none;
  stroke-width: 3.8;
  stroke-linecap: round;
  animation: progress 1s ease-out forwards;
}

@keyframes progress {
  0% { stroke-dasharray: 0 100; }
}

.percentage {
  fill: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 0.45em;
  text-anchor: middle;
  font-weight: 700;
}

.stroke-brand {
  stroke: var(--primary);
}

/* ── TASK-11: sidebar health alert dot ──────────────────────────────────────── */
.nav button {
  position: relative;
}

.alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  margin-left: auto;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--warning-bg);
}

/* ── TASK-12: 4-phase journey strip ─────────────────────────────────────────── */
.phase-strip {
  display: flex;
  align-items: flex-start;
  gap: 0;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.phase-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 110px;
  flex-shrink: 0;
}

.phase-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.phase-node.done .phase-dot {
  background: var(--success);
  border-color: var(--success);
}

.phase-node.active .phase-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  width: 18px;
  height: 18px;
}

.phase-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.phase-num {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.phase-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
}

.phase-node.active .phase-name {
  color: var(--primary);
}

.phase-node.done .phase-name {
  color: var(--success);
}

.you-are-here {
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 9999px;
  padding: 2px 8px;
  margin-top: 2px;
}

.phase-unlock {
  font-size: 10px;
  color: var(--text-soft);
  margin-top: 2px;
}

.phase-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-top: 6px;
  min-width: 24px;
  border-radius: 2px;
  transition: background 200ms ease;
}

.phase-connector.done {
  background: var(--success);
}

/* ── TASK-17: welcome checklist widget ──────────────────────────────────────── */
.checklist-widget {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.checklist-header strong {
  font-size: 13px;
  color: var(--text-main);
}

.checklist-progress {
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.checklist-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 400ms ease;
}

.checklist-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px 12px;
  transition: all 150ms ease;
}

.checklist-item.done {
  color: var(--success);
  background: var(--success-bg);
  border-color: var(--success-border);
  text-decoration: line-through;
  opacity: 0.7;
}

.checklist-tick {
  font-size: 11px;
  font-weight: 700;
}

/* ── TASK-16: angle chips in content studio ─────────────────────────────────── */
.angle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-body);
  cursor: pointer;
  transition: all 150ms ease;
}

.chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── TASK-10: inline risk nudge on content cards ────────────────────────────── */
.risk-nudge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--warning);
  font-weight: 500;
}

/* ── TASK-19: "Why this community?" expand ──────────────────────────────────── */
.why-details {
  position: relative;
}

.why-details summary {
  cursor: pointer;
  list-style: none;
  font-size: 11px;
}

.why-details summary::-webkit-details-marker {
  display: none;
}

.why-content {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.why-content p {
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.5;
}

/* ── TASK-14: 3-step onboarding indicators ──────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: all 200ms ease;
}

.step-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 9999px;
}

.step-dot.done {
  background: var(--success);
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 4px;
}

.onboarding-error {
  font-size: 13px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-top: 12px;
}

.onboarding-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary-light);
}

/* ── TASK-09: two-button layout in calendar rows ────────────────────────────── */
.calendar-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Target post box on comment cards ────────────────────────────────────────── */
.target-post-box {
  margin: 12px 0 8px;
  padding: 10px 14px;
  background: rgba(255, 69, 0, 0.04);
  border: 1px solid rgba(255, 69, 0, 0.15);
  border-radius: var(--radius);
}

.target-post-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.target-post-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.4;
}

.target-post-link {
  display: inline-block;
  font-size: 12px;
  color: var(--primary);
  word-break: break-all;
  text-decoration: none;
}
.target-post-link:hover { text-decoration: underline; }

/* ── Field hint ──────────────────────────────────────────────────────────────── */
.field-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ── Target post box — empty / legacy state ─────────────────────────────────── */
.target-post-box--empty {
  opacity: 0.7;
  border-style: dashed;
}
.target-post-missing {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

/* ── Loading overlay ─────────────────────────────────────────────────────────── */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  min-height: 60vh;
}

.loading-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-panel);
  border-radius: 20px;
  padding: 32px 36px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  border: 1px solid var(--border);
}

.loading-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.loading-spinner-ring {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid rgba(255,69,0,0.15);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.4;
}

.loading-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* Progress bar */
.loading-bar-track {
  position: relative;
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 24px;
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff7043);
  border-radius: 99px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-bar-shimmer {
  position: absolute;
  top: 0; left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer { to { left: 110%; } }

/* Steps list */
.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.3s;
}

.loading-step--active {
  color: var(--text);
  font-weight: 500;
}

.loading-step--done {
  color: var(--text-muted);
  opacity: 0.55;
}

.loading-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.loading-step--done .loading-step-icon {
  background: #e8f5e9;
  color: #2e7d32;
}

.loading-step--active .loading-step-icon {
  background: rgba(255,69,0,0.1);
  color: var(--primary);
  animation: pulse-icon 1.2s ease-in-out infinite;
}

.loading-step--pending .loading-step-icon {
  background: var(--border);
  color: var(--text-muted);
  font-size: 9px;
}

@keyframes pulse-icon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.92); }
}

.loading-step-label {
  line-height: 1.3;
}

.tier-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.12);
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  padding: 0 5px;
  min-width: 18px;
  height: 16px;
  margin-left: 4px;
  vertical-align: middle;
}
.btn.dark .tier-count {
  background: rgba(255,255,255,0.18);
}

/* ── Topbar subtitle ─────────────────────────────────────────────────────── */
.topbar-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Letter grade badges ──────────────────────────────────────────────────── */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  letter-spacing: 0;
}
.grade-a { background: var(--success-bg); color: var(--success); }
.grade-b { background: #e8f5e9; color: #2e7d32; }
.grade-c { background: var(--warning-bg); color: var(--warning); }
.grade-d { background: var(--danger-bg); color: var(--danger); }

/* ── Fit score progress bars should be green, not brand-orange ────────────── */
.table td .progress span {
  background: var(--success);
}

/* ── Pin button in subreddit table ────────────────────────────────────────── */
.pin-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-soft);
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color 150ms, transform 150ms;
  flex-shrink: 0;
}
.pin-btn:hover { color: var(--accent); }
.pin-btn.pinned { color: var(--accent); }
.pin-btn:active { transform: scale(1.2); }

/* ── 9:1 ratio tracker ────────────────────────────────────────────────────── */
.ratio-tracker {
  padding: 14px 18px;
  margin-bottom: 0;
}
.ratio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.ratio-bar-track {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--border);
}
.ratio-bar-fill {
  height: 100%;
  transition: width 400ms ease;
}
.ratio-bar-value { background: var(--success); }
.ratio-bar-promo { background: var(--danger); }
.ratio-legend {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dot-value, .dot-promo {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
}
.dot-value { background: var(--success); }
.dot-promo { background: var(--danger); }

/* ── Phase 1 reminder card ────────────────────────────────────────────────── */
.reminder-card {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}
.reminder-card h3 { color: #92400e; margin: 6px 0 10px; }
.reminder-list {
  list-style: none;
  display: grid;
  gap: 6px;
}
.reminder-list li {
  font-size: 13px;
  color: #78350f;
  line-height: 1.4;
}

/* ── Why this works collapsible ───────────────────────────────────────────── */
.why-details {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.why-summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
  width: 100%;
  text-align: left;
}
.why-summary:hover { color: var(--text-body); }
.why-chevron {
  font-size: 10px;
  transition: transform 200ms;
}
.why-details.open .why-chevron { transform: rotate(180deg); }
/* Override absolute positioning from subreddit popover rule — content cards are inline */
.why-details .why-content {
  position: static;
  width: auto;
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 0 4px;
  z-index: auto;
  min-width: 0;
}
.why-details .why-content p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Item timestamp ───────────────────────────────────────────────────────── */
.item-timestamp {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 6px;
}

/* ── Copy confirm animation ───────────────────────────────────────────────── */
.copy-confirm {
  animation: copy-flash 150ms ease;
}
@keyframes copy-flash {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ── Input row (post URL + paste button) ──────────────────────────────────── */
.input-row {
  display: flex;
  gap: 8px;
}
.input-row .input { flex: 1; min-width: 0; }
.input-row .btn { flex-shrink: 0; white-space: nowrap; }

/* ── Phase lock hint ──────────────────────────────────────────────────────── */
.phase-lock-hint {
  margin-top: 4px;
  color: var(--warning);
  font-size: 11px;
}

/* ── Library toolbar ─────────────────────────────────────────────────────── */
.lib-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.lib-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.select.compact {
  padding: 5px 10px;
  font-size: 13px;
  height: 32px;
  min-width: 140px;
}

/* ── Bulk select checkbox ─────────────────────────────────────────────────── */
.bulk-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 8px;
}
.bulk-check { width: 14px; height: 14px; accent-color: var(--primary); }

/* ── Settings warning panel ───────────────────────────────────────────────── */
.warning-panel {
  border-left: 4px solid var(--warning);
  background: linear-gradient(135deg, var(--warning-bg) 0%, #fff 100%);
}
.warning-panel h2 { color: #92400e; }
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.rule-item {
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--warning-border);
}
.rule-item strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 4px;
}
.rule-item p {
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.5;
}

/* ── Monitor view ─────────────────────────────────────────────────────────── */
.monitor-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .monitor-layout { grid-template-columns: 1fr; }
}
.monitor-keywords-panel,
.monitor-feed-panel { min-width: 0; }

.monitor-help {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

.monitor-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.monitor-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.monitor-input:focus { border-color: var(--primary); }

.monitor-empty-kw {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 0 12px;
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(255, 69, 0, 0.2);
  border-radius: 20px;
  padding: 3px 8px 3px 10px;
  font-size: 12px;
  font-weight: 500;
}
.kw-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  opacity: 0.55;
  font-size: 15px;
  line-height: 1;
  padding: 0 1px;
  transition: opacity 0.15s;
}
.kw-chip-remove:hover { opacity: 1; }

.monitor-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Monitor zero state ───────────────────────────────────────────────────── */
.monitor-zero-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 24px;
  text-align: center;
  gap: 8px;
}
.monitor-zero-icon {
  font-size: 44px;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.monitor-zero-state h3 {
  font-size: 16px;
  margin: 0;
  color: var(--text-main);
}
.monitor-zero-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.5;
  margin: 0 0 14px;
}

/* ── Mention list ─────────────────────────────────────────────────────────── */
.mention-list { display: flex; flex-direction: column; gap: 24px; }

.mention-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.mention-group-count {
  background: #f1f3f4;
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.mention-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  transition: box-shadow 0.15s;
}
.mention-card:last-child { margin-bottom: 0; }
.mention-card:hover { box-shadow: var(--shadow); }
.mention-card--new {
  border-left: 3px solid var(--primary);
  background: rgba(255, 69, 0, 0.02);
}

.mention-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.kw-pill {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}
.mention-sub {
  font-size: 12px;
  color: var(--secondary);
  font-weight: 500;
}
.mention-type-badge {
  font-size: 11px;
  background: #f1f3f4;
  color: var(--text-muted);
  border-radius: 4px;
  padding: 1px 6px;
  text-transform: capitalize;
}
.mention-time {
  font-size: 11px;
  color: var(--text-soft);
  margin-left: auto;
}

.mention-title-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.4;
  display: block;
}
.mention-title-link:hover { color: var(--primary); text-decoration: underline; }

.mention-snippet {
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.55;
  margin: 0;
}

.mention-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.btn-xs {
  padding: 3px 10px !important;
  font-size: 11px !important;
  border-radius: var(--radius-sm) !important;
  height: auto !important;
  line-height: 1.6 !important;
  min-height: unset !important;
}

/* ── Activity calendar ────────────────────────────────────────────────────── */
.cal-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 960px) {
  .cal-layout { grid-template-columns: 1fr; }
}
.cal-left { min-width: 0; }
.cal-right { min-width: 0; }

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cal-month-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.cal-wday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 16px;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 2px 2px;
  border-radius: 6px;
  cursor: default;
  position: relative;
  min-height: 38px;
}
.cal-cell--active {
  cursor: pointer;
  background: rgba(255, 69, 0, 0.04);
}
.cal-cell--active:hover { background: rgba(255, 69, 0, 0.1); }
.cal-cell--today .cal-day-num {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-cell--sel {
  background: var(--primary-light) !important;
  outline: 2px solid var(--primary);
  outline-offset: -1px;
}
.cal-cell--pad { cursor: default; }

.cal-day-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-body);
  line-height: 22px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.cal-dots {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}
.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.cal-dot--post    { background: var(--primary); }
.cal-dot--comment { background: var(--secondary); }

.cal-stats-row {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 -20px 12px;
  padding: 10px 20px;
}
.cal-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.cal-stat + .cal-stat { border-left: 1px solid var(--border); }
.cal-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}
.cal-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.cal-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Google ranking badge & banner ───────────────────────────────────────── */
.mention-google-rank {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(66, 133, 244, 0.12);
  color: #1a73e8;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mention-card--google {
  border-left: 3px solid #1a73e8;
  background: rgba(66, 133, 244, 0.03);
}
.google-rank-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(66, 133, 244, 0.08);
  border: 1px solid rgba(66, 133, 244, 0.2);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #1a73e8;
  margin-bottom: 12px;
}

/* ── UTM link builder ─────────────────────────────────────────────────────── */
.utm-section {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.utm-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.utm-toggle:hover { color: var(--primary); }
.utm-panel {
  margin-top: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.utm-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}
.utm-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.utm-url {
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-family: monospace;
}
.utm-breakdown {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}
.utm-breakdown span {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
}

/* ── Account health danger state ─────────────────────────────────────────── */
.panel.metric.metric--danger {
  border-left: 3px solid var(--danger, #ef4444);
  background: rgba(239, 68, 68, 0.04);
}
.metric-danger-text {
  color: var(--danger, #ef4444) !important;
}

/* ── Monitor relevance badges ─────────────────────────────────────────────── */
.mention-rel {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mention-rel.rel-high {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.mention-rel.rel-good {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

/* ── Monitor keyword tips (zero state) ────────────────────────────────────── */
.monitor-kw-tips {
  margin-top: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: left;
  max-width: 360px;
}
.monitor-tips-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}
.monitor-kw-tips ul {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.monitor-kw-tips li {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.monitor-kw-tips strong {
  color: var(--text-primary);
}

/* ── Alert dot with count ─────────────────────────────────────────────────── */
.alert-dot:not(:empty) {
  min-width: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
