/* RTL access gate — modal «Нарушены допуски по мануалу =)» */
.rtl-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 28, 51, 0.45);
  backdrop-filter: blur(6px);
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.rtl-auth-overlay[hidden] { display: none !important; }
.rtl-auth-box {
  width: fit-content;
  max-width: min(540px, calc(100vw - 40px));
  min-width: min(300px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 28px 28px 22px;
  box-shadow: 0 24px 60px rgba(11, 28, 51, 0.18);
  text-align: center;
}
.rtl-auth-box h2 {
  margin: 0 0 10px;
  font-size: clamp(14px, 2.6vw, 20px);
  font-weight: 800;
  color: #0b1c33;
  letter-spacing: -0.03em;
  line-height: 1.2;
  white-space: nowrap;
}
.rtl-auth-box p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.45;
  color: #5b6b7c;
}
.rtl-auth-box button {
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: #0b1c33;
  color: #fff;
}
.rtl-auth-box button.secondary {
  background: #eef2f7;
  color: #0b1c33;
  margin-right: 8px;
}
.rtl-auth-login .rtl-auth-box { text-align: left; }
.rtl-auth-login label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b6b7c;
  margin: 0 0 6px;
}
.rtl-auth-login input {
  width: 100%;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  margin: 0 0 12px;
  box-sizing: border-box;
}
.rtl-auth-login .err {
  display: none;
  margin-top: 10px;
  color: #e30613;
  font-size: 13px;
  font-weight: 700;
}
.rtl-auth-login .err.show { display: block; }

/* Main — как было: fixed в углу экрана, layout не трогаем */
.rtl-auth-userbar:not(.rtl-auth-userbar--service) {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 2147483000;
}

/* Авто-отчёты и др.: угол синей шапки */
header.head .rtl-auth-slot {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 6;
  pointer-events: none;
}
.rtl-auth-slot .rtl-auth-userbar {
  pointer-events: auto;
}

/* Main (hub) — полная плашка */
.rtl-auth-userbar {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, 72vw);
  margin: 0;
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: #0b1c33;
  pointer-events: auto;
}
.rtl-auth-userbar .rtl-auth-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.rtl-auth-userbar button {
  flex: 0 0 auto;
  border: 0;
  background: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  color: #0b1c33;
  box-shadow: 0 2px 10px rgba(11, 28, 51, 0.12);
}
.rtl-auth-userbar button:hover {
  background: #f4f7fb;
}

/* Сервисы — компактно в углу шапки отчёта */
.rtl-auth-userbar--service {
  gap: 6px;
  max-width: min(168px, 40vw);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.1;
}
.rtl-auth-userbar--service button {
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  box-shadow: none;
}
