/* ═══════════════════════════════════════════════════════════
   login.css  —  LEAP Project Management System
   Based on original design from Login.aspx (Marketing ERP)
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── RESET & VARIABLES ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --ink: #0f1117;
    --ink-light: #3a3d4a;
    --accent: #2C3E7B;
    --accent-light: #4A5FAD;
    --panel-bg: #B6D0E2;
    --border: rgba(44,62,123,0.25);
    --radius: 24px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html, body {
    height: 100%;
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    background: var(--ink);
    overflow: hidden;
}

/* ── FULL-SCREEN WRAPPER ── */
#login-wrapper {
    position: relative;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── BACKGROUND PANEL ── */
.bg-panel {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

    .bg-panel img.bg-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        opacity: 0.18;
        filter: none;
    }

    .bg-panel::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient( 135deg, rgba(15,17,23,0.85) 0%, rgba(15,17,23,0.70) 50%, rgba(44,62,123,0.15) 100% );
    }

    .bg-panel .accent-line {
        position: absolute;
        top: 0;
        right: 0;
        width: 3px;
        height: 100%;
        background: linear-gradient(to bottom, transparent, var(--accent), transparent);
        z-index: 3;
    }

    .bg-panel .tagline {
        position: absolute;
        bottom: 48px;
        left: 48px;
        z-index: 2;
        color: #fff;
    }

        .bg-panel .tagline h2 {
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            font-weight: 600;
            line-height: 1.3;
            text-shadow: 0 2px 16px rgba(0,0,0,0.4);
            margin: 0;
            white-space: nowrap; /* keep it on one line */
        }

        .bg-panel .tagline span {
            display: block;
            margin-top: 8px;
            font-size: 0.85rem;
            font-weight: 300;
            letter-spacing: 0.08em;
            opacity: 0.75;
            text-transform: uppercase;
        }

/* ── LOGIN PANEL ── */
.login-panel {
    position: relative;
    z-index: 10;
    width: 340px;
    min-width: 280px;
    background: var(--panel-bg);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 32px 44px;
    min-height: 580px;
    box-shadow: 0 24px 80px rgba(15,17,23,0.55), 0 0 0 1px rgba(255,255,255,0.06);
    animation: slideIn 0.6s cubic-bezier(0.4,0,0.2,1) both;
}

@keyframes slideIn {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── LANGUAGE SWITCHER ── */
.lang-switcher {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 4px 10px 4px 8px;
    animation: fadeUp 0.5s 0.55s both;
}

    .lang-switcher span.lang-label {
        font-size: 0.62rem;
        text-transform: uppercase;
        letter-spacing: 0.09em;
        color: var(--ink-light);
        font-weight: 500;
    }

    .lang-switcher a {
        font-size: 0.72rem;
        font-weight: 700;
        text-decoration: none;
        padding: 2px 8px;
        border-radius: 20px;
        border: 1px solid transparent;
        color: var(--ink-light);
        transition: all var(--transition);
        letter-spacing: 0.04em;
    }

        .lang-switcher a.active,
        .lang-switcher a:hover {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent);
        }

/* ── LOGO ── */
.logo-wrap {
    margin-bottom: 20px;
    text-align: center;
    animation: fadeUp 0.5s 0.1s both;
}

    .logo-wrap .logo-icon {
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, var(--accent), var(--accent-light));
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .logo-wrap .wordmark {
        font-family: 'Playfair Display', serif;
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--ink);
        letter-spacing: -0.02em;
    }

        .logo-wrap .wordmark span {
            color: var(--accent);
        }

/* ── DIVIDER ── */
.login-divider {
    width: 32px;
    height: 2px;
    background: linear-gradient(to right, var(--accent), var(--accent-light));
    border-radius: 2px;
    margin: 0 auto 18px;
    animation: fadeUp 0.5s 0.15s both;
}

/* ── HEADLINE ── */
.login-headline {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeUp 0.5s 0.2s both;
    width: 100%;
}

    .login-headline h1 {
        font-family: 'Playfair Display', serif;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--ink);
        letter-spacing: -0.01em;
    }

    .login-headline p {
        margin-top: 0;
        font-size: 0.72rem;
        color: var(--ink-light);
        font-weight: 300;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

/* ── FORM ── */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fadeUp 0.5s both;
}

    .field-group:nth-child(1) {
        animation-delay: 0.25s;
    }

    .field-group:nth-child(2) {
        animation-delay: 0.30s;
    }

    .field-group:nth-child(3) {
        animation-delay: 0.35s;
    }

    .field-group label {
        font-size: 0.68rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--ink-light);
    }

/* ── INPUTS ── */
.login-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    color: var(--ink);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

    .login-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(44,62,123,0.15);
    }

    .login-input::placeholder {
        color: #b0b3bc;
        font-weight: 300;
    }

/* ── LOGIN BUTTON ── */
.btn-login-wrap {
    animation: fadeUp 0.5s 0.4s both;
}

.btn-login {
    width: 100%;
    height: 42px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    box-shadow: 0 4px 18px rgba(44,62,123,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(44,62,123,0.45);
        filter: brightness(1.1);
        color: #fff;
    }

    .btn-login:active {
        transform: translateY(0);
    }

/* ── ERROR MESSAGE ── */
.login-error {
    padding: 9px 13px;
    background: rgba(220,38,38,0.07);
    border: 1px solid rgba(220,38,38,0.18);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: #c0392b;
    text-align: center;
    animation: fadeUp 0.3s both;
}

/* ── COPYRIGHT ── */
.login-copyright {
    margin-top: 18px;
    text-align: center;
    font-size: 0.66rem;
    color: #5a6272;
    font-weight: 300;
    letter-spacing: 0.03em;
    animation: fadeUp 0.5s 0.5s both;
}

    .login-copyright a {
        color: var(--accent);
        text-decoration: none;
        font-weight: 500;
    }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    html, body {
        overflow: auto;
    }

    .login-panel {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        padding: 56px 24px 32px;
        justify-content: flex-start;
    }

    .bg-panel .tagline {
        display: none;
    }
}

/* ── LOGO IMAGE ── */
/* No plate: the logo sits directly on the panel so the transparent PNG
   blends into it instead of floating on a tinted tile. */
.logo-img {
    width: 240px;
    max-width: 100%;
    height: 90px;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: block;
    margin: 0 auto;
}

/* ── FLAG IMAGES ── */
.flag-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color var(--transition), transform var(--transition);
    cursor: pointer;
    display: block;
}

    .flag-img:hover {
        border-color: var(--accent);
        transform: scale(1.15);
    }

    .flag-img.flag-active {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px rgba(44,62,123,0.25);
    }
