/* ============================================
   LOGIN PAGE - SAYURSEHAT
   Modern, Fresh, Agricultural Theme
   ============================================ */

/* ---------- VARIABLES ---------- */
:root {
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #4caf50;
    --primary-soft: #e8f5e9;
    --accent: #ff9800;
    --accent-dark: #f57c00;
    --text-dark: #1a2e1a;
    --text-gray: #4a5b4a;
    --text-light: #7a8b7a;
    --bg-white: #ffffff;
    --bg-green-soft: #f0f7e8;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-xl: 48px;
}

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

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-green-soft) 0%, #e0f0dc 100%);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

/* ---------- ANIMATED BACKGROUND ---------- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatBlob 20s ease-in-out infinite;
}

.bg-blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-light), var(--primary));
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.bg-blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #a5d6a7, #66bb6a);
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

.bg-blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #fff9c4, var(--accent));
    top: 40%;
    left: 30%;
    animation-delay: 10s;
}

@keyframes floatBlob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ---------- FLOATING VEGETABLES ---------- */
.floating-veg {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.veg-float {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.15;
    animation: floatVeg 8s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

@keyframes floatVeg {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

/* ---------- MAIN CONTAINER ---------- */
.login-container {
    width: 100%;
    max-width: 1400px;
    position: relative;
    z-index: 10;
}

.login-card {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
}

/* ---------- LEFT PANEL - BRANDING ---------- */
.brand-panel {
    flex: 1.2;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 48px;
    color: white;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><path d="M20,50 Q35,30 50,50 T80,50" stroke="white" fill="none" stroke-width="1"/><circle cx="30" cy="45" r="2" fill="white"/><circle cx="50" cy="48" r="2" fill="white"/><circle cx="70" cy="45" r="2" fill="white"/></svg>');
    background-repeat: repeat;
    background-size: 60px;
}

.brand-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    backdrop-filter: blur(10px);
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--accent);
}

/* Brand Title */
.brand-title {
    margin-bottom: 48px;
}

.brand-title h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.brand-title h1 span {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.brand-title h1 span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

.brand-divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
    margin: 20px 0;
}

.brand-title p {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.6;
}

/* Features */
.brand-features {
    margin-bottom: 48px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.feature:hover .feature-icon {
    background: var(--accent);
    transform: scale(1.05);
}

.feature h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature span {
    font-size: 0.75rem;
    opacity: 0.75;
}

/* Stats */
.brand-stats {
    display: flex;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- RIGHT PANEL - FORM ---------- */
.form-panel {
    flex: 1;
    background: var(--bg-white);
    padding: 48px;
    display: flex;
    align-items: center;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.form-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-header p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Alert Error */
.alert-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #991b1b;
}

.alert-error i {
    font-size: 1rem;
}

/* Input Fields */
.input-field {
    margin-bottom: 24px;
}

.input-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-field label i {
    color: var(--primary);
    font-size: 0.75rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.input-wrapper input:focus + .input-focus {
    width: 100%;
}

.input-focus {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 0.8rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s;
}

.checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
    position: relative;
}

.checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46,125,50,0.3);
}

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

/* HAPUS: Demo Credential - Tidak digunakan lagi */
/* .demo-credential { ... } */

/* HAPUS: Button Back to Home - Tidak digunakan lagi */
/* .btn-back-home { ... } */

/* Form Footer */
.form-footer {
    margin-top: 32px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.form-footer p {
    font-size: 0.7rem;
    color: var(--text-light);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .login-card {
        flex-direction: column;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .brand-panel {
        padding: 32px;
    }
    
    .brand-title h1 {
        font-size: 2rem;
    }
    
    .brand-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .form-panel {
        padding: 32px;
    }
    
    .floating-veg {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .brand-panel, .form-panel {
        padding: 24px;
    }
    
    .brand-title h1 {
        font-size: 1.6rem;
    }
    
    .brand-features {
        margin-bottom: 24px;
    }
    
    .brand-stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.8s ease-out;
}