/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(315deg, #9C27B0 0%, #6A1B9A 100%);
    color: white;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 230px;
    background: linear-gradient(350deg, #a35cb1 0%, #7116aa 100%);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    /* border-top-right-radius: 20px; */
    /* border-bottom-right-radius: 20px; */
    animation: slideInLeft 1s ease forwards;
}

.sidebar h2 {
    margin-bottom: 40px;
    font-size: 24px;
    color: #ffffff;
    text-align: center;
    letter-spacing: 1px;
}

.sidebar a {
    color: white;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 18px;
    padding: 10px 15px;
    transition: all 0.3s;
}

.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFD6FF;
    transform: translateX(5px);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Top Navbar */
.topbar {
    width: 100%;
    height: 80px;
    background: linear-gradient(315deg, #bd0fdb 0%, #b09cbd 100%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    /* border-bottom-left-radius: 20px; */
    animation: slideInTop 1s ease forwards;
    margin-top: -24px;
}

.topbar a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    transition: 0.3s;
}

.topbar a:hover {
    color: #FFD6FF;
    transform: scale(1.1);
}

/* Content Area */
.content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 40px;
}

/* Form Box */
.form-box {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 16px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease;
    margin: 20px auto;
}

.form-box h2 {
    margin-bottom: 20px;
    color: white;
}

.form-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    outline: none;
    background-color: rgba(255,255,255,0.2);
    color: white;
    transition: 0.3s;
}

.form-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-box input:focus {
    background-color: rgba(255, 255, 255, 0.3);
}

.form-box button {
    width: 80%;
    padding: 12px;
    background: linear-gradient(135deg, #AB47BC 0%, #7B1FA2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    margin-top: 10px;
    transition: all 0.3s;
}

.form-box button:hover {
    background: linear-gradient(135deg, #7B1FA2 0%, #AB47BC 100%);
    transform: scale(1.05);
}

/* Dashboard Box */
.dashboard-box {
    background-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    width: 250px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transition: transform 0.4s;
    animation: fadeInUp 1s ease;
}

.dashboard-box:hover {
    transform: translateY(-8px);
}

.dashboard-box h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

.dashboard-box p {
    font-size: 18px;
}

/* Popup */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup-content {
    background: white;
    color: black;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.popup-content h2 {
    margin-bottom: 10px;
}

.popup-content button {
    margin-top: 20px;
    padding: 8px 20px;
    border: none;
    background: #7B1FA2;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.popup-content button:hover {
    background-color: #AB47BC;
    transform: scale(1.05);
}

/* Animations */
@keyframes slideInLeft {
    from {transform: translateX(-100%);}
    to {transform: translateX(0);}
}

@keyframes slideInTop {
    from {transform: translateY(-100%);}
    to {transform: translateY(0);}
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

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

.form-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.form-row input {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
}
/* Form Box */
.form-box {
    background-color: #ffffff;  /* White background */
    color: #6A1B9A;             /* Purple text */
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 16px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease;
    margin: 20px auto;
}

.form-box h2 {
    margin-bottom: 20px;
    color: #6A1B9A;  /* Purple heading */
}

.form-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    background-color: rgba(255,255,255,0.9);
    color: black;  /* Purple text in input */
    transition: 0.3s;
}

.form-box input::placeholder {
    color: rgba(106, 27, 154, 0.6);  /* Light purple placeholder */
}

.form-box input:focus {
    background-color: rgba(255, 255, 255, 1);
    border: 1px solid #9C27B0;
}

/* Button remains with purple gradient */
.form-box button {
    width: 80%;
    padding: 12px;
    background: rgb(241, 101, 46);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    margin-top: 10px;
    transition: all 0.3s;
}

.form-box button:hover {
    background: linear-gradient(135deg, #7B1FA2 0%, #AB47BC 100%);
    transform: scale(1.05);
}
.dashboard-box {
    background-color: white;
    color: black;
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    width: 250px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transition: transform 0.4s;
    animation: fadeInUp 1s ease;
}
.dashboard-box:hover {
    transform: translateY(-8px);
}
.dashboard-box h3 {
    color: #6A1B9A;
    margin-bottom: 10px;
}
.dashboard-box p {
    font-size: 20px;
    font-weight: bold;
}

.card.user {
    margin-top: 150px !important;
}


    /* Ensures Select2 fits Bootstrap form */
    .select2-container--default .select2-selection--multiple {
        padding: 0.375rem 0.75rem;
        border-radius: 0.25rem;
        min-height: calc(1.5em + 0.75rem + 2px);
    }

    .select2-container {
        width: 100% !important;
    }

    .select2-dropdown {
        margin-top: -1px !important; 
        z-index: 1051 !important;
    }

    /* Optional: fix spacing inside selected items */
    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        margin-top: 0.25rem;
    }


select.form-select {
    height: 50px;
}

.select2-container--default .select2-selection--multiple {
    height: auto;
    min-height: 38px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 40px;
}

.eye-icon {
    position: absolute;
    right: 10px;
    top: 15%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    color: #007bff;
    user-select: none;
}

i.fas.fa-eye-slash.text-secondary {
    margin-top: 45px;
}

i.fas.fa-eye.text-secondary {
    color: #6c757d !important;
    margin-top: 45px;
}

/* Custom CSS for the registration form */
body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
}

.form-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-width: 700px;
}

.form-control.rounded-pill {
    border-radius: 50rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    height: 48px;
    border: 1px solid #dcdcdc;
    transition: all 0.3s ease;
}

.form-control.rounded-pill:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.form-select.rounded-pill {
    border-radius: 50rem;
    height: 48px;
    border: 1px solid #dcdcdc;
    transition: all 0.3s ease;
}

.form-select.rounded-pill:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.btn-primary.rounded-pill {
    border-radius: 50rem;
    padding: 10px 30px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary.rounded-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
    background-color: #0a58ca;
    border-color: #0a58ca;
}

.password-toggle {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #333;
}

.invalid-feedback {
    font-size: 0.875em;
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* New CSS for mobile scrollability and layout fixes */
@media (max-width: 768px) {
    .form-card {
        padding: 20px !important;
        width: 95%; /* Adjust width for better fit on small screens */
    }
    .form-scrollable-container {
        max-height: 70vh; /* Set a maximum height relative to the viewport height */
        overflow-y: auto; /* Enable vertical scrolling */
        padding-right: 15px; /* Add some space for the scrollbar */
    }
    .btn-primary.rounded-pill {
        width: 100%; /* Make the button full width on mobile */
    }
}

.password-field-wrapper {
    position: relative;
    padding-bottom: 0.1rem;
}

.password-toggle {
    position: absolute;
    right: 25px;
    top: 30%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #333;
}

.form-card.rounded-4.p-3.p-md-5 {
    border-radius: 10px;
}

@media (max-width: 768px) {
    .form-card {
        padding: 20px !important;
        width: 95%;
    }

    .form-scrollable-content {
        max-height: 70vh; 
        overflow-y: auto; 
        padding-right: 15px; 
    }
}


/* General form styling */
.form-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    transition: transform 0.3s ease;
}

/* Input field styling */
.custom-input {
    border: 1px solid #e0e0e0;
    padding-left: 2.5rem; /* Space for the icon */
    padding-right: 1.5rem;
    height: 55px; /* Taller input for better tap area */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Password toggler styling */
.password-toggle {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #333;
}

/* Buttons */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

       .form-card {
            background: #fff;
        }
        .custom-input {
            padding-right: 2.5rem; /* space for eye icon */
        }
        .password-toggle {
            position: absolute;
            top: 25px;
            right: 15px;
            transform: translateY(-50%);
            cursor: pointer;
            color: #6c757d;
        }
        .password-toggle i {
            font-size: 1rem;
        }

.form-card.rounded-4.p-4.p-md-5.shadow-lg {
    border-radius: 10px;
}

       .form-card {
                animation: fadeInUp 0.5s ease;
            }

            .custom-input {
                padding-right: 2.5rem;
            }

            .password-toggle {
                position: absolute;
                right: 1rem;
                top: 50%;
                transform: translateY(-50%);
                cursor: pointer;
                color: #6c757d;
            }

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




