/* ========================================
   MODERN LOGIN PAGE STYLES
   Sleek, Professional Design
   ======================================== */

/* CSS Variables for Login */
:root {
    --login-primary: #0ea5e9;
    --login-primary-dark: #0284c7;
    --login-gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --login-accent: #6dba4e;
    --login-accent-dark: #5aa33f;
    --login-gray-50: #f8fafc;
    --login-gray-100: #f1f5f9;
    --login-gray-200: #e2e8f0;
    --login-gray-300: #cbd5e1;
    --login-gray-400: #94a3b8;
    --login-gray-500: #64748b;
    --login-gray-600: #475569;
    --login-gray-700: #334155;
    --login-gray-800: #1e293b;
    --login-gray-900: #0f172a;
    --login-radius: 1rem;
    --login-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Background */
.bg-loginAuth {
    background-image: url(../images/login/bg-2.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.bg-loginAuth::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(30, 41, 59, 0.5) 100%);
    z-index: 0;
}

/* Login Card Container */
.user_card {
    position: relative;
    z-index: 1;
    width: 450px;
    max-width: 90%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--login-radius);
    box-shadow: var(--login-shadow);
    padding: 2.5rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s ease-out;
    height: auto;
    min-height: 420px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.brand_logo_container {
    text-align: center;
    margin-bottom: 0.5rem;
}

.brand_logo {
    margin-top: 0;
    padding: 0;
}

.brand_logo img {
    width: 180px !important;
    height: auto;
    margin-top: 0 !important;
    transition: transform 0.3s ease;
}

.brand_logo img:hover {
    transform: scale(1.02);
}

/* Header Text */
.color-lightBlack {
    color: var(--login-gray-800) !important;
}

.user_card h5 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--login-gray-800) !important;
    margin-bottom: 0.25rem !important;
    letter-spacing: -0.025em;
}

.user_card .text-muted {
    color: var(--login-gray-500) !important;
    font-size: 0.9375rem !important;
    margin-bottom: 1.5rem !important;
}

.light-black-color {
    color: var(--login-gray-800) !important;
    font-weight: 600 !important;
}

/* Form Container */
.form_container {
    margin-top: 1.5rem;
    width: 100%;
}

.form_style {
    width: 22em;
    margin-top: 1em;
}

/* Input Groups */
.user_card .input-group {
    margin-bottom: 1.25rem !important;
    border-radius: var(--login-radius) !important;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.user_card .input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(109, 186, 78, 0.2);
}

.user_card .input-group-append {
    order: -1;
}

.user_card .input-group-text {
    background: linear-gradient(135deg, #6dba4e 0%, #5aa33f 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--login-radius) 0 0 var(--login-radius) !important;
    padding: 0.875rem 1.125rem !important;
    font-size: 1rem !important;
    min-width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user_card .input-group-text i {
    font-size: 1rem;
}

.user_card .form-control {
    border: 2px solid var(--login-gray-200) !important;
    border-left: none !important;
    border-radius: 0 var(--login-radius) var(--login-radius) 0 !important;
    padding: 0.875rem 1rem !important;
    font-size: 1rem !important;
    color: var(--login-gray-800) !important;
    background: var(--login-gray-50) !important;
    transition: all 0.3s ease !important;
    height: auto !important;
}

.user_card .form-control:focus {
    background: white !important;
    border-color: #6dba4e !important;
    box-shadow: none !important;
    outline: none !important;
}

.user_card .form-control::placeholder {
    color: var(--login-gray-400) !important;
    font-weight: 400;
}

.input_user,
.input_pass {
    font-weight: 500 !important;
}

/* Login Button */
.login_container {
    padding: 0.5rem 0 0 0 !important;
    margin-top: 0.5rem;
}

.user_card .btn {
    width: 100%;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: var(--login-radius) !important;
    border: none !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
}

.user_card .btn.light-green-theme {
    background: linear-gradient(135deg, #6dba4e 0%, #5aa33f 100%) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(109, 186, 78, 0.4) !important;
}

.user_card .btn.light-green-theme:hover {
    background: linear-gradient(135deg, #5aa33f 0%, #4a8f32 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 186, 78, 0.5) !important;
}

.user_card .btn.light-green-theme:active {
    transform: translateY(0);
}

.user_card .btn.light-green-theme:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.user_card .btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.user_card .btn:hover i:not(.spinner) {
    transform: translateX(4px);
}

/* Spinner Animation */
.user_card .btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Login Button Legacy */
.login_btn {
    width: 100%;
    background: linear-gradient(135deg, #6dba4e 0%, #5aa33f 100%) !important;
    color: white !important;
    padding: 0.875rem 1.5rem !important;
    font-weight: 600 !important;
    border-radius: var(--login-radius) !important;
    border: none !important;
}

.login_btn:hover {
    background: linear-gradient(135deg, #5aa33f 0%, #4a8f32 100%) !important;
}

.login_btn:focus {
    box-shadow: 0 0 0 3px rgba(109, 186, 78, 0.3) !important;
    outline: none !important;
}

/* Margin Classes */
.login-mt-10 {
    margin-top: 0;
}

.login-mt-16 {
    margin-top: 0;
}

/* Loading State */
.loading-main {
    height: 100vh;
    background: transparent !important;
}

/* Additional Styling */
.font-setting {
    color: #6dba4e;
    font-weight: 600;
}

.text-black {
    color: var(--login-gray-800);
}

/* Responsive Design */
@media screen and (max-width: 576px) {
    .bg-loginAuth {
        padding: 1rem;
    }

    .user_card {
        width: 100%;
        max-width: 100%;
        padding: 2rem 1.5rem;
        border-radius: 0.75rem;
        min-height: auto;
    }

    .form_style {
        width: 100%;
    }

    .brand_logo img {
        width: 150px !important;
    }

    .user_card h5 {
        font-size: 1.25rem !important;
    }

    .user_card .form-control,
    .user_card .btn {
        padding: 0.75rem 1rem !important;
    }

    .user_card .input-group-text {
        padding: 0.75rem 1rem !important;
        min-width: 48px;
    }
}

@media screen and (min-width: 768px) {
    .user_card {
        padding: 2.5rem 3rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .bg-loginAuth::before {
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 100%);
    }
}

/* Focus States for Accessibility */
.user_card .form-control:focus-visible,
.user_card .btn:focus-visible {
    outline: 2px solid #6dba4e;
    outline-offset: 2px;
}

/* Custom Checkbox Styling */
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #6dba4e !important;
    border-color: #6dba4e !important;
}

/* Form Divider (if needed) */
.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--login-gray-400);
    font-size: 0.875rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--login-gray-200);
}

.login-divider::before {
    margin-right: 1rem;
}

.login-divider::after {
    margin-left: 1rem;
}

/* Footer Link (if needed) */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--login-gray-200);
}

.login-footer a {
    color: #6dba4e;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: #5aa33f;
    text-decoration: underline;
}

/* Animation for Logo */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.brand_logo {
    animation: fadeIn 0.8s ease-out;
}

/* Floating Label Style (Optional Enhancement) */
.floating-label {
    position: relative;
}

.floating-label label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--login-gray-400);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.2s ease;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 0;
    left: 0.75rem;
    font-size: 0.75rem;
    background: white;
    padding: 0 0.25rem;
    color: #6dba4e;
}
