/* =========================================================
   REGISTER.CSS — PREMIUM REGISTER (compact edition)
   Максимально компактная версия. Всё влезает на экран.
   ========================================================= */

/* =========================================================
   1. КОРНЕВОЙ ФИКС ПРОКРУТКИ И ЦЕНТРИРОВАНИЯ
   ========================================================= */

html:has(.premium-register),
body.premium-register {
    min-height: 100%;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.premium-register.premium-login {
    position: relative;
    min-height: 100svh;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 0 !important;
}

body.premium-register .auth-wrapper {
    position: relative !important;
    z-index: 2;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 100svh !important;
    height: auto !important;
    width: 100% !important;
    padding: 20px 16px 24px !important;
    box-sizing: border-box;
}

body.premium-register .auth-container {
    width: 100% !important;
    max-width: 420px !important;   /* ← было 460, стало 420 */
    height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
}

body.premium-register .auth-card {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none;
    padding: 20px 24px 16px !important;   /* ← было 30/32/22 */
    border-radius: 20px !important;
}

body.premium-register .login-scene {
    position: fixed !important;
    inset: 0 !important;
    z-index: 0;
}

/* =========================================================
   2. БРЕНД СВЕРХУ — МИНИМАЛЬНЫЙ
   ========================================================= */

body.premium-register .login-brand {
    margin-bottom: 8px;
    gap: 9px;
}

body.premium-register .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

body.premium-register .brand-mark img {
    width: 28px;
    height: 28px;
}

body.premium-register .brand-kicker {
    font-size: 8px;
    letter-spacing: 1.6px;
}

body.premium-register .brand-name {
    font-size: 10px;
}

/* =========================================================
   3. ЗАГОЛОВОК КАРТОЧКИ — КОМПАКТНЫЙ
   ========================================================= */

body.premium-register .auth-header {
    margin-bottom: 12px;
}

body.premium-register .welcome-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    border-radius: 11px;
}

body.premium-register .welcome-icon .feather-icon {
    width: 17px;
    height: 17px;
}

body.premium-register .icon-pulse {
    inset: -3px;
    border-radius: 14px;
}

body.premium-register .auth-eyebrow {
    margin-bottom: 3px;
    font-size: 8.5px;
    letter-spacing: 1.8px;
}

body.premium-register .auth-title {
    font-size: 20px;
    margin-bottom: 3px;
    letter-spacing: -.4px;
}

body.premium-register .auth-description {
    font-size: 10.5px;
    line-height: 1.45;
}

/* =========================================================
   4. ПОЛЯ ВВОДА — УМЕНЬШЕННАЯ ВЫСОТА
   ========================================================= */

body.premium-register .floating-field {
    margin-bottom: 9px;   /* ← было 13 */
}

body.premium-register .floating-field label {
    margin: 0 0 4px 2px;
    font-size: 9.5px;
    letter-spacing: .3px;
    gap: 6px;
}

body.premium-register .field-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

body.premium-register .field-icon .feather-icon {
    width: 11px;
    height: 11px;
}

body.premium-register .input-shell input {
    height: 40px;             /* ← было 48-52 */
    padding: 0 13px;
    border-radius: 11px;
    font-size: 12px;
}

body.premium-register .password-shell input {
    padding-right: 44px;
}

body.premium-register .password-toggle {
    right: 4px;
    width: 32px;
    height: 32px;
}

body.premium-register .password-toggle .feather-icon {
    width: 15px;
    height: 15px;
}

/* =========================================================
   5. СТРОКА ИМЯ / ФАМИЛИЯ
   ========================================================= */

body.premium-register .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 9px;
}

body.premium-register .form-row .floating-field {
    margin-bottom: 0;
}

/* =========================================================
   6. ПОДСКАЗКИ — МЕЛКИЕ, НЕ ЗАНИМАЮТ МНОГО МЕСТА
   ========================================================= */

body.premium-register .field-help {
    margin-top: 3px;
    padding-left: 2px;
    color: #8a8e95;
    font-size: 9px;
    line-height: 1.35;
    letter-spacing: .05px;
    transition: color .25s ease;
}

body.premium-register .field-help.is-ok  { color: #2e9e5b; }
body.premium-register .field-help.is-bad { color: #c23a4a; }

/* =========================================================
   7. ИНДИКАТОР НАДЁЖНОСТИ ПАРОЛЯ
   ========================================================= */

body.premium-register .password-meter {
    display: flex;
    gap: 4px;
    margin-top: 5px;
    padding: 0 2px;
    height: 3px;
}

body.premium-register .password-meter .meter-bar {
    flex: 1;
    height: 100%;
    border-radius: 999px;
    background: rgba(36, 39, 43, .08);
    position: relative;
    overflow: hidden;
    transition: background .3s ease, box-shadow .3s ease;
}

body.premium-register .password-meter .meter-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff5c5c, #ffb15c, #35b96f);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.2,1);
}

body.premium-register .password-meter[data-score="1"] .meter-bar:nth-child(-n+1)::after,
body.premium-register .password-meter[data-score="2"] .meter-bar:nth-child(-n+2)::after,
body.premium-register .password-meter[data-score="3"] .meter-bar:nth-child(-n+3)::after,
body.premium-register .password-meter[data-score="4"] .meter-bar:nth-child(-n+4)::after {
    opacity: 1;
    transform: scaleX(1);
}

body.premium-register .password-meter[data-score="1"] .meter-bar:nth-child(-n+1)::after {
    background: linear-gradient(90deg, #ff5c5c, #ff8a8a);
}
body.premium-register .password-meter[data-score="2"] .meter-bar:nth-child(-n+2)::after {
    background: linear-gradient(90deg, #ff9b31, #ffb15c);
}
body.premium-register .password-meter[data-score="3"] .meter-bar:nth-child(-n+3)::after {
    background: linear-gradient(90deg, #ef7d00, #ffb15c);
}
body.premium-register .password-meter[data-score="4"] .meter-bar:nth-child(-n+4)::after {
    background: linear-gradient(90deg, #2e9e5b, #6bd99a);
}

body.premium-register .password-meter[data-score="4"] .meter-bar {
    box-shadow: 0 0 6px rgba(53, 185, 111, .35);
}

/* =========================================================
   8. ИНДИКАТОР СОВПАДЕНИЯ ПАРОЛЕЙ
   ========================================================= */

body.premium-register .match-indicator {
    position: absolute;
    top: 50%;
    right: 42px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    transform: translateY(-50%) scale(.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease,
                transform .35s cubic-bezier(.2,.8,.2,1),
                background .3s ease;
}

body.premium-register .match-indicator .feather-icon {
    position: absolute;
    width: 11px;
    height: 11px;
    filter: none;
    transition: opacity .25s ease, transform .25s ease;
}

body.premium-register .match-indicator .icon-check { opacity: 0; transform: scale(.6); }
body.premium-register .match-indicator .icon-x     { opacity: 1; transform: scale(1); }

body.premium-register .input-shell.match-ok .match-indicator {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    background: rgba(53, 185, 111, .12);
    border: 1px solid rgba(53, 185, 111, .28);
}

body.premium-register .input-shell.match-ok .match-indicator .icon-check { opacity: 1; transform: scale(1); }
body.premium-register .input-shell.match-ok .match-indicator .icon-x     { opacity: 0; transform: scale(.6); }

body.premium-register .input-shell.match-bad .match-indicator {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    background: rgba(220, 53, 69, .10);
    border: 1px solid rgba(220, 53, 69, .25);
    animation: shakeX .35s ease;
}

body.premium-register .input-shell.match-ok  input {
    border-color: rgba(53, 185, 111, .45) !important;
    box-shadow: 0 0 0 3px rgba(53, 185, 111, .07) !important;
}

body.premium-register .input-shell.match-bad input {
    border-color: rgba(220, 53, 69, .45) !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .06) !important;
}

body.premium-register .match-help.is-ok  { color: #2e9e5b; }
body.premium-register .match-help.is-bad { color: #c23a4a; }

@keyframes shakeX {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    25%      { transform: translateY(-50%) translateX(-3px); }
    75%      { transform: translateY(-50%) translateX(3px); }
}

/* =========================================================
   9. КНОПКА
   ========================================================= */

body.premium-register .premium-button {
    height: 42px !important;    /* ← было 50 */
    margin-top: 2px !important;
    border-radius: 12px !important;
}

body.premium-register .button-content {
    font-size: 11.5px;
    gap: 7px;
}

body.premium-register .button-icon .feather-icon {
    width: 15px;
    height: 15px;
}

/* =========================================================
   10. ФУТЕРЫ — КОМПАКТНО
   ========================================================= */

body.premium-register .auth-footer {
    padding-top: 10px;
}

body.premium-register .footer-divider {
    margin-bottom: 8px;
    font-size: 8.5px;
}

body.premium-register .auth-footer p {
    font-size: 10.5px;
}

body.premium-register .security-note {
    margin-top: 8px;
    padding-top: 8px;
    font-size: 8.5px;
    gap: 5px;
}

body.premium-register .security-note .feather-icon {
    width: 11px;
    height: 11px;
}

body.premium-register .login-footer {
    margin-top: 10px;
    font-size: 8.5px;
    gap: 6px;
}

/* =========================================================
   11. АДАПТИВ
   ========================================================= */

/* Низкие экраны — ещё компактнее */
@media (max-height: 780px) {
    body.premium-register .auth-wrapper {
        padding: 14px 14px 18px !important;
    }

    body.premium-register .auth-card {
        padding: 16px 20px 12px !important;
    }

    body.premium-register .auth-header {
        margin-bottom: 10px;
    }

    body.premium-register .welcome-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 6px;
    }

    body.premium-register .welcome-icon .feather-icon {
        width: 15px;
        height: 15px;
    }

    body.premium-register .auth-title {
        font-size: 18px;
    }

    body.premium-register .auth-description {
        font-size: 10px;
    }

    body.premium-register .floating-field {
        margin-bottom: 7px;
    }

    body.premium-register .input-shell input {
        height: 37px;
    }

    body.premium-register .field-help {
        font-size: 8.5px;
        margin-top: 2px;
    }

    body.premium-register .password-meter {
        margin-top: 4px;
    }

    body.premium-register .premium-button {
        height: 40px !important;
    }

    body.premium-register .login-brand {
        margin-bottom: 6px;
    }
}

/* Мобильные */
@media (max-width: 576px) {
    body.premium-register .auth-wrapper {
        padding: 16px 12px 24px !important;
        justify-content: flex-start !important;
    }

    body.premium-register .auth-container {
        max-width: 100% !important;
    }

    body.premium-register .auth-card {
        padding: 18px 18px 14px !important;
        border-radius: 18px;
    }

    body.premium-register .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    body.premium-register .form-row .floating-field {
        margin-bottom: 9px;
    }

    body.premium-register .auth-title {
        font-size: 19px;
    }

    body.premium-register .match-indicator {
        right: 40px;
    }
}

/* =========================================================
   12. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    body.premium-register .input-shell.match-bad .match-indicator {
        animation: none;
    }
}