/* ============================================
   LOGIN PAGE - MODERN INSIDEBOX STYLE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.login-container {
    width: 100%;
    max-width: 1300px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    min-height: 600px;
}

/* ============================================
   LEFT SIDE - FORM
   ============================================ */

.login-form-side {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.form-wrapper {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f0f0f0;
    color: #2d3d1f;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    border: 2px solid transparent;
    width: 100%;
    text-align: center;
}

.btn-home:hover {
    background: #6ab04c;
    color: white;
}

.btn-home i {
    font-size: 0.95rem;
}

.form-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.form-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 400;
}

/* ============================================
   FORM STYLES
   ============================================ */

.modern-form-group {
    margin-bottom: 1.5rem;
}

.modern-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3d1f;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-form-group label i {
    font-size: 0.95rem;
    color: #6ab04c;
}

.modern-input {
    width: 100%;
    padding: 0.95rem 1.2rem;
    padding-left: 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.modern-input:focus {
    outline: none;
    border-color: #6ab04c;
    background: white;
    box-shadow: 0 0 0 3px rgba(106, 176, 76, 0.1);
}

.modern-input::placeholder {
    color: #adb5bd;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 0.9rem;
    pointer-events: none;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #adb5bd;
    background: none;
    border: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #6ab04c;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #6ab04c 0%, #4a7c59 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Poppins', sans-serif;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(106, 176, 76, 0.3);
    background: linear-gradient(135deg, #5a9a3c 0%, #3a6c49 100%);
}

.btn-login:active {
    transform: translateY(0);
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    font-size: 0.85rem;
    color: #adb5bd;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 0.75rem;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.social-btn:hover {
    transform: translateY(-3px);
}

.social-btn.facebook {
    color: #1877f2;
}

.social-btn.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-btn.google {
    color: #ea4335;
}

.social-btn.google:hover {
    background: #ea4335;
    color: white;
    border-color: #ea4335;
}

.social-btn.apple {
    color: #000;
}

.social-btn.apple:hover {
    background: #000;
    color: white;
    border-color: #000;
}

/* ============================================
   LINKS
   ============================================ */

.register-link {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 1.5rem;
}

.register-link a {
    color: #6ab04c;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #4a7c59;
    text-decoration: underline;
}

/* ============================================
   ALERTS
   ============================================ */

.modern-alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border: none;
}

.modern-alert-danger {
    background: #fff5f5;
    color: #c00;
    border-left: 4px solid #c00;
}

.modern-alert-success {
    background: #f0fdf4;
    color: #22c55e;
    border-left: 4px solid #22c55e;
}

.modern-alert i {
    font-size: 1rem;
}

/* ============================================
   RIGHT SIDE - BRANDING
   ============================================ */

.login-brand-side {
    background: linear-gradient(135deg, #6ab04c 0%, #4a7c59 50%, #2d5a3d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
}

.login-brand-side::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.login-brand-side::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    left: -50px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(30px, -30px);
    }
    66% {
        transform: translate(-20px, 20px);
    }
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.brand-shapes {
    position: relative;
    margin-bottom: 2rem;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-animation {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-animation i {
    font-size: 160px;
    color: white;
    opacity: 0.95;
    animation: leafFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.4));
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
}

.scanner-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ringExpand 2.5s ease-out infinite;
}

.ring-1 {
    width: 180px;
    height: 180px;
    animation-delay: 0s;
}

.ring-2 {
    width: 180px;
    height: 180px;
    animation-delay: 0.8s;
}

.ring-3 {
    width: 180px;
    height: 180px;
    animation-delay: 1.6s;
}

@keyframes leafFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.95;
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
        opacity: 1;
    }
}

@keyframes ringExpand {
    0% {
        width: 180px;
        height: 180px;
        opacity: 0.6;
        border-width: 3px;
    }
    100% {
        width: 280px;
        height: 280px;
        opacity: 0;
        border-width: 1px;
    }
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    animation: pulse 4s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    background: white;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    border: 2px solid white;
    animation-delay: 0.5s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: white;
    animation-delay: 1s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.brand-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand-text p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    line-height: 1.6;
    font-weight: 300;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.feature i {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-brand-side {
        min-height: 400px;
        padding: 2rem;
    }

    .brand-text h1 {
        font-size: 2.5rem;
    }

    .brand-text p {
        font-size: 1.1rem;
    }

    .login-form-side {
        padding: 3rem 2rem;
    }

    .form-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .login-container {
        border-radius: 15px;
    }

    .login-form-side {
        padding: 2rem 1.5rem;
    }

    .form-header h2 {
        font-size: 1.8rem;
    }

    .form-header p {
        font-size: 0.85rem;
    }

    .login-brand-side {
        min-height: 300px;
        padding: 1.5rem;
    }

    .brand-text h1 {
        font-size: 2rem;
    }

    .brand-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .brand-features {
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .social-login {
        gap: 0.75rem;
    }

    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-form-side {
    animation: slideInLeft 0.6s ease-out;
}

.login-brand-side {
    animation: slideInRight 0.6s ease-out 0.2s both;
}

/* Focus states */
button:focus-visible,
input:focus-visible {
    outline: 2px solid #6ab04c;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    .login-container {
        box-shadow: none;
    }
}
