/* ========================================
   LOGIN PAGE SPECIFIC STYLES
   Wise Owl Design System Compliant
   ======================================== */

/* Login page container - full height centering */
.login-page-container {
    /* Use small viewport units for mobile address bar behavior */
    min-height: calc(100svh - 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F2F4F7; /* Canvas - design system neutral background */
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    overflow-y: auto; /* allow scroll on very small screens */
}

/* Login form wrapper - ensures perfect centering */
.login-form-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Login card - clean and focused - Canvas Strategy */
.login-card {
    background: white; /* White card on Canvas background */
    border-radius: 12px; /* rounded-xl - Wise Owl Design System */
    box-shadow: 0 20px 25px -5px rgba(30, 41, 59, 0.1), 0 10px 10px -5px rgba(30, 41, 59, 0.04); /* Using Sage for shadows */
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(30, 41, 59, 0.15);
}

/* Login card header - Sage (The Sage's Logic) */
.login-card-header {
    background: #1E293B; /* Sage - structured, intelligent */
    color: white;
    padding: 2rem;
    text-align: center;
    border: none;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif; /* Display font for headings */
    margin: 0 0 0.5rem 0;
    color: white;
}

.login-subtitle {
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif; /* Body font */
    margin: 0;
    opacity: 0.9;
    color: white;
}

/* Login card body */
.login-card-body {
    padding: 2rem;
}

/* Form styling - Labels top-aligned per design system */
.login-card-body .form-label {
    font-weight: 600;
    color: #1E293B; /* Sage for labels */
    margin-bottom: 0.5rem;
    font-family: 'Open Sans', sans-serif;
}

.login-card-body .form-control {
    border: 2px solid rgba(30, 41, 59, 0.2); /* Sage with opacity */
    border-radius: 8px; /* rounded-lg - Wise Owl Design System */
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.2s ease;
}

.login-card-body .form-control:focus {
    border-color: #1E293B; /* Sage focus ring */
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1); /* Sage ring */
    outline: none;
}

.login-card-body .form-control::placeholder {
    color: rgba(30, 41, 59, 0.4);
}

/* Login button - Primary Action Pattern (Honey with Sage text) */
.btn-login {
    background: #EAB308; /* Honey - The Caregiver's Touch */
    color: #1E293B; /* Sage text */
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 8px; /* rounded-lg - Wise Owl Design System */
    transition: all 0.3s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(234, 179, 8, 0.3); /* Honey shadow */
    background: #CA8A04; /* Burnt Honey */
    color: #1E293B; /* Sage text stays */
}

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

/* Remember me checkbox */
.form-check-input:checked {
    background-color: #EAB308; /* Honey */
    border-color: #EAB308;
}

.form-check-input:focus {
    border-color: #1E293B; /* Sage */
    box-shadow: 0 0 0 0.25rem rgba(30, 41, 59, 0.1); /* Sage ring */
}

.form-check-label {
    color: #1E293B; /* Sage */
    font-family: 'Open Sans', sans-serif;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-page-container {
        padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
        align-items: flex-start; /* avoid vertical centering on short screens */
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
    
    .login-card-header {
        padding: 1.5rem;
    }
    
    .login-card-body {
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .login-page-container {
        padding: 0.25rem 0.25rem calc(0.5rem + env(safe-area-inset-bottom));
    }
    
    .login-card-header {
        padding: 1.25rem;
    }
    
    .login-card-body {
        padding: 1rem;
    }
    
    .login-title {
        font-size: 1.25rem;
    }
}

/* When the viewport height is short, reduce vertical paddings further */
@media (max-height: 640px) {
    .login-page-container {
        align-items: flex-start;
        padding-top: 0.5rem;
    }
    .login-card-header {
        padding: 1rem;
    }
    .login-card-body {
        padding: 0.875rem;
    }
    .btn-login {
        min-height: 44px;
    }
}
