/* ==========================================================================
   2i ERP - Authentication UI Styles (Dark Glassmorphic Theme)
   ========================================================================== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/login_bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Ambient blurs disabled for visual image consistency */
.auth-wrapper::before,
.auth-wrapper::after {
    display: none;
}

.auth-card {
    width: 90%;
    max-width: 440px;
    background: rgba(10, 25, 47, 0.45);
    border-radius: 24px;
    border: 1.5px solid rgba(59, 130, 246, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 35px rgba(59, 130, 246, 0.25), inset 0 0 20px rgba(255, 255, 255, 0.05);
    padding: 24px 32px;
    position: relative;
    z-index: 10;
    color: #ffffff;
}

.auth-card.auth-card-wide {
    max-width: 520px;
    padding: 24px 34px;
}

.auth-header {
    text-align: center;
    margin-bottom: 12px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-bottom: 8px;
}

.auth-logo img {
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

.brand-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.4px;
}

.brand-title span {
    color: #3b82f6;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: #94a3b8;
    font-size: 0.82rem;
}

.auth-input-group {
    position: relative;
    margin-bottom: 14px;
}

.auth-input-group i.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.auth-input-group .form-control,
.auth-input-group .form-select {
    padding-left: 40px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    font-size: 0.88rem;
    background-color: rgba(0, 0, 0, 0.25) !important;
    color: #ffffff !important;
    transition: all 0.2s ease;
}

.auth-input-group .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-size: 12px 12px;
    background-position: right 14px center;
    background-repeat: no-repeat;
}

.auth-input-group .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.auth-input-group .form-control:focus,
.auth-input-group .form-select:focus {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
    color: #ffffff !important;
}

/* Chrome/Safari Autofill Styles Overrides */
.auth-input-group input:-webkit-autofill,
.auth-input-group input:-webkit-autofill:hover, 
.auth-input-group input:-webkit-autofill:focus, 
.auth-input-group input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px rgb(8, 14, 27) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-input-group .form-select option {
    background-color: #0d1627 !important;
    color: #ffffff !important;
}

.auth-input-group .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    padding: 6px;
    z-index: 5;
}

.auth-input-group .toggle-password:hover {
    color: #3b82f6;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.btn-auth-submit {
    height: 38px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    color: #fff;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    color: #fff;
}

.auth-secure-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 18px;
}

.auth-footer {
    text-align: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.form-check-label {
    color: #cbd5e1 !important;
}

.form-check-input {
    background-color: rgba(15, 23, 42, 0.4) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
}

.form-check-input:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* Responsive adjustments for mobile and tablets */
@media (max-width: 768px) {
    .auth-wrapper {
        background: radial-gradient(circle at center, #0f172a 0%, #020617 100%) !important;
        padding: 15px;
    }
    .auth-card {
        padding: 20px 14px;
        border-radius: 16px;
        max-width: 100%;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }
    .brand-title {
        font-size: 1.3rem;
    }
    .auth-logo img {
        height: 70px;
    }
}

@media (min-width: 650px) {
    .auth-card {
        margin: 0 auto;
    }
}
