/* ============================================
   CCBIS Modern Login - Fluid Glass Design
   ============================================ */

:root {
    --primary: #4B8BBE;
    --primary-dark: #306998;
    --accent: #ffd700;
    --text-main: #ffffff;
    --text-muted: #b0c4de;
    --glass-bg: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.15);
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-focus: rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #000c19;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    color: var(--text-main);
}

/* ============================================
   Background Animation (Fluid Blobs)
   ============================================ */

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    filter: blur(40px) contrast(140%);
    opacity: 0.8;
    pointer-events: none;
    background: #020024;
    /* Deep dark base */
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    /* Glowing effect */
}

/* Fast moving neon orbs */
.blob-1 {
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(46, 49, 146, 1) 0%, rgba(0, 0, 0, 0) 70%);
    top: -20%;
    left: -20%;
    animation: moveX 4s infinite alternate ease-in-out, pulse 5s infinite alternate;
}

.blob-2 {
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(200, 80, 192, 1) 0%, rgba(0, 0, 0, 0) 70%);
    top: 50%;
    right: -20%;
    animation: moveY 5s infinite alternate ease-in-out, spin 10s infinite linear;
}

.blob-3 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(0, 212, 255, 1) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -20%;
    left: 30%;
    animation: moveDiag 6s infinite alternate ease-in-out;
}

/* Complex high-speed motion paths */
@keyframes moveX {
    0% {
        transform: translateX(-20%) rotate(0deg);
    }

    100% {
        transform: translateX(50%) rotate(45deg);
    }
}

@keyframes moveY {
    0% {
        transform: translateY(-20%) scale(1);
    }

    100% {
        transform: translateY(30%) scale(1.2);
    }
}

@keyframes moveDiag {
    0% {
        transform: translate(-20%, -20%) scale(0.9);
    }

    100% {
        transform: translate(30%, 30%) scale(1.3);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* ============================================
   Auth Card (Glassmorphism)
   ============================================ */

.auth-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 50px;
    /* Reduced from 50px 60px padding */
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Light Shine Effect on Card */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-25deg);
    animation: shine 8s infinite;
}

@keyframes shine {

    0%,
    80% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* ============================================
   Header & Logo
   ============================================ */

.card-header {
    text-align: center;
    margin-bottom: 35px;
    width: 100%;
}

.logo-circle {
    width: 100px;
    height: 100px;
    /* Perfectly square container for logo */
    margin: 0 auto 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Optional: Add a subtle glow behind if desired, but user removed BG */
}

/* Logo Fix Reuse */
.auth-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: lighten;
    /* Removes black box */
    filter: contrast(1.5) brightness(0.9) saturate(1.1);
    -webkit-mask-image: radial-gradient(circle, black 60%, transparent 70%);
    mask-image: radial-gradient(circle, black 60%, transparent 70%);
    transform: scale(1.4);
    /* Make it pop */
}

.card-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
}

/* ============================================
   Form Inputs (Floating Labels)
   ============================================ */

#loginForm {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    padding-top: 24px;
    /* Space for label */
    padding-bottom: 10px;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    background: var(--input-focus);
    border-color: var(--primary);
    outline: none;
}

/* Label Animation */
.input-group label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
    top: 14px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 500;
}

.toggle-password:hover {
    color: white;
}

/* ============================================
   Actions & Buttons
   ============================================ */

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--text-muted);
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.custom-checkbox input:checked~.checkmark {
    background: var(--primary);
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s;
}

.custom-checkbox input:checked~.checkmark::after {
    opacity: 1;
}

.link-forgot {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.link-forgot:hover {
    color: white;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px -5px rgba(75, 139, 190, 0.4);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(75, 139, 190, 0.6);
    filter: brightness(1.1);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ============================================
   Utilities & Footer
   ============================================ */

.copyright {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.message-box {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff868e;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 30px;
        width: 90%;
    }
}