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

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

h3{
    margin-top: 0;
    margin-bottom: 0;
}
p{
    margin-top: 0;
    margin-bottom: 0;
}
html {
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(315deg, #1565C0 0.08%, #2196F3 99.92%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 20px;
    margin: 0;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}
.login-form {
    /* Добавляем фикс для iOS */
    transform: translateZ(0);
}

.login-form {
    border-radius: 16px;
    background: #FFF;
    box-shadow: 0px 4px 10px 0px rgba(51, 51, 51, 0.12);

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: clamp(24px, 5vw, 32px); /* Адаптивный padding */
    gap: clamp(60px, 6vw, 60px); /* Адаптивный gap */

    width: 100%;
    max-width: 356px;

    margin: 20px;
}

.logo-container {
    display: flex;
    width: 145px;
    height: 32px;
    padding: 0px 1.477px 0px 0px;
    justify-content: center;
    align-items: flex-end;
    gap: 9.734px;
    flex-shrink: 0;
    aspect-ratio: 145/32;
}
.easydash-logo{
    width: 145px;
    height: 32px;
    aspect-ratio: 145/32;
}


/* Заголовок Авторизация */
.heading {
    color: #333;
    text-align: center;
    font-family: Roboto;
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px;
}



.inputs-form{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    align-self: stretch;
}
.inputs-container{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
}

.input-field {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    height: 48px;
}
.input-field input {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    align-self: stretch;
    border-radius: 6px;
    border: 1px solid #CECECE;
    background: #FFF;

    color: #333;
    text-align: justify;
    font-variant-numeric: lining-nums proportional-nums;
    font-family: Roboto;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px;

    transition: border 0.3s ease;
}

.input-field label {
    position: absolute;
    left: 14px;
    top:50%;

    transform: translateY(-50%);
    transition: all 0.1s ease;

    pointer-events: none;
    background-color: transparent;

    color: #33333389;
    text-align: justify;
    font-variant-numeric: lining-nums proportional-nums;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px;
}
.login-error-message, .password-error-message {
    color: #F44336;
    display: flex;
    padding: 0px 16px;
    align-items: center;
    align-self: flex-start;

    font-family: Roboto;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}


/* Наведения и селекты */
.input-field input:focus ~ label,
.input-field input:not(:placeholder-shown) ~ label {
    transform: translateY(-50%);
    top: 0;
    background-color: #fff;
    color: #33333389;
    padding: 0 4px;
    left: 10px;
}


.input-field input:hover{
    border: 1px solid #333333;
}
.input-field input:focus{
    border: 1px solid #2196F3;
    outline: none;
}
.input-field input:focus ~ label {
    color: #2196F3;
}


/* Состояние ошибки */
.inputs-container > .input-field.error:first-child {
    margin-bottom: 18px;
}
.input-field.error input {
  border: 1px solid #F44336;
}
.input-field.error input:focus ~ label,
.input-field.error input:valid ~ label,
.input-field.error label {
    color: #F44336;
}







.login-button {
    display: flex;
    padding: 11px 20px;
    justify-content: center;
    align-items: center;
    gap: 6px;
    align-self: stretch;

    border:None;
    border-radius: 12px;
    background: #2196F3;
    cursor: pointer;
}
.login-button-text{
    display: flex;
    padding: 4px 0px;
    justify-content: center;
    align-items: center;

    color: #FFF;
    text-align: center;
    font-variant-numeric: lining-nums proportional-nums;
    font-family: Roboto;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px;
    letter-spacing: 0.28px;
    text-transform: uppercase;
}

.login-button:hover,
.login-button:active,
.login-button:focus {
    background-color: #1565C0;
    outline: none;
    box-shadow: none;
}



/* Медиа-запросы для адаптации */
@media (max-width: 400px) {
    .login-form{
        min-width: 231px;
    }
}

@media (max-width: 300px) {
    .login-form{
        gap:24px;
    }
    .heading{
        font-size: 18px;
    }
    .easydash-logo{
        width: 120px;
        height: 27px;

    }
}

@media (max-height: 400px){
    .login-form {
        gap: clamp(16px, min(4vw, 4vh), 24px);
    }
    .inputs-form{
        gap: 16px;
    }
}