@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&display=swap');

:root {
    --navy:        #1B2B6B;
    --navy-deep:   #111E50;
    --blue:        #3B6FE8;
    --blue-light:  #5585F0;
    --blue-glow:   rgba(59, 111, 232, 0.18);
    --blue-subtle: #EEF3FD;

    --white:       #ffffff;
    --text-main:   #0F172A;
    --text-sub:    #475569;
    --text-muted:  #94A3B8;
    --border:      #E2E8F0;
    --border-hover:#CBD5E1;
    --border-focus:#3B6FE8;
    --bg-light:    #F8FAFC;

    --radius-sm:   6px;
    --radius:      10px;
    --radius-lg:   16px;

    --shadow-sm:   0 1px 3px rgba(0,0,0,0.06);
    --shadow-md:   0 4px 20px rgba(27, 43, 107, 0.08);
    --shadow-lg:   0 12px 40px rgba(27, 43, 107, 0.1);
    --shadow-btn:  0 4px 16px rgba(59, 111, 232, 0.35);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background: var(--white);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
    padding: 4rem;
    overflow: hidden;
    position: relative;
}

.glow-blob {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.14;
    z-index: 0;
    pointer-events: none;
}

.blob-1 {
    background: var(--blue);
    top: -50px;
    left: -50px;
}

.blob-2 {
    background: var(--navy);
    bottom: -50px;
    right: 50px;
}

.form-wrapper {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    position: relative;
    z-index: 1;
}

.form-logo {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
}

.form-logo img {
    height: 38px;
    width: auto;
    margin-bottom: 0.25rem;
    transition: transform 0.3s ease;
}

.form-logo img:hover {
    transform: scale(1.02);
}

.form-header {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-header h2 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.form-header p {
    font-size: 0.9rem;
    color: var(--text-sub);
    font-weight: 400;
}

.alert-container {
    background: #FFF1F1;
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-message {
    color: #B91C1C;
    font-size: 0.85rem;
    font-weight: 500;
}

.login-form {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.01em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.95rem;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.25s ease;
    flex-shrink: 0;
}

.input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-light);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    font-weight: 400;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-wrapper input:hover {
    border-color: var(--border-hover);
}

.input-wrapper input:focus {
    background: var(--white);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.input-wrapper input:focus ~ .input-icon {
    color: var(--blue);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
}

.btn-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 22px rgba(59, 111, 232, 0.45);
}

.btn-submit:active {
    transform: translateY(1.5px);
}

.btn-icon {
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.btn-submit:hover .btn-icon {
    transform: translateX(4px);
}

.form-footer {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.brand-panel {
    flex: 1.25;
    background: var(--white);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-illustration {
    position: absolute;
    width: 82%;
    height: 82%;
    background-image: url("../images/fsm_color_illustration.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    animation: float-illustration 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes float-illustration {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.brand-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 111, 232, 0.22) 0%, rgba(59, 111, 232, 0) 70%);
    mix-blend-mode: multiply;
}

.p-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 20%;
    animation: float-slow 14s ease-in-out infinite;
}

.p-2 {
    width: 90px;
    height: 90px;
    bottom: 20%;
    right: 25%;
    animation: float-medium 10s ease-in-out infinite;
}

.p-3 {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 65%;
    animation: float-slow-reverse 17s ease-in-out infinite;
}

.p-4 {
    width: 40px;
    height: 40px;
    top: 25%;
    right: 15%;
    background: radial-gradient(circle, rgba(27, 43, 107, 0.18) 0%, rgba(27, 43, 107, 0) 70%);
    animation: float-fast 8s ease-in-out infinite;
}

.p-5 {
    width: 80px;
    height: 80px;
    bottom: 15%;
    left: 10%;
    animation: float-medium-reverse 12s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-20px) scale(1.08); opacity: 0.8; }
}

@keyframes float-slow-reverse {
    0%, 100% { transform: translate(0, 0) scale(1.08); opacity: 0.7; }
    50% { transform: translate(12px, 15px) scale(0.92); opacity: 0.4; }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-15px) scale(1.1); opacity: 0.9; }
}

@keyframes float-medium-reverse {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(-10px, -12px) scale(0.92); opacity: 0.7; }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-8px); opacity: 0.7; }
}

@media (max-width: 1024px) {
    .brand-panel {
        display: none;
    }

    .form-panel {
        flex: 1;
        padding: 2rem 1.5rem;
        background: var(--white);
    }

    .form-wrapper {
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }
}

/* Background Bubble Decoration */
.login-bg-decorations {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.decor-bubble {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(59, 111, 232, 0.18);
    background: radial-gradient(circle, rgba(59, 111, 232, 0.08) 0%, rgba(59, 111, 232, 0.01) 75%);
    pointer-events: none;
}

.bubble-1 {
    width: 180px;
    height: 180px;
    top: -40px;
    left: 8%;
    animation: bubble-sway 18s ease-in-out infinite;
}

.bubble-2 {
    width: 120px;
    height: 120px;
    bottom: 8%;
    left: 5%;
    border-color: rgba(27, 43, 107, 0.16);
    background: radial-gradient(circle, rgba(27, 43, 107, 0.06) 0%, rgba(27, 43, 107, 0.01) 75%);
    animation: bubble-sway-reverse 14s ease-in-out infinite;
}

.bubble-3 {
    width: 260px;
    height: 260px;
    top: 35%;
    left: 32%;
    animation: bubble-float-large 25s ease-in-out infinite;
}

.bubble-4 {
    width: 95px;
    height: 95px;
    top: 12%;
    right: 42%;
    animation: bubble-sway 12s ease-in-out infinite;
}

.bubble-5 {
    width: 140px;
    height: 140px;
    bottom: 12%;
    right: 38%;
    border-color: rgba(27, 43, 107, 0.15);
    background: radial-gradient(circle, rgba(27, 43, 107, 0.05) 0%, rgba(27, 43, 107, 0.01) 75%);
    animation: bubble-sway-reverse 16s ease-in-out infinite;
}

.bubble-6 {
    width: 70px;
    height: 70px;
    top: 55%;
    left: 6%;
    animation: bubble-sway 10s ease-in-out infinite;
}

@keyframes bubble-sway {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(15px, -25px) scale(1.05);
    }
}

@keyframes bubble-sway-reverse {
    0%, 100% {
        transform: translate(0, 0) scale(1.05);
    }
    50% {
        transform: translate(-15px, 20px) scale(0.95);
    }
}

@keyframes bubble-float-large {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(25px, -35px) scale(1.08);
    }
}
