/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600&family=Inter:wght@300;400;500;600&display=swap');

/* Reset and use base.css variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Use same variables as base.css */
    --white: #FFFFFF;
    --dark-primary: #2C3E50;
    --dark-secondary: #34495E;
    --gray: #7F8C8D;
    --text-muted: #95A5A6;
    --accent-gold: #F1C40F;
    --kid-blue: #3498DB;
    --kid-purple: #A8E6CF;
    --kid-pink: #FF6B9D;
    
    /* Border radius matching base */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Body - Use same background as other pages */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    /* Remove all complex gradients and animations */
}

/* Use same background setup as base.html */
body.custom-bg {
    background-image: url('../image/bg.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5; /* Fallback color jika image tidak load */
}

/* Alternative: If background image path is wrong, try this */
body.custom-bg {
    background-image: url('../image/bg.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Background overlay - Increase opacity to reduce saturation */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6); /* Changed from 0.3 to 0.6 - same as other pages */
    pointer-events: none;
    z-index: -1;
}

/* Remove all decorative animations */
.decorative-background,
.floating-elements {
    display: none;
}

/* Main Container - Simple */
.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

/* Logo Section - Simplified */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--accent-gold);
    border: 3px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--dark-primary);
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
}

.brand-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-primary);
    text-shadow: 2px 2px 4px rgba(44, 62, 80, 0.1);
}

.brand-subtitle {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--dark-secondary);
    text-shadow: 1px 1px 2px rgba(52, 73, 94, 0.1);
}

/* Login Card - Same style as other pages */
.login-card {
    background: var(--white); /* Solid white like other cards */
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
    position: relative;
}

/* Simple top border accent */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gold);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Card Header - Simplified */
.card-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(44, 62, 80, 0.1);
}

.header-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--dark-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.card-header h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    color: var(--dark-primary);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.4;
}

/* Flash Messages - Simplified */
.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: #FEF2F2;
    color: var(--kid-pink);
    border: 1px solid rgba(255, 107, 157, 0.2);
    border-left: 4px solid var(--kid-pink);
}

.alert-success {
    background: #F0FDF4;
    color: var(--kid-purple);
    border: 1px solid rgba(168, 230, 207, 0.2);
    border-left: 4px solid var(--kid-purple);
}

/* Form Styles - Matching other pages */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
    z-index: 2;
}

input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--white);
    color: var(--dark-primary);
    transition: all 0.3s ease;
    font-weight: 500;
}

input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.2rem rgba(241, 196, 15, 0.25);
    transform: translateY(-2px);
    color: var(--dark-primary);
}

input::placeholder {
    color: var(--gray);
    opacity: 0.8;
    font-weight: 400;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--accent-gold);
}

/* Login Button - Matching other pages */
.login-btn {
    width: 100%;
    padding: 1.5rem 2rem;
    background: var(--accent-gold);
    color: var(--dark-primary);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.login-btn:hover:not(:disabled) {
    background: #F4D03F;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.4);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text,
.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Login Info - Simplified */
.login-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #F8F9FA;
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--kid-blue);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--dark-primary);
}

.info-item i {
    color: var(--kid-blue);
    width: 16px;
    text-align: center;
}

/* Back Home - Simplified */
.back-home {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(44, 62, 80, 0.1);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--gray);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.3s ease;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--dark-primary);
}

.back-link:hover {
    color: var(--white);
    background: var(--dark-primary);
    transform: translateY(-2px);
}

/* Footer - Simplified */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--dark-primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid rgba(44, 62, 80, 0.1);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.1);
}

.footer-links a:hover {
    color: var(--dark-primary);
    background: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.3);
}

.copyright {
    font-size: 0.9rem;
    color: var(--gray); /* Remove space in var(--gray) */
    font-weight: 500;
}

.love-icon {
    color: var(--kid-pink);
    margin: 0 0.3rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .login-container {
        max-width: 420px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .login-container {
        max-width: 100%;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .brand-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .brand-subtitle {
        font-size: 1.3rem;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .card-header p {
        font-size: 0.9rem;
    }
    
    .login-btn {
        padding: 1.3rem 1.5rem;
        font-size: 1.2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-links a {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .login-card {
        padding: 1.5rem 1rem;
    }
    
    .logo-section {
        margin-bottom: 1.5rem;
    }
    
    .brand-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .brand-title {
        font-size: 1.5rem;
    }
    
    .brand-subtitle {
        font-size: 1.1rem;
    }
    
    .card-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.3rem;
    }
    
    .login-btn {
        padding: 1.1rem 1.2rem;
        font-size: 1rem;
    }
    
    .login-info {
        padding: 1rem;
    }
    
    .info-item {
        font-size: 0.85rem;
    }
    
    .footer-links a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}


/* Clean focus states for accessibility */
.login-btn:focus,
.back-link:focus {
    outline: 3px solid rgba(241, 196, 15, 0.5);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .login-footer {
        display: none;
    }
    
    .login-card {
        box-shadow: none;
        background: var(--white);
        border: 1px solid #ccc;
    }
}

/* Simple animations only */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card,
.logo-section {
    animation: fadeIn 0.5s ease-out;
}

.logo-section {
    animation-delay: 0.1s;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}