/* ============================================================
   app.css — HRHIREBOT Design System v3
   Dark-first theme · Frosted glass · Typography scale · 8px grid
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Theme Variables (Dark — default) --- */
:root {
  --bg-primary: #111111;
  --bg-card: #1A1A1A;
  --bg-elevated: #2A2A2A;
  --bg-surface: #222222;
  --text-primary: #F5F5F5;
  --text-secondary: #CCCCCC;
  --text-muted: #999999;
  --accent: #10B981;
  --accent-rgb: 16, 185, 129;
  --danger: #EF4444;
  --danger-rgb: 239, 68, 68;
  --warning: #EAB308;
  --warning-rgb: 234, 179, 8;
  --info: #38BDF8;
  --info-rgb: 56, 189, 248;
  --border: #2A2A2A;
  --glass-bg: rgba(26, 26, 26, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
  --skeleton-base: #2A2A2A;
  --skeleton-shine: #333333;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Typography scale */
  --fs-title: 22px;
  --fs-body: 14px;
  --fs-caption: 12px;
  --fs-micro: 11px;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  /* Spacing (8px-based) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;

  /* Font stacks — Space Grotesk + DM Sans */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Light Theme Override --- */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-elevated: #F1F5F9;
    --bg-surface: #E8ECF1;
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --accent: #059669;
    --accent-rgb: 5, 150, 105;
    --danger: #DC2626;
    --danger-rgb: 220, 38, 38;
    --warning: #CA8A04;
    --warning-rgb: 202, 138, 4;
    --info: #0284C7;
    --info-rgb: 2, 132, 199;
    --border: #E2E8F0;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --skeleton-base: #E2E8F0;
    --skeleton-shine: #F1F5F9;
  }
}

/* Manual theme toggle via JS class */
html.light-theme {
  --bg-primary: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --bg-surface: #E8ECF1;
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --accent: #059669;
  --accent-rgb: 5, 150, 105;
  --danger: #DC2626;
  --danger-rgb: 220, 38, 38;
  --warning: #CA8A04;
  --warning-rgb: 202, 138, 4;
  --info: #0284C7;
  --info-rgb: 2, 132, 199;
  --border: #E2E8F0;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(0, 0, 0, 0.06);
  --skeleton-base: #E2E8F0;
  --skeleton-shine: #F1F5F9;
}
html.light-theme .top-bar { background: #FFFFFF; border-bottom-color: var(--border); }
html.light-theme .top-bar-version { background: rgba(0,0,0,0.05); }

/* --- Typography --- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.font-heading {
  font-family: var(--font-heading);
}

h1 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 24px;
}

h2 {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: 18px;
}

.caption {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

/* --- Layout Utilities --- */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--sp-4);
}

.text-center {
  text-align: center;
}

/* ============================================================
   Header (sticky glass, two rows)
   ============================================================ */
.header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--sp-3) var(--sp-5);
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
}

.header-title {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--accent);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.header-vacancy-title {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--accent);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  cursor: pointer;
  letter-spacing: -0.02em;
}

.header-actions a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-body);
}

.header-actions a:hover {
  color: var(--text-primary);
}

.header-counter {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  color: var(--accent);
  font-size: var(--fs-body);
}

/* Header stats row */
.header-stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--glass-border);
}
.header-stats-progress {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  margin-top: var(--sp-2);
  overflow: hidden;
  display: flex;
}
.header-stats-progress-done {
  background: var(--accent);
  transition: width 0.3s;
}
.header-stats-progress-rejected {
  background: var(--danger);
  transition: width 0.3s;
}

.header-stat {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-micro);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

.header-stat .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.header-stat .dot--pending { background: var(--accent); }
.header-stat .dot--liked { background: #10B981; }
.header-stat .dot--rejected { background: var(--danger); }
.header-stat .dot--skipped { background: var(--warning); }

.header-stat-value {
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

/* Header avatar + user menu */
.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-caption);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--sp-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  min-width: 260px;
  max-width: 300px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  overflow: hidden;
}

.user-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Profile block at top of menu */
.user-menu-profile {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
}
.user-menu-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-rgb), 0.1));
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-menu-profile-info {
  flex: 1;
  min-width: 0;
}
.user-menu-profile-name {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-profile-role {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  margin-top: 1px;
}

.user-menu-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-body);
  font-family: var(--font-body);
  color: var(--text-primary);
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.user-menu-item:hover {
  background: var(--bg-elevated);
}

.user-menu-item--danger {
  color: var(--danger);
}

.user-menu-item--muted {
  color: var(--text-muted);
  font-size: var(--fs-caption);
}

.user-menu-icon {
  font-size: 16px;
  line-height: 1;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* --- Main Content --- */
.main-content {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--sp-5);
  padding-bottom: calc(var(--sp-5) + var(--safe-bottom));
}

/* --- Login Page --- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
}

.login-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.login-wordmark {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 28px;
  color: var(--accent);
  text-align: center;
  margin-bottom: 2rem;
}

.login-input {
  width: 100%;
  padding: 14px var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
  outline: none;
}

.login-label {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 16px;
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.1s, box-shadow 0.2s;
}

.login-btn:active {
  transform: scale(0.98);
}

.login-btn:hover {
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}

.login-error {
  background: rgba(var(--danger-rgb), 0.1);
  color: var(--danger);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 8px;
  font-size: var(--fs-body);
  margin-bottom: 1rem;
}

/* ============================================================
   Onboarding (ФЗ-152 consent)
   ============================================================ */
.onboarding-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}
.onboarding-welcome {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--sp-3);
}
.onboarding-summary {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.6;
  margin-bottom: var(--sp-5);
  text-align: center;
}
.onboarding-section {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.onboarding-section-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--fs-body);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.onboarding-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.onboarding-section.expanded .onboarding-chevron {
  transform: rotate(180deg);
}
.onboarding-section-body {
  display: none;
  margin-top: var(--sp-3);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.onboarding-section.expanded .onboarding-section-body {
  display: block;
}
.onboarding-section-body ul {
  padding-left: 18px;
  margin: 8px 0;
}
.onboarding-section-body li {
  margin-bottom: 4px;
}
.onboarding-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  min-height: 48px;
  padding: var(--sp-2) 0;
}
.onboarding-checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.onboarding-checkbox label {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.5;
  cursor: pointer;
}
.onboarding-link {
  color: var(--accent);
  text-decoration: underline;
}
.onboarding-link:hover {
  opacity: 0.8;
}

/* ============================================================
   Vacancy Cards
   ============================================================ */
.vacancy-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 12px;
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-3);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}

.vacancy-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.vacancy-card--has-pending {
  border-left-color: var(--accent);
}

.vacancy-card--empty {
  border-left-color: var(--text-muted);
  opacity: 0.7;
}

.vacancy-title {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.vacancy-stats {
  display: flex;
  gap: 1rem;
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

.stat-pending { color: var(--accent); font-weight: var(--fw-medium); }
.stat-positive { color: var(--accent); }
.stat-negative { color: var(--danger); }

.vacancy-progress-wrap {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  margin-top: var(--sp-2);
  overflow: hidden;
}

.vacancy-progress-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.vacancy-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Vacancy tooltip */
.vacancy-tooltip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 100;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  max-width: 260px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.vacancy-tooltip.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Page Title --- */
.page-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

/* --- State Message (empty states) --- */
.state-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.state-message h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

/* --- Accent Button --- */
.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: var(--fs-body);
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  border: none;
  cursor: pointer;
  min-height: 48px;
  transition: box-shadow 0.2s;
}

.btn-accent:active { transform: scale(0.96); }
.btn-accent:hover { box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3); }

/* --- Error Banner --- */
.error-banner {
  background: rgba(var(--danger-rgb), 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: var(--fs-body);
}

/* ============================================================
   Candidate Card
   ============================================================ */
.candidate-card {
  max-width: 600px;
  margin: var(--sp-4) auto;
  padding: var(--sp-5);
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  will-change: transform, opacity;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, opacity 0.3s;
}

/* Card exit animations */
.candidate-card.exit-right {
  transform: translateX(120%) rotate(8deg);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.candidate-card.exit-left {
  transform: translateX(-120%) rotate(-8deg);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

/* Card enter animation */
.candidate-card.entering {
  animation: card-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Candidate Header --- */
.candidate-header {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  margin-bottom: var(--sp-4);
  position: relative;
}

/* Rectangular photo */
.candidate-photo {
  width: 72px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s;
}

.candidate-photo:hover {
  opacity: 0.85;
}

.candidate-photo-placeholder {
  width: 72px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: 12px;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.candidate-name {
  font-family: var(--font-heading);
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: -0.02em;
}

.candidate-position {
  color: var(--text-muted);
  font-size: var(--fs-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

/* --- Candidate Tags --- */
.candidate-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 var(--sp-4);
  margin-bottom: var(--sp-3);
}

.candidate-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--fs-small);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* --- Photo Lightbox --- */
.photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  cursor: zoom-out;
}

.photo-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.photo-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-lightbox.active img {
  transform: scale(1);
}

.photo-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
}

.photo-lightbox-close:active {
  background: rgba(255, 255, 255, 0.2);
}

.photo-lightbox-close {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Score Bar (horizontal — replaces circular score ring)
   ============================================================ */
.score-bar-wrap {
  margin-bottom: var(--sp-4);
}

.score-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sp-2);
}

.score-bar-label {
  font-family: var(--font-heading);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

.score-bar-value {
  font-family: var(--font-heading);
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
}

/* Score bar value color tiers */
.score-bar-value--green { color: #10B981; }
.score-bar-value--lime { color: #84CC16; }
.score-bar-value--yellow { color: #EAB308; }
.score-bar-value--orange { color: #F97316; }
.score-bar-value--red { color: #EF4444; }

.score-bar-track {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Score bar fill color tiers (direct on fill OR cascaded from wrap) */
.score-bar-fill--green,
.score-bar--green .score-bar-fill { background: #10B981; }
.score-bar-fill--lime,
.score-bar--lime .score-bar-fill { background: #84CC16; }
.score-bar-fill--yellow,
.score-bar--yellow .score-bar-fill { background: #EAB308; }
.score-bar-fill--orange,
.score-bar--orange .score-bar-fill { background: #F97316; }
.score-bar-fill--red,
.score-bar--red .score-bar-fill { background: #EF4444; }

/* Score bar label color (cascaded from wrap) */
.score-bar--green .score-bar-label { color: #10B981; }
.score-bar--lime .score-bar-label { color: #84CC16; }
.score-bar--yellow .score-bar-label { color: #EAB308; }
.score-bar--orange .score-bar-label { color: #F97316; }
.score-bar--red .score-bar-label { color: #EF4444; }

/* Score bar glow on track */
.score-bar--green .score-bar-track { box-shadow: 0 0 8px rgba(16,185,129,0.3); }
.score-bar--lime .score-bar-track  { box-shadow: 0 0 8px rgba(132,204,22,0.3); }
.score-bar--yellow .score-bar-track { box-shadow: 0 0 8px rgba(234,179,8,0.3); }
.score-bar--orange .score-bar-track { box-shadow: 0 0 8px rgba(249,115,22,0.3); }
.score-bar--red .score-bar-track   { box-shadow: 0 0 8px rgba(239,68,68,0.3); }

/* Legacy score badge (static fallback) */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-title);
  padding: var(--sp-1) var(--sp-4);
  border-radius: 12px;
}

.score-badge--green { background: var(--accent); color: #fff; }
.score-badge--yellow { background: var(--warning); color: #fff; }
.score-badge--red { background: var(--danger); color: #fff; }

/* ============================================================
   Source Tags (replaces pill-badge / badges-row)
   ============================================================ */
.source-tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.source-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--sp-2);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.source-tag--relocation { background: rgba(var(--info-rgb), 0.1); color: var(--info); }
.source-tag--remote { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); }
.source-tag--office { background: rgba(var(--info-rgb), 0.1); color: var(--info); }
.source-tag--hh { background: rgba(96, 165, 250, 0.12); color: #60A5FA; }
.source-tag--fw { background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }

.source-tag-icon {
  font-size: var(--fs-body);
  line-height: 1;
}

/* ============================================================
   Metrics Row (chip-style — replaces bordered metrics)
   ============================================================ */
.metrics-row {
  display: flex;
  margin-bottom: var(--sp-4);
  background: var(--bg-elevated);
  border-radius: 12px;
  overflow: hidden;
}

.metric {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: var(--sp-3) var(--sp-2);
  position: relative;
}

/* Vertical separator between metrics */
.metric + .metric::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* border-radius handled by .metrics-row overflow:hidden */

.metric-value {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.2;
  min-height: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.metric-value--info { color: var(--info); }

/* City auto-shrink for long names */
.metric-value--city {
  color: var(--info);
  font-size: clamp(10px, 3vw, 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.metric-label {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  margin-top: var(--sp-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: var(--fw-medium);
}

/* ============================================================
   FW Comments Accordion
   ============================================================ */
.comments-accordion {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  margin-bottom: var(--sp-3);
  overflow: hidden;
}
.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.comments-header:hover { background: var(--bg-card); }
.comments-header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}
.comments-icon { color: var(--text-muted); flex-shrink: 0; }
.comments-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
}
.comments-count {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.comments-count:empty { display: none; }
.comments-chevron {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.comments-accordion.open .comments-chevron { transform: rotate(180deg); }

/* Preview — last comment shown when collapsed */
.comments-preview {
  padding: 0 var(--sp-4) var(--sp-3);
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.comments-preview:empty { display: none; }
.comments-accordion.open .comments-preview { display: none; }

/* Expandable body */
.comments-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.comments-accordion.open .comments-body { max-height: 600px; overflow-y: auto; }
.comments-list {
  padding: 0 var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.comments-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-caption);
  padding: var(--sp-3) 0;
}

/* Single comment item */
.comment-item {
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-card);
  border-radius: var(--radius-sm, 6px);
  font-size: var(--fs-caption);
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.comment-author {
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  font-size: 11px;
}
.comment-date {
  color: var(--text-muted);
  font-size: 11px;
}
.comment-text {
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

/* Show more button */
.comments-show-more {
  text-align: center;
  padding: var(--sp-2) 0;
}
.comments-show-more-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: var(--fs-caption);
  cursor: pointer;
  padding: var(--sp-1) var(--sp-3);
}
.comments-show-more-btn:hover { text-decoration: underline; }

/* Input area */
.comments-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
}
.comments-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  color: var(--text-primary);
  font-size: var(--fs-caption);
  padding: var(--sp-2);
  resize: none;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.comments-input:focus { border-color: var(--accent); }
.comments-input::placeholder { color: var(--text-muted); }
.comments-send-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm, 6px);
  color: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.comments-send-btn:disabled { opacity: 0.4; cursor: default; }
.comments-send-btn:not(:disabled):hover { opacity: 0.85; }

/* Textarea wrapper with mic inside */
.comments-input-inner {
  position: relative;
  flex: 1;
  min-width: 0;
}
.comments-input-inner .comments-input {
  width: 100%;
  padding-right: 48px;
}
.comments-mic-btn {
  position: absolute;
  right: var(--sp-2);
  bottom: var(--sp-2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.comments-mic-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.comments-mic-btn.recording {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  animation: mic-pulse 1s ease-in-out infinite;
}
.comments-mic-status {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--accent);
  padding: 0 var(--sp-4);
}
.comments-mic-status:empty { display: none; }

/* Empty state */
.comments-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-caption);
  padding: var(--sp-3) 0;
}

/* ============================================================
   AI Conclusion Block (accent left bar)
   ============================================================ */
.ai-conclusion-block {
  background: var(--bg-elevated);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--sp-3) var(--sp-3) 0;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.ai-conclusion-block .ai-conclusion-label {
  font-family: var(--font-heading);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-2);
}

.ai-conclusion-block .ai-conclusion-text {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Legacy inline AI section */
.ai-conclusion-section {
  margin-bottom: var(--sp-4);
}

.ai-conclusion-text {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Rendered markdown inside AI text blocks */
.ai-conclusion-text p, .rv-ai-text p,
.criterion-popup-text p, .rv-criterion-desc p { margin: 0 0 0.4em; }
.ai-conclusion-text p:last-child, .rv-ai-text p:last-child,
.criterion-popup-text p:last-child, .rv-criterion-desc p:last-child { margin-bottom: 0; }
.ai-conclusion-text ul, .rv-ai-text ul,
.criterion-popup-text ul, .rv-criterion-desc ul { margin: 0.3em 0; padding-left: 1.2em; }
.ai-conclusion-text li, .rv-ai-text li,
.criterion-popup-text li, .rv-criterion-desc li { margin-bottom: 0.2em; }
.ai-conclusion-text strong, .rv-ai-text strong,
.criterion-popup-text strong, .rv-criterion-desc strong { color: var(--text-primary); font-weight: 500; }
.ai-conclusion-text code, .rv-ai-text code,
.criterion-popup-text code, .rv-criterion-desc code {
  background: var(--bg-elevated); padding: 1px 4px; border-radius: 3px; font-size: 0.9em;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: var(--sp-4) 0 var(--sp-2);
  display: flex;
  align-items: center;
}

.section-heading::before {
  content: '';
  width: 3px;
  height: 100%;
  min-height: 14px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 8px;
  flex-shrink: 0;
}

/* ============================================================
   Pros / Cons Grid
   ============================================================ */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.pros-list,
.cons-list {
  padding: var(--sp-3);
  border-radius: var(--sp-3);
  font-size: var(--fs-body);
  line-height: 1.5;
}

.pros-list {
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
}

.cons-list {
  background: rgba(var(--danger-rgb), 0.08);
  border: 1px solid rgba(var(--danger-rgb), 0.15);
}

.pros-cons-title {
  font-family: var(--font-heading);
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-2);
}

.pros-list .pros-cons-title { color: var(--accent); }
.cons-list .pros-cons-title { color: var(--danger); }

.pros-cons-item {
  color: var(--text-secondary);
  padding-left: var(--sp-4);
  position: relative;
  margin-bottom: var(--sp-1);
}

.pros-cons-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.pros-list .pros-cons-item::before { background: var(--accent); }
.cons-list .pros-cons-item::before { background: var(--danger); }

@media (max-width: 420px) {
  .pros-cons-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Criterion Cards (score circle + bar + arrow)
   ============================================================ */
.criteria-section { margin-top: var(--sp-2); }

.criteria-hint {
  text-align: center;
  font-size: var(--fs-micro);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

.criterion-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--bg-elevated);
  border-radius: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2);
  cursor: pointer;
  transition: background 0.15s;
}

.criterion-card:hover {
  background: var(--bg-surface);
}

/* Score circle */
.criterion-score-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  transition: box-shadow 0.2s;
}

/* Criterion score circle color tiers (rgba backgrounds) */
.criterion-score-circle--green { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.criterion-score-circle--lime { background: rgba(132, 204, 22, 0.15); color: #84CC16; }
.criterion-score-circle--yellow { background: rgba(234, 179, 8, 0.15); color: #EAB308; }
.criterion-score-circle--orange { background: rgba(249, 115, 22, 0.15); color: #F97316; }
.criterion-score-circle--red { background: rgba(239, 68, 68, 0.15); color: #EF4444; }

/* Score circle glow on tap/hover */
.criterion-card:active .criterion-score-circle--green { box-shadow: 0 0 8px rgba(16,185,129,0.3); }
.criterion-card:active .criterion-score-circle--lime  { box-shadow: 0 0 8px rgba(132,204,22,0.3); }
.criterion-card:active .criterion-score-circle--yellow { box-shadow: 0 0 8px rgba(234,179,8,0.3); }
.criterion-card:active .criterion-score-circle--orange { box-shadow: 0 0 8px rgba(249,115,22,0.3); }
.criterion-card:active .criterion-score-circle--red    { box-shadow: 0 0 8px rgba(239,68,68,0.3); }

.criterion-body {
  flex: 1;
  min-width: 0;
}

.criterion-name {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.criterion-bar {
  height: 4px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
}

.criterion-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Criterion fill color tiers */
.criterion-fill--green { background: #10B981; }
.criterion-fill--lime { background: #84CC16; }
.criterion-fill--yellow { background: #EAB308; }
.criterion-fill--orange { background: #F97316; }
.criterion-fill--red { background: #EF4444; }

/* Score text color classes (for popup score number) */
.criterion-score--green { color: #10B981; }
.criterion-score--lime { color: #84CC16; }
.criterion-score--yellow { color: #EAB308; }
.criterion-score--orange { color: #F97316; }
.criterion-score--red { color: #EF4444; }

.criterion-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: var(--fs-body);
  transition: transform 0.2s;
}

.criterion-card[aria-expanded="true"] .criterion-arrow {
  transform: rotate(90deg);
}

.criterion-detail {
  padding: 0 var(--sp-4) var(--sp-3);
  display: none;
}

.criterion-detail.open {
  display: block;
}

.criterion-quote {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  font-style: italic;
  margin-top: var(--sp-1);
  line-height: 1.4;
}

/* Legacy flat criterion styles (backward compat) */
.criterion {
  margin-bottom: 0.75rem;
}

.criterion-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
}

/* ============================================================
   Action Bar (rectangular gradient buttons)
   ============================================================ */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: var(--sp-3) var(--sp-4);
  padding-bottom: calc(var(--sp-3) + var(--safe-bottom));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-3);
  z-index: 100;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.action-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Back button: glass, compact */
.action-btn--back {
  height: 48px;
  padding: 0 var(--sp-4);
  border-radius: var(--sp-4);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: var(--fs-body);
}

.action-btn--back:active {
  background: rgba(255, 255, 255, 0.1);
}

/* Reject button */
.action-btn--reject {
  height: 52px;
  padding: 0 var(--sp-5);
  border-radius: var(--sp-4);
  font-size: var(--fs-body);
  background: linear-gradient(135deg, rgba(var(--danger-rgb), 0.18), rgba(var(--danger-rgb), 0.06));
  color: var(--danger);
  flex: 1;
  max-width: 150px;
}

.action-btn--reject:active {
  background: rgba(var(--danger-rgb), 0.25);
}

/* Like button */
.action-btn--like {
  height: 52px;
  padding: 0 var(--sp-5);
  border-radius: var(--sp-4);
  font-size: var(--fs-body);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.06));
  color: var(--accent);
  flex: 1;
  max-width: 150px;
}

.action-btn--like:active {
  background: rgba(var(--accent-rgb), 0.25);
}

.action-btn-icon {
  line-height: 1;
  display: flex;
  align-items: center;
}

.action-btn-label {
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
}

/* Small utility button */
.action-btn--small {
  height: 42px;
  padding: 0 var(--sp-3);
  border-radius: 10px;
  font-size: var(--fs-caption);
}

/* Neutral / skip button */
.action-btn--neutral {
  height: 48px;
  padding: 0 var(--sp-4);
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.18);
  color: #FBBF24;
  font-size: var(--fs-body);
}

.card-spacer {
  height: calc(100px + var(--safe-bottom));
}

/* ============================================================
   Candidate Tooltip
   ============================================================ */
.candidate-tooltip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 50;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  max-width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.candidate-tooltip.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   Reject Comment Modal
   ============================================================ */
.reject-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.reject-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.reject-modal {
  background: var(--bg-card);
  border-radius: 16px 16px 0 0;
  padding: 1.25rem 1rem calc(1rem + var(--safe-bottom));
  width: 100%;
  max-width: 480px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reject-modal-overlay.active .reject-modal {
  transform: translateY(0);
}

.reject-modal-title {
  font-size: 16px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  text-align: center;
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.reject-modal-subtitle {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--sp-3);
}

.reject-modal-input {
  width: 100%;
  min-height: 80px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  padding: var(--sp-3);
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reject-modal-input:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(var(--danger-rgb), 0.12);
  outline: none;
}

.reject-modal-input::placeholder { color: var(--text-muted); }

.reject-modal-char-count {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  text-align: right;
  margin-top: var(--sp-1);
  min-height: 16px;
}

.reject-modal-char-count--warn {
  color: var(--danger);
}

.reject-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: var(--sp-3);
  align-items: center;
}

.reject-modal-btn {
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  font-size: 15px;
  font-weight: var(--fw-medium);
  cursor: pointer;
  touch-action: manipulation;
  font-family: var(--font-heading);
  transition: transform 0.1s, opacity 0.15s;
}

.reject-modal-btn:active { transform: scale(0.96); }

.reject-modal-btn--mic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: 20px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reject-modal-btn--mic.recording {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  animation: mic-pulse 1s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.reject-modal-btn--cancel {
  flex: 1;
  background: var(--bg-surface);
  color: var(--text-muted);
}

.reject-modal-btn--confirm {
  flex: 1;
  background: var(--danger);
  color: #fff;
}

.reject-modal-btn--confirm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.reject-modal-mic-status {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  margin-top: var(--sp-2);
  min-height: 18px;
}

/* --- Swipe Overlay Icons --- */
.swipe-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.swipe-icon--like { color: var(--accent); }
.swipe-icon--reject { color: var(--danger); }

/* --- Toast (slide-in) --- */
.toast {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 12px;
  font-size: var(--fs-body);
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.toast.show {
  top: 4rem;
}

/* --- Spinner (loading overlay) --- */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(var(--bg-primary), 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.spinner-overlay.active {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Swipe Onboarding Hint --- */
.swipe-hint {
  position: fixed;
  bottom: calc(110px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 20px;
  font-size: var(--fs-caption);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  animation: hint-fade 4s ease-in-out forwards;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.swipe-hint-arrow {
  display: inline-block;
  animation: hint-swipe 1.5s ease-in-out infinite;
}

@keyframes hint-swipe {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

@keyframes hint-fade {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* --- Skeleton Loading --- */
.skeleton {
  max-width: 600px;
  margin: var(--sp-4) auto;
  padding: var(--sp-5);
  background: var(--bg-card);
  border-radius: 20px;
}

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-circle {
  border-radius: 50%;
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-rect {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Session Completion (redesigned) --- */
.completion-screen {
  padding: 2rem 0;
}

.completion-hero {
  text-align: center;
  margin-bottom: var(--sp-5);
}

.completion-check {
  width: 72px;
  height: 72px;
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  font-size: 36px;
  color: var(--accent);
  animation: completion-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes completion-pop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.completion-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-1);
}

.completion-vacancy {
  font-size: var(--fs-body);
  color: var(--accent);
  font-weight: var(--fw-medium);
  margin-bottom: var(--sp-1);
}

.completion-subtitle {
  font-size: var(--fs-body);
  color: var(--text-muted);
}

/* Stats card with ring */
.completion-stats-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}

.completion-ring-row {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  justify-content: center;
}

.completion-ring {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}
.completion-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.completion-ring-fill {
  transition: stroke-dasharray 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.completion-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.completion-ring-value {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 24px;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.completion-ring-sub {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  margin-top: 2px;
}

.completion-stats-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.completion-stat-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.completion-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.completion-stat-dot--green { background: #10B981; }
.completion-stat-dot--red { background: var(--danger); }
.completion-stat-dot--yellow { background: var(--warning); }

.completion-stat-name {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  flex: 1;
}

.completion-stat-num {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.completion-stat-num--green { color: #10B981; }
.completion-stat-num--red { color: var(--danger); }
.completion-stat-num--yellow { color: var(--warning); }

.completion-insight {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--glass-border);
  font-size: var(--fs-caption);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.completion-insight-icon {
  font-size: 16px;
  line-height: 1;
}
.completion-insight strong {
  color: var(--text-primary);
  font-weight: var(--fw-bold);
}

/* Candidate decisions list (SUM-01) */
.completion-decisions {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.completion-decisions-title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}
.decision-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--glass-border);
}
.decision-row:last-child { border-bottom: none; }

.decision-photo { flex-shrink: 0; }
.decision-photo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.decision-photo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.decision-info { flex: 1; min-width: 0; }
.decision-rating {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}
.decision-score {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 16px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.decision-score-max {
  font-size: var(--fs-micro);
  color: var(--text-muted);
}
.decision-city {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}
.decision-meta {
  display: flex;
  gap: var(--sp-2);
  margin-top: 2px;
}
.decision-tag, .decision-source {
  font-size: var(--fs-micro);
  color: var(--text-muted);
}

.decision-action { flex-shrink: 0; }
.decision-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}
.decision-badge--like {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}
.decision-badge--reject {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* Action buttons */
.completion-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.completion-actions .resume-btn {
  margin-top: 0;
}

/* --- Card Action Links (inside scroll area) --- */
.card-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.card-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 10px;
  text-decoration: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  font-family: var(--font-heading);
  transition: background 0.15s;
}

.card-link--hh {
  background: rgba(96, 165, 250, 0.1);
  color: #60A5FA;
}

.card-link--hh:active {
  background: rgba(96, 165, 250, 0.2);
}

.card-link-icon {
  font-weight: var(--fw-bold);
  font-size: var(--fs-caption);
  background: rgba(96, 165, 250, 0.2);
  padding: var(--sp-1) var(--sp-2);
  border-radius: 6px;
}

/* ============================================================
   Patch: classes used by candidate.html not in base CSS
   ============================================================ */

/* Header stat dots */
.header-stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.header-stat-dot--pending  { background: var(--accent); }
.header-stat-dot--selected { background: var(--info); }
.header-stat-dot--rejected { background: var(--danger); }
.header-stat--pending  { color: var(--accent); }
.header-stat--selected { color: var(--info); }
.header-stat--rejected { color: var(--danger); }

/* AI Conclusion block — header row with score bar */
.ai-conclusion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}
.ai-conclusion-title {
  font-family: var(--font-heading);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Score bar inside ai-conclusion: inline track + colored number */
.ai-conclusion-header .score-bar-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: 0;
}
.ai-conclusion-header .score-bar-track {
  flex: 1;
  min-width: 60px;
}
.ai-conclusion-header .score-bar-label {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Candidate header info wrapper */
.candidate-header-info {
  flex: 1;
  min-width: 0;
}

/* Metric format value (emoji icon) */
.metric-value--format {
  font-size: var(--fs-title);
  line-height: 1;
}

/* Source tags */
.source-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-top: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: 6px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
}
.source-tag-icon {
  font-size: var(--fs-caption);
  line-height: 1;
}
.source-tag--channel {
  background: rgba(96, 165, 250, 0.12);
  color: #60A5FA;
}
.source-tag--source {
  background: rgba(251, 191, 36, 0.12);
  color: #FBBF24;
}

/* Photo lightbox image */
.photo-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--sp-4);
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.photo-lightbox.active .photo-lightbox-img {
  transform: scale(1);
}

/* Criterion info wrapper */
.criterion-info {
  flex: 1;
  min-width: 0;
}

/* Criterion popup */
.criterion-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.criterion-popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.criterion-popup {
  background: var(--bg-card);
  border-radius: var(--sp-4);
  padding: var(--sp-5);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  transform: scale(0.9) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.criterion-popup-overlay.active .criterion-popup {
  transform: scale(1) translateY(0);
}
.criterion-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.criterion-popup-name {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1.3;
  flex: 1;
  margin-right: 0.75rem;
  letter-spacing: -0.02em;
}
.criterion-popup-score {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.criterion-popup-score small {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}
.criterion-popup-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.criterion-popup-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.criterion-popup-label {
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.criterion-popup-text {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.6;
}
.criterion-popup-close {
  display: block;
  width: 100%;
  margin-top: var(--sp-4);
  padding: var(--sp-3);
  border: none;
  border-radius: var(--sp-3);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  font-family: var(--font-heading);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s;
}
.criterion-popup-close:active {
  background: var(--bg-surface);
}

/* Reject modal mandatory comment additions */
.reject-modal-subtitle {
  font-size: var(--fs-caption);
  color: var(--danger);
  text-align: center;
  margin-bottom: var(--sp-3);
  font-weight: var(--fw-medium);
}
.reject-modal-char-counter {
  text-align: right;
  font-size: var(--fs-micro);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}
.reject-modal-btn--confirm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.reject-modal-input.error {
  border-color: var(--danger);
  animation: shake 0.4s ease-in-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Vacancy tooltip (for truncated title) */
.vacancy-tooltip {
  position: fixed;
  top: 52px;
  left: var(--sp-4);
  right: var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  white-space: normal;
  line-height: 1.4;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 130;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.vacancy-tooltip.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Candidate name/position tooltip */
.candidate-tooltip {
  position: fixed;
  left: var(--sp-4);
  right: var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  white-space: normal;
  line-height: 1.4;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 130;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.candidate-tooltip.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.candidate-tooltip-label {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-1);
}

/* Back link (legacy, used in error states) */
.back-link {
  display: block;
  text-align: center;
  padding: var(--sp-3);
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-body);
  transition: color 0.15s;
}
.back-link:hover { color: var(--text-primary); }

/* ============================================================
   Top Bar (brand + version + online status + avatar)
   ============================================================ */
.top-bar {
  background: #0A0A0A;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.top-bar-brand {
  font-family: 'Plus Jakarta Sans', var(--font-heading);
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
  color: var(--accent);
  letter-spacing: 0.5px;
}

.top-bar-version {
  font-size: 10px;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 4px;
}

.top-bar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.top-bar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-rgb), 0.1));
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

/* Online status dot */
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.online-dot.online {
  background: var(--accent);
  animation: pulse-online 3s ease-in-out infinite;
}

.online-dot.offline {
  background: var(--danger);
  animation: none;
}

.online-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0;
}

.online-dot.online::after {
  border-color: var(--accent);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-online {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes pulse-ring {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0; transform: scale(2); }
}

/* ============================================================
   Resume Button (full-width, bottom of card)
   ============================================================ */
.resume-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  margin-top: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--sp-3);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.02));
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
}
.resume-btn:first-of-type { margin-top: var(--sp-4); }

.resume-btn:active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
}

.resume-btn-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  color: var(--accent);
}
.resume-btn--ai .resume-btn-icon { color: #A855F7; }
.resume-btn--secondary .resume-btn-icon { color: var(--info); }

.resume-btn-content {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.resume-btn-text {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  display: block;
  letter-spacing: -0.02em;
}

.resume-btn-sub {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.resume-btn-arrow {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   Reject Modal — mic inside textarea
   ============================================================ */
.reject-modal-input-wrap {
  position: relative;
}

.reject-modal-input-wrap .reject-modal-input {
  padding-right: 52px;
}

.reject-modal-input-wrap .reject-modal-btn--mic {
  position: absolute;
  right: var(--sp-2);
  bottom: var(--sp-2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  font-size: 18px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.reject-modal-input-wrap .reject-modal-btn--mic.recording {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  animation: mic-pulse 1s ease-in-out infinite;
}

/* ============================================================
   Pros / Cons (strengths & risks) block
   ============================================================ */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.pros-cons-col {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: var(--sp-3);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pros-cons-title {
  font-family: var(--font-heading);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pros-cons-title--pro { color: #10B981; }
.pros-cons-title--con { color: #F97316; }

.pros-cons-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pros-cons-list li {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 2px 0;
  padding-left: var(--sp-4);
  position: relative;
}

.pros-cons-list li::before {
  position: absolute;
  left: 0;
  font-weight: var(--fw-bold);
  font-size: 11px;
}

.pros-cons-list--pro li::before {
  content: '+';
  color: #10B981;
}

.pros-cons-list--con li::before {
  content: '\2013';
  color: #F97316;
}

.pros-cons-empty {
  font-size: var(--fs-micro);
  color: var(--text-muted);
}

/* ============================================================
   Resume page — expanded card, back-full button, criterion desc
   ============================================================ */
.resume-page-card {
  touch-action: auto;
}

.action-btn--back-full {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  text-decoration: none;
  min-height: 48px;
}

.action-btn--back-full:active {
  background: var(--bg-surface);
}

.resume-btn--hh {
  border-color: var(--info);
}

.resume-btn--hh:active {
  background: rgba(var(--info-rgb), 0.12);
  border-color: var(--info);
}

/* Criterion expanded view (resume page) */
.criterion--expanded {
  flex-direction: column;
  align-items: stretch;
}

.criterion--expanded .criterion-top-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.criterion-description {
  font-size: var(--fs-micro);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: var(--sp-2);
  padding-left: 40px;
}

.criteria-section--expanded .criterion {
  cursor: default;
}

.criteria-section--expanded .criterion-arrow {
  display: none;
}

/* ============================================================
   Mobile QA fixes
   ============================================================ */

/* Reject modal safe area bottom */
.reject-modal {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

/* Share button — blue/info variant */
.resume-btn--secondary {
  background: linear-gradient(135deg, rgba(var(--info-rgb), 0.08), rgba(var(--info-rgb), 0.02));
  border-color: rgba(var(--info-rgb), 0.2);
}
.resume-btn--secondary:active {
  background: rgba(var(--info-rgb), 0.12);
  border-color: var(--info);
}
.resume-btn--secondary .resume-btn-arrow { color: var(--info); }

/* Interview invite button — warm amber variant */
.resume-btn--invite {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(234, 179, 8, 0.03));
  border-color: rgba(234, 179, 8, 0.25);
}
.resume-btn--invite:active {
  background: rgba(234, 179, 8, 0.15);
  border-color: var(--warning);
}
.resume-btn--invite .resume-btn-icon { color: var(--warning); }
.resume-btn--invite .resume-btn-arrow { color: var(--warning); }

/* Neutral button — muted gray variant */
.resume-btn--neutral {
  background: var(--bg-elevated);
  border-color: var(--border);
}
.resume-btn--neutral:active {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.12);
}
.resume-btn--neutral .resume-btn-icon { color: var(--text-muted); }
.resume-btn--neutral .resume-btn-arrow { color: var(--text-muted); }

/* AI chat button — purple variant */
.resume-btn--ai {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(168, 85, 247, 0.03));
  border-color: rgba(168, 85, 247, 0.25);
}
.resume-btn--ai:active {
  background: rgba(168, 85, 247, 0.15);
  border-color: #A855F7;
}
.resume-btn--ai .resume-btn-arrow { color: #A855F7; }
.resume-btn-icon--ai {
  position: relative;
  color: #A855F7;
}
.resume-btn-ai-spark {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 12px;
  line-height: 1;
  animation: ai-spark-pulse 2s ease-in-out infinite;
}
@keyframes ai-spark-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Discuss button — green/team-chat variant (Phase 12.2) */
.resume-btn--discuss {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.03));
  border-color: rgba(34, 197, 94, 0.25);
}
.resume-btn--discuss:active {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22C55E;
}
.resume-btn--discuss .resume-btn-icon { color: #22C55E; }
.resume-btn--discuss .resume-btn-arrow { color: #22C55E; }
.resume-btn-icon--discuss { color: #22C55E; }
.resume-btn--discuss:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================
   AI Chat Modal
   ============================================================ */
.ai-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.ai-chat-overlay.active {
  display: flex;
}

.ai-chat-modal {
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ai-chat-overlay.active .ai-chat-modal {
  transform: translateY(0);
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-chat-header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.ai-chat-header-icon {
  font-size: 20px;
  line-height: 1;
}
.ai-chat-header-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #A855F7, #38BDF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.ai-chat-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.ai-chat-close:active { background: var(--bg-surface); }

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 200px;
  max-height: 50vh;
}

.ai-chat-msg {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  animation: ai-msg-in 0.3s ease-out;
}
@keyframes ai-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-chat-msg--user {
  justify-content: flex-end;
}

.ai-chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(56, 189, 248, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ai-chat-msg-bubble {
  padding: var(--sp-3);
  border-radius: 14px;
  font-size: var(--fs-body);
  line-height: 1.5;
  max-width: 85%;
}

.ai-chat-msg--ai .ai-chat-msg-bubble {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
}

.ai-chat-msg--user .ai-chat-msg-bubble {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(56, 189, 248, 0.15));
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}

.ai-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.ai-chat-suggestion {
  font-size: var(--fs-caption);
  font-weight: 500;
  color: #A855F7;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.ai-chat-suggestion:active {
  background: rgba(168, 85, 247, 0.2);
}

.ai-chat-input-wrap {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  padding-bottom: calc(var(--sp-3) + var(--safe-bottom));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-chat-input {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: var(--fs-body);
  font-family: var(--font-body);
  padding: 0 var(--sp-4);
  outline: none;
  transition: border-color 0.2s;
}
.ai-chat-input:focus {
  border-color: #A855F7;
}
.ai-chat-input::placeholder {
  color: var(--text-muted);
}

.ai-chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #A855F7, #7C3AED);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ai-chat-send:active {
  transform: scale(0.92);
}
.ai-chat-send:hover {
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.ai-chat-mic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ai-chat-mic:active { transform: scale(0.92); }
.ai-chat-mic.recording {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  animation: mic-pulse 1s ease-in-out infinite;
}

/* ============================================================
   Full Resume Page (rv- prefix = resume-view)
   ============================================================ */

/* --- Section container --- */
.rv-resume-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}

/* --- Section title --- */
.rv-resume-section-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  letter-spacing: -0.02em;
}

.rv-resume-section-icon {
  font-size: 18px;
  line-height: 1;
}

.rv-resume-section-badge {
  margin-left: auto;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 8px;
}

/* --- Header section --- */
.rv-resume-header {
  padding: var(--sp-5) var(--sp-4);
}

.rv-resume-header-top {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}

.rv-resume-photo {
  width: 72px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  transition: opacity 0.15s;
}
.rv-resume-photo:hover { opacity: 0.85; }

.rv-resume-photo-placeholder {
  width: 72px;
  height: 88px;
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: var(--fw-bold);
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.rv-resume-header-info {
  flex: 1;
  min-width: 0;
}

.rv-resume-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-1);
  letter-spacing: -0.02em;
}

.rv-resume-position {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.3;
  margin-bottom: var(--sp-2);
}

.rv-resume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.rv-resume-meta-item {
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

.rv-resume-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}

.rv-resume-ai-badge {
  font-family: var(--font-heading);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  padding: 2px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.rv-resume-ai-badge--green  { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.rv-resume-ai-badge--lime   { background: rgba(132, 204, 22, 0.15); color: #84CC16; }
.rv-resume-ai-badge--yellow { background: rgba(234, 179, 8, 0.15); color: #EAB308; }
.rv-resume-ai-badge--orange { background: rgba(249, 115, 22, 0.15); color: #F97316; }
.rv-resume-ai-badge--red    { background: rgba(239, 68, 68, 0.15); color: #EF4444; }

/* --- Experience items --- */
.rv-experience-item {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.rv-experience-item:last-child {
  margin-bottom: 0;
}

.rv-exp-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 12px;
  flex-shrink: 0;
  padding-top: 4px;
}

.rv-exp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.rv-exp-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: var(--sp-2);
}

.rv-exp-content {
  flex: 1;
  min-width: 0;
}

.rv-exp-dates {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sp-1);
  gap: var(--sp-2);
}

.rv-exp-period {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

.rv-exp-duration {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rv-exp-position {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
}

.rv-exp-company {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}

.rv-exp-company--link {
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
}

.rv-exp-company--link:active {
  text-decoration: underline;
}

.rv-exp-desc {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}

.rv-exp-desc br {
  display: block;
  content: "";
  margin-top: var(--sp-1);
}

/* Sub-headings inside experience description (Обязанности, Результаты) */
.rv-exp-subtitle {
  font-family: var(--font-heading);
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--text-primary);
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-1);
  padding-bottom: var(--sp-1);
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: -0.01em;
}
.rv-exp-subtitle:first-child {
  margin-top: 0;
}

/* --- Education / Courses items --- */
.rv-edu-item {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  align-items: flex-start;
}

.rv-edu-item:last-child {
  margin-bottom: 0;
}

.rv-edu-year {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--accent);
  min-width: 42px;
  flex-shrink: 0;
  padding-top: 1px;
  font-variant-numeric: tabular-nums;
}

.rv-edu-content {
  flex: 1;
  min-width: 0;
}

.rv-edu-level {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}

.rv-edu-faculty {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.rv-edu-university {
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

/* --- Skills --- */
.rv-skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.rv-skill-tag {
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--info);
  background: rgba(var(--info-rgb), 0.1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 8px;
  border: 1px solid rgba(var(--info-rgb), 0.15);
}

/* --- Languages --- */
.rv-lang-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
}

.rv-lang-row:last-child {
  border-bottom: none;
}

.rv-lang-name {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
}

.rv-lang-level {
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

/* --- Additional info rows --- */
.rv-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
  gap: var(--sp-3);
}

.rv-info-row:last-child {
  border-bottom: none;
}

.rv-info-label {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  flex-shrink: 0;
}

.rv-info-value {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  text-align: right;
}

.rv-info-about {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

.rv-info-about-label {
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-2);
}

.rv-info-about-text {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}

.rv-info-about-text br {
  display: block;
  content: "";
  margin-top: var(--sp-1);
}

/* --- External link card --- */
.rv-ext-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: var(--sp-3);
  transition: background 0.15s, border-color 0.15s;
}

.rv-ext-link:active {
  background: var(--bg-elevated);
  border-color: var(--info);
}

.rv-ext-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--info-rgb), 0.1);
  color: var(--info);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rv-ext-link-text {
  flex: 1;
  min-width: 0;
}

.rv-ext-link-title {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  display: block;
  letter-spacing: -0.02em;
}

.rv-ext-link-sub {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.rv-ext-link-arrow {
  color: var(--info);
  flex-shrink: 0;
}

/* ====== About modal ====== */
.about-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.about-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.about-modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  width: 90%;
  max-width: 380px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.about-modal-overlay.active .about-modal {
  transform: scale(1);
}
.about-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.about-modal-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: var(--fw-bold);
  color: var(--accent);
  text-align: center;
  letter-spacing: -0.02em;
}
.about-modal-version {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.about-modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
  margin-bottom: 1rem;
}
.about-modal-section {
  margin-bottom: 0.75rem;
}
.about-modal-label {
  font-size: 12px;
  font-weight: var(--fw-semi);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.about-modal-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.about-modal-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
  padding-left: 1rem;
  position: relative;
}
.about-modal-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.about-modal-tech {
  font-size: 13px;
  color: var(--text-secondary);
}
.about-modal-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}
.about-modal-footer {
  text-align: center;
}
.about-modal-company {
  font-size: 13px;
  font-weight: var(--fw-semi);
  color: var(--text-primary);
}
.about-modal-email {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

/* ====== Settings modal ====== */
.settings-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.settings-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.settings-modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  width: 90%;
  max-width: 380px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-modal-overlay.active .settings-modal {
  transform: scale(1);
}
.settings-modal-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child {
  border-bottom: none;
}
.settings-row--disabled {
  opacity: 0.45;
  pointer-events: none;
}
.settings-row-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.settings-row-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.settings-row-label {
  font-size: 14px;
  font-weight: var(--fw-semi);
  color: var(--text-primary);
}
.settings-row-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
/* Toggle switch */
.settings-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.settings-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-surface);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.settings-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.settings-toggle input:checked + .settings-toggle-slider {
  background: var(--accent);
}
.settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}

/* -- Segment control (Phase 12.1, per UI-SPEC C-01) -------------- */
.segment-control {
  display: flex;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 3px;
  margin: var(--sp-3) var(--sp-4);
}
.segment-tab {
  flex: 1;
  padding: 10px 0;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  line-height: 1.0;
  transition: background 0.2s ease, color 0.2s ease;
}
.segment-tab--active {
  background: var(--accent);
  color: #FFFFFF;
}

/* -- Vacancy chat icon (Phase 12.1, per UI-SPEC C-02) ------------ */
.vacancy-chat-btn {
  background: none;
  border: none;
  padding: var(--sp-2);
  cursor: pointer;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vacancy-chat-btn:hover {
  opacity: 1.0;
}
.vacancy-chat-btn:active {
  transform: scale(0.9);
}
