/* PIN Code Login Page Styling - Bama Storkjøkken Inspired */

* {
    box-sizing: border-box;
}

.pin-code-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5f3 50%, #d4efea 100%);
    min-height: 100vh;
    position: relative;
}

.pin-code-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 195, 74, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.login-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2;
}

.login-background {
    display: none;
}

.login-overlay {
    display: none;
}

.login-header {
    text-align: center;
    margin-bottom: 3rem;
    z-index: 10;
    position: relative;
}

.brand-logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1b5e20;
    margin: 0;
    letter-spacing: -0.02em;
    animation: slideInFromTop 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-accent {
    color: #4CAF50;
    font-weight: 700;
}

.login-main {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 3.5rem 3rem;
    box-shadow: 
        0 8px 32px rgba(76, 175, 80, 0.12),
        0 2px 8px rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #66BB6A, #8BC34A);
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(76, 175, 80, 0.15),
        0 4px 12px rgba(76, 175, 80, 0.1);
}

.login-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.25);
    position: relative;
}

.login-icon::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, #66BB6A, #4CAF50);
    border-radius: 14px;
    z-index: -1;
}

.login-title {
    color: #1b5e20;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    text-align: center;
    letter-spacing: -0.025em;
}

.login-subtitle {
    color: #2e7d32;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-control {
    height: 56px;
    border: 2px solid #e8f5e8;
    border-radius: 12px;
    padding: 0 1.25rem 0 3.25rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafffe;
    width: 100%;
    color: #1b5e20;
    font-weight: 500;
}

.form-control::placeholder {
    color: #81c784;
    font-weight: 400;
}

.form-control:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.12);
    background: #ffffff;
    outline: none;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #81c784;
    font-size: 1.1rem;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}

.form-control:focus + .input-icon {
    color: #4CAF50;
}

.btn-login {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    letter-spacing: 0.025em;
    text-transform: none;
}

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

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(76, 175, 80, 0.35);
    background: linear-gradient(135deg, #388e3c, #4CAF50);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-login:focus {
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3);
    outline: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-icon {
    animation: slideInFromTop 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.login-title {
    animation: slideInFromTop 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.login-subtitle {
    animation: slideInFromTop 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .brand-logo h1 {
        font-size: 2rem;
    }
    
    .login-header {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .login-main {
        padding: 15px;
    }
    
    .login-card {
        padding: 2.5rem 1.5rem;
        margin: 20px 0;
        border-radius: 12px;
    }
    
    .login-title {
        font-size: 1.4rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }
    
    .brand-logo h1 {
        font-size: 1.6rem;
    }
    
    .form-control {
        height: 52px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-login {
        height: 52px;
        font-size: 1rem;
    }
}

/* Error states */
.form-control.is-invalid {
    border-color: #d32f2f;
    background: rgba(255, 245, 245, 0.9);
    color: #c62828;
}

.form-control.is-invalid:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.12);
}

.form-control.is-invalid + .input-icon {
    color: #d32f2f;
}

/* Success states */
.form-control.is-valid {
    border-color: #2e7d32;
    background: rgba(245, 255, 245, 0.9);
}

.form-control.is-valid:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

.form-control.is-valid + .input-icon {
    color: #2e7d32;
}

/* Loading state */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
    background: #81c784;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}