:root {
    --bg-1: #f4f7fb;
    --bg-2: #e8eef7;
    --card: #ffffff;
    --text: #1b263b;
    --border: #d9e1ea;
    --primary: #1b263b;
    --primary-dark: #0d1b2a;
    --info-bg: #eef4ff;
    --info-border: #cddcff;
    --info-text: #163a66;
    --error-bg: #ffe8e8;
    --error-text: #a12626;
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100dvh;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
    color: var(--text);
}

.mobile-login-page {
    width: 100%;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px) 16px;
}

.mobile-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border-radius: 20px;
    padding: 24px 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.logo {
    width: 170px;
    max-width: 75%;
    margin: 0 auto 18px;
    display: block;
}

h1 {
    font-size: 28px;
    margin: 0 0 22px;
    color: var(--text);
}

.login-form {
    margin-top: 4px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    height: 52px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 14px;
    font-size: 16px;
    background: #fff;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 38, 59, 0.08);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 54px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #42506a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.btn-login {
    width: 100%;
    height: 54px;
    margin-top: 8px;
    border: none;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover {
    background: var(--primary-dark);
}

.info-message,
.error-message {
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 16px;
    text-align: left;
}

.info-message {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--info-text);
    font-weight: 600;
}

.error-message {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #f0b8b8;
    font-weight: 600;
}

.subtitle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px 0 26px;
}

.subtitle {
    font-size: 14px;
    color: #8a94a6;
    margin: 0;
}

.line {
    height: 1px;
    width: 50px;
    background: #e2e8f0;
}

.lang-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 18px;
    flex-wrap: wrap;
}

.lang-flag {
    width: 40px;
    height: 40px;
    display: inline-block;
}

.lang-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.lang-flag:hover {
    transform: scale(1.08);
}

.lang-flag.is-active img {
    outline: 2px solid #1f4f8a;
    outline-offset: 2px;
}

.forgot-password-wrap {
    margin: -4px 0 14px;
    text-align: right;
}

.forgot-password-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

@media (max-width: 420px) {
    .forgot-password-wrap {
        text-align: center;
    }
}

@media (min-width: 768px) {

    .mobile-login-card {
        max-width: 480px;
        padding: 36px 32px;
    }

    h1 {
        font-size: 32px;
    }

    .logo {
        width: 200px;
    }

    .subtitle {
        font-size: 15px;
    }
}

@media (min-width: 1024px) {

    .mobile-login-page {
        padding: 40px;
    }

    .mobile-login-card {
        max-width: 520px;
        padding: 44px 40px;
        border-radius: 22px;
    }

    h1 {
        font-size: 34px;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"] {
        height: 56px;
        font-size: 17px;
    }

    .btn-login {
        height: 56px;
        font-size: 17px;
    }

}