:root {
    --bg-main: #edf1f6;
    --panel-dark-a: #102843;
    --panel-dark-b: #17395f;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: #d7e2ee;
    --text-main: #1b2532;
    --text-soft: #5a6c80;
    --input-border: #c9d8e8;
    --input-focus: #6a98c9;
    --cta-a: #1f4b79;
    --cta-b: #163c62;
    --danger-bg: #fdecee;
    --danger-border: #f3b6c0;
    --danger-text: #8d1e32;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(1000px 700px at 100% 0%, #d9e4f1 0%, transparent 70%),
        radial-gradient(800px 600px at 0% 100%, #dce7f4 0%, transparent 70%),
        var(--bg-main);
}

.lang-dropdown-wrap {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 2000;
}

.lang-dropdown-wrap .dropdown-toggle {
    border-radius: 8px;
    border: 1px solid #cfdbea;
    background: rgba(255, 255, 255, 0.92);
    color: #20364d;
    font-weight: 600;
    padding: 0.32rem 0.72rem;
}

.lang-dropdown-wrap .dropdown-toggle img,
.lang-dropdown-wrap .dropdown-item img {
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(20, 32, 46, 0.14);
}

.login-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.25fr) minmax(360px, 1fr);
}

.login-brand {
    position: relative;
    padding: 72px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(145deg, var(--panel-dark-a), var(--panel-dark-b));
    color: #edf4fb;
    overflow: hidden;
}

.login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.24;
    pointer-events: none;
}

.login-brand > * {
    position: relative;
    z-index: 1;
}

.login-brand h1 {
    font-size: clamp(3.1rem, 7vw, 5.4rem);
    margin: 0 0 1rem;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.login-brand p {
    max-width: 520px;
    margin: 0;
    line-height: 1.7;
    font-size: 1.04rem;
    color: #d2e0ee;
}

.login-pane {
    position: relative;
    height: 100vh;
    width: min(500px, 92%);
    margin: 0 auto;
}

.login-card {
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow:
        0 32px 64px rgba(15, 34, 54, 0.16),
        0 2px 8px rgba(15, 34, 54, 0.07);
    padding: 34px;
    backdrop-filter: blur(4px);
}

.login-eyebrow {
    margin-bottom: 0.55rem;
    color: #4f6781;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 800;
}

.login-card h2 {
    margin: 0 0 1.4rem;
    font-size: 2.05rem;
    line-height: 1.1;
    font-weight: 800;
    color: #1b2a3a;
}

.alert {
    margin: 0 0 1rem;
    color: var(--danger-text);
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    color: #2a3848;
    font-size: 0.94rem;
    font-weight: 700;
}

input {
    width: 100%;
    border: 1px solid var(--input-border);
    border-radius: 11px;
    padding: 0.78rem 0.84rem;
    margin-bottom: 1.05rem;
    font-size: 0.96rem;
    color: #223245;
    background: #fcfdff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input::placeholder {
    color: #8b9db1;
}

input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(106, 152, 201, 0.16);
    background: #fff;
}

.login-card form button[type="submit"] {
    width: 100%;
    border: 0;
    border-radius: 11px;
    padding: 0.86rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--cta-a), var(--cta-b));
    cursor: pointer;
    transition: transform 0.08s ease, filter 0.15s ease;
}

.login-card form button[type="submit"]:hover {
    filter: brightness(1.05);
}

.login-card form button[type="submit"]:active {
    transform: translateY(1px);
}

@media (max-width: 980px) {
    .login-shell {
        height: auto;
        grid-template-columns: 1fr;
    }

    .login-brand {
        min-height: 240px;
        padding: 48px 28px 34px;
    }

    .login-pane {
        height: auto;
        width: min(520px, 92%);
        padding: 12px 0 28px;
    }

    .login-card {
        position: static;
        transform: none;
        margin: 0 auto;
    }
}
