/* ===================================================
   RECRUITER PANEL — style.css
   Modern, clean, light design
   =================================================== */

/* ——— Reset & Variables ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #6366F1;
  --primary-dk:   #4F46E5;
  --primary-lt:   #EEF2FF;
  --success:      #10B981;
  --warning:      #F59E0B;
  --danger:       #EF4444;
  --danger-lt:    #FEF2F2;
  --gray-50:      #F9FAFB;
  --gray-100:     #F3F4F6;
  --gray-200:     #E5E7EB;
  --gray-300:     #D1D5DB;
  --gray-400:     #9CA3AF;
  --gray-500:     #6B7280;
  --gray-600:     #4B5563;
  --gray-700:     #374151;
  --gray-800:     #1F2937;
  --gray-900:     #111827;
  --sidebar-w:    240px;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --transition:   all .18s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); }

/* ——— App Shell (Sidebar Layout) ——— */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ——— Sidebar ——— */
.sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gray-100);
}
.logo-icon { font-size: 22px; }
.logo-text  { font-size: 17px; font-weight: 700; color: var(--gray-900); letter-spacing: -.3px; }

.sidebar-nav {
  padding: 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-weight: 500;
  transition: var(--transition);
}
.nav-item:hover  { background: var(--gray-100); color: var(--gray-900); }
.nav-item.active { background: var(--primary-lt); color: var(--primary); }
.nav-icon { font-size: 16px; width: 22px; text-align: center; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.user-name  { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.user-role  { font-size: 11px; color: var(--gray-500); }
.user-info  { flex: 1; min-width: 0; }
.logout-btn {
  font-size: 16px; color: var(--gray-400);
  padding: 4px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.logout-btn:hover { background: var(--gray-100); color: var(--danger); }

/* ——— Main Content ——— */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}
.page-content {
  max-width: 1200px;
  padding: 28px 32px;
  margin: 0 auto;
}

/* ——— Page Header ——— */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
}
.page-sub { color: var(--gray-500); font-size: 14px; }

/* ——— Cards ——— */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}
.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}
.form-card { padding: 24px; }
.form-card .card-header { padding: 0 0 20px; border-bottom-color: var(--gray-200); margin-bottom: 20px; }

/* ——— Stats Grid ——— */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-value { font-size: 26px; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ——— Tables ——— */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--gray-50); }

.row-blocked td { background: #FFF5F5 !important; }
.row-blocked:hover td { background: #FEE2E2 !important; }
.row-inactive td { opacity: .6; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--primary);    color: #fff; }
.btn-primary:hover { background: var(--primary-dk); color: #fff; }
.btn-outline   { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-lt); }
.btn-ghost     { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-block     { width: 100%; }
.btn-sm        { padding: 6px 12px; font-size: 12px; }
.btn-xs        { padding: 3px 8px; font-size: 11px; border-radius: 5px; background: var(--gray-100); color: var(--gray-600); }
.btn-xs:hover  { background: var(--gray-200); }
.btn-large     { padding: 14px 24px; font-size: 15px; border-radius: 10px; }
.btn-icon      { padding: 6px 8px; background: transparent; font-size: 16px; border-radius: 6px; }
.btn-icon:hover { background: var(--gray-100); }

/* ——— Forms ——— */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .15s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }

/* ——— Alerts ——— */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.alert-error   { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }

/* ——— Badges / Status ——— */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-new       { background: #DBEAFE; color: #1E40AF; }
.badge-in_review { background: #FEF3C7; color: #92400E; }
.badge-accepted  { background: #D1FAE5; color: #065F46; }
.badge-rejected  { background: #FEE2E2; color: #991B1B; }
.badge-you       { background: var(--primary-lt); color: var(--primary); font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 600; }

.status-badge { font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.status-active   { color: var(--success); }
.status-inactive { color: var(--gray-400); }

.status-select {
  padding: 4px 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: var(--gray-700);
  background: #fff;
}
.status-select:focus { border-color: var(--primary); outline: none; }

.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.tag-green { background: #D1FAE5; color: #065F46; }

.vacancy-chip {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-lt);
  color: var(--primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-badge    { font-size: 12px; font-weight: 500; }
.role-admin    { color: var(--primary); }
.role-recruiter { color: var(--gray-600); }

/* ——— Geo indicators ——— */
.geo-blocked { color: var(--danger); font-weight: 500; }
.geo-unknown { display: flex; align-items: center; gap: 6px; }
.geo-input   { width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-300); border-radius: 8px; font-size: 18px; text-align: center; font-weight: 700; letter-spacing: 4px; }
.geo-input:focus { border-color: var(--primary); outline: none; }

/* ——— Misc ——— */
.text-muted { color: var(--gray-400); }
.text-sm    { font-size: 12px; }
.mono       { font-family: 'Courier New', monospace; font-size: 12px; }
.hidden     { display: none !important; }
.empty-state { text-align: center; padding: 40px; color: var(--gray-400); font-size: 14px; }

.candidate-name { font-weight: 500; color: var(--gray-900); }
.candidate-tg   { font-size: 12px; color: var(--primary); }
.vacancy-title  { font-weight: 500; }
.tg-link    { color: #229ED9; font-weight: 500; }
.linkedin-link { color: #0A66C2; }
.desc-cell  { max-width: 200px; }
.desc-preview { font-size: 12px; color: var(--gray-500); cursor: help; }
.actions-cell { white-space: nowrap; }
.user-row   { display: flex; align-items: center; gap: 10px; }
.user-avatar-sm {
  width: 30px; height: 30px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}

/* ——— Filters ——— */
.filters-card { padding: 16px 20px; }
.filters-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filter-group { flex: 1; min-width: 140px; }
.filter-group label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); margin-bottom: 6px; }
.filter-group input,
.filter-group select { width: 100%; padding: 8px 10px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 13px; color: var(--gray-800); }
.filter-group input:focus, .filter-group select:focus { border-color: var(--primary); outline: none; }
.filter-actions { display: flex; gap: 8px; align-items: center; }

/* ——— Vacancy links ——— */
.vacancy-link-wrap { display: flex; align-items: center; gap: 6px; }
.vacancy-link {
  font-size: 11px;
  background: var(--gray-100);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--gray-600);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.vacancy-form { display: flex; flex-direction: column; }

/* ——— Modals ——— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}
.modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 92vw;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  z-index: 1;
}
.modal-large  { max-width: 760px; }
.modal-small  { max-width: 400px; }
.modal-close  {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--gray-100);
  border: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); }
.loading { text-align: center; padding: 40px; color: var(--gray-400); }

/* ——— Application Detail Modal ——— */
.modal-app-detail h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.detail-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.detail-section { margin-bottom: 20px; }
.detail-section h4 { font-size: 13px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.detail-row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--gray-500); flex-shrink: 0; min-width: 130px; }
.detail-text { font-size: 14px; line-height: 1.7; color: var(--gray-700); white-space: pre-wrap; }
.blocked-banner { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; font-size: 13px; }
.detail-blocked { border-top: 3px solid var(--danger); }
.cv-download { display: flex; align-items: center; gap: 12px; background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: 8px; padding: 12px 16px; }
.cv-icon { font-size: 22px; }
.cv-name { flex: 1; font-size: 13px; color: var(--gray-700); font-weight: 500; }
.notes-area { width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-family: inherit; font-size: 13px; resize: vertical; }
.notes-area:focus { border-color: var(--primary); outline: none; }

/* ——— Login Page ——— */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); }
.login-container { width: 100%; padding: 20px; }
.login-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(99,102,241,.15);
  padding: 40px;
  max-width: 400px;
  margin: 0 auto;
}
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo { font-size: 40px; margin-bottom: 12px; display: block; }
.login-header h1 { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.login-header p  { color: var(--gray-500); font-size: 14px; margin-top: 6px; }
.login-form .form-group { margin-bottom: 16px; }
.login-hint { text-align: center; font-size: 12px; color: var(--gray-400); margin-top: 16px; }

/* ——— Public Vacancy Pages ——— */
.public-body { background: var(--gray-50); min-height: 100vh; }
.public-container { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; }
.public-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  background: #fff;
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 20px;
  margin-bottom: 20px;
}
.pub-logo { font-size: 17px; font-weight: 700; color: var(--gray-900); }

.pub-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}

.vacancy-header { margin-bottom: 24px; }
.vacancy-header h1 { font-size: 24px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }
.vacancy-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.vacancy-section { margin-bottom: 24px; }
.vacancy-section h3 { font-size: 15px; font-weight: 600; color: var(--gray-700); margin-bottom: 10px; }
.vacancy-text { font-size: 14px; line-height: 1.8; color: var(--gray-600); white-space: pre-wrap; }
.vacancy-card { border-left: 4px solid var(--primary); }

.apply-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--gray-900); }
.apply-form .form-group label { font-weight: 500; }

/* File upload */
.file-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.file-upload-area:hover { border-color: var(--primary); background: var(--primary-lt); }
.file-upload-icon { font-size: 28px; margin-bottom: 8px; }
.file-upload-text { font-weight: 500; color: var(--gray-700); }
.file-upload-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.file-name-display { margin-top: 10px; padding: 8px 12px; background: var(--gray-100); border-radius: 6px; font-size: 13px; color: var(--gray-700); }

/* Success / Error Pages */
.success-page, .error-page {
  text-align: center;
  padding: 60px 20px;
}
.success-icon, .error-icon { font-size: 60px; margin-bottom: 20px; }
.success-page h2, .error-page h2 { font-size: 24px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }
.success-page p, .error-page p { color: var(--gray-600); margin-bottom: 8px; }

/* ——— Responsive ——— */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .main-content { margin-left: 0; }
  .page-content { padding: 16px; }
  .form-grid, .form-grid-2, .detail-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filters-form { flex-direction: column; }
  .filter-group { min-width: 100%; }
}

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

/* ——— Questionnaire (admin side) ——— */
.questions-section {
  border-top: 1px solid var(--gray-200);
  margin-top: 24px;
  padding-top: 20px;
}
.questions-header { margin-bottom: 14px; }
.questions-header h4 { font-size: 15px; font-weight: 600; color: var(--gray-900); margin-bottom: 4px; }
.questions-header .q-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700;
  margin-left: 6px; vertical-align: middle;
}
.questions-hint { font-size: 12px; color: var(--gray-500); }
.questions-hint-new { padding: 12px 16px; background: var(--gray-50); border-radius: 8px; font-size: 13px; color: var(--gray-500); margin-top: 16px; border: 1px dashed var(--gray-300); }

.questions-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.question-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 8px; padding: 10px 14px;
}
.q-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-lt); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.q-text { flex: 1; font-size: 13px; color: var(--gray-800); }
.q-del { opacity: 0.4; }
.q-del:hover { opacity: 1; background: #FEE2E2; }

.add-question-form { margin-top: 4px; }
.add-q-row { display: flex; gap: 10px; }
.q-input { flex: 1; padding: 9px 12px; border: 1.5px solid var(--gray-300); border-radius: 8px; font-family: inherit; font-size: 13px; outline: none; }
.q-input:focus { border-color: var(--primary); }
.q-examples { font-size: 11px; color: var(--gray-400); margin-top: 8px; }

/* ——— Public questionnaire ——— */
.form-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--gray-500);
  padding: 16px 0 10px; margin-top: 8px;
  border-top: 1px solid var(--gray-100);
}
.form-section-title:first-child { border-top: none; padding-top: 0; }
.questions-block { display: flex; flex-direction: column; gap: 4px; }
.pub-question { position: relative; }
.pub-question label { display: flex; align-items: flex-start; gap: 8px; }
.pub-q-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}

/* ——— Answers in modal ——— */
.answers-list { display: flex; flex-direction: column; gap: 12px; }
.answer-item {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 8px; padding: 12px 14px;
}
.answer-q {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  margin-bottom: 8px;
}
.q-num-sm {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.answer-a {
  font-size: 13px; color: var(--gray-800); line-height: 1.6;
  padding-left: 26px; white-space: pre-wrap;
}

/* ══════════════════════════════════════════════
   BOARD TOOLBAR
══════════════════════════════════════════════ */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-lt); color: var(--primary);
  border: 1px solid #C7D2FE;
  padding: 3px 8px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.filter-tag-x {
  color: var(--primary); font-size: 14px; line-height: 1;
  cursor: pointer; margin-left: 2px; text-decoration: none;
}
.filter-tag-x:hover { color: var(--danger); }

/* ══════════════════════════════════════════════
   EXPANDED TOGGLE SWITCH
══════════════════════════════════════════════ */
.expanded-toggle-wrap {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.toggle-label { font-size: 13px; color: var(--gray-500); font-weight: 500; }
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--gray-300); border-radius: 24px;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ══════════════════════════════════════════════
   GEO MULTI-SELECT DROPDOWN
══════════════════════════════════════════════ */
.filter-geo-group { position: relative; }

.geo-dropdown-btn {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-800);
  cursor: pointer;
  text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
  transition: border-color .15s;
}
.geo-dropdown-btn:hover { border-color: var(--primary); }
.geo-arrow { font-size: 10px; color: var(--gray-400); transition: transform .2s; }

.geo-dropdown {
  display: none;
  position: fixed;        /* fixed вместо absolute — не зависит от overflow родителей */
  min-width: 240px;
  width: 240px;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  padding: 6px 0;
  max-height: 320px;
  overflow-y: auto;
}
.geo-dropdown.open { display: block; }
.geo-dropdown.open ~ .geo-dropdown-btn .geo-arrow { transform: rotate(180deg); }

.geo-option {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: background .12s;
}
.geo-option:hover { background: var(--gray-50); }
.geo-option input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }
.geo-option-special { font-weight: 500; }

.geo-divider {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--gray-400);
  padding: 8px 14px 4px;
  border-top: 1px solid var(--gray-100); margin-top: 4px;
}
.geo-actions {
  display: flex; gap: 6px; padding: 8px 14px 4px;
  border-top: 1px solid var(--gray-100); margin-top: 4px;
  justify-content: flex-end;
}
.geo-selected-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 10px; font-weight: 700;
  margin-left: 2px; vertical-align: middle;
}
.geo-selected-count:empty { display: none; }

/* ══════════════════════════════════════════════
   EXPANDED VIEW CARDS
══════════════════════════════════════════════ */
.exp-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.exp-card:hover { box-shadow: var(--shadow-md); }
.exp-card-blocked { border-left: 4px solid var(--danger); background: #FFFAFA; }

.exp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap; gap: 10px;
}
.exp-header-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.exp-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.exp-name { font-size: 15px; font-weight: 600; color: var(--gray-900); }
.exp-geo  { font-size: 13px; }
.exp-date { white-space: nowrap; }
.blocked-flag { font-size: 18px; }

.exp-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0;
}
.exp-desc {
  padding: 14px 18px;
  border-right: 1px solid var(--gray-100);
}
.exp-answers { padding: 14px 18px; }
.exp-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--gray-400); margin-bottom: 8px;
}
.exp-text {
  font-size: 13px; color: var(--gray-700); line-height: 1.6;
  white-space: pre-wrap;
}

.exp-qa { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-100); }
.exp-qa:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.exp-q {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 4px;
}
.exp-a {
  font-size: 13px; color: var(--gray-800); line-height: 1.6;
  padding-left: 24px; white-space: pre-wrap;
}

.exp-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}



/* ══════════════════════════════════════════════
   EXPANDED HORIZONTAL TABLE
══════════════════════════════════════════════ */
.exp-table {
  /* Горизонтальный скролл — важно для многих вопросов */
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}
/* Принудительно убираем white-space:nowrap с th общего класса для exp-table */
.exp-table th {
  white-space: normal;
}

/* Шапка — фиксированные колонки */
.exp-th-fixed {
  background: var(--gray-50);
  white-space: nowrap;
  min-width: 120px;
}

/* Sticky — колонка "Кандидат" прилипает при горизонтальном скролле */
.exp-table th:first-child,
.exp-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 2px 0 6px rgba(0,0,0,.06);
}
.exp-table th:first-child {
  background: var(--gray-50);
  z-index: 4;
}
.exp-table .row-blocked td:first-child {
  background: #FFF5F5;
}
.exp-table tbody tr:hover td:first-child {
  background: #F9FAFB;
}

/* Шапка — колонки вопросов */
.exp-th-q {
  background: #F0F4FF;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  vertical-align: top;
  padding: 10px 12px !important;
  /* Каждый th — своя ячейка, текст переносится */
  white-space: normal !important;
  word-break: break-word;
  box-sizing: border-box;
}
.exp-th-q .q-num-sm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700;
  margin-right: 5px; flex-shrink: 0;
  vertical-align: top; margin-top: 1px;
}
.exp-q-title {
  font-size: 12px; font-weight: 600;
  color: var(--gray-700); line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

/* Ячейка кандидата */
.exp-td-candidate {
  min-width: 150px;
  vertical-align: top;
}
.cv-badge {
  display: inline-block;
  margin-top: 4px; margin-right: 4px;
  padding: 1px 6px;
  background: var(--gray-100); color: var(--gray-600);
  border-radius: 4px; font-size: 11px;
  text-decoration: none; font-weight: 500;
}
.cv-badge:hover { background: var(--gray-200); color: var(--gray-800); }

/* Ячейка «О себе» */
.exp-td-desc {
  min-width: 160px;
  max-width: 220px;
  vertical-align: top;
}
.exp-desc-text {
  font-size: 12px; color: var(--gray-600);
  line-height: 1.5; cursor: help;
}

/* Ячейка ответа */
.exp-td-answer {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  vertical-align: top;
  background: #FAFBFF;
  border-left: 2px solid #E0E7FF !important;
  word-break: break-word;
  white-space: normal;
}
.exp-td-answer:hover { background: #F0F4FF; }
.exp-answer-text {
  font-size: 13px; color: var(--gray-800);
  line-height: 1.55; white-space: pre-wrap;
  word-break: break-word;
}

/* Строки */
.exp-table tbody tr td { vertical-align: top; }
.exp-table tbody tr:hover td { background: #FAFAFA; }
.exp-table tbody tr:hover .exp-td-answer { background: #EEF2FF; }
.exp-table .row-blocked .exp-td-answer { background: #FFF5F5; border-left-color: #FECACA !important; }

/* Подсказка при отсутствии вакансии */
.toggle-hint {
  font-size: 12px; color: var(--gray-400);
  font-style: italic;
}
.toggle-label-active { color: var(--primary); font-weight: 600; }

/* ══════════════════════════════════════════════
   RESPONSIVE / MOBILE
══════════════════════════════════════════════ */

/* ── Tablet 1024px ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .filters-form { flex-wrap: wrap; }
  .filter-group { min-width: calc(50% - 8px); flex: none; }
  .filter-actions { width: 100%; justify-content: flex-end; }
}

/* ── Mobile 768px ── */
@media (max-width: 768px) {

  /* Sidebar скрыт, появляется по гамбургеру */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.18);
  }
  .main-content { margin-left: 0; }

  /* Гамбургер */
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 500;
    width: 40px; height: 40px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-size: 18px;
  }

  /* Overlay при открытом sidebar */
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 99;
  }
  .sidebar-overlay.active { display: block; }

  /* Page padding чтобы не перекрываться с гамбургером */
  .page-content { padding: 60px 14px 20px; }

  /* Page header */
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-header h2 { font-size: 18px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; font-size: 16px; }
  .stat-value { font-size: 20px; }

  /* Cards */
  .card { border-radius: 10px; }
  .card-header { padding: 12px 14px; }

  /* Filters */
  .filters-form { flex-direction: column; gap: 10px; }
  .filter-group { min-width: 100%; flex: none; }
  .filter-actions { flex-direction: row; gap: 8px; }
  .filter-actions .btn { flex: 1; }

  /* Tables — горизонтальный скролл */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table th, .data-table td { padding: 10px 12px; font-size: 13px; }

  /* Compact apps table: скрываем LinkedIn и О себе */
  .apps-table th:nth-child(5),
  .apps-table td:nth-child(5),
  .apps-table th:nth-child(6),
  .apps-table td:nth-child(6) { display: none; }

  /* Board toolbar */
  .board-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .expanded-toggle-wrap { justify-content: flex-end; }

  /* Forms */
  .form-grid, .form-grid-2 { grid-template-columns: 1fr; }
  .form-card { padding: 16px; }
  .vacancy-form .form-grid { grid-template-columns: 1fr; }

  /* Modals */
  .modal-box { padding: 20px 16px; border-radius: 14px; width: 96vw; }
  .modal-large { max-width: 96vw; }
  .detail-grid { grid-template-columns: 1fr; }

  /* Sidebar nav при открытии */
  .sidebar { z-index: 200; }

  /* Login */
  .login-card { padding: 28px 20px; }

  /* Public vacancy */
  .public-container { padding: 0 12px 30px; }
  .pub-card { padding: 18px; }
  .vacancy-header h1 { font-size: 20px; }
  .form-grid-2 { grid-template-columns: 1fr; }

  /* Users table — скрываем менее важные колонки */
  .data-table th:nth-child(4),
  .data-table td:nth-child(4) { display: none; }

  /* Expanded table */
  .exp-th-q, .exp-td-answer { min-width: 180px; width: 180px; max-width: 180px; }
}

/* ── Small mobile 480px ── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 56px 10px 16px; }
  .stat-card { padding: 12px; }

  /* Compact table: оставляем только кандидат, статус, глаз */
  .apps-table th:nth-child(2),
  .apps-table td:nth-child(2),
  .apps-table th:nth-child(3),
  .apps-table td:nth-child(3) { display: none; }

  .modal-box { padding: 16px 12px; }
  .pub-card { padding: 14px; }

  .btn-block { font-size: 14px; padding: 12px; }
  .vacancy-header h1 { font-size: 18px; }
}

/* Гамбургер скрыт на десктопе */
.hamburger { display: none; }
@media (max-width: 768px) {
  .hamburger { display: flex; }
}

/* ══════════════════════════════════════════════
   PUBLIC FORM — required / CV+LinkedIn
══════════════════════════════════════════════ */
.req { color: var(--danger); font-weight: 700; margin-left: 2px; }
.req-either { color: #F59E0B; font-weight: 700; margin-left: 2px; }

.section-note {
  font-size: 11px; font-weight: 400; text-transform: none;
  letter-spacing: 0; color: var(--gray-400);
  margin-left: 8px; font-style: italic;
}
.optional-note { color: #10B981; }

/* CV + LinkedIn side by side */
.cv-linkedin-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 0 16px;
  margin-bottom: 4px;
}
.cv-or-divider {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  padding-top: 28px; /* align with inputs */
  font-size: 12px; font-weight: 600;
  color: var(--gray-400);
  position: relative;
}
.cv-or-divider::before,
.cv-or-divider::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 1px;
  height: calc(50% - 14px);
  background: var(--gray-200);
}
.cv-or-divider::before { top: 28px; }
.cv-or-divider::after  { bottom: 0; }

.upload-ok { border-color: #10B981 !important; background: #F0FDF4 !important; }
.input-error { border-color: var(--danger) !important; }

.field-note {
  font-size: 11px; color: var(--gray-400);
  margin-top: 5px;
}

.cv-linkedin-error {
  display: none;
  background: #FEF3C7; color: #92400E;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .cv-linkedin-wrap {
    grid-template-columns: 1fr;
  }
  .cv-or-divider {
    padding-top: 0;
    height: 32px;
    flex-direction: row;
    gap: 12px;
  }
  .cv-or-divider::before,
  .cv-or-divider::after {
    width: calc(50% - 20px);
    height: 1px;
    top: 50%; left: unset;
    transform: none;
  }
  .cv-or-divider::before { left: 0; }
  .cv-or-divider::after  { right: 0; }
}

/* ══════════════════════════════════════════════
   NOTES SECTION
══════════════════════════════════════════════ */
.notes-section .notes-area {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-800);
  resize: vertical;
  transition: border-color .15s;
  box-sizing: border-box;
}
.notes-section .notes-area:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

.notes-log {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notes-log-empty { padding: 12px 14px; }

.note-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  padding: 7px 10px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--gray-100);
  font-size: 13px;
  line-height: 1.5;
  transition: background .3s;
}
.note-entry-new {
  background: #EEF2FF !important;
  border-color: #C7D2FE !important;
}
.note-author {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.note-date {
  color: var(--gray-400);
  font-size: 11px;
  white-space: nowrap;
}
.note-sep {
  color: var(--gray-300);
  font-size: 11px;
}
.note-text {
  color: var(--gray-800);
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.notes-save-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notes-feedback {
  font-size: 12px;
  font-weight: 500;
}
.notes-saved { color: #059669; }
.notes-error { color: var(--danger); }

/* Search hint badge */
.search-hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gray-300); color: #fff;
  font-size: 10px; font-weight: 700;
  cursor: help; margin-left: 4px;
  vertical-align: middle;
}
.search-hint:hover { background: var(--primary); }

/* ══ PeopleForce sync block ══ */
.pf-section h4 { margin-bottom: 10px; }
.pf-synced, .pf-not-synced {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.pf-synced     { background: #F0FDF4; border: 1px solid #BBF7D0; }
.pf-not-synced { background: #FFFBEB; border: 1px solid #FDE68A; }
.pf-icon       { font-size: 18px; flex-shrink: 0; }
.pf-warning    { color: #92400E; font-size: 13px; padding: 8px 12px; background: #FEF3C7; border-radius: 8px; }
.btn-pf {
  background: #6366F1; color: #fff;
  border: none; border-radius: 6px;
  padding: 5px 12px; font-size: 12px;
  cursor: pointer; font-weight: 600;
}
.btn-pf:hover    { background: #4F46E5; }
.btn-pf:disabled { opacity: .6; cursor: default; }

/* PeopleForce ID hint in vacancy form */
.pf-label-hint {
  font-size: 11px; font-weight: 400;
  color: var(--gray-400); margin-left: 6px; font-style: italic;
}
