:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e37;
  --text: #e8eaed;
  --muted: #9aa1ac;
  --accent: #4f8cff;
  --danger: #e5534b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.topbar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.brand { color: var(--text); font-weight: 700; text-decoration: none; font-size: 18px; flex-shrink: 0; white-space: nowrap; }
.topbar-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 16px; flex-shrink: 0; }
.lang-switcher { display: flex; gap: 6px; }
.lang-link {
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px; letter-spacing: .03em;
}
.lang-link:hover { color: var(--text); }
.lang-active { color: var(--text); background: #232733; }
.login-card .lang-switcher { justify-content: center; margin-bottom: 14px; }
.logout-form { margin: 0; }
.impersonation-banner {
  background: #3a2f1d; border-bottom: 1px solid #6b5424; color: #e2c47e;
  padding: 8px 24px; font-size: 13px; display: flex; align-items: center; gap: 14px;
}
.impersonation-banner form { margin: 0; }
.impersonation-banner .link-btn { color: #e2c47e; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin-table form { display: inline; margin: 0; }
.temp-password-box {
  background: var(--panel); border: 1px solid var(--accent); border-radius: 8px;
  padding: 14px 16px; margin: 12px 0; font-size: 14px;
}
.temp-password-box code { background: #0f1115; padding: 2px 8px; border-radius: 4px; font-size: 15px; }
.link-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 13px; padding: 0; text-decoration: underline;
}
.link-btn:hover { color: var(--text); }
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 32px; width: 100%; max-width: 360px;
}
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; margin-bottom: 14px; }
.login-card input[type=email], .login-card input[type=password] {
  background: #0f1115; border: 1px solid var(--border); color: var(--text);
  padding: 9px 10px; border-radius: 6px; font-size: 14px;
}
.container { max-width: 900px; margin: 0 auto; padding: 24px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
h1 { font-size: 22px; }
h2 { font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px;}
.empty { color: var(--muted); }
.cards { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card-body p { margin: 4px 0; font-size: 14px; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.badge-on { background: #1d3a26; color: #7ee2a0; }
.badge-off { background: #3a1d1d; color: #e29a9a; }
.btn {
  display: inline-block; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border);
  color: var(--text); text-decoration: none; background: transparent; cursor: pointer; font-size: 14px;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }

.form { display: flex; flex-direction: column; gap: 20px; max-width: 640px; }
.form-section { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; margin: -4px 0 0; line-height: 1.5; }
.form input[type=text], .form input[type=email], .form input[type=number], .form input[type=time], .form select {
  background: #0f1115; border: 1px solid var(--border); color: var(--text); padding: 8px 10px; border-radius: 6px;
}
.form input[type=checkbox] { margin-right: 6px; }
.check-label { flex-direction: row !important; align-items: center; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > label { flex: 1 1 140px; min-width: 0; }
.days { display: flex; gap: 10px; flex-wrap: wrap; }
.day-check { flex-direction: row !important; align-items: center; font-size: 13px; }
.test-results { max-width: 640px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.test-ok { color: #7ee2a0; font-size: 13px; }
.test-fail { color: #e29a9a; font-size: 13px; }
.key-missing { color: #e2c47e; font-size: 12px; font-weight: 600; }
.form-actions { display: flex; gap: 10px; }
.file-input-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.file-input-wrap input[type=file] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.file-input-wrap label.btn { margin: 0; }

.vac-list { display: flex; flex-direction: column; gap: 10px; }
.vac-item { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.vac-title a { color: var(--accent); font-weight: 600; text-decoration: none; }
.vac-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.vac-salary { margin-top: 4px; font-size: 13px; }
.tag { background: #232733; padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.vac-closed { opacity: 0.55; }
.badge-closed { background: #3a1d1d; color: #e29a9a; padding: 1px 8px; border-radius: 999px; font-size: 11px; margin-left: 8px; vertical-align: middle; }
.badge-new { background: #1d3a26; color: #7ee2a0; padding: 1px 8px; border-radius: 999px; font-size: 11px; margin-left: 8px; vertical-align: middle; font-weight: 700; letter-spacing: .03em; }
.update-banner { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; font-size: 14px; }
.vac-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.btn-small { padding: 4px 10px; font-size: 12px; }

.ats-score-block { display: flex; align-items: center; gap: 18px; margin: 16px 0 24px; }
.ats-score-circle {
  width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; border: 3px solid var(--border); flex-shrink: 0;
}
.score-good { border-color: #2e7d4f; color: #7ee2a0; }
.score-mid { border-color: #8a6d1f; color: #e2c47e; }
.score-low { border-color: #7d2e2e; color: #e29a9a; }
.ats-score-label { font-size: 16px; font-weight: 600; margin-bottom: 4px; }

.ats-checks { display: flex; flex-direction: column; gap: 10px; }
.ats-check-item { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.ats-check-title { font-weight: 600; margin-bottom: 4px; }
.ats-check-detail { color: var(--muted); font-size: 13px; }
.ats-ok .ats-check-title { color: #7ee2a0; }
.ats-warning .ats-check-title { color: #e2c47e; }
