/* ==========================================================================
   JBFlow — Premium Design System & Styles
   ========================================================================== */

:root {
  --bg-main: #070a12;
  --bg-surface: #0f1626;
  --bg-card: rgba(18, 26, 44, 0.75);
  --bg-card-hover: rgba(26, 38, 64, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);

  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow accents */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  top: -150px;
  right: -100px;
}
.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
}

/* Glassmorphism panel helper */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 0.85rem; }
.text-center { text-align: center; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.hidden { display: none !important; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #7175f5 0%, #5d54eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-accent {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: rgba(15, 22, 38, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  font-family: var(--font-main);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Auth Screen ─────────────────────────────────────────────── */
.auth-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.error-banner {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

/* ── App Layout & Navbar ─────────────────────────────────────── */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-top: none;
  border-left: none;
  border-right: none;
}

.nav-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.nav-item.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.pill-count {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-weight: 700;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem 0.35rem 0.45rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}
.user-pill:hover {
  background: var(--bg-card-hover);
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 700;
}

.user-completeness {
  font-size: 0.7rem;
  color: var(--accent-emerald);
}

/* ── Main Content Area ───────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.tab-pane.active {
  display: block;
}

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

/* ── Dashboard Hero & Stats ──────────────────────────────────── */
.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  padding: 2.2rem;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
}

.hero-desc {
  color: var(--text-muted);
  max-width: 600px;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-progress {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
}

.circle-progress-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.circular-chart {
  display: block;
  width: 100%;
  height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3.2;
}

.circle-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

.circle-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.score-num {
  font-size: 1rem;
  font-weight: 800;
}

.score-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ── Metric Grid ─────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-card {
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.metric-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
}

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Activity Feed ───────────────────────────────────────────── */
.dashboard-section {
  margin-top: 2rem;
}

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

.activity-feed {
  padding: 1rem 1.5rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-color);
}
.activity-item:last-child {
  border-bottom: none;
}

.activity-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-msg {
  font-size: 0.88rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Profile & CV View ───────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.card {
  padding: 1.5rem;
}

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

.dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 2.2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(99, 102, 241, 0.03);
  transition: all 0.2s ease;
  margin-top: 1rem;
}
.dropzone:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.dropzone-title {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}

.dropzone-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.upload-progress-container {
  margin-top: 1rem;
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  border-radius: 9999px;
  transition: width 0.3s;
}

.progress-label {
  display: block;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-top: 0.4rem;
}

/* Skills tags */
.skills-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.skill-tag-del {
  cursor: pointer;
  opacity: 0.6;
}
.skill-tag-del:hover {
  opacity: 1;
  color: var(--accent-rose);
}

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

.section-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.experience-card, .education-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
}

/* ── Jobs Board ──────────────────────────────────────────────── */
.jobs-toolbar {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-input {
  padding-left: 2.5rem;
  width: 100%;
}

.filter-pills {
  display: flex;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.filter-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-pill.active {
  background: var(--bg-surface);
  color: #fff;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}

.job-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}
.job-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.job-company {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.job-title {
  font-size: 1.1rem;
  margin: 0.2rem 0 0.5rem;
}

.job-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.job-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.match-gauge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* ── Applications Pipeline ───────────────────────────────────── */
.pipeline-header {
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pipeline-filters {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pipeline-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.pipeline-tab.active {
  background: rgba(99, 102, 241, 0.15);
  color: #fff;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
}
.app-row:hover {
  background: var(--bg-card-hover);
}

.app-main {
  flex: 1;
}

.app-title {
  font-size: 1rem;
  font-weight: 700;
}

.app-company {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.app-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.state-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Tables ──────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  padding: 0.75rem 1.25rem;
  text-align: left;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.data-table tr:last-child td {
  border-bottom: none;
}

/* ── Extension View ──────────────────────────────────────────── */
.extension-hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  padding: 2.2rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card {
  padding: 1.5rem;
  position: relative;
}

.step-num {
  width: 32px;
  height: 32px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.code-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.token-box {
  display: flex;
  gap: 0.5rem;
}

/* ── Modals ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  padding: 1.8rem;
  position: relative;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
}
.btn-close:hover {
  color: var(--text-main);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  pointer-events: auto;
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideToast {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 900px) {
  .dashboard-hero, .profile-grid, .extension-hero {
    grid-template-columns: 1fr;
  }
  .nav-links span:not(.pill-count) {
    display: none;
  }
  .nav-item {
    padding: 0.5rem;
  }
}
