@font-face {
    font-family: "Gilroy";
    src: url("/local/templates/dachnik_2022/assets/webfonts/Gilroy/Gilroy-Regular.woff") format("woff");
}

body {
    margin: 0;
    padding: 0;
}


.non-display {
    display: none !important;
}


.page {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;

    width: 100%;
    min-height: 100vh;

    box-sizing: border-box;

    padding-top: 16px;
    padding-bottom: 16px;

    overflow: hidden;

    font-family: 'Gilroy', sans-serif;
    background: linear-gradient(135deg, #f2f6fa 0%, #e3edf7 100%);

    overflow-x: hidden;
}

.background {
    width: 100%;
    height: 100%;
    overflow: hidden;

    position: absolute;
    top: 0;
    left: 0;

    z-index: 0;
}

/* Размытые круги на фоне в цветах логотипа (зеленый и голубой) */
.background::before, .background::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    opacity: 0.35;
    overflow: hidden;
}
.background::before {
    width: 350px;
    height: 350px;
    background: #2BAEF0;
    top: -10%;
    left: -5%;
}
.background::after {
    width: 350px;
    height: 350px;
    background: #86C900;
    bottom: -10%;
    right: -5%;
}

.auth-form-card {
    position: relative;
    z-index: 1;
    background-color: white;
    padding: 32px 40px 40px 40px;
    margin-left: 8px;
    margin-right: 8px;
    border-radius: 28px;
    border: 1px solid rgba(233, 239, 245, 0.7);
    box-shadow: 0 20px 50px rgba(43, 174, 240, 0.05), 0 10px 20px rgba(0, 0, 0, 0.03);
    width: 100%;
    max-width: 425px;
    box-sizing: border-box;
    text-align: center;
}

/* Контейнер для логотипа */
.logo-container {
    width: 90px;
    height: 90px;
    background: #ffffff;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}
.logo-container:hover {
    transform: scale(1.1) rotate(8deg);
}
.logo-container img {
    width: 70px;
    height: 70px;
}

h1 { font-size: 26px; margin: 0 0 6px 0; font-weight: 700; color: #1a1a1a; }
.subtitle { color: #666; font-size: 14px; margin-bottom: 28px; margin-top: 0; }

.error-message {
    background-color: #fce4e4;
    border: 1px solid #f9caca;
    color: #cc0000;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    text-align: left;
}

.success-message {
    background-color: #d7f6ff;
    border: 1px solid #7ccfff;
    color: #0958a3;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    text-align: left;
}

/* КОНТЕЙНЕР ПОЛЯ */
.input-group {
    position: relative;
    background-color: #eff2f5;
    border-radius: 12px;
    margin-bottom: 16px;
    height: 60px;
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    text-align: left;
}

.input-group:has(input:not(:placeholder-shown)),
.input-group:has(input:-webkit-autofill) {
    background-color: #e8f5fe;
}

/* Фокус в фирменном цвете */
.input-group:focus-within {
    background-color: #fff !important;
    border-color: #2BAEF0;
    box-shadow: 0 0 0 4px rgba(43, 174, 240, 0.15);
}

.input-group input {
    width: 100%;
    height: 100%;
    background: transparent !important;
    border: none;
    outline: none;
    padding: 8px 40px 0px 14px;
    box-sizing: border-box;
    font-size: 16px;
    color: #000;
    position: relative;
    z-index: 2;
    appearance: none;
}

/* ЛЕЙБЛ */
.input-group label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a828a;
    font-size: 15px;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1;
}

/* ПОДНЯТИЕ ЛЕЙБЛА */
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group input:-webkit-autofill + label {
    top: 4px;
    font-size: 11px;
    color: #2BAEF0;
    transform: translateY(0);
    font-weight: 600;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    color: #7a828a;
}
.toggle-password:hover { color: #2BAEF0; }
.toggle-password svg { width: 20px; height: 20px; fill: currentColor; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #000 !important;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 0 1000px transparent !important;
}



.checkbox {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4a4a4a;
    margin: 24px 0;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    text-align: left;
}
.checkbox input { display: none; }
.checkbox .checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #dce4eb;
    background-color: #fff;
    border-radius: 6px;
    margin-right: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}
.checkbox input:checked + .checkmark {
    background-color: #2BAEF0;
    border-color: #2BAEF0;
}
.checkmark::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    display: none;
    height: 12px;
}
.checkbox input:checked + .checkmark::after { display: block; }
.checkbox:hover .checkmark { border-color: #2BAEF0; }

.login-btn {
    position: relative;
    width: 100%;
    background-color: #2BAEF0;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(43, 174, 240, 0.25);
}
.login-btn:hover {
    background-color: #1ba2e3;
    box-shadow: 0 6px 16px rgba(43, 174, 240, 0.35);
}
.login-btn:active {
    transform: scale(0.98);
}
.login-btn:disabled { opacity: 0.7; pointer-events: none; }

.spinner {
    display: none;
    position: absolute;
    width: 20px; height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-btn.loading .btn-text { opacity: 0; }
.login-btn.loading .spinner { display: block; }

.footer-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 10px;
    margin: 24px 0 20px 0;
}
.footer-links a { color: #2BAEF0; text-decoration: none; font-size: 14px; font-weight: 600; transition: color 0.2s; }
.footer-links a:hover { color: #1ba2e3; text-decoration: underline; }
.helper-text { color: #8a929a; font-size: 13px; line-height: 1.5; margin: 0; }


.back-to-site {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7a828a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    z-index: 10;
}

.back-to-site svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

/* Эффект при наведении */
.back-to-site:hover {
    color: #2BAEF0;
}

/* Небольшая анимация стрелочки влево при наведении */
.back-to-site:hover svg {
    transform: translateX(-3px);
}

/* Адаптив под мобилки (чтобы не наезжала на логотип, если карточка станет слишком узкой) */
@media (max-width: 400px) {
    .back-to-site span {
        display: none; /* Скрываем текст "На главную", оставляем только стрелку */
    }
    .back-to-site {
        top: 20px;
        left: 20px;
        padding: 8px;
        background: #eff2f5;
        border-radius: 50%;
    }
    .back-to-site:hover {
        background: #e8f5fe;
    }
}