/* ==========================================================================
   SSB OS — Модальное окно аутентификации (auth-modal.css)
   ========================================================================== */

.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 13, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 16px;
}

.auth-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  background: #181716;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f1efed;
  font-family: inherit;
}

.auth-overlay.is-active .auth-modal {
  transform: translateY(0) scale(1);
}

.auth-modal__header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.auth-modal__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.auth-modal__subtitle {
  font-size: 0.825rem;
  color: #9f9a93;
  margin: 0;
}

.auth-modal__close {
  background: transparent;
  border: none;
  color: #9f9a93;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  font-size: 1.25rem;
  line-height: 1;
}

.auth-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Переключатели табов (Сотрудникам / Демо и КП) */
.auth-tabs {
  display: flex;
  padding: 6px;
  background: #11100f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #9f9a93;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.auth-tab.is-active {
  background: #272523;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.auth-tab:hover:not(.is-active) {
  color: #e2dfdc;
}

/* Содержимое вкладок */
.auth-panel {
  display: none;
  padding: 24px;
}

.auth-panel.is-active {
  display: block;
}

/* Кнопка FaceID / WebAuthn — ненавязчивый зеленый акцент (Безопасный биометрический вход) */
.btn-passkey {
  width: 100%;
  background: linear-gradient(135deg, #13241d, #0f1c16);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

.btn-passkey:hover {
  background: linear-gradient(135deg, #182f25, #12241d);
  border-color: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(52, 211, 153, 0.25);
}

/* Разделитель */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #716d67;
  font-size: 0.75rem;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider:not(:empty)::before {
  margin-right: 12px;
}

.auth-divider:not(:empty)::after {
  margin-left: 12px;
}

/* Формы ввода */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #bcbaaf;
}

.auth-input {
  width: 100%;
  background: #0e0d0c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: #f2a93b;
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.15);
}

.auth-forgot {
  font-size: 0.78rem;
  color: #f2a93b;
  text-decoration: none;
  align-self: flex-end;
  margin-top: -8px;
}

.auth-forgot:hover {
  text-decoration: underline;
}

.btn-auth-submit {
  width: 100%;
  background: #f2a93b;
  color: #0e0d0c;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}

.btn-auth-submit:hover {
  background: #f5b758;
}

.btn-auth-submit:active {
  transform: scale(0.98);
}

/* Кнопка Telegram / Соцсети */
.btn-telegram {
  width: 100%;
  background: #1c2a38;
  border: 1px solid rgba(38, 165, 228, 0.3);
  color: #26a5e4;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-telegram:hover {
  background: #233446;
  border-color: #26a5e4;
}

/* Подвал модалки (Инфо блок) */
.auth-modal__footer {
  padding: 16px 24px;
  background: #11100f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: #8c8882;
  line-height: 1.4;
  text-align: center;
}

.auth-modal__footer strong {
  color: #cfcbc5;
}

.auth-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}
