* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Montserrat", "Arial", sans-serif;
    background-color: #fff;
    color: #212121;
    min-height: 100vh;
}

button,
input {
    font-family: inherit;
}

.header-inner {
    max-width: 1264px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.site-header {
    background: #fff;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-top: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1edfe;
}

.logo {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}

.logo img {
    display: block;
    width: 415px;
    height: 60px;
    object-fit: contain;
}

.header-tools {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 4px;
    margin-bottom: 12px;
}

.lang-link,
.region-current,
.region-choose,
.ally-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.lang-link {
    color: #212121;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.33;
}

.lang-link .icon,
.region-current .icon {
    margin-right: 6px;
}

.ally-btn {
    margin-left: 24px;
    background: #18438c;
    color: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.ally-btn .icon {
    margin-right: 17px;
}

.ally-btn:hover {
    background: #1e4b99;
}

.region-current {
    margin-left: 24px;
    color: #212121;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.region-choose {
    margin-left: 8px;
    color: #18438c;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
    text-decoration: underline;
    padding: 0 4px;
}

.region-choose:hover {
    color: #12356f;
}

.socials {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin-bottom: 16px;
}

.socials a {
    display: block;
    line-height: 0;
}

.socials a:hover svg path,
.socials a:hover svg rect {
    stroke: #18438c;
}

.header-nav {
    border-bottom: 1px solid #e1edfe;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 21px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    color: #212121;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    padding: 10px 0;
}

.nav-link::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: 10px;
    border-right: 2px solid #212121;
    border-bottom: 2px solid #212121;
    transform: translateY(-2px) rotate(45deg);
}

.nav-link:hover {
    color: #18438c;
}

.nav-link:hover::after {
    border-color: #18438c;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 280px;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(24, 67, 140, 0.12);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 20;
    max-height: 420px;
    overflow-y: auto;
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 18px;
    color: #212121;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.dropdown-item:hover {
    background: #e1edfe;
    color: #18438c;
}

.search {
    position: relative;
    flex: 0 0 auto;
}

.search-input {
    width: 210px;
    border: 1px solid #212121;
    border-radius: 8.5px;
    color: #212121;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    padding: 9px 34px 9px 12px;
    outline: none;
}

.search-input::placeholder {
    color: #d8d8d8;
}

.search-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.breadcrumbs {
    background: #e1edfe;
}

.breadcrumbs-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.breadcrumb-item,
.breadcrumb-current {
    color: #6c6c6c;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
}

.breadcrumb-item:hover {
    color: #212121;
}

.breadcrumb-separator {
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #6c6c6c;
    border-bottom: 1.5px solid #6c6c6c;
    transform: rotate(-45deg);
}

.main-content {
    background: #fff;
    min-height: calc(100vh - 280px);
    padding: 48px 20px 40px;
}

.auth-container {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.title {
    font-size: 28px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 20px;
}

.description {
    font-size: 16px;
    color: #6c6c6c;
    line-height: 1.6;
    margin-bottom: 30px;
}

.login-btn {
    background: #18438c;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
}

.login-btn:hover {
    background: #1e4b99;
}

.legal-text {
    margin-top: 40px;
    font-size: 12px;
    color: #8a8a8a;
    line-height: 1.5;
    text-align: justify;
}

.footer {
    margin-top: 40px;
    font-size: 12px;
    color: #8a8a8a;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(40px);
    transition: transform 0.35s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    background: #18438c;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.close {
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 30px;
}

.modal-instruction {
    font-size: 14px;
    color: #6c6c6c;
    margin-bottom: 20px;
    text-align: center;
}

.code-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.code-digit {
    width: 40px;
    height: 50px;
    background: #f4f7fb;
    border: 1px solid #d5e2f5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d5e2f5;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
}

.form-group input:focus {
    border-color: #18438c;
}

.consent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.consent input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #18438c;
    cursor: pointer;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-right: 20px;
    font-size: 14px;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #18438c;
    cursor: pointer;
    margin: 0;
}

.radio-label span {
    line-height: 1.4;
}

.confirm-btn {
    width: 100%;
    background: #18438c;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
}

.confirm-btn:hover {
    background: #1e4b99;
}

.confirm-btn:disabled {
    background: #b7c4d8;
    cursor: not-allowed;
}

@media (max-width: 1200px) {
    .logo img {
        width: 300px;
        height: auto;
    }

    .nav-link {
        font-size: 14px;
    }

    .ally-btn {
        font-size: 14px;
        margin-left: 16px;
    }

    .ally-btn .icon {
        margin-right: 8px;
    }

    .region-current {
        margin-left: 16px;
        font-size: 14px;
    }

    .socials {
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-tools,
    .header-actions,
    .socials {
        align-items: flex-start;
        width: 100%;
    }

    .header-actions {
        flex-wrap: wrap;
        gap: 12px;
    }

    .ally-btn,
    .region-current,
    .region-choose {
        margin-left: 0;
    }

    .nav-row {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        max-width: none;
        padding-left: 8px;
    }

    .search-input {
        width: 100%;
    }

    .logo img {
        width: min(415px, 100%);
    }
}

.region-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(33, 33, 33, 0.45);
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
    overflow: auto;
}

.region-modal.show {
    display: flex;
}

.region-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 80px);
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 28px 36px 12px;
    display: flex;
    flex-direction: column;
}

.region-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: none;
    color: #212121;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.region-close:hover {
    color: #18438c;
}

.region-dialog h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: #212121;
    max-width: 420px;
    margin: 8px 28px 0 0;
}

.region-label {
    margin-top: 28px;
    font-size: 16px;
    font-weight: 400;
    color: #212121;
}

.region-search {
    position: relative;
    margin-top: 12px;
}

.region-search input {
    width: 100%;
    height: 44px;
    border: 1px solid #c5d0e0;
    border-radius: 6px;
    padding: 0 44px 0 14px;
    font-size: 16px;
    color: #212121;
    outline: none;
}

.region-search input::placeholder {
    color: #b0b0b0;
}

.region-search input:focus {
    border-color: #18438c;
}

.region-search-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    pointer-events: none;
}

.region-list {
    list-style: none;
    margin-top: 22px;
    overflow: auto;
    padding-right: 8px;
}

.region-list button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: #212121;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    padding: 9px 0;
}

.region-list button:hover,
.region-list button.is-current {
    color: #18438c;
}

.region-empty {
    color: #8a8a8a;
    font-size: 14px;
    padding: 12px 0 20px;
}

@media (max-width: 560px) {
    .ally-btn span {
        display: none;
    }

    .ally-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
        border-radius: 8px;
        justify-content: center;
    }

    .ally-btn .icon {
        margin-right: 0;
    }

    .title {
        font-size: 22px;
    }

    .login-btn {
        width: 100%;
    }

    .region-dialog {
        padding: 24px 18px 8px;
    }

    .region-dialog h2 {
        font-size: 18px;
    }
}
