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

:root {
    --bg-top: #0a1f44;
    --bg-bottom: #12316c;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --text-main: #0f172a;
    --text-soft: #475569;
    --line: #dbe4f0;
    --primary: #0b5ed7;
    --primary-soft: rgba(11, 94, 215, 0.15);
    --success: #16a34a;
    --danger: #dc2626;
    --shadow: 0 20px 50px rgba(2, 6, 23, 0.28);
}

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

body {
    font-family: 'PT Sans', Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(900px 420px at 15% -10%, rgba(56, 189, 248, 0.24), transparent 60%),
        radial-gradient(700px 300px at 95% 105%, rgba(14, 165, 233, 0.2), transparent 60%),
        linear-gradient(145deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-form {
    width: min(440px, 100%);
    background: var(--surface);
    border-radius: 20px;
    padding: 30px 28px 24px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.42s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 18px;
}

.brand-badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e8f1ff;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
}

.avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.avatar-wrap img {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 3px solid #d7e5ff;
    background: #fff;
    box-shadow: 0 8px 16px rgba(2, 6, 23, 0.12);
}

.login-header h1 {
    font-family: 'Exo 2', Arial, sans-serif;
    font-size: 1.85rem;
}

.login-header p {
    margin-top: 4px;
    font-size: 0.96rem;
    color: var(--text-soft);
}

.field-group {
    margin-bottom: 12px;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 700;
}

.pass-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text-main);
    font-size: 0.98rem;
    padding: 11px 12px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #94a3b8;
}

input[type="text"]:focus,
input[type="password"]:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

input.field-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.field-error {
    display: block;
    min-height: 18px;
    margin-top: 4px;
    color: var(--danger);
    font-size: 0.8rem;
}

.toggle-pass {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
}

.toggle-pass:hover,
.toggle-pass:focus {
    text-decoration: underline;
    outline: none;
}

.signin-btn {
    width: 100%;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    background: linear-gradient(90deg, var(--success) 0%, #22c55e 45%, #0ea5e9 100%);
    color: #03280f;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.12s ease, filter 0.2s ease;
}

.signin-btn:hover {
    box-shadow: 0 10px 18px rgba(22, 163, 74, 0.25);
    filter: brightness(1.03);
}

.signin-btn:active {
    transform: translateY(1px);
}

.signin-btn:disabled {
    cursor: not-allowed;
    background: #b9e6c8;
    box-shadow: none;
    color: #1f2937;
}

@media (max-width: 520px) {
    .login-page {
        padding: 12px;
    }

    .login-form {
        border-radius: 14px;
        padding: 22px 16px 18px;
    }

    .login-header h1 {
        font-size: 1.6rem;
    }

    .avatar-wrap img {
        width: 68px;
        height: 68px;
    }
}
