﻿:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #eef2ff;
    --violet: #7c3aed;
    --border-color: #dfe3ea;
    --text-muted: #6b7280;
    --radius: 14px;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    background: #f6f7fb;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ================= LEFT BRAND PANEL ================= */
.auth-left {
    flex: 0 0 55%;
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--violet) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px 60px;
    overflow: hidden;
}

    /* floating decorative circles */
    .auth-left .deco-circle {
        position: absolute;
        border: 2px dashed rgba(255,255,255,0.18);
        border-radius: 50%;
    }

.deco-circle.c1 {
    width: 340px;
    height: 340px;
    top: -120px;
    right: -100px;
    animation: floatSlow 14s ease-in-out infinite;
}

.deco-circle.c2 {
    width: 220px;
    height: 220px;
    bottom: -80px;
    left: -60px;
    animation: floatSlow 10s ease-in-out infinite reverse;
}

.deco-circle.c3 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 10%;
    border-style: solid;
    border-color: rgba(255,255,255,0.1);
    animation: floatSlow 8s ease-in-out infinite;
}

@keyframes floatSlow {
    0%,100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-18px) rotate(8deg);
    }
}

/* stitched thread line */
.auth-left::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 0;
    border-left: 2px dashed rgba(255,255,255,0.22);
}

.auth-left-top {
    position: relative;
    z-index: 2;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .5px;
}

    .auth-brand-mark i {
        font-size: 1.7rem;
    }

.auth-left-mid {
    position: relative;
    z-index: 2;
    max-width: 420px;
}

    .auth-left-mid .tagline {
        font-size: .78rem;
        letter-spacing: .3em;
        text-transform: uppercase;
        color: rgba(255,255,255,0.7);
        margin-bottom: 18px;
    }

    .auth-left-mid h1 {
        font-family: 'Georgia', serif;
        font-size: 2.3rem;
        line-height: 1.3;
        font-weight: 700;
        margin-bottom: 16px;
    }

/* rotating quote carousel */
.quote-carousel {
    position: relative;
    min-height: 90px;
    margin-top: 20px;
}

.quote-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .6s ease, transform .6s ease;
}

    .quote-slide.active {
        opacity: 1;
        transform: translateY(0);
    }

    .quote-slide p {
        font-size: .95rem;
        color: rgba(255,255,255,0.88);
        font-style: italic;
        line-height: 1.6;
        margin-bottom: 6px;
    }

    .quote-slide span {
        font-size: .75rem;
        color: rgba(255,255,255,0.6);
        text-transform: uppercase;
        letter-spacing: .1em;
    }

.auth-left-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    color: rgba(255,255,255,0.55);
}

    .auth-left-bottom .stitch-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(255,255,255,0.5);
    }

    .auth-left-bottom .stitch-line {
        flex: 1;
        max-width: 60px;
        height: 1px;
        background: repeating-linear-gradient(90deg, rgba(255,255,255,0.5) 0 6px, transparent 6px 12px);
    }

/* ================= RIGHT FORM PANEL ================= */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f6f7fb;
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--radius);
    padding: 48px 42px;
    box-shadow: 0 20px 60px rgba(55,48,163,0.12);
    border: 1px solid var(--border-color);
}

    .auth-card .welcome-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        background: var(--primary-light);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: var(--primary);
        margin-bottom: 22px;
    }

    .auth-card h3 {
        font-weight: 700;
        color: #111827;
        margin-bottom: 6px;
    }

    .auth-card .sub {
        color: var(--text-muted);
        font-size: .9rem;
        margin-bottom: 30px;
    }

/* Floating label input */
.f-field {
    position: relative;
    margin-bottom: 22px;
}

    .f-field input {
        width: 100%;
        border: 1px solid var(--border-color);
        border-radius: 9px;
        padding: 18px 14px 8px 42px;
        font-size: .95rem;
        background: #fff;
        transition: border-color .2s, box-shadow .2s;
    }

        .f-field input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(79,70,229,0.12);
        }

    .f-field label {
        position: absolute;
        left: 42px;
        top: 15px;
        color: #9ca3af;
        font-size: .92rem;
        pointer-events: none;
        transition: .18s ease all;
        background: #fff;
        padding: 0 2px;
    }

    .f-field input:focus + label,
    .f-field input:not(:placeholder-shown) + label {
        top: -8px;
        left: 36px;
        font-size: .72rem;
        color: var(--primary);
        font-weight: 600;
    }

    .f-field .f-icon {
        position: absolute;
        left: 14px;
        top: 16px;
        color: #9ca3af;
        font-size: 1rem;
        transition: .18s;
    }

    .f-field input:focus ~ .f-icon {
        color: var(--primary);
    }

    .f-field .toggle-pwd {
        position: absolute;
        right: 14px;
        top: 16px;
        color: #9ca3af;
        cursor: pointer;
        font-size: 1rem;
    }

        .f-field .toggle-pwd:hover {
            color: var(--primary);
        }

    .f-field .err-msg {
        color: #dc2626;
        font-size: .78rem;
        margin-top: 5px;
        display: block;
    }

.form-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    font-size: .85rem;
}

    .form-row-between .form-check-label {
        color: #4b5563;
        font-size: .85rem;
    }

    .form-row-between a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
    }

        .form-row-between a:hover {
            text-decoration: underline;
        }

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    border: none;
    color: #fff;
    padding: 13px;
    border-radius: 9px;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .02em;
    transition: .25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(79,70,229,0.35);
        color: #fff;
    }

    .btn-login .spinner-border {
        width: 16px;
        height: 16px;
        display: none;
    }

    .btn-login.loading .spinner-border {
        display: inline-block;
    }

    .btn-login.loading .btn-text {
        display: none;
    }

.auth-footer-note {
    text-align: center;
    margin-top: 26px;
    font-size: .85rem;
    color: var(--text-muted);
}

.alert-login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 9px;
    padding: 11px 15px;
    font-size: .86rem;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================= RESPONSIVE ================= */
@media (max-width:991px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-left {
        flex: none;
        padding: 36px 30px;
        min-height: 260px;
    }

    .auth-left-mid h1 {
        font-size: 1.6rem;
    }

    .quote-carousel {
        display: none;
    }

    .auth-right {
        padding: 30px 20px;
    }

    .auth-card {
        padding: 36px 26px;
    }
}

@media (max-width:480px) {
    .auth-left {
        min-height: 200px;
        padding: 26px 22px;
    }

    .auth-left-mid h1 {
        font-size: 1.35rem;
    }

    .auth-brand-mark {
        font-size: 1.25rem;
    }
}
