/* OficinaFlow — Login Page
   Aesthetic: Industrial Dark / Automotive Precision
   Fonts: Bebas Neue (display) + DM Sans (body)
*/

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ─── Reset & Tokens ────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0d0e10;
    --bg2: #13151a;
    --panel: #191c23;
    --border: rgba(255,255,255,.07);
    --border-hot: rgba(255,100,30,.45);
    --accent: #ff6020;
    --accent2: #ffaa44;
    --text-hi: #f0ede8;
    --text-mid: #8b8f9a;
    --text-lo: #4a4e5a;
    --success: #30d68a;
    --danger: #ff4444;
    --radius: 6px;
    --radius-lg: 14px;
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --shadow-hot: 0 0 40px rgba(255,96,32,.18);
    --trans: .22s ease;
}

/* ─── Base ──────────────────────────────────────────────────────── */
html, body {
    height: 100%;
}

    body.login-body {
        font-family: var(--font-body);
        background: var(--bg);
        color: var(--text-hi);
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        overflow: hidden;
    }

        /* ─── Background Layers ─────────────────────────────────────────── */
        body.login-body::before {
            content: '';
            position: fixed;
            inset: 0;
            background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(255,96,32,.08) 0%, transparent 70%), radial-gradient(ellipse 50% 80% at 10% 80%, rgba(255,170,68,.05) 0%, transparent 60%);
            pointer-events: none;
            z-index: 0;
        }

        /* Grid overlay */
        body.login-body::after {
            content: '';
            position: fixed;
            inset: 0;
            background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
            background-size: 48px 48px;
            pointer-events: none;
            z-index: 0;
        }

/* ─── Shell ─────────────────────────────────────────────────────── */
.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 580px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border), 0 40px 80px rgba(0,0,0,.6), var(--shadow-hot);
    animation: shellIn .6s cubic-bezier(.16,1,.3,1) both;
}

@keyframes shellIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ─── Left Panel (Visual) ───────────────────────────────────────── */
.login-visual {
    background: var(--bg2);
    border-right: 1px solid var(--border);
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    /* big decorative circle */
    .login-visual::before {
        content: '';
        position: absolute;
        width: 420px;
        height: 420px;
        border-radius: 50%;
        border: 1px solid rgba(255,96,32,.12);
        top: -120px;
        left: -100px;
        pointer-events: none;
    }

    .login-visual::after {
        content: '';
        position: absolute;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        border: 1px solid rgba(255,96,32,.08);
        bottom: -60px;
        right: -80px;
        pointer-events: none;
    }

.visual-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeUp .5s .1s both;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.logo-name {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 2px;
    color: var(--text-hi);
    line-height: 1;
}

    .logo-name span {
        color: var(--accent);
    }

.visual-headline {
    animation: fadeUp .5s .2s both;
}

    .visual-headline h2 {
        font-family: var(--font-display);
        font-size: clamp(40px, 5vw, 58px);
        line-height: .96;
        letter-spacing: 1px;
        color: var(--text-hi);
        margin-bottom: 16px;
    }

        .visual-headline h2 em {
            font-style: normal;
            color: var(--accent);
        }

    .visual-headline p {
        color: var(--text-mid);
        font-size: 14px;
        line-height: 1.65;
        max-width: 260px;
        font-weight: 300;
    }

.visual-stats {
    display: flex;
    gap: 32px;
    animation: fadeUp .5s .3s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--accent);
    letter-spacing: 1px;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--text-lo);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ─── Right Panel (Form) ────────────────────────────────────────── */
.login-card {
    background: var(--panel);
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.login-brand {
    margin-bottom: 36px;
    animation: fadeUp .5s .15s both;
}

.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(255,96,32,.1);
    border: 1px solid rgba(255,96,32,.25);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.login-brand h1 {
    font-family: var(--font-display);
    font-size: 38px;
    letter-spacing: 1px;
    color: var(--text-hi);
    line-height: 1.05;
    margin-bottom: 8px;
}

.login-brand p {
    color: var(--text-mid);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
}

/* ─── Form ──────────────────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: fadeUp .5s .25s both;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.login-form label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-mid);
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

    .input-wrap svg {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-lo);
        transition: color var(--trans);
        pointer-events: none;
    }

.login-form input {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-hi);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    padding: 13px 14px 13px 42px;
    outline: none;
    transition: border-color var(--trans), box-shadow var(--trans), background var(--trans);
    -webkit-appearance: none;
}

    .login-form input::placeholder {
        color: var(--text-lo);
        font-weight: 300;
    }

    .login-form input:focus {
        border-color: var(--accent);
        background: rgba(13,14,16,.9);
        box-shadow: 0 0 0 3px rgba(255,96,32,.12);
    }

        .login-form input:focus + svg,
        .input-wrap:focus-within svg {
            color: var(--accent);
        }

/* ─── Password toggle ───────────────────────────────────────────── */
.pwd-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-lo);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color var(--trans);
}

    .pwd-toggle:hover {
        color: var(--accent);
    }

/* ─── Extras row ────────────────────────────────────────────────── */
.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    margin-top: 4px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-mid);
    cursor: pointer;
    user-select: none;
}

    .remember input[type="checkbox"] {
        appearance: none;
        width: 16px;
        height: 16px;
        border: 1px solid var(--border);
        border-radius: 4px;
        background: var(--bg2);
        padding: 0;
        cursor: pointer;
        transition: all var(--trans);
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

        .remember input[type="checkbox"]:checked {
            background: var(--accent);
            border-color: var(--accent);
        }

            .remember input[type="checkbox"]:checked::after {
                content: '✓';
                position: absolute;
                font-size: 10px;
                color: #fff;
                font-weight: 700;
            }

.forgot {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--trans);
}

    .forgot:hover {
        opacity: .7;
    }

/* ─── Submit Button ─────────────────────────────────────────────── */
.login-form button[type="submit"] {
    width: 100%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 2.5px;
    border: none;
    border-radius: var(--radius);
    padding: 15px 24px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background var(--trans), box-shadow var(--trans), transform var(--trans);
}

    .login-form button[type="submit"]::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
        pointer-events: none;
    }

    .login-form button[type="submit"]:hover {
        background: #ff7a38;
        box-shadow: 0 8px 24px rgba(255,96,32,.4);
        transform: translateY(-1px);
    }

    .login-form button[type="submit"]:active {
        transform: translateY(0);
        box-shadow: 0 4px 12px rgba(255,96,32,.3);
    }

/* ─── Validation ────────────────────────────────────────────────── */
.validation {
    background: rgba(255,68,68,.08);
    border: 1px solid rgba(255,68,68,.3);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 20px;
}

    .validation:empty {
        display: none;
    }

.field-validation {
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
    display: block;
}

    .field-validation:empty {
        display: none;
    }

/* ─── Footer ────────────────────────────────────────────────────── */
.login-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-lo);
    animation: fadeUp .5s .35s both;
}

    .login-footer span {
        color: var(--text-mid);
    }

/* ─── Animations ────────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .login-visual {
        display: none;
    }

    .login-card {
        padding: 48px 32px;
    }

    .login-brand h1 {
        font-size: 32px;
    }
}

@media (max-width: 420px) {
    .login-card {
        padding: 40px 24px;
    }
}
