@font-face {
    font-family: "TT Firs Neue";
    src: url("fonts/TTFirsNeue-Regular.ttf");
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: "TT Firs Neue";
    src: url("fonts/TTFirsNeue-Regular.ttf");
    font-weight: 900;
    font-style: normal;
}

::placeholder {
    color: #FFF;
    opacity: 0.7;
}

.login-page * {
    font-family: "TT Firs Neue", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
    font-weight: 100;
    font-style: normal;
}
.login-page {
    position: relative;
    height: 100vh;
    background: rgb(0, 21, 118) url("img/background.png");
    background-size: cover;
    overflow: auto;
}

.login-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 900px;
    margin-left: 0;
    margin-right: 0;
    overflow: hidden;
    border-radius: 40px;
    background: rgba(80, 121, 188, 0.3);
}

.login {
    display: grid;
    justify-content: center;
    width: 100%;
    background: none;
}

.login-logo {
    padding-top: 50px;
    width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.login-logo h1 {
    padding-top: 50px;
    color: #ffffff;
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 5px;
    user-select: none;
    /* отобразим текст с названием стенда в две строки, обрезав многоточием */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.login-logo p {
    color: #ffffff;
    font-size: 24px;
    user-select: none;
}

.login-button {
    border-radius: 20px;
    font-weight: 900;
    margin-top: 40px;
    width: 500px;
    height: 100px;
    background: linear-gradient(274.72deg, #3D82F4 -2.57%, #001576 119.39%);
    color: #FFFFFF;
    border-width: 0;
    font-family: TTFirsNeue, serif;
    font-size: 24px;
}

.login-button:hover {
    background: linear-gradient(274.72deg, #3D82F4 -2.57%, #001576 119.39%);
}

.login-page:not(.dual-auth) .login-form-input {
    background: none;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #ffffff;
    color: #ffffff !important;
    font-size: 24px;
}

.login-form {
    position: absolute;
    top: 45%;
    padding: 0 100px;
    text-align: center;

    .ant-tabs-bar ant-tabs-top-bar {
        border-bottom: 3px solid #ffffff;
    }

    .ant-row {
        height: 80px;
    }

    .ant-input-affix-wrapper {
        max-height: 80px;
        padding: 10px 10px;
    }
    /* Dual login: certificate row */
    .login-form-section-cert {
        margin-top: 12px;
    }
    .login-form-cert-selector {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .login-form-cert-selector label {
        flex: 0 0 auto;
        white-space: nowrap;
        font-weight: 500;
    }
    .login-form-cert-selector .ant-select,
    .login-form-cert-selector .ant-select-selector {
        flex: 1 1 auto;
        min-width: 220px;
    }

    .ant-tabs-tab {
        font-size: 24px;
    }

    .ant-tabs-nav .ant-tabs-tab {
        padding: 12px 40px;
    }

    .ant-tabs-nav-container {
        line-height: 2;
    }

    .ant-tabs-ink-bar, ant-tabs-ink-bar-animated {
        height: 4px;
        border-radius: 2px;
    }

    .ant-tabs-top-bar {
        border-bottom: none;
    }

    .ant-tabs-content {
        margin-top: 30px;
    }

    .ant-input-affix-wrapper-focused {
        box-shadow: none;
    }

    input.ant-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    input:-webkit-autofill,
    input:-webkit-autofill:focus {
        transition: background-color 600000s 0s, color 600000s 0s;
    }
    input[data-autocompleted] {
        background-color: transparent !important;
    }

    .anticon-user {
        content: url(img/user.png);
        width: 32px;
        height: 32px;
    }

    .anticon-lock {
        content: url(img/lock.png);
        width: 32px;
        height: 32px;
    }
    .login-form-hint {
        display: block;
        margin: 4px 0 0;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: anywhere;
        text-align: left;
    }
}

.login-page:not(.dual-auth) .login-form-input input:focus {
    background: none;
    border-radius: 0;
    box-shadow: none;
    -webkit-box-shadow: none;
    border: none;
    color: #ffffff !important;
    font-size: 24px;
}

.login-page:not(.dual-auth) .login-form-input input {
    background: none;
    border: none;
    color: #ffffff !important;
    font-size: 24px;
    padding-left: 20px !important;
}

.login-page:not(.dual-auth) .login-form-input * {
    color: #ffffff !important;
    font-size: 24px;
}


@media (max-width: 480px) {
    .login-form { padding: 0 24px 64px; }
    .login-form-cert-selector { flex-wrap: wrap; }
    .login-form-cert-selector .ant-select,
    .login-form-cert-selector .ant-select-selector { min-width: 0; width: 100%; }
}

/* =====================
   Двойная аутентификация: переопределения
   (логин + пароль + сертификат)
   ===================== */
.login-page.dual-auth .login-form {
    position: relative;
    top: auto;
    margin-top: 40px;
    padding: 0 100px 56px;
}
.login-page.dual-auth .login-form .ant-row { min-height: 64px; height: auto; }
.login-page.dual-auth .login-form a {
    position: static;
    top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-page.dual-auth .login-form-section-cert { margin-top: 12px; }
.login-page.dual-auth .login-form-cert-selector {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.login-page.dual-auth .login-form-cert-selector label {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 500;
}
.login-page.dual-auth .login-form-cert-selector .ant-select,
.login-page.dual-auth .login-form-cert-selector .ant-select-selector {
    flex: 1 1 auto;
    min-width: 220px;
}

@media (max-width: 480px) {
    .login-page.dual-auth .login-form { padding: 0 24px 64px; }
    .login-page.dual-auth .login-form-cert-selector { flex-wrap: wrap; }
    .login-page.dual-auth .login-form-cert-selector .ant-select,
    .login-page.dual-auth .login-form-cert-selector .ant-select-selector { min-width: 0; width: 100%; }
}

.login-page.dual-auth .ant-input,
.login-page.dual-auth input.ant-input,
.login-page.dual-auth .ant-input:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

.login-page.dual-auth .login-form-input .ant-input {
  font-size: 24px;
  padding-left: 20px !important;
}

.login-page.dual-auth .login-form-input .ant-input:focus {
  font-size: 24px;
}

.login-page.dual-auth .ant-input-affix-wrapper,
.login-page.dual-auth .ant-input-affix-wrapper:hover,
.login-page.dual-auth .ant-input-affix-wrapper-focused {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.login-page.dual-auth .ant-input-affix-wrapper {
  border-bottom: 1px solid #ffffff !important;
  padding-left: 0;
}

.login-page.dual-auth .ant-input-affix-wrapper .ant-input-prefix {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  color: #ffffff;
  min-width: 32px;
  justify-content: center;
}
.login-page.dual-auth .ant-input-affix-wrapper .ant-input-prefix .anticon,
.login-page.dual-auth .ant-input-affix-wrapper .ant-input-prefix svg {
  color: #ffffff;
  fill: currentColor;
  width: 32px;
  height: 32px;
  opacity: 1;
}

/* заменить текстовый label на иконку */
.login-form-cert-selector label {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0;
  line-height: 0;
  color: transparent;
  margin: 0;
  padding: 0;
}

.login-form-cert-selector label::before {
  content: "";
  width: 32px;
  height: 32px;
  display: inline-block;
  -webkit-mask: url('img/cert.svg') no-repeat center / contain;
  mask: url('img/cert.svg') no-repeat center / contain;
  background-color: rgba(255, 255, 255, 0.85);
  transform: translateY(2px);
  margin-right: 6px;
}

.login-page.dual-auth .login-form .ant-typography,
.login-page.dual-auth .login-form .ant-form-item-label > label,
.login-page.dual-auth .login-form h3 {
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 400;
}

.login-page.dual-auth .login-form .login-form-cert-selector { gap: 6px; }
.login-page.dual-auth .login-form .login-form-cert-selector .ant-select-single .ant-select-selector {
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent;
  border: none;
}
.login-page.dual-auth .login-form .login-form-cert-selector .ant-select { margin-left: 0 !important; }
.login-form .login-form-section-cert .ant-select { margin-left: 0 !important; }
.login-page.dual-auth .login-form .login-form-cert-selector .ant-select-selector .ant-select-selection-item,
.login-page.dual-auth .login-form .login-form-cert-selector .ant-select-selector .ant-select-selection-placeholder,
.login-page.dual-auth .login-form .login-form-cert-selector .ant-select-selector .ant-select-selection-search-input {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.login-page.dual-auth .login-form .login-form-hint {
  color: #FF9900 !important;
}

.login-page.dual-auth .login-form .login-form-section-cert .ant-select-single .ant-select-selector {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.login-page.dual-auth .login-form .login-form-section-cert .ant-select-selector .ant-select-selection-item,
.login-page.dual-auth .login-form .login-form-section-cert .ant-select-selector .ant-select-selection-placeholder,
.login-page.dual-auth .login-form .login-form-section-cert .ant-select-selector .ant-select-selection-search-input {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.login-logo img {
    content: url(img/bft-logo.png);
    width: 133px;
    height: 92px;
    margin-top: 40px;
}
