/* Import color system */
@import url('colors.css');

/* ---------- GENERAL ---------- */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    overflow: hidden; /* Prevent scrollbars from appearing */
}

body {
    background-color: #1f295e; /* Fallback color */
}

/* ---------- PARTICLES BACKGROUND ---------- */
#particles-login {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1; /* Background layer */
    background-color: #1f295e;
    background-image: linear-gradient(to bottom, #1f295e, #1c2b5a);
}

/* ---------- LOGIN CONTAINER ---------- */
.login-container {
    position: relative;
    z-index: 2; /* Foreground layer */
    display: flex;
    justify-content: center; /* Center content horizontally */
    align-items: center;
    height: 100vh;
    padding: 0 2rem; /* Add some padding for smaller screens */
}

.login-box {
    width: 100%;
    max-width: 350px;
    color: white;
    text-align: center; /* Center text content inside the box */
}

.logo-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    background: transparent; /* Ensure transparent background */
}

.login-logo {
    max-width: 250px; /* Increased size slightly for better visibility */
    width: 100%;
    height: auto;
    background: transparent; /* Ensure transparent background for PNG */
    /* Removed white filter to show logo in its original colors */
}

/* ---------- FORM STYLES - COMPLETE REDESIGN ---------- */
.form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Completely redesigned input groups - modern, stable, user-friendly */
.input-group {
    position: relative;
    width: 100%;
    height: 58px;
    min-height: 58px;
    max-height: 58px;
    margin: 0;
    margin-bottom: 24px !important; /* Generous spacing between fields */
    padding: 0;
    display: block;
    box-sizing: border-box;
}

/* Last input group before button */
.input-group:last-of-type {
    margin-bottom: 32px !important; /* Extra space before button */
}

/* Icon styling - perfectly centered */
.input-group .input-icon {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1.1rem;
    z-index: 10;
    pointer-events: none;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.input-group .input-icon i {
    display: block;
    line-height: 1;
    margin: 0;
    padding: 0;
    vertical-align: baseline;
}

/* Input field - modern design with perfect centering */
.input-group input {
    width: 100%;
    height: 58px;
    min-height: 58px;
    max-height: 58px;
    padding: 0 20px 0 52px;
    margin: 0;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    -moz-border-radius: 12px !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    background-color: #ffffff;
    color: #111827;
    font-size: 1rem;
    font-weight: 400;
    line-height: 58px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    outline: none;
    position: relative;
    z-index: 1;
    display: block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    overflow: hidden;
    vertical-align: top;
}

.input-group input:hover {
    border-color: #d1d5db;
    background-color: #fafafa;
}

.input-group input:focus {
    border-color: var(--primary, #007bff);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.input-group:focus-within .input-icon {
    color: var(--primary, #007bff);
}

.input-group input::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-weight: 400;
}

.input-group input:focus::placeholder {
    color: #9ca3af;
    opacity: 0.6;
}

/* Prevent any layout shifts */
.input-group * {
    box-sizing: border-box;
}

/* Override Bootstrap completely */
.form .input-group {
    display: block !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    align-items: unset !important;
    width: 100% !important;
}

/* Ensure consistent spacing */
#clinicLoginForm .input-group,
#patientLoginForm .input-group {
    margin-bottom: 24px !important;
}

#clinicLoginForm .input-group:last-of-type,
#patientLoginForm .input-group:last-of-type {
    margin-bottom: 32px !important;
}

/* Button container - proper spacing */
.d-grid {
    margin: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    width: 100%;
}

/* Login button - modern, user-friendly design */
.btn-primary,
#btnLogin,
.btn.btn-primary.btn-lg {
    background-color: var(--primary, #007bff) !important;
    border-color: var(--primary, #007bff) !important;
    color: #ffffff !important;
    padding: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    -moz-border-radius: 12px !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    line-height: 58px !important;
    width: 100% !important;
    margin: 0 !important;
    transition: all 0.2s ease;
    border: none !important;
    cursor: pointer;
    display: block !important;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
}

.btn-primary:hover,
#btnLogin:hover,
.btn.btn-primary.btn-lg:hover {
    background-color: var(--primary-dark, #0056b3) !important;
    border-color: var(--primary-dark, #0056b3) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-primary:active,
#btnLogin:active,
.btn.btn-primary.btn-lg:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

/* Responsive - maintain consistency */
@media (max-width: 768px) {
    .input-group {
        margin-bottom: 24px !important;
        height: 58px !important;
    }
    
    .input-group:last-of-type {
        margin-bottom: 32px !important;
    }
    
    .input-group input {
        height: 58px !important;
        min-height: 58px !important;
        max-height: 58px !important;
        line-height: 58px !important;
    }
    
    .btn-primary,
    #btnLogin {
        height: 58px !important;
        line-height: 58px !important;
    }
}

.register-link {
    margin-top: 1rem;
    text-align: center; /* Center the registration link */
}

.register-link a {
    color: var(--primary-light);
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

.error-alert {
    color: var(--danger);
}