/* Local administration: occupations, level availability, and registration channels. */
.admin-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 25px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line, #e8ebf1);
  border-radius: 10px;
  background: #fff;
  scrollbar-width: thin;
}
.admin-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  min-height: 42px;
  border-radius: 6px;
  color: #64738b;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.admin-nav a svg { width: 17px; height: 17px; }
.admin-nav a:hover { color: var(--blue, #3159d9); background: #f6f8fe; }
.admin-nav a.active { color: var(--blue, #3159d9); background: #edf2ff; font-weight: 600; }
.admin-nav a:focus-visible { outline: 3px solid #b3c5ff; outline-offset: 2px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 23px; margin-bottom: 28px; }
.settings-grid.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-section {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line, #e8ebf1);
  border-radius: 13px;
  box-shadow: var(--shadow, 0 5px 24px rgba(33,48,77,.035));
  color: #526178;
  font-size: 14px;
}
.settings-heading { padding: 25px 28px 0; }
.settings-heading h2, h2.settings-heading { margin: 0; color: #263955; font-size: 19px; font-weight: 650; line-height: 1.6; }
.settings-heading h3 { margin: 0; color: #263955; font-size: 17px; font-weight: 600; line-height: 1.65; }
.settings-heading > p { margin-bottom: 0; }
.settings-help { color: #68778d; font-size: 14px; line-height: 1.9; margin: 7px 0 0; }
.settings-help strong { color: #4d607f; font-weight: 600; }
.settings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 23px 28px;
  border-bottom: 1px solid var(--line, #e8ebf1);
}
.settings-toolbar .settings-heading { padding: 0; }
.settings-toolbar .settings-help { margin-top: 4px; }
.settings-toolbar > .button { flex-shrink: 0; font-size: 14px; min-height: 41px; }
.settings-list { margin: 0; padding: 0; list-style: none; }
.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 25px;
  row-gap: 17px;
  padding: 24px 28px;
  border-bottom: 1px solid #edf0f5;
}
.settings-row:last-child { border-bottom: 0; }
.settings-main { min-width: 0; }
.settings-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  color: #344967;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.settings-name > svg { width: 19px; height: 19px; color: #7890c1; }
.settings-name .config-status { font-weight: 500; }
.settings-meta { margin: 5px 0 0; color: #6c7a8f; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.settings-meta > span + span { margin-left: 13px; }
.settings-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 14px; padding-top: 2px; }
.settings-actions .button { min-height: 37px; font-size: 14px; padding: 8px 14px; }
.settings-actions .inline-link { font-size: 14px; }
.level-switches { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.settings-row > .level-switches { grid-column: 1 / -1; }
.level-switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 43px;
  padding: 9px 14px;
  border: 1px solid #e2e7ef;
  border-radius: 7px;
  background: #fafbfd;
  color: #758196;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.level-switch.enabled, .level-switch:has(input:checked) { background: #f4f7ff; border-color: #cad7fa; color: #365ba5; }
.level-switch:hover { border-color: #aabfea; }
.level-switch input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--blue, #3159d9); cursor: pointer; }
.level-switch input[type="checkbox"]:focus-visible { outline: 3px solid #b3c5ff; outline-offset: 3px; }
.level-switch > span { display: inline-block; }
.level-switch > small, .level-switch .settings-meta { margin: 0; color: #7b879a; font-size: 12px; font-weight: 400; }
.level-switch:has(input:disabled) { cursor: not-allowed; background: #f5f6f8; color: #8b94a3; border-color: #e7eaf0; }
.level-switch input:disabled { cursor: not-allowed; }
.switch-label { display: inline-flex; align-items: center; gap: 9px; min-height: 35px; color: #69788d; font-size: 14px; line-height: 1.65; cursor: pointer; user-select: none; }
.switch-label > span { display: inline-block; }
.switch-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 21px;
  flex: 0 0 36px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #cbd3df;
  border-radius: 20px;
  background: #d7dee8;
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
}
.switch-label input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(29,47,74,.16);
  transition: transform .15s;
}
.switch-label input[type="checkbox"]:checked { background: var(--blue, #3159d9); border-color: var(--blue, #3159d9); }
.switch-label input[type="checkbox"]:checked::before { transform: translateX(15px); }
.switch-label input[type="checkbox"]:focus-visible { outline: 3px solid #b3c5ff; outline-offset: 3px; box-shadow: none; }
.switch-label input[type="checkbox"]:disabled { opacity: .55; cursor: not-allowed; }
.switch-label:has(input:disabled) { color: #8b94a3; cursor: not-allowed; }
.settings-empty { padding: 50px 28px; text-align: center; color: #748197; font-size: 14px; line-height: 1.9; }
.settings-empty > svg { width: 33px; height: 33px; color: #a4b4d0; margin-bottom: 10px; }
.settings-empty h3 { color: #526786; font-size: 17px; font-weight: 600; margin: 0 0 7px; }
.settings-empty p { margin: 0 0 19px; }
.settings-form { display: block; min-width: 0; }
.settings-form .field-label { font-size: 14px; color: #526178; }
.settings-form .field-hint { color: #6c7a8f; font-size: 13px; line-height: 1.85; }
.settings-form input:not([type="checkbox"]):not([type="radio"]), .settings-form select, .settings-form textarea { font-size: 14px; }
.settings-form > .level-switches, .settings-form .field > .level-switches { margin-top: 9px; }
.settings-form .level-switches { gap: 10px; }
.settings-form .level-switch { flex: 1; min-width: 120px; }
.settings-form .switch-label { margin-top: 3px; }
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 13px;
  padding: 17px 28px;
  border-top: 1px solid var(--line, #e8ebf1);
  background: #fbfcfe;
  color: #6f7e93;
  font-size: 13px;
  line-height: 1.85;
}
.settings-footer p { margin: 0; }
.settings-footer svg { width: 15px; height: 15px; margin-right: 5px; }
.channel-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid #e3e9f3; border-radius: 5px; background: #f5f8fd; color: #5e749b; font-size: 12px; line-height: 1.6; white-space: nowrap; font-weight: 500; }
.channel-pill > svg { width: 13px; height: 13px; }
.config-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid #e5e9ef; border-radius: 5px; background: #f3f5f8; color: #778398; font-size: 12px; line-height: 1.6; white-space: nowrap; }
.config-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.config-status.enabled, .config-status.active { border-color: #daebe3; background: #eff8f3; color: #3c866d; }
.config-status.disabled, .config-status.closed { color: #7e899b; }
.closed-project { border-style: dashed !important; background: #f7f8fa !important; color: #7b879a !important; }
.closed-project .card-title { color: #6c788a; }
.closed-project .card-copy { color: #7b879a; }
.closed-project .occupation-icon { background: #edf0f5; color: #9aa6ba; }
.closed-project .card-tag { background: #eceff4; color: #778498; }
.channel-filter { display: inline-flex; align-items: center; gap: 9px; color: #65758d; font-size: 14px; min-width: 0; }
.channel-filter select { width: auto; min-width: 130px; min-height: 40px; padding: 8px 11px; font-size: 14px; color: #526782; background-color: #fff; }
.channel-filter > span, .channel-filter > label { white-space: nowrap; }
@media (max-width: 980px) {
  .settings-grid.two-column { grid-template-columns: minmax(0, 1fr); }
  .settings-toolbar, .settings-row { padding-left: 23px; padding-right: 23px; }
  .settings-heading { padding-left: 23px; padding-right: 23px; }
  .settings-actions { gap: 10px; }
}
@media (max-width: 760px) {
  .admin-nav { margin-bottom: 20px; gap: 3px; padding: 5px; width: 100%; border-radius: 8px; }
  .admin-nav a { padding: 10px 13px; font-size: 14px; min-height: 40px; flex: 1 0 auto; }
  .admin-nav a svg { width: 15px; height: 15px; }
  .settings-grid { gap: 17px; }
  .settings-section { border-radius: 10px; }
  .settings-heading { padding: 21px 19px 0; }
  .settings-heading h2, h2.settings-heading { font-size: 18px; }
  .settings-toolbar { padding: 19px; align-items: flex-start; }
  .settings-toolbar .settings-heading { flex-basis: 100%; }
  .settings-toolbar .button { min-height: 40px; }
  .settings-row { grid-template-columns: minmax(0,1fr); gap: 14px; padding: 21px 19px; }
  .settings-name { font-size: 16px; }
  .settings-meta { margin-top: 5px; font-size: 14px; }
  .settings-meta > span + span { margin-left: 8px; }
  .settings-actions { justify-content: flex-start; gap: 17px; padding: 0; }
  .settings-row > .level-switches { grid-column: auto; }
  .level-switches { gap: 8px; }
  .level-switch { padding: 9px 11px; min-height: 43px; gap: 8px; font-size: 14px; }
  .settings-form .level-switch { min-width: 110px; }
  .settings-help { font-size: 14px; }
  .settings-empty { padding: 38px 19px; }
  .settings-footer { padding: 15px 19px; align-items: flex-start; }
  .channel-filter { width: 100%; }
  .channel-filter select { flex: 1; width: 100%; }
}
@media (max-width: 390px) {
  .admin-nav a { padding: 10px 11px; font-size: 13px; }
  .admin-nav a svg { display: none; }
  .level-switches { gap: 7px; }
  .level-switch { padding-left: 9px; padding-right: 9px; }
  .settings-form .level-switch { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-nav a, .level-switch, .switch-label input[type="checkbox"], .switch-label input[type="checkbox"]::before { transition: none; }
}
