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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #cccccc, #ffffff);
            min-height: 100vh;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
            /* overflow-x: hidden; allow vertical scroll but prevent horizontal overflow */
            display: flex;     /* remove flex here */
            /* padding: 40px 0;  */
        }

        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="60" cy="60" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
            animation: float 20s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(180deg); }
        }

        .login-container {
            background: white;
            border-radius: 20px;
            height: 20%;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
            width: 100%;
            max-width: 900px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            position: relative;
            z-index: 2;
            animation: slideInUp 0.8s ease-out;
            scroll-behavior: smooth;
            
        }

        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .login-left .logo {
            display: inline-block;
            text-decoration: none;
            padding: 5px;
            margin-bottom: 10px;
            transition: transform 0.2s ease;
}

/* Optional hover effect */
        .login-left .logo:hover {
            transform: scale(1.05);
        }

/* Style the logo image */
        .login-left .logo img {
            height: 400px;     /* adjust as needed */
            width: auto;      /* maintain aspect ratio */
            object-fit: contain;
            vertical-align: middle;
            border-radius: 8px; /* optional rounded corners */
}

        .login-left {
          background: linear-gradient(135deg, #711c77 0%, #8e44ad 50%, #a21878 100%);

            color: white;
            padding: 3rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .login-left::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="30" cy="30" r="4" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="70" r="3" fill="rgba(255,255,255,0.1)"/></svg>');
            animation: float 15s ease-in-out infinite reverse;
        }

        .login-left h1 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            position: relative;
            z-index: 2;
        }

        .login-left p {
            font-size: 1.1rem;
            opacity: 0.9;
            line-height: 1.6;
            position: relative;
            z-index: 2;
        }

        .login-icon {
            font-size: 4rem;
            margin-bottom: 2rem;
            animation: bounce 2s ease-in-out infinite;
            position: relative;
            z-index: 2;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

        .login-right {
            padding: 3rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .login-right .logo{
          display: none;
        }

        .login-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .login-header h2 {
            font-size: 2rem;
            color: #333;
            margin-bottom: 0.5rem;
        }

        .login-header p {
            color: #666;
            font-size: 1rem;
        }

        .login-form {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .form-group {
            position: relative;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: #333;
            font-weight: 500;
        }

        .form-group input {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 1rem;
            transition: all 0.3s ease;
            background: #f8f9fa;
        }

        .form-group input:focus {
            outline: none;
            border-color: "#9b59b6";
            background: white;
            box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
        }

        .form-group i {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #999;
            margin-top: 12px;
        }
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  padding-right: 40px; /* space for the eye icon */
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 10px;
  cursor: pointer;
  color: #888;
}


        .form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 1rem 0;
        }

        .remember-me {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .remember-me input[type="checkbox"] {
            width: auto;
            margin: 0;
        }

        .forgot-password {
            color: #a21878 ;

            text-decoration: none;
            font-size: 0.9rem;
            transition: color 0.3s ease;
            cursor: pointer;
        }

        .forgot-password:hover {
            color: #a21878 ;
            text-decoration: underline;
        }

        .login-btn {
background: linear-gradient(135deg, #711c77 50%, #a21878 100%);
            color: white;
            border: none;
            padding: 15px;
            border-radius: 10px;
            font-size: 1.1rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .login-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            transition: left 0.5s ease;
        }

        .login-btn:hover::before {
            left: 100%;
        }

        .login-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(255, 107, 53, 0.4);
        }

        .login-btn:active {
            transform: translateY(0);
        }

        .signup-link {
            text-align: center;
            margin-top: 2rem;
            color: #666;
        }

        .signup-link a {
            color: #711c77;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .signup-link a:hover {
            color: #711c77;
            text-decoration: underline;
        }

        .back-home {
            position: absolute;
            top: 20px;
            left: 20px;
            color: #711c77;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 500;
            transition: all 0.3s ease;
            z-index: 10;
        }

        .back-home:hover {
            transform: translateX(-5px);
        }

        .loading {
            display: none;
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
            margin-right: 10px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .error-message, .success-message {
            padding: 10px 15px;
            border-radius: 8px;
            margin-bottom: 1rem;
            display: none;
        }

        .error-message {
            background: #ffebee;
            color: #c62828;
            border-left: 4px solid #c62828;
        }

        .success-message {
            background: #e8f5e8;
            color: #2e7d32;
            border-left: 4px solid #2e7d32;
        }

        .form-group.error input {
            border-color: #c62828;
            background: #ffebee;
        }

        .form-group.success input {
            border-color: #2e7d32;
            background: #e8f5e8;
        }

        .validation-message {
            font-size: 0.8rem;
            margin-top: 0.5rem;
            display: none;
        }

        .validation-message.error {
            color: #c62828;
            display: block;
        }

        .validation-message.success {
            color: #2e7d32;
            display: block;
        }

        .hidden {
            display: none !important;
        }

        @media (max-width: 768px) {
            html, body {
                height: auto;
                min-height: 100%;
                overflow-x: hidden ; /* allow vertical scroll */
                display: block;   /* override flex on body */
                scroll-behavior: smooth;
              }
            
              body {
                padding: 0px;
              }
            .login-container {
              display: block;
              grid-template-columns: 1fr;
              max-width: 95%;
              margin: 20px;
              box-shadow: 0 10px 30px rgba(0,0,0,0.2);
              animation: none;
            }
          
            .login-left {
              
              padding: 2rem;
              order: 1; /* Show the form first on mobile */

            }
          
            .login-right {
              padding: 2rem;
              order: 2;
              /* display: none; */
            }
            
          
            .login-left h1 {
              font-size: 2rem;
              display: none;
            }
          
            .login-left p,
            .login-header p {
              font-size: 0.95rem;
            }
          
            .login-icon {
              font-size: 3rem;
            }
          
            .login-btn {
              font-size: 1rem;
              padding: 12px;
            }
          
            .form-group input {
              padding: 12px 16px;
            }
          
            .signup-link {
              margin-top: 1.5rem;
            }
          
            .back-home{
              display: none;
          }
        }
          
        /* @media (max-width: 480px) {
            html, body {
                height: auto;
                min-height: 100%;
                overflow-y: auto; 
                display: block;   
                scroll-behavior: smooth;
              }
            body {
                padding: 20px;
            }

            .login-container {
                animation: none;
              }
            .login-left h1 {
              margin-bottom: 1rem;
              font-size: 1.5rem;
            }
          
            .login-header h2 {
              font-size: 1.5rem;
            }
          
            .login-left,
            .login-right {
              padding: 1.5rem;
            }
          
            .form-options {
              flex-direction: column;
              align-items: flex-start;
              gap: 0.8rem;
            }
          
            .login-btn {
              width: 100%;
            }
          
            .password-toggle {
              right: 8px;
            }
        } */

        @media (max-width: 480px) {
            html, body {

              /* height: px; */
              /* min-height: 10%; */
              margin: 0;
              padding: 0;
              overflow-x: hidden;
              /* scroll-behavior: smooth; */
              padding: 0;
              margin: 0;
            }
          
            body {
              /* padding: 20px; */
              display: block; /* Avoid flex on mobile to allow scrolling */
              background: linear-gradient(135deg, #cccccc, #ffffff);
            }
          
            .login-container {
              padding: 0;
              margin: 0;
              /* margin-top: px; */
              display: block;
              /* justify-content: center;
              align-items: center; */
              width: 100vw;
              /* max-width: 100%; */
              /* max-height: 100%; */
              margin: 0 auto;
              box-shadow: none;
              border-radius: 10px;
              animation: none;
              
            }
          
            .login-left,
            .login-right {
              height: auto;
              /* padding: 1rem; */
              width: 100%;
            }
            .login-header .logo {
              display: block;
              margin: 0 auto 5px;
            }
          
            .login-header .logo img {
              height: 150px;     /* slightly smaller on mobile */
              max-width: 100%;   /* prevent overflow */
            }

            input::placeholder {
                font-size: 0.8rem;
                color: #888;
                opacity: 1; /* ensures it's visible on all browsers */
              }
            .forgot-password{
                margin-top: 1rem;
                gap: 1rem;
            }
          
            .login-left {
              order: 2;
              display: none;
            }
          
            .login-right {
              order: 1;
              /* padding: rem ; */
              
            }
          
            .login-left h1 {
              font-size: 1.5rem;
              margin-bottom: 1rem;
            }
          
            .login-header h2 {
              font-size: 1.5rem;
            }
            .back-home{
                display: none;
            }
          
            .form-options {
              flex-direction: column;
              align-items: flex-start;
          }
          
        }

