/* LOGIN PAGE OVERRIDE — custom UI for Sputnik app login screen */
/* DO NOT REMOVE — needed for manual editing */
/* Фоновое изображение можно заменить на собственный, обновив URL ниже. */
html, body {
    height: 100%;
}

body.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: relative;
    background-color: #000;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/assets/login/login-bg.png') no-repeat center center fixed;
    background-size: cover;
    z-index: 0;
    pointer-events: none;
}

/* Градиент слева направо */
.login-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.8) 20%,   /* затемнение слева */
        rgba(0, 0, 0, 0.2) 100%   /* прозрачность справа */
    );
    pointer-events: none;  /* важно — чтобы не блокировало клики */
    z-index: 1;
}

.login-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.login-container {
    position: relative;
    z-index: 2;
    max-width: 500px;
    width: 100%;
    padding: 20px;;
}

.login-box {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 20px;
    padding: 28px 20px;;
}

.login-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.login-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background-color: var(--color-accent, #3b82f6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0b1020;
    font-weight: 800;
    font-size: 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.app-name {
    color: #e5e7eb;
    font-size: 18px;
    font-weight: 500;
}

.welcome-text {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 8px;
}

.login-title {
    color: #fff !important;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.subtitle {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 24px;
}

.login-form-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
}

.input-field {
    width: 100%;
    padding: 13px 44px 13px 16px;
    border-radius: 10px;
    border: 1px solid var(--wt-border-subtle);
    background-color: var(--wt-bg-elevated);
    color: var(--wt-text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast, 150ms ease), box-shadow var(--transition-fast, 150ms ease), background-color var(--transition-fast, 150ms ease);
}

.input-field::placeholder {
    color: var(--wt-text-muted);
}

.input-field:focus {
    border-color: var(--wt-primary);
    box-shadow: 0 0 0 1px rgba(123, 97, 255, 0.35);
    background-color: var(--wt-bg-elevated-2);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
}

.login-button {
    margin-top: 8px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    background-color: var(--color-accent, #3b82f6);
    color: #f9fafb;
    transition: background-color var(--transition-fast, 150ms ease), transform var(--transition-fast, 150ms ease);
}

.login-button:hover {
    background-color: var(--color-accent-hover, #2563eb);
    transform: translateY(-1px);
}

.footer-text {
    margin-top: 18px;
    color: #9ca3af;
    font-size: 13px;
}

.bottom-logo {
    position: absolute;
    right: 28px;
    bottom: 24px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.bottom-logo svg {
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.login-box .alert,
.login-box .flash-message {
    margin-bottom: 12px;
    border-radius: 10px;
    padding: 12px 14px;
    background-color: rgba(239, 68, 68, 0.12);
    color: #fecdd3;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.login-box .alert ul {
    margin: 0;
    padding-left: 18px;
}

/* ДЕСKTOP — форма слева */
@media (min-width: 992px) {
    .login-wrapper {
        display: flex;
        justify-content: flex-start; /* Форма прижимается к левому краю */
        align-items: flex-start; /* Форма прижимается к левому краю */
        height: 100vh;
        padding-left: 6vw; /* отступ слева — регулируемый */
        padding-top: 6vw; /* отступ слева — регулируемый */
    }
}

/* MOBILE — вернуть центрирование */
@media (max-width: 991px) {
    .login-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        height: auto;
        padding: 20px;
    }
}
