html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    max-width: none;
    padding: 24px;
}

/* Контейнер, оборачивающий форму (если нужно центрирование или фон) */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    /* При желании можете добавить высоту, отступы или фон для контейнера:
       height: 100vh;
       justify-content: center;
       background-color: #f5f5f7;
    */
}

/* Логотип */
.logo-container {
    margin-bottom: 24px;
}

.login-logo {
    max-height: 50px; /* Подстройте по своему вкусу */
    display: block;
}

/* Форма */
.login-form {
    width: 340px;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.login-form--wide {
    width: min(100%, 460px);
}

.login-title {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-weight: 600;
    margin-bottom: 16px;
}

.login-title__mark {
    font-weight: 150;
}

.login-title__light {
    font-weight: 100;
}

.login-subtitle {
    margin-top: 0;
    margin-bottom: 14px;
    font-weight: 100;
    text-align: center;
    font-size: 8px;
}

.login-switch-link {
    display: block;
    margin-top: 5px;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.2;
}

.login-mode-switch {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.login-mode-option {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    background: #fff;
    color: #111;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.login-mode-option.is-active {
    background: #007aff;
    color: #fff;
    border-color: #007aff;
}

.login-label {
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 100;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
}

.login-checkbox input {
    margin: 0;
}

.login-input {
    display: block;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    transition: border-color 0.3s;
}

.login-input:focus {
    outline: none;
    border-color: #007aff; /* Акцент под Apple */
}

.login-button {
    margin-top: 24px;
    padding: 12px;
    background: #007aff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    transition: background-color 0.3s;
}

.login-button:hover {
    background-color: #005bb5;
}


.login-error {
    background-color: #ffe5e5;
    color: #c30000;
    padding: 10px 14px;
    border: 1px solid #ffb3b3;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

.login-message {
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid #b7e4c7;
    border-radius: 6px;
    background: #e7f7ec;
    color: #116329;
    font-size: 14px;
    text-align: center;
}

.login-info {
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid #b6d4fe;
    border-radius: 6px;
    background: #e7f3ff;
    color: #084298;
    font-size: 14px;
    text-align: left;
}

.login-section-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.login-section-subtitle {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
    text-align: center;
}

.login-help {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
}

.login-agreement {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    background: #f8fbff;
}

.login-agreement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.login-agreement-grid .login-agreement {
    margin-top: 0;
    height: 100%;
}

.login-agreement .login-section-title {
    text-align: left;
    margin-bottom: 10px;
    font-size: 15px;
}

.login-agreement__text {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #334155;
}

.login-checkbox--stack {
    align-items: flex-start;
    gap: 8px;
}

.login-checkbox--stack input {
    margin-top: 2px;
}

.login-note {
    margin-top: 8px;
    text-align: center;
    font-size: 11px;
    color: #777;
}

.login-note--ip-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.login-note__flag {
    font-size: 12px;
    line-height: 1;
}

@media (max-width: 900px) {
    body {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        padding: 0;
        background: #fff;
        overflow: hidden;
    }

    .login-container {
        position: fixed;
        inset: 0;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        min-height: 100svh;
        align-items: stretch;
        justify-content: stretch;
    }

    .logo-container {
        display: none;
    }

    .login-form {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        min-height: 100svh;
        padding: 28px 20px 24px;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        justify-content: center;
    }

    .login-agreement-grid {
        grid-template-columns: 1fr;
    }

    .login-input,
    .login-mode-option,
    .login-error,
    .login-message,
    .login-button {
        box-shadow: none;
    }

    .login-input,
    .login-mode-option,
    .login-error,
    .login-message {
        border-left: 0;
        border-right: 0;
        border-top: 0;
        border-radius: 0;
    }
}
