/* LENTERAMU Login/Register Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Animation */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none; /* Penting: mencegah background menghalangi form */
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    pointer-events: none; /* Penting: mencegah shape menghalangi form */
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 70%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 80%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Back to Landing */
.back-to-landing {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-landing:hover {
    color: #ffeb3b;
    transform: translateX(-5px);
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    position: relative;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(400px, 1.6fr) minmax(300px, 1fr);
    gap: 2rem;
    padding: 1rem;
    align-items: start;
    min-height: calc(100vh - 4rem);
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 101;
    height: fit-content;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.logo i {
    margin-right: 0.5rem;
    font-size: 2.5rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

/* Form Styles */
.login-form {
    margin-bottom: 2rem;
}

/* Error Message */
.error-message {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 102; /* Pastikan input di atas semua */
}

.input-group i {
    position: absolute;
    left: 1rem;
    color: #667eea;
    z-index: 103; /* Icon di atas input */
    pointer-events: none; /* Icon tidak menghalangi input */
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 102; /* Input di atas background */
    cursor: text; /* Pastikan cursor text */
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.input-group input::placeholder {
    color: #999;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 104; /* Pastikan tombol di atas semua */
    pointer-events: auto; /* Pastikan bisa diklik */
    padding: 0.5rem; /* Area klik lebih besar */
}

.toggle-password:hover {
    color: #764ba2;
}

/* Login Button */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 102; /* Pastikan button bisa diklik */
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-container input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    color: white;
    font-size: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn::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 ease;
}

.login-btn:hover::before {
    left: 100%;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-bottom: 2rem;
}

.login-footer p {
    color: #666;
    font-size: 0.9rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Demo Section */
.demo-section {
    border-top: 1px solid #e1e5e9;
    padding-top: 1.5rem;
}

.demo-section h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.demo-accounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.demo-account {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    color: #667eea;
}

.demo-account:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.demo-account i {
    font-size: 1.5rem;
}

/* Features Preview */
.features-preview {
    color: white;
    animation: slideInRight 1s ease-out;
}

.features-preview h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.feature-items {
    display: grid;
    gap: 1.5rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 2rem;
    color: #ffeb3b;
}

.feature-item span {
    font-weight: 500;
    font-size: 1.1rem;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading span {
    opacity: 0;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.input-group.error input,
.input-group.error select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Success States */
.input-group.success input,
.input-group.success select {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        margin: 1rem;
        gap: 2rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .back-to-landing {
        top: 1rem;
        left: 1rem;
    }
    
    .demo-accounts {
        grid-template-columns: 1fr;
    }
    
    .features-preview {
        order: -1;
    }
    
    .features-preview h3 {
        font-size: 1.5rem;
    }
    
    .feature-item {
        padding: 1rem;
    }
    
    .feature-item i {
        font-size: 1.5rem;
    }
    
    .feature-item span {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 0.5rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .login-card {
        background: white;
        border: 3px solid #333;
    }
    
    .input-group input,
    .input-group select {
        border-color: #333;
        background: white;
    }
    
    .login-btn {
        background: #333;
    }
    
    .feature-item {
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .shape {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .login-container {
        display: block;
    }
    
    .features-preview,
    .background-shapes,
    .back-to-landing {
        display: none;
    }
    
    .login-card {
        box-shadow: none;
        background: white;
        border: 1px solid #ccc;
    }
}
