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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #f9fafb, #e0e7ff);
    color: #212529;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.container {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container h1 {
    margin-top: 8%;
}

.container span {
    font-size: 12px;
}

.container a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.container button {
    background-color: #2380d1;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

.container button.hidden {
    background-color: transparent;
    border-color: #fff;
}

.container form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    width: 100%;
}

.container input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in {
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.active .sign-in {
    transform: translateX(100%);
}

.sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}


@keyframes move {
    0%, 49.99% {
        opacity: 0;
        z-index: 1;
    }
    50%, 100% {
        opacity: 1;
        z-index: 5;
    }
}
.toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.container.active .toggle-container {
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.toggle {
    background-color: #2372b8;
    height: 100%;
    background: linear-gradient(to right, #3285bd, #3b82f6);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.container.active .toggle {
    transform: translateX(50%);
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left {
    transform: translateX(-200%);
}

.container.active .toggle-left {
    transform: translateX(0);
}

.toggle-right {
    right: 0;
    transform: translateX(0);
}

.container.active .toggle-right {
    transform: translateX(200%);
}

/* Form Container (moves form downward slightly) */
.form-container.sign-in {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    height: 100%;
    width: 100%;
    padding-top: 0px;
}

/* Form Styling */
.form-container.sign-in form {
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: left;
}






/* Updated Dropdown Styling for Role Selector */
.user-role {
    width: 100%;
    margin: 12px 0;
    padding: 12px 15px;
    background-color: #eee;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    appearance: none; /* removes default browser dropdown arrow */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%233b82f6" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-role:focus {
    background-color: #fff;
    border: 1px solid #2563EB;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    color: #1E3A8A;
}

.user-role option {
    background: #ffffff;
    color: #333;
    font-size: 14px;
}


/* Navbar Section */
nav {
    background: #ffffff;
    padding: 12px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    margin-bottom: 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

nav h2 {
    color: #3b82f6;
    font-weight: 800;
    font-size: 2rem;
    margin-left: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #3b82f6;
    font-weight: 700;
    margin-left: 15px;
    padding: 8px 18px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.nav-links a:hover {
    background-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* Adjustments for better visibility */
body {
    margin-top: 60px;  /* Reduced the margin-top to bring the form closer to the navbar */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar .logo h2 {
        font-size: 1.5rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 20px;
        background-color: #512da8;
        padding: 20px;
        border-radius: 10px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .navbar .hamburger {
        display: block;
        cursor: pointer;
    }
}


/*Error message*/
.flash-messages {
  margin: 20px auto;
  width: 90%;
  max-width: 600px;
  text-align: center;
}

.alert {
  padding: 12px 20px;
  margin-bottom: 15px;
  border-radius: 5px;
  font-weight: 600;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #34d399;
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
}
