/* Modern Friendly Login - Light Blue Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #0ea5e9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
}

/* Main container */
.modern-login-container {
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

/* Login card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 
        0 25px 50px rgba(2, 132, 199, 0.25),
        0 0 0 1px rgba(14, 165, 233, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(14, 165, 233, 0.3);
    position: relative;
}

/* Logo section */
.logo-section {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(14, 165, 233, 0.15);
}

.logo-section img {
    max-width: 140px;
    height: auto;
    filter: brightness(1.1) contrast(1.1);
    margin-bottom: 16px;
}

.company-name {
    font-size: 26px;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
    letter-spacing: -0.5px;
}

.company-subtitle {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form section */
.form-section {
    margin-bottom: 32px;
}

.form-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.form-subtitle {
    font-size: 15px;
    color: #64748b;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
    font-weight: 400;
}

/* Form groups - Fixed label positioning */
.form-group {
    position: relative;
    margin-bottom: 28px;
}

.form-group label {
    position: absolute;
    left: 18px;
    top: 18px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    padding: 0 8px;
    border-radius: 4px;
}

.form-group input {
    width: 100%;
    height: 60px;
    background: rgba(248, 250, 252, 0.8);
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 24px 18px 12px 18px;
    font-size: 16px;
    color: #1e293b;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 400;
}

.form-group input::placeholder {
    color: transparent;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #0ea5e9;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: 8px;
    font-size: 12px;
    color: #0284c7;
    background: rgba(255, 255, 255, 1);
    font-weight: 600;
}

/* Input icons - positioned better */
.form-group::before {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 3;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.form-group:focus-within::before {
    opacity: 0.8;
}

.form-group.ruc::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%230ea5e9" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
}

.form-group.username::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%230ea5e9" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
}

.form-group.password::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%230ea5e9" viewBox="0 0 24 24"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>');
}

/* Login button - Friendly style */
.login-button {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.35);
    margin-top: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 14px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.45);
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
}

.login-button:active {
    transform: translateY(0);
}

/* Loading state */
.login-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    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: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Footer - Friendly */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(14, 165, 233, 0.15);
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.login-footer p {
    margin-bottom: 4px;
}

/* Error message styling */
.error-message {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: center;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

/* Success message styling */
.success-message {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: center;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 480px) {
    .modern-login-container {
        margin: 10px;
        max-width: none;
    }
    
    .login-card {
        padding: 40px 24px;
        border-radius: 16px;
    }
    
    .form-title {
        font-size: 22px;
    }
    
    .company-name {
        font-size: 22px;
    }
    
    .form-group input {
        height: 56px;
        padding: 20px 16px 10px 16px;
    }
    
    .form-group label {
        left: 16px;
        top: 16px;
    }
    
    .form-group input:focus + label,
    .form-group input:not(:placeholder-shown) + label {
        top: 6px;
    }
}

/* Focus states for accessibility */
.form-group input:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.login-button:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Subtle hover effects only */
.login-card:hover {
    box-shadow: 
        0 30px 60px rgba(2, 132, 199, 0.3),
        0 0 0 1px rgba(14, 165, 233, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Remove all animations */
.floating {
    /* No animations */
}

.modern-login-container,
.login-card,
.logo-section,
.form-section {
    position: static;
    transform: none;
}

/* Friendly styling enhancements */
.form-group input {
    font-family: 'Inter', sans-serif;
}

.login-button {
    font-family: 'Inter', sans-serif;
}

/* Better spacing and alignment */
.form-group input::placeholder {
    opacity: 0;
}

/* Ensure labels are always visible when field is empty */
.form-group input:placeholder-shown + label {
    top: 18px;
    font-size: 14px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.95);
}

/* Professional border styling */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.3), transparent);
}

/* Add some warmth with subtle shadows */
.login-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(14, 165, 233, 0.15));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-card:hover::after {
    opacity: 1;
}
