@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/salengap.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: blur(8px) brightness(0.7);
    -webkit-filter: blur(8px) brightness(0.7);
    transform: scale(1.1);
    z-index: -1;
    pointer-events: none;
}

.min-h-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

.max-w-md {
    max-width: 400px;
    width: 100%;
    height: auto !important;
    position: relative;
    z-index: 10;
}

.bg-white {
    background-color: #ffffff;
}

.rounded-3xl {
    border-radius: 1rem;
}

.shadow-2xl {
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.1);
}

.space-y-8 > * + * {
    margin-top: 1.5rem;
}

.p-10 {
    padding: 1.5rem;
}

.text-center {
    text-align: center;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.text-gray-600 {
    color: #4b5563;
}

.text-sm {
    font-size: 0.9rem;
}

.font-medium {
    font-weight: 500;
}

.mt-6 {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 0.75rem;
}

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

.form-label {
    font-size: 12px;
    color: #555;
    margin-bottom: 1px;
    display: block;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
}

.input-icon {
    position: absolute;
    left: 10px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    z-index: 10;
    width: 16px;
    text-align: center;
    top: 0;
    bottom: 0;
    margin: auto;
    pointer-events: none;
    background: transparent !important;
}

.input-icon i {
    line-height: 1;
    display: block;
    font-size: 13px;
}

.form-input {
    width: 100%;
    padding: 8px 10px 8px 34px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    height: 38px;
    box-sizing: border-box;
    background-color: white;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    -webkit-box-shadow: none !important;
}

/* Override any existing password input styles to match clean-input styling */
input[type="password"],
input[type="text"]#password {
    width: 100% !important;
    height: 44px !important;
    padding: 10px 10px 10px 40px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    letter-spacing: normal !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: transparent !important;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: none;
}

/* Clean input styles without gray background */
.clean-input-group {
    position: relative;
    margin-bottom: 16px;
    background: none;
}

.clean-input-group .input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    z-index: 10;
    font-size: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0.8;
}

.clean-input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    height: 44px;
    box-sizing: border-box;
    background-color: transparent;
    outline: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.clean-input:focus,
input[type="password"]:focus,
input[type="text"]#password:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    z-index: 10;
    outline: none;
    padding: 0;
    display: flex;
    align-items: center;
}

.password-field-wrapper {
    position: relative;
}

#password-requirements {
    display: none;
    position: absolute;
    top: auto; /* Reset any top positioning */
    bottom: 100%; /* Position it right above the password label */
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 12px;
    margin-bottom: 10px; /* Add space between tooltip and password label */
    z-index: 9999; /* Ensure it's on top of everything */
    font-size: 0.75rem;
}

#password-requirements:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #fff transparent transparent;
    display: block;
    width: 0;
}

#password-requirements:before {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 20px;
    border-width: 11px 11px 0;
    border-style: solid;
    border-color: #ddd transparent transparent;
    display: block;
    width: 0;
}

.password-toggle:focus {
    outline: none;
    background: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent; /* Prevent highlight on mobile devices */
}

.password-toggle::-moz-focus-inner {
    border: 0; /* Remove Firefox inner border on focus */
}

.password-toggle i {
    padding: 3px;
    border-radius: 50%;
    transition: color 0.2s ease;
    font-size: 13px;
}

.password-toggle:focus i,
.password-toggle:active i {
    color: #3490dc;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.custom-checkbox {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    margin-right: 0.5rem;
    cursor: pointer;
}

.text-primary {
    color: #2563eb;
}

.text-primary:hover {
    color: #1d4ed8;
}

.sign-in-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    background-color: #000;
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sign-in-btn:hover {
    background-color: #1a1a1a;
}

.mb-6 {
    margin-bottom: 1rem;
}

.mt-6 {
    margin-top: 1rem;
}

.mb-8 {
    margin-bottom: 1.5rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.error-message {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.divider-container {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    width: 100%;
}

.divider-line {
    flex-grow: 1;
    height: 1px;
    background-color: #e5e7eb;
}

.divider-text {
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    white-space: nowrap;
}

.social-login-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    gap: 0.5rem;
    color: #ffffff;
}

.google-btn {
    background-color: #ea4335;
}

.google-btn:hover {
    background-color: #d33426;
}

.social-btn i {
    font-size: 1rem;
}

.text-red-600 {
    color: #dc2626;
}

.text-green-600 {
    color: #059669;
}

@media (max-width: 640px) {
    .p-10 {
        padding: 2rem !important;
    }
    
    /* Make the login card larger on mobile */
    .max-w-md {
        max-width: 95% !important;
        width: 95% !important;
        padding: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .text-sm {
        font-size: 1.1rem !important;
    }
    
    .form-label {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .form-input,
    .clean-input,
    input[type="password"],
    input[type="text"]#password,
    input[type="email"] {
        font-size: 1.1rem !important;
        height: 55px !important;
        padding: 14px 14px 14px 50px !important;
        border-radius: 10px !important;
    }
    
    .clean-input-group .input-icon {
        font-size: 1.3rem !important;
        left: 18px !important;
    }
    
    .password-toggle {
        right: 14px !important;
    }
    
    .password-toggle i {
        font-size: 1.2rem !important;
    }
    
    .sign-in-btn {
        padding: 1rem 1rem !important;
        font-size: 1.1rem !important;
        height: 55px !important;
        border-radius: 10px !important;
    }
    
    .social-btn {
        padding: 1rem 1rem !important;
        font-size: 1.1rem !important;
        height: 55px !important;
        border-radius: 10px !important;
    }
    
    .social-btn i {
        font-size: 1.3rem !important;
    }
    
    .divider-text {
        font-size: 1.1rem !important;
    }
    
    .form-group {
        margin-bottom: 1.5rem !important;
    }
    
    /* Links and text */
    .text-center p,
    .text-center a {
        font-size: 1rem !important;
    }
}

.success-message {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.bg-gradient-to-br {
    background: linear-gradient(to bottom right, #8B5CF6, #3B82F6);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

.btn-primary {
    background-color: #8B5CF6;
    border-color: #8B5CF6;
}

.btn-primary:hover {
    background-color: #7C3AED;
    border-color: #7C3AED;
}

.alert {
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-check {
    margin-top: -10px;
    margin-bottom: 15px;
}

.form-check-label {
    margin-left: 5px;
    font-size: 14px;
    color: #555;
}

.form-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

.logo-center {
    text-align: center;
    margin-bottom: 15px;
}

.logo-center img {
    max-width: 80px;
    height: auto;
}

.form-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    font-size: 24px;
}

.button-primary {
    width: 100%;
    padding: 10px 15px;
    background-color: #3490dc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: background-color 0.3s;
}

.button-primary:hover {
    background-color: #2779bd;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.form-footer a {
    color: #3490dc;
    text-decoration: none;
}

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

@media (max-width: 480px) {
    .form-container {
        margin: 15px;
        padding: 20px;
    }
    
    .form-title {
        font-size: 20px;
    }
    
    .button-primary {
        font-size: 14px;
    }
}

.input-group input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.input-group input:focus {
    border-color: #3490dc;
    box-shadow: 0 0 10px rgba(52, 144, 220, 0.5);
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: inherit !important;
}

/* Style the autocomplete suggestions */
input::-webkit-credentials-auto-fill-button,
input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    position: absolute;
    right: 0;
}

/* Ensure consistent font size for autocomplete dropdown */
input:-webkit-autofill-selected,
input:-webkit-autofill-strong-password {
    font-size: 0.8rem !important;
}

/* Firefox specific autocomplete styles */
input:-moz-autofill,
input:-moz-autofill-preview {
    font-size: 0.8rem !important;
}

.auth-container {
    font-size: 0.9rem;
}

.auth-container h1 {
    font-size: 1.8rem;
}

.auth-container label {
    font-size: 0.85rem;
}

.auth-container .btn {
    font-size: 0.9rem;
}

