/**
 * Страница входа — современная форма, брендинг IBS GL (как шапка заявок / сайдбар)
 */

html.nbs-auth-html {
  margin: 0;
  height: 100%;
  background: #e8eef6;
  background: linear-gradient(165deg, #e8eef6 0%, #eef2f7 40%, #f8fafc 100%);
}

body.nbs-auth-body {
  margin: 0;
  min-height: 100%;
  height: auto;
  font-family: "Rubik", "Montserrat", system-ui, -apple-system, sans-serif;
  background: #e8eef6;
  background: linear-gradient(165deg, #e8eef6 0%, #eef2f7 40%, #f8fafc 100%);
  background-attachment: fixed;
  color: #0f172a;
}

body.nbs-auth-body .wrapper {
  min-height: 100vh !important;
  height: auto !important;
  overflow: visible !important;
  background: transparent !important;
}

body.nbs-auth-body .main-panel,
body.nbs-auth-body .main-content,
body.nbs-auth-body .content-wrapper {
  min-height: 100vh !important;
  height: auto !important;
}

/* Apex: без сайдбара на /auth всё равно могут действовать отступы/фон .main-panel — дают «полоски» по краям */
body.nbs-auth-body .main-panel {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body.nbs-auth-body .main-panel .main-content {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

@media (min-width: 992px) {
  body.nbs-auth-body .main-panel .main-content,
  body.nbs-auth-body .sidebar-sm .main-panel .main-content,
  body.nbs-auth-body .sidebar-lg .main-panel .main-content {
    padding-left: 0 !important;
  }
}

body.nbs-auth-body .main-panel .main-content .content-wrapper {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* app.css: #login { background-image: url(../img/gallery/light-bg.jpg); } — не нужен на новой форме входа */
body.nbs-auth-body #login,
body.nbs-auth-body #login.nbs-auth-shell {
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-size: auto !important;
  background-color: transparent !important;
}

@media (max-width: 576px) {
  body.nbs-auth-body .main-panel .main-content .content-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Pace: без темы индикатор часто зелёный; скрываем полностью (в т.ч. полоса снизу) */
html.nbs-auth-html .pace,
body.nbs-auth-body .pace,
body.nbs-auth-body > .pace {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.nbs-auth-body .pace .pace-progress,
body.nbs-auth-body .pace .pace-progress-inner,
body.nbs-auth-body .pace .pace-activity {
  display: none !important;
}

.nbs-auth-page {
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.nbs-auth-shell {
  width: 100%;
  max-width: 920px;
}

.nbs-auth-card {
  display: grid;
  grid-template-columns: 1fr;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 24px 48px -12px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

@media (min-width: 992px) {
  .nbs-auth-card {
    grid-template-columns: minmax(300px, 1.05fr) minmax(300px, 1fr);
    min-height: 440px;
  }
}

/* Левая колонка — бренд + градиент */
.nbs-auth-branding {
  position: relative;
  padding: 2rem 1.75rem 2.25rem;
  background: linear-gradient(125deg, #0f172a 0%, #1e3a5f 42%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .nbs-auth-branding {
    padding: 2.5rem 2.25rem 2.5rem;
  }
}

.nbs-auth-branding::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 20% 0%, rgba(255, 255, 255, 0.12), transparent 55%);
  pointer-events: none;
}

.nbs-auth-brand-top {
  position: relative;
  z-index: 1;
  background: transparent;
}

.nbs-auth-brand-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem 1.5rem;
  flex-wrap: wrap;
  background: transparent;
}

.nbs-auth-brand-text {
  flex: 1 1 200px;
  min-width: 0;
  background: transparent;
}

/* «Логотип» — текст: без подложки, белый на синем */
.nbs-auth-wordmark {
  margin: 0;
  font-size: clamp(1.85rem, 4.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #ffffff;
  background: transparent;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.nbs-auth-wordmark span {
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.nbs-auth-tagline {
  margin: 0.85rem 0 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.96);
  max-width: 36ch;
  background: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Если добавите PNG/SVG с прозрачностью */
.nbs-auth-brand-row .nbs-auth-logo-mark {
  display: block;
  max-height: 2.75rem;
  width: auto;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.25));
}

@media (min-width: 992px) {
  .nbs-auth-tagline {
    max-width: 42ch;
  }
}

.nbs-auth-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  background: transparent;
}

/* PNG/SVG с прозрачным фоном — без mix-blend */
.nbs-auth-figure img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  max-height: 200px;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
}

@media (max-width: 991.98px) {
  .nbs-auth-figure {
    max-height: 160px;
  }

  .nbs-auth-figure img {
    max-height: 160px;
  }
}

/* Правая колонка — форма */
.nbs-auth-form-panel {
  position: relative;
  padding: 2rem 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 992px) {
  .nbs-auth-form-panel {
    padding: 2.5rem 2.25rem;
  }
}

.nbs-auth-form-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.nbs-auth-form-hint {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.45;
}

.nbs-auth-field {
  margin-bottom: 1.1rem;
}

.nbs-auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.nbs-auth-input {
  width: 100%;
  border-radius: 11px !important;
  border: 1px solid #e2e8f0 !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  background: #f8fafc !important;
}

.nbs-auth-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  background: #fff !important;
  outline: none !important;
}

.nbs-auth-actions {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nbs-auth-submit {
  width: 100%;
  border: none !important;
  border-radius: 11px !important;
  padding: 0.72rem 1.25rem !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em;
  background: linear-gradient(125deg, #1e40af 0%, #2563eb 45%, #1d4ed8 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.nbs-auth-submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.nbs-auth-submit:active {
  transform: translateY(1px);
}

.nbs-auth-error {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.875rem;
  color: #dc2626;
  font-weight: 500;
}

.nbs-auth-footnote {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8rem;
  color: #94a3b8;
}
