[x-cloak] { display: none !important; }

/* Premium form styling */
.form-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem; /* Increased left padding for icon space */
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    background-color: #f9fafb;
    letter-spacing: 0.01em;
}

.form-input:focus {
    border-color: #1da3dd;
    box-shadow: 0 0 0 4px rgba(29, 163, 221, 0.15);
    outline: none;
    background-color: #ffffff;
}

.form-input:hover {
    border-color: #9ca3af;
    background-color: #ffffff;
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 300;
    opacity: 0.8;
}

/* Icon styling with proper spacing */
.input-icon {
    position: absolute;
    left: 1rem; /* Proper spacing from left edge */
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    transition: all 0.2s ease;
    z-index: 10;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-input:focus + .input-icon,
.form-input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #1da3dd;
}

/* Input wrapper for better icon handling */
.input-wrapper {
    position: relative;
    width: 100%;
}

/* Password toggle button with proper spacing */
.password-toggle {
    position: absolute;
    right: 1rem; /* Proper spacing from right edge */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s ease;
    z-index: 10;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
}

.password-toggle:hover {
    color: #1da3dd;
    transform: translateY(-50%) scale(1.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Button styling with #1da3dd */
.btn-primary {
    background: #1da3dd;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.025em;
    border-radius: 0.75rem;
    width: 100%;
    color: #ffffff;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(29, 163, 221, 0.2), 0 2px 4px -1px rgba(29, 163, 221, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover:not(:disabled) {
    background: #1689b8; /* Darker shade for hover */
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(29, 163, 221, 0.4), 0 8px 10px -6px rgba(29, 163, 221, 0.2);
}

.btn-primary:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(29, 163, 221, 0.2);
    background: #1479a5;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #9ca3af;
}

/* Secondary button styling */
.btn-secondary {
    background: #1da3dd;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.75rem;
    width: 100%;
    color: white;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #111827;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Spacing improvements */
.field.email, .field.password {
    margin-bottom: 1rem;
}

/* Animation for spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive improvements */
@media (max-width: 640px) {
    .form-input {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .input-icon {
        left: 0.875rem;
        width: 1.125rem;
        height: 1.125rem;
    }
    
    .password-toggle {
        right: 0.875rem;
        width: 1.125rem;
        height: 1.125rem;
    }
}

/* Premium card styling */
.premium-card {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Error message styling */
.text-red {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    background-color: #fef2f2;
    border-radius: 0.75rem;
    border-left: 4px solid #dc2626;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Password strength indicator */
.password-strength-bar {
    height: 0.375rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.password-strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Remember me checkbox styling */
.custom-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1.5px solid #d1d5db;
    transition: all 0.2s ease;
    cursor: pointer;
}

.custom-checkbox:checked {
    background-color: #1da3dd;
    border-color: #1da3dd;
}

.custom-checkbox:focus {
    ring: 2px solid #1da3dd;
    ring-offset: 2px;
}

/* Links styling */
.premium-link {
    color: #6b7280;
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.premium-link:hover {
    color: #1da3dd;
}

.premium-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1da3dd;
    transition: width 0.3s ease;
}

.premium-link:hover::after {
    width: 100%;
}

/* Logo styling */
.premium-logo {
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07));
}

.premium-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04));
}

/* Divider styling */
.premium-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 1rem 0;
}

/* Footer text styling */
.footer-text {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.5;
}

.footer-link {
    color: #6b7280;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.footer-link:hover {
    color: #1da3dd;
    text-decoration-color: #1da3dd;
}