/* Страница входа админки Phoenix — только при body.phx-login */

html.phx-login,
body.phx-login {
    height: 100%;
}

body.phx-login {
    margin: 0;
    background: #0f1419;
    overflow-x: hidden;
}

body.phx-login #wrapper.phx-login-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.phx-login #page-wrapper.phx-login-page {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.phx-auth {
    flex: 1;
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.phx-auth__brand {
    flex: 1.1;
    position: relative;
    padding: clamp(32px, 6vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #e8ecf1;
    overflow: hidden;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(91, 155, 212, 0.45), transparent 55%),
        radial-gradient(900px 500px at 90% 110%, rgba(20, 20, 54, 0.9), transparent 50%),
        linear-gradient(145deg, #1a2f4a 0%, #141436 48%, #0d1117 100%);
}

@media (prefers-reduced-motion: no-preference) {
    .phx-auth__brand::before {
        content: "";
        position: absolute;
        inset: -40%;
        background: radial-gradient(circle at 30% 40%, rgba(91, 155, 212, 0.15), transparent 45%),
            radial-gradient(circle at 70% 60%, rgba(115, 103, 240, 0.12), transparent 40%);
        animation: phx-login-drift 18s ease-in-out infinite alternate;
        pointer-events: none;
    }
}

@keyframes phx-login-drift {
    from {
        transform: translate3d(-2%, -1%, 0) rotate(0deg);
    }
    to {
        transform: translate3d(2%, 2%, 0) rotate(4deg);
    }
}

.phx-auth__brand-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.phx-auth__logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
}

.phx-brand-favicon--auth {
    width: clamp(36px, 8vw, 48px);
    height: clamp(36px, 8vw, 48px);
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.28));
}

.phx-auth__logo {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
    line-height: 1.15;
}

.phx-auth__logo span {
    color: #7ec8ff;
}

.phx-auth__lead {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    opacity: 0.88;
}

.phx-auth__meta {
    position: relative;
    z-index: 1;
    font-size: 12px;
    opacity: 0.55;
    line-height: 1.5;
}

.phx-auth__panel {
    flex: 0.95;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px);
    background: linear-gradient(180deg, #f4f6f9 0%, #eef1f6 100%);
}

.phx-auth__card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 20, 25, 0.12), 0 2px 8px rgba(15, 20, 25, 0.06);
    padding: clamp(28px, 4vw, 40px);
    border: 1px solid rgba(15, 20, 25, 0.06);
}

.phx-auth__title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #2c3044;
}

.phx-auth__subtitle {
    margin: 0 0 24px;
    font-size: 14px;
    color: #6b6f82;
    line-height: 1.45;
}

.phx-auth__hint {
    margin-bottom: 18px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
}

.phx-field {
    margin-bottom: 16px;
}

.phx-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b6f82;
    margin-bottom: 6px;
}

.phx-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid #d8dce6;
    border-radius: 10px;
    background: #fafbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.phx-input-grow {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.phx-input-wrap:focus-within {
    border-color: #5b9bd4;
    box-shadow: 0 0 0 3px rgba(91, 155, 212, 0.2);
    background: #fff;
}

.phx-input-wrap .phx-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 46px;
    color: #8b90a1;
    background: rgba(91, 155, 212, 0.06);
    border-right: 1px solid #e8ebf2;
    flex-shrink: 0;
    align-self: stretch;
}

.phx-input-wrap input.form-control {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    height: 46px;
    font-size: 15px;
    border-radius: 0 !important;
    width: 100%;
}

#f_login label.error {
    margin: 4px 2px 0;
    font-size: 12px;
    font-weight: 600;
    color: #c9302c;
}

#f_login input.form-control.error {
    color: #a94442;
}

.phx-toggle-pass {
    border: none;
    border-left: 1px solid #e8ebf2;
    background: rgba(91, 155, 212, 0.06);
    width: 44px;
    height: 46px;
    align-self: flex-start;
    color: #6b6f82;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.phx-toggle-pass:hover,
.phx-toggle-pass:focus-visible {
    background: rgba(91, 155, 212, 0.14);
    color: #2c3044;
    outline: none;
}

.phx-btn-login {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border: none !important;
    background: linear-gradient(135deg, #5b9bd4 0%, #3d7ab8 100%) !important;
    box-shadow: 0 8px 20px rgba(91, 155, 212, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.phx-btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(91, 155, 212, 0.42);
}

.phx-auth__footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eceff4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.phx-auth__footer a {
    color: #5b9bd4;
    text-decoration: none;
    font-weight: 500;
}

.phx-auth__footer a:hover {
    text-decoration: underline;
}

.phx-auth__secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8b90a1;
    font-size: 12px;
}

@media (max-width: 900px) {
    .phx-auth {
        flex-direction: column;
    }

    .phx-auth__brand {
        flex: none;
        min-height: auto;
        padding-bottom: 28px;
    }

    .phx-auth__panel {
        flex: 1;
        margin-top: -24px;
        border-radius: 24px 24px 0 0;
        background: #f4f6f9;
    }

    .phx-auth__card {
        box-shadow: 0 12px 36px rgba(15, 20, 25, 0.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .phx-auth__brand::before {
        animation: none !important;
    }

    .phx-btn-login:hover {
        transform: none;
    }
}
