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

:root {
    --royal: #2345d8;
    --royal-hover: #1a36b3;
    --royal-glow: rgba(35, 69, 216, 0.15);
    --ink: #1a1f36;
    --ink-soft: #4a5578;
    --muted: #8892a8;
    --bg: #f0f2f7;
    --surface: #ffffff;
    --line: #e2e6f0;
    --radius: 16px;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

body.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    margin: 0;
    min-height: 100vh;
}

body.login-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(35, 69, 216, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 80%, rgba(35, 69, 216, 0.03) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(145deg, #2345d8, #1a36b3);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(35, 69, 216, 0.25);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.brand-sub {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.02),
        0 8px 32px rgba(25, 39, 79, 0.05);
}

.login-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.login-card .subtitle {
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.login-form-group {
    margin-bottom: 1.25rem;
}

.login-form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.45rem;
    letter-spacing: 0.01em;
}

.login-form-group input {
    width: 100%;
    height: 46px;
    padding: 0 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fafbfe;
    color: var(--ink);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.login-form-group input::placeholder {
    color: #b4bbd0;
}

.login-form-group input:focus {
    border-color: var(--royal);
    background: #fff;
    box-shadow: 0 0 0 3.5px var(--royal-glow);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: auto;
    accent-color: var(--royal);
    cursor: pointer;
}

.remember-row span {
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.btn-login {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: var(--royal);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-login:hover {
    background: var(--royal-hover);
    box-shadow: 0 4px 14px rgba(35, 69, 216, 0.3);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: none;
}

.flash-msg {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.flash-msg.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.flash-msg.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.76rem;
    color: var(--muted);
}

.login-footer span {
    opacity: 0.6;
}

@media (max-width: 480px) {
    .login-card { padding: 1.5rem; }
}
