@font-face {
    font-family: 'Onest';
    src: url('../fonts/Onest-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Onest', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.login-form {
    width: 100%;
    max-width: 384px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form__title {
    font-size: 44px;
    font-weight: 400;
    line-height: 60px;
    letter-spacing: -0.4px;
    color: #000;
    padding-left: 8px;
    margin-bottom: 8px;
}

/* ── Form Field ── */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field__labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.form-field__label {
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0.15px;
    color: rgba(0, 0, 0, 0.3);
}

.form-field__error-text {
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0.15px;
    color: rgba(255, 54, 51, 0.8);
}

/* ── Input Wrapper ── */
.input-wrapper {
    width: 100%;
    height: 44px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    padding: 0 16px 0 20px;
    gap: 4px;
    transition: border-color 0.15s, background-color 0.15s;
}

.input-wrapper:not(.input-wrapper--error):hover {
    background: rgba(0, 0, 0, 0.05);
}

.input-wrapper:not(.input-wrapper--error):focus-within {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.15);
}

.input-wrapper--error {
    background: #fff;
    border: 1px solid rgba(255, 54, 51, 0.8);
}

.input-wrapper__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #000;
    height: 100%;
    min-width: 0;
}

.input-wrapper__input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.input-wrapper__clear,
.input-wrapper__eye {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.input-wrapper__clear:hover path {
    fill-opacity: 0.8;
}

.input-wrapper__eye:hover path {
    stroke-opacity: 0.8;
}

/* ── Button ── */
.btn-submit {
    width: 100%;
    height: 44px;
    border-radius: 60px;
    background: #030912;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
    margin-top: 8px;
}

.btn-submit:hover {
    background: rgba(3, 9, 18, 0.8);
}

.btn-submit__text {
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #fff;
}

.btn-submit__spinner {
    display: none;
}

.btn-submit--loading {
    background: #E5EBF0;
    pointer-events: none;
}

.btn-submit--loading .btn-submit__text {
    display: none;
}

.btn-submit--loading .btn-submit__spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    animation: spin 0.8s linear infinite;
}

.btn-submit:disabled {
    background: #E5EBF0;
    cursor: default;
}

.btn-submit:disabled .btn-submit__text {
    color: rgba(0, 0, 0, 0.3);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
