﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    transition: all 0.2s ease;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f8fafc;
}

.header {
    background: linear-gradient(90deg, #003087 0%, #00255e 100%);
}

/* --- горизонтальное меню (как в шаблоне) --- */
.nav-horizontal {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 96px;
    z-index: 45;
}

.nav-ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .nav-ul li {
        position: relative;
        font-size: 1.2rem;
    }

        .nav-ul li > a,
        .nav-ul li > span {
            display: inline-block;
            padding: 1rem 1.25rem;
            font-weight: 500;
            color: #1e293b;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: 0.2s;
        }

            .nav-ul li > a:hover,
            .nav-ul li > span:hover,
            .nav-ul li.active > a,
            .nav-ul li.active > span {
                color: #003087;
                border-bottom-color: #003087;
                background: #f8fafc;
            }

.dropdown-ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 260px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    border-radius: 1rem;
    padding: 0.5rem 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 50;
    border: 1px solid #eef2ff;
    list-style: none;
}

.nav-ul li:hover .dropdown-ul {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-ul li a,
.dropdown-ul li span {
    display: block;
    padding: 0.7rem 1.5rem;
    color: #334155;
    font-size: 1rem;
    white-space: nowrap;
}

    .dropdown-ul li a:hover,
    .dropdown-ul li span:hover {
        background: #f1f5f9;
        color: #003087;
    }

.submenu-parent-3 {
    position: relative;
}

.dropdown-3 {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    min-width: 260px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    border-radius: 1rem;
    padding: 0.5rem 0;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s;
    list-style: none;
}

.submenu-parent-3:hover .dropdown-3 {
    visibility: visible;
    opacity: 1;
}

/* --- мобильное меню --- */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: white;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
}

    .mobile-nav-panel.open {
        transform: translateX(0);
    }

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

    .mobile-overlay.open {
        display: block;
    }

.mobile-nav-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.mobile-submenu-wrapper {
    padding-left: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

    .mobile-submenu-wrapper a {
        display: block;
        padding: 0.6rem 0;
        color: #4b5563;
        font-size: 0.9rem;
        border-bottom: 1px dashed #e5e7eb;
    }

@media (max-width:1023px) {
    .nav-horizontal .nav-ul {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (min-width:1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* --- карточка-кнопка --- */
.auth-card {
    background: white;
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px -12px rgba(0, 48, 135, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #eef2ff;
    cursor: pointer;
    text-align: center;
}

    .auth-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 30px 70px -12px rgba(0, 48, 135, 0.2);
    }

    .auth-card .icon-wrap {
        width: 80px;
        height: 80px;
        background: linear-gradient(135deg, #003087, #1a4a8a);
        border-radius: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1.5rem;
        font-size: 2.25rem;
        color: white;
        box-shadow: 0 12px 30px -8px rgba(0, 48, 135, 0.35);
    }

    .auth-card h3 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #0f172a;
    }

    .auth-card p {
        color: #64748b;
        font-size: 0.95rem;
        margin-top: 0.5rem;
    }

/* --- модалки --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

    .modal-overlay.open {
        display: flex;
    }

.modal-box {
    background: white;
    max-width: 480px;
    width: 100%;
    border-radius: 2.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 40px 80px -16px rgba(0, 0, 0, 0.4);
    animation: modalIn 0.3s ease;
    position: relative;
}

@keyframes modalIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 1.75rem;
    color: #94a3b8;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
}

    .modal-close:hover {
        color: #0f172a;
    }

.modal-box h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.modal-box .subhead {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

    .form-group label {
        display: block;
        font-weight: 600;
        font-size: 0.85rem;
        color: #1e293b;
        margin-bottom: 0.4rem;
    }

    .form-group input {
        width: 100%;
        border: 1px solid #e2e8f0;
        border-radius: 1.25rem;
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
        outline: none;
        transition: border-color 0.2s, box-shadow 0.2s;
        background: #fafbfc;
    }

        .form-group input:focus {
            border-color: #003087;
            box-shadow: 0 0 0 4px rgba(0, 48, 135, 0.12);
            background: white;
        }

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #003087, #1a4a8a);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 8px 24px -6px rgba(0, 48, 135, 0.3);
}

    .btn-primary:hover {
        opacity: 0.92;
        transform: scale(1.01);
    }

.btn-secondary {
    width: 100%;
    background: transparent;
    color: #003087;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    cursor: pointer;
    transition: background 0.2s;
}

    .btn-secondary:hover {
        background: #f1f5f9;
    }

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
}

    .form-footer a {
        color: #003087;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
    }

        .form-footer a:hover {
            text-decoration: underline;
        }

/* --- preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

    #preloader.hidden {
        opacity: 0;
        pointer-events: none;
    }

.preloader-content {
    text-align: center;
}

.preloader-logo {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

.preloader-spinner {
    font-size: 2.5rem;
    color: #003087;
    display: block;
    margin: 0 auto 15px;
}

.preloader-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #4b5563;
    letter-spacing: 1px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* --- адаптив --- */
@media (max-width:768px) {
    .modal-box {
        padding: 2rem 1.25rem;
        border-radius: 2rem;
        margin: 0.5rem;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }

        .auth-card .icon-wrap {
            width: 64px;
            height: 64px;
            font-size: 1.75rem;
        }
}




/* --- карточка формы --- */
.auth-form-card {
    background: white;
    border-radius: 2.5rem;
    padding: 1.5rem 1rem;
    box-shadow: 0 30px 60px -16px rgba(0, 48, 135, 0.12);
    border: 1px solid #eef2ff;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}

    .auth-form-card h2 {
        font-size: 2rem;
        font-weight: 700;
        color: #0f172a;
        text-align: center;
    }

    .auth-form-card .sub {
        text-align: center;
        color: #64748b;
        font-size: 0.95rem;
        margin-top: 0.25rem;
        margin-bottom: 1.75rem;
    }

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        font-weight: 600;
        font-size: 0.85rem;
        color: #1e293b;
        margin-bottom: 0.4rem;
    }

.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
    padding: 0 0.25rem;
}

    .phone-input-wrapper:focus-within {
        border-color: #003087;
        box-shadow: 0 0 0 4px rgba(0, 48, 135, 0.10);
        background: white;
    }

.phone-prefix {
    padding: 0.8rem 0 0.8rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    background: transparent;
    user-select: none;
    white-space: nowrap;
}

.phone-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 1rem 0.8rem 0.25rem;
    font-size: 1rem;
    outline: none;
    min-width: 0;
    color: #0f172a;
}

    .phone-input-wrapper input::placeholder {
        color: #94a3b8;
    }

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #003087, #1a4a8a);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 8px 24px -6px rgba(0, 48, 135, 0.3);
    margin-top: 0.5rem;
}

    .btn-primary:hover {
        opacity: 0.92;
        transform: scale(1.01);
    }

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
}

    .form-footer a {
        color: #003087;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
    }

        .form-footer a:hover {
            text-decoration: underline;
        }

.demo-note {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 1rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 1rem;
}




.fa-classic, .fa-regular, .fa-solid, .far, .fas {
    font-family: "FontAwesome";
}