/* =========================================================================
   BPMS247 — auth.css
   Split-screen auth layout: Form LEFT | Promotional panel RIGHT
   (Salesforce-style reference, June 2026 revision)
   ========================================================================= */

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   Layout: Split Screen
   ========================================================================= */
.auth-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* -------------------------------------------------------------------------
   LEFT PANEL: Form Area (white, fixed width)
   ------------------------------------------------------------------------- */
.auth-form-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2rem;
    width: 100%;
    background-color: #ffffff;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .auth-form-wrapper {
        flex: 0 0 460px;
        max-width: 460px;
        padding: 3rem 3.5rem;
        /* shadow falls on the RIGHT edge (toward the promo panel) */
        box-shadow: 6px 0 32px rgba(0, 0, 0, 0.08);
        z-index: 10;
        overflow-y: auto;
    }
}

@media (min-width: 1200px) {
    .auth-form-wrapper {
        flex: 0 0 520px;
        max-width: 520px;
        padding: 4rem 4.5rem;
    }
}

/* -------------------------------------------------------------------------
   RIGHT PANEL: Promotional / Marketing (dark gradient, flex: 1)
   ------------------------------------------------------------------------- */
.auth-visual {
    display: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #0f172a, #0e4272, #1e3a8a, #0ea5e9);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: white;
}

@keyframes gradientBG {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

@media (min-width: 992px) {
    .auth-visual {
        display: flex;
        flex: 1;
        flex-direction: column;
        justify-content: center;
        padding: 4rem;
    }
}

.auth-visual-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

/* ── Glass floating shapes (depth) ── */
.glass-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.glass-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.shape-1 { width: 420px; height: 420px; top: -140px; right: -80px;  animation-duration: 25s; }
.shape-2 { width: 560px; height: 560px; bottom: -8%;  left: -180px; animation-duration: 32s; animation-delay: -5s; }
.shape-3 { width: 260px; height: 260px; top: 42%;    right: 55%;   animation-duration: 22s; animation-delay: -12s; }

@keyframes float {
    0%,100% { transform: translateY(0)    scale(1)    rotate(0deg); }
    50%     { transform: translateY(-30px) scale(1.05) rotate(5deg); }
}

/* =========================================================================
   Promotional Content (Right Panel)
   ========================================================================= */
.promo-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 2.5rem;
}

.promo-brand strong { color: #7dd3fc; }

.promo-brand-icon {
    font-size: 1.8rem;
    color: #38bdf8;
    line-height: 1;
}

.promo-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.badge-dot {
    width: 7px; height: 7px;
    background: #22d3ee;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.8); }
}

.promo-headline {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.08;
    color: #fff;
    margin: 0 0 1.1rem;
}

.promo-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.65;
    margin: 0 0 2rem;
    max-width: 420px;
}

.promo-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.promo-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.pf-check {
    color: #34d399;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.promo-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 0 1.5rem;
}

.promo-tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
    margin: 0 0 2rem;
}

.promo-tagline strong {
    color: #fff;
}

.promo-back-link {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.promo-back-link:hover { color: rgba(255, 255, 255, 0.85); }

/* =========================================================================
   Brand Header (Left Panel)
   ========================================================================= */
.brand-header {
    margin-bottom: 1.75rem;
}

.brand-header h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -1px;
    margin: 0 0 0.35rem;
    line-height: 1;
}

.brand-header h2 span { color: #4f46e5; }

.auth-subtitle {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

/* =========================================================================
   Demo Block
   ========================================================================= */
.demo-login-block {
    margin-bottom: 1.25rem;
}

.btn-demo-login {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.92rem;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.32);
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.btn-demo-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.45);
}

.demo-hint {
    color: #94a3b8;
    font-size: 0.75rem;
    text-align: center;
    margin: 0.5rem 0 0;
}

/* =========================================================================
   Divider
   ========================================================================= */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    color: #cbd5e1;
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* =========================================================================
   Auth Card / Form
   ========================================================================= */
.auth-card { width: 100%; }

/* Floating Label Inputs */
.form-floating {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-floating .form-control {
    width: 100%;
    height: 3.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: #f8fafc;
    font-size: 1rem;
    font-family: inherit;
    color: #0f172a;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-weight: 500;
}

.form-floating .form-control:focus {
    outline: none;
    border-color: #4f46e5;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-floating .form-control::placeholder { color: transparent; }

.form-floating label {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    padding: 1rem 1.25rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity .15s ease-in-out, transform .15s ease-in-out;
    color: #64748b;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.7;
    transform: scale(0.85) translateY(-0.8rem) translateX(0.15rem);
    background-color: transparent;
    padding-top: 0.25rem;
    padding-bottom: 0;
    align-items: flex-start;
    font-weight: 500;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

/* Alerts */
.custom-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 500;
}

.custom-alert svg { flex-shrink: 0; margin-top: 0.1rem; }

.alert-error  { background-color: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-error ul { margin: 0; padding-left: 1.5rem; }
.alert-success { background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }

/* Links & Buttons */
.forgot-password {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.75rem;
    margin-top: -0.5rem;
}

.forgot-password a {
    color: #4f46e5;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password a:hover { color: #3730a3; text-decoration: underline; }

.btn-auth {
    width: 100%;
    padding: 1.125rem;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.btn-auth:hover  { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35); }
.btn-auth:active { transform: translateY(0);    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.2); }

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover { color: #3730a3; text-decoration: underline; }
