body{
    overflow: hidden;
}

.main-login {
    background: linear-gradient(
        135deg, /* Top-left to bottom-right */
        rgba(190, 4, 4, 0.65) 65%,    /* #BE0404 with 65% opacity */
        rgba(150, 1, 1, 0.75) 75%,    /* #960101 with 75% opacity */
        rgba(189, 0, 0, 0.85) 85%,    /* #BD0000 with 85% opacity */
        rgba(128, 0, 0, 0.95) 95%     /* #800000 with 95% opacity */
    ), url("../images/calendar-banner.jpg") center/cover no-repeat;
    height: 100vh;
    display: flex;
}

.login-con{
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    flex: 1;
}

.left-panel {
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60%;
}

.left-panel img {
    width: 300px;
}

.left-panel div{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.left-panel div h1 {
    font-size: 72px;
    line-height: 45px;
    font-weight: bold;
}

.left-panel div p{
    font-size: 24px;
}

.right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}

.login-box {
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 5px 5px rgba(0,5,5,0.25);
    border-radius: 5px;
}

.login-form .login-container{
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-box .login-form .login-container p{
    font-size: 14px;
}

.login-form div h3 {
    color: #800000;
    text-align: left;
}

.login-form div .field-container{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form div .field-container input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 20px; /* space for the icon */
}

.toggle-password {
    position: absolute;
    right: 20px;
    cursor: pointer;
    color: rgb(0, 0, 0, 0.5);
    font-size: 13px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.toggle-password:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.login-form div .field-container .group-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.forgot-link {
    display: block;
    text-align: right;
    color: #800000;
    font-size: 14px;
    font-weight: normal;
}

.forgot-link:hover {
    text-decoration: underline;
}

.login-form div button {
    width: 100%;
    padding: 10px;
    background-color: #800000;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: ease-in-out 0.3s;
}

.login-form div button:hover {
    background-color: #6a0101;
}

.login-form div #link{
    font-size: 14px;
    text-align: center;
}
.login-form div a:hover {
    text-decoration: underline;
}

.login-form div a {
    color: #800000;
    text-decoration: none;
    font-weight: normal;
}

.error {
    text-align: center;
    color: red;
    font-size: 14px;
}

.success {
    color: green;
    font-size: 14px;
    margin-bottom: 10px;
}

.field-hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
    display: block;
    text-align: left;
}

.field-error {
    color: #FF0000;
    font-size: 12px;
    display: block;
}

input[required] {
    border-color: #FF0000;
}

input.valid {
    border-color: #008000;
}

.success-modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.success-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    animation: popUp 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

.success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    background: linear-gradient(135deg, #D32F2F, #E57373);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.3);
}

.success-title {
    margin: 0 0 12px;
    font-size: 1.7rem;
    font-weight: 700;
    color: #800000;
}

.success-message {
    margin: 0 0 24px;
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
}

.success-button {
    min-width: 110px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    background: #D32F2F;
    color: white;
    transition: all 0.3s ease;
}

.success-button:hover {
    background: #C62828;
    box-shadow: 0 6px 12px rgba(198, 40, 40, 0.3);
}

/* --- Medium screens (tablets, 768px and below) --- */
@media (max-width: 1024px) {
    .main-login {
        flex-direction: column;
        justify-content: center;
        padding: 40px 20px;
        height: auto;
    }

    .left-panel, .right-panel {
        width: 100%;
        text-align: center;
    }

    .left-panel {
        flex-direction: column;
        margin-bottom: 30px;
    }

    .left-panel img {
        width: 200px;
    }

    .left-panel div h1 {
        font-size: 50px;
    }

    .left-panel div p {
        font-size: 20px;
    }

    .login-box {
        max-width: 400px;
        width: 90%;
    }
}

/* --- Small screens (mobile, 600px and below) --- */
@media (max-width: 600px) {
    body {
        overflow-y: auto;
    }

    .main-login {
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px;
        height: 60vh;
    }

    .left-panel {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 20px;
        width: 100%;
    }

    .left-panel img {
        width: 150px;
        margin-bottom: 10px;
    }

    .left-panel div h1 {
        font-size: 36px;
    }

    .left-panel div p {
        font-size: 16px;
    }

    .right-panel {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .login-box {
        width: 100%;
        max-width: 350px;
        padding: 20px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

    .login-form div h3 {
        text-align: center;
        font-size: 24px;
    }

    .login-form div button {
        font-size: 15px;
        padding: 10px;
    }

    .forgot-link {
        font-size: 13px;
    }

    #signup-link p {
        font-size: 13px;
    }
}

/* --- Very large screens (above 1600px) --- */
@media (min-width: 1600px) {
    .left-panel img {
        width: 400px;
    }

    .left-panel div h1 {
        font-size: 90px;
    }

    .left-panel div p {
        font-size: 28px;
    }

    .login-box {
        max-width: 500px;
        padding: 40px;
    }
}

/* Animations */
.main-login { animation: gradientShift 20s ease infinite; }
.error      { animation: shake 0.5s ease-in-out; }

.field-error.shake {
    animation: shakeOnce 0.5s ease-in-out;
    animation-iteration-count: 1;
}

.login-con.animate .login-con        { animation: fadeInUp    1s   ease-out 0.3s both; }
.login-con.animate .login-box        { animation: fadeInUp 0.9s ease-out 0.3s both; }

.login-con.has-error .login-con,
.login-con.has-error .login-box { animation: none !important; }
