/*
 * Стили интерфейса откликов. Простой CSS без сборки (Tailwind в проекте нет).
 * Референсы — design/teachbase.png: светло-серый фон, белые карточки, зелёный акцент.
 */

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #2b2f36;
  --muted: #8a919c;
  --line: #e4e7ec;
  --accent: #4caf50;
  --accent-dark: #3d8b40;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

input, textarea, select, button { font: inherit; }

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; background: #333a45; color: #fff;
}
.app-header__brand { font-weight: 600; }
.app-header__user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #cfd4db; }
.app-header__logout {
  padding: 4px 12px; border: none; border-radius: 6px; cursor: pointer;
  background: #4a5261; color: #fff; font-size: 13px;
}
.app-header__logout:hover { background: #565f70; }

 .page { max-width: 1200px; margin: 0 auto; padding: 24px 20px 48px; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { max-width: 1200px; margin: 0 auto; padding: 24px 20px 48px; }

.page-header h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; }
.vacancy-meta { margin: 0 0 20px; color: var(--muted); }

.back-link { display: inline-block; margin-bottom: 12px; color: var(--muted); }
.back-link:hover { color: var(--ink); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 9px 20px; border: 0; border-radius: 8px;
  cursor: pointer; font-weight: 600;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn:disabled { cursor: not-allowed; opacity: 0.6; }

/* Вход */
.login-page {
  min-height: calc(100vh - 42px); padding: 32px 20px;
  display: grid; place-items: center;
}
.login-card {
  width: min(100%, 420px); padding: 32px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 36px rgb(36 45 57 / 8%);
}
.login-card h1 { margin: 0 0 24px; font-size: 24px; text-align: center; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-form__field { display: flex; flex-direction: column; gap: 6px; }
.login-form__field label { font-size: 13px; font-weight: 600; }
.login-form__field input {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.login-form__field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.login-form__remember { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.login-form__submit { width: 100%; }
.login-card__links p { margin: 16px 0 0; text-align: center; }

/* Список вакансий */
.vacancy-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.vacancy-card__link { display: flex; flex-direction: column; gap: 2px; flex: 1; color: var(--ink); }
.vacancy-card__link:hover { text-decoration: none; }
.vacancy-card__link:hover .vacancy-card__title { color: var(--accent-dark); }
.vacancy-card__title { font-size: 16px; font-weight: 600; }
.vacancy-card__meta { color: var(--muted); font-size: 13px; }
.vacancy-card__aside { color: var(--ink); font-size: 13px; white-space: nowrap; }

/* Мастер-детейл: список слева, панель кандидата справа. */
.master-detail { display: flex; gap: 16px; align-items: flex-start; }
.response-list { flex: 0 0 38%; min-width: 0; }
.response-panel { flex: 1 1 60%; min-width: 0; }
.response-panel > .empty-state {
  min-height: 220px; margin: 0; display: grid; place-items: center;
}

.response-card { overflow: hidden; }
.response-card__link { display: block; padding: 14px 16px; color: var(--ink); }
.response-card__link:hover { text-decoration: none; background: #f7faf7; }
.response-card.is-selected .response-card__link { background: #eef7ee; box-shadow: inset 3px 0 0 var(--accent); }
.response-card__name { display: block; font-weight: 600; }
.response-card__title { display: block; color: var(--muted); font-size: 13px; }
.response-card__facts { display: block; margin-top: 4px; font-size: 13px; }

.badge {
  display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; background: #eef1f5; color: var(--muted);
}
.badge--response { background: #e3f2e4; color: var(--accent-dark); }
.badge--discard { background: #fdeaea; color: #b3413c; }
.badge--hire { background: #e3f2e4; color: var(--accent-dark); }

/* Панель кандидата */
.candidate-panel { padding: 20px 24px 24px; }
.candidate-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.candidate-panel__header h2 { margin: 0; font-size: 20px; }
.candidate-panel__subtitle { margin: 4px 0 8px; color: var(--muted); }
.candidate-panel__section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.candidate-panel__section h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.experience-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.experience-list__headline { margin: 0; }
.experience-list__description { margin: 4px 0 0; color: var(--muted); font-size: 13px; white-space: pre-line; }

.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 999px; background: #eef1f5; font-size: 12px; }

/* Пустые состояния */
.empty-state {
  padding: 40px 24px; text-align: center; color: var(--muted);
  background: var(--card); border: 1px dashed var(--line); border-radius: 10px;
}
.muted { color: var(--muted); }

/* ИИ-поиск по откликам вакансии (R18) */
.search-block { margin: 16px 0 8px; }
.search-form { display: flex; gap: 8px; }
.search-input {
  flex: 1; min-width: 0; height: 42px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px;
}
.search-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search-form input[type="submit"] {
  height: 42px; font-size: 14px;
}

.search-results__title { margin: 14px 0 8px; font-size: 15px; }
.search-summary { padding: 12px 16px; margin-bottom: 6px; }
.search-summary__text { margin: 0; line-height: 1.5; }
.search-error, .search-empty { margin-top: 4px; }

.flash {
  padding: 8px 20px; font-size: 14px;
  background: #eef1f6; color: var(--ink);
}
.flash--alert { background: #fdeaea; color: #b23b3b; }

@media (max-width: 760px) {
  .master-detail { flex-direction: column; }
  .response-list, .response-panel { width: 100%; flex-basis: auto; }
  .search-form { align-items: stretch; }
}
