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

/* ======================================= */
/* 1. Body & Global Wave Animation         */
/* ======================================= */
body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    overflow: hidden;
    position: relative;
}

    /* Base background wave */
    body::before {
        content: "";
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.3), transparent 70%);
        animation: wave 15s infinite linear;
        z-index: 0;
    }

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ======================================= */
/* 2. Login Column & Local Wave            */
/* ======================================= */
.registration-bg {
    background-color: #f9fafb !important;
    overflow: hidden;
    position: relative;
    z-index: 1; /* Creates the base layer for the login side */
}

/* This wave now works on mobile because it's tied to the login column */
.wave {
    width: 250%;
    height: 250%;
    position: absolute;
    top: -75%;
    left: -75%;
    background: radial-gradient(circle at 50% 50%, rgba(108, 99, 255, 0.15), transparent 65%);
    animation: wave-animation 20s infinite linear;
    z-index: -1; /* Keeps it behind the login card */
    transform-origin: center center;
}

@keyframes wave-animation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.card_2 {
    z-index: 2;
    background-color: white;
    max-width: 450px;
    width: 90%;
    margin: 0 auto;
}

/* ======================================= */
/* 3. Form & Password Width Fixes          */
/* ======================================= */

/* Force MDB wrapper to be full width */
.form-outline {
    width: 100% !important;
}

#password-input {
    padding-right: 45px !important; /* Space for the eye icon */
    width: 100% !important;
}

/* ABSOLUTE POSITIONING: This is the fix for the 100% width regression */
#toggle-password {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border: none !important;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 40px;
}

    #toggle-password:focus {
        outline: none !important;
        box-shadow: none !important;
    }

/* ======================================= */
/* 4. UI Elements & Titles                 */
/* ======================================= */
.title-main {
    font-size: 2.2rem;
    color: #3f51b5;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0 !important;
}

    .title-main::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 70px;
        height: 3px;
        background-color: #ffc107;
        border-radius: 2px;
    }

.title-subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    color: #6c757d;
    margin-top: 10px;
}

.bg-primary {
    background-color: #6c63ff !important;
}

.form-control {
    border-radius: 4px !important;
    border: 1px solid #d1d7e0 !important;
    padding: 10px 15px;
    transition: all 0.2s ease-in-out;
}

    .form-control:focus {
        border-color: #6c63ff;
        box-shadow: 0 0 5px rgba(108,99,255,0.3);
        outline: none;
    }

.btn-primary, .btn-outline-danger, .btn-outline-dark {
    border-radius: 25px;
    padding: 10px;
    font-weight: 600;
}

/* MDB Label adjustments for Autofill */
input:-webkit-autofill ~ label {
    transform: translateY(-1rem) scale(0.8);
    color: blue !important;
}

.form-outline .form-label {
    color: #0d6efd;
}

.form-outline .form-control:focus ~ .form-label,
.form-outline .form-control:not(:placeholder-shown) ~ .form-label {
    color: #6c63ff;
}


/***************************/

/* login.css */

/* Make the link look more like a professional button-link */
.text-primary.small {
    transition: color 0.2s ease-in-out;
}

    .text-primary.small:hover {
        color: #2c3e50 !important; /* Darker shade on hover */
        text-decoration: underline !important;
    }

/* Ensure the layout doesn't break on very small screens */
@media (max-width: 380px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
}

/* Modernize the primary button to match the earlier style */
.btn-primary {
    box-shadow: 0 4px 6px rgba(18, 102, 241, 0.2);
    text-transform: none; /* Material Design often uses uppercase, this makes it modern */
    letter-spacing: 0.3px;
}

.hidden
{
    display:none !important;
}


/* Force the label to stay up if the input has a value or is focused */
.form-outline .form-control.active ~ .form-label,
.form-outline .form-control:focus ~ .form-label,
.form-outline .form-control:not(:placeholder-shown) ~ .form-label {
    transform: translateY(-1rem) scale(0.8) !important;
    background: white; /* Prevents line from cutting through text */
    padding: 0 5px;
}