:root {
    --color-primary-black: #111111;
    --color-lime-green: #b6ff4a;
    --color-bg-gradient-start: #f3ffe1;
    --color-bg-gradient-end: #d4f3ad;
    --color-white: #ffffff;
    --font-main: 'Montserrat', sans-serif;
    --color-mint: #7ed957;
    --color-gray: #a3a3a3;
    --color-login-button: #ee5634;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background: radial-gradient(
        ellipse at 30% 20%,
        #fff 40%,
        var(--color-bg-gradient-start) 70%,
        var(--color-bg-gradient-end) 100%
    );
    color: var(--color-primary-black);
    min-height: 100vh;
}

/* Navigation Styles */
header {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    z-index: 10;
    padding: 1rem 2rem;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-primary-black);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--color-login-button);
}

/* Login Layout */
.login-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.login-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.login-form-container {
    background-color: var(--color-primary-black);
    width: 56%;
    min-width: 420px;
    max-width: 700px;
    padding: 2rem 2rem;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.login-header-top {
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-white);
}

.green {
    color: var(--color-lime-green);
}

.welcome-text {
    font-size: 1.6rem;
    margin: 0.5rem 0 2rem 0;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.form-group {
    position: relative;
}

.login-input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1.15rem;
    font-weight: 500;
    box-sizing: border-box;
    background-color: var(--color-white);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-button {
    background-color: var(--color-login-button);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    padding: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: lowercase;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 3rem;
}

.login-button:hover {
    background-color: #f26a4b;
}

.login-link-button {
    display: block;
    text-align: center;
    text-decoration: none;
}


.forgot-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--color-gray);
    font-weight: 500;
}

.forgot-link {
    color: #2eb086;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider-line {
    flex-grow: 1;
    height: 1px;
    background-color: #333;
}

.divider-text {
    padding: 0 1rem;
    color: var(--color-gray);
    font-size: 1rem;
    font-weight: 500;
}

.register-button {
    background-color: var(--color-white);
    color: var(--color-primary-black);
    border-radius: 4px;
    padding: 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
    margin-top: 3rem;
}


.register-button:hover {
    background-color: #ddd;
}

.login-illustration {
    flex-grow: 1;
    background: radial-gradient(
        ellipse at 30% 20%,
        #fff 40%,
        var(--color-bg-gradient-start) 70%,
        var(--color-bg-gradient-end) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-illustration img {
    max-width: 80%;
    max-height: 70%;
    display: block;
    margin: 0 auto;
}

/* Progressive Image Loading with Blur Effect */
.login-illustration img {
    filter: blur(10px);
    transition: filter 0.5s ease-out, opacity 0.5s ease-out;
    opacity: 0.8;
}

.login-illustration img.loaded {
    filter: blur(0);
    opacity: 1;
}

/* Responsive blur effects for different screen sizes */
@media (max-width: 768px) {
    .login-illustration img {
        filter: blur(8px);
        transition: filter 0.4s ease-out, opacity 0.4s ease-out;
    }
}

@media (max-width: 480px) {
    .login-illustration img {
        filter: blur(6px);
        transition: filter 0.3s ease-out, opacity 0.3s ease-out;
    }
}

/* Notification Styles */
/* Compact Toast Notification Style */
.notification-container {
    position: fixed;
    top: 18px;
    right: 18px;
    left: auto;
    width: auto;
    max-width: 320px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}
.notification {
    min-width: 160px;
    max-width: 320px;
    padding: 8px 16px;
    font-size: 14.5px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    margin-bottom: 6px;
    pointer-events: auto;
    opacity: 0.98;
    background: #fff;
    color: #222;
    transition: transform 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    font-family: var(--font-main);
    font-weight: 500;
    position: relative;
    animation: fadeIn 0.3s;
}
.notification-success {
    border-left: 6px solid var(--color-lime-green);
}
.notification-error {
    border-left: 6px solid var(--color-error);
}
.notification-info {
    border-left: 6px solid var(--color-info);
}
.notification-content {
    display: flex;
    align-items: center;
    width: 100%;
}
.notification-content i {
    margin-right: 12px;
    font-size: 1.3rem;
}
.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.1rem;
    margin-left: auto;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.close-btn:hover {
    background: #f3f3f3;
    color: #222;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .notification-container {
        top: 8px;
        right: 8px;
        left: 8px;
        max-width: 98vw;
    }
    .notification {
        min-width: 0;
        max-width: 98vw;
        font-size: 13.5px;
        padding: 7px 8px;
    }
}

/* Floating Popup for Session Expired */
.floating-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 24px 28px;
    z-index: 9999;
    max-width: 320px;
    width: 90%;
    text-align: center;
    animation: popupFloat 0.4s ease-out;
    border: 1px solid #e0e0e0;
}

.floating-popup h3 {
    margin: 0 0 12px 0;
    color: #d32f2f;
    font-size: 18px;
    font-weight: 600;
}

.floating-popup p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

@keyframes popupFloat {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.floating-popup.fade-out {
    animation: popupFadeOut 0.3s ease-in forwards;
}

@keyframes popupFadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@media (max-width: 600px) {
    .floating-popup {
        max-width: 280px;
        padding: 16px 20px;
    }
    .floating-popup h3 {
        font-size: 16px;
    }
    .floating-popup p {
        font-size: 13px;
    }
}

/* Responsive adjustments for form container width */
@media (max-width: 768px) {
    .login-form-container {
        width: 100%;
        max-width: none; /* Remove max-width on small screens */
    }
}

/* Mobile S */
@media (max-width: 320px) {
    .login-container {
        flex-direction: column;
        height: 100vh;
        align-items: center;
        justify-content: flex-start;
    }
    .login-form-container {
        width: 100vw;
        min-width: 0;
        max-width: 340px;
        height: auto;
        min-height: 100vh;
        margin: 0 auto;
        padding: 2.2rem 0.7rem 1.2rem 0.7rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow-y: auto;
        box-sizing: border-box;
    }
    .login-header-top {
        margin-bottom: 1.2rem;
        width: 100%;
        text-align: center;
    }
    .login-logo {
        font-size: 1.2rem;
    }
    .welcome-text {
        font-size: 1rem;
    }
    .login-form {
        gap: 0.7rem;
        width: 100%;
    }
    .login-input, .login-button, .register-button {
        font-size: 1rem;
        padding: 0.7rem;
    }
    .register-button, .login-button {
        width: 100%;
    }
    .register-button {
        width: 90%;
        max-width: 260px;
        margin: 2rem auto 0 auto;
        display: block;
    }
    .login-illustration {
        display: none !important;
    }
}
/* Mobile M */
@media (min-width: 321px) and (max-width: 375px) {
    .login-container {
        flex-direction: column;
        height: 100vh;
        align-items: center;
        justify-content: flex-start;
    }
    .login-form-container {
        width: 100vw;
        min-width: 0;
        max-width: 370px;
        height: auto;
        min-height: 100vh;
        margin: 0 auto;
        padding: 2.5rem 1rem 1.5rem 1rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow-y: auto;
        box-sizing: border-box;
    }
    .login-header-top {
        margin-bottom: 1.3rem;
        width: 100%;
        text-align: center;
    }
    .login-logo {
        font-size: 1.3rem;
    }
    .welcome-text {
        font-size: 1.1rem;
    }
    .login-form {
        gap: 0.9rem;
        width: 100%;
    }
    .login-input, .login-button, .register-button {
        font-size: 1.08rem;
        padding: 0.8rem;
    }
    .register-button, .login-button {
        width: 100%;
    }
    .register-button {
        width: 90%;
        max-width: 280px;
        margin: 2rem auto 0 auto;
        display: block;
    }
    .login-illustration {
        display: none !important;
    }
}
/* Mobile L */
@media (min-width: 376px) and (max-width: 425px) {
    .login-container {
        flex-direction: column;
        height: 100vh;
        align-items: center;
        justify-content: flex-start;
    }
    .login-form-container {
        width: 100vw;
        min-width: 0;
        max-width: 410px;
        height: auto;
        min-height: 100vh;
        margin: 0 auto;
        padding: 3rem 1.2rem 2rem 1.2rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow-y: auto;
        box-sizing: border-box;
    }
    .login-header-top {
        margin-bottom: 1.5rem;
        width: 100%;
        text-align: center;
    }
    .login-logo {
        font-size: 1.5rem;
    }
    .welcome-text {
        font-size: 1.2rem;
    }
    .login-form {
        gap: 1.1rem;
        width: 100%;
    }
    .login-input, .login-button, .register-button {
        font-size: 1.12rem;
        padding: 0.9rem;
    }
    .register-button, .login-button {
        width: 100%;
    }
    .register-button {
        width: 90%;
        max-width: 320px;
        margin: 2rem auto 0 auto;
        display: block;
    }
    .login-illustration {
        display: none !important;
    }
}
/* Tablet */
@media (min-width: 426px) and (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: 100vh;
        align-items: center;
        justify-content: center;
    }
    .login-form-container {
        width: 100vw;
        min-width: 0;
        max-width: 520px;
        height: auto;
        min-height: 100vh;
        margin: 0 auto;
        padding: 3.5rem 2rem 2.5rem 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow-y: auto;
        box-sizing: border-box;
    }
    .login-header-top {
        margin-bottom: 2rem;
        width: 100%;
        text-align: center;
    }
    .login-logo {
        font-size: 1.7rem;
    }
    .welcome-text {
        font-size: 1.3rem;
    }
    .login-form {
        gap: 1.2rem;
        width: 100%;
    }
    .login-input, .login-button, .register-button {
        font-size: 1.15rem;
        padding: 1rem;
    }
    .register-button, .login-button {
        width: 100%;
    }
    .login-illustration {
        display: none !important;
    }
}
/* Laptop */
@media (min-width: 769px) and (max-width: 1024px) {
    .login-form-container {
        width: 60%;
        min-width: 420px;
        max-width: 600px;
        padding: 3.5rem 2.5rem 2.5rem 2.5rem;
    }
    .login-header-top {
        margin-bottom: 2.2rem;
    }
    .login-logo {
        font-size: 2rem;
    }
    .welcome-text {
        font-size: 1.4rem;
    }
}
/* & Above */
@media (min-width: 1025px) {
    .login-form-container {
        width: 56%;
        min-width: 420px;
        max-width: 700px;
        padding: 2rem 2rem;
    }
}

@media (min-width: 426px) {
  .login-form-container {
    max-width: 420px;
    min-width: 0;
    margin: 0 auto;
  }
}

@media (max-width: 425px) {
  .login-form-container {
    max-width: 98vw;
    min-width: 0;
    margin: 0 auto;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
  .login-form {
    width: 100%;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
  .login-input {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}