:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gradient: linear-gradient(135deg, #27ae60 0%, #f39c12 100%);
}

body {
    background: linear-gradient(135deg, #27ae60 0%, #f39c12 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-section img {
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.logo-section h2 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
    text-align: center;
}

.logo-section p {
    color: #6c757d;
    font-size: 1.1rem;
    text-transform: capitalize;
    text-align: center;
}

.church-icon {
    font-size: 4rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.btn-custom {
    background: var(--gradient);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: capitalize;
    text-align: center;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.form-control {
    border-radius: 12px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    text-align: center;
    text-align-last: center;
    direction: ltr;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Exclude password fields from text transformation */
input[type="password"].form-control {
    text-transform: none;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control::placeholder {
    text-transform: capitalize;
    text-align: center;
    text-align-last: center;
    opacity: 0.7;
}

.input-group-text {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px 0 0 12px;
}

.form-label {
    text-transform: capitalize;
    text-align: center;
    font-weight: 600;
    width: 100%;
}

.alert {
    border-radius: 12px;
    border: none;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.step.active {
    background: var(--gradient);
    color: white;
}

.back-btn {
    background: #6c757d;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: capitalize;
    text-align: center;
}

.back-btn:hover {
    background: #5a6268;
    color: white;
    transform: translateY(-1px);
}

.resend-btn {
    background: #dc3545;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: capitalize;
    text-align: center;
    width: 100%;
    margin-top: 1rem;
}

.resend-btn:hover {
    background: #c82333;
    color: white;
    transform: translateY(-1px);
}

.forgot-password {
    text-transform: capitalize;
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.form-text {
    text-transform: capitalize;
    text-align: center;
}

#otp-timer {
    text-transform: capitalize;
    text-align: center;
    font-weight: 500;
}

#resend-section {
    text-transform: capitalize;
    text-align: center;
}

#resend-section button {
    text-transform: capitalize;
    text-align: center;
}

.toast-container {
    text-align: center;
}

.toast-body {
    text-transform: capitalize;
    text-align: center;
}

.small {
    text-transform: capitalize;
    text-align: center;
}

@media (max-width: 768px) {
    .login-container {
        padding: 2rem;
        margin: 1rem auto;
    }

    .logo-section h2 {
        font-size: 1.5rem;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Custom password toggle button styling - inside the field */
.password-field-container {
    position: relative;
}

.toggle-password-inside {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    border: none !important;
    color: #6c757d !important;
    padding: 4px 8px !important;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.toggle-password-inside:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #495057 !important;
}

.toggle-password-inside:focus {
    outline: none !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Ensure input field has proper padding for the toggle button */
.password-field-container .form-control {
    padding-right: 45px !important;
}

/* Hide browser's native password toggle elements */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}

input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-caps-lock-indicator {
    filter: invert(100%) !important;
    display: none !important;
}

/* Remove LastPass and other password manager toggles */
input[type="password"] + span[style*="cursor: pointer"],
input[type="password"] + span[style*="position: absolute"] {
    display: none !important;
}

/* Force our custom toggle to be visible */
#togglePassword {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}