/* =============================================================================
   Стили для login.html и error.html (404/403/500)
   ============================================================================= */

   * { box-sizing: border-box; }

   .auth-body, .error-body {
     font-family: var(--font-family-base, 'Inter', sans-serif);
     margin: 0;
     min-height: 100vh;
     background: var(--color-bg, #F5F7FA);
     color: var(--color-text-primary, #111827);
   }
   
   /* =============================================================================
      LOGIN — split layout (left promo + right form)
      ============================================================================= */
   .auth-page {
     display: grid;
     grid-template-columns: 1fr 1fr;
     min-height: 100vh;
   }
   
   @media (max-width: 991px) {
     .auth-page { grid-template-columns: 1fr; }
   }
   
   /* ── Левая часть: промо ───────────────────────────────────────────────────── */
   .auth-page__left {
     position: relative;
     background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 60%, #1E40AF 100%);
     color: #fff;
     padding: 56px 64px;
     display: flex;
     flex-direction: column;
     justify-content: center;
     overflow: hidden;
   }
   
   @media (max-width: 991px) { .auth-page__left { display: none; } }
   
   .auth-page__decor {
     position: absolute;
     inset: 0;
     pointer-events: none;
     overflow: hidden;
   }
   
   .auth-page__circle {
     position: absolute;
     border-radius: 50%;
     background: rgba(255, 255, 255, 0.08);
   }
   .auth-page__circle--1 {
     width: 480px;
     height: 480px;
     top: -160px;
     right: -160px;
     background: rgba(255,255,255,0.06);
     animation: floatA 14s ease-in-out infinite;
   }
   .auth-page__circle--2 {
     width: 320px;
     height: 320px;
     bottom: -80px;
     left: -80px;
     background: rgba(255,255,255,0.05);
     animation: floatB 18s ease-in-out infinite;
   }
   .auth-page__circle--3 {
     width: 200px;
     height: 200px;
     top: 40%;
     left: 60%;
     background: rgba(255,255,255,0.04);
     animation: floatA 22s ease-in-out infinite;
   }
   
   @keyframes floatA {
     0%, 100% { transform: translate(0, 0); }
     50%      { transform: translate(20px, -30px); }
   }
   @keyframes floatB {
     0%, 100% { transform: translate(0, 0); }
     50%      { transform: translate(-30px, 20px); }
   }
   
   .auth-page__content {
     position: relative;
     z-index: 1;
     max-width: 520px;
     animation: fadeInUp 0.6s ease both;
   }
   
   .bpm-logo {
     display: inline-flex;
     align-items: center;
     line-height: 0;
     text-decoration: none;
   }
   .bpm-logo__img {
     display: block;
     height: 36px;
     width: auto;
     object-fit: contain;
   }

   .auth-page__logo {
     display: inline-flex;
     align-items: center;
     text-decoration: none;
     margin-bottom: 56px;
   }
   .auth-page__logo:hover { text-decoration: none; opacity: 0.92; }
   .auth-page__logo .bpm-logo__img {
     height: 42px;
     /* синий wordmark на синем фоне → белый */
     filter: brightness(0) invert(1);
   }
   
   .auth-page__heading {
     font-size: 44px;
     font-weight: 700;
     line-height: 1.15;
     margin: 0 0 20px;
     letter-spacing: -0.02em;
     color: #fff;
     text-shadow: 0 2px 24px rgba(15, 23, 42, 0.35);
   }
   
   .auth-page__lead {
     font-size: 16px;
     line-height: 1.6;
     margin: 0 0 36px;
     color: rgba(255, 255, 255, 0.94);
     text-shadow: 0 1px 12px rgba(15, 23, 42, 0.2);
   }
   
   .auth-page__features {
     list-style: none;
     padding: 0;
     margin: 0;
     display: flex;
     flex-direction: column;
     gap: 14px;
   }
   .auth-page__features li {
     display: flex;
     align-items: center;
     gap: 12px;
     font-size: 15px;
     font-weight: 500;
     color: #fff;
     text-shadow: 0 1px 8px rgba(15, 23, 42, 0.18);
   }
   .auth-page__features i {
     color: #bbf7d0;
     font-size: 18px;
     filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.2));
   }
   
   /* ── Правая часть: форма ──────────────────────────────────────────────────── */
   .auth-page__right {
     background: #fff;
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 40px 24px;
   }
   
   .auth-form {
     width: 100%;
     max-width: 420px;
     animation: fadeInUp 0.5s ease both;
     animation-delay: 0.1s;
   }
   
   .auth-form__logo {
     display: flex;
     align-items: center;
     text-decoration: none;
     margin-bottom: 24px;
   }
   .auth-form__logo:hover { text-decoration: none; opacity: 0.92; }
   .auth-form__logo .bpm-logo__img {
     height: 32px;
   }
   
   .auth-form__title {
     font-size: 28px;
     font-weight: 700;
     margin: 0 0 8px;
     color: var(--color-text-primary, #111827);
     letter-spacing: -0.01em;
   }
   
   .auth-form__subtitle {
     font-size: 14px;
     color: var(--color-text-secondary, #6B7280);
     margin: 0 0 32px;
     line-height: 1.5;
   }
   
   .auth-form__form {
     display: flex;
     flex-direction: column;
     gap: 16px;
   }
   
   .auth-form__field { display: flex; flex-direction: column; gap: 6px; }
   
   .auth-form__label {
     font-size: 13px;
     font-weight: 500;
     color: var(--color-text-secondary, #6B7280);
   }
   
   .auth-form__input-wrap {
     position: relative;
     display: flex;
     align-items: center;
   }
   
   .auth-form__input-icon {
     position: absolute;
     left: 14px;
     font-size: 16px;
     color: var(--color-text-muted, #9CA3AF);
     pointer-events: none;
     z-index: 2;
   }
   
   .auth-form__input,
   .auth-form__input-wrap input {
     width: 100%;
     height: 44px;
     padding: 0 14px 0 42px;
     font-family: inherit;
     font-size: 14px;
     color: var(--color-text-primary, #111827);
     background: #fff;
     border: 1px solid var(--color-border, #E5E7EB);
     border-radius: 8px;
     outline: none;
     transition: border-color 0.15s, box-shadow 0.15s;
   }
   .auth-form__input::placeholder,
   .auth-form__input-wrap input::placeholder { color: var(--color-text-muted, #9CA3AF); }
   
   .auth-form__input:focus,
   .auth-form__input-wrap input:focus {
     border-color: var(--color-primary, #2563EB);
     box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
   }
   
   .auth-form__field.is-invalid .auth-form__input,
   .auth-form__field.is-invalid input {
     border-color: var(--color-danger, #DC2626);
   }
   .auth-form__field.is-invalid .auth-form__input:focus,
   .auth-form__field.is-invalid input:focus {
     box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
   }
   
   .auth-form__toggle-pwd {
     position: absolute;
     right: 8px;
     top: 50%;
     transform: translateY(-50%);
     width: 32px;
     height: 32px;
     display: flex;
     align-items: center;
     justify-content: center;
     background: transparent;
     border: none;
     color: var(--color-text-muted, #9CA3AF);
     cursor: pointer;
     border-radius: 6px;
     z-index: 2;
   }
   .auth-form__toggle-pwd:hover { color: var(--color-text-primary, #111827); background: var(--color-neutral-100, #F3F4F6); }
   
   .auth-form__error {
     font-size: 12px;
     color: var(--color-danger, #DC2626);
   }
   
   .auth-form__submit {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     gap: 8px;
     width: 100%;
     height: 46px;
     margin-top: 8px;
     font-family: inherit;
     font-size: 15px;
     font-weight: 600;
     color: #fff;
     background: var(--color-primary, #2563EB);
     border: none;
     border-radius: 8px;
     cursor: pointer;
     transition: background-color 0.15s, transform 0.05s;
     text-decoration: none;
   }
   .auth-form__submit:hover { background: var(--color-primary-hover, #1D4ED8); color: #fff; text-decoration: none; }
   .auth-form__submit:active { transform: translateY(1px); }
   .auth-form__submit i { font-size: 16px; }
   
   .auth-form__divider {
     display: flex;
     align-items: center;
     gap: 12px;
     margin: 28px 0 20px;
     color: var(--color-text-muted, #9CA3AF);
     font-size: 12px;
     text-transform: uppercase;
     letter-spacing: 0.05em;
   }
   .auth-form__divider::before,
   .auth-form__divider::after {
     content: '';
     flex: 1;
     height: 1px;
     background: var(--color-border, #E5E7EB);
   }
   
   .auth-form__guest-form { margin: 0; }
   
   .auth-form__guest-btn {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     gap: 8px;
     width: 100%;
     height: 44px;
     font-family: inherit;
     font-size: 14px;
     font-weight: 500;
     color: var(--color-text-primary, #111827);
     background: #fff;
     border: 1px solid var(--color-border, #E5E7EB);
     border-radius: 8px;
     cursor: pointer;
     transition: background-color 0.15s, border-color 0.15s;
     text-decoration: none;
   }
   .auth-form__guest-btn:hover {
     background: var(--color-neutral-50, #F9FAFB);
     border-color: var(--color-neutral-300, #D1D5DB);
     color: var(--color-text-primary, #111827);
     text-decoration: none;
   }
   
   .auth-form__footer {
     margin-top: 40px;
     text-align: center;
     font-size: 12px;
     color: var(--color-text-muted, #9CA3AF);
   }
   
   @keyframes fadeInUp {
     from { opacity: 0; transform: translateY(12px); }
     to   { opacity: 1; transform: translateY(0); }
   }
   
   /* =============================================================================
      ERROR PAGE — 404 / 403 / 500
      ============================================================================= */
   .error-body {
     display: flex;
     flex-direction: column;
     min-height: 100vh;
     background:
       radial-gradient(ellipse at top right, rgba(37,99,235,0.08), transparent 50%),
       radial-gradient(ellipse at bottom left, rgba(37,99,235,0.06), transparent 50%),
       #F5F7FA;
   }
   
   .error-page__header {
     padding: 24px 32px;
   }
   
   .error-page__logo {
     display: inline-flex;
     align-items: center;
     text-decoration: none;
   }
   .error-page__logo:hover { text-decoration: none; opacity: 0.92; }
   .error-page__logo .bpm-logo__img {
     height: 32px;
   }
   
   .error-page {
     flex: 1;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     padding: 32px 24px;
     text-align: center;
     animation: fadeInUp 0.5s ease both;
   }
   
   /* Иллюстрация — большие цифры с SVG-нулём */
   .error-page__illustration {
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 8px;
     margin-bottom: 32px;
     color: var(--color-primary, #2563EB);
   }
   
   .error-page__digit {
     font-size: clamp(80px, 14vw, 160px);
     font-weight: 800;
     line-height: 1;
     letter-spacing: -0.04em;
     color: var(--color-primary, #2563EB);
     display: flex;
     align-items: center;
     justify-content: center;
   }
   
   .error-page__digit--zero,
   .error-page__digit--icon {
     width: clamp(80px, 14vw, 160px);
     height: clamp(80px, 14vw, 160px);
   }
   .error-page__digit--zero svg,
   .error-page__digit--icon svg {
     width: 100%;
     height: 100%;
   }
   
   .error-page__digit--float-1 { animation: floatDigit 3s ease-in-out infinite; }
   .error-page__digit--float-2 { animation: floatDigit 3s ease-in-out -1.5s infinite; }
   .error-page__digit--zero    { animation: rotateZero 8s linear infinite; }
   
   @keyframes floatDigit {
     0%, 100% { transform: translateY(0); }
     50%      { transform: translateY(-12px); }
   }
   @keyframes rotateZero {
     from { transform: rotate(0deg); }
     to   { transform: rotate(360deg); }
   }
   
   /* Цвета по типу ошибки */
   .error-page__illustration--403 { color: var(--color-warning, #F59E0B); }
   .error-page__illustration--403 .error-page__digit { color: var(--color-warning, #F59E0B); }
   
   .error-page__illustration--500 { color: var(--color-danger, #DC2626); }
   .error-page__illustration--500 .error-page__digit { color: var(--color-danger, #DC2626); }
   
   .error-page__title {
     font-size: clamp(24px, 3vw, 32px);
     font-weight: 700;
     color: var(--color-text-primary, #111827);
     margin: 0 0 12px;
     letter-spacing: -0.01em;
   }
   
   .error-page__text {
     font-size: 15px;
     color: var(--color-text-secondary, #6B7280);
     max-width: 520px;
     margin: 0 0 32px;
     line-height: 1.6;
   }
   
   .error-page__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .error-page__btn {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    width: auto;
    min-width: 200px;
    height: 48px;
    padding: 0 24px;
    margin: 0;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    text-decoration: none;
    cursor: pointer;
  }
   
   .error-page__footer {
     padding: 24px;
     text-align: center;
     font-size: 12px;
     color: var(--color-text-muted, #9CA3AF);
   }
   
   @media (max-width: 575px) {
     .auth-page__right { padding: 32px 20px; }
     .auth-form__title { font-size: 24px; }
     .auth-page__heading { font-size: 32px; }
     .auth-page__left { padding: 40px 32px; }
   }