* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f6fa;
  color: #1f2937;
  min-height: 100vh;
}
header {
  background: #1e293b;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
header h1 { font-size: 20px; font-weight: 600; }
.tabs { display: flex; gap: 8px; margin-left: auto; }
.tab-btn {
  background: transparent;
  color: #cbd5e1;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: 0.15s;
}
.tab-btn:hover { background: #334155; color: #fff; }
.tab-btn.active { background: #3b82f6; color: #fff; }

main { padding: 24px; max-width: 1200px; margin: 0 auto; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: 0.15s;
}
.btn:hover { background: #2563eb; }
.btn.secondary { background: #e5e7eb; color: #374151; }
.btn.secondary:hover { background: #d1d5db; }
.btn.danger { background: #ef4444; }
.btn.danger:hover { background: #dc2626; }
.btn.small { padding: 6px 12px; font-size: 13px; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: 0.15s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.card-main { flex: 1; min-width: 0; }
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.card-sub {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}
.card-meta {
  font-size: 13px;
  color: #374151;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.card-meta span strong { color: #1f2937; }

.card-actions { display: flex; gap: 8px; flex-shrink: 0; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 { margin-bottom: 16px; font-size: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.hidden { display: none !important; }
.tab-content { display: none; }
.tab-content.active { display: block; }

@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
  }

  main { padding: 20px; }
}

@media (max-width: 600px) {
  header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  header h1 {
    font-size: 18px;
    line-height: 1.4;
  }

  .tabs {
    width: 100%;
    margin-left: 0;
  }

  .tab-btn {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
  }

  main { padding: 16px; }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar > .btn { width: 100%; }

  .card {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .card-actions { width: 100%; }
  .card-actions .btn { flex: 1; }

  .card-meta { gap: 8px 16px; }

  .modal-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 20px 16px;
    border-radius: 14px;
  }

  .modal-actions {
    flex-wrap: wrap;
  }

  .modal-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }

  .form-group input,
  .form-group select {
    min-height: 44px;
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  main { padding: 12px; }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn { width: 100%; }
}
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.char-counter {
  text-align: right;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

/* Описание в карточке: максимум 3 строки, переносы сохраняются */
.card-desc {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 8px;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .form-group textarea { font-size: 16px; }
}
/* Поиск вакансий: по работодателю или по описанию */
.vacancy-search { display: flex; gap: 10px; margin-bottom: 16px; }
.vacancy-search input,
.vacancy-search select {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1f2937;
}
.vacancy-search input { flex: 1; min-width: 0; }
.vacancy-search select { flex: 0 0 auto; cursor: pointer; }
.vacancy-search input:focus,
.vacancy-search select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

@media (max-width: 600px) {
  .vacancy-search { flex-direction: column; }
  .vacancy-search input,
  .vacancy-search select { min-height: 44px; font-size: 16px; }
}

/* Срочность подбора: стандартная — обычная карточка */
.card.urgency-urgent { background: #ffdc8f; border-color: #e6b83a; }
.card.urgency-hot    { background: #ff8f8f; border-color: #e03e3e; }
.card.urgency-urgent .card-sub,
.card.urgency-urgent .card-desc,
.card.urgency-urgent .card-meta,
.card.urgency-hot .card-sub,
.card.urgency-hot .card-desc,
.card.urgency-hot .card-meta { color: #1f2937; }
