/* login.css  */

:root {
    /* Light Green Theme - Slightly Darker */
    --primary-green: #22c55e;        /* Brighter green */
    --green-medium: #16a34a;         /* Medium green */
    --green-dark: #15803d;           /* Dark green */
    --green-light: #4ade80;          /* Light green */
    --green-lighter: #86efac;        /* Lighter green */
    --green-lightest: #bbf7d0;       /* Lightest green */
    
    /* Background Colors */
    --bg-primary: #f0fdf4;           /* Light green background */
    --bg-secondary: #ffffff;         /* White background */
    --bg-card: var(--bg-primary);    /* Card background - defined to match page background */
    --bg-input: #f8fafc;             /* Input background */
    
    /* Text Colors */
    --text-primary: #1f2937;         /* Dark text */
    --text-secondary: #4b5563;       /* Medium text */
    --text-light: #6b7280;           /* Light text */
    --text-white: #ffffff;           /* White text */
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-green) 0%, var(--green-medium) 100%);
    --gradient-light: linear-gradient(135deg, var(--green-light) 0%, var(--primary-green) 100%);
    
    /* Borders & Shadows */
    --border-light: #d1fae5;         /* Light green border */
    --border-medium: #a7f3d0;        /* Medium green border */
    --border-primary: var(--primary-green);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(22, 163, 74, 0.1);
    --shadow-lg: 0 10px 25px rgba(22, 163, 74, 0.15);
    --shadow-xl: 0 20px 40px rgba(22, 163, 74, 0.2);
    --shadow-primary: 0 8px 25px rgba(34, 197, 94, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Main Container */
.login-screen {
    min-height: 100vh;
    background: 
        radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(134, 239, 172, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Elements */
.login-screen::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--green-lighter) 0%, transparent 70%);
    top: -250px;
    right: -150px;
    opacity: 0.4;
    animation: float 25s infinite linear;
}

.login-screen::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--green-light) 0%, transparent 70%);
    bottom: -200px;
    left: -100px;
    opacity: 0.3;
    animation: float 20s infinite linear reverse;
}

@keyframes float {
    0% {
        transform: rotate(0deg) translate(0, 0);
    }
    100% {
        transform: rotate(360deg) translate(60px, 60px);
    }
}

/* Login Box Container */
.login-box {
    width: 1100px;
    min-height: 600px;
    background: var(--bg-card);
    border-radius: 24px;
    display: flex;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
    animation: slideIn 0.6s ease-out;
    border: 1px solid var(--border-light);
}

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

/* Left Side - Image Container with Curved Corners */
.img-box {
    flex: 1;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    position: relative;
    overflow: hidden;
    border-radius: 20px 0 0 20px; /* Curved left corners */
}

/* Decorative Pattern */
.img-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 2px, transparent 3px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 2px, transparent 3px);
    background-size: 80px 80px;
    animation: patternMove 20s linear infinite;
    border-radius: 20px 0 0 20px; /* Match image container curve */
}

@keyframes patternMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 80px 80px;
    }
}

.login-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.2));
    animation: gentleFloat 5s ease-in-out infinite;
    position: relative;
    z-index: 1;
    border-radius: 12px; /* Curved corners for the image itself */
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Right Side - Form Container with background color matching page */
.login-form {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--bg-card); /* Form container matches page background */
    border-radius: 0 20px 20px 0; /* Curved right corners */
}

/* Welcome Header */
.login-form::before {
    content: 'WELCOME BACK';
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    opacity: 0.9;
}

/* Main Heading */
.login-form h2 {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--green-medium), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.login-form > p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 400px;
}

/* Form Inputs */
.form-input {
    width: 100%;
    height: 54px;
    padding: 0 50px 0 20px;
    background: var(--bg-input);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    margin-bottom: 20px;
}

/* Input Icons */
.form-input[type="text"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
}

.form-input[type="password"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
}

.form-input:hover {
    border-color: var(--border-medium);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.form-input:focus {
    border-color: var(--primary-green);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

/* Floating Labels */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group label {
    position: absolute;
    left: 20px;
    top: 17px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--bg-input);
    padding: 0 8px;
    z-index: 1;
}

.form-input:focus + label,
.form-input:not(:placeholder-shown) + label {
    top: -10px;
    left: 16px;
    font-size: 12px;
    color: var(--primary-green);
    font-weight: 600;
    background: var(--bg-card);
    z-index: 2;
}

/* Button Container - FIXED */
.btn-box {
    display: flex;
    gap: 15px;
    margin-top: 35px;
    width: 100%;
}

/* Buttons - Both with Same Style */
.btn {
    flex: 1;
    height: 54px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

/* Ripple Effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

/* Login Button */
.btn-success {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.btn-success:hover {
    background: var(--gradient-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.4);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

/* Register Button - SAME STYLE AS LOGIN BUTTON */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: var(--gradient-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

/* Button Icons */
.btn i {
    font-size: 18px;
}

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 6px;
}

.forgot-password a:hover {
    color: var(--primary-green);
    background: rgba(34, 197, 94, 0.05);
    text-decoration: none;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--text-light);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}

.divider span {
    padding: 0 15px;
    background: var(--bg-card);
    font-weight: 500;
}

/* Alternative Options */
.alternative-options {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-light);
}

.alternative-options a {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.alternative-options a:hover {
    text-decoration: underline;
    color: var(--green-medium);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .login-box {
        width: 95%;
        max-width: 1000px;
    }
}

@media (max-width: 992px) {
    .login-box {
        width: 95%;
        max-width: 900px;
        min-height: 550px;
    }
    
    .img-box {
        padding: 40px;
        border-radius: 20px 0 0 20px; /* Maintain curve on tablet */
    }
    
    .login-form {
        padding: 50px 40px;
        border-radius: 0 20px 20px 0; /* Maintain curve on tablet */
    }
    
    .login-form h2 {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .login-screen {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .login-box {
        flex-direction: column;
        width: 100%;
        max-width: 500px;
        min-height: auto;
        border-radius: 20px;
        margin-top: 20px;
    }
    
    .img-box {
        flex: none;
        height: 200px;
        padding: 30px;
        border-radius: 20px 20px 0 0; /* Top curved corners for mobile */
    }
    
    .img-box::before {
        border-radius: 20px 20px 0 0; /* Match mobile curve */
    }
    
    .login-image {
        max-width: 220px;
        border-radius: 10px; /* Slightly smaller curve for mobile */
    }
    
    .login-form {
        flex: none;
        padding: 40px 30px;
        border-radius: 0 0 20px 20px; /* Bottom curved corners for mobile */
    }
    
    .login-form h2 {
        font-size: 30px;
    }
    
    .login-form > p {
        font-size: 14px;
        margin-bottom: 35px;
    }
    
    .form-input {
        height: 50px;
        font-size: 14px;
    }
    
    .btn {
        height: 50px;
        font-size: 14px;
    }
    
    .btn-box {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .login-box {
        border-radius: 16px;
        margin-top: 10px;
    }
    
    .img-box {
        height: 180px;
        padding: 25px;
        border-radius: 16px 16px 0 0; /* Smaller radius for mobile */
    }
    
    .img-box::before {
        border-radius: 16px 16px 0 0; /* Match mobile curve */
    }
    
    .login-image {
        max-width: 180px;
        border-radius: 8px; /* Smaller curve for smaller image */
    }
    
    .login-form {
        padding: 30px 24px;
        border-radius: 0 0 16px 16px; /* Smaller radius for mobile */
    }
    
    .login-form h2 {
        font-size: 26px;
    }
    
    .login-form > p {
        font-size: 13px;
        margin-bottom: 30px;
    }
    
    .form-input {
        height: 48px;
        font-size: 13px;
        padding: 0 45px 0 18px;
    }
    
    .btn {
        height: 48px;
        font-size: 13px;
    }
    
    .forgot-password a {
        font-size: 13px;
    }
}

/* Focus States for Accessibility */
.form-input:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Loading/Disabled States */
.form-input:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .login-screen::before,
    .login-screen::after,
    .img-box::before,
    .login-image,
    .btn::after {
        animation: none;
    }
    
    .form-input:focus,
    .btn:hover {
        transform: none;
    }
}