/* custom-login.css - Premium Tidy & Tender Care login stylesheet */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #E83D8C;           /* Brand Pink */
    --primary-hover: #c22971;
    --primary-glow: rgba(232, 61, 140, 0.15);
    --secondary: #0F3878;         /* Brand Dark Blue */
    --secondary-hover: #082046;
    --bg-light: #F6F7F8;
    --card-bg: #ffffff;
    --text-main: #0F3878;
    --text-muted: #7f8c8d;
    --border-color: rgba(15, 56, 120, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Page body styling overriding default bootstrap/sb-admin styles */
body.custom-login-page {
    background-color: var(--bg-light) !important;
    background-image: 
        radial-gradient(circle at 5% 5%, rgba(232, 61, 140, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 95% 95%, rgba(41, 141, 219, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%) !important;
    font-family: var(--font-body) !important;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px;
    overflow: hidden;
    position: relative;
}

@media (max-height: 650px), (max-width: 480px) {
    body.custom-login-page {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        padding: 16px;
    }
}

/* Floating ambient glowing orbs - using fixed to prevent document scrolling */
.bg-glow-orb {
    position: fixed;
    width: 35vw;
    height: 35vw;
    min-width: 300px;
    min-height: 300px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.08;
    pointer-events: none;
    animation: float-glow 25s infinite alternate ease-in-out;
}
.bg-glow-orb-1 {
    background: var(--primary);
    top: -10%;
    left: 5%;
}
.bg-glow-orb-2 {
    background: var(--secondary);
    bottom: -15%;
    right: 5%;
    animation-delay: -8s;
}

@keyframes float-glow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40px, -60px) scale(1.1);
    }
    100% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Login container styles */
.login-container-wrapper {
    width: 100%;
    max-width: 480px;
    z-index: 10;
    position: relative;
}

/* Premium Card Design with Clean White Glassmorphism */
.login-card-custom {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 24px !important;
    padding: 45px 35px !important;
    box-shadow: 0 15px 35px rgba(15, 56, 120, 0.08) !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.login-card-custom:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(15, 56, 120, 0.15), 0 0 40px rgba(232, 61, 140, 0.03) !important;
}

/* Logo and header typography */
.login-logo-img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 6px 20px rgba(232, 61, 140, 0.15));
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-logo-img:hover {
    transform: rotate(15deg) scale(1.08);
}

.system-title {
    font-family: var(--font-heading) !important;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main) !important;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin-bottom: 10px;
    text-align: center;
}

.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15, 56, 120, 0.08) 20%, rgba(15, 56, 120, 0.08) 80%, transparent);
    margin: 20px 0;
    border: none;
}

/* Custom form elements */
.custom-input-group {
    position: relative;
    margin-bottom: 20px;
}

.custom-input-group label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    display: inline-block;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.custom-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.custom-input-wrapper i {
    position: absolute;
    left: 18px;
    color: #94a3b8;
    font-size: 1rem;
    transition: color 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.custom-form-control {
    width: 100%;
    padding: 13px 16px 13px 44px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    color: #2c3e50 !important;
    font-size: 0.92rem !important;
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    outline: none;
    box-shadow: none !important;
}

.custom-form-control::placeholder {
    color: #94a3b8 !important;
}

.custom-form-control:focus {
    border-color: var(--primary) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px var(--primary-glow) !important;
}

.custom-input-group:focus-within label {
    color: var(--primary);
}

.custom-input-group:focus-within i {
    color: var(--primary);
    transform: scale(1.05);
}

/* Validation errors style */
.custom-form-control.is-invalid {
    border-color: #ef4444 !important;
}

.custom-form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

.text-danger-custom {
    font-size: 0.78rem;
    color: #ef4444;
    margin-top: 5px;
    text-align: left;
    display: block;
    font-weight: 500;
}

/* Premium Button styled like Frontend primary button */
.btn-login-custom {
    width: 100%;
    padding: 13px !important;
    background: var(--primary) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(232, 61, 140, 0.2) !important;
    outline: none !important;
    margin-top: 8px;
}

.btn-login-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(15, 56, 120, 0.25) !important;
    background: var(--secondary) !important;
}

.btn-login-custom:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(15, 56, 120, 0.2) !important;
}

/* Footer links styling */
.login-footer-links-custom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.login-link-custom {
    font-family: var(--font-body);
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.25s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-link-custom:hover {
    color: var(--primary) !important;
    transform: translateX(2px);
}

/* Override bootstrap alert boxes inside our custom login */
.login-card-custom .alert {
    border-radius: 10px !important;
    font-size: 0.84rem !important;
    border: 1px solid transparent !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
    font-family: var(--font-body);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left !important;
}

.login-card-custom .alert-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
}

.login-card-custom .alert-success {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.15) !important;
}

.login-card-custom .alert .close {
    position: static !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    color: inherit !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    text-shadow: none !important;
    opacity: 0.5 !important;
    transition: opacity 0.2s !important;
    cursor: pointer;
    margin-left: 10px;
}

.login-card-custom .alert .close:hover {
    opacity: 0.8 !important;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsiveness for small screens */
@media (max-width: 480px) {
    .login-card-custom {
        padding: 30px 20px !important;
        border-radius: 16px !important;
        margin: 10px 0 !important;
    }
    .system-title {
        font-size: 1.25rem !important;
    }
    .custom-form-control {
        padding: 11px 16px 11px 42px !important;
        font-size: 0.88rem !important;
    }
    .btn-login-custom {
        padding: 11px !important;
        font-size: 0.9rem !important;
    }
}
